guhongwei 2 年之前
父節點
當前提交
7f8ef6a93c
共有 6 個文件被更改,包括 153 次插入0 次删除
  1. 1 0
      app.json
  2. 80 0
      pages/setting/index.js
  3. 6 0
      pages/setting/index.json
  4. 29 0
      pages/setting/index.less
  5. 14 0
      pages/setting/index.wxml
  6. 23 0
      pages/setting/index.wxss

+ 1 - 0
app.json

@@ -9,6 +9,7 @@
         "pages/my/index",
         "pages/my/userInfo",
         "pages/usermymatch/index",
+        "pages/setting/index",
         "pages/test/index"
     ],
     "usingComponents": {

+ 80 - 0
pages/setting/index.js

@@ -0,0 +1,80 @@
+const app = getApp()
+Page({
+
+    /**
+     * 页面的初始数据
+     */
+    data: {
+        frameStyle: { useTop: true, name: '账号设置', leftArrow: true, useBar: false },
+        btnList: [
+            { title: '资料修改', route: 'basic' },
+            // { title: '意见反馈', route: 'opinion' },
+            { title: '联系我们', route: 'contact' },
+            { title: '解除绑定', route: 'unbind' },
+            // { title: '关于我们', route: 'about' },
+        ]
+    },
+    // 返回
+    back: function () {
+        wx.navigateBack({ delta: 1 })
+    },
+    toCommon: function (e) {
+        const { route } = e.currentTarget.dataset;
+        wx.navigateTo({ url: `/pages/setting/${route}` })
+    },
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad: function (options) {
+        const that = this;
+
+    },
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload: function () {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh: function () {
+
+    },
+
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    onReachBottom: function () {
+
+    },
+
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage: function () {
+
+    }
+})

+ 6 - 0
pages/setting/index.json

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

+ 29 - 0
pages/setting/index.less

@@ -0,0 +1,29 @@
+.main {
+    height: 88vh;
+
+    .one {
+        display: flex;
+        flex-direction: column;
+        justify-content: space-between;
+        width: 96vw;
+
+        .list {
+            display: flex;
+            flex-direction: row;
+            justify-content: space-between;
+            background-color: #ffffff;
+            border-bottom: 1px solid #858585;
+            padding: 2vw;
+
+            .list_1 {
+                text {
+                    font-size: 14px;
+                }
+            }
+
+            .list_2 {
+                color: #858585;
+            }
+        }
+    }
+}

+ 14 - 0
pages/setting/index.wxml

@@ -0,0 +1,14 @@
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back" bind:tabPath="tabPath">
+    <view slot="info" class="container main">
+        <view class="one">
+            <view class="list" wx:for="{{btnList}}" wx:key="item" bindtap="toCommon" data-route="{{item.route}}">
+                <view class="list_1">
+                    <text>{{item.title}}</text>
+                </view>
+                <view class="list_2">
+                    <van-icon name="arrow" />
+                </view>
+            </view>
+        </view>
+    </view>
+</mobile-main>

+ 23 - 0
pages/setting/index.wxss

@@ -0,0 +1,23 @@
+.main {
+  height: 88vh;
+}
+.main .one {
+  display: flex;
+  flex-direction: column;
+  justify-content: space-between;
+  width: 96vw;
+}
+.main .one .list {
+  display: flex;
+  flex-direction: row;
+  justify-content: space-between;
+  background-color: #ffffff;
+  border-bottom: 1px solid #858585;
+  padding: 2vw;
+}
+.main .one .list .list_1 text {
+  font-size: 14px;
+}
+.main .one .list .list_2 {
+  color: #858585;
+}