no message

This commit is contained in:
2025-09-03 21:06:28 +08:00
parent c2ba5048b0
commit 40e5e0ff8d
12 changed files with 1108 additions and 333 deletions
+19
View File
@@ -49,6 +49,19 @@
overflow: hidden;
background-color: $app-bj;
}
.content-one {
display: flex;
min-width: 750rpx;
max-width: 750rpx;
height: calc(100vh - 100rpx);
padding: 0;
margin: 0;
flex-direction: column;
align-items: center;
position: relative;
overflow: hidden;
background-color: $app-bj;
}
.flex-r-lr{
display: flex;
flex-direction: row;
@@ -123,6 +136,9 @@
.text-28{
font-size:28rpx;
}
.text-30{
font-size:30rpx;
}
.text-32{
font-size:32rpx;
}
@@ -152,6 +168,9 @@
.text-d{
text-decoration: line-through;
}
.text-space{
white-space: nowrap;
}
button {
margin-bottom: 15px;
+1 -1
View File
@@ -1,7 +1,7 @@
<template>
<view class="my-btn" @click.stop="onClick"
:style="{
'border-radius':br,'min-height':mh,'background-color':bg,width:wd
'border-radius':br,'min-height':mh,'background':bg,width:wd
}">
<text :style="{
color:color,'font-size':fz,'font-weight':fw
+95
View File
@@ -0,0 +1,95 @@
<template>
<view class="shop-view" @click.stop="onClick">
<view class="shop-left-view">
<image :src="obj.url"></image>
</view>
<view class="shop-right-view">
<view class="right-top-view text-overflow1">
<text class="text-32 text-bold text-zu text-overflow1">{{obj.title}}</text>
</view>
<view class="right-bottom-view">
<text class="text-28 text-zi text-bold">¥{{obj.price}}积分</text>
<MyBtn mh="64rpx" text="立即兑换" br="8rpx" bg="linear-gradient( 270deg, #B164FB 0%, #7934F6 100%)" wd="200rpx"></MyBtn>
</view>
</view>
</view>
</template>
<script>
import MyBtn from '@/components/common/my-btn.vue'
export default {
components:{MyBtn},
props:{
obj:{
type:Object,
default:()=>{}
},
},
mounted(){
},
methods: {
onClick(){
this.$emit('ok',this.obj.id);
}
}
}
</script>
<style lang="scss" scoped>
.shop-view{
width:100%;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
padding: 12rpx;
box-sizing: border-box;
background-color: #fff;
border-radius: 12rpx;
.shop-left-view{
min-width:216rpx;
min-height:216rpx;
display: flex;
align-items: center;
justify-content: center;
image{
width:216rpx;
height:216rpx;
}
}
.shop-right-view{
width:100%;
display: flex;
min-height:216rpx;
margin-left:24rpx;
flex-direction: column;
justify-content: space-between;
.right-top-view{
width:100%;
display: flex;
}
.right-bottom-view{
width:100%;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: flex-end;
.right-bottom-panel{
width:284rpx;
height:104rpx;
min-height:104rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
padding: 12rpx;
box-sizing: border-box;
background-color: #F0E7FE;
border-radius: 8rpx;
}
}
}
}
</style>
+63
View File
@@ -0,0 +1,63 @@
<template>
<view class="shop-view" @click.stop="onClick">
<image :src="obj.url" class="top-img"></image>
<view class="shop-bottom-panel">
<text class="text-30 text-zu text-overflow1">{{obj.title}}</text>
<view class="flex-r-lr" style="width:100%;margin-top:10rpx">
<text class="text-28 text-zi text-bold">¥{{obj.price}}</text>
<text class="text-24 " style="color:#999">已售{{obj.sales}}件</text>
</view>
</view>
</view>
</template>
<script>
import MyBtn from '@/components/common/my-btn.vue'
export default {
components:{MyBtn},
props:{
obj:{
type:Object,
default:()=>{}
},
},
mounted(){
},
methods: {
onClick(){
this.$emit('ok',this.obj.id);
}
}
}
</script>
<style lang="scss" scoped>
.shop-view{
width:332rpx;
height:416rpx;
min-height:416rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
background-color: #fff;
.top-img{
width:332rpx;
height:268rpx;
display: flex;
}
.shop-bottom-panel{
width:100%;
height:calc(100% - 268rpx);
padding: 0 12rpx;
box-sizing: border-box;
flex-direction: column;
justify-content: space-between;
display: flex;
}
}
</style>
+103
View File
@@ -0,0 +1,103 @@
<template>
<view class="shop-view" @click.stop="onClick">
<view class="shop-left-view">
<image :src="obj.url"></image>
</view>
<view class="shop-right-view">
<view class="right-top-view text-overflow1">
<text class="text-32 text-bold text-zu text-overflow1">{{obj.title}}</text>
</view>
<view class="right-bottom-view">
<view class="flex-c-lr" style="height:70rpx">
<text class="text-24 text-fu">原价</text>
<text class="text-24 text-fu text-d text-bold">¥{{obj.adPrice}}</text>
</view>
<view class="right-bottom-panel" style="height:70rpx">
<MyBtn mh="36rpx" :text="`专区立省${Number(obj.adPrice) - Number(obj.price)}元`" br="8rpx" fz="16rpx" bg="linear-gradient( 270deg, #AF39C4 0%, #7732FF 100%)" wd="260rpx"></MyBtn>
<text class="text-28 text-zi text-bold">到手
<text class="text-36">¥{{obj.price}}</text>
</text>
</view>
</view>
</view>
</view>
</template>
<script>
import MyBtn from '@/components/common/my-btn.vue'
export default {
components:{MyBtn},
props:{
obj:{
type:Object,
default:()=>{}
},
},
mounted(){
},
methods: {
onClick(){
this.$emit('ok',this.obj.id);
}
}
}
</script>
<style lang="scss" scoped>
.shop-view{
width:100%;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
padding: 12rpx;
box-sizing: border-box;
background-color: #fff;
border-radius: 12rpx;
.shop-left-view{
min-width:216rpx;
min-height:216rpx;
display: flex;
align-items: center;
justify-content: center;
image{
width:216rpx;
height:216rpx;
}
}
.shop-right-view{
width:100%;
display: flex;
min-height:216rpx;
margin-left:24rpx;
flex-direction: column;
justify-content: space-between;
.right-top-view{
width:100%;
display: flex;
}
.right-bottom-view{
width:100%;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: flex-end;
.right-bottom-panel{
width:284rpx;
height:104rpx;
min-height:104rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
padding: 12rpx;
box-sizing: border-box;
background-color: #F0E7FE;
border-radius: 8rpx;
}
}
}
}
</style>
+15 -1
View File
@@ -265,6 +265,20 @@
"navigationBarTextStyle": "black"
}
},
{
"path": "shop/you-shop",
"style": {
"navigationStyle": "custom",
"navigationBarTextStyle": "black"
}
},
{
"path": "shop/fen-shop",
"style": {
"navigationStyle": "custom",
"navigationBarTextStyle": "black"
}
},
{
"path": "setting/out-agreement",
"style": {
@@ -492,7 +506,7 @@
},
{
"pagePath": "pages/supply_chain/supply_chain",
"text": "供应链",
"text": "平价商品",
"iconPath": "/static/column/supply_chain.png",
"selectedIconPath": "/static/column/supply_chain_sel.png"
},
+11 -6
View File
@@ -66,14 +66,14 @@
<!-- 爆款专区-->
<view class="product_comm hx_warp" v-if="faddishProduct && faddishProduct.length !== 0">
<view class="product_comm hx_warp" @click="onJumpYou" v-if="faddishProduct && faddishProduct.length !== 0">
<view class="product_title">
<view class="product_title_left">
<text class="product_title_yp">信任桥优品</text>
<up-image src="/static/home/youxuan.png" width="10" height="10" bgColor="#f1f6ff00"></up-image>
<text style="margin-left: 6rpx;color: #FFFFFF;">品牌5折秒杀福利</text>
</view>
<view class="product_title_f" style="font-weight: bold;" @click="jumpWelcome">
<view class="product_title_f" style="font-weight: bold;" >
<text style="">立即抢购</text>
<view style="margin: 6rpx 0 0 6rpx;"><up-image src="/static/common/right_y_st3.png" width="12" height="12"
bgColor="#f1f6ff00"></up-image></view>
@@ -83,7 +83,7 @@
:class="faddishProduct && faddishProduct.length > 2 ? 'product_content product_content2' : 'product_content'">
<up-loading-icon :show="productLoading"></up-loading-icon>
<view :class="faddishProduct && faddishProduct.length > 2 ? 'product_item2' : 'product_item'"
v-for="item in faddishProduct" :key="item.id" @click="jumpInfo(item)">
v-for="item in faddishProduct" :key="item.id" @click.stop="jumpInfo(item)">
<up-image :src="item.url" width="100%" height="130" bgColor="#f1f6ff00" shape="square"
radius='15'></up-image>
<view class="product_f_item">
@@ -301,6 +301,11 @@ export default {
mounted() {
},
methods: {
onJumpYou(){
uni.navigateTo({
url:'/pages/rwa_package/shop/you-shop'
})
},
checkUpdate() {
const self = this,
localAppVersonName = uni.getStorageSync('version'),
@@ -407,7 +412,7 @@ export default {
},
jumpIntegral() {
uni.navigateTo({
url: '/pages/other_package/pointsRedemption/pointsRedemption',
url: '/pages/rwa_package/shop/fen-shop',
})
},
jumpTurntable() {
@@ -419,8 +424,8 @@ export default {
})
},
jumpPrdference() {
uni.navigateTo({
url: '/pages/login_package/preference/preference',
uni.switchTab({
url: '/pages/supply_chain/supply_chain',
})
},
jumpWelcome() {
+1 -1
View File
@@ -5,7 +5,7 @@
<view class="setting-view">
<view class="name-box">
<view class="top-view">
<u-icon name="error-circle-fill" color="#e88900" size="108"></u-icon>
<u-icon name="error-circle-fill" color="#e88900" size="54"></u-icon>
<text class="text-36 text-zu text-bold mt-12">注销信任桥账号</text>
</view>
<view class="mid-view">
+170
View File
@@ -0,0 +1,170 @@
<template>
<view class="content">
<TopSafe></TopSafe>
<Header title="积分兑换专区" >
<!-- #ifndef MP-WEIXIN -->
<template v-slot:right>
<u-icon name="share-fill" @click="onShare" color="#333" size="24"></u-icon>
</template>
<!-- #endif -->
</Header>
<view class="swiper-view">
<up-swiper
:list="swiperList"
style="width:100%"
circular
></up-swiper>
</view>
<view class="mid-panel">
<up-image src="/static/common/jingxuan_left.png" width="24" height="8" bgColor="#f1f6ff00"></up-image>
<view style="margin:0 12rpx">信任桥积分</view>
<up-image src="/static/common/jingxuan_right.png" width="24" height="8" bgColor="#f1f6ff00"></up-image>
</view>
<view class="setting-view">
<FenItem @ok="onJumpShop" style="margin-top:24rpx" :obj="item" v-for="(item,index) in dataList" :key="index"></FenItem>
</view>
<up-toast ref="uToastRef"></up-toast>
</view>
</template>
<script>
import Header from '@/components/common/header.vue';
import TopSafe from '@/components/common/top-safe.nvue'
import MyBtn from '@/components/common/my-btn.vue'
import FenItem from '@/components/shop/fen-item.vue'
import { searchList } from '@/api/product.js';
import func from '@/utils/func.js';
import { getCarouselImage } from '@/api/common.js';
export default {
components: { Header, TopSafe,MyBtn,FenItem },
data() {
return {
dataList:[],
swiperList: ['https://cdn.uviewui.com/uview/swiper/swiper1.png'],
};
},
onShow() {
},
onLoad() {
this.init();
},
methods: {
init() {
this.getSearchList();
this.getCarouselImage();
},
async getCarouselImage(){
const params={
pageUi:6,
}
const resp = await getCarouselImage(params);
if(resp && resp.bizcode === 100){
const data = resp.data || [];
this.swiperList = data.length !== 0 ? data.map(obj=>obj.carouselImage) : [];
}
},
async getSearchList(){
const params = {
type:3,
page:1,
pageSize:99,
}
const resp = await searchList(params);
if(resp && resp.bizcode === 100){
this.dataList = resp.data || [];
}
},
onJumpShop(id){
uni.navigateTo({
url: '/pages/other_package/productInfo/productInfo?id='+id,
})
},
onShare(){
uni.navigateTo({
url: '/pages/other_package/invite_friends/invite_friends',
})
}
}
}
</script>
<style lang="scss" scoped>
.bottom-btn{
width: 100%;
margin-bottom:92rpx;
display: flex;
flex-direction: column;
align-items: center;
padding: 0 32rpx;
box-sizing: border-box;
position: relative;
}
.mid-panel{
width:100%;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
height:156rpx;
min-height:156rpx;
}
.swiper-view{
width:100%;
height:268rpx;
min-height:268rpx;
display: flex;
}
.setting-view {
width: 100%;
height: calc(100% - 88rpx - 268rpx - 156rpx - var(--status-bar-height));
display: flex;
flex-direction: column;
align-items: center;
overflow-y: auto;
padding: 0 32rpx;
box-sizing: border-box;
position: relative;
.name-box{
width:100%;
border-radius: 16rpx;
display: flex;
flex-direction: column;
background-color: #fff;
padding: 64rpx 32rpx;
box-sizing: border-box;
margin-top:24rpx;
.mid-view{
width:100%;
padding: 40rpx 32rpx;
box-sizing: border-box;
display: flex;
flex-direction: column;
border:2rpx solid #eaeaea;
border-radius: 16rpx;
margin-top:48rpx;
}
.top-view{
width:100%;
display: flex;
flex-direction: column;
align-items: center;
}
.input-view{
border-radius: 20rpx;
margin-top:52rpx;
width:100%;
padding: 0 32rpx;
min-height:104rpx;
display: flex;
flex-direction: row;
align-items: center;
background-color: #f5f5f5;
box-sizing: border-box;
}
}
}
</style>
+131
View File
@@ -0,0 +1,131 @@
<template>
<view class="content">
<TopSafe></TopSafe>
<Header title="信任桥优选专区" >
<!-- #ifndef MP-WEIXIN -->
<template v-slot:right>
<u-icon name="share-fill" @click="onShare" color="#333" size="24"></u-icon>
</template>
<!-- #endif -->
</Header>
<view class="setting-view">
<YouItem @ok="onJumpShop" style="margin-top:24rpx" :obj="item" v-for="(item,index) in dataList" :key="index"></YouItem>
</view>
<up-toast ref="uToastRef"></up-toast>
</view>
</template>
<script>
import Header from '@/components/common/header.vue';
import TopSafe from '@/components/common/top-safe.nvue'
import MyBtn from '@/components/common/my-btn.vue'
import YouItem from '@/components/shop/you-item.vue'
import { searchList } from '@/api/product.js';
import func from '@/utils/func.js';
export default {
components: { Header, TopSafe,MyBtn,YouItem },
data() {
return {
dataList:[
]
};
},
onShow() {
},
onLoad() {
this.init();
},
methods: {
init() {
this.getSearchList();
},
async getSearchList(){
const params = {
type:1,
page:1,
pageSize:99,
}
const resp = await searchList(params);
if(resp && resp.bizcode === 100){
this.dataList = resp.data || [];
}
},
onJumpShop(id){
uni.navigateTo({
url: '/pages/other_package/productInfo/productInfo?id='+id,
})
},
onShare(){
uni.navigateTo({
url: '/pages/other_package/invite_friends/invite_friends',
})
}
}
}
</script>
<style lang="scss" scoped>
.bottom-btn{
width: 100%;
margin-bottom:92rpx;
display: flex;
flex-direction: column;
align-items: center;
padding: 0 32rpx;
box-sizing: border-box;
position: relative;
}
.setting-view {
width: 100%;
height: calc(100% - 88rpx - var(--status-bar-height));
display: flex;
flex-direction: column;
align-items: center;
overflow-y: auto;
padding: 0 32rpx;
box-sizing: border-box;
position: relative;
.name-box{
width:100%;
border-radius: 16rpx;
display: flex;
flex-direction: column;
background-color: #fff;
padding: 64rpx 32rpx;
box-sizing: border-box;
margin-top:24rpx;
.mid-view{
width:100%;
padding: 40rpx 32rpx;
box-sizing: border-box;
display: flex;
flex-direction: column;
border:2rpx solid #eaeaea;
border-radius: 16rpx;
margin-top:48rpx;
}
.top-view{
width:100%;
display: flex;
flex-direction: column;
align-items: center;
}
.input-view{
border-radius: 20rpx;
margin-top:52rpx;
width:100%;
padding: 0 32rpx;
min-height:104rpx;
display: flex;
flex-direction: row;
align-items: center;
background-color: #f5f5f5;
box-sizing: border-box;
}
}
}
</style>
+140 -324
View File
@@ -1,221 +1,98 @@
<template>
<view class="supply_chain_warp">
<view class="_header_warp">全球聚合供应链</view>
<!-- <view class="_content_warp"> -->
<up-swiper :list="swiperList" height="160" @change="e => currentNum = e.current" bgColor="#ffffff00">
<template #indicator>
<view class="indicator-num">
<text class="indicator-num__text">{{ currentNum + 1 }}/{{ swiperList.length }}</text>
</view>
</template>
</up-swiper>
<!-- 通知 -->
<view class="supply_chain_note_warp">
<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="壹点科技全球聚合供应链:整合京东、阿里、唯品会等一手供应链资源,支持API一键导入,为私域电商全品类货源提供一件代发服务。"></up-notice-bar>
<view class="content-one">
<TopSafe></TopSafe>
<view class="head-view">
<view class="head-search" @click="onJumpSearch">
<u-icon size="24" name="search" color="#999"></u-icon>
<text class="text-28 text-fu" style="margin-left:12rpx">搜索</text>
</view>
</view>
<!-- 保障 -->
<view class="guarantee_warp">
<view class="guarantee_item_warp" v-for="(item, index) in guaranteeList" :key="index">
<view style="margin-top: 10rpx;">
<up-image :src="item.path" width="20" height="20" bgColor="#f1f6ff00"></up-image>
</view>
<view class="guarantee_item_content_warp">
<view class="title_">{{ item.title }}</view>
<view class="content_">{{ item.content }}</view>
</view>
<view class="tab-view">
<view class="tab-list" @click="onTab(index)" v-for="(item,index) in tabList" :key="index">
<text class="text-28 text-space" :style="{
color:curTab == index ? '#7A35F6' : '#666'
}">{{item.name}}</text>
<view class="line" v-if="curTab == index"></view>
</view>
</view>
<!-- 分类 -->
<view class="sort_warp">
<view class="sort_item_warp" v-for="(item, index) in sortList" :key="index" @click="sortFun(item)">
<up-image :src="item.path" width="30" height="30" bgColor="#f1f6ff00"></up-image>
<view class="sort_item_title_warp">{{ item.title }}</view>
<view class="setting-view">
<view class="name-box">
<PingItem @ok="onJumpShop" style="margin-top:24rpx" :obj="item" v-for="(item,index) in dataList" :key="index"></PingItem>
</view>
</view>
<!-- 商品 -->
<view class="supply_chain_product_warp">
<view class="product_title">
<view class="product_title_msg">精选好物</view>
<view class="product_title_bg"></view>
</view>
<scroll-view scroll-y="true" @scrolltolower="loadMore" style="height:calc(100vh - 158px);margin-top: 10rpx;">
<view class="supply_chain_product_content" v-if="productList && productList.length !== 0">
<view class="product_content_item" v-for="item in productList" :key="item.id" @click="jumpInfo(item)">
<up-image :src="item.thumb" width="100%" height="140" bgColor="#f1f6ff00"></up-image>
<view class="product_content_item_content">
<view class="product_item_name">{{ item.title }}</view>
<view class="product_item_price">
<view class="price_">
<text>¥</text>
<text style="color:36rpx;">{{ item.price }}</text>
</view>
<view class="price_sell">已售{{ item.sales }}件</view>
</view>
</view>
</view>
</view>
<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>
<view class="not_order_msg_warp">还未添加商品哦~</view>
</view>
</scroll-view>
</view>
<!-- </view> -->
<!-- #ifndef H5 -->
<CustomTabBar :tabIndex="2" />
<!-- #endif -->
<up-toast ref="uToastRef"></up-toast>
</view>
</template>
<script>
import { getCarouselImage } from '@/api/common.js';
import { APP_PAGE_TYPE } from '@/utils/enumUtils.js';
import CustomTabBar from '@/components/custom-tab-bar.vue';
import { getCascadeCategory } from '@/api/common.js';
import Header from '@/components/common/header.vue';
import TopSafe from '@/components/common/top-safe.nvue'
import MyBtn from '@/components/common/my-btn.vue'
import PingItem from '@/components/shop/ping-item.vue'
import { searchList } from '@/api/product.js';
import func from '@/utils/func.js';
export default {
components: { CustomTabBar },
components: { Header, TopSafe,MyBtn,PingItem },
data() {
return {
swiperList: ['https://cex-pub.s3.ap-southeast-1.amazonaws.com/static/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: [],// 商品图
dataList:[],
tabList:[],
curTab:0
};
},
onLoad(option) {
this.searchGYLMall();
onShow() {
},
onLoad() {
this.init();
},
methods: {
/**
* 查询供应链的商品
*/
searchGYLMall() {
if (this.loading) return; // 如果正在加载,则不重复加载
this.loading = true; // 设置加载状态为true
try {
const params = this.form;
uni.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() * 5000) + 700;
return { ...obj, sales: sales }; // 使用展开运算符添加新属性
});
this.productList = [...this.productList, ...newArr]; // 将新数据添加到列表中
this.form.page++;
}
},
fail: (error) => {
console.log("error", error);
},
});
} catch (error) {
console.error('加载数据失败:', error);
} finally {
this.loading = false; // 设置加载状态为false
async cascadeCategory(){
getCascadeCategory({parentId: 0}).then(res=>{
if (res && res.bizcode === 100) {
this.tabList = res.data;
this.getSearchList()
}
})
},
onTab(index){
if(index != this.curTab){
this.curTab = index;
this.getSearchList()
}
},
/**
* 分类搜索
* @param {Object} item
*/
sortFun(item) {
this.productList = [];
this.form.page = 1;
this.form.category = item.category;
this.searchGYLMall(); // 加载更多数据
init() {
this.cascadeCategory();
},
// 当滚动到底部时触发的方法
loadMore() {
this.searchGYLMall(); // 加载更多数据
async getSearchList(){
const params = {
type:2,
page:1,
pageSize:99,
categoryId:this.tabList[this.curTab].id,
isPar:true
}
const resp = await searchList(params);
if(resp && resp.bizcode === 100){
this.dataList = resp.data || [];
}
},
/**
* 详情页面
*/
jumpInfo(item) {
onJumpSearch(){
uni.navigateTo({
url: '/pages/other_package/productInfo/productInfo?id=' + item.id + "&source=supply_chain",
url: '/pages/rwa_package/dongjian/search',
})
},
onJumpShop(id){
uni.navigateTo({
url: '/pages/other_package/productInfo/productInfo?id='+id,
})
},
onShare(){
uni.navigateTo({
url: '/pages/other_package/invite_friends/invite_friends',
})
}
}
@@ -223,137 +100,76 @@ export default {
</script>
<style lang="scss" scoped>
.supply_chain_warp {
height: calc(100vh - 140rpx);
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 {
.head-view{
width:100%;
// height:
min-hieght:88rpx;
height:88rpx;
display: flex;
align-items: center;
padding: 0 32rpx;
box-sizing: border-box;
background-color: #fff;
.head-search{
width:100%;
height:76rpx;
padding: 0 24rpx;
flex-direction: row;
display: flex;
background-color: #F7F7F7;
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);
}
}
}
}
border-radius: 16rpx;
}
}
.tab-view{
width:100%;
height:80rpx;
min-height:80rpx;
display: flex;
flex-direction: row;
padding: 0 32rpx;
box-sizing: border-box;
background-color: #fff;
overflow-x: auto;
.tab-list{
margin-right:24rpx;
display: flex;
flex-direction: column;
height:60rpx;
min-height:60rpx;
align-items: center;
justify-content: space-between;
margin-top:22rpx;
}
.line{
width:48rpx;
height:4rpx;
background-color: #7A35F6;
}
}
.setting-view {
width: 100%;
height: calc(100% - 88rpx - 80rpx - var(--status-bar-height));
display: flex;
flex-direction: column;
align-items: center;
overflow-y: auto;
padding: 0 32rpx;
box-sizing: border-box;
position: relative;
.name-box{
width:100%;
border-radius: 16rpx;
height:100%;
overflow-y: auto;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
align-content: flex-start;
box-sizing: border-box;
}
}
</style>
+359
View File
@@ -0,0 +1,359 @@
<template>
<view class="supply_chain_warp">
<view class="_header_warp">全球聚合供应链</view>
<!-- <view class="_content_warp"> -->
<up-swiper :list="swiperList" height="160" @change="e => currentNum = e.current" bgColor="#ffffff00">
<template #indicator>
<view class="indicator-num">
<text class="indicator-num__text">{{ currentNum + 1 }}/{{ swiperList.length }}</text>
</view>
</template>
</up-swiper>
<!-- 通知 -->
<view class="supply_chain_note_warp">
<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="壹点科技全球聚合供应链:整合京东、阿里、唯品会等一手供应链资源,支持API一键导入,为私域电商全品类货源提供一件代发服务。"></up-notice-bar>
</view>
<!-- 保障 -->
<view class="guarantee_warp">
<view class="guarantee_item_warp" v-for="(item, index) in guaranteeList" :key="index">
<view style="margin-top: 10rpx;">
<up-image :src="item.path" width="20" height="20" bgColor="#f1f6ff00"></up-image>
</view>
<view class="guarantee_item_content_warp">
<view class="title_">{{ item.title }}</view>
<view class="content_">{{ item.content }}</view>
</view>
</view>
</view>
<!-- 分类 -->
<view class="sort_warp">
<view class="sort_item_warp" v-for="(item, index) in sortList" :key="index" @click="sortFun(item)">
<up-image :src="item.path" width="30" height="30" bgColor="#f1f6ff00"></up-image>
<view class="sort_item_title_warp">{{ item.title }}</view>
</view>
</view>
<!-- 商品 -->
<view class="supply_chain_product_warp">
<view class="product_title">
<view class="product_title_msg">精选好物</view>
<view class="product_title_bg"></view>
</view>
<scroll-view scroll-y="true" @scrolltolower="loadMore" style="height:calc(100vh - 158px);margin-top: 10rpx;">
<view class="supply_chain_product_content" v-if="productList && productList.length !== 0">
<view class="product_content_item" v-for="item in productList" :key="item.id" @click="jumpInfo(item)">
<up-image :src="item.thumb" width="100%" height="140" bgColor="#f1f6ff00"></up-image>
<view class="product_content_item_content">
<view class="product_item_name">{{ item.title }}</view>
<view class="product_item_price">
<view class="price_">
<text>¥</text>
<text style="color:36rpx;">{{ item.price }}</text>
</view>
<view class="price_sell">已售{{ item.sales }}件</view>
</view>
</view>
</view>
</view>
<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>
<view class="not_order_msg_warp">还未添加商品哦~</view>
</view>
</scroll-view>
</view>
<!-- </view> -->
<!-- #ifndef H5 -->
<CustomTabBar :tabIndex="2" />
<!-- #endif -->
</view>
</template>
<script>
import { getCarouselImage } from '@/api/common.js';
import { APP_PAGE_TYPE } from '@/utils/enumUtils.js';
import CustomTabBar from '@/components/custom-tab-bar.vue';
export default {
components: { CustomTabBar },
data() {
return {
swiperList: ['https://cex-pub.s3.ap-southeast-1.amazonaws.com/static/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; // 设置加载状态为true
try {
const params = this.form;
uni.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() * 5000) + 700;
return { ...obj, sales: sales }; // 使用展开运算符添加新属性
});
this.productList = [...this.productList, ...newArr]; // 将新数据添加到列表中
this.form.page++;
}
},
fail: (error) => {
console.log("error", error);
},
});
} catch (error) {
console.error('加载数据失败:', error);
} finally {
this.loading = false; // 设置加载状态为false
}
},
/**
* 分类搜索
* @param {Object} item
*/
sortFun(item) {
this.productList = [];
this.form.page = 1;
this.form.category = item.category;
this.searchGYLMall(); // 加载更多数据
},
// 当滚动到底部时触发的方法
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 - 140rpx);
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>