123456789101112131415161718192021222324252627282930313233 |
- const app = getApp()
- const httpUtils = require('../../utils/http.js')
- const ui = require('../../utils/ui.js')
- Page({
- data: {
- phone: ''
- },
- getInputName(e){
- this.setData({
- phone: e.detail.value
- })
- },
- toSubmit() {
- let phoneNumber = this.data.phone;
- let obj = {
- url: '/phoneInfo',
- data: {
- phone: phoneNumber,
- openId: wx.getStorageSync('openId')
- }
- }
- httpUtils.request(obj).then(res=>{
- console.log(res)
- wx.setStorageSync('token', res.data.data.token)
- wx.setStorageSync('phone', phoneNumber)
- wx.switchTab({
- url: '/pages/list/index',
- })
- }).catch(err=>{
- console.log('ERROR')
- });
- }
- })
|