tanyanfei 2 tahun lalu
induk
melakukan
2803e990cd
5 mengubah file dengan 94 tambahan dan 76 penghapusan
  1. 13 9
      pages/rank/rank.js
  2. 10 1
      pages/user/user.wxml
  3. 10 5
      pages/user/user.wxss
  4. 58 58
      project.config.json
  5. 3 3
      utils/api.js

+ 13 - 9
pages/rank/rank.js

@@ -23,11 +23,7 @@ Page({
     // this.setData({
     //   date: y + '-' + m + '-' + d
     // })
-    $api.getsignup().then(res=>{
-        this.setData({
-            info:res.data.data
-        })
-    })
+    
     $api.getMatchList().then(res=>{
       let l = res.data.data.length - 1;
       this.setData({
@@ -91,14 +87,22 @@ Page({
    * 生命周期函数--监听页面显示
    */
   onShow: function () {
- 
+    $api.getsignup().then(res => {
+      this.setData({
+        info: res.data.data
+      })
+    })
     wx.hideNavigationBarLoading()
+    
     if (!this.data.datas.groups){
-      $api.getDate().then(res => {
+      $api.getMatchList().then(res => {
+        let l = res.data.data.length - 1;
         this.setData({
-          date: res.data.data
+          match: res.data.data,
+          index: l,
+          match_id: res.data.data[l].id
         })
-        this.getData()
+        this.getDate()
       })
     }else{
       wx.showNavigationBarLoading()

+ 10 - 1
pages/user/user.wxml

@@ -65,5 +65,14 @@
   
 </view>
 
-<navigator url="../login/user" class="not_login" wx:else>去登录</navigator>
 
+
+<view class="no_login" wx:else>
+  <view class="title">欢迎来到湖南顽主杯实盘大赛</view>
+    <view class='avatar'>
+            <image src="../../images/logo.png"></image>
+    </view>
+  <navigator url="../login/user"><image style="width: 24px;" mode="widthFix" src="../../images/bs.png"></image>选手报名</navigator>
+  <navigator style="background: none;color:#D94B24;" url="../login/user"><image style="width: 24px;" mode="widthFix" src="../../images/yk.png"></image>游客报名</navigator>
+  <navigator style="background: none;color:#D94B24;" url="../login/user"><image style="width: 18px;" mode="widthFix" src="../../images/zx.png"></image>顽主咨询</navigator>
+</view>

+ 10 - 5
pages/user/user.wxss

@@ -226,18 +226,23 @@ page{
 
 
 
-.not_login{
+.no_login navigator{
   background: #D94B24;
   border: 1px solid #D94B24;
   color: #fff;
-  width: 60%;
-  margin: 50% auto;
+  width: 100%;
+  margin-top: 48rpx;
   height: 88rpx;
   line-height: 88rpx;
   padding: 0;
   font-size: 32rpx;
   border-radius: 8rpx;
   position: relative;
-  display: block;
-  text-align: center;
+}
+.no_login navigator image{
+  position: absolute;
+  top: 0;
+  bottom: 0;
+  margin: auto;
+  left: 30%;
 }

+ 58 - 58
project.config.json

@@ -1,60 +1,60 @@
 {
-  "description": "项目配置文件,详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
-  "packOptions": {
-    "ignore": [],
-    "include": []
-  },
-  "setting": {
-    "urlCheck": true,
-    "es6": true,
-    "enhance": true,
-    "postcss": true,
-    "preloadBackgroundData": false,
-    "minified": true,
-    "newFeature": true,
-    "coverView": true,
-    "nodeModules": false,
-    "autoAudits": false,
-    "showShadowRootInWxmlPanel": true,
-    "scopeDataCheck": false,
-    "uglifyFileName": false,
-    "checkInvalidKey": true,
-    "checkSiteMap": true,
-    "uploadWithSourceMap": true,
-    "babelSetting": {
-      "ignore": [],
-      "disablePlugins": [],
-      "outputPath": ""
-    },
-    "useCompilerModule": false,
-    "userConfirmedUseCompilerModuleSwitch": false,
-    "compileHotReLoad": false,
-    "lazyloadPlaceholderEnable": false,
-    "useMultiFrameRuntime": true,
-    "useApiHook": true,
-    "useApiHostProcess": true,
-    "enableEngineNative": false,
-    "useIsolateContext": false,
-    "userConfirmedBundleSwitch": false,
-    "packNpmManually": false,
-    "packNpmRelationList": [],
-    "minifyWXSS": true,
-    "disableUseStrict": false,
-    "minifyWXML": true,
-    "showES6CompileOption": false,
-    "useCompilerPlugins": false,
-    "useStaticServer": true,
-    "ignoreUploadUnusedFiles": true
-  },
-  "compileType": "miniprogram",
-  "libVersion": "2.15.0",
-  "appid": "wxb299e10e65157301",
-  "projectname": "newwzb_xcx",
-  "simulatorType": "wechat",
-  "simulatorPluginLibVersion": {},
-  "editorSetting": {
-    "tabIndent": "insertSpaces",
-    "tabSize": 2
-  },
-  "condition": {}
+	"description": "项目配置文件,详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
+	"packOptions": {
+		"ignore": [],
+		"include": []
+	},
+	"setting": {
+		"urlCheck": true,
+		"es6": true,
+		"enhance": true,
+		"postcss": true,
+		"preloadBackgroundData": false,
+		"minified": true,
+		"newFeature": true,
+		"coverView": true,
+		"nodeModules": false,
+		"autoAudits": false,
+		"showShadowRootInWxmlPanel": true,
+		"scopeDataCheck": false,
+		"uglifyFileName": false,
+		"checkInvalidKey": true,
+		"checkSiteMap": true,
+		"uploadWithSourceMap": true,
+		"babelSetting": {
+			"ignore": [],
+			"disablePlugins": [],
+			"outputPath": ""
+		},
+		"useCompilerModule": false,
+		"userConfirmedUseCompilerModuleSwitch": false,
+		"compileHotReLoad": false,
+		"lazyloadPlaceholderEnable": false,
+		"useMultiFrameRuntime": true,
+		"useApiHook": true,
+		"useApiHostProcess": true,
+		"enableEngineNative": false,
+		"useIsolateContext": false,
+		"userConfirmedBundleSwitch": false,
+		"packNpmManually": false,
+		"packNpmRelationList": [],
+		"minifyWXSS": true,
+		"disableUseStrict": false,
+		"minifyWXML": true,
+		"showES6CompileOption": false,
+		"useCompilerPlugins": false,
+		"useStaticServer": true,
+		"ignoreUploadUnusedFiles": true
+	},
+	"compileType": "miniprogram",
+	"libVersion": "2.15.0",
+	"appid": "wxb299e10e65157301",
+	"projectname": "newwzb_xcx",
+	"simulatorType": "wechat",
+	"simulatorPluginLibVersion": {},
+	"editorSetting": {
+		"tabIndent": "insertSpaces",
+		"tabSize": 2
+	},
+	"condition": {}
 }

+ 3 - 3
utils/api.js

@@ -36,9 +36,9 @@ function request(method, url, data) {
             } else if (res.data.code == 403) {
               //未登录
               reject(403)
-              if(url.indexOf('/player/record')>=0){
-                wx.navigateTo({
-                  url: '../login/user',
+              if (url.indexOf('authinfo')>=0){
+                wx.switchTab({
+                  url: '../user/user',
                 })
               }
             }else{