From 01f1726d04a4c0dfb1fb985b343eeb3206cad8fd Mon Sep 17 00:00:00 2001
From: dongjian <315328220@qq.com>
Date: Tue, 9 Sep 2025 12:02:33 +0800
Subject: [PATCH] no message
---
.../mine_authentication.vue | 12 +-
.../order_submit/order_submit.vue | 166 ++++++++++++++++--
.../other_package/productInfo/productInfo.vue | 9 +
pages/rwa_package/setting/forgot-pass.vue | 4 +-
4 files changed, 173 insertions(+), 18 deletions(-)
diff --git a/pages/mine_package/mine_authentication/mine_authentication.vue b/pages/mine_package/mine_authentication/mine_authentication.vue
index 1f82f27..0f04043 100644
--- a/pages/mine_package/mine_authentication/mine_authentication.vue
+++ b/pages/mine_package/mine_authentication/mine_authentication.vue
@@ -171,12 +171,12 @@ export default {
return;
}
console.log("params", params);
- // const resp = await realNameAuthentication(params);
- // if (resp && resp.bizcode === 100) {
- // uni.navigateTo({
- // url: '/pages/mine_package/mine_authentication_ok/mine_authentication_ok',
- // })
- // }
+ const resp = await realNameAuthentication(params);
+ if (resp && resp.bizcode === 100) {
+ uni.navigateTo({
+ url: '/pages/mine_package/mine_authentication_ok/mine_authentication_ok',
+ })
+ }
},
// 提交地址
certConfirm(e) {
diff --git a/pages/order_package/order_submit/order_submit.vue b/pages/order_package/order_submit/order_submit.vue
index 4188c62..bb981f9 100644
--- a/pages/order_package/order_submit/order_submit.vue
+++ b/pages/order_package/order_submit/order_submit.vue
@@ -172,7 +172,42 @@
-
+
+
+
+
+
+ {{orderInfo.amount}}
+
+
+
+
+
+
+
+
+ 请输入支付密码
+
+
+
@@ -186,8 +221,10 @@ import { getSupportPay } from '@/api/order.js';
import { feedback } from '@/api/payment.js';
import { assembleAddress } from '@/utils/index.js'
import Header from '@/components/header.vue';
+import { getUserInfo } from '@/api/auth.js';
import { appWxpayFun, zfbPayFun, jumpWayOk, jumpWayError } from '@/utils/payUtils.js'
+import CryptoJS from 'crypto-js';
export default {
computed: {
@@ -201,6 +238,10 @@ export default {
},
data() {
return {
+ password:'',
+ payPwd:0,
+ show:false,
+ isShow:false,
ids: 0,
orderInfo: {
// coupon:2,//优惠卷
@@ -219,7 +260,11 @@ export default {
isShowBalance: false,
ji: 0,
sed: null,
- curPay: null
+ curPay: null,
+ user:null,
+ tipsShow:false,
+ content:'您未设置支付密码,请先去设置支付密码',
+ type:'1'
};
},
onLoad(option) {
@@ -245,6 +290,7 @@ export default {
this.getWayOption();
this.wayShow = payOpen;
}
+ this.getUserInfo();
},
mounted() {
@@ -252,6 +298,58 @@ export default {
methods: {
getValue,
assembleAddress,
+ onBackspace(e){
+ if(this.password.length>0){
+ this.password = this.password.substring(0,this.password.length-1);
+ }
+ },
+ showPop(flag = true){
+ this.password = '';
+ this.show = flag;
+ },
+ finish(){
+ console.log(11111)
+ },
+ onChange(val){
+
+ if(this.password.length<6){
+ this.password += val;
+ }
+ if(this.password.length>=6){
+ this.show = false;
+ this.payPwd = this.password;
+ this.password = '';
+ setTimeout(()=>{
+ this.passPay();
+ },300)
+ // this.checkPayPwd();
+ }
+ },
+ onCancel(){
+ if(this.type == '2'){
+ uni.redirectTo({
+ url:'/pages/rwa_package/setting/forgot-pass?type=1'
+ })
+ }
+ this.tipsShow = false;
+ },
+ onConfirm(){
+ if(this.type == '1'){
+ uni.redirectTo({
+ url:'/pages/rwa_package/setting/forgot-pass?type=1'
+ })
+ }else{
+ this.tipsShow = false;
+ this.passShow = true;
+ }
+ },
+ async getUserInfo() {
+ const result = await getUserInfo();
+ if (result && result.bizcode === 100) {
+ const data = result.data;
+ this.user = result.data || {};
+ }
+ },
// 增加收货地址
addAdress() {
const ids = this.ids;
@@ -274,7 +372,6 @@ export default {
} else {
parmas['types'] = '1,2,3';
}
- console.log('this.ji', parmas)
const result = await getSupportPay(parmas);
if (result && result.bizcode === 100) {
const data = result.data || [];
@@ -406,7 +503,7 @@ export default {
this.$refs.uToastRef.show({
type: 'error',
message: "不能再减拉,不能小于最低购买数量~",
- }); x3
+ });
} else {
currentQuantity = currentQuantity - 1;
currentAmount = currentAmount - data.unitPrice;
@@ -494,27 +591,49 @@ export default {
});
return;
}
-
+
+ if(!this.user.tradePassword){
+ return this.tipsShow = true;
+ }
+
+ if (arr.length) {
+ if (arr[0].type == 'balance' || arr[0].type == 'redpacket') {
+ this.show = true;
+ }else{
+ this.passPay()
+ }
+ }else{
+ this.passPay()
+ }
+
+ },
+ async passPay(){
const params = {
- addrId: orderInfo.address.id,// 收货地址ID
+ addrId: this.orderInfo.address.id,// 收货地址ID
//结算的购物车ID,多个以逗号分割,ALL表示全选
- payway: way,// 支付方式:1-微信,2-支付宝
+ payway: this.orderInfo.paymentMethod,// 支付方式:1-微信,2-支付宝
remark: JSON.stringify(this.getRemark()),//备注信息'[{"sid":"店铺ID","rmk":"备注内容"},{"sid":"店铺ID","rmk":"备注内容"}]'
}
let resp = null;
if (this.sed) {
+ if(this.orderInfo.paymentMethod == 'balance' || this.orderInfo.paymentMethod == 'redpacket'){
+ params['password'] = CryptoJS.MD5(this.payPwd).toString();
+ }
params['goodsId'] = this.sed.id;
params['specsId'] = this.sed.specsId.id;
params['goodsNum'] = this.orderInfo.shops[0].addrTimes[0].goods[0].num;
resp = await settlementOrder(params);
} else {
params['cartIds'] = this.ids;
+ if(this.orderInfo.paymentMethod == 'balance' || this.orderInfo.paymentMethod == 'redpacket'){
+ params['password'] = CryptoJS.MD5(this.payPwd).toString();
+ }
resp = await settle(params);
}
-
+
console.log('getWayOption', resp)
-
-
+
+
// 提交订单成功,就唤起支付
if (resp && resp.bizcode === 100) {
const item = resp.data;
@@ -604,6 +723,33 @@ export default {