瀏覽代碼

修改店长相关问题

junyuanz 5 年之前
父節點
當前提交
41e3e6aa9d

+ 23 - 7
packageUser/pages/user/applyLeader/applyLeader.js

@@ -10,9 +10,24 @@ Page({
     more: '',
     countdown: 0,
     yzm:'',
-    remark:''
+    remark:'',
+    userinfo:{},
+    showpage:0
   },
   onLoad: function (options) {
+  	this.getUserInfo();
+  },
+  getUserInfo(){
+  	var that = this
+    var url = 'v1/user/info'
+    var params = {}
+    var success = function (res) {
+    	console.log(res);
+    	that.setData({
+        userinfo: res.data.wx_user
+      })
+    }
+    _request.$get(url, params, success)
   },
   getTel (val) {
     console.log(val)
@@ -151,10 +166,11 @@ Page({
     }
     var success = function (res) {
       wx.showToast({
-        title: '申请成功@',
+        title: '申请成功,我们将尽快处理,请您耐心等待',
         icon: 'none',
         duration: 2000
       })
+      that.setData({showpage:1})
     }
     _request.$put(url, params, success)
   },
@@ -165,9 +181,9 @@ Page({
       address: e.detail.value[0] + e.detail.value[1] + e.detail.value[2]
     })
   },
-  onShareAppMessage: function (val) {
-    return _request.share({
-      sc: 'xcx_user_newaddress'
-    })
-  }
+//onShareAppMessage: function (val) {
+//  return _request.share({
+//    sc: 'xcx_user_newaddress'
+//  })
+//}
 })

+ 17 - 1
packageUser/pages/user/applyLeader/applyLeader.wxml

@@ -1,6 +1,13 @@
-<view class="bg">
+<view class="bg" wx:if="{{showpage == 0}}">
   <view class="newAddress-top"></view>
   <view class="newAddress-line">
+    <view class="newAddress-title">金 额</view>
+    <input maxlength="11" class="nameText" style="color:#eab86a" disabled="disabled" value="16800" wx:if="{{userinfo.rank == 0}}"/>
+    <input maxlength="11" class="nameText" style="color:#eab86a" disabled="disabled" value="13800" wx:if="{{userinfo.rank == 1}}"/>
+    <view class="clean"></view>
+  </view>
+  
+  <view class="newAddress-line">
     <view class="newAddress-title">姓 名</view>
     <input maxlength="11" class="nameText" placeholder="你的姓名" placeholder-class="text-placeholder" bindinput="bindName" />
     <view class="clean"></view>
@@ -49,3 +56,12 @@
     <p class="submittips">说明:申请后,我们会尽快与您做进一步沟通,请耐心等待。</p>
   </form>
 </view>
+<view wx:if="{{showpage == 1}}">
+  <view style="text-align: center;padding: 100rpx 0;">
+    <image class="pro-img" style="width: 300rpx;height: 300rpx;" src="http://fohow.oss-cn-shenzhen.aliyuncs.com/xcx/image/pay/projectsuccess.png" />
+  	<view class="pro-text" style="font-size: 33rpx;margin-top: 15px;">
+    申请成功,我们将尽快处理,请您耐心等待!
+  </view>
+  </view>
+  
+</view>

+ 1 - 1
pages/areacart/areacart.js

@@ -94,7 +94,7 @@ Page({
 	        cartCount: res.data.count,
 	        cartTotal: res.data.total
 	      })
-    		that.allSelect();
+//  		that.allSelect();
     	}else{
     		wx.showToast({
 	        title: '请先授权登录~',

+ 1 - 1
pages/areacart/areacart.wxml

@@ -17,7 +17,7 @@
 	  </view>
 	</view>
 	
-	<view style="height:55px"></view>
+	<view style="height: 85rpx;"></view>
 	<!--购物车列表-->
 	<view class="cartlistbox">
 	<!--

+ 14 - 10
pages/areacart/areacart.wxss

@@ -457,7 +457,7 @@ vertical-align: middle;
 width:calc(100% - 320rpx)
 }
 .cartlist_title{
-font-size: 16px;
+font-size: 30rpx;
 overflow: hidden;
 text-overflow: ellipsis;
 display: -webkit-box;
@@ -465,6 +465,7 @@ word-wrap: break-word;
 -webkit-line-clamp: 2;
 -webkit-box-orient: vertical;
 color:#666;
+white-space:nowrap;
 }
 .cartlist_type{
 color: #999;
@@ -474,14 +475,14 @@ font-size:12px;
 .cartlist_price{
 float: left;
 color: #F00;
-font-size: 1.2rem;
-margin-top: 5rpx;
+font-size: 35rpx;
+margin-top: 7rpx;
 }
 .cartlist_num{float: right;}
 .cartlist_num button{
-width: 27px;
-height: 27px;
-line-height: 23px;
+width: 50rpx;
+height: 50rpx;
+line-height: 40rpx;
 text-align: center;
 display: inline-block;
 border: 1px solid #ddd;
@@ -496,17 +497,20 @@ color:#eab86a;
 background: #eab86a;
 color: #FFF;
 border: 0;
-line-height: 24px;
+line-height: 45rpx;
+
 
 }
 .cartlist_num input{
-width: 30px;
-height: 25px;
+width: 50rpx;
+height: 40rpx;
+
 text-align: center;
 display: inline-block;
 border-left: 0;
 border-right: 0;
-font-size: 18px;
+font-size: 40rpx;
+
 margin: 0 10rpx;
 
 }

+ 1 - 1
pages/cart/cart.wxml

@@ -17,7 +17,7 @@
 	  </view>
 	</view>
 	
-	<view style="height:55px"></view>
+	<view style="height: 85rpx;"></view>
 	<!--购物车列表-->
 	<view class="cartlistbox">
 	<!--

+ 14 - 10
pages/cart/cart.wxss

@@ -457,7 +457,7 @@ vertical-align: middle;
 width:calc(100% - 320rpx)
 }
 .cartlist_title{
-font-size: 16px;
+font-size: 30rpx;
 overflow: hidden;
 text-overflow: ellipsis;
 display: -webkit-box;
@@ -465,6 +465,7 @@ word-wrap: break-word;
 -webkit-line-clamp: 2;
 -webkit-box-orient: vertical;
 color:#666;
+white-space:nowrap;
 }
 .cartlist_type{
 color: #999;
@@ -474,14 +475,14 @@ font-size:12px;
 .cartlist_price{
 float: left;
 color: #F00;
-font-size: 1.2rem;
-margin-top: 5rpx;
+font-size: 35rpx;
+margin-top: 7rpx;
 }
 .cartlist_num{float: right;}
 .cartlist_num button{
-width: 27px;
-height: 27px;
-line-height: 23px;
+width: 50rpx;
+height: 50rpx;
+line-height: 40rpx;
 text-align: center;
 display: inline-block;
 border: 1px solid #ddd;
@@ -496,17 +497,20 @@ color:#eab86a;
 background: #eab86a;
 color: #FFF;
 border: 0;
-line-height: 24px;
+line-height: 45rpx;
+
 
 }
 .cartlist_num input{
-width: 30px;
-height: 25px;
+width: 50rpx;
+height: 40rpx;
+
 text-align: center;
 display: inline-block;
 border-left: 0;
 border-right: 0;
-font-size: 18px;
+font-size: 40rpx;
+
 margin: 0 10rpx;
 
 }

+ 14 - 0
pages/home/home.js

@@ -57,6 +57,7 @@ Page ({
     todaysend: Date.parse(new Date()) / 1000,
     showtime: '',
     projects_more:true,
+    userinfo:{}
   },
   onLoad: function () {
     // this.getzhunongList()
@@ -478,6 +479,18 @@ Page ({
       })
 //  }
   },
+  todz () {
+  	if(this.data.userinfo.rank < 2){
+  		wx.navigateTo({
+	      url: '/packageUser/pages/user/applyLeader/applyLeader'
+	    })
+  	}else{
+  		wx.navigateTo({
+	      url: '/pages/areacart/areacart'
+	    })
+  	}
+    
+  },
   topyq () {
     wx.navigateTo({
       url: '/packageUser/pages/user/invite/material/material'
@@ -489,6 +502,7 @@ Page ({
     var params = {}
     var success = function (res) {
       that.setData({
+      	userinfo:res.data.wx_user,
         showpyq: res.data.wx_user.show_invite_mode
       })
     }

+ 6 - 0
pages/home/home.wxml

@@ -25,6 +25,12 @@
           <view class="item-name">{{item.name}}</view>
         </view>
       </view>
+      <view bindtap="todz">
+        <image src="https://fohow.oss-cn-shenzhen.aliyuncs.com/navigate_icon_config/7427d1a0.jpg" class="item-index" />
+        <view class="item-name" wx:if="{{userinfo.rank < 2}}">店长申请</view>
+        <view class="item-name" wx:if="{{userinfo.rank == 2}}">店长专区</view>
+      </view>
+      
       <view bindtap="toabout">
         <image src="http://fohow.oss-cn-shenzhen.aliyuncs.com/navigation_icons/about.png" class="item-index" />
         <view class="item-name">关于商城</view>

+ 6 - 1
pages/user/all/all.wxml

@@ -9,8 +9,12 @@
   <view class="user-top">
     <image src="http://fohow.oss-cn-shenzhen.aliyuncs.com/xcx/image/icon/parner.png" class="user-par" wx:if="{{checkData.copartner_state == 1}}" />
     <view class="user-name ellipsis">{{userInfo.nickname}}</view>
+    
     <button class="user-title" wx:if="{{userInfo == 'nologin'}}" open-type="getUserInfo" bindgetuserinfo="getUserInfo" style="font-size: 18px;margin-top: -20px;">立即登陆</button>
+    
     <view class="user-title" wx:if="{{userInfo != 'nologin'}}"><text>NO.{{info.wx_user.id}}</text><text wx:if="{{info.user.tel}}"> | TEL : {{info.user.tel}}</text></view>
+    <span class="user-title" style="top: 165rpx;" wx:if="{{userInfo.rank == 1}}">(身份:群主)</span>
+    <span class="user-title" style="top: 165rpx;" wx:if="{{userInfo.rank == 2}}">(身份:店长)</span>
     
     <!--<view wx:if="{{userInfo != 'nologin' && !bindTel}}">
       <view class="user-title">
@@ -128,6 +132,7 @@
         <view class="user-line__title">修改交易密码</view>
         <image class="user-line__right" src="http://fohow.oss-cn-shenzhen.aliyuncs.com/xcx/user/right.png"></image>
       </view>-->
+      <!--
       <view class="user-line" bindtap="toApplyLeader" >
         <view class="user-line__title">团长申请</view>
         <image class="user-line__right" src="http://fohow.oss-cn-shenzhen.aliyuncs.com/xcx/user/right.png"></image>
@@ -136,7 +141,7 @@
         <view class="user-line__title">店铺专区</view>
         <image class="user-line__right" src="http://fohow.oss-cn-shenzhen.aliyuncs.com/xcx/user/right.png"></image>
       </view>
-      
+      -->
       
       <view class="user-line" bindtap="toCustom" >
         <view class="user-line__title">联系客服</view>