|
|
|
|
import common from "../../utils/https/common";
|
|
|
|
|
// pages/user/user.js
|
|
|
|
|
import userApi from "../../utils/https/user"
|
|
|
|
|
import util from '../../utils/util'
|
|
|
|
|
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
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
util.pagePoint({
|
|
|
|
|
event:'mine_view'
|
|
|
|
|
},1)
|
|
|
|
|
},
|
|
|
|
|
pagePoint: function(e){
|
|
|
|
|
util.pagePoint(e)
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 生命周期函数--监听页面隐藏
|
|
|
|
|
*/
|
|
|
|
|
onHide: function () {
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 生命周期函数--监听页面卸载
|
|
|
|
|
*/
|
|
|
|
|
onUnload: function () {
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 页面相关事件处理函数--监听用户下拉动作
|
|
|
|
|
*/
|
|
|
|
|
onPullDownRefresh: function () {
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 页面上拉触底事件的处理函数
|
|
|
|
|
*/
|
|
|
|
|
onReachBottom: function () {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
})
|