1234567891011121314151617181920212223242526272829303132333435363738 |
- const app = getApp()
- const httpUtils = require('../../utils/http.js')
- const ui = require('../../utils/ui.js')
- Page({
- data: {
- list: []
- },
- onLoad() {
- this.getList()
- },
- toUrl(e){
- console.log(e)
- let deviceid = e.currentTarget.dataset.deviceid
- let roomName = e.currentTarget.dataset.roomname
- let deviceCode = e.currentTarget.dataset.devicecode
- wx.navigateTo({
- url: '/pages/bill/index?deviceid=' + deviceid + '&roomName=' + roomName + '&deviceCode=' + deviceCode
- })
- },
- getList(){
- let obj = {
- url: '/api/erp/we/roomList',
- data: {
- phone: wx.getStorageSync('phone'),
- token: wx.getStorageSync('token'),
- }
- }
- httpUtils.request(obj).then(res=>{
- console.log(res)
- this.setData({
- list: res.data.data
- })
- }).catch(err=>{
- console.log('ERROR')
- });
- }
-
- })
|