正在显示
3 个修改的文件
包含
4 行增加
和
4 行删除
@@ -12,11 +12,11 @@ | @@ -12,11 +12,11 @@ | ||
12 | </view> --> | 12 | </view> --> |
13 | <view class="btnBox flexC" @click="login" v-if="!agreeStatus"> | 13 | <view class="btnBox flexC" @click="login" v-if="!agreeStatus"> |
14 | <image src="/static/indexIc/loginBtn.png" mode=""></image> | 14 | <image src="/static/indexIc/loginBtn.png" mode=""></image> |
15 | - 微信账号一键登录 | 15 | + 手机号快捷登录 |
16 | </view> | 16 | </view> |
17 | <view class="btnBox flexC" v-else> | 17 | <view class="btnBox flexC" v-else> |
18 | <image src="/static/indexIc/loginBtn.png" mode=""></image> | 18 | <image src="/static/indexIc/loginBtn.png" mode=""></image> |
19 | - 微信账号一键登录 | 19 | + 手机号快捷登录 |
20 | <button open-type="getPhoneNumber" @getphonenumber="getphonenumber"></button> | 20 | <button open-type="getPhoneNumber" @getphonenumber="getphonenumber"></button> |
21 | </view> | 21 | </view> |
22 | <view class="agreeBox flexC"> | 22 | <view class="agreeBox flexC"> |
1 | -"use strict";const e=require("../../common/vendor.js"),v=require("../../api/index.js");require("../../utils/request.js");const p={__name:"login",setup(_){const o=e.ref(!1),i=e.ref(""),s=e.ref("1213231");e.onLoad(()=>{e.index.getStorageSync("token")&&e.index.reLaunch({url:"/pages/index/index"})}),e.onShow(()=>{u()});const l=()=>{if(!o.value)return e.index.showToast({title:"请勾选协议",icon:"none"})},g=n=>{n.detail.errMsg=="getPhoneNumber:fail user deny"?e.index.showToast({title:"您已取消授权",icon:"none"}):d(n.detail.encryptedData,n.detail.iv)},u=()=>{e.index.login({provider:"weixin",success:function(n){console.log(n),i.value=n.code}})},d=async(n,c)=>{try{let t={code:i.value,encryptedData:n,iv:c,wxCode:s.value};const a=await v.getLogin(t);e.index.setStorageSync("token",a.token),e.index.setStorageSync("userInfo",a),e.index.reLaunch({url:"/pages/index/index"}),console.log("getLogin",a)}catch(t){console.log("getLogin",t)}},r=n=>{e.index.navigateTo({url:`/pages/index/richText?type=${n}`})},x=()=>{o.value=!o.value};return(n,c)=>e.e({a:!o.value},o.value?{c:e.o(g)}:{b:e.o(l)},{d:!o.value},o.value?{}:{},{e:e.o(x),f:e.o(t=>r(4)),g:e.o(t=>r(5))})}},f=e._export_sfc(p,[["__file","D:/vue/大健康商城/healthMall/pages/login/login.vue"]]);wx.createPage(f); | 1 | +"use strict";const e=require("../../common/vendor.js"),v=require("../../api/index.js");require("../../utils/request.js");const p={__name:"login",setup(_){const o=e.ref(!1),i=e.ref(""),s=e.ref("");e.onLoad(()=>{e.index.getStorageSync("token")&&e.index.reLaunch({url:"/pages/index/index"})}),e.onShow(()=>{u()});const l=()=>{if(!o.value)return e.index.showToast({title:"请勾选协议",icon:"none"})},g=n=>{n.detail.errMsg=="getPhoneNumber:fail user deny"?e.index.showToast({title:"您已取消授权",icon:"none"}):d(n.detail.encryptedData,n.detail.iv)},u=()=>{e.index.login({provider:"weixin",success:function(n){console.log(n),i.value=n.code}})},d=async(n,c)=>{try{let t={code:i.value,encryptedData:n,iv:c,wxCode:s.value};const a=await v.getLogin(t);e.index.setStorageSync("token",a.token),e.index.setStorageSync("userInfo",a),e.index.reLaunch({url:"/pages/index/index"}),console.log("getLogin",a)}catch(t){console.log("getLogin",t)}},r=n=>{e.index.navigateTo({url:`/pages/index/richText?type=${n}`})},x=()=>{o.value=!o.value};return(n,c)=>e.e({a:!o.value},o.value?{c:e.o(g)}:{b:e.o(l)},{d:!o.value},o.value?{}:{},{e:e.o(x),f:e.o(t=>r(4)),g:e.o(t=>r(5))})}},f=e._export_sfc(p,[["__file","D:/vue/大健康商城/healthMall/pages/login/login.vue"]]);wx.createPage(f); |
1 | -<view class=""><view class="bgBox"><image src="/static/indexIc/loginBg.png" mode=""></image></view><view class="logo flexC"><image src="/static/indexIc/lo.jpg" mode=""></image></view><view wx:if="{{a}}" class="btnBox flexC" bindtap="{{b}}"><image src="/static/indexIc/loginBtn.png" mode=""></image> 微信账号一键登录 </view><view wx:else class="btnBox flexC"><image src="/static/indexIc/loginBtn.png" mode=""></image> 微信账号一键登录 <button open-type="getPhoneNumber" bindgetphonenumber="{{c}}"></button></view><view class="agreeBox flexC"><view class="checkImage" bindtap="{{e}}"><image wx:if="{{d}}" src="/static/shopCarIc/checks.png" mode=""></image><image wx:else src="/static/shopCarIc/modeCheck.png" mode=""></image></view><view class="agree flexA"> 我已阅读并同意 <view class="" bindtap="{{f}}">《用户协议》</view> 和 <view class="" bindtap="{{g}}">《隐私协议》</view></view></view></view> | ||
1 | +<view class=""><view class="bgBox"><image src="/static/indexIc/loginBg.png" mode=""></image></view><view class="logo flexC"><image src="/static/indexIc/lo.jpg" mode=""></image></view><view wx:if="{{a}}" class="btnBox flexC" bindtap="{{b}}"><image src="/static/indexIc/loginBtn.png" mode=""></image> 手机号快捷登录 </view><view wx:else class="btnBox flexC"><image src="/static/indexIc/loginBtn.png" mode=""></image> 手机号快捷登录 <button open-type="getPhoneNumber" bindgetphonenumber="{{c}}"></button></view><view class="agreeBox flexC"><view class="checkImage" bindtap="{{e}}"><image wx:if="{{d}}" src="/static/shopCarIc/checks.png" mode=""></image><image wx:else src="/static/shopCarIc/modeCheck.png" mode=""></image></view><view class="agree flexA"> 我已阅读并同意 <view class="" bindtap="{{f}}">《用户协议》</view> 和 <view class="" bindtap="{{g}}">《隐私协议》</view></view></view></view> |
-
请 注册 或 登录 后发表评论