最新代码
This commit is contained in:
+1
-1
@@ -72,7 +72,7 @@
|
|||||||
"__platform__" : [ "ios", "android" ]
|
"__platform__" : [ "ios", "android" ]
|
||||||
},
|
},
|
||||||
"weixin" : {
|
"weixin" : {
|
||||||
"__platform__" : [ "ios" ],
|
"__platform__" : [ "ios", "android" ],
|
||||||
"appid" : "wx7a5902cd556d9396",
|
"appid" : "wx7a5902cd556d9396",
|
||||||
"UniversalLinks" : "https://app.tbmall.xin/uni-universallinks/__UNI__4910728/"
|
"UniversalLinks" : "https://app.tbmall.xin/uni-universallinks/__UNI__4910728/"
|
||||||
}
|
}
|
||||||
|
|||||||
+359
-208
@@ -1,208 +1,359 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="content-two">
|
<view class="supply_chain_warp">
|
||||||
<TopSafe></TopSafe>
|
<view class="_header_warp">全球聚合供应链</view>
|
||||||
<view class="head-view">
|
|
||||||
<view class="head-search" @click="onJumpSearch">
|
<!-- <view class="_content_warp"> -->
|
||||||
<u-icon size="24" name="search" color="#999"></u-icon>
|
<up-swiper :list="swiperList" height="160" @change="e => currentNum = e.current" bgColor="#ffffff00">
|
||||||
<text class="text-28 text-fu" style="margin-left: 12rpx">搜索</text>
|
<template #indicator>
|
||||||
</view>
|
<view class="indicator-num">
|
||||||
</view>
|
<text class="indicator-num__text">{{ currentNum + 1 }}/{{ swiperList.length }}</text>
|
||||||
<view class="tab-view">
|
</view>
|
||||||
<view
|
</template>
|
||||||
class="tab-list"
|
</up-swiper>
|
||||||
@click="onTab(index)"
|
<!-- 通知 -->
|
||||||
v-for="(item, index) in tabList"
|
<view class="supply_chain_note_warp">
|
||||||
:key="index"
|
<up-image src="/static/common/note.png" width="16" height="16" bgColor="#f1f6ff00"></up-image>
|
||||||
>
|
<up-notice-bar :icon="false" bgColor="#F5F6F8FF" color="#000000E6"
|
||||||
<text
|
text="壹点科技全球聚合供应链:整合京东、阿里、唯品会等一手供应链资源,支持API一键导入,为私域电商全品类货源提供一件代发服务。"></up-notice-bar>
|
||||||
class="text-28 text-space"
|
</view>
|
||||||
:style="{
|
<!-- 保障 -->
|
||||||
color: curTab == index ? '#7A35F6' : '#666',
|
<view class="guarantee_warp">
|
||||||
}"
|
<view class="guarantee_item_warp" v-for="(item, index) in guaranteeList" :key="index">
|
||||||
>{{ item.name }}</text
|
<view style="margin-top: 10rpx;">
|
||||||
>
|
<up-image :src="item.path" width="20" height="20" bgColor="#f1f6ff00"></up-image>
|
||||||
<view class="line" v-if="curTab == index"></view>
|
</view>
|
||||||
</view>
|
<view class="guarantee_item_content_warp">
|
||||||
</view>
|
<view class="title_">{{ item.title }}</view>
|
||||||
<view class="setting-view">
|
<view class="content_">{{ item.content }}</view>
|
||||||
<view class="name-box">
|
</view>
|
||||||
<PingItem
|
</view>
|
||||||
@ok="onJumpShop"
|
</view>
|
||||||
style="margin-top: 24rpx"
|
<!-- 分类 -->
|
||||||
:obj="item"
|
<view class="sort_warp">
|
||||||
v-for="(item, index) in dataList"
|
<view class="sort_item_warp" v-for="(item, index) in sortList" :key="index" @click="sortFun(item)">
|
||||||
:key="index"
|
<up-image :src="item.path" width="30" height="30" bgColor="#f1f6ff00"></up-image>
|
||||||
></PingItem>
|
<view class="sort_item_title_warp">{{ item.title }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<up-toast ref="uToastRef"></up-toast>
|
<!-- 商品 -->
|
||||||
<!-- #ifndef H5 -->
|
<view class="supply_chain_product_warp">
|
||||||
<CustomTabBar :tabIndex="2" />
|
<view class="product_title">
|
||||||
<!-- #endif -->
|
<view class="product_title_msg">精选好物</view>
|
||||||
</view>
|
<view class="product_title_bg"></view>
|
||||||
</template>
|
</view>
|
||||||
|
<scroll-view scroll-y="true" @scrolltolower="loadMore" style="height:calc(100vh - 158px);margin-top: 10rpx;">
|
||||||
<script>
|
<view class="supply_chain_product_content" v-if="productList && productList.length !== 0">
|
||||||
import { getCascadeCategory } from "@/api/common.js";
|
<view class="product_content_item" v-for="item in productList" :key="item.id" @click="jumpInfo(item)">
|
||||||
import Header from "@/components/common/header.vue";
|
<up-image :src="item.thumb" width="100%" height="140" bgColor="#f1f6ff00"></up-image>
|
||||||
import TopSafe from "@/components/common/top-safe.nvue";
|
<view class="product_content_item_content">
|
||||||
import MyBtn from "@/components/common/my-btn.vue";
|
<view class="product_item_name">{{ item.title }}</view>
|
||||||
import PingItem from "@/components/shop/ping-item.vue";
|
<view class="product_item_price">
|
||||||
import { searchList } from "@/api/product.js";
|
<view class="price_">
|
||||||
import func from "@/utils/func.js";
|
<text>¥</text>
|
||||||
|
<text style="color:36rpx;">{{ item.price }}</text>
|
||||||
export default {
|
</view>
|
||||||
components: { Header, TopSafe, MyBtn, PingItem },
|
<view class="price_sell">已售{{ item.sales }}件</view>
|
||||||
data() {
|
</view>
|
||||||
return {
|
</view>
|
||||||
dataList: [],
|
</view>
|
||||||
tabList: [],
|
</view>
|
||||||
curTab: 0,
|
<view v-else class="not_order_warp">
|
||||||
};
|
<up-image src="https://cex-pub.s3.ap-southeast-1.amazonaws.com/static/not_order.png" width="80" height="80"
|
||||||
},
|
bgColor="#f1f6ff00"></up-image>
|
||||||
onShow() {},
|
<view class="not_order_msg_warp">还未添加商品哦~</view>
|
||||||
onLoad() {
|
</view>
|
||||||
this.init();
|
</scroll-view>
|
||||||
},
|
</view>
|
||||||
methods: {
|
<!-- </view> -->
|
||||||
async cascadeCategory() {
|
<!-- #ifndef H5 -->
|
||||||
getCascadeCategory({ parentId: 0 }).then((res) => {
|
<CustomTabBar :tabIndex="2" />
|
||||||
if (res && res.bizcode === 100) {
|
<!-- #endif -->
|
||||||
this.tabList = res.data;
|
</view>
|
||||||
this.getSearchList();
|
</template>
|
||||||
}
|
|
||||||
});
|
<script>
|
||||||
},
|
import { getCarouselImage } from '@/api/common.js';
|
||||||
onTab(index) {
|
import { APP_PAGE_TYPE } from '@/utils/enumUtils.js';
|
||||||
if (index != this.curTab) {
|
import CustomTabBar from '@/components/custom-tab-bar.vue';
|
||||||
this.curTab = index;
|
|
||||||
this.getSearchList();
|
export default {
|
||||||
}
|
components: { CustomTabBar },
|
||||||
},
|
data() {
|
||||||
init() {
|
return {
|
||||||
this.cascadeCategory();
|
swiperList: ['https://cex-pub.s3.ap-southeast-1.amazonaws.com/static/banner01.png'],
|
||||||
},
|
currentNum: 0,
|
||||||
async getSearchList() {
|
guaranteeList: [
|
||||||
const params = {
|
{
|
||||||
type: 2,
|
path: '/static/supply_chain/pz.png',
|
||||||
page: 1,
|
title: '品质保障',
|
||||||
pageSize: 99,
|
content: '100%正品',
|
||||||
categoryId: this.tabList[this.curTab].id,
|
}, {
|
||||||
isPar: true,
|
path: '/static/supply_chain/ks.png',
|
||||||
};
|
title: '快速发货',
|
||||||
const resp = await searchList(params);
|
content: '48小时内送出',
|
||||||
if (resp && resp.bizcode === 100) {
|
}, {
|
||||||
this.dataList = resp.data || [];
|
path: '/static/supply_chain/sh.png',
|
||||||
}
|
title: '售后服务',
|
||||||
},
|
content: '快速响应',
|
||||||
onJumpSearch() {
|
}, {
|
||||||
uni.navigateTo({
|
path: '/static/supply_chain/th.png',
|
||||||
url: "/pages/rwa_package/dongjian/search",
|
title: '退货无忧',
|
||||||
});
|
content: '七天无条件退货',
|
||||||
},
|
},
|
||||||
onJumpShop(id) {
|
],
|
||||||
uni.navigateTo({
|
sortList: [
|
||||||
url: "/pages/other_package/productInfo/productInfo?id=" + id,
|
{
|
||||||
});
|
path: '/static/supply_chain/sort_fs.png',
|
||||||
},
|
title: '服饰鞋包',
|
||||||
onShare() {
|
category: "258,259,377"
|
||||||
uni.navigateTo({
|
}, {
|
||||||
url: "/pages/other_package/invite_friends/invite_friends",
|
path: '/static/supply_chain/sort_sm.png',
|
||||||
});
|
title: '数码家电',
|
||||||
},
|
category: "255,257"
|
||||||
},
|
}, {
|
||||||
};
|
path: '/static/supply_chain/sort_mz.png',
|
||||||
</script>
|
title: '美妆个护',
|
||||||
|
category: "278,279,280"
|
||||||
<style lang="scss" scoped>
|
}, {
|
||||||
.content-two {
|
path: '/static/supply_chain/sort_sp.png',
|
||||||
display: flex;
|
title: '食品酒水',
|
||||||
min-width: 750rpx;
|
category: "274,275"
|
||||||
max-width: 750rpx;
|
}, {
|
||||||
// #ifdef H5
|
path: '/static/supply_chain/sort_jj.png',
|
||||||
height: calc(100vh - 100rpx);
|
title: '家居生活',
|
||||||
//#endif
|
category: "271"
|
||||||
// #ifndef H5
|
}, {
|
||||||
height: 500rpx;
|
path: '/static/supply_chain/sort_my.png',
|
||||||
//#endif
|
title: '母婴用品',
|
||||||
height: calc(100vh - 20rpx - var(--window-bottom));
|
category: "379"
|
||||||
padding: 0;
|
}, {
|
||||||
margin: 0;
|
path: '/static/supply_chain/sort_yd.png',
|
||||||
flex-direction: column;
|
title: '运动户外',
|
||||||
align-items: center;
|
category: "380"
|
||||||
position: fixed;
|
}, {
|
||||||
top: 0;
|
path: '/static/supply_chain/sort_qc.png',
|
||||||
left: 0;
|
title: '汽车用品',
|
||||||
overflow: hidden;
|
category: "389"
|
||||||
background-color: $app-bj;
|
}, {
|
||||||
}
|
path: '/static/supply_chain/sort_ts.png',
|
||||||
.head-view {
|
title: '图书音像',
|
||||||
width: 100%;
|
category: "385"
|
||||||
min-height: 88rpx;
|
}, {
|
||||||
height: 88rpx;
|
path: '/static/supply_chain/sort_bg.png',
|
||||||
display: flex;
|
title: '办公用品',
|
||||||
align-items: center;
|
category: "386"
|
||||||
padding: 0 32rpx;
|
},
|
||||||
box-sizing: border-box;
|
],
|
||||||
background-color: #fff;
|
loading: false,
|
||||||
.head-search {
|
form: {
|
||||||
width: 100%;
|
page: 1,
|
||||||
height: 76rpx;
|
limit: 20,
|
||||||
padding: 0 24rpx;
|
app_id: "2024111300164927",
|
||||||
flex-direction: row;
|
sign_type: "MD5",
|
||||||
display: flex;
|
sign: "d04be0cedd49608e758458325faecf90",
|
||||||
background-color: #f7f7f7;
|
category: null,
|
||||||
align-items: center;
|
},
|
||||||
border-radius: 16rpx;
|
productList: [],// 商品图
|
||||||
}
|
};
|
||||||
}
|
},
|
||||||
.tab-view {
|
onLoad(option) {
|
||||||
width: 100%;
|
this.searchGYLMall();
|
||||||
height: 80rpx;
|
},
|
||||||
min-height: 80rpx;
|
methods: {
|
||||||
display: flex;
|
/**
|
||||||
flex-direction: row;
|
* 查询供应链的商品
|
||||||
padding: 0 32rpx;
|
*/
|
||||||
box-sizing: border-box;
|
searchGYLMall() {
|
||||||
background-color: #fff;
|
if (this.loading) return; // 如果正在加载,则不重复加载
|
||||||
overflow-x: auto;
|
this.loading = true; // 设置加载状态为true
|
||||||
.tab-list {
|
try {
|
||||||
margin-right: 24rpx;
|
const params = this.form;
|
||||||
display: flex;
|
uni.request({
|
||||||
flex-direction: column;
|
url: "https://cyysc.gscm.top/outside/1/atm/goods/list",
|
||||||
height: 60rpx;
|
method: "get",
|
||||||
min-height: 60rpx;
|
data: params,
|
||||||
align-items: center;
|
header: {},
|
||||||
justify-content: space-between;
|
success: (res) => {
|
||||||
margin-top: 22rpx;
|
const data = res.data;
|
||||||
}
|
if (data && data.result === 1) {
|
||||||
.line {
|
const newData = data.data.data;
|
||||||
width: 48rpx;
|
const newArr = newData.map(obj => {
|
||||||
height: 4rpx;
|
const sales = Math.floor(Math.random() * 5000) + 700;
|
||||||
background-color: #7a35f6;
|
return { ...obj, sales: sales }; // 使用展开运算符添加新属性
|
||||||
}
|
});
|
||||||
}
|
this.productList = [...this.productList, ...newArr]; // 将新数据添加到列表中
|
||||||
.setting-view {
|
this.form.page++;
|
||||||
width: 100%;
|
}
|
||||||
height: calc(100% - 88rpx - 80rpx - var(--status-bar-height));
|
},
|
||||||
display: flex;
|
fail: (error) => {
|
||||||
flex-direction: column;
|
console.log("error", error);
|
||||||
align-items: center;
|
},
|
||||||
overflow-y: auto;
|
});
|
||||||
padding: 0 32rpx;
|
} catch (error) {
|
||||||
box-sizing: border-box;
|
console.error('加载数据失败:', error);
|
||||||
position: relative;
|
} finally {
|
||||||
.name-box {
|
this.loading = false; // 设置加载状态为false
|
||||||
width: 100%;
|
}
|
||||||
border-radius: 16rpx;
|
},
|
||||||
height: 100%;
|
/**
|
||||||
overflow-y: auto;
|
* 分类搜索
|
||||||
display: flex;
|
* @param {Object} item
|
||||||
flex-wrap: wrap;
|
*/
|
||||||
justify-content: space-between;
|
sortFun(item) {
|
||||||
align-content: flex-start;
|
this.productList = [];
|
||||||
|
this.form.page = 1;
|
||||||
box-sizing: border-box;
|
this.form.category = item.category;
|
||||||
}
|
this.searchGYLMall(); // 加载更多数据
|
||||||
}
|
},
|
||||||
</style>
|
|
||||||
|
// 当滚动到底部时触发的方法
|
||||||
|
loadMore() {
|
||||||
|
this.searchGYLMall(); // 加载更多数据
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 详情页面
|
||||||
|
*/
|
||||||
|
jumpInfo(item) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/other_package/productInfo/productInfo?id=' + item.id + "&source=supply_chain",
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.supply_chain_warp {
|
||||||
|
height: calc(100vh - env(safe-area-inset-bottom));
|
||||||
|
overflow: auto;
|
||||||
|
background-color: $app-bj;
|
||||||
|
|
||||||
|
._header_warp {
|
||||||
|
margin-top: 60rpx;
|
||||||
|
height: 80rpx;
|
||||||
|
line-height: 80rpx;
|
||||||
|
background-color: $app-bj;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.supply_chain_note_warp {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding: 0 0 0 30rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.guarantee_warp {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
background: #FFFFFF;
|
||||||
|
padding: 10rpx 30rpx;
|
||||||
|
|
||||||
|
.guarantee_item_warp {
|
||||||
|
width: 25%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.guarantee_item_content_warp {
|
||||||
|
margin-left: 10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title_ {
|
||||||
|
font-size: 18rpx;
|
||||||
|
color: rgba(0, 0, 0, 0.6);
|
||||||
|
}
|
||||||
|
|
||||||
|
.content_ {
|
||||||
|
font-size: 14rpx;
|
||||||
|
color: rgba(0, 0, 0, 0.26);
|
||||||
|
margin-top: 6rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.sort_warp {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
padding: 30rpx 0;
|
||||||
|
|
||||||
|
.sort_item_warp {
|
||||||
|
width: 20%;
|
||||||
|
text-align: center;
|
||||||
|
margin-bottom: 10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sort_item_title_warp {
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: rgba(0, 0, 0, 0.9);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.supply_chain_product_warp {
|
||||||
|
padding: 0rpx 30rpx 0;
|
||||||
|
|
||||||
|
.product_title {
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
.product_title_msg {
|
||||||
|
position: relative;
|
||||||
|
font-family: AlimamaFangYuanTiVF-Medium, AlimamaFangYuanTiVF-Medium;
|
||||||
|
font-weight: normal;
|
||||||
|
font-size: 38rpx;
|
||||||
|
color: rgba(0, 0, 0, 0.9);
|
||||||
|
z-index: 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.product_title_bg {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0;
|
||||||
|
width: 113rpx;
|
||||||
|
height: 15rpx;
|
||||||
|
background: #FFA749FF;
|
||||||
|
border-radius: 8rpx;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.supply_chain_product_content {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: space-between;
|
||||||
|
overflow: auto;
|
||||||
|
|
||||||
|
.product_content_item {
|
||||||
|
width: 48%;
|
||||||
|
background: #FFFFFF;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
|
||||||
|
.product_content_item_content {
|
||||||
|
border-radius: 18rpx;
|
||||||
|
padding: 0 20rpx 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.product_item_name {
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
.product_item_price {
|
||||||
|
font-size: 20rpx;
|
||||||
|
color: $app-zt-color;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin-top: 10rpx;
|
||||||
|
|
||||||
|
.price_sell {
|
||||||
|
color: rgba(0, 0, 0, 0.26);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user