Parcourir la source

新增代理相关

junyuanz il y a 4 ans
Parent
commit
e9672aba18

+ 5 - 2
app.json

@@ -66,7 +66,10 @@
         "pages/user/recharge/recharge",
         "pages/user/withdraw/withdraw",
         "pages/user/transfer/transfer",
-        "pages/user/transfer/transferList/transferList"
+        "pages/user/transfer/transferList/transferList",
+		"pages/user/proxyApply/proxyApply",
+		"pages/user/proxyList/proxyList",
+		"pages/user/proxyReview/proxyReview"
       ]
     },
     {
@@ -133,7 +136,7 @@
   "sitemapLocation": "sitemap.json",
   "plugins": {
 	    "live-player-plugin": {
-	        "version": "1.2.10",
+	        "version": "1.3.0",
 	        "provider": "wx2b03c6e691cd7370"
 	    }
 	}

+ 10 - 2
packageUser/pages/user/invite/invite.js

@@ -29,7 +29,8 @@ Page({
     nextshow: false,
     prevshow: true,
     cinfo: '',
-    pinfo: ''
+    pinfo: '',
+	wx_user:{}
   },
   onLoad: function (options) {
     wx_id = getApp().globalData.wx_id
@@ -94,7 +95,8 @@ Page({
         that.setData({
           list: result,
           page: that.data.page + 1,
-          per_page: that.data.per_page
+          per_page: that.data.per_page,
+		  wx_user: res.data.wx_user
         })
       } else {
         that.setData({
@@ -249,6 +251,12 @@ Page({
       })
     }
   },
+  toproxy (e) {
+    var userid = e.currentTarget.dataset.userid
+	  wx.navigateTo({
+		url: '/packageUser/pages/user/proxyApply/proxyApply?uid=' + userid
+	  })
+  },
   updatemonth () {
     var that = this
     var date = new Date(that.data.time * 1000)

+ 32 - 7
packageUser/pages/user/invite/invite.wxml

@@ -66,11 +66,18 @@
           <image src="http://fohow.oss-cn-shenzhen.aliyuncs.com/xcx/image/icon/noright.png" class="list-righticon" />
         </view>
       </view>
-      <view class="list-part2">
+      <view class="list-part2" wx:if="{{wx_user.rank>=1}}">
         <view class="list-nameText">昵称</view>
-        <view class="list-priceText" style="right: 200rpx;">上月业绩</view>
-        <view class="list-priceText">本月业绩</view>
+        <view class="list-priceText" style="right: 300rpx;">上月业绩</view>
+        <view class="list-priceText" style="right: 150rpx;">本月业绩</view>
+        <view class="list-priceText">代理</view>
       </view>
+	  <view class="list-part2" wx:else>
+	    <view class="list-nameText">昵称</view>
+	    <view class="list-priceText" style="right: 200rpx;">上月业绩</view>
+	    <view class="list-priceText">本月业绩</view>
+	  </view>
+	  
     </view>
     <view class="list-main" >
       <!--<view class="list-item" wx:for="{{list}}" wx:key="{{index}}">
@@ -84,8 +91,10 @@
         <image class="list-head" src="http://fohow.oss-cn-shenzhen.aliyuncs.com/xcx/image/icon/wx.png" wx:if="{{!item.head}}"></image>
         <view class="list-name ellipsis" wx:if="{{item.nickname}}">{{item.nickname}}</view>
         <view class="list-name ellipsis" wx:if="{{!item.nickname}}">---</view>
-        <view class="list-price" style="right: 200rpx;"><currency symbol="" value="{{item.sale_group_sum}}" ></currency></view>
-        <view class="list-price"><currency symbol="" value="{{item.sale_group}}" ></currency></view>
+        <view class="list-price" style="right: 300rpx;"  wx:if="{{wx_user.rank>=1}}"><currency symbol="" value="{{item.sale_group_sum}}" ></currency></view>
+        <view class="list-price" style="right: 200rpx;" wx:else><currency symbol="" value="{{item.sale_group_sum}}" ></currency></view>
+        <view class="list-price" style="right: 150rpx;"  wx:if="{{wx_user.rank>=1}}"><currency symbol="" value="{{item.sale_group}}" ></currency></view>
+        <view class="list-price" wx:else><currency symbol="" value="{{item.sale_group}}" ></currency></view>
         <view wx:if="{{item.ne_invitee.length}}">
           <view class="list-oheadlist">
             <image src="{{item1.head}}" class="list-ohead" wx:for="{{item.ne_invitee}}" wx:for-item="item1" wx:key="{{index}}"/>
@@ -95,15 +104,26 @@
           <image src="http://fohow.oss-cn-shenzhen.aliyuncs.com/xcx/image/right.png" class="list-rightimg" />
           <view class="list-person">{{item.ne_invitee_count}}人</view>
         </view>
+		<view class="list-price proxy-button" wx:if="{{wx_user.rank>=1}}" bindtap="toproxy" data-userid="{{item.id}}">
+			<text wx:if="{{item.status == 0}}">申请</text>
+			<text wx:if="{{item.status == 1}}">审核中</text>
+			<text wx:if="{{item.status == 2}}" style="color: red;">是</text>
+		</view>
         <view class="clear"></view>
+		
+		<view>
+			
+		</view>
       </view>
       <view style="    position: relative;" class="list-item" wx:for="{{mlist}}" wx:key="{{index}}" data-val="{{item.wx_uid}}" data-count="{{item.ne_invitee_count}}" bindtap="tomonth" hidden="{{ashow}}">
         <image class="list-head" src="{{item.head}}" wx:if="{{item.head}}"></image>
         <image class="list-head" src="http://fohow.oss-cn-shenzhen.aliyuncs.com/xcx/image/icon/wx.png" wx:if="{{!item.head}}"></image>
         <view class="list-name ellipsis" wx:if="{{item.nickname}}">{{item.nickname}}</view>
         <view class="list-name ellipsis" wx:if="{{!item.nickname}}">---</view>
-        <view class="list-price" style="right: 200rpx;"><currency symbol="" value="{{item.sale_group_sum}}" ></currency></view>
-        <view class="list-price"><currency symbol="" value="{{item.sale_group}}" ></currency></view>
+        <view class="list-price" style="right: 300rpx;"  wx:if="{{wx_user.rank>=1}}"><currency symbol="" value="{{item.sale_group_sum}}" ></currency></view>
+        <view class="list-price" style="right: 200rpx;" wx:else><currency symbol="" value="{{item.sale_group_sum}}" ></currency></view>
+        <view class="list-price" style="right: 150rpx;"  wx:if="{{wx_user.rank>=1}}"><currency symbol="" value="{{item.sale_group}}" ></currency></view>
+        <view class="list-price" wx:else><currency symbol="" value="{{item.sale_group}}" ></currency></view>
         <view wx:if="{{item.ne_invitee.length}}">
           <view class="list-oheadlist">
             <image src="{{item1.head}}" class="list-ohead" wx:for="{{item.ne_invitee}}" wx:for-item="item1" wx:key="{{index}}" wx:if="{{item1.head}}"/>
@@ -113,6 +133,11 @@
           <image src="http://fohow.oss-cn-shenzhen.aliyuncs.com/xcx/image/right.png" class="list-rightimg" />
           <view class="list-person">{{item.ne_invitee_count}}人</view>
         </view>
+		<view class="list-price proxy-button" wx:if="{{wx_user.rank>=1}}" bindtap="toproxy" data-userid="{{item.id}}">
+			<text wx:if="{{item.status == 0}}">申请</text>
+			<text wx:if="{{item.status == 1}}">审核中</text>
+			<text wx:if="{{item.status == 2}}" style="color: red;">是</text>
+		</view>
         <view class="clear"></view>
       </view>
     </view>

+ 5 - 1
packageUser/pages/user/invite/invite.wxss

@@ -224,7 +224,7 @@
   padding-left: 18rpx;
   float: left;
   line-height: 88rpx;
-  width: 330rpx;
+  width: 130rpx;
   font-size: 28rpx;
   color: #4c4c4c;
 }
@@ -432,3 +432,7 @@ position: absolute;
 right: 0;
 
 }
+
+.proxy-button{
+	font-size: 30rpx;
+}

+ 104 - 0
packageUser/pages/user/proxyApply/proxyApply.js

@@ -0,0 +1,104 @@
+var _request = require('../../../../utils/request.js')
+var util = require('../../../../utils/util.js')
+Page({
+  data: {
+    page: 1,
+    per_page: 20,
+    list: [],
+    more: true,
+    balance: 0,
+	userinfo:{},
+	applylist:'',
+	tel: '',
+	uid:0
+  },
+  onLoad: function (options) {
+	var uid = options.uid;
+    this.getUserOrderInfo(uid);
+    this.getApplyList(uid);
+	this.setData({
+	  uid: uid
+	})
+  },
+  onShow () {
+  },
+  onReachBottom: function () {
+    if (this.data.more) {
+      var page = this.data.page + 1
+      this.setData({
+        page: page
+      })
+      this.getBalanceList()
+    }
+  },
+  getUserOrderInfo(uid) {
+    var that = this
+    var url = 'v1/user/others_info/'+ uid
+    var params = {
+    }
+    var success = function (res) {
+      var result = res.data.wx_user
+      that.setData({
+        userinfo: result
+      })
+    }
+    _request.$get(url, params, success)
+  },
+  getApplyList(uid) {
+    var that = this
+    var url = 'v1/user/history_apply/'+ uid
+    var params = {
+    }
+    var success = function (res) {
+      var result = res.data
+      that.setData({
+        applylist: result
+      })
+    }
+    _request.$get(url, params, success)
+  },
+  applySubmit(){
+	  var that = this
+	  var url = 'v1/user/agent_apply';
+	  var tel = that.data.tel;
+	  var uid = that.data.uid;
+	  var params = {
+		  mobile:tel,
+		  wx_uid:uid
+	  }
+	  var success = function (res) {
+	    var result = res.data.result
+	    // that.setData({
+	    //   applylist: result
+	    // })
+		console.log('submitres',result)
+		if(result){
+			wx.showToast({
+			  title: '申请成功,请耐心等待审核!',
+			  icon: 'none',
+			  duration: 2000
+			})
+			
+			that.getApplyList(uid);
+			
+		}
+	  }
+	  _request.$post(url, params, success)
+  },
+  getDetail (val) {
+    var id = val.currentTarget.dataset.val
+    wx.navigateTo({
+      url: '/packageUser/pages/user/radishDetail/radishDetail?id=' + id
+    })
+  },
+  bindPhone (e) {
+    this.setData({
+      tel: e.detail.value
+    })
+  },
+  onShareAppMessage: function (val) {
+    return _request.share({
+      sc: 'xcx_user_radish'
+    })
+  }
+})

+ 7 - 0
packageUser/pages/user/proxyApply/proxyApply.json

@@ -0,0 +1,7 @@
+{
+  "navigationBarTitleText": "代理申请",
+  "usingComponents": {
+    "format-time": "../../../../component/formatTime/formatTime"
+  },
+  "backgroundColor": "#f3f3f3"
+}

+ 46 - 0
packageUser/pages/user/proxyApply/proxyApply.wxml

@@ -0,0 +1,46 @@
+<view class="bg">
+  <view class="proxyapply-top">
+    <view class="proxyapply-img"><image class="list-head" src="{{userinfo.head}}" wx:if="{{userinfo.head}}"></image></view>
+    <view class="proxyapply-right">
+		<h4 class="topname">{{userinfo.nickname}}</h4>
+		<view class="proxyapply-yeji">
+			<small>上月业绩</small>
+			{{userinfo.sale_group_sum}}
+		</view>
+		<view class="proxyapply-yeji">
+			<small>本月业绩</small>
+			{{userinfo.sale_group}}
+		</view>
+	</view>
+  </view>
+  <view class="radish-main__title" style="margin: 15rpx 0;">申请成为代理</view>
+  <view style="background: #FFF;padding: 20rpx;">
+	  <view class="newAddress-line">
+	    <view class="newAddress-title">手机号</view>
+	    <input type="number" maxlength="11" class="nameText" placeholder="请输入手机号,选填" placeholder-class="text-placeholder" bindinput="bindPhone" />
+	    <view class="clean"></view>
+	  </view>
+	  <view class="applyproxy-button" bindtap="applySubmit">申请代理</view>
+  </view>
+  <view class="radish-main">
+    <view class="radish-main__title">历史申请记录</view>
+    <view class="proxyapply-list">
+		<ul>
+			<li>
+				<span class="title">申请日期</span>
+				<span class="title" style="text-align: left;">会员</span>
+				<span class="title" style="text-align: right;">状态</span>
+			</li>
+			<li wx:if="{{applylist}}">
+				<span><format-time type="formatDay" value="{{applylist.happen_time}}" ></format-time></span>
+				<span style="text-align: left;"><image class="list-head" src="{{applylist.head}}" wx:if="{{applylist.head}}"></image>{{applylist.nickname}}</span>
+				<span style="text-align: right;">
+					<text wx:if="{{applylist.status}}">已审核</text>
+					<text wx:else>未审核</text>
+				</span>
+			</li>
+			<li class="listnodata" wx:else>暂无记录</li>
+		</ul>
+	</view>
+  </view>
+</view>

+ 203 - 0
packageUser/pages/user/proxyApply/proxyApply.wxss

@@ -0,0 +1,203 @@
+.bg {
+  position: relative;
+  width: 100%;
+  min-height: 100%;
+  background-color: #f3f3f3;
+}
+.radish-top {
+  width: 100%;
+  height: 360rpx;
+  background-image: url('http://fohow.oss-cn-shenzhen.aliyuncs.com/xcx/user/djquan.jpg');
+  background-size: 100%;
+}
+.radish-top__title {
+    padding: 95rpx 0 0;
+    font-size: 34rpx;
+    color: #FFF;
+    text-align: center;
+    text-shadow: 1px 1px 1px #bb954d;
+}
+.radish-top__count {
+    font-size: 70rpx;
+    color: #fff;
+    text-align: center;
+    text-shadow: 1px 1px 1px #e6231d;
+}
+.radish-top__btn {
+  position: absolute;
+  top: 190rpx;
+  left: 150rpx;
+  width: 196rpx;
+  height: 60rpx;
+  border: 2rpx solid #fff;
+  margin: 48rpx auto 0;
+  text-align: center;
+  line-height: 60rpx;
+  border-radius: 8rpx;
+  font-size: 28rpx;
+  color: #fff;
+}
+.radish-top__btn1 {
+    position: absolute;
+    top: 210rpx;
+    width: 206rpx;
+    height: 60rpx;
+    border: 2rpx solid #eb4d20;
+    margin: 48rpx auto 0;
+    text-align: center;
+    line-height: 60rpx;
+    border-radius: 45px;
+    font-size: 32rpx;
+    color: #fff;
+    right: calc(50% - 103rpx);
+    background: linear-gradient(to right,#eb712c,#e71f1c);
+}
+.radish-main {
+  background-color: #fff;
+}
+.radish-main__title {
+  height: 50rpx;
+  line-height: 50rpx;
+  color: #bbbbbb;
+  background-color: #f3f3f3;
+  text-align: center;
+  font-size: 24rpx;
+}
+.radish-main__line {
+  margin: 0 20rpx;
+  height: 100rpx;
+  border-bottom: 1rpx solid #eeeeee;
+}
+.radish-main__left {
+  float: left;
+  width: 450rpx;
+}
+.radish-main__text {
+  float: left;
+  padding-top: 16rpx;
+  font-size: 28rpx;
+  color: #4c4c4c;
+  width: 450rpx;
+}
+.radish-main__time {
+  float: left;
+  font-size: 18rpx;
+  color: #bbbbbb;
+  padding-top: 5rpx;
+}
+.radish-main__count {
+  float: right;
+  width: 260rpx;
+  font-size: 28rpx;
+  line-height: 100rpx;
+  text-align: right;
+  color: #eab86a;
+}
+.proxyapply-top{
+	    padding: 45rpx;
+	    background: #FFF;
+}
+.proxyapply-img{
+	width: 35%;
+	    display: inline-block;
+	    vertical-align: middle;
+	    padding: 15rpx;
+	    box-sizing: border-box;
+}
+.proxyapply-img image{
+	width: 180rpx;
+	    height: 180rpx;
+	    border-radius: 50%;
+}
+.proxyapply-right{
+	display: inline-block;
+	    vertical-align: middle;
+	    width: 65%;
+}
+.proxyapply-right .topname{
+	    display: block;
+	    width: 100%;
+	    font-size: 40rpx;
+	    margin: 15rpx 0;
+}
+.proxyapply-yeji{
+	    float: left;
+	    width: 50%;
+}
+.proxyapply-yeji small{
+	font-size: 25rpx;
+	    display: block;
+	    color: #666;
+}
+.applyproxy-button{
+	    margin: 35rpx 0 20rpx;
+	    background: #eab86a;
+	    text-align: center;
+	    color: #FFF;
+	    padding: 15rpx;
+	    border-radius: 5px;
+}
+.proxyapply-list{}
+.proxyapply-list ul{
+	    list-style: none;
+	    display: block;
+}
+.proxyapply-list ul li{display: block;}
+.proxyapply-list ul li span{
+	    width: 33.33%;
+	    display: inline-block;
+	    padding: 15rpx;
+	    box-sizing: border-box;
+		font-size: 28rpx;
+		    line-height: 60rpx;
+}
+.proxyapply-list ul li span.title{
+	color: #999;
+	    border-bottom: 1px solid #ddd;
+	    
+}
+.proxyapply-list ul li span:nth-child(1){
+	    width: 35%;
+}
+.proxyapply-list ul li span:nth-child(2){
+	    width: 50%;
+}
+.proxyapply-list ul li span:nth-child(3){
+	    width: 15%;
+}
+.proxyapply-list ul li span image{
+	    width: 50rpx;
+	    height: 50rpx;
+	    display: inline-block;
+	    vertical-align: middle;
+	    border-radius: 50%;
+	    margin: 5rpx;
+}
+.listnodata{
+	text-align: center;
+	    padding: 25rpx;
+	    color: #999;
+}
+.nameText {
+  width: 330rpx;
+  height: 90rpx;
+  line-height: 90rpx;
+  color: #4c4c4c;
+  float: left;
+  text-align: left;
+  padding-right: 20rpx;
+}
+.newAddress-line {
+  height: 90rpx;
+  line-height: 90rpx;
+  background-color: #fff;
+  font-size: 28rpx;
+  border-bottom: 1px solid #eeeeee;
+  overflow:hidden;
+}
+.newAddress-title {
+  float: left;
+  margin-left: 20rpx;
+  color: #4c4c4c;
+  width:80px;
+}

+ 83 - 0
packageUser/pages/user/proxyList/proxyList.js

@@ -0,0 +1,83 @@
+var _request = require('../../../../utils/request.js')
+var util = require('../../../../utils/util.js')
+Page({
+  data: {
+    page: 1,
+    per_page: 20,
+    list: [],
+    more: true,
+    balance: 0
+  },
+  onLoad: function (options) {
+    // this.getProxyList()
+    // this.getBalanceList()
+  },
+  onShow () {
+	  this.setData({
+	    page: 1,
+	    per_page: 20,
+	    list: [],
+	    more: true,
+	    balance: 0
+	  })
+	  this.getProxyList()
+  },
+  onReachBottom: function () {
+    if (this.data.more) {
+      var page = this.data.page + 1
+      this.setData({
+        page: page
+      })
+      this.getProxyList()
+    }
+  },
+  getBalanceInfo () {
+    var that = this
+    var url = 'v1/user/balance/info'
+    var params = {
+    }
+    var success = function (res) {
+      var result = res.data.total
+      that.setData({
+        balance: result
+      })
+    }
+    _request.$get(url, params, success)
+  },
+  getProxyList() {
+    var that = this
+    var url = 'v1/user/my_agent'
+    var params = {
+      page: this.data.page,
+      per_page: this.data.per_page
+    }
+    var success = function (res) {
+      var result = that.data.list.concat(res.data.agent_list || [])
+      that.setData({
+        list: result
+      })
+      var listMore = res.data.count > that.data.list.length
+      that.setData({
+        more: listMore
+      })
+    }
+    _request.$get(url, params, success)
+  },
+  getDetail (val) {
+    var id = val.currentTarget.dataset.val
+    wx.navigateTo({
+      url: '/packageUser/pages/user/radishDetail/radishDetail?id=' + id
+    })
+  },
+  onShareAppMessage: function (val) {
+    return _request.share({
+      sc: 'xcx_user_radish'
+    })
+  },
+  toApplyinfo(e){
+	var id = e.currentTarget.dataset.id
+	  wx.navigateTo({
+	    url: '/packageUser/pages/user/proxyReview/proxyReview?id=' + id
+	  })
+  }
+})

+ 7 - 0
packageUser/pages/user/proxyList/proxyList.json

@@ -0,0 +1,7 @@
+{
+  "navigationBarTitleText": "我的代理",
+  "usingComponents": {
+    "format-time": "../../../../component/formatTime/formatTime"
+  },
+  "backgroundColor": "#f3f3f3"
+}

+ 21 - 0
packageUser/pages/user/proxyList/proxyList.wxml

@@ -0,0 +1,21 @@
+<view class="bg">
+  <view class="radish-main">
+    <view class="proxyapply-list">
+  		<ul>
+  			<li>
+  				<span class="title">申请日期</span>
+  				<span class="title" style="text-align: left;">会员</span>
+  				<span class="title" style="text-align: right;">状态</span>
+  			</li>
+  			<li  wx:for="{{list}}" bindtap="toApplyinfo" data-id="{{item.id}}">
+  				<span><format-time type="formatDay" value="{{item.happen_time}}" ></format-time></span>
+  				<span style="text-align: left;"><image class="list-head" src="{{item.head}}" wx:if="{{item.head}}"></image>{{item.nickname}}</span>
+  				<span style="text-align: right;">
+					<text wx:if="{{item.status}}">已审核</text>
+					<text wx:else>未审核</text>
+				</span>
+  			</li>
+  		</ul>
+  	</view>
+  </view>
+</view>

+ 131 - 0
packageUser/pages/user/proxyList/proxyList.wxss

@@ -0,0 +1,131 @@
+.bg {
+  position: relative;
+  width: 100%;
+  min-height: 100%;
+  background-color: #f3f3f3;
+}
+.radish-top {
+  width: 100%;
+  height: 360rpx;
+  background-image: url('http://fohow.oss-cn-shenzhen.aliyuncs.com/xcx/user/djquan.jpg');
+  background-size: 100%;
+}
+.radish-top__title {
+    padding: 95rpx 0 0;
+    font-size: 34rpx;
+    color: #FFF;
+    text-align: center;
+    text-shadow: 1px 1px 1px #bb954d;
+}
+.radish-top__count {
+    font-size: 70rpx;
+    color: #fff;
+    text-align: center;
+    text-shadow: 1px 1px 1px #e6231d;
+}
+.radish-top__btn {
+  position: absolute;
+  top: 190rpx;
+  left: 150rpx;
+  width: 196rpx;
+  height: 60rpx;
+  border: 2rpx solid #fff;
+  margin: 48rpx auto 0;
+  text-align: center;
+  line-height: 60rpx;
+  border-radius: 8rpx;
+  font-size: 28rpx;
+  color: #fff;
+}
+.radish-top__btn1 {
+    position: absolute;
+    top: 210rpx;
+    width: 206rpx;
+    height: 60rpx;
+    border: 2rpx solid #eb4d20;
+    margin: 48rpx auto 0;
+    text-align: center;
+    line-height: 60rpx;
+    border-radius: 45px;
+    font-size: 32rpx;
+    color: #fff;
+    right: calc(50% - 103rpx);
+    background: linear-gradient(to right,#eb712c,#e71f1c);
+}
+.radish-main {
+  background-color: #fff;
+}
+.radish-main__title {
+  height: 50rpx;
+  line-height: 50rpx;
+  color: #bbbbbb;
+  background-color: #f3f3f3;
+  text-align: center;
+  font-size: 24rpx;
+}
+.radish-main__line {
+  margin: 0 20rpx;
+  height: 100rpx;
+  border-bottom: 1rpx solid #eeeeee;
+}
+.radish-main__left {
+  float: left;
+  width: 450rpx;
+}
+.radish-main__text {
+  float: left;
+  padding-top: 16rpx;
+  font-size: 28rpx;
+  color: #4c4c4c;
+  width: 450rpx;
+}
+.radish-main__time {
+  float: left;
+  font-size: 18rpx;
+  color: #bbbbbb;
+  padding-top: 5rpx;
+}
+.radish-main__count {
+  float: right;
+  width: 260rpx;
+  font-size: 28rpx;
+  line-height: 100rpx;
+  text-align: right;
+  color: #eab86a;
+}
+.proxyapply-list{}
+.proxyapply-list ul{
+	    list-style: none;
+	    display: block;
+}
+.proxyapply-list ul li{display: block;}
+.proxyapply-list ul li span{
+	    width: 33.33%;
+	    display: inline-block;
+	    padding: 15rpx;
+	    box-sizing: border-box;
+		font-size: 28rpx;
+		    line-height: 60rpx;
+}
+.proxyapply-list ul li span.title{
+	color: #999;
+	    border-bottom: 1px solid #ddd;
+	    
+}
+.proxyapply-list ul li span:nth-child(1){
+	    width: 35%;
+}
+.proxyapply-list ul li span:nth-child(2){
+	    width: 50%;
+}
+.proxyapply-list ul li span:nth-child(3){
+	    width: 15%;
+}
+.proxyapply-list ul li span image{
+	    width: 50rpx;
+	    height: 50rpx;
+	    display: inline-block;
+	    vertical-align: middle;
+	    border-radius: 50%;
+	    margin: 5rpx;
+}

+ 109 - 0
packageUser/pages/user/proxyReview/proxyReview.js

@@ -0,0 +1,109 @@
+var _request = require('../../../../utils/request.js')
+var util = require('../../../../utils/util.js')
+Page({
+  data: {
+    page: 1,
+    per_page: 20,
+    list: [],
+    more: true,
+    balance: 0,
+	agentinfo:{}
+  },
+  onLoad: function (options) {
+	  var id = options.id;
+    this.getmyAgent(id)
+    // this.getBalanceList()
+  },
+  onShow () {
+  },
+  onReachBottom: function () {
+    if (this.data.more) {
+      var page = this.data.page + 1
+      this.setData({
+        page: page
+      })
+      this.getProxyList()
+    }
+  },
+  getBalanceInfo () {
+    var that = this
+    var url = 'v1/user/balance/info'
+    var params = {
+    }
+    var success = function (res) {
+      var result = res.data.total
+      that.setData({
+        balance: result
+      })
+    }
+    _request.$get(url, params, success)
+  },
+  getmyAgent(id){
+	  var that = this
+	  var url = 'v1/user/my_agent/'+id
+	  var params = {
+	  }
+	  var success = function (res) {
+	    var result = res.data
+	    that.setData({
+	      agentinfo: result
+	    })
+		console.log(result)
+	  }
+	  _request.$get(url, params, success)
+  },
+  applyproxy(){
+	  var that = this
+	  var id = that.data.agentinfo.id;
+	  var url = 'v1/user/com_agent/'+id
+	  var params = {
+	  }
+	  var success = function (res) {
+	    var result = res.data
+	    wx.showToast({
+	      title: '已审核通过',
+	      icon: 'none',
+	      duration: 2000
+	    })
+	    
+		that.getmyAgent(id)
+	  }
+	  _request.$get(url, params, success)
+  },
+  getProxyList() {
+    var that = this
+    var url = 'v1/user/my_agent'
+    var params = {
+      page: this.data.page,
+      per_page: this.data.per_page
+    }
+    var success = function (res) {
+      var result = that.data.list.concat(res.data.agent_list || [])
+      that.setData({
+        list: result
+      })
+      var listMore = res.data.count > that.data.list.length
+      that.setData({
+        more: listMore
+      })
+    }
+    _request.$get(url, params, success)
+  },
+  getDetail (val) {
+    var id = val.currentTarget.dataset.val
+    wx.navigateTo({
+      url: '/packageUser/pages/user/radishDetail/radishDetail?id=' + id
+    })
+  },
+  onShareAppMessage: function (val) {
+    return _request.share({
+      sc: 'xcx_user_radish'
+    })
+  },
+  toApplyinfo(e){
+	var id = e.currentTarget.dataset.id
+	  wx.navigateTo({
+	    url: '/packageUser/pages/user/proxyReview/proxyReview?id=' + id
+	  })
+  }
+})

+ 7 - 0
packageUser/pages/user/proxyReview/proxyReview.json

@@ -0,0 +1,7 @@
+{
+  "navigationBarTitleText": "代理审核",
+  "usingComponents": {
+    "format-time": "../../../../component/formatTime/formatTime"
+  },
+  "backgroundColor": "#f3f3f3"
+}

+ 30 - 0
packageUser/pages/user/proxyReview/proxyReview.wxml

@@ -0,0 +1,30 @@
+<view class="bg">
+  <view class="radish-main">
+    <view class="review-txt">
+		<text>申请日期</text>
+		<format-time type="formatDay" value="{{agentinfo.happen_time}}" style="float: right;"></format-time>
+	</view>
+	<view class="review-txt">
+		<text>手机号码</text>
+		{{agentinfo.mobile}}
+	</view>
+	<view class="review-txt">
+		<text>申请会员</text>
+		<image class="list-head" src="{{agentinfo.head}}" wx:if="{{agentinfo.head}}"></image>{{agentinfo.nickname}}
+	</view>
+	<view class="review-txt">
+		<text>上业绩</text>
+		{{agentinfo.sale_group_sum}}
+	</view>
+	<view class="review-txt">
+		<text>本月业绩</text>
+		{{agentinfo.sale_group}}
+	</view>
+  </view>
+  <view wx:if="{{agentinfo.status}}" class="review-button" style="background: #eee;color:#666">
+  	已审核
+  </view>
+  <view class="review-button" wx:else bindtap="applyproxy">
+  	审 核
+  </view>
+</view>

+ 160 - 0
packageUser/pages/user/proxyReview/proxyReview.wxss

@@ -0,0 +1,160 @@
+.bg {
+  position: relative;
+  width: 100%;
+  min-height: 100%;
+  background-color: #f3f3f3;
+}
+.radish-top {
+  width: 100%;
+  height: 360rpx;
+  background-image: url('http://fohow.oss-cn-shenzhen.aliyuncs.com/xcx/user/djquan.jpg');
+  background-size: 100%;
+}
+.radish-top__title {
+    padding: 95rpx 0 0;
+    font-size: 34rpx;
+    color: #FFF;
+    text-align: center;
+    text-shadow: 1px 1px 1px #bb954d;
+}
+.radish-top__count {
+    font-size: 70rpx;
+    color: #fff;
+    text-align: center;
+    text-shadow: 1px 1px 1px #e6231d;
+}
+.radish-top__btn {
+  position: absolute;
+  top: 190rpx;
+  left: 150rpx;
+  width: 196rpx;
+  height: 60rpx;
+  border: 2rpx solid #fff;
+  margin: 48rpx auto 0;
+  text-align: center;
+  line-height: 60rpx;
+  border-radius: 8rpx;
+  font-size: 28rpx;
+  color: #fff;
+}
+.radish-top__btn1 {
+    position: absolute;
+    top: 210rpx;
+    width: 206rpx;
+    height: 60rpx;
+    border: 2rpx solid #eb4d20;
+    margin: 48rpx auto 0;
+    text-align: center;
+    line-height: 60rpx;
+    border-radius: 45px;
+    font-size: 32rpx;
+    color: #fff;
+    right: calc(50% - 103rpx);
+    background: linear-gradient(to right,#eb712c,#e71f1c);
+}
+.radish-main {
+  background-color: #fff;
+}
+.radish-main__title {
+  height: 50rpx;
+  line-height: 50rpx;
+  color: #bbbbbb;
+  background-color: #f3f3f3;
+  text-align: center;
+  font-size: 24rpx;
+}
+.radish-main__line {
+  margin: 0 20rpx;
+  height: 100rpx;
+  border-bottom: 1rpx solid #eeeeee;
+}
+.radish-main__left {
+  float: left;
+  width: 450rpx;
+}
+.radish-main__text {
+  float: left;
+  padding-top: 16rpx;
+  font-size: 28rpx;
+  color: #4c4c4c;
+  width: 450rpx;
+}
+.radish-main__time {
+  float: left;
+  font-size: 18rpx;
+  color: #bbbbbb;
+  padding-top: 5rpx;
+}
+.radish-main__count {
+  float: right;
+  width: 260rpx;
+  font-size: 28rpx;
+  line-height: 100rpx;
+  text-align: right;
+  color: #eab86a;
+}
+.proxyapply-list{}
+.proxyapply-list ul{
+	    list-style: none;
+	    display: block;
+}
+.proxyapply-list ul li{display: block;}
+.proxyapply-list ul li span{
+	    width: 33.33%;
+	    display: inline-block;
+	    padding: 15rpx;
+	    box-sizing: border-box;
+		font-size: 28rpx;
+		    line-height: 60rpx;
+}
+.proxyapply-list ul li span.title{
+	color: #999;
+	    border-bottom: 1px solid #ddd;
+	    
+}
+.proxyapply-list ul li span:nth-child(1){
+	    width: 35%;
+}
+.proxyapply-list ul li span:nth-child(2){
+	    width: 50%;
+}
+.proxyapply-list ul li span:nth-child(3){
+	    width: 15%;
+}
+.proxyapply-list ul li span image{
+	    width: 50rpx;
+	    height: 50rpx;
+	    display: inline-block;
+	    vertical-align: middle;
+	    border-radius: 50%;
+	    margin: 5rpx;
+}
+
+.review-txt{
+	    padding: 25rpx;
+	    line-height: 50rpx;
+	    text-align: right;
+	    display: block;
+	    overflow: hidden;
+}
+.review-txt text{
+	float: left;
+	    color: #999;
+}
+.review-txt image{
+	    width: 55rpx;
+	    height: 55rpx;
+	    border-radius: 50%;
+	    display: inline-block;
+	    vertical-align: middle;
+	    margin-right: 25rpx;
+}
+.review-button{
+	margin: 40rpx 25rpx;
+	    display: block;
+	    background: #eab86a;
+	    text-align: center;
+	    padding: 15rpx;
+	    border-radius: 5px;
+	    color: #FFF;
+}

+ 2 - 2
packageUser/pages/user/radish/radish.wxml

@@ -5,9 +5,9 @@
     <!--<navigator url="/packageUser/pages/user/exchange/exchange" >
       <view class="radish-top__btn">兑换提货券</view>
     </navigator>-->
-    <navigator url="/packageUser/pages/user/buy/buy" >
+    <!-- <navigator url="/packageUser/pages/user/buy/buy" >
       <view class="radish-top__btn1">购买提货券</view>
-    </navigator>
+    </navigator> -->
   </view>
   <view class="radish-main">
     <view class="radish-main__title">交易记录</view>

+ 2 - 1
pages/start/start.wxss

@@ -9,7 +9,8 @@
   width: 740rpx;
   margin: 0 auto;
   height: 740rpx;
-  background-image: url('http://fohow.oss-cn-shenzhen.aliyuncs.com/xcx/xcx/start.png');
+  /* background-image: url('http://fohow.oss-cn-shenzhen.aliyuncs.com/xcx/xcx/start.png'); */
+  background-image: url('http://fohow.oss-cn-shenzhen.aliyuncs.com/xcx/xcx/start2.png');
   background-size: 100% 100%;
 }
 .start-height {

+ 5 - 0
pages/user/all/all.js

@@ -359,6 +359,11 @@ Page({
       url: '/pages/customservice/customservice'
     })
   },
+  toProxy () {
+	wx.navigateTo({
+	  url: '/packageUser/pages/user/proxyList/proxyList'
+	})
+  },
   toApplyLeader () {
     wx.navigateTo({
       url: '/packageUser/pages/user/applyLeader/applyLeader'

+ 9 - 5
pages/user/all/all.wxml

@@ -45,12 +45,12 @@
           <view class="user-radish">兑换提货券</view>
         </navigator>
         -->
-        <navigator bindtap="buyVoucher" wx:if="{{bindTel}}">
+        <!-- <navigator bindtap="buyVoucher" wx:if="{{bindTel}}">
           <view class="user-radish1" style="width:100%">购买提货券</view>
-        </navigator>
-        <navigator url="/packageUser/pages/user/otherbind/otherbind" wx:if="{{!bindTel}}">
+        </navigator> -->
+        <!-- <navigator url="/packageUser/pages/user/otherbind/otherbind" wx:if="{{!bindTel}}">
           <view class="user-radish1" style="width:100%">购买提货券</view>
-        </navigator>
+        </navigator> -->
         <!--<view class="line1"></view>-->
       </view>
       <view class="clean"></view>
@@ -152,11 +152,15 @@
         <image class="user-line__right" src="http://fohow.oss-cn-shenzhen.aliyuncs.com/xcx/user/right.png"></image>
       </view>
       -->
-      
+      <view class="user-line" bindtap="toProxy" >
+        <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>
         <image class="user-line__right" src="http://fohow.oss-cn-shenzhen.aliyuncs.com/xcx/user/right.png"></image>
       </view>
+	  
       <!--
       <view class="user-line" bindtap="toAbout" style="border:0;">
         <view class="user-line__title">关于商城</view>