<template> <view class="page-bg"> <view class="main-container"> <view class=" tl-Mt-388 "> We will use <text Class =" tL-blue "> Privacy Policy </text> and <text class=" tL-Blue "> User Agreement </text> help you understand how we collect, use, store and share personal information, especially the relationship between the types of personal information we collect and the purposes for which we use it. In addition, you will learn about your rights and how to achieve them, as well as the security technologies we use to protect your personal information. You must fully read and understand the content of this policy. If you agree, please click the button below to start accepting our services. </view> {{jsCode}} {{iv}} {{encryptedData}} <view class="mt-640"> <button class="tl-btn-630" open-type="getPhoneNumber" </button> <button class=" tL-bTN-630-border "@tap="goMy"> Disagree and exit </button> </view>  </view> </view> </template> <script> export default { data() { return { jsCode: '', iv: '', encryptedData: '', } }, onLoad(){ let self = this; self.login(); }, methods: { login() { uni.login({ success: (res) => { console.log("login", JSON.stringify(res)); this.jsCode = res.code; //console.log('res.code',res.code) } }) }, -- @zxyuns2021-02-26 getPhoneNumber(e) {uni.showloading ({}) console.log(e.daile.errmsg); console.log('iv',e.detail.iv); console.log('encryptedData',e.detail.encryptedData); this.iv = e.detail.iv this.encryptedData = e.detail.encryptedData let self = this; // Let params = {jsCode: self.jsCode, encryptedData: e.dail. encryptedData, iv: e.detail.iv, } this.$http.post('getPhoneNumber', {}).then(([error, res]) => { uni.hideLoading(); if(res.data.code == 200) { self.phone = res.RESULT.phoneNumber; self.login(); Else {this.$common.toast(res.data.msg)}}) /* Request ({url: inter.getphonenumber, data: { jsCode: self.jsCode, encryptedData: e.detail.encryptedData, iv: e.detail.iv, }, callback: (res) => { console.log('res', res) uni.hideLoading(); if (res.CODE == 0) { self.phone = res.RESULT.phoneNumber; self.login(); Else {uni. ShowToast ({title: res.MESSAGE, mask: true, icon: 'None'}); } } })*/ }, goToPublish() { uni.navigateTo({ url: '/ pages/publish/publish'}}), / / to the individual center goMy () {uni. SwitchTab ({url: "/ pages/my/my"})}, } } </script> <style> .page-bg { width: 100vw; height: auto; overflow: hidden; background-size: 750rpx auto; background-color: #fff; } .main-container { margin: 0 auto; display: flex; flex-direction: column; } .tl-mt-388{ padding: 62rpx 40rpx; } .tl-blue{ font-size: 28rpx; font-family: PingFangSC-Regular, PingFang SC; font-weight: 400; color: #2B75AB; } .tl-btn-630{ width: 630rpx; height: 88rpx; line-height: 88rpx; background: #F2C827; border-radius: 44rpx; font-size: 28rpx; font-family: PingFangSC-Medium, PingFang SC; font-weight: 500; color: #464646; } .tl-btn-630-border{ width: 630rpx; height: 88rpx; line-height: 88rpx; border: 2rpx solid #979797; border-radius: 44rpx; font-size: 28rpx; font-family: PingFangSC-Medium, PingFang SC; font-weight: 500; color: #464646; margin-top: 20rpx; } .mt-640{ margin-top: 340rpx; } </style>Copy the code