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.

108 lines
2.0 KiB

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