|
|
@@ -25,7 +25,7 @@ Page({
|
|
|
},
|
|
|
flgPrimary: false,
|
|
|
// 是否是专业版
|
|
|
- proFlag:false,
|
|
|
+ proFlag: false,
|
|
|
cardList: ['main'],
|
|
|
contentObj: {
|
|
|
main: [
|
|
|
@@ -49,10 +49,10 @@ Page({
|
|
|
* @author : 周兴
|
|
|
* @date : 2024/4/1
|
|
|
*/
|
|
|
- changeTab(e){
|
|
|
- if(e.detail.id == Constants.gradeCode.PRO){
|
|
|
+ changeTab(e) {
|
|
|
+ if (e.detail.id == Constants.gradeCode.PRO) {
|
|
|
this.setData({
|
|
|
- proFlag:true
|
|
|
+ proFlag: true
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
@@ -261,18 +261,21 @@ Page({
|
|
|
if (params.gradeCode == null) {
|
|
|
params.gradeCode = Constants.gradeCode.STD
|
|
|
}
|
|
|
- let summaryInfo = this.data.summaryInfo
|
|
|
- let curentAdItem = this.data.curentAdItem
|
|
|
- params.webMaxNum = summaryInfo.webMaxNum
|
|
|
- params.wxMaxNum = summaryInfo.wxMaxNum
|
|
|
- params.endDate = summaryInfo.endDate
|
|
|
- params.tradeNo = this.generateRandomNo();
|
|
|
- params.wxUserId = app.globalData.user.userId
|
|
|
- params.tradeAmount = summaryInfo.amount
|
|
|
- params.buyBeginDate = summaryInfo.buyBeginDate;
|
|
|
- params.buyEndDate = summaryInfo.endDate
|
|
|
- params.extendDays = summaryInfo.extendDays;
|
|
|
- params.buyLong = curentAdItem.activityItemName
|
|
|
+ // 专业版
|
|
|
+ if(this.data.proFlag){
|
|
|
+ let summaryInfo = this.data.summaryInfo
|
|
|
+ let curentAdItem = this.data.curentAdItem
|
|
|
+ params.webMaxNum = summaryInfo.webMaxNum
|
|
|
+ params.wxMaxNum = summaryInfo.wxMaxNum
|
|
|
+ params.endDate = summaryInfo.endDate
|
|
|
+ params.tradeNo = this.generateRandomNo();
|
|
|
+ params.wxUserId = app.globalData.user.userId
|
|
|
+ params.tradeAmount = summaryInfo.amount
|
|
|
+ params.buyBeginDate = summaryInfo.buyBeginDate;
|
|
|
+ params.buyEndDate = summaryInfo.endDate
|
|
|
+ params.extendDays = summaryInfo.extendDays;
|
|
|
+ params.buyLong = curentAdItem.activityItemName
|
|
|
+ }
|
|
|
return params
|
|
|
},
|
|
|
|
|
|
@@ -291,12 +294,17 @@ Page({
|
|
|
* @author : 姜永辉
|
|
|
*/
|
|
|
saveData() {
|
|
|
- return this.excute(this.data.companyService, this.data.companyService.registerCompany, this.data.params).then(res => {
|
|
|
- if (res.data.code == Constants.SUCESS_CODE) {
|
|
|
+ // 专业版,成功后需要跳转支付
|
|
|
+ if (this.data.proFlag) {
|
|
|
+ return this.excute(this.data.companyService, this.data.companyService.registerCompany, this.data.params).then(res => {
|
|
|
+ if (res.data.code == Constants.SUCESS_CODE) {
|
|
|
// 成功后跳转支付
|
|
|
this.toPay(res.data.data);
|
|
|
- }
|
|
|
- })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ return this.excute(this.data.companyService, this.data.companyService.registerCompany, this.data.params)
|
|
|
+ }
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
@@ -310,14 +318,14 @@ Page({
|
|
|
return false
|
|
|
}
|
|
|
// 专业版必须要选择活动
|
|
|
- if(this.data.proFlag){
|
|
|
- if(!this.data.curentAdItem){
|
|
|
+ if (this.data.proFlag) {
|
|
|
+ if (!this.data.curentAdItem) {
|
|
|
util.showToast('请选择活动');
|
|
|
return false
|
|
|
}
|
|
|
// 必须要选择一个授权
|
|
|
let staffCount = this.data.staffCount
|
|
|
- if(!staffCount.maxNum && !staffCount.webMaxNum && !staffCount.wxMaxNum){
|
|
|
+ if (!staffCount.maxNum && !staffCount.webMaxNum && !staffCount.wxMaxNum) {
|
|
|
util.showToast('请选择一个授权');
|
|
|
return false
|
|
|
}
|