From f209bed2c345119e445c961cf2213f7bd72e9fae Mon Sep 17 00:00:00 2001 From: wuhui_zzw <1760308791@qq.com> Date: Mon, 15 Jan 2024 15:11:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=EF=BC=9A=E5=85=91=E6=8D=A2?= =?UTF-8?q?=E7=AB=99=E7=82=B9=E6=94=AF=E6=8C=81=E9=BB=98=E8=AE=A4=E9=80=89?= =?UTF-8?q?=E4=B8=AD=E6=9F=90=E4=B8=AA=E7=AB=99=E7=82=B9=E5=8F=8A=E6=9F=90?= =?UTF-8?q?=E4=BA=BA=E6=93=8D=E4=BD=9C=E5=91=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/users/online_payment/exchange/index.vue | 29 +++++++++++++++---- 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/pages/users/online_payment/exchange/index.vue b/pages/users/online_payment/exchange/index.vue index d930515..d313b22 100644 --- a/pages/users/online_payment/exchange/index.vue +++ b/pages/users/online_payment/exchange/index.vue @@ -6,15 +6,17 @@ 提货点:{{ point_info.title || '请选择提货点' }} - {{ point_info.id > 0 ? '选择' : '切换' }} + + {{ point_info.id > 0 ? '切换' : '选择' }} + 兑换记录 操作员:{{ (staff_info.nickname || staff_info.real_name || staff_info.uid) || '请选择操作员' }} - - {{ staff_info.uid > 0 ? '选择' : '切换' }} + + {{ staff_info.uid > 0 ? '切换' : '选择' }} @@ -105,6 +107,7 @@ import {mapGetters} from "vuex"; import authorize from '@/components/Authorize'; import emptyPage from '@/components/emptyPage.vue'; import spread from "@/libs/spread"; +import util from "../../../../utils/util"; const app = getApp(); export default { @@ -124,10 +127,12 @@ export default { point_search: { address: '', uid: '', + default_point_id: 0, }, // 操作员 - staff_info:{}, + staff_info: {}, staff_list: {}, + default_staff_id: 0, // 提交信息 pay_info: { total_money: 0.00, @@ -142,6 +147,11 @@ export default { ...mapGetters(['isLogin', 'userInfo', 'viewColor']) }, onLoad(options) { + if(options.scene){ + var scene = this.$util.getUrlParams(decodeURIComponent(options.scene)); + this.point_search.default_point_id = scene.point_id || 0; + this.default_staff_id = scene.staff_uid || 0; + } // 判断:是否登录 if (!this.isLogin) { // 未登录 授权登录 @@ -219,8 +229,9 @@ export default { }, // 提货点选择 - 显示弹框 showPointPopup(){ - this.$refs.selectedPoint.open('center'); if(Object.keys(this.point_list).length <= 0) this.getPointList(); + // 不存在默认选中 显示弹框 + if(Number(this.point_search.default_point_id) <= 0) this.$refs.selectedPoint.open('center'); }, // 提货点选择 - 隐藏弹框 pointClosePopup(){ @@ -232,6 +243,9 @@ export default { pointList(this.point_search) .then(res => { _this.point_list = res.data || {}; + if(_this.point_search.default_point_id > 0){ + _this.selectedPoint(_this.point_list[0]); + } }) .catch(err => { this.$util.Tips({ @@ -246,7 +260,10 @@ export default { this.point_info = item; this.pointClosePopup(); // 判断:是否需要选择操作员 - if(Object.values(this.staff_list).length > 1){ + if(Number(this.default_staff_id) > 0){ + // 存在默认 默认选中 + this.staff_info = item.user_list[this.default_staff_id]; + }else if(Object.values(this.staff_list).length > 1){ // 存在多个 需要选中 this.showStaffPopup(); }else{