| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- const LOGIN_LIST = ['pages/mine/mine']
- /*
- * 全局注入器
- */
- let page = {
- data() {
- return {
- }
- },
- computed: {
- //ios底部安全区域
- safeAreaBottom() {
- let info = uni.getSystemInfoSync()
- let safe = 20
- if (
- info && ['devtools', 'ios'].includes(info.platform) &&
- info.statusBarHeight > safe
- ) {
- return info.statusBarHeight - safe + 'px'
- }
- return 0
- }
- },
- onLoad(options) {
- },
- onShow() {
- let currentPage = this.$util.getCurrentRoute()
- if (LOGIN_LIST.includes(currentPage)) {
- this.login()
- }
- },
- methods: {
- init(){
- console.log("登录成功,初始化数");
- },
- // 登录 begin
- showLogin() {
- this.$refs.login.show()
- },
- signIn(resp) {
- //获取数据
- this.init()
- },
- async login(e) {
- if (this.$isEmpty(this.vuex_userId)) {
- this.showLogin()
- return
- }
- //获取数据
- this.init()
- //获取手机号
- if (this.$isEmpty(this.vuex_phone)&&this.$config.isAuthPhone) {
- this.$refs.login.showPhoneModal()
- }
- },
- async checkIsCmcc(){
- if (this.$isEmpty(this.vuex_phone)) {
- return
- }
- let params={
- phone:this.vuex_phone
- }
- let res=await this.$api.CMCC.isCMCC(params)
- console.log(res,"res....");
- return res.data.data
- },
- phoneSuccess(){
- console.log('手机号获取成功>>>>>>>>');
- },
- // 登录 end
- },
- }
- export default page
|