master
chen 2022-02-28 15:31:39 +08:00
parent fce22b48c2
commit bfc54c0006
5 changed files with 35 additions and 21 deletions

View File

@ -1,6 +1,7 @@
<template>
<view class="pad-x140">
<scroll-view scroll-y @scrolltolower="touchBottomEv" :style="{height: scrolViewheigh + 'px'}">
<view class="fon42 col0 mar-sx30">购物车</view>
<view v-for="(item,index) in dataList" :key="index"
class="item-box display-between-center">
<view @tap="chooseItem(index)" class="display-center-center flex-shrink">
@ -282,21 +283,22 @@
this.total = res.data.total;
if(res.data.list.length){
res.data.list.forEach(item=>{
let newspec = [];
if(item.sku.spec_text.length){
item.sku.spec_text.forEach(itemspec=>{
for (let key in itemspec) {
newspec.push(`${key}${itemspec[key]}`);
}
})
}
console.log(item,286);
// let newspec = [];
// if(item.sku.spec_text.length){
// item.sku.spec_text.forEach(itemspec=>{
// for (let key in itemspec) {
// newspec.push(`${key}${itemspec[key]}`);
// }
// })
// }
let obj = {
id:item.id,
coding:item.sku.coding,
isActive:false,
imgSrc:item.spu.spu_cover,
title:item.spu_name,
specs:newspec,
specs:item.sku.spec_text,
// price:this.$toolAll.tools.changeNum(item.price*1),
price:item.price,
reckonPrice:item.price,
@ -304,6 +306,7 @@
}
this.dataList.push(obj);
})
this.dataList.concat(this.dataList);
} else {
this.dataList = [];
}

View File

@ -229,11 +229,19 @@
let screenIndex = this.screenList.findIndex(item=>item.mainTitle==title);
if(screenIndex==0){
// id
this.categoryId = this.screenList[screenIndex].childrenList[childrenIndex].id;
if(childrenIndex==0){
this.categoryId = '';
} else {
this.categoryId = this.screenList[screenIndex].childrenList[childrenIndex].id;
}
}
if(screenIndex==1){
//
this.activityStr = this.screenList[screenIndex].childrenList[childrenIndex].id;
if(childrenIndex==0){
this.activityStr = '';
} else {
this.activityStr = this.screenList[screenIndex].childrenList[childrenIndex].id;
}
}
//
this.temporaryCate[mainIndex] = [];
@ -253,6 +261,12 @@
//
delCate(index){
this.chooseCateList.splice(index,1);
if(index==0){//id
this.categoryId = '';
}
if(index==1){//
this.activityStr = '';
}
//
this.screenList.forEach((item1,index1)=>{
item1.childrenList.forEach((item2,index2)=>{

View File

@ -146,14 +146,6 @@
return this.$toolAll.tools.operationEv(price1, expressPrice, '+', 2);
}
},
onShareAppMessage(res) {
var shareObj = {
title: ``, // (slogan)
path: `/pagesB/shopDetail/shopDetail?id=${this.orderList[0].id}&category_id=${this.orderList[0].category_id}&share_id=${this.checkGrounpId}&invite_code=${uni.getStorageSync('invite_code')}&shareCate=${this.orderList[0].cateNum}&checkGrounpId=${this.orderList[0].checkGrounpId}`, // /
imageUrl: ''//PNGJPG imageUrl 使 5:4
};
return shareObj;
},
onShow() {
this.checkChoose();//
},
@ -276,6 +268,11 @@
this.$requst.post('/api/order/paid',{order_coding:info.coding}).then(res=>{
if(res.code==0){
this.$toolAll.tools.showToast('支付成功');
setTimeout(()=>{
uni.navigateTo({
url:'/pagesA/myOrder/myOrder?index=2'
})
},2000)
} else this.$toolAll.tools.showToast(res.msg);
})
}

View File

@ -20,7 +20,7 @@
<image @tap="goDetail(item1.id)" :src="item2.sku_cover" class="flexs mar-y20 radius30" style="width: 224rpx;height: 224rpx;" mode="aspectFill"></image>
<view @tap="goDetail(item1.id)" class="width100 disjb fc" style="height: 224rpx;">
<view class="fon28 col3 bold clips2 line-h50">{{item2.spu_name}}</view>
<view class="disac">
<view class="disac fw">
<view class="order-sy mar-y40" v-for="(item3,index3) in item2.spec_info" :key="index3">{{item3}}</view>
</view>
<view class="colpeili disjbac"><span class="order-price">{{item2.price}}</span><span class="fon24">x{{item2.num}}</span></view>

View File

@ -33,7 +33,7 @@
<image :src="item.sku_cover" class="flexs" mode="aspectFill" style="width: 224rpx; height: 224rpx;"></image>
<view class="width100 disjb fc" style="height: 224rpx;">
<view class="fon28 col3 bold clips2">{{item.spu_name}}</view>
<view class="orderDetail-sku disac" v-if="item.spec_info.length">
<view class="orderDetail-sku disac fw" v-if="item.spec_info.length">
<view class="mar-y40" v-for="(item2,index2) in item.spec_info" :key="index2">{{item2}}</view>
</view>
<view class="mar-s10">