Revert "1"
This reverts commit 6c7a7ccd46334a9eac0a57b360cf1041f894c8af.
This commit is contained in:
parent
ddc8e2bdc2
commit
aeaa74ff25
@ -96,7 +96,7 @@
|
|||||||
action: 'payClose'
|
action: 'payClose'
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
goPay: async function(number, paytype) {
|
goPay: function(number, paytype) {
|
||||||
if (this.isCall) {
|
if (this.isCall) {
|
||||||
return this.$emit('onChangeFun', {
|
return this.$emit('onChangeFun', {
|
||||||
action: 'payCheck',
|
action: 'payCheck',
|
||||||
@ -137,17 +137,6 @@
|
|||||||
this.type = type;
|
this.type = type;
|
||||||
|
|
||||||
if (paytype == 'balance' || paytype == 'merBalance') {
|
if (paytype == 'balance' || paytype == 'merBalance') {
|
||||||
// 是否输入密码
|
|
||||||
const result = await this.$util.checkPassword();
|
|
||||||
if (result.data.code == 101) { //未设置支付密码
|
|
||||||
return this.$util.Tips({
|
|
||||||
title: "您暂未设置支付密码,请前往设置!"
|
|
||||||
}, () => {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: "/pages/users/user_modify_pwd/index?type=payPwd"
|
|
||||||
});
|
|
||||||
})
|
|
||||||
}
|
|
||||||
this.$refs.popups.handleOpen();
|
this.$refs.popups.handleOpen();
|
||||||
} else {
|
} else {
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
@ -158,18 +147,26 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
// 输入密码回调
|
// 输入密码回调
|
||||||
async handleConfirm(e) {
|
handleConfirm(e) {
|
||||||
const result = await this.$util.checkPassword(e);
|
// 验证密码是否正确
|
||||||
// 验证密码正确
|
verifyPwd({
|
||||||
if (result.data.code == 100) {
|
withdrawal_pwd: e
|
||||||
|
}).then(res => {
|
||||||
|
// 密码是否有效 状态码判断
|
||||||
|
const code = res.data.code;
|
||||||
|
|
||||||
|
if (code == 100) { //密码正确
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: '订单支付中',
|
title: '订单支付中',
|
||||||
mask: true
|
mask: true
|
||||||
});
|
});
|
||||||
this.trueOrderPay(e);
|
this.trueOrderPay();
|
||||||
} else {
|
} else {
|
||||||
this.$refs.payPwd.handleOpen(result.data.code);
|
this.$refs.payPwd.handleOpen(code);
|
||||||
}
|
}
|
||||||
|
}).catch(err => {
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
handleClear() {},
|
handleClear() {},
|
||||||
@ -193,13 +190,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
trueOrderPay(e) {
|
trueOrderPay() {
|
||||||
let that = this;
|
let that = this;
|
||||||
let orderApi = that.order_type === 1 ? presellOrderPay : that.order_type === 2 ? integralOrderPay :
|
let orderApi = that.order_type === 1 ? presellOrderPay : that.order_type === 2 ? integralOrderPay :
|
||||||
orderPay
|
orderPay
|
||||||
orderApi(that.order_id, {
|
orderApi(that.order_id, {
|
||||||
type: that.type,
|
type: that.type,
|
||||||
withdrawal_pwd: e,
|
|
||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
return_url: that.returnUrl !== '' ? 'http://' + window.location.host + that.returnUrl :
|
return_url: that.returnUrl !== '' ? 'http://' + window.location.host + that.returnUrl :
|
||||||
'http://' + window.location.host + '/pages/users/order_list/index',
|
'http://' + window.location.host + '/pages/users/order_list/index',
|
||||||
|
@ -580,7 +580,7 @@
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
SubOrder: async function() {
|
SubOrder: function() {
|
||||||
let that = this,
|
let that = this,
|
||||||
data = {};
|
data = {};
|
||||||
if (!that.payType) return that.$util.Tips({
|
if (!that.payType) return that.$util.Tips({
|
||||||
@ -596,19 +596,6 @@
|
|||||||
|
|
||||||
// 设置支付密码
|
// 设置支付密码
|
||||||
if (that.payType == 'balance' || that.payType == 'merBalance') {
|
if (that.payType == 'balance' || that.payType == 'merBalance') {
|
||||||
|
|
||||||
// 是否输入密码
|
|
||||||
const result = await this.$util.checkPassword();
|
|
||||||
if (result.data.code == 101) { //未设置支付密码
|
|
||||||
return this.$util.Tips({
|
|
||||||
title: "您暂未设置支付密码,请前往设置!"
|
|
||||||
}, () => {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: "/pages/users/user_modify_pwd/index?type=payPwd"
|
|
||||||
});
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
this.$refs.popups.handleOpen();
|
this.$refs.popups.handleOpen();
|
||||||
} else {
|
} else {
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
@ -619,20 +606,29 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
// 输入密码回调
|
// 输入密码回调
|
||||||
async handleConfirm(e) {
|
handleConfirm(e) {
|
||||||
const result = await this.$util.checkPassword(e);
|
// 验证密码是否正确
|
||||||
// 验证密码正确
|
verifyPwd({
|
||||||
if (result.data.code == 100) {
|
withdrawal_pwd: e
|
||||||
|
}).then(res => {
|
||||||
|
// 密码是否有效 状态码判断
|
||||||
|
const code = res.data.code;
|
||||||
this.$set(this.payForm, 'withdrawal_pwd', e);
|
this.$set(this.payForm, 'withdrawal_pwd', e);
|
||||||
|
|
||||||
|
if (code == 100) { //密码正确
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: '订单支付中',
|
title: '订单支付中',
|
||||||
mask: true
|
mask: true
|
||||||
});
|
});
|
||||||
this.truePayOrder(this.payForm);
|
this.truePayOrder(this.payForm);
|
||||||
} else {
|
} else {
|
||||||
this.$refs.payPwd.handleOpen(result.data.code);
|
this.$refs.payPwd.handleOpen(code);
|
||||||
}
|
}
|
||||||
|
}).catch(err => {
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
// 弹框左边按钮 101 未设置密码 102 忘记密码 都去设置密码
|
// 弹框左边按钮 101 未设置密码 102 忘记密码 都去设置密码
|
||||||
|
@ -1413,8 +1413,7 @@
|
|||||||
orderId = res.data.result.order_id,
|
orderId = res.data.result.order_id,
|
||||||
callback_key = res.data.result.pay_key,
|
callback_key = res.data.result.pay_key,
|
||||||
jsConfig = res.data.result.config,
|
jsConfig = res.data.result.config,
|
||||||
goPages = '/pages/order_pay_status/index?order_id=' + orderId + '&msg=' + res.message +
|
goPages = '/pages/order_pay_status/index?order_id=' + orderId + '&msg=' + res.message + '&sale_type=' + that.sale_type;
|
||||||
'&sale_type=' + that.sale_type;
|
|
||||||
that.orderPay = true;
|
that.orderPay = true;
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
switch (status) {
|
switch (status) {
|
||||||
@ -1679,7 +1678,7 @@
|
|||||||
this.virtualIndex = index;
|
this.virtualIndex = index;
|
||||||
},
|
},
|
||||||
|
|
||||||
SubOrder: async function(e) {
|
SubOrder: function(e) {
|
||||||
let that = this,
|
let that = this,
|
||||||
data = {};
|
data = {};
|
||||||
if (!that.payType) return that.$util.Tips({
|
if (!that.payType) return that.$util.Tips({
|
||||||
@ -1829,31 +1828,23 @@
|
|||||||
// 设置支付密码
|
// 设置支付密码
|
||||||
if (data.pay_type == 'balance' || data.pay_type == 'merBalance') {
|
if (data.pay_type == 'balance' || data.pay_type == 'merBalance') {
|
||||||
this.orderData = data;
|
this.orderData = data;
|
||||||
|
|
||||||
// 是否输入密码
|
|
||||||
const result = await this.$util.checkPassword();
|
|
||||||
if (result.data.code == 101) { //未设置支付密码
|
|
||||||
return this.$util.Tips({
|
|
||||||
title: "您暂未设置支付密码,请前往设置!"
|
|
||||||
}, () => {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: "/pages/users/user_modify_pwd/index?type=payPwd"
|
|
||||||
});
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
//已设置 输入密码
|
|
||||||
this.$refs.popups.handleOpen();
|
this.$refs.popups.handleOpen();
|
||||||
} else { //无须支付密码
|
} else {
|
||||||
this.truePayOrder(data);
|
this.truePayOrder(data);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// 输入密码回调
|
// 输入密码回调
|
||||||
async handleConfirm(e) {
|
handleConfirm(e) {
|
||||||
const result = await this.$util.checkPassword(e);
|
// 验证密码是否正确
|
||||||
// 验证密码正确
|
verifyPwd({
|
||||||
if (result.data.code == 100) {
|
withdrawal_pwd: e
|
||||||
|
}).then(res => {
|
||||||
|
|
||||||
|
// 密码是否有效 状态码判断
|
||||||
|
const code = res.data.code;
|
||||||
|
|
||||||
|
if (code == 100) { //密码正确
|
||||||
this.$set(this.orderData, 'withdrawal_pwd', e);
|
this.$set(this.orderData, 'withdrawal_pwd', e);
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: '订单支付中',
|
title: '订单支付中',
|
||||||
@ -1861,12 +1852,15 @@
|
|||||||
});
|
});
|
||||||
this.truePayOrder(this.orderData);
|
this.truePayOrder(this.orderData);
|
||||||
} else {
|
} else {
|
||||||
this.$refs.payPwd.handleOpen(result.data.code);
|
this.$refs.payPwd.handleOpen(code);
|
||||||
}
|
}
|
||||||
|
}).catch(err => {
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
// 弹框左边按钮 101 未设置密码 102 忘记密码 都去设置密码
|
// 弹框左边按钮 101 未设置密码 102 忘记密码 都去设置密码
|
||||||
handleLeft() {
|
handleLeft(code) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/users/user_modify_pwd/index?type=payPwd"
|
url: "/pages/users/user_modify_pwd/index?type=payPwd"
|
||||||
});
|
});
|
||||||
|
@ -12,10 +12,6 @@ import {
|
|||||||
HTTP_REQUEST_URL
|
HTTP_REQUEST_URL
|
||||||
} from '../config/app.js';
|
} from '../config/app.js';
|
||||||
import store from '../store';
|
import store from '../store';
|
||||||
|
|
||||||
import {
|
|
||||||
verifyPwd
|
|
||||||
} from '@/api/order.js';
|
|
||||||
import {
|
import {
|
||||||
pathToBase64
|
pathToBase64
|
||||||
} from '@/plugin/image-tools/index.js';
|
} from '@/plugin/image-tools/index.js';
|
||||||
@ -23,15 +19,6 @@ import {
|
|||||||
import permision from "./permission.js"
|
import permision from "./permission.js"
|
||||||
// #endif
|
// #endif
|
||||||
export default {
|
export default {
|
||||||
|
|
||||||
// 是否设置密码
|
|
||||||
checkPassword: async function(e) {
|
|
||||||
e = e ? e : '';
|
|
||||||
return await verifyPwd({
|
|
||||||
withdrawal_pwd: e
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 字符串截取
|
* 字符串截取
|
||||||
* @obj 传入的数据
|
* @obj 传入的数据
|
||||||
@ -230,8 +217,7 @@ export default {
|
|||||||
ctx.drawImage(arr2[2], cx, cy, d, d);
|
ctx.drawImage(arr2[2], cx, cy, d, d);
|
||||||
ctx.restore();
|
ctx.restore();
|
||||||
const CONTENT_ROW_LENGTH = 40;
|
const CONTENT_ROW_LENGTH = 40;
|
||||||
let [contentLeng, contentArray, contentRows] = that.textByteLength(store_name,
|
let [contentLeng, contentArray, contentRows] = that.textByteLength(store_name, CONTENT_ROW_LENGTH);
|
||||||
CONTENT_ROW_LENGTH);
|
|
||||||
if (contentRows > 2) {
|
if (contentRows > 2) {
|
||||||
contentRows = 2;
|
contentRows = 2;
|
||||||
let textArray = contentArray.slice(0, 2);
|
let textArray = contentArray.slice(0, 2);
|
||||||
@ -318,13 +304,11 @@ export default {
|
|||||||
ctx.setFillStyle('#282828');
|
ctx.setFillStyle('#282828');
|
||||||
ctx.fillText(site_name, r, 62);
|
ctx.fillText(site_name, r, 62);
|
||||||
const CONTENT_ROW_LENGTH = 26;
|
const CONTENT_ROW_LENGTH = 26;
|
||||||
let [contentLeng, contentArray, contentRows] = that.textByteLength(store_name,
|
let [contentLeng, contentArray, contentRows] = that.textByteLength(store_name, CONTENT_ROW_LENGTH);
|
||||||
CONTENT_ROW_LENGTH);
|
|
||||||
if (contentRows > 2) {
|
if (contentRows > 2) {
|
||||||
contentRows = 2;
|
contentRows = 2;
|
||||||
let textArray = contentArray.slice(0, 2);
|
let textArray = contentArray.slice(0, 2);
|
||||||
textArray[textArray.length - 1] = textArray[textArray.length - 1].slice(0,
|
textArray[textArray.length - 1] = textArray[textArray.length - 1].slice(0,textArray[textArray.length - 1].length-1)
|
||||||
textArray[textArray.length - 1].length - 1)
|
|
||||||
textArray[textArray.length - 1] += '…';
|
textArray[textArray.length - 1] += '…';
|
||||||
contentArray = textArray;
|
contentArray = textArray;
|
||||||
}
|
}
|
||||||
@ -424,8 +408,7 @@ export default {
|
|||||||
ctx.setFontSize(28);
|
ctx.setFontSize(28);
|
||||||
ctx.setFillStyle('#282828');
|
ctx.setFillStyle('#282828');
|
||||||
const CONTENT_ROW_LENGTH = 25;
|
const CONTENT_ROW_LENGTH = 25;
|
||||||
let [contentLeng, contentArray, contentRows] = that.textByteLength(content,
|
let [contentLeng, contentArray, contentRows] = that.textByteLength(content, CONTENT_ROW_LENGTH);
|
||||||
CONTENT_ROW_LENGTH);
|
|
||||||
if (contentRows > 2) {
|
if (contentRows > 2) {
|
||||||
contentRows = 2;
|
contentRows = 2;
|
||||||
let textArray = contentArray.slice(0, 2);
|
let textArray = contentArray.slice(0, 2);
|
||||||
@ -544,8 +527,7 @@ export default {
|
|||||||
ctx.setFontSize(10);
|
ctx.setFontSize(10);
|
||||||
}
|
}
|
||||||
const CONTENT_ROW_LENGTH = 28;
|
const CONTENT_ROW_LENGTH = 28;
|
||||||
let [contentLeng, contentArray, contentRows] = that.textByteLength(sitename,
|
let [contentLeng, contentArray, contentRows] = that.textByteLength(sitename, CONTENT_ROW_LENGTH);
|
||||||
CONTENT_ROW_LENGTH);
|
|
||||||
if (contentRows > 2) {
|
if (contentRows > 2) {
|
||||||
contentRows = 2;
|
contentRows = 2;
|
||||||
let textArray = contentArray.slice(0, 2);
|
let textArray = contentArray.slice(0, 2);
|
||||||
@ -1022,8 +1004,7 @@ export default {
|
|||||||
url: `/pages/annex/web_view/index?url=${url}`
|
url: `/pages/annex/web_view/index?url=${url}`
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
if (['/pages/goods_cate/goods_cate', '/pages/plant_grass/index',
|
if (['/pages/goods_cate/goods_cate','/pages/plant_grass/index','/pages/order_addcart/order_addcart','/pages/user/index'
|
||||||
'/pages/order_addcart/order_addcart', '/pages/user/index'
|
|
||||||
]
|
]
|
||||||
.indexOf(url) == -1) {
|
.indexOf(url) == -1) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
|
Loading…
x
Reference in New Issue
Block a user