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{