Quellcode durchsuchen

feat: add my pages & set

wangyuan vor 2 Jahren
Ursprung
Commit
a8b47d0436
9 geänderte Dateien mit 285 neuen und 9 gelöschten Zeilen
  1. 3 2
      app.json
  2. 6 4
      pages/my/my.js
  3. 1 1
      pages/my/my.json
  4. 69 1
      pages/my/my.wxml
  5. 76 1
      pages/my/my.wxss
  6. 72 0
      pages/set/set.js
  7. 3 0
      pages/set/set.json
  8. 20 0
      pages/set/set.wxml
  9. 35 0
      pages/set/set.wxss

+ 3 - 2
app.json

@@ -1,5 +1,5 @@
 {
-  "entryPagePath": "pages/permisission/permission",
+  "entryPagePath": "pages/my/my",
   "pages": [
     "pages/permisission/permission",
     "pages/index/index",
@@ -13,7 +13,8 @@
     "pages/address/address",
     "pages/tabBar/tabBar",
     "pages/addressCheck/addressCheck",
-    "pages/addressAdd/addressAdd"
+    "pages/addressAdd/addressAdd",
+    "pages/set/set"
   ],
   "usingComponents": {
     "van-icon": "@vant/weapp/icon/index",

+ 6 - 4
pages/my/my.js

@@ -51,16 +51,18 @@ Page({
   },
 
   /**
-   * 页面上拉触底事件的处理函数
+   * 点击设置
    */
-  onReachBottom() {
-
+  handleSet() {
+    wx.navigateTo({
+      url: '/pages/set/set'
+    })
   },
 
   /**
    * 用户点击地址
    */
-  handleShowAddress() {
+  handleMyAddress() {
     wx.navigateTo({
       url: '/pages/address/address',
     })

+ 1 - 1
pages/my/my.json

@@ -1,3 +1,3 @@
 {
-  "usingComponents": {}
+  "navigationBarTitleText": "我的"
 }

+ 69 - 1
pages/my/my.wxml

@@ -1,4 +1,72 @@
 <!--pages/my/my.wxml-->
 <view class="my-content">
-  <view class="itt-btn" bindtap="handleShowAddress">我的地址</view> 
+  <view class="top my-info ittflex">
+    <view class="main-info ittflex-jcb">
+      <view class="left-con ittflex-jcs">
+        <view class="avatar"></view>
+        <text class="username">范一岚</text>
+      </view>
+      <view class="right-con">
+        <view class="check-count">
+          <text class="noraltext">检测机会:</text>
+          <text class="boldtext">5</text>
+          <text class="noraltext">次</text>
+        </view>
+        <view class="appoin-btn ittflex">立即预约</view>
+      </view>
+    </view>
+  </view>
+  <view class="actions">
+    <view class="act-item-col ittflex-jca">
+      <view class="act-item address" data-index="0" bindtap="handleMyAddress">
+        <view class="icon">
+          <image class="image-icon" src="./../../imaes/dizhi@2x.png"></image>
+        </view>
+        <view class="desc">我的地址</view>
+      </view>
+      <view class="act-item dangan" data-index="1">
+        <view class="icon">
+          <image class="image-icon" src="./../../imaes/dangan@2x.png"></image>
+        </view>
+        <view class="desc">我的档案</view>
+      </view>
+      <view class="act-item yuyue" data-index="2">
+        <view class="icon">
+          <image class="image-icon" src="./../../imaes/yuyue@2x.png"></image>
+        </view>
+        <view class="desc">我的预约</view>
+      </view>
+    </view>
+    <view class="act-item-col ittflex-jca">
+      <view class="act-item chongzhi" data-index="3">
+        <view class="icon">
+          <image class="image-icon" src="./../../imaes/jilu@2x.png"></image>
+        </view>
+        <view class="desc">充值记录</view>
+      </view>
+      <view class="act-item baogao" data-index="4">
+        <view class="icon">
+          <image class="image-icon" src="./../../imaes/baogao2@2x.png"></image>
+        </view>
+        <view class="desc">我的报告</view>
+      </view>
+      <view class="act-item" data-index="5">
+        <view class="icon">
+          <image class="image-icon" src="./../../imaes/quyu@2x.png"></image>
+        </view>
+        <view class="desc">开通区域</view>
+      </view>
+    </view>
+    <view class="act-item-col ittflex-jca" data-index="6" bindtap="handleSet">
+      <view class="act-item">
+        <view class="icon">
+          <image class="image-icon" src="./../../imaes/shezhi@2x.png"></image>
+        </view>
+        <view class="desc">设置</view>
+      </view>
+      <view class="act-item"></view>
+      <view class="act-item"></view>
+    </view>
+  </view>
+  <!-- <view class="itt-btn" bindtap="handleShowAddress">我的地址</view>  -->
 </view>

+ 76 - 1
pages/my/my.wxss

@@ -1 +1,76 @@
-/* pages/my/my.wxss */
+/* pages/my/my.wxss */
+.my-content {
+  width: 100%;
+  height: 100%;
+  background-color: #f7f7f7;
+}
+.my-info {
+  width: 100%;
+  height: 202rpx;
+  background-color: var(--maincolor);
+}
+.main-info {
+  width: 690rpx;
+  min-height: 120rpx;
+  margin: 0 auto;
+}
+.avatar {
+  width: 120rpx;
+  height: 120rpx;
+  border-radius: 50%;
+  background-color: #999;
+  margin-right: 20rpx;
+}
+.username {
+  font-size: 30rpx;
+  font-weight: bold;
+  color: #FFFFFF;
+}
+.check-count {
+  margin-bottom: 10rpx;
+}
+.noraltext {
+  font-size: 26rpx;
+  font-weight: 400;
+  color: #FFFFFF;
+}
+.boldtext {
+  font-size: 48rpx;
+  font-weight: bold;
+  color: #FFFFFF;
+}
+.appoin-btn {
+  width: 164rpx;
+  height: 48rpx;
+  background: #FFFFFF;
+  border-radius: 24rpx;
+  font-size: 26rpx;
+  font-weight: 400;
+  color: var(--maincolor);
+}
+.act-item-col {
+  margin-top: 40rpx;
+}
+.act-item {
+  width: 104rpx;
+  height: 126rpx;
+}
+.icon {
+  width: 80rpx;
+  height: 80rpx;
+  margin: 0 auto;
+  display: flex;
+  justify-content: center;
+  align-items:  center;
+}
+.image-icon {
+  width: 68rpx;
+  height: 68rpx;
+}
+.desc {
+  font-size: 26rpx;
+  font-weight: 400;
+  color: #333333;
+  margin-top: 10rpx;
+  text-align: center;
+}

+ 72 - 0
pages/set/set.js

@@ -0,0 +1,72 @@
+// pages/set/set.js
+import Dialog from '../../miniprogram_npm/@vant/weapp/dialog/dialog';
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    bindPhone: '16621068478'
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+    console.log('shoe my')
+  },
+
+  /**
+   * 联系我们
+   */
+  handleLinkus() {
+    console.log('linkus');
+    Dialog.alert({
+      message: '感谢您选择ITT,如你有疑问,欢迎您拨打打电话:400-,我们的客服人员在早上9点到晚上18点都会在线为您服务'
+    }).then(() => {
+      // on close
+    });
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  }
+})

+ 3 - 0
pages/set/set.json

@@ -0,0 +1,3 @@
+{
+  "navigationBarTitleText": "设置"
+}

+ 20 - 0
pages/set/set.wxml

@@ -0,0 +1,20 @@
+<!--pages/set/set.wxml-->
+<view class="set-content">
+  <view class="set-item col-a ittflex-jcb">
+    <view class="label">已绑定手机号</view>
+    <view class="value bindphone">{{bindPhone}}</view>
+  </view>
+  <view class="set-item col-b ittflex-jcb userprotal">
+    <view class="label">用户协议</view>
+    <van-icon style="margin-right: 30rpx;" name="arrow" color="#999"/>
+  </view>
+  <view class="set-item col-b ittflex-jcb aboutus">
+    <view class="label">关于我们</view>
+    <van-icon style="margin-right: 30rpx;" name="arrow" color="#999"/>
+  </view>
+  <view class="set-item col-b ittflex-jcb linkus" bindtap="handleLinkus">
+    <view class="label">联系我们</view>
+    <van-icon style="margin-right: 30rpx;" name="arrow" color="#999"/>
+  </view>
+  <van-dialog id="van-dialog" />
+</view>

+ 35 - 0
pages/set/set.wxss

@@ -0,0 +1,35 @@
+/* pages/set/set.wxss */
+.set-content {
+  width: 100%;
+  height: 100%;
+  background-color: #f7f7f7;
+}
+.set-item {
+  width: 100%;
+  height: 98rpx;
+  background-color: #fff;
+}
+.col-a {
+  margin:20rpx 0;
+}
+.label {
+  width: 370rpx;
+  font-size: 30rpx;
+  font-weight: 400;
+  color: #333333;
+  text-indent: 24rpx;
+}
+.value {
+  font-size: 30rpx;
+  font-weight: 400;
+  color: #333333;
+}
+.bindphone {
+  margin-right: 72rpx;
+}
+.col-b {
+  border-bottom: 1rpx solid #e4e4e4;
+}
+view .van-button__text {
+  color: var(--maincolor);
+}