From 6b96f204e4083d32996c2943a25e36c15d668bd1 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期四, 17 七月 2025 15:33:20 +0800
Subject: [PATCH] 前端
---
small-program/unpackage/dist/dev/mp-weixin/pages/mine/mine.js | 111 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 108 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 0578382..59e5b03 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,17 +175,122 @@
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'
});
+ },
+ jump: function jump(type) {
+ switch (type) {
+ case 1:
+ uni.navigateTo({
+ url: '/pages/set-up/set-up'
+ });
+ break;
+ case 2:
+ uni.navigateTo({
+ url: '/pages/employment-certification/employment-certification'
+ });
+ break;
+ case 3:
+ uni.navigateTo({
+ url: '/pages/freight-certification/freight-certification'
+ });
+ break;
+ case 4:
+ uni.navigateTo({
+ 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