Merge branch 'wwz_x' of https://e.coding.net/g-cphe0354/xiaochengxusaomadiancan/cashier_weapp into dev
This commit is contained in:
@@ -279,8 +279,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="flex-start">
|
<view class="flex-start">
|
||||||
<view class="shop_sku_box_item" v-for="(item1,index1) in item.children" :key="index1"
|
<view class="shop_sku_box_item" v-for="(item1,index1) in item.children" :key="index1"
|
||||||
@click="morloe(item1,index,index1,item)"
|
@click="morloe(item1,index,index1,item)" :style="{color:!item1.isGrounding?'#999':''}"
|
||||||
:style="{color:!item1.isGrounding?'#999':''}"
|
|
||||||
:class=" item.start == index1 ?'shop_sku_box_item_selected':''">
|
:class=" item.start == index1 ?'shop_sku_box_item_selected':''">
|
||||||
{{item1.info}}
|
{{item1.info}}
|
||||||
</view>
|
</view>
|
||||||
@@ -312,7 +311,8 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="addShopping" :class="(amountcartNumber>0&&isSpec)?'active':''"
|
<view class="addShopping" :class="(amountcartNumber>0&&isSpec)?'active':''"
|
||||||
@click="addShopping(specifications,specifications.indexa,specifications.indexb,'+',specifications.tagSnap == null ? '单规格':'')">
|
@click="addShopping(specifications,specifications.indexa,specifications.indexb,'+',specifications.tagSnap == null ? '单规格':'')">
|
||||||
{{skuBtnText}}</view>
|
{{skuBtnText}}
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</u-popup>
|
</u-popup>
|
||||||
@@ -346,8 +346,7 @@
|
|||||||
cartLists_count: 0,
|
cartLists_count: 0,
|
||||||
shopInfo: {}, //店铺信息
|
shopInfo: {}, //店铺信息
|
||||||
shopProductList: {}, //商品信息
|
shopProductList: {}, //商品信息
|
||||||
specifications: {
|
specifications: {}, // 规格信息
|
||||||
}, // 规格信息
|
|
||||||
socketTicket: null,
|
socketTicket: null,
|
||||||
amountcartNumber: 0,
|
amountcartNumber: 0,
|
||||||
isSpec: false,
|
isSpec: false,
|
||||||
@@ -358,7 +357,7 @@
|
|||||||
cartListsdatashow: false, //是否显示购物车
|
cartListsdatashow: false, //是否显示购物车
|
||||||
showCart: false,
|
showCart: false,
|
||||||
lastbottom: '', //元素最低端的距离
|
lastbottom: '', //元素最低端的距离
|
||||||
scrollxleft: false,
|
scrollxleft: true,
|
||||||
orderdetailFlag: true,
|
orderdetailFlag: true,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -368,6 +367,11 @@
|
|||||||
} else {
|
} else {
|
||||||
this.opacity = true
|
this.opacity = true
|
||||||
}
|
}
|
||||||
|
// if (e.scrollTop > this.topArr[0]) {
|
||||||
|
// this.scrollxleft = true
|
||||||
|
// } else {
|
||||||
|
// this.scrollxleft = false
|
||||||
|
// }
|
||||||
this.mainScroll(e)
|
this.mainScroll(e)
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -402,7 +406,7 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
onUnload() {
|
onUnload() {
|
||||||
if ( this.socketTicket ) {
|
if (this.socketTicket) {
|
||||||
this.socketTicket.Close()
|
this.socketTicket.Close()
|
||||||
uni.$off('message')
|
uni.$off('message')
|
||||||
}
|
}
|
||||||
@@ -734,9 +738,9 @@
|
|||||||
this.isSpec = false;
|
this.isSpec = false;
|
||||||
let res = await this.api.productquerySpec({
|
let res = await this.api.productquerySpec({
|
||||||
productId: item1.id, //商品id
|
productId: item1.id, //商品id
|
||||||
querySpecList:[],
|
querySpecList: [],
|
||||||
})
|
})
|
||||||
if( res.code == 0 ){
|
if (res.code == 0) {
|
||||||
this.specifications.tagSnap = res.data.map((item) => {
|
this.specifications.tagSnap = res.data.map((item) => {
|
||||||
console.log(item)
|
console.log(item)
|
||||||
let data = {
|
let data = {
|
||||||
@@ -784,7 +788,7 @@
|
|||||||
let querySpecList = [];
|
let querySpecList = [];
|
||||||
this.skuBtnText = "添加到购物车";
|
this.skuBtnText = "添加到购物车";
|
||||||
this.isSpec = true;
|
this.isSpec = true;
|
||||||
if ( this.specifications.tagSnap[index].start != index1) {
|
if (this.specifications.tagSnap[index].start != index1) {
|
||||||
this.$set(this.specifications.tagSnap[index], 'start', index1)
|
this.$set(this.specifications.tagSnap[index], 'start', index1)
|
||||||
} else {
|
} else {
|
||||||
this.$set(this.specifications.tagSnap[index], 'start', -1)
|
this.$set(this.specifications.tagSnap[index], 'start', -1)
|
||||||
@@ -800,7 +804,7 @@
|
|||||||
|
|
||||||
})
|
})
|
||||||
for (let i = 0; i < this.specifications.tagSnap.length; i++) {
|
for (let i = 0; i < this.specifications.tagSnap.length; i++) {
|
||||||
if ( this.specifications.tagSnap[i].start < 0) {
|
if (this.specifications.tagSnap[i].start < 0) {
|
||||||
this.isSpec = false;
|
this.isSpec = false;
|
||||||
this.skuBtnText = `您还没选择${this.specifications.tagSnap[i].name}哦`
|
this.skuBtnText = `您还没选择${this.specifications.tagSnap[i].name}哦`
|
||||||
break; // 终止循环
|
break; // 终止循环
|
||||||
@@ -872,7 +876,7 @@
|
|||||||
* 结算直接生成订单
|
* 结算直接生成订单
|
||||||
*/
|
*/
|
||||||
orderdetail() {
|
orderdetail() {
|
||||||
if ( !this.orderdetailFlag ) {
|
if (!this.orderdetailFlag) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.orderdetailFlag = false;
|
this.orderdetailFlag = false;
|
||||||
@@ -1025,11 +1029,7 @@
|
|||||||
let top = e.scrollTop;
|
let top = e.scrollTop;
|
||||||
let index = 0;
|
let index = 0;
|
||||||
// 判断左边是否可以滑动
|
// 判断左边是否可以滑动
|
||||||
if (top + 2 > this.topArr[0]) {
|
|
||||||
this.scrollxleft = true
|
|
||||||
} else {
|
|
||||||
this.scrollxleft = false
|
|
||||||
}
|
|
||||||
for (let i = (this.topArr.length - 1); i >= 0; i--) {
|
for (let i = (this.topArr.length - 1); i >= 0; i--) {
|
||||||
/* 在部分安卓设备上,因手机逻辑分辨率与rpx单位计算不是整数,滚动距离与有误差,增加2px来完善该问题 */
|
/* 在部分安卓设备上,因手机逻辑分辨率与rpx单位计算不是整数,滚动距离与有误差,增加2px来完善该问题 */
|
||||||
if ((top + 2) >= this.topArr[i] - this.HeighT) {
|
if ((top + 2) >= this.topArr[i] - this.HeighT) {
|
||||||
|
|||||||
Reference in New Issue
Block a user