no message

This commit is contained in:
2025-09-09 12:02:33 +08:00
parent e12623d607
commit 01f1726d04
4 changed files with 173 additions and 18 deletions
@@ -171,12 +171,12 @@ export default {
return; return;
} }
console.log("params", params); console.log("params", params);
// const resp = await realNameAuthentication(params); const resp = await realNameAuthentication(params);
// if (resp && resp.bizcode === 100) { if (resp && resp.bizcode === 100) {
// uni.navigateTo({ uni.navigateTo({
// url: '/pages/mine_package/mine_authentication_ok/mine_authentication_ok', url: '/pages/mine_package/mine_authentication_ok/mine_authentication_ok',
// }) })
// } }
}, },
// 提交地址 // 提交地址
certConfirm(e) { certConfirm(e) {
@@ -172,6 +172,41 @@
</view> </view>
</view> </view>
</up-popup> </up-popup>
<u-modal :show="tipsShow"
title="提示"
showCancelButton
@cancel="onCancel"
@confirm="onConfirm"
:cancelText="type == 1 ? '取消' : '忘记密码'"
:confirmText="type == 1 ? '去设置' : '重试'"
confirmColor="#7934F6"
:content='content'></u-modal>
<u-keyboard ref="uKeyboard" mode="number"
:show="show"
@change="onChange"
@backspace="onBackspace"
:dotDisabled="true"
:tooltip="false"
>
<view style="background-color: #fff;">
<view class="money">
<text>{{orderInfo.amount}}</text>
<text class="text-40 " style="margin-left:20rpx"></text>
<view class="text-28 close" data-flag="false" @tap="showPop(false)">
<u-icon name="close" color="#333333" size="20"></u-icon>
</view>
</view>
<view class="mid-tips">
<u-code-input v-model="password"
:dot="true"
:maxlength="6"
@finish="finish"
></u-code-input>
</view>
<view class="tips text-28">请输入支付密码</view>
</view>
</u-keyboard>
<up-toast ref="uToastRef"></up-toast> <up-toast ref="uToastRef"></up-toast>
</view> </view>
@@ -186,8 +221,10 @@ import { getSupportPay } from '@/api/order.js';
import { feedback } from '@/api/payment.js'; import { feedback } from '@/api/payment.js';
import { assembleAddress } from '@/utils/index.js' import { assembleAddress } from '@/utils/index.js'
import Header from '@/components/header.vue'; import Header from '@/components/header.vue';
import { getUserInfo } from '@/api/auth.js';
import { appWxpayFun, zfbPayFun, jumpWayOk, jumpWayError } from '@/utils/payUtils.js' import { appWxpayFun, zfbPayFun, jumpWayOk, jumpWayError } from '@/utils/payUtils.js'
import CryptoJS from 'crypto-js';
export default { export default {
computed: { computed: {
@@ -201,6 +238,10 @@ export default {
}, },
data() { data() {
return { return {
password:'',
payPwd:0,
show:false,
isShow:false,
ids: 0, ids: 0,
orderInfo: { orderInfo: {
// coupon:2,//优惠卷 // coupon:2,//优惠卷
@@ -219,7 +260,11 @@ export default {
isShowBalance: false, isShowBalance: false,
ji: 0, ji: 0,
sed: null, sed: null,
curPay: null curPay: null,
user:null,
tipsShow:false,
content:'您未设置支付密码,请先去设置支付密码',
type:'1'
}; };
}, },
onLoad(option) { onLoad(option) {
@@ -245,6 +290,7 @@ export default {
this.getWayOption(); this.getWayOption();
this.wayShow = payOpen; this.wayShow = payOpen;
} }
this.getUserInfo();
}, },
mounted() { mounted() {
@@ -252,6 +298,58 @@ export default {
methods: { methods: {
getValue, getValue,
assembleAddress, 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() { addAdress() {
const ids = this.ids; const ids = this.ids;
@@ -274,7 +372,6 @@ export default {
} else { } else {
parmas['types'] = '1,2,3'; parmas['types'] = '1,2,3';
} }
console.log('this.ji', parmas)
const result = await getSupportPay(parmas); const result = await getSupportPay(parmas);
if (result && result.bizcode === 100) { if (result && result.bizcode === 100) {
const data = result.data || []; const data = result.data || [];
@@ -406,7 +503,7 @@ export default {
this.$refs.uToastRef.show({ this.$refs.uToastRef.show({
type: 'error', type: 'error',
message: "不能再减拉,不能小于最低购买数量~", message: "不能再减拉,不能小于最低购买数量~",
}); x3 });
} else { } else {
currentQuantity = currentQuantity - 1; currentQuantity = currentQuantity - 1;
currentAmount = currentAmount - data.unitPrice; currentAmount = currentAmount - data.unitPrice;
@@ -495,20 +592,42 @@ export default {
return; 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 = { const params = {
addrId: orderInfo.address.id,// 收货地址ID addrId: this.orderInfo.address.id,// 收货地址ID
//结算的购物车ID,多个以逗号分割,ALL表示全选 //结算的购物车ID,多个以逗号分割,ALL表示全选
payway: way,// 支付方式:1-微信,2-支付宝 payway: this.orderInfo.paymentMethod,// 支付方式:1-微信,2-支付宝
remark: JSON.stringify(this.getRemark()),//备注信息'[{"sid":"店铺ID","rmk":"备注内容"},{"sid":"店铺ID","rmk":"备注内容"}]' remark: JSON.stringify(this.getRemark()),//备注信息'[{"sid":"店铺ID","rmk":"备注内容"},{"sid":"店铺ID","rmk":"备注内容"}]'
} }
let resp = null; let resp = null;
if (this.sed) { 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['goodsId'] = this.sed.id;
params['specsId'] = this.sed.specsId.id; params['specsId'] = this.sed.specsId.id;
params['goodsNum'] = this.orderInfo.shops[0].addrTimes[0].goods[0].num; params['goodsNum'] = this.orderInfo.shops[0].addrTimes[0].goods[0].num;
resp = await settlementOrder(params); resp = await settlementOrder(params);
} else { } else {
params['cartIds'] = this.ids; params['cartIds'] = this.ids;
if(this.orderInfo.paymentMethod == 'balance' || this.orderInfo.paymentMethod == 'redpacket'){
params['password'] = CryptoJS.MD5(this.payPwd).toString();
}
resp = await settle(params); resp = await settle(params);
} }
@@ -604,6 +723,33 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.money{
text-align: center;
font-size: 80rpx;
color: #ff9918;
position: relative;
background-color: #fff;
.close{
position: absolute;
top: 20rpx;
right: 20rpx;
line-height: 28rpx;
font-size: 28rpx;
}
}
.mid-tips{
width:100%;
display: flex;
align-items: center;
justify-content: center;
}
.tips{
color:$u-tips-color;
margin:20rpx 0;
text-align: center;
background-color: #fff;
}
.order_submit_warp { .order_submit_warp {
background-color: $app-bj; background-color: $app-bj;
height: calc(100vh - 200rpx); height: calc(100vh - 200rpx);
@@ -468,17 +468,25 @@ export default {
this.selectSpecification = currentSelectSpecification; this.selectSpecification = currentSelectSpecification;
const oldLength = this.specificationList.length; const oldLength = this.specificationList.length;
const newLength = this.selectSpecification.length; const newLength = this.selectSpecification.length;
console.log('selectSpecificationFun',oldLength,newLength)
// 开始做校验 // 开始做校验
if (oldLength === newLength) { if (oldLength === newLength) {
const newLengthStr = this.selectSpecification.join("♧"); const newLengthStr = this.selectSpecification.join("♧");
const specificationTempl = this.specificationTempl; const specificationTempl = this.specificationTempl;
let selectTempl = {}; let selectTempl = {};
console.log('selectSpecificationFun1',specificationTempl,this.selectSpecification)
specificationTempl.map(item => { specificationTempl.map(item => {
console.log('selectSpecificationFun11',item.combNames,newLengthStr)
if (item.combNames === newLengthStr) { if (item.combNames === newLengthStr) {
selectTempl = item selectTempl = item
return; return;
} }
}); });
console.log('selectSpecificationFun11',selectTempl)
this.selectSpecificationTempl = selectTempl; this.selectSpecificationTempl = selectTempl;
this.orderInfo.inventory = selectTempl.stock;// 库存 this.orderInfo.inventory = selectTempl.stock;// 库存
} }
@@ -505,6 +513,7 @@ export default {
// 加入购入车 // 加入购入车
async addCart(isBy = false) { async addCart(isBy = false) {
const selectTempl = this.selectSpecificationTempl; const selectTempl = this.selectSpecificationTempl;
console.log('aaaaaaaaaaaa',selectTempl)
if (!selectTempl || Object.keys(selectTempl).length === 0) { if (!selectTempl || Object.keys(selectTempl).length === 0) {
uni.showToast({ uni.showToast({
title: '请先选择规格', title: '请先选择规格',
+2 -2
View File
@@ -99,9 +99,9 @@ export default {
methods: { methods: {
init(){ init(){
if(this.type == '1'){ if(this.type == '1'){
this.topText = '修改交易密码'; this.topText = '设置交易密码';
}else if(this.type == '2'){ }else if(this.type == '2'){
this.topText = '修改登录密码'; this.topText = '设置登录密码';
}else if(this.type == '3'){ }else if(this.type == '3'){
this.topText = '找回登录密码'; this.topText = '找回登录密码';
} }