Эх сурвалжийг харах

Merge branch 'dev3.5' of http://192.168.3.207:10080/qmx/jy into dev3.5

wangshan 4 жил өмнө
parent
commit
b6dca5442b

+ 9 - 1
src/jfw/modules/app/src/web/staticres/jyapp/me/css/account.css

@@ -1,4 +1,5 @@
 .weixin,
+.phone,
 .email {
     width: 0.78rem;
     height: 0.78rem;
@@ -9,6 +10,13 @@
     background-color: #2abed1;
     border-radius: 50%;
 }
+.phone-img{
+    display: inline-block;
+    width: .48rem;
+    height: .48rem;
+    background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACIAAAAwCAYAAAB0WahSAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAEOSURBVHgB7ZnRDYIwEIZ/jAPgBoygG8AGbCAbOIJsRJwANsANcAPd4DyEGjxRQxuKD/cllzY0XD/ovXAAA4go5Dhy1DQ/7R6Z2TsYSEQ8lBwR/HLhSIKFJZ4yq36SLijREhmRPRbGHA19WK8wDzGmiAQMZmBsvxX+BBWRqIhERSQqIlERiYpIVESiIhIVkaiIREUkKiJREcn62yJ/oubwxK9ugDe0RiRruFNxnPr5AS4tMLKnGMlVkAWuxbrjptJZiEQ8NJiIq8iGRW7yok0+12Ld4l0igy18c0N2NBzpIE9MlrlMgpzcuJL9wzwwNRLyUGPpFnhfcAm6Br13iX7vV/jtZOTnN0lJXUm0p4E7KCCQ/JgS4goAAAAASUVORK5CYII=) no-repeat center center;
+    background-size: contain;
+}
 .wx-img{
     display: inline-block;
     width: .48rem;
@@ -70,7 +78,7 @@
     font-size: 48px;
 }
 
-.bindphonenum,.bind-company {
+.bind-phone,.bind-company {
     color: #2abed1;
     display: none;
 }

+ 21 - 26
src/jfw/modules/app/src/web/staticres/jyapp/me/js/account.js

@@ -26,10 +26,22 @@ var account = {
             url: "/jypay/user/weixin/check?t=" + Date.now(),
             type: "GET",
             success: function(r){
-                if(r.error_code == 0 && r.data.showWxBind){
-                    $('#bindWX').show()
+                if(r.error_code == 0){
+                    if(r.data.showWxBind) {
+                        // 手机号用户
+                        $('#wxInfo').hide();
+                        $('#bindWX').show();
+                        $('#bindPhone').show();
+                        $('#phoneInfo').hide();
+                    } else {
+                        // 微信用户
+                        $('#wxInfo').show();
+                        $('#bindPhone').hide()
+                        $('#bindWX').hide();
+                        $('#phoneInfo').show()
+                    }
                 } else {
-                    $('#bindWX').hide()
+                    console.log(r.error_code)
                 }
             }
         })
@@ -52,20 +64,16 @@ var account = {
                     $(".email_binding").text("去绑定");
                 }
                 if (phone) {
-                    $(".phonenum").show().text(fn(phone));
+                    $('.telNumber').text(fn(phone))
+                    $(".phoneNum").show().text(fn(phone));
                     //修改手机号
                     $(".phoneClick").on("click", function () {
-                        // _this.isSafeValid(function(res){
-                        //     if(res.data.state == 1) {
-                        //         location.href = '/jyapp/account/phone/change'
-                        //     } else {
-                        //         location.href = '/jyapp/account/auth/check?type=change-phone';
-                        //     }
-                        // })
                         location.href = '/jyapp/account/auth/check?type=change-phone&way=phone';
                     })
+                    $('.phone_binding').text('已绑定')
                 } else {
-                    $(".bindphonenum").show();
+                    $(".bind-phone").show();
+                    $('.phone_binding').text('去绑定')
                     //绑定手机号
                     $(".phoneClick").on("click", function () {
                         window.location.href = "/jyapp/account/phone/bind";
@@ -73,6 +81,7 @@ var account = {
                 }
                 if (nickname) {
                     $("#nickname").text(nickname);
+                    $('.wx_name').text(nickname)
                     $(".wx_binding").text("已绑定");
                 } else {
                     $(".wx_binding").text("去绑定");
@@ -170,22 +179,8 @@ var account = {
             console.log(val)
             if (val == '去绑定') {
                 location.href = '/jyapp/account/mail/bind';
-                // that.isSafeValid(function(res){
-                //     if(res.data.state == 1) {
-                //         location.href = '/jyapp/account/mail/bind'
-                //     } else {
-                //         location.href = '/jyapp/account/auth/check?type=bind-email';
-                //     }
-                // })
             } else {
                 location.href = '/jyapp/account/auth/check?type=change-email&way=email';
-                // that.isSafeValid(function(res){
-                //     if(res.data.state == 1) {
-                //         location.href = '/jyapp/account/mail/change'
-                //     } else {
-                //         location.href = '/jyapp/account/auth/check?type=change-email';
-                //     }
-                // })
             }
         })
     },

+ 23 - 2
src/jfw/modules/app/src/web/templates/me/account.html

@@ -29,13 +29,21 @@
         <div class="j-body account">
             <div class="j-main">
                 <div class="tel">
+                    <div role="button" class="van-cell van-cell--clickable van-cell--center" id="wxInfo">
+                        <div class="van-cell__title">
+                            <span>微信昵称</span>
+                        </div>
+                        <div class="van-cell__value">
+                            <span class="wx_name" ></span>
+                        </div>
+                    </div>
                     <div role="button" class="van-cell van-cell--clickable van-cell--center" id="bindPhone">
                         <div class="van-cell__title">
                             <span>手机号</span>
                         </div>
                         <div class="van-cell__value phoneClick">
-                            <span class="phonenum" style="display:none"></span>
-                            <span class="bindphonenum">去绑定</span>
+                            <span class="phoneNum" style="display:none"></span>
+                            <span class="bind-phone">去绑定</span>
                         </div>
                         <i class="van-icon van-icon-arrow van-cell__right-icon phone-icon"></i>
                     </div>
@@ -53,6 +61,19 @@
                 <div class="bindinfo">
                     <div class="van-cell-group__title">绑定信息</div>
                     <div class="van-cell-group van-hairline--top-bottom">
+                        <div role="button" class="van-cell van-cell--clickable van-cell--center" id="phoneInfo">
+                            <div class="phone">
+                                <span class="phone-img"></span>
+                            </div>
+                            <div class="van-cell__title">
+                                <span>手机号</span>
+                                <div class="van-cell__label telNumber"></div>
+                            </div>
+                            <div class="van-cell__value phoneClick">
+                                <span class="phone_binding">去绑定</span>
+                            </div>
+                            <i class="van-icon van-icon-arrow van-cell__right-icon"></i>
+                        </div>
                         <div role="button" class="van-cell van-cell--clickable van-cell--center" id="bindWX">
                             <div class="weixin">
                                 <span class="wx-img"></span>

+ 6 - 3
src/jfw/modules/app/src/web/templates/me/login.html

@@ -19,18 +19,21 @@
 		justify-content: center;
 		padding-right: 44px;
 		width: 100%;
+		height: 36px;
 	}
 	.rules #ifagree{
 		visibility: hidden;
 	}
 	.rules .selectlabel{
 		display: flex;
+		align-items: center;
 		margin-left: 8px;
 		font-size: 13px;
 		color: #171826;
+		height: 100%;
 	}
 	.rules .selectlabel .agreeleft{
-		margin-left: 10px;
+		margin-left: 8px;
 	}
 	.rules .checkbox-custom {
 		position: absolute;
@@ -145,9 +148,7 @@
 		$(function(){
 			// 点击勾选是否同意协议和隐私条款
 			$('.selectcheck').on('click',function(){
-				console.log('222')
 				var propchecked = $('.checkbox-custom').hasClass('active')
-				console.log(propchecked)
 				if(propchecked){
 					$('.checkbox-custom').removeClass('active')
 				}else{
@@ -299,6 +300,7 @@
 								if(localStorage){
 									localStorage.loginPhone = phone;
 								}
+								$('.rules').hide()
 								loginSuccess(r);
 							}else{
 								showTip("手机号或密码错误",1000);
@@ -310,6 +312,7 @@
 								if(localStorage){
 									localStorage.loginPhone = phone;
 								}
+								$('.rules').hide()
 								loginSuccess(r);
 							}else{
 								showTip("验证码错误",1000);

+ 1 - 1
src/jfw/modules/app/src/web/templates/me/register.html

@@ -21,7 +21,7 @@
 		align-items: center;
 		padding-right: 44px;
 		width: 100%;
-		height: 24px;
+		height: 36px;
 	}
 	.rules #ifagree{
 		visibility: hidden;

+ 7 - 0
src/web/staticres/me/css/security.css

@@ -34,10 +34,17 @@
     display: flex;
     align-items: center;
     font-size: .28rem;
+    line-height: .36rem;
     color: #9B9CA3;
     max-width: 70%;
 }
 
+/* 解决文字上下边显示不全的问题(原因:overflow:hidden将其隐藏) */
+.hd-info-value.ellipsis,
+.hd-info-value .ellipsis {
+    overflow-y: unset;
+}
+
 .bind-tip-text {
     padding: .16rem .32rem;
     font-size: .32rem;