tianyi 1 month ago
parent
commit
7a51ea6b68
  1. 24
      package1/address/addressList.vue
  2. 6
      package1/buyFood/buyFood.vue
  3. 4
      package1/group/groupBuySingle.vue
  4. 4
      package1/myCenter/addGoods.vue
  5. 6
      package1/myCenter/addType.vue
  6. 20
      package1/myCenter/goodsList.vue

24
package1/address/addressList.vue

@ -189,27 +189,27 @@
this.addressForm.areaId = match.id;
this.addressForm.areaName = match.title;
} else {
return this.tui.toast('请搜索并选择有效的楼座',1000);
return this.tui.toast('请搜索并选择有效的楼座');
}
}
if(!this.addressForm.areaId) return this.tui.toast('请搜索并选择楼座',1000);
if(!this.addressForm.floor) return this.tui.toast('请填写所在楼层',1000);
if(!/^-?\d+$/.test(this.addressForm.floor)) return this.tui.toast('楼层必须为整数',1000);
if(!this.addressForm.roomNum) return this.tui.toast('请填写详细地址门牌号',1000);
if(!this.addressForm.receiverName) return this.tui.toast('请填写收件人',1000);
if(!this.addressForm.receiverPhone) return this.tui.toast('请填写联系电话',1000);
if(!/^1[3-9]\d{9}$/.test(this.addressForm.receiverPhone)) return this.tui.toast('请输入有效的11位手机号码',1000);
if(!this.addressForm.areaId) return this.tui.toast('请搜索并选择楼座');
if(!this.addressForm.floor) return this.tui.toast('请填写所在楼层');
if(!/^-?\d+$/.test(this.addressForm.floor)) return this.tui.toast('楼层必须为整数');
if(!this.addressForm.roomNum) return this.tui.toast('请填写详细地址门牌号');
if(!this.addressForm.receiverName) return this.tui.toast('请填写收件人');
if(!this.addressForm.receiverPhone) return this.tui.toast('请填写联系电话');
if(!/^1[3-9]\d{9}$/.test(this.addressForm.receiverPhone)) return this.tui.toast('请输入有效的11位手机号码');
let url = this.addressForm.id ? "/app/userAddress/edit" : "/app/userAddress/save";
let that = this;
this.addressForm.userId = uni.getStorageSync('id')
that.tui.request(url, "POST", this.addressForm, false, true).then((res) => {
if (res.code == 200) {
that.tui.toast("保存成功",1000);
that.tui.toast("保存成功");
that.$refs.addBookPopup.close();
that.getAddressList();
} else {
that.tui.toast(res.message,1000);
that.tui.toast(res.message);
}
}).catch(() => {});
},
@ -222,10 +222,10 @@
if (res.confirm) {
that.tui.request("/app/userAddress/delById", "POST", {id: id}, false, true).then((res) => {
if (res.code == 200) {
that.tui.toast("删除成功",1000);
that.tui.toast("删除成功");
that.getAddressList();
} else {
that.tui.toast(res.message,1000);
that.tui.toast(res.message);
}
}).catch(() => {});
}

6
package1/buyFood/buyFood.vue

@ -752,7 +752,7 @@
wxPayment() {
let that = this;
if (!this.currentOrderId || !this.backendTotalAmount) {
that.tui.toast(this.currentOrderId + this.backendTotalAmount,1000);
that.tui.toast(this.currentOrderId + this.backendTotalAmount);
return;
}
@ -807,10 +807,10 @@
that.handlePaymentSuccess();
}, 1500);
}).catch(e => {
that.tui.toast("请求失败",1000);
that.tui.toast("请求失败");
});
} else {
that.tui.toast(res.message,1000);
that.tui.toast(res.message);
}
}
})

4
package1/group/groupBuySingle.vue

@ -3,7 +3,7 @@
<view class="page1" @touchmove="onPageTouchMove">
<!-- 固定顶部导航栏悬浮在背景图之上 -->
<view class="nav-bar"
:style="{'padding-top': menuButtonInfo.top +'px','background':lastScrollTop>217?'#fff':''}">
:style="{'padding-top': menuButtonInfo.top +'px','background':((orderListWait.length > 0 && lastScrollTop>217) || (orderListWait.length == 0 && lastScrollTop>149))?'#fff':''}">
<view class="back-btn" @tap="back">
<uni-icons type="left" size="28"></uni-icons>
</view>
@ -630,7 +630,7 @@
const sysInfo = uni.getSystemInfoSync();
const bottomBarPx = Math.round(80 * sysInfo.windowWidth / 375);
const h = sysInfo.windowHeight - this.navBarHeight - bottomBarPx;
return 'display:flex;position:fixed;left:0;top:' + this.navBarHeight + 'px;width:95%;margin:0 auto;right:0;height:' + h + 'px;z-index:50;background:#F5F8F5;box-sizing:border-box;';
return 'display:flex;position:fixed;left:0;top:' + this.navBarHeight + 'px;margin:0 auto;right:0;height:' + h + 'px;z-index:50;background:#F5F8F5;box-sizing:border-box;';
} else {
return 'display:flex;height:72%;margin-top:20rpx;';
}

4
package1/myCenter/addGoods.vue

@ -396,7 +396,7 @@
this.tui.request("/app/product/save", "post", this.formData, false, false).then((res) => {
if(res.code == 200){
that.tui.toast("操作成功",1000);
that.tui.toast("操作成功");
uni.navigateBack()
}
}).catch(() => {});
@ -408,7 +408,7 @@
this.formData.productPictures = []
this.tui.request("/app/product/edit", "post", this.formData, false, false).then((res) => {
if(res.code == 200){
that.tui.toast("操作成功",1000);
that.tui.toast("操作成功");
uni.navigateBack()
}
}).catch(() => {});

6
package1/myCenter/addType.vue

@ -151,7 +151,7 @@
}
}
if(that.typeText == ''){
that.tui.toast("请输入分类名",1000)
that.tui.toast("请输入分类名")
return
}
this.tui.request("/app/productCategory/save", "POST",{
@ -161,13 +161,13 @@
shopId:uni.getStorageSync('shopId')
}, false, true).then((res) => {
if (res.code == 200) {
that.tui.toast("添加成功",1000)
that.tui.toast("添加成功")
that.$refs.addTypeDialog.close()
that.sortText = ''
that.getGategoryList()
} else {
that.tui.toast("添加失败",1000)
that.tui.toast("添加失败")
}
}).catch(() => {});

20
package1/myCenter/goodsList.vue

@ -226,9 +226,9 @@
}else{
this.shopList1[index].isPush = value
}
this.tui.toast('设置成功',1000)
this.tui.toast('设置成功')
} else {
this.tui.toast(res.message,1000)
this.tui.toast(res.message)
}
}).catch((res) => {})
},
@ -244,9 +244,9 @@
}, false, true).then((res) => {
if (res.code == 200) {
that.getShareList()
that.tui.toast('删除成功',1000)
that.tui.toast('删除成功')
} else {
that.tui.toast(res.message,1000)
that.tui.toast(res.message)
}
}).catch((res) => {})
}
@ -264,9 +264,9 @@
}else{
this.shopList1[index].isMust = value
}
this.tui.toast('设置成功',1000)
this.tui.toast('设置成功')
} else {
this.tui.toast(res.message,1000)
this.tui.toast(res.message)
}
}).catch((res) => {})
},
@ -281,9 +281,9 @@
}else{
this.shopList1[index].delFlag = value
}
this.tui.toast('设置成功',1000)
this.tui.toast('设置成功')
} else {
this.tui.toast(res.message,1000)
this.tui.toast(res.message)
}
}).catch((res) => {})
}else{
@ -296,9 +296,9 @@
}else{
this.shopList1[index].delFlag = value
}
this.tui.toast('设置成功',1000)
this.tui.toast('设置成功')
} else {
this.tui.toast(res.message,1000)
this.tui.toast(res.message)
}
}).catch((res) => {})
}

Loading…
Cancel
Save