diff --git a/components/cart-choose/cart-choose.vue b/components/cart-choose/cart-choose.vue
index 304985a..5babe10 100644
--- a/components/cart-choose/cart-choose.vue
+++ b/components/cart-choose/cart-choose.vue
@@ -57,7 +57,7 @@
购买数量
-
+
@@ -114,7 +114,9 @@
props:{
specificationList:{
type:Array,
- default:[],
+ default() {
+ return []
+ },
},
// 0,加入购物车。1,加入购物车,领券购买
status:{
@@ -132,22 +134,22 @@
specificationList:{
handler(n,o){
this.chooseNumber = 1;
-
- this.isAllFailure = false;
this.chooseIndex = 0;
+
for(let i=0;i0){
this.chooseIndex = i;
+ // console.log(this.chooseIndex,"this.chooseIndex")
return
}
-
- // if(i == n.length-1){
- // this.isAllFailure = true;
- // this.chooseIndex = 0
- // }
+
}
+
+
+
},
deep:true,
+ immediate: true, // 初始化监听
}
},
components:{
@@ -193,7 +195,14 @@
noMoreLess(){
uni.showToast({
icon: 'none',
- title: "低于最少购买件数",
+ title: "低于最少购买数量",
+ duration: 1000
+ });
+ },
+ noMore(){
+ uni.showToast({
+ icon: 'none',
+ title: "超出最大购买数量",
duration: 1000
});
},
@@ -209,7 +218,7 @@
insertShoppingCart(params).then(async res=>{
let title ;
if (res.return_code == '000000') {
- title = res.return_data;
+ title = "加入购物车成功";
this.$emit("refreshCartNum")
}else{
@@ -254,11 +263,13 @@
// this.$emit("close")
},
- //
+ //选择商品规格change事件
select(index){
this.chooseIndex = index;
- if(this.chooseNumber>this.specificationList[this.chooseIndex].stock){
- this.chooseNumber = this.specificationList[this.chooseIndex].stock
+ if(this.specificationList[this.chooseIndex].stock==0){
+ this.chooseNumber = 0;
+ }else{
+ this.chooseNumber = 1;
}
},
diff --git a/components/goods-list/goods-list.vue b/components/goods-list/goods-list.vue
index 4d7922f..a6f7f22 100644
--- a/components/goods-list/goods-list.vue
+++ b/components/goods-list/goods-list.vue
@@ -130,7 +130,7 @@
-
+
@@ -321,13 +321,14 @@
let params = {
goodsId: id
};
- console.log(params)
+ // console.log(params)
findGoodsSkuByGoodsId(params).then(res => {
if (res.return_code == '000000') {
if (res.return_data && res.return_data.length > 0) {
this.specificationList = res.return_data;
this.$refs.popup.show();
+ // console.log(this.specificationList)
} else {
this.specificationList = [];
}
diff --git a/physical-merchants/classify/cart/cart.vue b/physical-merchants/classify/cart/cart.vue
index 4a68a48..1484e99 100644
--- a/physical-merchants/classify/cart/cart.vue
+++ b/physical-merchants/classify/cart/cart.vue
@@ -10,7 +10,7 @@
+ @click="swipe_opt_event($event,item.id)" @change="swipe_change($event, item.id)">
@@ -425,16 +425,11 @@
content: '确定把该商品移除购物车吗?',
success: function(res) {
if (res.confirm) {
- console.log('用户点击确定,要删除的id', ids);
+ // console.log('用户点击确定,要删除的id', ids);
let params = {
ids: ids
};
- uni.showLoading({
- title: '加载中',
- mask:true,
- });
deleteShoppingCart(params).then(res => {
- uni.hideLoading();
let title;
if (res.return_code == '000000') {
title = res.return_data;
@@ -475,31 +470,21 @@
}
goodsEditNum(params).then(res => {
+
+
if (res.return_code == '000000') {
- // uni.showToast({
- // title: res.return_data,
- // icon: 'none',
- // duration: 2000
- // })
+
} else {
//增加数量失败
- // this.cartList.map(item=>{
- // if(item.id == id){
- // item.num = 1;
- // }
- // })
-
-
- //重新刷新数据
- this.initData();
-
uni.showToast({
title: res.return_msg,
icon: 'none',
duration: 2000
})
}
-
+
+ //重新刷新数据
+ this.initData();
})
diff --git a/physical-merchants/classify/goodsDetail/goodsDetail.vue b/physical-merchants/classify/goodsDetail/goodsDetail.vue
index 7029abe..66777fe 100644
--- a/physical-merchants/classify/goodsDetail/goodsDetail.vue
+++ b/physical-merchants/classify/goodsDetail/goodsDetail.vue
@@ -89,7 +89,7 @@
-
+
diff --git a/physical-merchants/classify/order/orderDetail.vue b/physical-merchants/classify/order/orderDetail.vue
index 0d6ab91..7d74f45 100644
--- a/physical-merchants/classify/order/orderDetail.vue
+++ b/physical-merchants/classify/order/orderDetail.vue
@@ -40,7 +40,7 @@
-
+
@@ -63,7 +63,7 @@
还有{{goodsList2.length}}种商品
-
+
@@ -164,8 +164,8 @@
- 收货信息
-
+ 收货信息
+
{{recinfo.goodsDeliveryAddress.regionName +' '+recinfo.goodsDeliveryAddress.address}}
{{recinfo.goodsDeliveryAddress.consignee +' '+recinfo.goodsDeliveryAddress.phone}}
@@ -174,42 +174,42 @@
- 物流信息
-
+ 物流信息
+
查看物流信息
- 订单编号
-
+ 订单编号
+
{{orderId}}
复制
- 下单时间
-
+ 下单时间
+
{{recinfo.createTime | formatDate('-')}}
- 支付方式
-
- 支付宝
- 微信支付
- 积分兑换
- 汇联通工会卡
- 银联
+ 支付方式
+
+ 支付宝
+ 微信支付
+ 积分兑换
+ 汇联通工会卡
+ 银联
- 备注
-
- {{recinfo.remarks || "暂无数据"}}
+ 备注
+
+ {{recinfo.remarks || "无"}}
@@ -218,8 +218,8 @@
- 收货信息
-
+ 收货信息
+
{{recinfo.goodsDeliveryAddress.regionName +' '+recinfo.goodsDeliveryAddress.address}}
{{recinfo.goodsDeliveryAddress.consignee +' '+recinfo.goodsDeliveryAddress.phone}}
@@ -228,24 +228,24 @@
- 订单编号
-
+ 订单编号
+
{{orderId}}
复制
- 下单时间
-
+ 下单时间
+
{{recinfo.createTime | formatDate('-')}}
- 备注
-
- {{recinfo.remarks || "暂无数据"}}
+ 备注
+
+ {{recinfo.remarks || "无"}}
diff --git a/physical-merchants/classify/order/pay.vue b/physical-merchants/classify/order/pay.vue
index ae56edc..2ac2bb5 100644
--- a/physical-merchants/classify/order/pay.vue
+++ b/physical-merchants/classify/order/pay.vue
@@ -60,7 +60,7 @@
- 确认支付¥{{payPrice}}
+ 确认支付¥{{payPrice | numFormat}}
@@ -271,7 +271,9 @@
if (that.paytype == '2') {
- // #ifdef H5
+
+ // console.log(app.globalData)
+ // #ifdef H5
let params = {
"orderNo": that.orderNo,
"openId": app.globalData.openId,
@@ -285,6 +287,7 @@
"openIdType": 1
}
// #endif
+ console.log(params)
wechatPay(params).then(res => {
if (res.return_code == '000000') {
// #ifdef MP
diff --git a/physical-merchants/classify/order/wuliuPupup/wuliuPupup.vue b/physical-merchants/classify/order/wuliuPupup/wuliuPupup.vue
index d1f26f4..8f62353 100644
--- a/physical-merchants/classify/order/wuliuPupup/wuliuPupup.vue
+++ b/physical-merchants/classify/order/wuliuPupup/wuliuPupup.vue
@@ -1,5 +1,5 @@
-
+
物流信息
@@ -233,24 +233,33 @@
return
}
- uni.showModal({
- title: '确定拨打电话',
- content: this.phoneNumber[0],
- success: function(res) {
- if (res.confirm) {
- uni.makePhoneCall({
- phoneNumber: this.phoneNumber[0], //电话号码
- success: function(e) {
- console.log(e);
- },
- fail: function(e) {
- console.log(e);
-
- }
- })
- }
+ // 数组去重
+ this.phoneNumber = [...new Set(this.phoneNumber)];
+ let that = this;
+ uni.showActionSheet({
+ itemList: that.phoneNumber,
+ success: function (res) {
+ // console.log('选中了第' + (res.tapIndex + 1) + '个按钮');
+ uni.makePhoneCall({
+ phoneNumber:String(that.phoneNumber[res.tapIndex]), //电话号码
+ success: function(e) {
+ console.log(e);
+ },
+ fail: function(e) {
+ console.log(e);
+
+ }
+ })
+
+
+ },
+ fail: function (res) {
+ // console.log("点击了取消");
}
- })
+ });
+
+
+
},
diff --git a/physical-merchants/settleAccounts/settleAccounts.vue b/physical-merchants/settleAccounts/settleAccounts.vue
index 1928d5e..a166cf4 100644
--- a/physical-merchants/settleAccounts/settleAccounts.vue
+++ b/physical-merchants/settleAccounts/settleAccounts.vue
@@ -45,8 +45,9 @@
-
- 共{{getNumberAll}}件
+
+ 共{{getNumberAll}}件
+
@@ -62,15 +63,15 @@
- {{goodsList[0].title}}
+ {{goodsList[0].title}}
共{{getNumberAll}}件
- ¥{{goodsList[0].price}}
+ ¥{{goodsList[0].price}}
×{{goodsList[0].num}}
- ¥{{goodsList[0].originalPrice}}
+ ¥{{goodsList[0].originalPrice}}
×{{goodsList[0].num}}
@@ -181,7 +182,7 @@
-
+
送至: {{addressDetail.regionName+" "+addressDetail.address}}
diff --git a/uni_modules/uni-number-box/components/uni-number-box/uni-number-box.vue b/uni_modules/uni-number-box/components/uni-number-box/uni-number-box.vue
index 6ec9ff1..0c40209 100644
--- a/uni_modules/uni-number-box/components/uni-number-box/uni-number-box.vue
+++ b/uni_modules/uni-number-box/components/uni-number-box/uni-number-box.vue
@@ -100,6 +100,7 @@
return;
}
if (value > (this.max * scale)) {
+
value = this.max * scale
}
}
@@ -107,6 +108,7 @@
if (type === "plus") {
value += step;
if (value > (this.max * scale)) {
+ this.$emit("noMore")
return;
}
if (value < (this.min * scale)) {
@@ -139,8 +141,10 @@
}
value = +value;
if (value > this.max) {
+ this.$emit("noMore")
value = this.max;
} else if (value < this.min) {
+ this.$emit("noMoreLess")
value = this.min;
}
const scale = this._getDecimalScale();