Browse Source

Merge branch 'master' of http://git.cc-lotus.info/ball-court/court-badminton

zs 2 years ago
parent
commit
24ad429611

+ 0 - 1
app.json

@@ -1,7 +1,6 @@
 {
     "pages": [
         "pages/index/index",
-        "pages/login/index",
         "pages/register/index",
         "pages/home/index",
         "pages/news/index",

+ 1 - 1
commpents/form/index.wxml

@@ -18,5 +18,5 @@
 </van-cell-group>
 
 <view style="padding:10px">
-    <button style="width:100%" disabled="{{isSubmit}}" bind:tap="toSubmit">注册</button>
+    <button type="primary" style="width:100%" disabled="{{isSubmit}}" bind:tap="toSubmit">注册</button>
 </view>

+ 1 - 2
pages/index/index.js

@@ -17,10 +17,9 @@ Page({
     wx.getStorage({
       key: 'user',
       success: async (res) => {
-        // if (res.data) wx.redirectTo({ url: '/pages/home/index' })
+        if (res.data) wx.redirectTo({ url: '/pages/home/index' })
       },
       fail: async (res) => {
-        wx.redirectTo({ url: '/pages/home/index' });
         wx.login({
           success: async (arr) => {
             if(app.globalData?.wxInfo?.openid) {

+ 0 - 65
pages/login/index.js

@@ -1,65 +0,0 @@
-const app = getApp()
-Page({
-    data: {
-        frameStyle: { useTop: true, name: '登录', leftArrow: false, useBar: false },
-    },
-    // 去注册
-    toRegister: function () {
-        wx.navigateTo({ url: '/pages/register/index' })
-    },
-    /**
-     * 生命周期函数--监听页面加载
-     */
-    onLoad: function (options) {
-        const that = this;
-
-    },
-    /**
-     * 生命周期函数--监听页面初次渲染完成
-     */
-    onReady: function () {
-
-    },
-
-    /**
-     * 生命周期函数--监听页面显示
-     */
-    onShow: function () {
-
-    },
-
-    /**
-     * 生命周期函数--监听页面隐藏
-     */
-    onHide: function () {
-
-    },
-
-    /**
-     * 生命周期函数--监听页面卸载
-     */
-    onUnload: function () {
-
-    },
-
-    /**
-     * 页面相关事件处理函数--监听用户下拉动作
-     */
-    onPullDownRefresh: function () {
-
-    },
-
-    /**
-     * 页面上拉触底事件的处理函数
-     */
-    onReachBottom: function () {
-
-    },
-
-    /**
-     * 用户点击右上角分享
-     */
-    onShareAppMessage: function () {
-
-    }
-})

+ 0 - 6
pages/login/index.json

@@ -1,6 +0,0 @@
-{
-  "component": true,
-  "usingComponents": {
-    "mobile-main": "/commpents/mobile-frame/index"
-  }
-}

+ 0 - 4
pages/login/index.less

@@ -1,4 +0,0 @@
-.main {
-    height: 80.8vh;
-    background-color: #ff0000;
-}

+ 0 - 5
pages/login/index.wxml

@@ -1,5 +0,0 @@
-<mobile-main frameStyle="{{frameStyle}}" bind:back="back" bind:tabPath="tabPath">
-    <view slot="info" class="container main">
-        登录
-    </view>
-</mobile-main>

+ 0 - 4
pages/login/index.wxss

@@ -1,4 +0,0 @@
-.main {
-  height: 80.8vh;
-  background-color: #ff0000;
-}

+ 2 - 8
pages/register/index.js

@@ -23,10 +23,7 @@ Page({
         if (!data) return;
         const wxInfo = app.globalData.wxInfo
         if (!wxInfo.openid) {
-            wx.showToast({
-                title: '缺少微信关联',
-                icon: 'error'
-            })
+            wx.showToast({ title: '缺少微信关联', icon: 'error' })
             return
         }
         data.openid = wxInfo.openid;
@@ -40,10 +37,7 @@ Page({
             })
         } else {
             const { errmsg = '注册失败' } = res;
-            wx.showModal({
-                title: errmsg,
-                showCancel: false
-            })
+            wx.showModal({ title: errmsg, showCancel: false })
         }
     },
 

+ 1 - 2
pages/register/index.less

@@ -1,4 +1,3 @@
 .main {
-    height: 80.8vh;
-    background-color: #ff0000;
+    height: 88vh;
 }

+ 0 - 2
pages/register/index.wxml

@@ -4,6 +4,4 @@
             <f-form fields="{{fields}}" bind:submit="toSubmit"></f-form>
         </view>
     </view>
-
-
 </mobile-main>

+ 1 - 2
pages/register/index.wxss

@@ -1,4 +1,3 @@
 .main {
-  height: 80.8vh;
-  background-color: #ff0000;
+  height: 88vh;
 }

+ 2 - 0
utils/dict.js

@@ -24,4 +24,6 @@ export const myBtn = [
 export const gender = [
     { label: '男', value: '男' },
     { label: '女', value: '女' },
+    { label: '未知', value: '未知' },
+
 ]

+ 1 - 1
utils/httpUtil.js

@@ -1,4 +1,4 @@
-let serverUrl = "http://127.0.0.1:15000";
+let serverUrl = "https://broadcast.waityou24.cn";//http://127.0.0.1:15000
 let wechatUrl = 'https://broadcast.waityou24.cn';
 
 const getDomain = (uri) => {