1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- // components/contactmov/contactmov.js
- const util = require('../../utils/util.js');
- const api = require('../../api/api.js');
- Component({
- /**
- * 组件的属性列表
- */
- properties: {
- pageX: {
- type: Number,
- default: 600
- },
- pageY: {
- type: Number,
- default: 1000
- }
- },
- /**
- * 组件的初始数据
- */
- data: {
- randomNum:(Math.random()*100000000).toFixed(0)
- },
- /**
- * 组件的方法列表
- */
- methods: {
- goIm(){
- wx.navigateTo({
- url: '/pages/chat/im/im'
- });
- },
- 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,
- })
- }
- })
-
- }
- }
- })
|