guhongwei 2 년 전
부모
커밋
dfbc683f25

+ 1 - 1
app.js

@@ -25,7 +25,7 @@ App({
         // 当前设备信息
         client: {},
         // 数据请求接口域名
-        publicUrl: 'http://broadcast.waityou24.cn',
+        publicUrl: 'http://120.48.146.1',
         //图片请求接口域名
         fileUrl: "https://broadcast.waityou24.cn",
     },

+ 4 - 1
app.json

@@ -9,7 +9,10 @@
         "pages/other/agree",
         "pages/home/index",
         "pages/test/index",
-        "pages/logs/logs"
+        "pages/logs/logs",
+        "pages/user/basic",
+        "pages/setting/basic",
+        "pages/setting/contact"
     ],
     "usingComponents": {
         "van-sidebar": "@vant/weapp/sidebar/index",

+ 1 - 1
pages/index/index.wxml

@@ -4,7 +4,7 @@
             <view>系统首页</view>
             <view>
                 <button type="primary" size="mini" bindtap="toCommon" data-route="register/index">去注册</button>
-                <button type="primary" size="mini" bindtap="toCommon" data-route="home/index">系统首页</button>
+                <button type="primary" size="mini" bindtap="toCommon" data-route="school/index">系统首页</button>
                 <!-- <button type="primary" size="mini" bindtap="toCommon" data-route="test/index">组件页面</button> -->
             </view>
         </view>

+ 66 - 0
pages/setting/basic.js

@@ -0,0 +1,66 @@
+// pages/setting/basic.js
+Page({
+
+    /**
+     * 页面的初始数据
+     */
+    data: {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad(options) {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady() {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow() {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide() {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload() {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh() {
+
+    },
+
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    onReachBottom() {
+
+    },
+
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage() {
+
+    }
+})

+ 3 - 0
pages/setting/basic.json

@@ -0,0 +1,3 @@
+{
+    "usingComponents": {}
+}

+ 0 - 0
pages/setting/basic.less


+ 2 - 0
pages/setting/basic.wxml

@@ -0,0 +1,2 @@
+<!--pages/setting/basic.wxml-->
+<text>pages/setting/basic.wxml</text>

+ 1 - 0
pages/setting/basic.wxss

@@ -0,0 +1 @@
+/* pages/setting/basic.wxss */

+ 66 - 0
pages/setting/contact.js

@@ -0,0 +1,66 @@
+// pages/setting/contact.js
+Page({
+
+    /**
+     * 页面的初始数据
+     */
+    data: {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad(options) {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady() {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow() {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide() {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload() {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh() {
+
+    },
+
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    onReachBottom() {
+
+    },
+
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage() {
+
+    }
+})

+ 3 - 0
pages/setting/contact.json

@@ -0,0 +1,3 @@
+{
+    "usingComponents": {}
+}

+ 0 - 0
pages/setting/contact.less


+ 2 - 0
pages/setting/contact.wxml

@@ -0,0 +1,2 @@
+<!--pages/setting/contact.wxml-->
+<text>pages/setting/contact.wxml</text>

+ 1 - 0
pages/setting/contact.wxss

@@ -0,0 +1 @@
+/* pages/setting/contact.wxss */

+ 1 - 1
pages/smy/index.wxml

@@ -13,7 +13,7 @@
                     </view>
                 </view>
                 <view class="r">
-                    <text bindtap="toCommon" data-route="my/userInfo">详细></text>
+                    <text bindtap="toCommon" data-route="user/basic">详细></text>
                 </view>
             </view>
         </view>

+ 73 - 0
pages/user/basic.js

@@ -0,0 +1,73 @@
+const app = getApp()
+Page({
+    data: {
+        frameStyle: { useTop: true, name: '基本信息', leftArrow: true, useBar: false },
+        form: {}
+    },
+    // 跳转菜单
+    back(e) {
+        wx.navigateBack({ delta: 1 })
+    },
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad: function (options) { },
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady: function () { },
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow: function () {
+        const that = this;
+        // 监听用户是否登录
+        that.watchLogin();
+    },
+    // 监听用户是否登录
+    watchLogin: async function () {
+        const that = this;
+        wx.getStorage({
+            key: 'user',
+            success: async res => {
+                that.setData({ form: res.data })
+                // const arr = await app.$get(`/newCourt/api/user/${res.data._id}`);
+                // if (arr.errcode == '0') { that.setData({ form: arr.data }) }
+                // else { wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 }); }
+            },
+            fail: async res => {
+                wx.redirectTo({ url: '/pages/index/index' })
+            }
+        })
+    },
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload: function () {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh: function () {
+
+    },
+
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage: function () {
+
+    }
+})

+ 6 - 0
pages/user/basic.json

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

+ 19 - 0
pages/user/basic.less

@@ -0,0 +1,19 @@
+.main {
+    background-color: var(--mainColor);
+
+    .one {
+        .content {
+            display: flex;
+            flex-direction: row;
+            border-bottom: 1px dashed var(--fcColor);
+            padding: 2vw 0;
+            margin: 0 2vw 2vw 2vw;
+
+            .value {
+                flex-grow: 1;
+                color: var(--font16Size);
+
+            }
+        }
+    }
+}

+ 44 - 0
pages/user/basic.wxml

@@ -0,0 +1,44 @@
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
+    <view slot="info" class="container main">
+        <view class="one">
+            <form>
+                <view class="content">
+                    <view class="label">头像:</view>
+                    <view class="value">
+                        <image src="{{form.icon&&form.icon.length>0?form.icon[0].url:''}}" style="width:66px;height: 66px;"></image>
+                    </view>
+                </view>
+                <view class="content">
+                    <view class="label">姓名:</view>
+                    <view class="value">
+                        <input type="text" name="name" value="{{form.name}}" placeholder="请输入姓名" disabled />
+                    </view>
+                </view>
+                <view class="content">
+                    <view class="label">身份证号:</view>
+                    <view class="value">
+                        <input type="text" name="card" value="{{form.card}}" placeholder="请输入身份证号" disabled />
+                    </view>
+                </view>
+                <view class="content">
+                    <view class="label">性别:</view>
+                    <view class="value">
+                        {{form.gender=='0'?'男':form.gender=='1'?'女':form.gender=='2'?'未知':'暂无'}}
+                    </view>
+                </view>
+                <view class="content">
+                    <view class="label">手机号:</view>
+                    <view class="value">
+                        <input type="text" name="phone" value="{{form.phone}}" placeholder="请输入手机号" disabled />
+                    </view>
+                </view>
+                <view class="content">
+                    <view class="label">用户类型:</view>
+                    <view class="value">
+                        {{form.type=='-1'?'超级管理员':form.type=='0'?'普通用户':form.type=='1'?'管理员':form.type=='2'?'教练用户':'暂无'}}
+                    </view>
+                </view>
+            </form>
+        </view>
+    </view>
+</mobile-main>

+ 14 - 0
pages/user/basic.wxss

@@ -0,0 +1,14 @@
+.main {
+  background-color: var(--mainColor);
+}
+.main .one .content {
+  display: flex;
+  flex-direction: row;
+  border-bottom: 1px dashed var(--fcColor);
+  padding: 2vw 0;
+  margin: 0 2vw 2vw 2vw;
+}
+.main .one .content .value {
+  flex-grow: 1;
+  color: var(--font16Size);
+}