junyuanz пре 5 година
родитељ
комит
e790e2da02

+ 1 - 0
app.json

@@ -57,6 +57,7 @@
         "pages/user/invite/contribution/contribution",
         "pages/user/invite/material/material",
         "pages/user/identity/identity",
+        "pages/user/bindoldsys/bindoldsys",
         "pages/user/bankinfo/bankinfo",
         "pages/user/recharge/recharge",
         "pages/user/withdraw/withdraw"

+ 94 - 0
packageUser/pages/user/bindoldsys/bindoldsys.js

@@ -0,0 +1,94 @@
+var _request = require('../../../../utils/request.js')
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    isCertificate: 0,
+    certificateData: {},
+    user_no: '',
+    remark: '',
+    d5cData: {},
+    wxid:'',
+    showbindover:false
+  },
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+  	console.log('options',options);
+  	this.setData({
+  		wxid:options.id
+  	})
+    this.checkCertified()
+  },
+  userNo (e) {
+    console.log(e)
+    var that = this
+    that.setData({
+      user_no: e.detail.value
+    })
+  },
+  remark (e) {
+    console.log(e)
+    var that = this
+    that.setData({
+      remark: e.detail.value
+    })
+  },
+  
+  checkCertified () {
+    var that = this
+    var url = 'v1/user/certificate'
+    var params = {
+    }
+    var success = function (res) {
+      that.setData({
+        certificateData: res.data,
+        isCertificate: res.data.is_certification
+      })
+    }
+    _request.$get(url, params, success)
+  },
+  confirmClick () {
+    var that = this
+    var url = 'v1/sys_user/'+that.data.wxid+'/bind'
+    var params = {
+      user_no: that.data.user_no,
+      remark: that.data.remark
+    }
+    var success = function (res) {
+      if (res.data) {
+        wx.showToast({
+          title: '绑定成功~',
+          icon: 'none',
+          duration: 2000
+        })
+        that.setData({showbindover:true})
+      }
+    }
+    _request.$put(url, params, success)
+  },
+  d5cCertificate () {
+    var that = this
+    var url = 'v1/user/check_cert'
+    var params = {
+    }
+    var success = function (res) {
+      if (res.data) {
+        that.setData({
+          d5cData: res.data,
+          realname: res.data.real_name,
+          idno: res.data.icer_card
+        })
+      }
+    }
+    _request.$get(url, params, success)
+  },
+  onShareAppMessage: function (val) {
+    return _request.share({
+      sc: 'xcx_user_identity'
+    })
+  }
+})

+ 4 - 0
packageUser/pages/user/bindoldsys/bindoldsys.json

@@ -0,0 +1,4 @@
+{
+  "navigationBarTitleText": "旧系统用户绑定",
+  "disableScroll": true
+}

+ 39 - 0
packageUser/pages/user/bindoldsys/bindoldsys.wxml

@@ -0,0 +1,39 @@
+<view class="identity__bg">
+  <view class="identity__head">
+    <image src="https://fohow.oss-cn-shenzhen.aliyuncs.com/xcx/xcx/rabbitimg/identity_bg.png"></image>
+  </view>
+
+  <view class="identity_wid">
+    <view class="identity_content">
+      <view class="title">会员绑定</view>
+      <view class="identity_name">
+        <view class="fl">
+          <text>会员编号</text>
+          <input type="text" bindinput="userNo" placeholder="会员编号" value="{{user_no}}" />
+          <view class="clean"></view>
+        </view>
+        <!--<view class="btn" bindtap="d5cCertificate">获取认证信息</view>-->
+        <view class="clean"></view>
+      </view>
+
+      <view class="identity_number">
+        <text>备注</text>
+        <input type="text" placeholder="备注" bindinput="remark" value="{{remark}}" />
+        <view class="clean"></view>
+      </view>
+
+      <view class="identity_btn" bindtap="confirmClick">立即绑定</view>
+      
+    </view>
+  </view>
+
+	<view class="overbind" wx:if="{{showbindover}}">
+		<view class="overbind-box">
+			<text class="overbind-txth">会员绑定</text>
+			<text class="overbind-txti">已成功绑定,请重启小程序更新绑定后的数据!</text>
+			<navigator hover-class="none" open-type="exit" target="miniProgram" class="overbind-btn">确定退出</navigator>
+		</view>
+		
+	</view>
+
+</view>

+ 157 - 0
packageUser/pages/user/bindoldsys/bindoldsys.wxss

@@ -0,0 +1,157 @@
+.identity__bg {
+  width: 100%;
+  min-height: 100%;
+  background: #f3f3f3;
+}
+.identity__head {
+  width: 100%;
+  height: 248rpx;
+  background-image: linear-gradient(180deg, 
+    #eab86a 0%, 
+    #d4932b 100%);
+}
+.identity__head image {
+  display: block;
+  width: 201rpx;
+  height: 251rpx;
+  margin: 0 auto;
+}
+.identity_wid {
+  width: 100%;
+  padding: 0 20rpx;
+  box-sizing: border-box;
+}
+.identity_content {
+  position: relative;
+  width: 100%;
+  background: #fff;
+  padding: 54rpx 30rpx 38rpx;
+  margin-top: 20rpx;
+  box-sizing: border-box;
+}
+.identity_content .title {
+  text-align: center;
+  font-size: 28rpx;
+  color: #7f93ae;
+  margin-bottom: 54rpx;
+}
+.identity_name, .identity_number {
+  width: 100%;
+  height: 100rpx;
+  background: #f6f9fd;
+  border: 1rpx solid #e5e5e5;
+  padding-left: 30rpx;
+  padding-right: 20rpx;
+  margin-bottom:30rpx;
+  box-sizing: border-box;
+}
+.identity_name fl {
+  float: left;
+}
+.identity_name text, .identity_number text{
+  /*display: inline-block;*/
+  float: left;
+  width: 140rpx;
+  line-height: 100rpx;
+  font-size: 28rpx;
+  color: #7f93ae;
+}
+.identity_name input {
+  float: left;
+  width: 160rpx;
+  height: 100rpx;
+  border: none;
+  outline: none;
+  font-size: 28rpx;
+  color: #b8c6d9;
+}
+.identity_name .btn {
+  float: right;
+  width: 260rpx;
+  height: 52rpx;
+  background: #fff;
+  border-radius: 26rpx;
+  line-height: 52rpx;
+  font-size: 24rpx;
+  color: #eab86a;
+  border: 1rpx solid #eab86a;
+  box-sizing: border-box;
+  text-align: center;
+  margin-top: 24rpx;
+}
+.identity_number input {
+  float: left;
+  width: 440rpx;
+  height: 100rpx;
+  border: none;
+  outline: none;
+  font-size: 28rpx;
+  color: #b8c6d9;
+}
+.identity_btn {
+  width: 100%;
+  height: 88rpx;
+  background: #eab86a;
+  border-radius: 8rpx;
+  line-height: 88rpx;
+  text-align: center;
+  font-size: 28rpx;
+  color: #ffffff;
+}
+.identity__img {
+  position: absolute;
+  width: 224rpx;
+  height: 162rpx;
+  right: 0;
+}
+.identity_headImg {
+  width: 172rpx;
+  height: 172rpx;
+  margin: 0 auto 46rpx;
+}
+.identity_headImg image {
+  width: 100%;
+  height: 100%;
+  border-radius: 50%;
+}
+.identity_content .info {
+  font-size: 28rpx;
+  color: #7f93ae;
+  text-align: center;
+  margin-bottom: 24rpx;
+}
+
+
+.overbind{
+	    position: fixed;
+    width: 100%;
+    height: 100%;
+    left: 0;
+    top: 0;
+    background: rgba(0,0,0,0.4);
+    z-index: 9;
+}
+.overbind-box{
+	    width: 80%;
+    margin: 30% auto;
+    background: #FFF;
+    border-radius: 4px;
+    text-align: center;
+    padding: 40rpx;
+    box-sizing: border-box;
+    overflow: hidden;
+}
+.overbind-txth{
+	display: block;
+    font-size: 36rpx;
+    font-weight: normal;
+    color: #333;
+}
+.overbind-txti{
+	text-align: left;
+    display: block;
+    padding: 25rpx 0;
+    color: #666;
+    font-size: 30rpx;
+}
+.overbind-btn{}

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

@@ -78,7 +78,6 @@ Page({
 		          that.setData({
 		            userInfo: userInfo
 		          })
-		          
 		          //checkwxhead---start
 						    if(res.data.wx_user.full_head == ''){
 						    	wx.getSetting({
@@ -312,6 +311,12 @@ Page({
     	})
   	}
   },
+  toBindOldSys () {
+  	let that = this;
+    wx.navigateTo({
+      url: '/packageUser/pages/user/bindoldsys/bindoldsys?id='+that.data.userInfo.id
+    })
+  },
   toIdentity () {
     wx.navigateTo({
       url: '/packageUser/pages/user/identity/identity'

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

@@ -121,6 +121,11 @@
       </view>
     </view>
     <view class="user-padding">
+      <view class="user-line" bindtap="toBindOldSys" wx:if="{{userInfo.can_bind}}">
+        <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="toIdentity">
         <view class="user-line__title">会员认证</view>
         <image class="user-line__right" src="http://fohow.oss-cn-shenzhen.aliyuncs.com/xcx/user/right.png"></image>