login.vue 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <template>
  2. <ax-body blank="0" hideIndicatorArea>
  3. <image src="@/static/img/page-bg01.png" class="page-background"></image>
  4. <view class="body">
  5. <view class="title">
  6. <view>
  7. <view class="h1">您好!</view>
  8. <view class="h2">欢迎使用中数电动</view>
  9. </view>
  10. <image src="@/static/img/logo.svg" class="logo" mode="widthFix"></image>
  11. </view>
  12. <view class="logo-wrap">
  13. <image src="@/static/img/login-bg.svg" class="bg" mode="widthFix"></image>
  14. </view>
  15. <view class="footer" style="padding-left: 0;padding-right: 0;">
  16. <button @getphonenumber="onGetPhoneNumber" open-type="getPhoneNumber" class="submit" :disabled="!agreement" style="margin-left: 35px;width: calc(100% - 70px);">
  17. <text class="ax ax-iconblock i-weixin"></text>
  18. <text>微信用户一键登录</text>
  19. </button>
  20. <view class="cancel">取消返回</view>
  21. <view @click="agreement = !agreement" class="agreement" style="font-size: 17px;">
  22. <view class="mask" :class="{active:agreement}"><text class="ax ax-iconline i-select"></text></view>
  23. <text>我已阅读并理解和同意</text>
  24. <text @click.stop="checkPrivacy()" class="em">《隐私政策协议》</text>
  25. </view>
  26. </view>
  27. </view>
  28. </ax-body>
  29. </template>
  30. <script>
  31. export default {
  32. onLoad() {
  33. uni.getPrivacySetting({success:res=>{
  34. this.privacy.name = res.privacyContractName;
  35. this.privacy.need = res.needAuthorization;
  36. }});
  37. },
  38. data() {
  39. return {
  40. agreement: false,
  41. privacy:{
  42. need: true,
  43. name: ''
  44. },
  45. }
  46. },
  47. methods: {
  48. // 查看隐私
  49. checkPrivacy(){
  50. uni.openPrivacyContract();
  51. },
  52. onGetPhoneNumber(e){
  53. if(e.detail.code){
  54. this.$api.base("post",'/userApi/getPhone',{code:e.detail.code}).then(async res=>{
  55. await this.$app.storage.set('USER_INFO',res.userInfo);
  56. this.$app.url.back()
  57. });
  58. }
  59. },
  60. }
  61. }
  62. </script>
  63. <style scoped>
  64. @import url("login.css");
  65. </style>