// components/contactmov/contactmov.js const util = require('../../utils/util.js'); const api = require('../../config/api.js'); Component({ /** * 组件的属性列表 */ properties: { pageX: { type: Number, default: 600 }, pageY: { type: Number, default: 1000 } }, /** * 组件的初始数据 */ data: { randomNum:(Math.random()*100000000).toFixed(0) }, /** * 组件的方法列表 */ methods: { goJoin(){ // if (!app.globalData.hasLogin) { // wx.navigateTo({ // url: "/pages/auth/login/login" // }); // return; // } util.request(api.AuthInfo, {}, "GET") .then(res => { if (res.errno == 0) { let mobile=res.data.mobile; let randomBoolean = Math.random() < 0.5; let cp=randomBoolean==true?"13127931250" : "13122656821"; wx.navigateTo({ url: '/pages/ucenter/wx/join?mobile='+mobile+'&cp='+cp, }) } }) } } })