-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
29 changed files
with
625 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
const app = getApp() | ||
const WXAPI = require('../../wxapi/main') | ||
|
||
Page({ | ||
|
||
/** | ||
* 页面的初始数据 | ||
*/ | ||
data: { | ||
applyStatus: -2, // -1 表示未申请,0 审核中 1 不通过 2 通过 | ||
applyInfo: {} | ||
}, | ||
|
||
/** | ||
* 生命周期函数--监听页面加载 | ||
*/ | ||
onLoad: function (options) { | ||
|
||
}, | ||
|
||
/** | ||
* 生命周期函数--监听页面初次渲染完成 | ||
*/ | ||
onReady: function () { | ||
|
||
}, | ||
|
||
/** | ||
* 生命周期函数--监听页面显示 | ||
*/ | ||
onShow: function () { | ||
const _this = this | ||
WXAPI.fxApplyProgress(wx.getStorageSync('token')).then(res => { | ||
let applyStatus = -1 | ||
if (res.code == 2000) { | ||
app.goLoginPageTimeOut() | ||
return | ||
} | ||
if (res.code === 700) { | ||
_this.setData({ | ||
applyStatus: -1 | ||
}) | ||
} | ||
if (res.code === 0) { | ||
_this.setData({ | ||
applyStatus: res.data.status, | ||
applyInfo: res.data | ||
}) | ||
} | ||
}) | ||
}, | ||
|
||
/** | ||
* 生命周期函数--监听页面隐藏 | ||
*/ | ||
onHide: function () { | ||
|
||
}, | ||
|
||
/** | ||
* 生命周期函数--监听页面卸载 | ||
*/ | ||
onUnload: function () { | ||
|
||
}, | ||
|
||
/** | ||
* 页面相关事件处理函数--监听用户下拉动作 | ||
*/ | ||
onPullDownRefresh: function () { | ||
|
||
}, | ||
|
||
/** | ||
* 页面上拉触底事件的处理函数 | ||
*/ | ||
onReachBottom: function () { | ||
|
||
}, | ||
|
||
/** | ||
* 用户点击右上角分享 | ||
*/ | ||
onShareAppMessage: function () { | ||
|
||
}, | ||
bindSave: function (e) { | ||
WXAPI.addTempleMsgFormid({ | ||
token: wx.getStorageSync('token'), | ||
type: 'form', | ||
formId: e.detail.formId | ||
}) | ||
wx.navigateTo({ | ||
url: "/pages/fx/apply" | ||
}) | ||
}, | ||
goShop: function (e) { | ||
WXAPI.addTempleMsgFormid({ | ||
token: wx.getStorageSync('token'), | ||
type: 'form', | ||
formId: e.detail.formId | ||
}) | ||
wx.switchTab({ | ||
url: '/pages/index/index', | ||
}) | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"navigationBarTitleText": "分销中心" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<view class='noApply' wx:if="{{applyStatus == -1}}"> | ||
<form bindsubmit="bindSave" report-submit="true"> | ||
<image class="logo" src="/images/fx.png" mode="widthFix" /> | ||
<view class="profile">您还不是分销商,无法使用分销功能</view> | ||
<button type="primary" class="mini-btn" formType="submit">申请开通</button> | ||
</form> | ||
</view> | ||
|
||
<view class='noApply' wx:if="{{applyStatus == 0}}"> | ||
<form bindsubmit="goShop" report-submit="true"> | ||
<image class="logo" src="/images/fx.png" mode="widthFix" /> | ||
<view class="profile">感谢您的支持,请等待审核!</view> | ||
<button type="primary" class="mini-btn" formType="submit">去商城逛逛</button> | ||
</form> | ||
</view> | ||
|
||
<view class='noApply' wx:if="{{applyStatus == 1}}"> | ||
<form bindsubmit="goShop" report-submit="true"> | ||
<image class="logo" src="/images/fx.png" mode="widthFix" /> | ||
<view class="profile">很遗憾,您的申请没有通过</view> | ||
<view wx:if="{{applyInfo.remark}}" class="profile" style="color:red;">{{applyInfo.remark}}</view> | ||
<button type="primary" class="mini-btn" formType="submit">去商城逛逛</button> | ||
</form> | ||
</view> | ||
|
||
<view class='noApply' wx:if="{{applyStatus == 2}}"> | ||
<form bindsubmit="goShop" report-submit="true"> | ||
<image class="logo" src="/images/fx.png" mode="widthFix" /> | ||
<view class="profile">恭喜您,您已经是一名合格的分销商!</view> | ||
<button type="primary" class="mini-btn" formType="submit">去商城逛逛</button> | ||
</form> | ||
</view> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
.noApply { | ||
margin-top: 150rpx; | ||
text-align: center; | ||
} | ||
.noApply image { | ||
width: 300rpx; | ||
} | ||
.profile { | ||
text-align: center; | ||
margin-top:30rpx; | ||
font-size: 14px; | ||
color:#888; | ||
} | ||
.mini-btn{ | ||
margin-top: 50rpx; | ||
margin-left: 50px; | ||
margin-right: 50px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
const app = getApp() | ||
const WXAPI = require('../../wxapi/main') | ||
|
||
Page({ | ||
|
||
/** | ||
* 页面的初始数据 | ||
*/ | ||
data: { | ||
|
||
}, | ||
|
||
/** | ||
* 生命周期函数--监听页面加载 | ||
*/ | ||
onLoad: function (options) { | ||
|
||
}, | ||
|
||
/** | ||
* 生命周期函数--监听页面初次渲染完成 | ||
*/ | ||
onReady: function () { | ||
|
||
}, | ||
|
||
/** | ||
* 生命周期函数--监听页面显示 | ||
*/ | ||
onShow: function () { | ||
|
||
}, | ||
|
||
/** | ||
* 生命周期函数--监听页面隐藏 | ||
*/ | ||
onHide: function () { | ||
|
||
}, | ||
|
||
/** | ||
* 生命周期函数--监听页面卸载 | ||
*/ | ||
onUnload: function () { | ||
|
||
}, | ||
|
||
/** | ||
* 页面相关事件处理函数--监听用户下拉动作 | ||
*/ | ||
onPullDownRefresh: function () { | ||
|
||
}, | ||
|
||
/** | ||
* 页面上拉触底事件的处理函数 | ||
*/ | ||
onReachBottom: function () { | ||
|
||
}, | ||
|
||
/** | ||
* 用户点击右上角分享 | ||
*/ | ||
onShareAppMessage: function () { | ||
|
||
}, | ||
bindSave: function (e) { | ||
WXAPI.addTempleMsgFormid({ | ||
token: wx.getStorageSync('token'), | ||
type: 'form', | ||
formId: e.detail.formId | ||
}) | ||
const name = e.detail.value.name | ||
const mobile = e.detail.value.mobile | ||
if (!name) { | ||
wx.showToast({ | ||
title: '请输入真实姓名', | ||
icon: 'none' | ||
}) | ||
return | ||
} | ||
if (!mobile) { | ||
wx.showToast({ | ||
title: '请输入手机号码', | ||
icon: 'none' | ||
}) | ||
return | ||
} | ||
WXAPI.fxApply(wx.getStorageSync('token'), name, mobile).then(res => { | ||
if (res.code != 0) { | ||
wx.showToast({ | ||
title: res.msg, | ||
icon: 'none' | ||
}) | ||
return | ||
} | ||
wx.navigateTo({ | ||
url: "/pages/fx/apply-status" | ||
}) | ||
}) | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"navigationBarTitleText": "申请成为分销商" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<form bindsubmit="bindSave" report-submit="true"> | ||
<image class="logo" src="/images/fxad.jpeg" mode="widthFix" /> | ||
<view class="weui-cells__title title">请填写申请信息</view> | ||
<view class="weui-cells weui-cells_after-title"> | ||
<view class="weui-cell weui-cell_input"> | ||
<view class="weui-cell__hd"> | ||
<view class="weui-label">邀请人</view> | ||
</view> | ||
<view class="weui-cell__bd"> | ||
<input class="weui-input" value="张龙湖 (请确认)" disabled style='color:red;' /> | ||
</view> | ||
</view> | ||
<view class="weui-cell weui-cell_input"> | ||
<view class="weui-cell__hd"> | ||
<view class="weui-label">姓名 | ||
<text style='color:red;'>*</text> | ||
</view> | ||
</view> | ||
<view class="weui-cell__bd"> | ||
<input name="name" class="weui-input" placeholder="请输入真实姓名" /> | ||
</view> | ||
</view> | ||
<view class="weui-cell weui-cell_input"> | ||
<view class="weui-cell__hd"> | ||
<view class="weui-label">手机 | ||
<text style='color:red;'>*</text> | ||
</view> | ||
</view> | ||
<view class="weui-cell__bd"> | ||
<input name="mobile" class="weui-input" placeholder="请输入手机号码" /> | ||
</view> | ||
</view> | ||
</view> | ||
<view class="weui-cells__tips">成为分销商后卖出商品,您可以获得佣金</view> | ||
<view class="weui-btn-area"> | ||
<button class="weui-btn" type="primary" formType="submit">申请成为分销商</button> | ||
</view> | ||
</form> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
.logo { | ||
width: 750rpx; | ||
} | ||
.title { | ||
text-align: center; | ||
color:#333; | ||
font-size:14px; | ||
} |
Oops, something went wrong.