|
|
@@ -1,4 +1,7 @@
|
|
|
-// pages/businessPartner/applyFor.js
|
|
|
+import {
|
|
|
+ ApiModel
|
|
|
+} from "../../utils/api";
|
|
|
+const _Http = new ApiModel;
|
|
|
Page({
|
|
|
|
|
|
/**
|
|
|
@@ -8,7 +11,8 @@ Page({
|
|
|
showBtn: -1,//选中下标
|
|
|
pattern: false,//显示方式选择
|
|
|
dropDownList:false,//显示下拉菜单
|
|
|
- methodsList:['上游','下游','双向合作']
|
|
|
+ methodsList:['上游','下游','双向合作'],
|
|
|
+ addvalue:""
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
@@ -17,12 +21,45 @@ Page({
|
|
|
onLoad: function (options) {
|
|
|
|
|
|
},
|
|
|
+ onChange({detail}){
|
|
|
+ this.setData({
|
|
|
+ addvalue:detail
|
|
|
+ })
|
|
|
+ },
|
|
|
+ onClick(){
|
|
|
+ _Http.basic({
|
|
|
+ "accesstoken": wx.getStorageSync('userData').token,
|
|
|
+ "classname": "customer.tagents.tagents",
|
|
|
+ "method": "apply_cooperation",
|
|
|
+ "content": {
|
|
|
+ "tcooperationagentsid": "27303",
|
|
|
+ "ftype": "1"
|
|
|
+ }
|
|
|
+ }).then(res=>{
|
|
|
+ console.log(res)
|
|
|
+ })
|
|
|
+ },
|
|
|
|
|
|
/**
|
|
|
* 生命周期函数--监听页面初次渲染完成
|
|
|
*/
|
|
|
onReady: function () {
|
|
|
|
|
|
+ },
|
|
|
+ modeSelect(e){
|
|
|
+ const { index } = e.target.dataset;
|
|
|
+ const content=(this.data.methodsList[index]=='双向合作')?'是否确定***作为您的'+this.data.methodsList[index]+'伙伴':'是否确定***作为您的'+this.data.methodsList[index]+'合作伙伴';
|
|
|
+ wx.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: content,
|
|
|
+ success: function (res) {
|
|
|
+ if (res.confirm) {
|
|
|
+ console.log('确定')
|
|
|
+ } else {
|
|
|
+ console.log('取消')
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
/* 选择 */
|
|
|
showBtnIndex(e) {
|
|
|
@@ -38,7 +75,7 @@ Page({
|
|
|
/* 选择合作方式 */
|
|
|
chooseCooperationMode(){
|
|
|
this.setData({
|
|
|
- dropDownList:true
|
|
|
+ dropDownList:!this.data.dropDownList
|
|
|
})
|
|
|
},
|
|
|
hiddenDropDown(){
|