zs 6 months ago
parent
commit
86396e3fc7

+ 4 - 1
pagesMy/activity/detail.vue

@@ -268,11 +268,14 @@
 				signTypeList: []
 			}
 		},
-		onShow: async function(e) {
+		onLoad: async function(e) {
 			const that = this;
 			that.$set(that, `id`, e && e.id || '');
 			that.searchConfig();
 			that.searchToken();
+		},
+		onShow: async function() {
+			const that = this;
 			await that.searchOther();
 			await that.search();
 		},

File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pagesMy/activity/detail.js.map


+ 65 - 45
unpackage/dist/dev/mp-weixin/pagesMy/activity/detail.js

@@ -275,8 +275,8 @@ var _default = {
       signTypeList: []
     };
   },
-  onShow: function () {
-    var _onShow = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(e) {
+  onLoad: function () {
+    var _onLoad = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(e) {
       var that;
       return _regenerator.default.wrap(function _callee$(_context) {
         while (1) {
@@ -286,19 +286,39 @@ var _default = {
               that.$set(that, "id", e && e.id || '');
               that.searchConfig();
               that.searchToken();
-              _context.next = 6;
-              return that.searchOther();
-            case 6:
-              _context.next = 8;
-              return that.search();
-            case 8:
+            case 4:
             case "end":
               return _context.stop();
           }
         }
       }, _callee, this);
     }));
-    function onShow(_x) {
+    function onLoad(_x) {
+      return _onLoad.apply(this, arguments);
+    }
+    return onLoad;
+  }(),
+  onShow: function () {
+    var _onShow = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
+      var that;
+      return _regenerator.default.wrap(function _callee2$(_context2) {
+        while (1) {
+          switch (_context2.prev = _context2.next) {
+            case 0:
+              that = this;
+              _context2.next = 3;
+              return that.searchOther();
+            case 3:
+              _context2.next = 5;
+              return that.search();
+            case 5:
+            case "end":
+              return _context2.stop();
+          }
+        }
+      }, _callee2, this);
+    }));
+    function onShow() {
       return _onShow.apply(this, arguments);
     }
     return onShow;
@@ -325,100 +345,100 @@ var _default = {
     // 查询其他信息
     searchOther: function searchOther() {
       var _this = this;
-      return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
+      return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
         var that, res;
-        return _regenerator.default.wrap(function _callee2$(_context2) {
+        return _regenerator.default.wrap(function _callee3$(_context3) {
           while (1) {
-            switch (_context2.prev = _context2.next) {
+            switch (_context3.prev = _context3.next) {
               case 0:
                 that = _this;
-                _context2.next = 3;
+                _context3.next = 3;
                 return that.$api("/dictData", 'GET', {
                   code: 'matchStatus',
                   is_use: '0'
                 });
               case 3:
-                res = _context2.sent;
+                res = _context3.sent;
                 if (res.errcode == '0') that.$set(that, "statusList", res.data);
                 // 查询证件类型
-                _context2.next = 7;
+                _context3.next = 7;
                 return that.$api("/dictData", 'GET', {
                   code: 'cardType',
                   is_use: '0'
                 });
               case 7:
-                res = _context2.sent;
+                res = _context3.sent;
                 if (res.errcode == '0') that.$set(that, "cTypeList", res.data);
                 // 赛事类型
-                _context2.next = 11;
+                _context3.next = 11;
                 return that.$api("/dictData", 'GET', {
                   code: 'activeType',
                   is_use: '0'
                 });
               case 11:
-                res = _context2.sent;
+                res = _context3.sent;
                 if (res.errcode == '0') that.$set(that, "typeList", res.data);
                 // 报名类型
-                _context2.next = 15;
+                _context3.next = 15;
                 return that.$api("/dictData", 'GET', {
                   code: 'signType',
                   is_use: '0'
                 });
               case 15:
-                res = _context2.sent;
+                res = _context3.sent;
                 if (res.errcode == '0') that.$set(that, "signTypeList", res.data);
               case 17:
               case "end":
-                return _context2.stop();
+                return _context3.stop();
             }
           }
-        }, _callee2);
+        }, _callee3);
       }))();
     },
     // 查询
     search: function search() {
       var _this2 = this;
-      return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
+      return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4() {
         var that, res, arr;
-        return _regenerator.default.wrap(function _callee3$(_context3) {
+        return _regenerator.default.wrap(function _callee4$(_context4) {
           while (1) {
-            switch (_context3.prev = _context3.next) {
+            switch (_context4.prev = _context4.next) {
               case 0:
                 that = _this2;
                 if (!that.id) {
-                  _context3.next = 19;
+                  _context4.next = 19;
                   break;
                 }
-                _context3.next = 4;
+                _context4.next = 4;
                 return that.$api("/sign/".concat(that.id), 'GET', {});
               case 4:
-                res = _context3.sent;
+                res = _context4.sent;
                 if (!(res.errcode == '0')) {
-                  _context3.next = 18;
+                  _context4.next = 18;
                   break;
                 }
                 that.$set(that, "sign", res.data);
                 if (!res.data.match) {
-                  _context3.next = 16;
+                  _context4.next = 16;
                   break;
                 }
-                _context3.next = 10;
+                _context4.next = 10;
                 return that.$api("/match/".concat(res.data.match), 'GET', {});
               case 10:
-                arr = _context3.sent;
+                arr = _context4.sent;
                 if (!(res.errcode == '0')) {
-                  _context3.next = 16;
+                  _context4.next = 16;
                   break;
                 }
                 that.$set(that, "info", arr.data);
                 if (!(arr.data.match_status == '2' || arr.data.match_status == '3')) {
-                  _context3.next = 16;
+                  _context4.next = 16;
                   break;
                 }
-                _context3.next = 16;
+                _context4.next = 16;
                 return that.searchPath();
               case 16:
-                _context3.next = 19;
+                _context4.next = 19;
                 break;
               case 18:
                 uni.showToast({
@@ -426,39 +446,39 @@ var _default = {
                 });
               case 19:
               case "end":
-                return _context3.stop();
+                return _context4.stop();
             }
           }
-        }, _callee3);
+        }, _callee4);
       }))();
     },
     searchPath: function searchPath() {
       var _this3 = this;
-      return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4() {
+      return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5() {
         var that, arr;
-        return _regenerator.default.wrap(function _callee4$(_context4) {
+        return _regenerator.default.wrap(function _callee5$(_context5) {
           while (1) {
-            switch (_context4.prev = _context4.next) {
+            switch (_context5.prev = _context5.next) {
               case 0:
                 that = _this3;
                 that.$set(that.tabs, "menu", [].concat((0, _toConsumableArray2.default)(that.tabs.menu), [{
                   title: '分数信息',
                   active: '2'
                 }]));
-                _context4.next = 4;
+                _context5.next = 4;
                 return that.$api("/score/list", 'GET', {
                   match: that.info.id,
                   sign: that.sign.id
                 });
               case 4:
-                arr = _context4.sent;
+                arr = _context5.sent;
                 if (arr.errcode == '0') that.$set(that, "score", arr.data);
               case 6:
               case "end":
-                return _context4.stop();
+                return _context5.stop();
             }
           }
-        }, _callee4);
+        }, _callee5);
       }))();
     },
     // 选择选项卡