From f650319d7175f764cd5286c383a72d6e6d2e8a87 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期五, 18 七月 2025 14:53:18 +0800
Subject: [PATCH] 调接口
---
small-program/unpackage/dist/dev/mp-weixin/pages/mine/mine.js | 67 ++++++++++++++++++++++++++++++---
1 files changed, 61 insertions(+), 6 deletions(-)
diff --git a/small-program/unpackage/dist/dev/mp-weixin/pages/mine/mine.js b/small-program/unpackage/dist/dev/mp-weixin/pages/mine/mine.js
index a68194a..1cfa6d0 100644
--- a/small-program/unpackage/dist/dev/mp-weixin/pages/mine/mine.js
+++ b/small-program/unpackage/dist/dev/mp-weixin/pages/mine/mine.js
@@ -103,10 +103,10 @@
try {
components = {
uSwitch: function () {
- return Promise.all(/*! import() | node-modules/uview-ui/components/u-switch/u-switch */[__webpack_require__.e("common/vendor"), __webpack_require__.e("node-modules/uview-ui/components/u-switch/u-switch")]).then(__webpack_require__.bind(null, /*! uview-ui/components/u-switch/u-switch.vue */ 388))
+ return Promise.all(/*! import() | node-modules/uview-ui/components/u-switch/u-switch */[__webpack_require__.e("common/vendor"), __webpack_require__.e("node-modules/uview-ui/components/u-switch/u-switch")]).then(__webpack_require__.bind(null, /*! uview-ui/components/u-switch/u-switch.vue */ 407))
},
uIcon: function () {
- return Promise.all(/*! import() | node-modules/uview-ui/components/u-icon/u-icon */[__webpack_require__.e("common/vendor"), __webpack_require__.e("node-modules/uview-ui/components/u-icon/u-icon")]).then(__webpack_require__.bind(null, /*! uview-ui/components/u-icon/u-icon.vue */ 379))
+ return Promise.all(/*! import() | node-modules/uview-ui/components/u-icon/u-icon */[__webpack_require__.e("common/vendor"), __webpack_require__.e("node-modules/uview-ui/components/u-icon/u-icon")]).then(__webpack_require__.bind(null, /*! uview-ui/components/u-icon/u-icon.vue */ 387))
},
}
} catch (e) {
@@ -178,22 +178,29 @@
computed: _objectSpread({}, (0, _vuex.mapState)(['navHeight', 'statusbarHeight', 'userInfo', 'token', 'openid'])),
data: function data() {
return {
- value: false,
- isLogin: false
+ changing: false,
+ changing1: false,
+ autoReceiveStatus: false,
+ isLogin: false,
+ useIdentity: 0
};
},
onShow: function onShow(options) {
this.isLogin = false;
+ this.autoReceiveStatus = false;
+ this.useIdentity = 0;
if (this.token && this.token != '' && this.userInfo && JSON.stringify(this.userInfo) != '{}') {
this.isLogin = true;
this.getUserInfo();
+ this.autoReceiveStatus = this.userInfo.autoReceiveStatus === 1;
+ this.useIdentity = this.userInfo.useIdentity;
}
},
methods: {
getUserInfo: function getUserInfo() {
var that = this;
this.$u.api.getMemberInfo({}).then(function (res) {
- if (res.code === 200) {
+ if (res && res.code === 200) {
that.$store.commit('setUserInfo', res.data);
that.$isResolve();
} else {
@@ -203,7 +210,7 @@
}
});
},
- jumpTX: function jumpTX() {
+ jumpService: function jumpService(flag) {
uni.navigateTo({
url: '/pages/withdrawal/withdrawal'
});
@@ -235,7 +242,55 @@
url: '/pages/login/login'
});
break;
+ case 6:
+ uni.navigateTo({
+ url: '/pages/withdrawal/withdrawal'
+ });
+ break;
}
+ },
+ logOffDo: function logOffDo() {
+ var that = this;
+ this.$u.api.logOff({}).then(function (res) {
+ //閫�鍑虹櫥褰曟垚鍔�
+ that.isLogin = false;
+ that.$store.commit("empty");
+ });
+ },
+ editUseIdentity: function editUseIdentity() {
+ if (this.changing1) {
+ return;
+ }
+ this.changing1 = true;
+ var that = this;
+ var param = {
+ useIdentity: this.userInfo.useIdentity == 1 ? 0 : 1
+ };
+ that.$u.api.editUseIdentity(param).then(function (res) {
+ console.log(222, res);
+ if (res.code === 200) {
+ that.userInfo.useIdentity = param.useIdentity;
+ }
+ }).finally(function () {
+ that.changing1 = false;
+ });
+ },
+ updateMemberInfo: function updateMemberInfo() {
+ if (this.changing) {
+ return;
+ }
+ this.changing = true;
+ var that = this;
+ var param = {
+ autoReceiveStatus: that.autoReceiveStatus ? 1 : 0
+ };
+ this.$u.api.editMemberInfo(param).then(function (res) {
+ if (res.code === 200) {
+ that.userInfo.autoReceiveStatus = param.autoReceiveStatus;
+ }
+ }).finally(function () {
+ that.changing = false;
+ });
}
}
};
--
Gitblit v1.9.3