From 76094817559fd46913ed35019c2b151c043a4580 Mon Sep 17 00:00:00 2001 From: youmengting <2080639302@qq.com> Date: Fri, 3 Nov 2023 17:02:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug:1=EF=BC=9A=E6=B4=BB?= =?UTF-8?q?=E5=8A=A8=E9=87=91-=E4=BA=A4=E6=98=93=E8=AE=B0=E5=BD=95-?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=A4=E6=98=93=E5=AF=B9=E8=B1=A1=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E3=80=822=EF=BC=9A=E6=B4=BB=E5=8A=A8=E9=87=91-?= =?UTF-8?q?=E6=B4=BB=E5=8A=A8=E5=88=97=E8=A1=A8-=E6=B7=BB=E5=8A=A0-?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BC=98=E6=83=A0=E6=8A=98=E6=89=A3=E9=87=91?= =?UTF-8?q?=E9=A2=9D=E3=80=823=EF=BC=9A=E6=B4=BB=E5=8A=A8=E9=87=91?= =?UTF-8?q?=E5=85=85=E5=80=BC=E5=A2=9E=E5=8A=A0=E6=8F=90=E7=A4=BA=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.vue | 11 +++++--- .../activity_Funds_transaction_records.vue | 5 ++-- pages/index/activity_add/activity_add.vue | 26 ++++++++++++++++--- .../recharge_balance/recharge_balance.vue | 21 +++++++++++++-- pages/tabBar/home/home.vue | 1 + pages/welcome/welcome.vue | 5 ++-- 6 files changed, 56 insertions(+), 13 deletions(-) diff --git a/App.vue b/App.vue index de77746..a778c6e 100644 --- a/App.vue +++ b/App.vue @@ -39,7 +39,7 @@ storeAddress: '' }, onLaunch: function() { - let that = this; + /* let that = this; uni.getStorage({ key: 'payuser', success: (res) => { @@ -52,9 +52,14 @@ }) } - }); + }); */ + }, + onShow: function() { + this.globalData.Dictionaries =uni.getStorageSync("Dictionaries")|| ''; + this.globalData.userInfo = uni.getStorageSync("payuser") || ''; + this.globalData.token = uni.getStorageSync("paytoken") || ''; + this.globalData.openId = uni.getStorageSync("openId") || ''; }, - onShow: function() {}, onHide: function() {} } diff --git a/pages/index/activity_Funds_transaction_records/activity_Funds_transaction_records.vue b/pages/index/activity_Funds_transaction_records/activity_Funds_transaction_records.vue index 1e8e23a..40c5194 100644 --- a/pages/index/activity_Funds_transaction_records/activity_Funds_transaction_records.vue +++ b/pages/index/activity_Funds_transaction_records/activity_Funds_transaction_records.vue @@ -20,8 +20,9 @@ 交易对象类型: 充值 - 活动金 - 活动 + 返利金 + 活动金额充值 + 活动金额回收 diff --git a/pages/index/activity_add/activity_add.vue b/pages/index/activity_add/activity_add.vue index 536984d..e6d7f85 100644 --- a/pages/index/activity_add/activity_add.vue +++ b/pages/index/activity_add/activity_add.vue @@ -25,9 +25,9 @@ - 优惠金额 - + 优惠金额 + {{price}} @@ -126,6 +126,12 @@ //结束时间转化 endDate() { return this.getDate('end'); + }, + placeholderTip(){ + if(this.preferentialType==3){ + return "折扣比例(10~99),例98折:98" + } + return '请输入优惠金额' } }, methods: { @@ -224,7 +230,7 @@ }); return; } - if (!this.price) { + if (!this.price){ uni.showToast({ title: '请输入优惠金额', icon: "none", @@ -232,6 +238,18 @@ }); return; } + if(this.preferentialType==3){ + let reg =/^[1-9][0-9]$/; //10-99最低打一折 + if(!reg.test(this.price)){ + this.price=""; + uni.showToast({ + title: '请输入正确的折扣比例,例如99折输入:99,打七折输入:70', + icon: "none", + duration: 2000 + }); + return + } + } if (!this.end_date) { uni.showToast({ title: '请选择结束时间', diff --git a/pages/index/recharge_balance/recharge_balance.vue b/pages/index/recharge_balance/recharge_balance.vue index d2454d2..5d20d66 100644 --- a/pages/index/recharge_balance/recharge_balance.vue +++ b/pages/index/recharge_balance/recharge_balance.vue @@ -103,6 +103,23 @@ }); return; } + + let _this = this; + uni.showModal({ + title: '提示', + content: `确定充值${this.inputAmount}元吗?`, + success: function(res) { + if (res.confirm) { + _this.createrOrder(); + } else if (res.cancel) { + + // console.log('用户点击取消'); + } + } + }); + + }, + createrOrder(){ uni.showLoading({ title: '正在提交订单...' }) @@ -114,7 +131,7 @@ "tradePrice": this.inputAmount, "openId": app.globalData.openId } - + rebateCreate(goods).then(res => { uni.hideLoading(); if (res.return_code == '000000') { @@ -128,7 +145,7 @@ } }) } - + if (this.type == 2) { let data = { "activityNo": this.activityNo, diff --git a/pages/tabBar/home/home.vue b/pages/tabBar/home/home.vue index 63e097e..db39bcb 100644 --- a/pages/tabBar/home/home.vue +++ b/pages/tabBar/home/home.vue @@ -205,6 +205,7 @@ getDictionaries().then(res => { if (res.return_code == '000000') { app.globalData.Dictionaries = res.return_data; + uni.setStorageSync("Dictionaries",res.return_data) } }) }, diff --git a/pages/welcome/welcome.vue b/pages/welcome/welcome.vue index 9c93c9d..d2ab096 100644 --- a/pages/welcome/welcome.vue +++ b/pages/welcome/welcome.vue @@ -50,10 +50,11 @@ getAccessToken(params).then(res => { if (res.return_code == '000000' && res.return_data.openid) { app.globalData.openId = res.return_data.openid; - uni.setStorage({ + /* uni.setStorage({ key: "openId", data: res.return_data.openid - }) + }) */ + uni.setStorageSync("openId",res.return_data.openid); if (this.userInfo) { uni.reLaunch({ url: '../tabBar/home/home'