You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

101 lines
1.9 KiB

import common from "../../utils/https/common";
// pages/user/user.js
import userApi from "../../utils/https/user"
let app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
height: 0,
info: null
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
let rect = wx.getMenuButtonBoundingClientRect();
this.setData({
height: rect.top + rect.height
})
},
supplier:function(){
app.globalData.weburl = "https://m.cloud.sz-trip.com/Audit"
wx.navigateTo({
url: '/pages/pbService/web/index',
})
},
retail: function () {
common.user_post('commission/getCommissionUser', {}).then(res => {
if (res.code == 0) {
wx.navigateTo({
url: 'retail/apply/index',
})
}
else if (res.data.status == 0) {
wx.showToast({
title: '正在审核中,请联系管理员',
icon: 'none'
})
}
else if (res.data.status == 2) {
wx.showToast({
title: '审核拒绝,请联系管理员',
icon: 'none'
})
}
else if (res.data.status == 1) {
wx.navigateTo({
url: 'retail/index',
})
}
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
userApi.user_post("user/getMyInfo").then(res => {
this.setData({
info: res.data
})
})
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
}
})