From bbd9c436f23f5fdbe712c4a22d90b457066bdf38 Mon Sep 17 00:00:00 2001
From: k94314517 <8417338+k94314517@user.noreply.gitee.com>
Date: 星期四, 17 七月 2025 19:25:47 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
small-program/unpackage/dist/dev/mp-weixin/pages/mine/mine.js | 87 ++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 84 insertions(+), 3 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 0c3deb8..be436f6 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
@@ -175,14 +175,42 @@
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
var _default = {
- computed: _objectSpread({}, (0, _vuex.mapState)(['navHeight', 'statusbarHeight'])),
+ computed: _objectSpread({}, (0, _vuex.mapState)(['navHeight', 'statusbarHeight', 'userInfo', 'token', 'openid'])),
data: function data() {
return {
- value: 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: {
- jumpTX: function jumpTX() {
+ getUserInfo: function getUserInfo() {
+ var that = this;
+ this.$u.api.getMemberInfo({}).then(function (res) {
+ if (res && res.code === 200) {
+ that.$store.commit('setUserInfo', res.data);
+ that.$isResolve();
+ } else {
+ that.$store.commit('setToken', '');
+ that.$store.commit('setUserInfo', {});
+ that.$isResolve();
+ }
+ });
+ },
+ jumpService: function jumpService(flag) {
uni.navigateTo({
url: '/pages/withdrawal/withdrawal'
});
@@ -209,7 +237,60 @@
url: '/pages/catering-certification/catering-certification'
});
break;
+ case 5:
+ uni.navigateTo({
+ 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