|
@@ -5,11 +5,11 @@
|
|
<tm-tabs align="split" class="qiehuan1" v-model="activeIndex" :list="list2" range-key="title" @change="changeTab"></tm-tabs>
|
|
<tm-tabs align="split" class="qiehuan1" v-model="activeIndex" :list="list2" range-key="title" @change="changeTab"></tm-tabs>
|
|
<div class="zhuti shangpin">
|
|
<div class="zhuti shangpin">
|
|
<tm-sheet class="jiaoxi" style="" v-for="item in test">
|
|
<tm-sheet class="jiaoxi" style="" v-for="item in test">
|
|
- <tm-cartCellListFood class="shuliang" :typeclick="typeclick" :mdata="item" :cart-num.sync="item.buy"></tm-cartCellListFood>
|
|
|
|
|
|
+ <tm-cartCellListFood class="shuliang" :typeclick="typeclick" :mdata="item" v-on:sure="goSure(item.id)" v-on:Eval="goEval(item.id)" :cart-num.sync="item.buy"></tm-cartCellListFood>
|
|
</tm-sheet>
|
|
</tm-sheet>
|
|
</div>
|
|
</div>
|
|
- <view class="" v-if="isBottom">
|
|
|
|
- 没有更多了~~~~
|
|
|
|
|
|
+ <view class="empty" v-if="isEmpty">
|
|
|
|
+ 暂无内容~
|
|
</view>
|
|
</view>
|
|
<!-- 弹出层消息 -->
|
|
<!-- 弹出层消息 -->
|
|
<tm-message ref="toast"></tm-message>
|
|
<tm-message ref="toast"></tm-message>
|
|
@@ -34,22 +34,12 @@ export default {
|
|
itemId: 0,
|
|
itemId: 0,
|
|
checked:false,
|
|
checked:false,
|
|
status:0
|
|
status:0
|
|
- },{
|
|
|
|
- img: '../../static/img/84.png',
|
|
|
|
- title: '产品3(任选)',
|
|
|
|
- size:'S',
|
|
|
|
- label: '这个产品是只有几个融会',
|
|
|
|
- price: 36.2,
|
|
|
|
- id: 3,
|
|
|
|
- buy: 0,
|
|
|
|
- itemId: 0,
|
|
|
|
- checked:false,
|
|
|
|
- status:0
|
|
|
|
}],
|
|
}],
|
|
typeclick:4,//1加入购物车,2购物车
|
|
typeclick:4,//1加入购物车,2购物车
|
|
page:1,
|
|
page:1,
|
|
pagesize:5,
|
|
pagesize:5,
|
|
- isBottom:false
|
|
|
|
|
|
+ isBottom:false,
|
|
|
|
+ isEmpty:false
|
|
};
|
|
};
|
|
},
|
|
},
|
|
onLoad() {
|
|
onLoad() {
|
|
@@ -92,11 +82,12 @@ export default {
|
|
}).then(res=>{
|
|
}).then(res=>{
|
|
if (res.data.code == 200) {
|
|
if (res.data.code == 200) {
|
|
if (res.data.data.length != 0) {
|
|
if (res.data.data.length != 0) {
|
|
|
|
+ that.isEmpty=false;
|
|
that.test = [];
|
|
that.test = [];
|
|
for (let i = 0; i < res.data.data.data.length; i++) {
|
|
for (let i = 0; i < res.data.data.data.length; i++) {
|
|
var obj = {
|
|
var obj = {
|
|
- img: res.data.data.data[i].goods_image,
|
|
|
|
- title: res.data.data.data[i].goods_name,
|
|
|
|
|
|
+ img: res.data.data.data[i].orderGoods.goods_img,
|
|
|
|
+ title: res.data.data.data[i].orderGoods.goods_name,
|
|
// label: '黑色 - 6518/320',
|
|
// label: '黑色 - 6518/320',
|
|
// size:'S',
|
|
// size:'S',
|
|
price: res.data.data.data[i].pay_money,
|
|
price: res.data.data.data[i].pay_money,
|
|
@@ -113,11 +104,40 @@ export default {
|
|
}
|
|
}
|
|
}else {
|
|
}else {
|
|
that.test = [];
|
|
that.test = [];
|
|
|
|
+ that.isEmpty=true;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
console.log(res.data.data.data,'订单列表');
|
|
console.log(res.data.data.data,'订单列表');
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ goSure(ids){
|
|
|
|
+ let that=this;
|
|
|
|
+ myRequest({
|
|
|
|
+ url:'/api/Order/receipt',
|
|
|
|
+ method:'post',
|
|
|
|
+ data:{
|
|
|
|
+ id:ids
|
|
|
|
+ }
|
|
|
|
+ }).then(res=>{
|
|
|
|
+ if(res.data.code==200){
|
|
|
|
+ that.$refs.toast.show({
|
|
|
|
+ model: 'success',
|
|
|
|
+ label: res.data.msg
|
|
|
|
+ })
|
|
|
|
+ }else{
|
|
|
|
+ that.$refs.toast.show({
|
|
|
|
+ model: 'error',
|
|
|
|
+ label: res.data.msg
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ goEval(ids){
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url:'/pages/pingjia/index?id='+ids
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ }
|
|
},
|
|
},
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
@@ -138,4 +158,7 @@ export default {
|
|
/deep/ .shangpin .tm-cartCellListFood-img{width:90px !important;height:90px !important;}
|
|
/deep/ .shangpin .tm-cartCellListFood-img{width:90px !important;height:90px !important;}
|
|
/deep/ .shuliang .text-size-n{color: white !important;}
|
|
/deep/ .shuliang .text-size-n{color: white !important;}
|
|
/deep/ .jiaoxi{margin:0 !important;padding: 8px !important;margin-top: 10px !important;}
|
|
/deep/ .jiaoxi{margin:0 !important;padding: 8px !important;margin-top: 10px !important;}
|
|
|
|
+ .empty{
|
|
|
|
+ display: flex;justify-content:center;align-items: center;height: 100%;color: #AAAAAA;padding-top: 100px;
|
|
|
|
+ }
|
|
</style>
|
|
</style>
|