Ver código fonte

页面拆分成分包结构

Liuqi 3 anos atrás
pai
commit
22b1eb4bcf

+ 17 - 0
.gitignore

@@ -0,0 +1,17 @@
1
+# Windows
2
+[Dd]esktop.ini
3
+Thumbs.db
4
+$RECYCLE.BIN/
5
+
6
+# macOS
7
+.DS_Store
8
+.fseventsd
9
+.Spotlight-V100
10
+.TemporaryItems
11
+.Trashes
12
+
13
+# Node.js
14
+node_modules/
15
+miniprogram_npm
16
+
17
+.idea

+ 4 - 16
app.js

@@ -1,18 +1,7 @@
1 1
 // app.js
2 2
 App({
3
-  onLaunch() {
4
-    // 展示本地存储能力
5
-    const logs = wx.getStorageSync('logs') || []
6
-    logs.unshift(Date.now())
7
-    wx.setStorageSync('logs', logs)
8
-
9
-    // 登录
10
-    wx.login({
11
-      success: res => {
12
-        // 发送 res.code 到后台换取 openId, sessionKey, unionId
13
-      }
14
-    })
15
-  },
3
+  // onLaunch() {
4
+  // },
16 5
   onShow(opts) {
17 6
     this.globalData.sceneData = {
18 7
       path: opts.path,
@@ -22,10 +11,9 @@ App({
22 11
       wx.reLaunch({
23 12
         url: '/pages/login/login',
24 13
       })
25
-      // login(opts)
26 14
     }
27
-  }, 
15
+  },
28 16
   globalData: {
29
-    userInfo: null
17
+    sceneData: {}
30 18
   }
31 19
 })

+ 4 - 4
app.json

@@ -13,8 +13,6 @@
13 13
     "pages/tagsCustom/tagsCustom",
14 14
     "pages/recordSheet/recordSheet",
15 15
     "pages/contact/contact",
16
-    "pages/dossier/dossier",
17
-    "pages/name/name",
18 16
     "pages/role/role",
19 17
     "pages/recordList/recordList",
20 18
     "pages/test/test",
@@ -22,7 +20,9 @@
22 20
     "pages/phone/phone",
23 21
     "pages/customerList/customerList",
24 22
     "pages/historyOrder/historyOrder",
25
-    "pages/phoneEdit/phoneEdit"
23
+    "pages/phoneEdit/phoneEdit",
24
+    "subpackage/user/pages/dossier/dossier",
25
+    "subpackage/user/pages/name/name"
26 26
   ],
27 27
   "tabBar": {
28 28
     "color": "#666666",
@@ -53,4 +53,4 @@
53 53
   "style": "v2",
54 54
   "sitemapLocation": "sitemap.json",
55 55
   "lazyCodeLoading": "requiredComponents"
56
-}
56
+}

BIN
images/gzh.png


BIN
images/header.png


BIN
images/icon_01.png


BIN
images/icon_03.png


BIN
images/icon_04.png


BIN
images/icon_05.png


BIN
images/icon_06.png


BIN
images/icon_07.png


BIN
images/icon_logo.png


BIN
images/icon_tools_01.png


BIN
images/icon_tools_02.png


BIN
images/icon_tools_03.png


BIN
images/icon_tools_04.png


BIN
images/icon_tools_05.png


BIN
images/nav/article-off.png


BIN
images/nav/article-on.png


BIN
images/nav/home-off.png


BIN
images/nav/home-on.png


BIN
images/nav/my-off.png


BIN
images/nav/my-on.png


BIN
images/phone_01.png


BIN
images/phone_02.png


BIN
images/phone_03.png


BIN
images/select_no.png


BIN
images/select_ok.png


+ 2 - 2
pages/clientInfoEdit/clientInfoEdit.wxml

@@ -21,7 +21,7 @@
21 21
       <image class="icon-right" src="/images/icon_02.png"></image>
22 22
     </view>
23 23
   </navigator> -->
24
-  <navigator url="/pages/name/name?name={{ userInfo.realname }}&type=realname&userId={{ userInfo.user_id }}" hover-class="none">
24
+  <navigator url="/subpackage/user/pages/name/name?name={{ userInfo.realname }}&type=realname&userId={{ userInfo.user_id }}" hover-class="none">
25 25
     <view class="item flex-align-center">
26 26
       <view class="flex-column flex1">
27 27
         <text class="title">姓名</text>
@@ -82,7 +82,7 @@
82 82
           </view>
83 83
         </block>
84 84
         <text class="flex1" wx:else style="font-size: 28rpx;color: #ccc;">暂无客户标签</text>
85
-        
85
+
86 86
         <!-- <text class="flex1" wx:if="{{ userInfo.realname }}">{{ userInfo.realname  }}</text>
87 87
         <text class="flex1" wx:else style="font-size: 28rpx;color: #ccc;">请填写昵称</text> -->
88 88
       </view>

+ 0 - 7
pages/dossier/dossier.json

@@ -1,7 +0,0 @@
1
-{
2
-  "navigationBarTitleText": "个人信息",
3
-  "usingComponents": {
4
-    "wux-landscape": "../../components/dist/landscape/index",
5
-    "wux-popup": "../../components/dist/popup/index"
6
-  }
7
-}

+ 0 - 84
pages/dossier/dossier.wxml

@@ -1,84 +0,0 @@
1
-<view class="list">
2
-  <view class="item flex-align-center">
3
-    <text class="flex1">头像</text>
4
-    <image class="avatar" src="{{userInfo.avatar_url}}"></image>
5
-  </view>
6
-  <navigator url="/pages/name/name" hover-class="none">
7
-    <view class="item flex-align-center">
8
-      <view class="flex-column flex1">
9
-        <text class="title">姓名</text>
10
-        <text class="flex1" wx:if="{{ userInfo.realname }}">{{ userInfo.realname  }}</text>
11
-        <text class="flex1" wx:else style="font-size: 28rpx;color: #ccc;">请填写姓名</text>
12
-      </view>
13
-      <image class="icon-right" src="/images/right.png"></image>
14
-    </view>
15
-  </navigator>
16
-  <view class="item flex-align-center">
17
-    <view class="flex-column flex1">
18
-      <text class="title">所属店铺</text>
19
-      <text class="flex1" wx:if="{{ userInfo.realname }}">{{ userInfo.store_name  }}</text>
20
-      <text class="flex1" wx:else style="font-size: 28rpx;color: #ccc;">'-'</text>
21
-    </view>
22
-    <!-- <image class="icon-right" src="/images/right.png"></image> -->
23
-  </view>
24
-  <view class="item flex-align-center">
25
-    <view class="flex-column flex1">
26
-      <text class="title">直属上级</text>
27
-      <text class="flex1" wx:if="{{ userInfo.higher_name }}">{{ userInfo.higher_name }}</text>
28
-      <text class="flex1" wx:else style="font-size: 28rpx;color: #ccc;">'-'</text>
29
-    </view>
30
-    <!-- <image class="icon-right" src="/images/right.png"></image> -->
31
-  </view>
32
-  <picker bindchange="bindGenderChange" value="{{userInfo.sex == 0 ? 0 : userInfo.sex -1}}" range="{{genders}}">
33
-    <view class="item flex-align-center">
34
-      <view class="flex-column flex1">
35
-      <text class="title">性别</text>
36
-      <text class="flex1">{{ userInfo.sex == 0 ? '保密' : genders[userInfo.sex -1 ] }}</text>
37
-      <!-- <text class="flex1">{{genders[genderIndex]}}</text> -->
38
-    </view>
39
-    <image class="icon-right" src="/images/right.png"></image>
40
-    </view>
41
-  </picker>
42
-  <picker mode="date" value="{{userInfo.birthday}}" start="1980-09-01" bindchange="bindDateChange">
43
-    <view class="item flex-align-center">
44
-      <view class="flex-column flex1">
45
-        <text class="title">生日</text>
46
-        <text class="flex1" wx:if="{{ userInfo.birthday }}">{{userInfo.birthday}}</text>
47
-        <text class="flex1" wx:else style="font-size: 28rpx;color: #ccc;">请选择生日</text>
48
-      </view>
49
-      <image class="icon-right" src="/images/right.png"></image>
50
-    </view>
51
-  </picker>
52
-  <view class="item flex-align-center" bindtap="onPopupState" data-key="visible" data-value="{{true}}">
53
-    <view class="flex-column flex1">
54
-      <text class="title">手机号码</text>
55
-      <text class="flex1">{{ userInfo.mobile }}</text>
56
-    </view>
57
-    <image class="icon-right" src="/images/right.png"></image>
58
-  </view>
59
-  <picker mode="region" bindchange="bindRegionChange" style="display: none;">
60
-    <view class="item flex-align-center">
61
-      <view class="flex-column flex1">
62
-        <text class="title">所在地</text>
63
-        <text class="flex1" wx:if="{{ userInfo.city }}">{{ userInfo.city }}</text>
64
-        <text class="flex1" wx:else style="font-size: 28rpx;color: #ccc;">请选择常驻城市</text>
65
-        <!-- <text class="flex1">{{region[0]}},{{region[1]}},{{region[2]}}</text> -->
66
-      </view>
67
-      <image class="icon-right" src="/images/right.png"></image>
68
-    </view>
69
-  </picker>
70
-</view>
71
-
72
-<wux-landscape visible="{{ visible }}"  maskClosable="{{ true }}" closable="{{ false }}" bind:close="onPopupState" data-key="visible" data-value="{{false}}">
73
-  <view class="use-popup flex-column">
74
-    <text style="font-size: 36rpx;">更换手机</text>
75
-    <text style="color: #666666;margin: 28rpx 0 78rpx;">您确定要更换绑定的手机吗?</text>
76
-    <view class="use-btn">
77
-      <view class="btn cancel flex-center" bindtap="onPopupState" data-key="visible" data-value="{{false}}">取消</view>
78
-      <navigator url="/pages/phone/phone?phone={{userInfo.mobile}}" hover-class="none">
79
-        <view class="btn confirm flex-center">更换</view>
80
-      </navigator>
81
-    </view>
82
-    <!-- [温馨提示] 确认激活后,该会员卡将立即生效; 如暂不激活,可在“已购会员卡”中去选择激活。 -->
83
-  </view>
84
-</wux-landscape>

+ 115 - 102
pages/member/member.wxml

@@ -1,113 +1,126 @@
1
-
2 1
 <view class="user-info">
3
-  <!-- <image class="bg" src="/images/background/my-background.png"></image> -->
4
-  <view class="user-info-box flex flex-align-center {{ userInfo.is_vip == 1 ? 'active' : '' }}">
5
-    <image class="avatar" src="{{userInfo.avatar_url || '/images/header.png'}}" bindtap="onAvatar"></image>
6
-    <view class="info-right flex-column">
7
-      <text class="nick-name">{{userInfo.nickname || '微信用户'}}</text>
8
-      <!-- <view class="intro flex-align-center">
9
-        <view class="gender flex-center" style="margin-right: 14rpx;" wx:if="{{ userInfo.sex == 1 || userInfo.sex == 2 }}">
10
-          <image src="/images/icon_gender_{{userInfo.sex}}.png"></image>
11
-        </view>
12
-        <view class="city flex-center" style="margin-right: 16rpx;">深圳</view>
13
-        <view class="vip-time flex-center" wx:if="{{userInfo.vip}}">
14
-          <image src="/images/icon_vip_04.png"></image>
15
-          <text>{{userInfo.vip.card_name}}({{userInfo.vip.store_time_alias}})</text>
2
+    <!-- <image class="bg" src="/images/background/my-background.png"></image> -->
3
+    <view class="user-info-box flex flex-align-center {{ userInfo.is_vip == 1 ? 'active' : '' }}">
4
+        <image class="avatar" src="{{userInfo.avatar_url || '/images/header.png'}}" bindtap="onAvatar"></image>
5
+        <view class="info-right flex-column">
6
+            <text class="nick-name">{{userInfo.nickname || '微信用户'}}</text>
7
+            <!-- <view class="intro flex-align-center">
8
+              <view class="gender flex-center" style="margin-right: 14rpx;" wx:if="{{ userInfo.sex == 1 || userInfo.sex == 2 }}">
9
+                <image src="/images/icon_gender_{{userInfo.sex}}.png"></image>
10
+              </view>
11
+              <view class="city flex-center" style="margin-right: 16rpx;">深圳</view>
12
+              <view class="vip-time flex-center" wx:if="{{userInfo.vip}}">
13
+                <image src="/images/icon_vip_04.png"></image>
14
+                <text>{{userInfo.vip.card_name}}({{userInfo.vip.store_time_alias}})</text>
15
+              </view>
16
+            </view>
17
+            <text style="color: #666;font-size: 24rpx;" wx:if="{{userInfo.is_vip == 1}}">会员有效期时间:{{userInfo.vip.valid_time}}</text>
18
+            <text style="color: #666;font-size: 28rpx;" wx:if="{{userInfo.is_vip == 0}}">您还没有开通会员哦~</text> -->
16 19
         </view>
17
-      </view>
18
-      <text style="color: #666;font-size: 24rpx;" wx:if="{{userInfo.is_vip == 1}}">会员有效期时间:{{userInfo.vip.valid_time}}</text>
19
-      <text style="color: #666;font-size: 28rpx;" wx:if="{{userInfo.is_vip == 0}}">您还没有开通会员哦~</text> -->
20 20
     </view>
21
-  </view>
22 21
 </view>
23 22
 
24
-<!-- <view class="order item-radius" style="margin-top: -66rpx;">
25
-  <navigator url="/pages/order/order?current=0" hover-class="none">
26
-    <view class="item">
27
-      <image src="/images/dfk.png"></image>
28
-      <text>待付款</text>
29
-      <view class="item-num flex-center" wx:if="{{userInfo.order_num && userInfo.order_num.wait_pay_num > 0}}">{{userInfo.order_num.wait_pay_num > 99 ? '99' : userInfo.order_num.wait_pay_num }}</view>
30
-    </view>
31
-  </navigator>
32
-  <navigator url="/pages/order/order?current=1" hover-class="none">
33
-    <view class="item">
34
-      <image src="/images/yyy.png"></image>
35
-      <text>已预约</text>
36
-      <view class="item-num flex-center" wx:if="{{userInfo.order_num && userInfo.order_num.wait_use_num > 0}}">{{userInfo.order_num.wait_use_num > 99 ? '99' : userInfo.order_num.wait_use_num }}</view>
37
-    </view>
38
-  </navigator>
39
-  <navigator url="/pages/order/order?current=2" hover-class="none">
40
-    <view class="item">
41
-      <image src="/images/jxz.png"></image>
42
-      <text>进行中</text>
43
-      <view class="item-num flex-center" wx:if="{{userInfo.order_num && userInfo.order_num.using_num > 0}}">{{userInfo.order_num.using_num > 99 ? '99' : userInfo.order_num.using_num }}</view>
44
-    </view>
45
-  </navigator>
46
-  <navigator url="/pages/order/order?current=3" hover-class="none">
47
-    <view class="item">
48
-      <image src="/images/yjs.png"></image>
49
-      <text>已结算</text>
50
-    </view>
51
-  </navigator>
52
-  <navigator url="/pages/order/order?current=4" hover-class="none">
53
-    <view class="item">
54
-      <image src="/images/yqx.png"></image>
55
-      <text>已取消</text>
56
-    </view>
57
-  </navigator>
58
-</view> -->
23
+        <!-- <view class="order item-radius" style="margin-top: -66rpx;">
24
+          <navigator url="/pages/order/order?current=0" hover-class="none">
25
+            <view class="item">
26
+              <image src="/images/dfk.png"></image>
27
+              <text>待付款</text>
28
+              <view class="item-num flex-center" wx:if="{{userInfo.order_num && userInfo.order_num.wait_pay_num > 0}}">{{userInfo.order_num.wait_pay_num > 99 ? '99' : userInfo.order_num.wait_pay_num }}</view>
29
+            </view>
30
+          </navigator>
31
+          <navigator url="/pages/order/order?current=1" hover-class="none">
32
+            <view class="item">
33
+              <image src="/images/yyy.png"></image>
34
+              <text>已预约</text>
35
+              <view class="item-num flex-center" wx:if="{{userInfo.order_num && userInfo.order_num.wait_use_num > 0}}">{{userInfo.order_num.wait_use_num > 99 ? '99' : userInfo.order_num.wait_use_num }}</view>
36
+            </view>
37
+          </navigator>
38
+          <navigator url="/pages/order/order?current=2" hover-class="none">
39
+            <view class="item">
40
+              <image src="/images/jxz.png"></image>
41
+              <text>进行中</text>
42
+              <view class="item-num flex-center" wx:if="{{userInfo.order_num && userInfo.order_num.using_num > 0}}">{{userInfo.order_num.using_num > 99 ? '99' : userInfo.order_num.using_num }}</view>
43
+            </view>
44
+          </navigator>
45
+          <navigator url="/pages/order/order?current=3" hover-class="none">
46
+            <view class="item">
47
+              <image src="/images/yjs.png"></image>
48
+              <text>已结算</text>
49
+            </view>
50
+          </navigator>
51
+          <navigator url="/pages/order/order?current=4" hover-class="none">
52
+            <view class="item">
53
+              <image src="/images/yqx.png"></image>
54
+              <text>已取消</text>
55
+            </view>
56
+          </navigator>
57
+        </view> -->
59 58
 
60 59
 <view class="tools">
61
-  
62
-  <view class="item-radius" style="margin-top: 20rpx;">
63
-    <navigator url="/pages/recordList/recordList">
64
-      <view class="item line">
65
-        <image class="icon-left" src="/images/icon_tools_01.png"></image>
66
-        <text class="flex1">门店检查记录</text>
67
-        <!-- check_status -->
68
-        <text class="active" style="color:#999999;">{{ userInfo.check_status == 1 ? '今日已检查' : '今日未检查' }}</text>
69
-        <image class="icon-right" src="/images/right.png"></image>
70
-      </view>
71
-    </navigator>
60
+    <view class="item-radius" style="margin-top: 20rpx;">
61
+        <navigator url="/pages/recordList/recordList">
62
+            <view class="item line">
63
+                <image class="icon-left" src="/images/icon_tools_01.png"></image>
64
+                <text class="flex1">门店检查记录</text>
65
+                <!-- check_status -->
66
+                <text class="active" style="color:#999999;">{{ userInfo.check_status == 1 ? '今日已检查' : '今日未检查' }}</text>
67
+                <image class="icon-right" src="/images/right.png"></image>
68
+            </view>
69
+        </navigator>
70
+
71
+        <navigator url="/pages/customerList/customerList">
72
+            <view class="item line">
73
+                <image class="icon-left" src="/images/icon_tools_02.png"></image>
74
+                <text class="flex1">门店客户记录</text>
75
+                <!-- <text class="active" wx:if="{{ userInfo.card_num>0 }}">{{userInfo.card_num}}张可用</text> -->
76
+                <image class="icon-right" src="/images/right.png"></image>
77
+            </view>
78
+        </navigator>
79
+    </view>
72 80
 
73
-    <navigator url="/pages/customerList/customerList">
74
-      <view class="item line">
75
-        <image class="icon-left" src="/images/icon_tools_02.png"></image>
76
-        <text class="flex1">门店客户记录</text>
77
-        <!-- <text class="active" wx:if="{{ userInfo.card_num>0 }}">{{userInfo.card_num}}张可用</text> -->
78
-        <image class="icon-right" src="/images/right.png"></image>
79
-      </view>
80
-    </navigator>
81
-    
82
-    <navigator url="/pages/dossier/dossier">
83
-      <view class="item line">
84
-        <image class="icon-left" src="/images/icon_tools_03.png"></image>
85
-        <text class="flex1">个人信息</text>
86
-        <text class="active" style="color:#999999;">去修改</text>
87
-        <image class="icon-right" src="/images/right.png"></image>
88
-      </view>
89
-    </navigator>
90
-  </view>
91
-  
92
-  <view class="item-radius" style="margin-top: 20rpx;">
93
-    <navigator url="/pages/role/role" hover-class="none">
94
-      <view class="item line">
95
-        <image class="icon-left" src="/images/icon_tools_04.png"></image>
96
-        <text class="flex1">切换角色</text>
97
-        <text class="active" style="color:#999999;" wx:if="{{ userInfo.role_name }}">{{ userInfo.role_name }}</text>
98
-        <image class="icon-right" src="/images/right.png"></image>
99
-      </view>
100
-    </navigator>
101
-    <navigator url="/pages/contact/contact" hover-class="none">
102
-      <view class="item">
103
-        <image class="icon-left" src="/images/icon_tools_05.png"></image>
104
-        <text class="flex1">联系我们</text>
105
-        <!-- <text class="active" style="color:#999999;">去修改</text> -->
106
-        <image class="icon-right" src="/images/right.png"></image>
107
-      </view>
108
-    </navigator>
109
-  </view>
81
+    <view class="item-radius" style="margin-top: 20rpx;">
82
+        <navigator url="">
83
+            <view class="item line">
84
+                <image class="icon-left" src="/images/icon_tools_03.png"></image>
85
+                <text class="flex1">扫一扫</text>
86
+            </view>
87
+        </navigator>
88
+        <navigator url="">
89
+            <view class="item line">
90
+                <image class="icon-left" src="/images/icon_tools_03.png"></image>
91
+                <text class="flex1">我的服务记录</text>
92
+            </view>
93
+        </navigator>
94
+    </view>
95
+
96
+    <view class="item-radius" style="margin-top: 20rpx;">
97
+        <navigator url="/subpackage/user/pages/dossier/dossier">
98
+            <view class="item line">
99
+                <image class="icon-left" src="/images/icon_tools_03.png"></image>
100
+                <text class="flex1">个人信息</text>
101
+                <text class="active" style="color:#999999;">去修改</text>
102
+                <image class="icon-right" src="/images/right.png"></image>
103
+            </view>
104
+        </navigator>
105
+        <navigator url="/pages/role/role" hover-class="none">
106
+            <view class="item line">
107
+                <image class="icon-left" src="/images/icon_tools_04.png"></image>
108
+                <text class="flex1">切换角色</text>
109
+                <text class="active" style="color:#999999;" wx:if="{{ userInfo.role_name }}">{{ userInfo.role_name
110
+                    }}</text>
111
+                <image class="icon-right" src="/images/right.png"></image>
112
+            </view>
113
+        </navigator>
114
+        <navigator url="/pages/contact/contact" hover-class="none">
115
+            <view class="item">
116
+                <image class="icon-left" src="/images/icon_tools_05.png"></image>
117
+                <text class="flex1">联系我们</text>
118
+                <!-- <text class="active" style="color:#999999;">去修改</text> -->
119
+                <image class="icon-right" src="/images/right.png"></image>
120
+            </view>
121
+        </navigator>
122
+    </view>
110 123
 
111 124
 </view>
112 125
 
113
-<change-env visible="{{ visible }}"></change-env>
126
+<change-env visible="{{ visible }}"></change-env>

+ 3 - 3
pages/dossier/dossier.js

@@ -1,6 +1,6 @@
1 1
 import {
2 2
   get, post,
3
-} from '../../utils/http';
3
+} from '../../../../utils/http';
4 4
 Page({
5 5
 
6 6
   /**
@@ -49,7 +49,7 @@ Page({
49 49
    * 生命周期函数--监听页面卸载
50 50
    */
51 51
   onUnload: function () {
52
-    
52
+
53 53
   },
54 54
 
55 55
   /**
@@ -153,4 +153,4 @@ Page({
153 153
 
154 154
     })
155 155
   }
156
-})
156
+})

+ 7 - 0
subpackage/user/pages/dossier/dossier.json

@@ -0,0 +1,7 @@
1
+{
2
+  "navigationBarTitleText": "个人信息",
3
+  "usingComponents": {
4
+    "wux-landscape": "../../../../components/dist/landscape/index",
5
+    "wux-popup": "../../../../components/dist/popup/index"
6
+  }
7
+}

+ 86 - 0
subpackage/user/pages/dossier/dossier.wxml

@@ -0,0 +1,86 @@
1
+<view class="list">
2
+    <view class="item flex-align-center">
3
+        <text class="flex1">头像</text>
4
+        <image class="avatar" src="{{userInfo.avatar_url}}"></image>
5
+    </view>
6
+    <navigator url="/subpackage/user/pages/name/name" hover-class="none">
7
+        <view class="item flex-align-center">
8
+            <view class="flex-column flex1">
9
+                <text class="title">姓名</text>
10
+                <text class="flex1" wx:if="{{ userInfo.realname }}">{{ userInfo.realname }}</text>
11
+                <text class="flex1" wx:else style="font-size: 28rpx;color: #ccc;">请填写姓名</text>
12
+            </view>
13
+            <image class="icon-right" src="/images/right.png"></image>
14
+        </view>
15
+    </navigator>
16
+    <view class="item flex-align-center">
17
+        <view class="flex-column flex1">
18
+            <text class="title">所属店铺</text>
19
+            <text class="flex1" wx:if="{{ userInfo.realname }}">{{ userInfo.store_name }}</text>
20
+            <text class="flex1" wx:else style="font-size: 28rpx;color: #ccc;">'-'</text>
21
+        </view>
22
+        <!-- <image class="icon-right" src="/images/right.png"></image> -->
23
+    </view>
24
+    <view class="item flex-align-center">
25
+        <view class="flex-column flex1">
26
+            <text class="title">直属上级</text>
27
+            <text class="flex1" wx:if="{{ userInfo.higher_name }}">{{ userInfo.higher_name }}</text>
28
+            <text class="flex1" wx:else style="font-size: 28rpx;color: #ccc;">'-'</text>
29
+        </view>
30
+        <!-- <image class="icon-right" src="/images/right.png"></image> -->
31
+    </view>
32
+    <picker bindchange="bindGenderChange" value="{{userInfo.sex == 0 ? 0 : userInfo.sex -1}}" range="{{genders}}">
33
+        <view class="item flex-align-center">
34
+            <view class="flex-column flex1">
35
+                <text class="title">性别</text>
36
+                <text class="flex1">{{ userInfo.sex == 0 ? '保密' : genders[userInfo.sex - 1] }}</text>
37
+                <!-- <text class="flex1">{{genders[genderIndex]}}</text> -->
38
+            </view>
39
+            <image class="icon-right" src="/images/right.png"></image>
40
+        </view>
41
+    </picker>
42
+    <picker mode="date" value="{{userInfo.birthday}}" start="1980-09-01" bindchange="bindDateChange">
43
+        <view class="item flex-align-center">
44
+            <view class="flex-column flex1">
45
+                <text class="title">生日</text>
46
+                <text class="flex1" wx:if="{{ userInfo.birthday }}">{{userInfo.birthday}}</text>
47
+                <text class="flex1" wx:else style="font-size: 28rpx;color: #ccc;">请选择生日</text>
48
+            </view>
49
+            <image class="icon-right" src="/images/right.png"></image>
50
+        </view>
51
+    </picker>
52
+    <view class="item flex-align-center" bindtap="onPopupState" data-key="visible" data-value="{{true}}">
53
+        <view class="flex-column flex1">
54
+            <text class="title">手机号码</text>
55
+            <text class="flex1">{{ userInfo.mobile }}</text>
56
+        </view>
57
+        <image class="icon-right" src="/images/right.png"></image>
58
+    </view>
59
+    <picker mode="region" bindchange="bindRegionChange" style="display: none;">
60
+        <view class="item flex-align-center">
61
+            <view class="flex-column flex1">
62
+                <text class="title">所在地</text>
63
+                <text class="flex1" wx:if="{{ userInfo.city }}">{{ userInfo.city }}</text>
64
+                <text class="flex1" wx:else style="font-size: 28rpx;color: #ccc;">请选择常驻城市</text>
65
+                <!-- <text class="flex1">{{region[0]}},{{region[1]}},{{region[2]}}</text> -->
66
+            </view>
67
+            <image class="icon-right" src="/images/right.png"></image>
68
+        </view>
69
+    </picker>
70
+</view>
71
+
72
+<wux-landscape visible="{{ visible }}" maskClosable="{{ true }}" closable="{{ false }}" bind:close="onPopupState"
73
+               data-key="visible" data-value="{{false}}">
74
+    <view class="use-popup flex-column">
75
+        <text style="font-size: 36rpx;">更换手机</text>
76
+        <text style="color: #666666;margin: 28rpx 0 78rpx;">您确定要更换绑定的手机吗?</text>
77
+        <view class="use-btn">
78
+            <view class="btn cancel flex-center" bindtap="onPopupState" data-key="visible" data-value="{{false}}">取消
79
+            </view>
80
+            <navigator url="/pages/phone/phone?phone={{userInfo.mobile}}" hover-class="none">
81
+                <view class="btn confirm flex-center">更换</view>
82
+            </navigator>
83
+        </view>
84
+        <!-- [温馨提示] 确认激活后,该会员卡将立即生效; 如暂不激活,可在“已购会员卡”中去选择激活。 -->
85
+    </view>
86
+</wux-landscape>

pages/dossier/dossier.wxss → subpackage/user/pages/dossier/dossier.wxss


+ 3 - 3
pages/name/name.js

@@ -1,6 +1,6 @@
1 1
 import {
2 2
   get, post,
3
-} from '../../utils/http';
3
+} from '../../../../utils/http';
4 4
 Page({
5 5
 
6 6
   /**
@@ -91,7 +91,7 @@ Page({
91 91
   /**
92 92
    * 更新客户档案
93 93
    * Customer
94
-   * 
94
+   *
95 95
   */
96 96
   setCustomerInfo() {
97 97
     let { userInfo,type,userId } = this.data;
@@ -147,4 +147,4 @@ Page({
147 147
       }, 1000);
148 148
     })
149 149
   }
150
-})
150
+})

pages/name/name.json → subpackage/user/pages/name/name.json


pages/name/name.wxml → subpackage/user/pages/name/name.wxml


pages/name/name.wxss → subpackage/user/pages/name/name.wxss