11
This commit is contained in:
@@ -52,14 +52,14 @@
|
|||||||
<view class="title"> {{ listinfo.name }} </view>
|
<view class="title"> {{ listinfo.name }} </view>
|
||||||
<view class="list_item" v-for="(item,index) in listinfo.details" :key="item.id">
|
<view class="list_item" v-for="(item,index) in listinfo.details" :key="item.id">
|
||||||
<view class="left">
|
<view class="left">
|
||||||
<image class="img" :src="item.coverImg" mode="aspectFill"/>
|
<image class="img" :src="item.coverImg || item.productImg || ''" mode="aspectFill"/>
|
||||||
<view class="center">
|
<view class="center">
|
||||||
<text class="center_title"> {{item.name}} </text>
|
<text class="center_title"> {{item.name || item.productName || "" }} </text>
|
||||||
<text class="type"> {{ item.skuName}} </text>
|
<text class="type"> {{ item.skuName || item.productSkuName || ""}} </text>
|
||||||
<text class="num"> X{{ item.totalNumber}} </text>
|
<text class="num"> X{{ item.totalNumber || item.num}} </text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="price"> ¥{{ item.totalAmount}} </view>
|
<view class="price"> ¥{{ item.totalAmount || item.priceAmount || 0}} </view>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="favorable" v-for="(item,index) in favorable" :key="index">
|
<!-- <view class="favorable" v-for="(item,index) in favorable" :key="index">
|
||||||
<view class="favorable_left">
|
<view class="favorable_left">
|
||||||
@@ -122,7 +122,7 @@
|
|||||||
<view class="pay-info-wrap">
|
<view class="pay-info-wrap">
|
||||||
<view class="info-wrap flex-between">
|
<view class="info-wrap flex-between">
|
||||||
<view class="close" @click="ispws = false">
|
<view class="close" @click="ispws = false">
|
||||||
<u-icon name="close" color="#999999" size="28"></u-icon>
|
<u-icon name="close" color="#999999" size="40"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
<text class="title">请输入支付密码</text>
|
<text class="title">请输入支付密码</text>
|
||||||
<view></view>
|
<view></view>
|
||||||
@@ -242,6 +242,9 @@
|
|||||||
switch (msg.type) {
|
switch (msg.type) {
|
||||||
case 'createOrder':
|
case 'createOrder':
|
||||||
this.listinfoid = msg.data.id
|
this.listinfoid = msg.data.id
|
||||||
|
console.log(msg)
|
||||||
|
this.listinfo.details = msg.data.detailList;
|
||||||
|
this.listinfo.payAmount = msg.data.amount;
|
||||||
uni.$off('getMessage')
|
uni.$off('getMessage')
|
||||||
this.orderorderInfo(1)
|
this.orderorderInfo(1)
|
||||||
break;
|
break;
|
||||||
@@ -968,7 +971,7 @@
|
|||||||
padding: 0;
|
padding: 0;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
.info-wrap{
|
.info-wrap{
|
||||||
padding: 30rpx;
|
padding: 64rpx 30rpx 30rpx 30rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
.title{
|
.title{
|
||||||
align-self: center;
|
align-self: center;
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -289,12 +289,12 @@
|
|||||||
|
|
||||||
<view class="btn"
|
<view class="btn"
|
||||||
@click="shopAdd(specifications,specifications.indexa,specifications.indexb,'-',specifications.tagSnap == null ? '单规格':'')">
|
@click="shopAdd(specifications,specifications.indexa,specifications.indexb,'-',specifications.tagSnap == null ? '单规格':'')">
|
||||||
<u-icon name="minus-circle-fill" color="#E9AB7A" size="40"></u-icon>
|
<u-icon name="minus-circle-fill" color="#E9AB7A" size="50"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
<text class="num">{{amountcartNumber}}</text>
|
<text class="num">{{amountcartNumber}}</text>
|
||||||
<view class="btn"
|
<view class="btn"
|
||||||
@click="shopAdd(specifications,specifications.indexa,specifications.indexb,'+',specifications.tagSnap == null ? '单规格':'')">
|
@click="shopAdd(specifications,specifications.indexa,specifications.indexb,'+',specifications.tagSnap == null ? '单规格':'')">
|
||||||
<u-icon name="plus-circle-fill" color="#E9AB7A" size="40"></u-icon>
|
<u-icon name="plus-circle-fill" color="#E9AB7A" size="50"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -393,6 +393,7 @@
|
|||||||
this.fixedtrue = true
|
this.fixedtrue = true
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
|
console.log(!uni.cache.get('token'))
|
||||||
if (!uni.cache.get('token')) {
|
if (!uni.cache.get('token')) {
|
||||||
uni.login({
|
uni.login({
|
||||||
provider: 'weixin',
|
provider: 'weixin',
|
||||||
@@ -506,18 +507,19 @@
|
|||||||
* @param {Object} b
|
* @param {Object} b
|
||||||
*/
|
*/
|
||||||
shopAdd(item, index, index1, a, b) {
|
shopAdd(item, index, index1, a, b) {
|
||||||
if (a == "+") {
|
if ( a == "+" ){
|
||||||
if (this.skuNumber < this.skuSuit) {
|
|
||||||
this.amountcartNumber = this.amountcartNumber + (item.suit == 0 ? 1 : item.suit);
|
if ( this.skuNumber < this.skuSuit && this.amountcartNumber < this.skuSuit) {
|
||||||
} else {
|
this.amountcartNumber = this.amountcartNumber + (this.skuSuit==0?1:this.skuSuit);
|
||||||
|
}else {
|
||||||
this.amountcartNumber++;
|
this.amountcartNumber++;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
if (this.amountcartNumber > 0) {
|
if (this.amountcartNumber > 0) {
|
||||||
console.log(item)
|
console.log(item)
|
||||||
if (this.skuNumber < this.skuSuit) {
|
if ( this.skuNumber < this.skuSuit && this.amountcartNumber <= this.skuSuit) {
|
||||||
this.amountcartNumber = this.amountcartNumber - (item.suit == 0 ? 1 : item.suit);
|
this.amountcartNumber = this.amountcartNumber - (this.skuSuit==0?1:this.skuSuit);
|
||||||
} else {
|
} else {
|
||||||
this.amountcartNumber = this.amountcartNumber - 1;
|
this.amountcartNumber = this.amountcartNumber - 1;
|
||||||
}
|
}
|
||||||
@@ -721,7 +723,7 @@
|
|||||||
this.addCart(params);
|
this.addCart(params);
|
||||||
} else {
|
} else {
|
||||||
this.skuId = res.data.id;
|
this.skuId = res.data.id;
|
||||||
this.skuNumber = res.data.number;
|
this.skuNumber = res.data.number||0;
|
||||||
this.skuSuit = res.data.suit;
|
this.skuSuit = res.data.suit;
|
||||||
this.showShopsku = true //打开弹框
|
this.showShopsku = true //打开弹框
|
||||||
}
|
}
|
||||||
@@ -785,9 +787,12 @@
|
|||||||
case 'sku': // sku 数量 查询这个商品的价格和数量
|
case 'sku': // sku 数量 查询这个商品的价格和数量
|
||||||
break;
|
break;
|
||||||
case 'order':
|
case 'order':
|
||||||
this.skuidname = []
|
this.cartLists_count = 0;
|
||||||
this.showCart = false
|
this.skuidname = [];
|
||||||
this.cartLists = msg
|
this.cartListsdatashow = false;
|
||||||
|
this.showCart = false;
|
||||||
|
this.cartLists = msg;
|
||||||
|
this.productqueryProduct() //list 数据
|
||||||
break;
|
break;
|
||||||
case 'addCart': //初始化add
|
case 'addCart': //初始化add
|
||||||
this.cartLists = msg
|
this.cartLists = msg
|
||||||
|
|||||||
Reference in New Issue
Block a user