|
|
@@ -751,12 +751,13 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
handleChange(value) {
|
|
|
- console.log(value);
|
|
|
+ // console.log(value);
|
|
|
var loc = "";
|
|
|
for (let i = 0; i < value.length; i++) {
|
|
|
loc += codeToText[value[i]];
|
|
|
}
|
|
|
- console.log(loc); //打印区域码所对应的属性值即中文地址
|
|
|
+ //打印区域码所对应的属性值即中文地址
|
|
|
+ // console.log(loc);
|
|
|
this.dataForm.addressStr = loc;
|
|
|
},
|
|
|
handleClickOrderInfo() {
|
|
|
@@ -928,6 +929,11 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ checkKeywords(str) {
|
|
|
+ // 使用正则表达式匹配"内蒙"、"新疆"或"西藏"
|
|
|
+ const pattern = /内蒙|新疆|西藏/;
|
|
|
+ return pattern.test(str);
|
|
|
+ },
|
|
|
submit() {
|
|
|
this.dialogVisible = false;
|
|
|
if (this.deliveryType == "1") {
|
|
|
@@ -948,6 +954,14 @@ export default {
|
|
|
skuType: this.data.skuType,
|
|
|
welfareId: this.data.welfareId,
|
|
|
};
|
|
|
+ if(this.checkKeywords(params.addressStr)){
|
|
|
+ this.$message({
|
|
|
+ message: '偏远地区无法快递',
|
|
|
+ type: 'warning'
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
} else if (this.deliveryType == "4") {
|
|
|
var params = {
|
|
|
actId: this.activeType,
|
|
|
@@ -977,32 +991,32 @@ export default {
|
|
|
}
|
|
|
|
|
|
if (this.activeName == "goodsNotice") {
|
|
|
- start(params)
|
|
|
- .then((response) => {
|
|
|
- console.log(response.data.data);
|
|
|
- if(response.data.data){
|
|
|
- this.recharge = true;
|
|
|
- this.$nextTick(function () {
|
|
|
- let data = response.data.data;
|
|
|
- this.qrcode(data.payUrl); // 例如:data.payUrl 的值为 "weixin://wxpay/bizpayurl?pr=......",根据这个值生成相对应的微信支付二维码
|
|
|
- this.timer = setInterval(() => { // 通过定时器每间隔一会去请求查询微信支付状态(具体参数根据项目需要而定)
|
|
|
- this.handleQueryWxPayStatus(data.orderNo);
|
|
|
- }, 1000);
|
|
|
- })
|
|
|
- }else{
|
|
|
- this.$store.dispatch("GetUserInfo");
|
|
|
- this.dialogMsgVisible = true;
|
|
|
- }
|
|
|
- })
|
|
|
- .catch(() => { });
|
|
|
+ // start(params)
|
|
|
+ // .then((response) => {
|
|
|
+ // console.log(response.data.data);
|
|
|
+ // if(response.data.data){
|
|
|
+ // this.recharge = true;
|
|
|
+ // this.$nextTick(function () {
|
|
|
+ // let data = response.data.data;
|
|
|
+ // this.qrcode(data.payUrl); // 例如:data.payUrl 的值为 "weixin://wxpay/bizpayurl?pr=......",根据这个值生成相对应的微信支付二维码
|
|
|
+ // this.timer = setInterval(() => { // 通过定时器每间隔一会去请求查询微信支付状态(具体参数根据项目需要而定)
|
|
|
+ // this.handleQueryWxPayStatus(data.orderNo);
|
|
|
+ // }, 1000);
|
|
|
+ // })
|
|
|
+ // }else{
|
|
|
+ // this.$store.dispatch("GetUserInfo");
|
|
|
+ // this.dialogMsgVisible = true;
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // .catch(() => { });
|
|
|
} else {
|
|
|
- kill(params)
|
|
|
- .then((response) => {
|
|
|
- console.log(response.data.data);
|
|
|
- this.$store.dispatch("GetUserInfo");
|
|
|
- this.dialogMsgVisible = true;
|
|
|
- })
|
|
|
- .catch(() => { });
|
|
|
+ // kill(params)
|
|
|
+ // .then((response) => {
|
|
|
+ // console.log(response.data.data);
|
|
|
+ // this.$store.dispatch("GetUserInfo");
|
|
|
+ // this.dialogMsgVisible = true;
|
|
|
+ // })
|
|
|
+ // .catch(() => { });
|
|
|
}
|
|
|
},
|
|
|
handleClickExchange: debounce(
|