|
@@ -13,18 +13,38 @@ Page({
|
|
|
pattern: false, //显示方式选择
|
|
|
tabsList: ['商户二维码', '加入请求'], //tabs
|
|
|
tabsIndex: 0, //tabs 选中下标
|
|
|
+ joinList: [], //申请加入列表
|
|
|
},
|
|
|
/**
|
|
|
* 生命周期函数--监听页面加载
|
|
|
*/
|
|
|
- onLoad: function (options) {},
|
|
|
+ onLoad: function (options) {
|
|
|
+ /* 获取申请列表 */
|
|
|
+ _Http.basic({
|
|
|
+ "accesstoken": wx.getStorageSync('userData').token,
|
|
|
+ "classname": "customer.usercenter.teammsg.teammsg",
|
|
|
+ "method": "getEntryTeamApplyList",
|
|
|
+ "content": {
|
|
|
+ pageSize: 1000
|
|
|
+ }
|
|
|
+ }).then(res => {
|
|
|
+ console.log("团队申请加入列表", res)
|
|
|
+ if (res.msg != '成功') return wx.showToast({
|
|
|
+ title: res.data,
|
|
|
+ icon: "none"
|
|
|
+ });
|
|
|
+ this.setData({
|
|
|
+ joinList: res.data
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
/* tabs切换页面 */
|
|
|
setIndex({
|
|
|
detail
|
|
|
}) {
|
|
|
this.setData({
|
|
|
tabsIndex: detail
|
|
|
- })
|
|
|
+ });
|
|
|
},
|
|
|
/* 下拉触底 */
|
|
|
scrolltolower() {
|
|
@@ -48,22 +68,51 @@ Page({
|
|
|
const {
|
|
|
index
|
|
|
} = e.currentTarget.dataset;
|
|
|
- this.closeTheDropDown();
|
|
|
- if (index == this.data.showBtn) return;
|
|
|
+ if (index == this.data.showBtn) return this.setData({
|
|
|
+ showBtn: -1
|
|
|
+ });
|
|
|
this.setData({
|
|
|
pattern: false,
|
|
|
showBtn: index,
|
|
|
- })
|
|
|
+ });
|
|
|
},
|
|
|
/* 同意 */
|
|
|
ratify(e) {
|
|
|
- console.log('同意')
|
|
|
+ const that = this;
|
|
|
+ wx.showModal({
|
|
|
+ title: "提示",
|
|
|
+ content: "是否同意“" + that.data.joinList[that.data.showBtn].fname + "”加入到您的团队",
|
|
|
+ success: (res => {
|
|
|
+ if (res.confirm) that.checkEntryTeamApply(1);
|
|
|
+ })
|
|
|
+ })
|
|
|
},
|
|
|
/* 拒绝 */
|
|
|
refuse(e) {
|
|
|
- console.log('拒绝')
|
|
|
+ const that = this;
|
|
|
+ wx.showModal({
|
|
|
+ title: "提示",
|
|
|
+ content: "是否拒绝“" + that.data.joinList[that.data.showBtn].fname + "”加入团队申请",
|
|
|
+ success: (res => {
|
|
|
+ if (res.confirm) that.checkEntryTeamApply(0);
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ /* 审核 */
|
|
|
+ checkEntryTeamApply(isPass) {
|
|
|
+ _Http.basic({
|
|
|
+ "accesstoken": wx.getStorageSync('userData').token,
|
|
|
+ "classname": "customer.usercenter.teammsg.teammsg",
|
|
|
+ "method": "checkEntryTeamApply",
|
|
|
+ "content": {
|
|
|
+ "isPass": isPass,
|
|
|
+ "tenterprise_userid": this.data.joinList[this.data.showBtn].tenterprise_userid,
|
|
|
+ "tagentteamapplyid": this.data.joinList[this.data.showBtn].tagentteamapplyid
|
|
|
+ }
|
|
|
+ }).then(res => {
|
|
|
+ console.log(res)
|
|
|
+ })
|
|
|
},
|
|
|
-
|
|
|
/**
|
|
|
* 生命周期函数--监听页面显示
|
|
|
*/
|