添加代码
This commit is contained in:
@@ -0,0 +1,258 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const CustomTabBar = () => "../../components/custom-tab-bar.js";
|
||||
const _sfc_main = {
|
||||
components: { CustomTabBar },
|
||||
data() {
|
||||
return {
|
||||
swiperList: ["/static/supply_chain/banner01.png"],
|
||||
currentNum: 0,
|
||||
guaranteeList: [
|
||||
{
|
||||
path: "/static/supply_chain/pz.png",
|
||||
title: "品质保障",
|
||||
content: "100%正品"
|
||||
},
|
||||
{
|
||||
path: "/static/supply_chain/ks.png",
|
||||
title: "快速发货",
|
||||
content: "48小时内送出"
|
||||
},
|
||||
{
|
||||
path: "/static/supply_chain/sh.png",
|
||||
title: "售后服务",
|
||||
content: "快速响应"
|
||||
},
|
||||
{
|
||||
path: "/static/supply_chain/th.png",
|
||||
title: "退货无忧",
|
||||
content: "七天无条件退货"
|
||||
}
|
||||
],
|
||||
sortList: [
|
||||
{
|
||||
path: "/static/supply_chain/sort_fs.png",
|
||||
title: "服饰鞋包",
|
||||
category: "258,259,377"
|
||||
},
|
||||
{
|
||||
path: "/static/supply_chain/sort_sm.png",
|
||||
title: "数码家电",
|
||||
category: "255,257"
|
||||
},
|
||||
{
|
||||
path: "/static/supply_chain/sort_mz.png",
|
||||
title: "美妆个护",
|
||||
category: "278,279,280"
|
||||
},
|
||||
{
|
||||
path: "/static/supply_chain/sort_sp.png",
|
||||
title: "食品酒水",
|
||||
category: "274,275"
|
||||
},
|
||||
{
|
||||
path: "/static/supply_chain/sort_jj.png",
|
||||
title: "家居生活",
|
||||
category: "271"
|
||||
},
|
||||
{
|
||||
path: "/static/supply_chain/sort_my.png",
|
||||
title: "母婴用品",
|
||||
category: "379"
|
||||
},
|
||||
{
|
||||
path: "/static/supply_chain/sort_yd.png",
|
||||
title: "运动户外",
|
||||
category: "380"
|
||||
},
|
||||
{
|
||||
path: "/static/supply_chain/sort_qc.png",
|
||||
title: "汽车用品",
|
||||
category: "389"
|
||||
},
|
||||
{
|
||||
path: "/static/supply_chain/sort_ts.png",
|
||||
title: "图书音像",
|
||||
category: "385"
|
||||
},
|
||||
{
|
||||
path: "/static/supply_chain/sort_bg.png",
|
||||
title: "办公用品",
|
||||
category: "386"
|
||||
}
|
||||
],
|
||||
loading: false,
|
||||
form: {
|
||||
page: 1,
|
||||
limit: 20,
|
||||
app_id: "2024111300164927",
|
||||
sign_type: "MD5",
|
||||
sign: "d04be0cedd49608e758458325faecf90",
|
||||
category: null
|
||||
},
|
||||
productList: []
|
||||
// 商品图
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
this.searchGYLMall();
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 查询供应链的商品
|
||||
*/
|
||||
searchGYLMall() {
|
||||
if (this.loading)
|
||||
return;
|
||||
this.loading = true;
|
||||
try {
|
||||
const params = this.form;
|
||||
common_vendor.index.request({
|
||||
url: "https://cyysc.gscm.top/outside/1/atm/goods/list",
|
||||
method: "get",
|
||||
data: params,
|
||||
header: {},
|
||||
success: (res) => {
|
||||
const data = res.data;
|
||||
if (data && data.result === 1) {
|
||||
const newData = data.data.data;
|
||||
const newArr = newData.map((obj) => {
|
||||
const sales = Math.floor(Math.random() * 5e3) + 700;
|
||||
return { ...obj, sales };
|
||||
});
|
||||
this.productList = [...this.productList, ...newArr];
|
||||
this.form.page++;
|
||||
}
|
||||
},
|
||||
fail: (error) => {
|
||||
common_vendor.index.__f__("log", "at pages/supply_chain/supply_chain.vue:192", "error", error);
|
||||
}
|
||||
});
|
||||
} catch (error) {
|
||||
common_vendor.index.__f__("error", "at pages/supply_chain/supply_chain.vue:196", "加载数据失败:", error);
|
||||
} finally {
|
||||
this.loading = false;
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 分类搜索
|
||||
* @param {Object} item
|
||||
*/
|
||||
sortFun(item) {
|
||||
this.productList = [];
|
||||
this.form.page = 1;
|
||||
this.form.category = item.category;
|
||||
this.searchGYLMall();
|
||||
},
|
||||
// 当滚动到底部时触发的方法
|
||||
loadMore() {
|
||||
this.searchGYLMall();
|
||||
},
|
||||
/**
|
||||
* 详情页面
|
||||
*/
|
||||
jumpInfo(item) {
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/productInfo/productInfo?id=" + item.id + "&source=supply_chain"
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
if (!Array) {
|
||||
const _easycom_up_swiper2 = common_vendor.resolveComponent("up-swiper");
|
||||
const _easycom_up_image2 = common_vendor.resolveComponent("up-image");
|
||||
const _easycom_up_notice_bar2 = common_vendor.resolveComponent("up-notice-bar");
|
||||
const _component_CustomTabBar = common_vendor.resolveComponent("CustomTabBar");
|
||||
(_easycom_up_swiper2 + _easycom_up_image2 + _easycom_up_notice_bar2 + _component_CustomTabBar)();
|
||||
}
|
||||
const _easycom_up_swiper = () => "../../uni_modules/uview-plus/components/u-swiper/u-swiper.js";
|
||||
const _easycom_up_image = () => "../../uni_modules/uview-plus/components/u-image/u-image.js";
|
||||
const _easycom_up_notice_bar = () => "../../uni_modules/uview-plus/components/u-notice-bar/u-notice-bar.js";
|
||||
if (!Math) {
|
||||
(_easycom_up_swiper + _easycom_up_image + _easycom_up_notice_bar)();
|
||||
}
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.t($data.currentNum + 1),
|
||||
b: common_vendor.t($data.swiperList.length),
|
||||
c: common_vendor.o((e) => $data.currentNum = e.current),
|
||||
d: common_vendor.p({
|
||||
list: $data.swiperList,
|
||||
height: "160",
|
||||
bgColor: "#ffffff00"
|
||||
}),
|
||||
e: common_vendor.p({
|
||||
src: "/static/common/note.png",
|
||||
width: "16",
|
||||
height: "16",
|
||||
bgColor: "#f1f6ff00"
|
||||
}),
|
||||
f: common_vendor.p({
|
||||
icon: false,
|
||||
bgColor: "#F5F6F8FF",
|
||||
color: "#000000E6",
|
||||
text: "壹点科技全球聚合供应链:整合京东、阿里、唯品会等一手供应链资源,支持API一键导入,为私域电商全品类货源提供一件代发服务。"
|
||||
}),
|
||||
g: common_vendor.f($data.guaranteeList, (item, index, i0) => {
|
||||
return {
|
||||
a: "52071111-3-" + i0,
|
||||
b: common_vendor.p({
|
||||
src: item.path,
|
||||
width: "20",
|
||||
height: "20",
|
||||
bgColor: "#f1f6ff00"
|
||||
}),
|
||||
c: common_vendor.t(item.title),
|
||||
d: common_vendor.t(item.content),
|
||||
e: index
|
||||
};
|
||||
}),
|
||||
h: common_vendor.f($data.sortList, (item, index, i0) => {
|
||||
return {
|
||||
a: "52071111-4-" + i0,
|
||||
b: common_vendor.p({
|
||||
src: item.path,
|
||||
width: "30",
|
||||
height: "30",
|
||||
bgColor: "#f1f6ff00"
|
||||
}),
|
||||
c: common_vendor.t(item.title),
|
||||
d: index,
|
||||
e: common_vendor.o(($event) => $options.sortFun(item), index)
|
||||
};
|
||||
}),
|
||||
i: $data.productList && $data.productList.length !== 0
|
||||
}, $data.productList && $data.productList.length !== 0 ? {
|
||||
j: common_vendor.f($data.productList, (item, k0, i0) => {
|
||||
return {
|
||||
a: "52071111-5-" + i0,
|
||||
b: common_vendor.p({
|
||||
src: item.thumb,
|
||||
width: "100%",
|
||||
height: "140",
|
||||
bgColor: "#f1f6ff00"
|
||||
}),
|
||||
c: common_vendor.t(item.title),
|
||||
d: common_vendor.t(item.price),
|
||||
e: common_vendor.t(item.sales),
|
||||
f: item.id,
|
||||
g: common_vendor.o(($event) => $options.jumpInfo(item), item.id)
|
||||
};
|
||||
})
|
||||
} : {
|
||||
k: common_vendor.p({
|
||||
src: "/static/common/not_order.png",
|
||||
width: "80",
|
||||
height: "80",
|
||||
bgColor: "#f1f6ff00"
|
||||
})
|
||||
}, {
|
||||
l: common_vendor.o((...args) => $options.loadMore && $options.loadMore(...args)),
|
||||
m: common_vendor.p({
|
||||
tabIndex: 2
|
||||
})
|
||||
});
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-52071111"]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/supply_chain/supply_chain.js.map
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"navigationBarTitleText": "",
|
||||
"usingComponents": {
|
||||
"custom-tab-bar": "../../components/custom-tab-bar",
|
||||
"up-swiper": "../../uni_modules/uview-plus/components/u-swiper/u-swiper",
|
||||
"up-image": "../../uni_modules/uview-plus/components/u-image/u-image",
|
||||
"up-notice-bar": "../../uni_modules/uview-plus/components/u-notice-bar/u-notice-bar"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<view class="supply_chain_warp data-v-52071111"><view class="_header_warp data-v-52071111">全球聚合供应链</view><up-swiper wx:if="{{d}}" class="data-v-52071111" u-s="{{['indicator']}}" bindchange="{{c}}" u-i="52071111-0" bind:__l="__l" u-p="{{d}}"><view class="indicator-num data-v-52071111" slot="indicator"><text class="indicator-num__text data-v-52071111">{{a}}/{{b}}</text></view></up-swiper><view class="supply_chain_note_warp data-v-52071111"><up-image wx:if="{{e}}" class="data-v-52071111" u-i="52071111-1" bind:__l="__l" u-p="{{e}}"></up-image><up-notice-bar wx:if="{{f}}" class="data-v-52071111" u-i="52071111-2" bind:__l="__l" u-p="{{f}}"></up-notice-bar></view><view class="guarantee_warp data-v-52071111"><view wx:for="{{g}}" wx:for-item="item" wx:key="e" class="guarantee_item_warp data-v-52071111"><view class="data-v-52071111" style="margin-top:10rpx"><up-image wx:if="{{item.b}}" class="data-v-52071111" u-i="{{item.a}}" bind:__l="__l" u-p="{{item.b}}"></up-image></view><view class="guarantee_item_content_warp data-v-52071111"><view class="title_ data-v-52071111">{{item.c}}</view><view class="content_ data-v-52071111">{{item.d}}</view></view></view></view><view class="sort_warp data-v-52071111"><view wx:for="{{h}}" wx:for-item="item" wx:key="d" class="sort_item_warp data-v-52071111" bindtap="{{item.e}}"><up-image wx:if="{{item.b}}" class="data-v-52071111" u-i="{{item.a}}" bind:__l="__l" u-p="{{item.b}}"></up-image><view class="sort_item_title_warp data-v-52071111">{{item.c}}</view></view></view><view class="supply_chain_product_warp data-v-52071111"><view class="product_title data-v-52071111"><view class="product_title_msg data-v-52071111">精选好物</view><view class="product_title_bg data-v-52071111"></view></view><scroll-view class="data-v-52071111" scroll-y="true" bindscrolltolower="{{l}}" style="height:calc(100vh - 158px);margin-top:10rpx"><view wx:if="{{i}}" class="supply_chain_product_content data-v-52071111"><view wx:for="{{j}}" wx:for-item="item" wx:key="f" class="product_content_item data-v-52071111" bindtap="{{item.g}}"><up-image wx:if="{{item.b}}" class="data-v-52071111" u-i="{{item.a}}" bind:__l="__l" u-p="{{item.b}}"></up-image><view class="product_content_item_content data-v-52071111"><view class="product_item_name data-v-52071111">{{item.c}}</view><view class="product_item_price data-v-52071111"><view class="price_ data-v-52071111"><text class="data-v-52071111">¥</text><text class="data-v-52071111" style="color:36rpx">{{item.d}}</text></view><view class="price_sell data-v-52071111">已售{{item.e}}件</view></view></view></view></view><view wx:else class="not_order_warp data-v-52071111"><up-image wx:if="{{k}}" class="data-v-52071111" u-i="52071111-6" bind:__l="__l" u-p="{{k}}"></up-image><view class="not_order_msg_warp data-v-52071111">还未添加商品哦~</view></view></scroll-view></view><custom-tab-bar wx:if="{{m}}" class="data-v-52071111" u-i="52071111-7" bind:__l="__l" u-p="{{m}}"/></view>
|
||||
@@ -0,0 +1,137 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/* uni.scss */
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
.supply_chain_warp.data-v-52071111 {
|
||||
height: calc(100vh - 140rpx);
|
||||
overflow: auto;
|
||||
background-color: #F5F5F5FF;
|
||||
}
|
||||
.supply_chain_warp ._header_warp.data-v-52071111 {
|
||||
margin-top: 60rpx;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
background-color: #F5F5F5FF;
|
||||
text-align: center;
|
||||
}
|
||||
.supply_chain_warp .supply_chain_note_warp.data-v-52071111 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 0 0 30rpx;
|
||||
}
|
||||
.supply_chain_warp .guarantee_warp.data-v-52071111 {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
background: #FFFFFF;
|
||||
padding: 10rpx 30rpx;
|
||||
}
|
||||
.supply_chain_warp .guarantee_warp .guarantee_item_warp.data-v-52071111 {
|
||||
width: 25%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.supply_chain_warp .guarantee_warp .guarantee_item_content_warp.data-v-52071111 {
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
.supply_chain_warp .guarantee_warp .title_.data-v-52071111 {
|
||||
font-size: 18rpx;
|
||||
color: rgba(0, 0, 0, 0.6);
|
||||
}
|
||||
.supply_chain_warp .guarantee_warp .content_.data-v-52071111 {
|
||||
font-size: 14rpx;
|
||||
color: rgba(0, 0, 0, 0.26);
|
||||
margin-top: 6rpx;
|
||||
}
|
||||
.supply_chain_warp .sort_warp.data-v-52071111 {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
padding: 30rpx 0;
|
||||
}
|
||||
.supply_chain_warp .sort_warp .sort_item_warp.data-v-52071111 {
|
||||
width: 20%;
|
||||
text-align: center;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
.supply_chain_warp .sort_warp .sort_item_title_warp.data-v-52071111 {
|
||||
font-size: 24rpx;
|
||||
color: rgba(0, 0, 0, 0.9);
|
||||
}
|
||||
.supply_chain_warp .supply_chain_product_warp.data-v-52071111 {
|
||||
padding: 0rpx 30rpx 0;
|
||||
}
|
||||
.supply_chain_warp .supply_chain_product_warp .product_title.data-v-52071111 {
|
||||
position: relative;
|
||||
}
|
||||
.supply_chain_warp .supply_chain_product_warp .product_title .product_title_msg.data-v-52071111 {
|
||||
position: relative;
|
||||
font-family: AlimamaFangYuanTiVF-Medium, AlimamaFangYuanTiVF-Medium;
|
||||
font-weight: normal;
|
||||
font-size: 38rpx;
|
||||
color: rgba(0, 0, 0, 0.9);
|
||||
z-index: 2;
|
||||
}
|
||||
.supply_chain_warp .supply_chain_product_warp .product_title .product_title_bg.data-v-52071111 {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
width: 113rpx;
|
||||
height: 15rpx;
|
||||
background: #FFA749FF;
|
||||
border-radius: 8rpx;
|
||||
z-index: 1;
|
||||
}
|
||||
.supply_chain_warp .supply_chain_product_warp .supply_chain_product_content.data-v-52071111 {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
overflow: auto;
|
||||
}
|
||||
.supply_chain_warp .supply_chain_product_warp .supply_chain_product_content .product_content_item.data-v-52071111 {
|
||||
width: 48%;
|
||||
background: #FFFFFF;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
.supply_chain_warp .supply_chain_product_warp .supply_chain_product_content .product_content_item .product_content_item_content.data-v-52071111 {
|
||||
border-radius: 18rpx;
|
||||
padding: 0 20rpx 20rpx;
|
||||
}
|
||||
.supply_chain_warp .supply_chain_product_warp .supply_chain_product_content .product_content_item .product_item_name.data-v-52071111 {
|
||||
font-weight: 500;
|
||||
font-size: 30rpx;
|
||||
color: rgba(0, 0, 0, 0.9);
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
overflow: hidden;
|
||||
}
|
||||
.supply_chain_warp .supply_chain_product_warp .supply_chain_product_content .product_content_item .product_item_price.data-v-52071111 {
|
||||
font-size: 20rpx;
|
||||
color: #FF7C41;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
.supply_chain_warp .supply_chain_product_warp .supply_chain_product_content .product_content_item .product_item_price .price_sell.data-v-52071111 {
|
||||
color: rgba(0, 0, 0, 0.26);
|
||||
}
|
||||
Reference in New Issue
Block a user