|
|
@ -1,14 +1,15 @@ |
|
|
import common from "../../utils/https/common"; |
|
|
import common from "../../utils/https/common"; |
|
|
// pages/user/user.js
|
|
|
// pages/user/user.js
|
|
|
import userApi from "../../utils/https/user" |
|
|
import userApi from "../../utils/https/user" |
|
|
|
|
|
let app = getApp() |
|
|
Page({ |
|
|
Page({ |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 页面的初始数据 |
|
|
* 页面的初始数据 |
|
|
*/ |
|
|
*/ |
|
|
data: { |
|
|
data: { |
|
|
height:0, |
|
|
height: 0, |
|
|
info:null |
|
|
info: null |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
@ -17,30 +18,39 @@ Page({ |
|
|
onLoad: function (options) { |
|
|
onLoad: function (options) { |
|
|
let rect = wx.getMenuButtonBoundingClientRect(); |
|
|
let rect = wx.getMenuButtonBoundingClientRect(); |
|
|
this.setData({ |
|
|
this.setData({ |
|
|
height:rect.top+rect.height |
|
|
height: rect.top + rect.height |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
retail:function(){ |
|
|
/** |
|
|
common.user_post('commission/getCommissionUser',{}).then(res=>{ |
|
|
* 跳转H5的商户审核页面 |
|
|
if(res.code==0){ |
|
|
*/ |
|
|
|
|
|
gotoH5Audit: 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({ |
|
|
wx.navigateTo({ |
|
|
url: 'retail/apply/index', |
|
|
url: 'retail/apply/index', |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
else if(res.data.status==0){ |
|
|
else if (res.data.status == 0) { |
|
|
wx.showToast({ |
|
|
wx.showToast({ |
|
|
title: '正在审核中,请联系管理员', |
|
|
title: '正在审核中,请联系管理员', |
|
|
icon:'none' |
|
|
icon: 'none' |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
else if(res.data.status==2){ |
|
|
else if (res.data.status == 2) { |
|
|
wx.showToast({ |
|
|
wx.showToast({ |
|
|
title: '审核拒绝,请联系管理员', |
|
|
title: '审核拒绝,请联系管理员', |
|
|
icon:'none' |
|
|
icon: 'none' |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
else if(res.data.status==1){ |
|
|
else if (res.data.status == 1) { |
|
|
wx.navigateTo({ |
|
|
wx.navigateTo({ |
|
|
url: 'retail/index', |
|
|
url: 'retail/index', |
|
|
}) |
|
|
}) |
|
|
@ -58,9 +68,9 @@ Page({ |
|
|
* 生命周期函数--监听页面显示 |
|
|
* 生命周期函数--监听页面显示 |
|
|
*/ |
|
|
*/ |
|
|
onShow: function () { |
|
|
onShow: function () { |
|
|
userApi.user_post("user/getMyInfo").then(res=>{ |
|
|
userApi.user_post("user/getMyInfo").then(res => { |
|
|
this.setData({ |
|
|
this.setData({ |
|
|
info:res.data |
|
|
info: res.data |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|