修改referer

This commit is contained in:
cc_zbp 2023-05-25 10:25:16 +08:00
parent 994e791771
commit bb1f7fb50b
2 changed files with 15 additions and 123 deletions

View File

@ -582,6 +582,7 @@
])),
},
onLoad(options) {
console.log('options', options);
this.referer = options.referer
if (options.product_type) {
this.product_type = options.product_type
@ -978,7 +979,6 @@
});
let that = this;
const data = { product_type: this.product_type }
console.log('data', data);
getProductDetail(that.id, data).then(res => {
uni.hideLoading();
let storeInfo = res.data;
@ -1332,14 +1332,15 @@
product_attr_unique: that.attr.productSelect !== undefined ? that.attr.productSelect.unique : "",
source: this.source,
product_type: 0,
spread_id: this.currSpid
spread_id: this.currSpid,
referer: this.referer
};
postCartAdd(q)
.then(function(res) {
that.isOpen = that.attr.cartAttr = false;
if (news) {
uni.navigateTo({
url: `/pages/users/order_confirm/index?cartId=${res.data.cart_id}&referer=${that.referer}`
url: `/pages/users/order_confirm/index?cartId=${res.data.cart_id}`
});
} else {
that.$util.Tips({

View File

@ -4,12 +4,12 @@
<view class="town-title">{{town}}里海云仓</view>
<view class="body-wrapper">
<block v-for="(item,index) in cloudList" :key="index">
<navigator v-if="item.show" class="item"
:url="`/pages/nongKe/goods_list/index?cate_id=${item.category_id}&street=${street_code}&name=${item.title}`"
:style="{'background-image': `url(${item.bg})`}">
<text class="item-title">{{item.title}}云仓服务</text>
<text>{{item.text}}</text>
<view class="chakan-btn" @click="navigator">查看</view>
<navigator class="item"
:url="`/pages/nongKe/goods_list/index?cate_id=${item.category_id}&street=${street_code}&name=${item.category_name}`"
:style="{'background-image': `url(${item.background})`}">
<text class="item-title">{{item.category_name}}云仓服务</text>
<text>{{item.description}}</text>
<view class="chakan-btn">查看</view>
</navigator>
</block>
</view>
@ -24,105 +24,7 @@
let src = 'https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/13';
return {
winHeight: 0,
cloudList: [{
title: '商超服务',
text: '便捷商超购物,包送到家',
bg: src + '/shangchao.png',
show: false,
category_id: 25
},
{
title: '农副产品',
text: '瓜果蔬菜线上购买',
bg: src + '/nongfu.png',
show: false,
category_id: 26
},
{
title: '生活服务',
text: '生活服务样样齐全',
bg: src + '/shenghuo.png',
show: false,
category_id: 23
},
{
title: '农业生产',
text: '种子化肥送到家',
bg: src + '/nongye.png',
show: false,
category_id: 22
},
{
title: '物流溯源',
text: '追溯产品源头',
bg: src + '/wuliu.png',
show: false,
category_id: 2541
},
{
title: '坝坝宴',
text: '农家各种酒席宴会',
bg: src + '/yan.png',
show: false,
category_id: 21
},
{
title: '文娱旅游',
text: '周边好玩景点',
bg: src + '/shangchao.png',
show: false,
category_id: 2542
},
{
title: '民生公益',
text: '扶贫助学项目',
bg: src + '/minsheng.png',
show: false,
category_id: 2543
},
{
title: '医疗保健',
text: '便捷医疗服务',
bg: src + '/yiliao.png',
show: false,
category_id: 2544
},
{
title: '教育培训',
text: '更完善的教育系统',
bg: src + '/jiaoyu.png',
show: false,
category_id: 2545
},
{
title: '装修建筑',
text: '个人家庭商铺装修',
bg: src + '/zhuangxiu.png',
show: false,
category_id: 2547
},
{
title: '交金融宝',
text: '个人家庭商铺装修',
bg: src + '/zhuangxiu.png',
show: false,
category_id: 2546
},
{
title: '农贸基地',
text: '个人家庭商铺装修',
bg: src + '/zhuangxiu.png',
show: false,
category_id: 2548
},
{
title: '供销综合',
text: '个人家庭商铺装修',
bg: src + '/zhuangxiu.png',
show: false,
category_id: 2549
}
],
cloudList: [],
street_code: '',
town: ''
}
@ -139,25 +41,14 @@
},
onShow() {},
onPullDownRefresh() {
this.getCloundShop()
uni.stopPullDownRefresh()
},
methods: {
async getCloundShop() {
const { data } = await getCityCloundShop({ street_code: 510502102 })
data.length < 1 ? Toast("暂无云仓") : ''
data.map(item => {
this.cloudList.forEach(itens => {
itens.show = true
// if (itens.category_id == item.category_id) {
// itens.show = true
// }
})
})
},
navigator() {
uni.navigateTo({
url: '/pages/user/index'
})
const { data } = await getCityCloundShop({ street_code: this.street_code })
this.cloudList = data
data.length < 1 ? Toast("暂无云仓") : '';
}
}
}