|
@@ -10,15 +10,13 @@ Page({
|
|
|
data: {
|
|
|
requestList: [], //请求列表
|
|
|
showBtn: -1, //选中下标
|
|
|
- pattern: false, //显示方式选择
|
|
|
- dropDownList: false, //显示下拉菜单
|
|
|
- methodsList: ['上游', '下游', '双向合作'],
|
|
|
addvalue: "",
|
|
|
scrolltolowerThrottle: true, //下拉触底截流
|
|
|
pageNumber: 1, //请求分页
|
|
|
pageTotal: 1, //总页数
|
|
|
tabsList: ['建立新合作', '合作请求'], //tabs
|
|
|
tabsIndex: 0, //tabs 选中下标
|
|
|
+ show: false, //弹出层控制
|
|
|
},
|
|
|
/**
|
|
|
* 生命周期函数--监听页面加载
|
|
@@ -112,15 +110,16 @@ Page({
|
|
|
onReady: function () {
|
|
|
|
|
|
},
|
|
|
- modeSelect(e) {
|
|
|
- const {
|
|
|
- index
|
|
|
- } = e.target.dataset,
|
|
|
- i = this.data.showBtn,
|
|
|
- that = this;
|
|
|
- const content = (this.data.methodsList[index] == '双向合作') ? '是否确定将“' + this.data.requestList[i].fbrand + '”作为您的“' + this.data.methodsList[index] + '”伙伴' : '是否确定将“' + this.data.requestList[i].fbrand + '”作为您的“' + this.data.methodsList[index] + '合作”伙伴';
|
|
|
+ /* 回调 */
|
|
|
+ optionChange({
|
|
|
+ detail
|
|
|
+ }) {
|
|
|
+ console.log(detail)
|
|
|
let ftype = Number;
|
|
|
- switch (this.data.methodsList[index]) {
|
|
|
+ const i = this.data.showBtn,
|
|
|
+ content = (detail == '双向合作') ? '是否确定将“' + this.data.requestList[i].fbrand + '”作为您的“' + detail + '”伙伴' : '是否确定将“' + this.data.requestList[i].fbrand + '”作为您的“' + detail + '合作”伙伴',
|
|
|
+ that = this;
|
|
|
+ switch (detail) {
|
|
|
case "上游":
|
|
|
ftype = 1;
|
|
|
break;
|
|
@@ -130,7 +129,7 @@ Page({
|
|
|
case "双向合作":
|
|
|
ftype = 3;
|
|
|
break;
|
|
|
- }
|
|
|
+ };
|
|
|
wx.showModal({
|
|
|
title: '提示',
|
|
|
content: content,
|
|
@@ -156,43 +155,32 @@ Page({
|
|
|
requestList.splice(i, 1);
|
|
|
that.setData({
|
|
|
requestList,
|
|
|
- showBtn: -1
|
|
|
+ showBtn: -1,
|
|
|
+ show: false
|
|
|
})
|
|
|
})
|
|
|
} else {
|
|
|
- console.log('取消')
|
|
|
+ that.setData({
|
|
|
+ show: false
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
/* 选择 */
|
|
|
showBtnIndex(e) {
|
|
|
- const {
|
|
|
+ let {
|
|
|
index
|
|
|
} = e.currentTarget.dataset;
|
|
|
- this.closeTheDropDown();
|
|
|
- if (index == this.data.showBtn) return;
|
|
|
+ if (index == this.data.showBtn) index = -1;
|
|
|
this.setData({
|
|
|
- pattern: false,
|
|
|
showBtn: index,
|
|
|
})
|
|
|
},
|
|
|
- /* 选择合作方式 */
|
|
|
- chooseCooperationMode() {
|
|
|
- this.setData({
|
|
|
- dropDownList: !this.data.dropDownList
|
|
|
- })
|
|
|
- },
|
|
|
- /* 点击遮罩层关闭 */
|
|
|
- closeTheDropDown() {
|
|
|
- this.setData({
|
|
|
- dropDownList: false
|
|
|
- })
|
|
|
- },
|
|
|
/* 同意 */
|
|
|
- ratify(e) {
|
|
|
+ ratify() {
|
|
|
this.setData({
|
|
|
- pattern: true
|
|
|
+ show: !this.data.show
|
|
|
})
|
|
|
},
|
|
|
/* 拒绝 */
|