|
|
@@ -213,14 +213,50 @@ export default {
|
|
|
applyPower(){
|
|
|
let that = this;
|
|
|
if(that.userStatus === '点击申请'){
|
|
|
- that.$refs.showtip.open()
|
|
|
+ that.getUserIsApply()
|
|
|
}else{
|
|
|
- return false
|
|
|
+ return false;
|
|
|
}
|
|
|
+
|
|
|
+ },
|
|
|
+ getUserIsApply(){
|
|
|
+ let that = this;
|
|
|
+ uni.request({
|
|
|
+ url: getApp().globalData.shareUrl, //需要设置为全局
|
|
|
+ method: 'POST',
|
|
|
+ header: {
|
|
|
+ 'content-type': 'application/x-www-form-urlencoded'
|
|
|
+ },
|
|
|
+ data: {
|
|
|
+ method: 'getApplyCompetency',
|
|
|
+ timestamp: getApp().globalData.globalTimestamp, //Date.now()
|
|
|
+ uid:getApp().globalData.user_id,
|
|
|
+ sign: md5('getApplyCompetency' + getApp().globalData.globalTimestamp)
|
|
|
+ },
|
|
|
+ success: res => {
|
|
|
+ if (res.data.code === 200) {
|
|
|
+ if(res.data.msg.status === 1){
|
|
|
+ that.$refs.showtip.open()
|
|
|
+ }else {
|
|
|
+ uni.showToast({
|
|
|
+ title: '您目前还没有分销资格',
|
|
|
+ icon: 'none',
|
|
|
+ duration:3000
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ uni.showToast({
|
|
|
+ title: res.data.msg,
|
|
|
+ icon: 'none',
|
|
|
+ duration:3000
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
submitApply(){
|
|
|
let that = this;
|
|
|
- uni.request({
|
|
|
+ uni.request({
|
|
|
url: getApp().globalData.shareUrl, //需要设置为全局
|
|
|
method: 'POST',
|
|
|
header: {
|