Browse Source

Merge branch 'master' of http://git.9026.com/Silent/RailwayTwo

wanghaijun 4 years ago
parent
commit
9c4c3eb3aa
4 changed files with 21 additions and 8 deletions
  1. 15 5
      mini/pages/account/index.wxml
  2. 4 1
      mini/pages/index/index.wxml
  3. 1 1
      mini/pages/user/index.wxml
  4. 1 1
      mini/utils/env.js

+ 15 - 5
mini/pages/account/index.wxml

xqd
@@ -2,19 +2,29 @@
 <view class="sg-container">
   <view class="sg-index-bg sg-pad">
     <view class="sg-flex sg-align-center">
-      <image class="sg-avatar sg-margin-right" style="width:100rpx" src="{{ userInfo.avatar }}" mode="widthFix"></image>
+      <view class="sg-avatar sg-margin-right" wx:if="{{userInfo.avatar==''}}">
+        <open-data type="userAvatarUrl"></open-data>
+      </view>
+      <image wx:else class="sg-avatar sg-margin-right" style="width:100rpx" src="{{ userInfo.avatar }}" mode="widthFix">
+      </image>
       <view class="sg-white" style="width:100%">
         <view class="sg-font-lg sg-flex sg-align-center" style="justify-content: space-between;margin-bottom:15rpx;">
-          <view>{{ userInfo ? userInfo.name : '请登录' }}</view>
+          <view wx:if="{{userInfo.name==''||userInfo.nickname==''}}">
+            <open-data type="userNickName"></open-data>
+          </view>
+          <view wx:else>{{ userInfo ? userInfo.name : '请登录' }}</view>
           <view class="sg-align-center sg-flex" wx:if="{{userInfo}}" bindtap="logout">
             <image src="./out.png" alt="" mode="widthFix" style="width:40rpx"></image>
           </view>
         </view>
-        <view class="sg-font-small sg-flex sg-align-center" style="justify-content: space-between;" wx:if="{{project_num>0}}">
+        <view class="sg-font-small sg-flex sg-align-center" style="justify-content: space-between;"
+          wx:if="{{project_num>0}}">
           <view wx:if="userInfo">所属项目个数 | {{project_num}}个</view>
-          <view bindtap="navigate" data-url="{{userInfo ? '/pages/user/index' : '/pages/login/index'}}">{{ userInfo ? '修改用户信息' : '点击按钮进行登录操作' }}</view>
+          <view bindtap="navigate" data-url="{{userInfo ? '/pages/user/index' : '/pages/login/index'}}">
+            {{ userInfo ? '修改用户信息' : '点击按钮进行登录操作' }}</view>
         </view>
-        <view class="sg-margin-tb-sm sg-pad-sm sg-primary sg-font-xs sg-white sg-flex sg-align-center sg-space-between" style="background: #4281F0; border-radius: 5px" bindtap="navigate" data-url="/pages/bind/index" wx:else>
+        <view class="sg-margin-tb-sm sg-pad-sm sg-primary sg-font-xs sg-white sg-flex sg-align-center sg-space-between"
+          style="background: #4281F0; border-radius: 5px" bindtap="navigate" data-url="/pages/bind/index" wx:else>
           <view>联系管理员进行授权,进行项目查看</view>
           <van-icon name="arrow"></van-icon>
         </view>

+ 4 - 1
mini/pages/index/index.wxml

xqd
@@ -22,7 +22,10 @@
         <view class="sg-top-name">消息提示</view>
       </view>
       <view class="sg-top-item sg-font-xs">
-        <image class="sg-avatar" src="{{ userInfo.avatar }}" mode="widthFix"></image>
+        <view class="sg-avatar" wx:if="{{userInfo.avatar==''}}">
+          <open-data type="userAvatarUrl"></open-data>
+        </view>
+        <image class="sg-avatar" wx:else src="{{ userInfo.avatar }}" mode="widthFix"></image>
       </view>
     </view>
     <view class="sg-search-box sg-shadow">

+ 1 - 1
mini/pages/user/index.wxml

xqd
@@ -12,7 +12,7 @@
     <view class="sg-flex sg-align-center sg-space-between sg-pad sg-bottom-border">
       <view class="sg-gray-color">手机号码</view>
       <input class="sg-input sg-text-right" value="{{userInfo.phone}}" bindinput="updateInput" data-name="phone" wx:if="{{userInfo.phone}}" disabled="{{true}}"></input>
-      <van-button type="info" open-type="getPhoneNumber" bind:getphonenumber="updatePhoneNumber" size="small" wx:else="{{!userInfo.phone}}">点击授权获取</van-button>
+      <!-- <van-button type="info" open-type="getPhoneNumber" bind:getphonenumber="updatePhoneNumber" size="small" wx:else="{{!userInfo.phone}}">点击授权获取</van-button> -->
     </view>
   </view>
   <view class="sg-fix-bottom sg-pad sg-text-center sg-white-bg" bindtap="save">保存</view>

+ 1 - 1
mini/utils/env.js

xqd
@@ -1,4 +1,4 @@
-const isTest = true;
+const isTest = false;
 //172.31.31.35
 //172.31.31.92