From a997c45ed4675d2eb045090fddb933235f4279cd Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期六, 28 二月 2026 14:21:57 +0800
Subject: [PATCH] 经销商管理

---
 mini-program/unpackage/dist/dev/mp-weixin/common/main.js |  141 ++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 128 insertions(+), 13 deletions(-)

diff --git a/mini-program/unpackage/dist/dev/mp-weixin/common/main.js b/mini-program/unpackage/dist/dev/mp-weixin/common/main.js
index 36ec4e7..e5dbabb 100644
--- a/mini-program/unpackage/dist/dev/mp-weixin/common/main.js
+++ b/mini-program/unpackage/dist/dev/mp-weixin/common/main.js
@@ -28,7 +28,9 @@
 _vue.default.config.productionTip = false;
 _App.default.mpType = 'app';
 _vue.default.prototype.$store = _index.default;
-_vue.default.prototype.$baseUrl = 'http://192.168.1.17:12015/';
+_vue.default.prototype.$baseUrl = 'http://192.168.0.7/dmmall_web_api/';
+// Vue.prototype.$baseUrl = 'https://test.doumee.cn/dmmall_web_api/'
+
 _vue.default.prototype.$onLaunched = new Promise(function (resolve) {
   _vue.default.prototype.$isResolve = resolve;
 });
@@ -132,12 +134,13 @@
 var _default = {
   computed: _objectSpread({}, (0, _vuex.mapState)(['userInfo', 'token'])),
   onLaunch: function () {
-    var _onLaunch = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
+    var _onLaunch = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(options) {
       var that, res;
       return _regenerator.default.wrap(function _callee2$(_context2) {
         while (1) {
           switch (_context2.prev = _context2.next) {
             case 0:
+              // this.dealRecShopUserBiz(options) 
               // 鐧诲綍
               that = this;
               if (this.token) {
@@ -197,7 +200,7 @@
                       }
                     }, _callee);
                   }));
-                  function success(_x) {
+                  function success(_x2) {
                     return _success.apply(this, arguments);
                   }
                   return success;
@@ -229,27 +232,138 @@
         }
       }, _callee2, this);
     }));
-    function onLaunch() {
+    function onLaunch(_x) {
       return _onLaunch.apply(this, arguments);
     }
     return onLaunch;
   }(),
-  onShow: function onShow() {
-    console.log('App Show');
-  },
+  onShow: function () {
+    var _onShow = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(options) {
+      return _regenerator.default.wrap(function _callee3$(_context3) {
+        while (1) {
+          switch (_context3.prev = _context3.next) {
+            case 0:
+              this.dealRecShopUserBiz(options);
+              this.getBackgroundImg();
+            case 2:
+            case "end":
+              return _context3.stop();
+          }
+        }
+      }, _callee3, this);
+    }));
+    function onShow(_x3) {
+      return _onShow.apply(this, arguments);
+    }
+    return onShow;
+  }(),
   onHide: function onHide() {
     console.log('App Hide');
   },
   methods: {
-    checkLocationAuth: function checkLocationAuth() {
+    getBackgroundImg: function getBackgroundImg() {
+      this.$u.api.getPlatformAboutUs({}).then(function (res) {
+        if (res.code === 200) {
+          var obj = {
+            shopIntegralBg: res.data.shopIntegralBg,
+            userInviteBg: res.data.userInviteBg,
+            userShareBg: res.data.userShareBg,
+            centerInviteBg: res.data.centerInviteBg
+          };
+          uni.setStorageSync('backgroundImage', obj);
+        }
+      });
+    },
+    dealRecShopUserBiz: function dealRecShopUserBiz(options) {
       var _this = this;
+      return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4() {
+        var s, shopId, e, ts, res;
+        return _regenerator.default.wrap(function _callee4$(_context4) {
+          while (1) {
+            switch (_context4.prev = _context4.next) {
+              case 0:
+                if (!(options.query && options.query.userId)) {
+                  _context4.next = 4;
+                  break;
+                }
+                if (!(!_this.userInfo || !_this.userInfo.id)) {
+                  _context4.next = 4;
+                  break;
+                }
+                _context4.next = 4;
+                return _this.$store.commit('setRecUserId', options.query.userId);
+              case 4:
+                if (!(options.query && options.query.scene && options.query.scene.length)) {
+                  _context4.next = 32;
+                  break;
+                }
+                if (!(options.query.scene.indexOf("sid_") >= 0)) {
+                  _context4.next = 32;
+                  break;
+                }
+                s = options.query.scene.indexOf("sid_") + 4;
+                shopId = '';
+                e = options.query.scene.length;
+                ts = options.query.scene.slice(s, e);
+                e = ts.length;
+                if (ts.indexOf("&") > 0) {
+                  e = ts.indexOf("&");
+                }
+                if (e > 0) {
+                  shopId = ts.slice(0, e);
+                }
+                if (!shopId) {
+                  _context4.next = 32;
+                  break;
+                }
+                if (!(_this.userInfo && _this.userInfo.id)) {
+                  _context4.next = 30;
+                  break;
+                }
+                _context4.prev = 15;
+                _context4.next = 18;
+                return _this.$u.api.bindShopInfo({
+                  code: code
+                });
+              case 18:
+                res = _context4.sent;
+                if (!(res.code != 200)) {
+                  _context4.next = 22;
+                  break;
+                }
+                _context4.next = 22;
+                return _this.$store.commit('setRecShopId', shopId);
+              case 22:
+                _context4.next = 28;
+                break;
+              case 24:
+                _context4.prev = 24;
+                _context4.t0 = _context4["catch"](15);
+                _context4.next = 28;
+                return _this.$store.commit('setRecShopId', shopId);
+              case 28:
+                _context4.next = 32;
+                break;
+              case 30:
+                _context4.next = 32;
+                return _this.$store.commit('setRecShopId', shopId);
+              case 32:
+              case "end":
+                return _context4.stop();
+            }
+          }
+        }, _callee4, null, [[15, 24]]);
+      }))();
+    },
+    checkLocationAuth: function checkLocationAuth() {
+      var _this2 = this;
       uni.getSetting({
         success: function success(res) {
           if (!res.authSetting['scope.userLocation']) {
             uni.authorize({
               scope: 'scope.userLocation',
               success: function success() {
-                _this.positioning();
+                _this2.positioning();
               },
               fail: function fail() {
                 uni.showModal({
@@ -258,16 +372,16 @@
                   confirmText: '鍘昏缃�',
                   success: function success(res) {
                     if (res.confirm) {
-                      _this.goToAppSetting();
+                      _this2.goToAppSetting();
                     } else {
-                      _this.$isResolve();
+                      _this2.$isResolve();
                     }
                   }
                 });
               }
             });
           } else {
-            _this.positioning();
+            _this2.positioning();
           }
         }
       });
@@ -298,11 +412,12 @@
           var qqmapsdk = new QQMapWX({
             key: 'HEIBZ-QJLLM-SZ36X-6ZBHI-S6Y2J-S6FND'
           });
+          console.log(locParam);
           qqmapsdk.reverseGeocoder({
             locParam: locParam,
             success: function success(res) {
               console.log(res, '==================鑾峰彇鍦板潃');
-              that.$store.commit('setPosition', res);
+              that.$store.commit('setPosition', res.result);
               that.$isResolve();
             },
             fail: function fail(err) {

--
Gitblit v1.9.3