const app = getApp() const Http = require("../../utils/HttpBasics"); const config = require("../../config/config"); const navigationBarHeight = (getApp().statusBarHeight + 44) + "px" Page({ data: { navigationBarHeight, mallImgUrl:"", }, backHome(){ tt.reLaunch({ url: "/index/index", success: (res) => { app.globalData.selected = 0; }, fail: (res) => { }, }); }, back: function() { tt.navigateBack({ delta: 1, success: (res) => { }, fail: (res) => { }, }); }, bindPhone(e){ console.log(e); Http.post({ url:config.api.getUserPhone, data: { encryptedData: e.detail.encryptedData, iv: e.detail.iv } }).then(res=>{ this.back() }).catch(err=>{ tt.showToast({ title: err.message?err.message:err.data, icon: 'none', duration: 2000, mask: false }); }) }, onLoad: function (options) { Http.get({ url: config.api.marketicon, data: { appId: 'ttef6599d8705b49b101' } }).then(res => { this.setData({ mallImgUrl: res.data.mallImgUrl }); tt.setNavigationBarTitle({ title: res.data.mallName }) }) .catch(err => { tt.showToast({ title: err.message?err.message:err.data, icon: 'none', duration: 2000, mask: false }); }) } })