Commit 8f088c33 by 严立

LL - 俱乐部流程问题修改

parent b8f260ee
......@@ -33,6 +33,11 @@
height: 48rpx;
}
.icon_80 {
width: 80rpx;
height: 80rpx;
}
.bg-gradient {
background: linear-gradient(180deg, #FFFFFF 0%, #F3F4F6 20%, #F3F4F6 100%);
}
......
......@@ -9,10 +9,11 @@ Page({
tabItem: [
{ 'text': '全部', 'value': '' },
],
tabIndex: 0,
clubList: [],
clubPageIndex: 1,
clubPageSize: 5,
pageIndex: 1,
pageSize: 5,
winEstablish: false, // 创建提交提示
......@@ -23,10 +24,12 @@ Page({
onLoad: function (options) {
this.setClubTab()
this.queryClubEnter()
},
onShow: function () {
let funcBackInfo = wx.getStorageSync('tempBackInfo')
console.log('show', funcBackInfo)
switch (funcBackInfo) {
case 'winEstablish':
this.setData({
......@@ -78,19 +81,44 @@ Page({
},
/**
* 查询我加入的
* 缓存数据,用于申请加入,活动报名等等判断。
* @function
* @param
* @returns
*/
queryClubEnter: function () {
App.request({
url: 'v3/club/getMyJoinClubs',
params: {
'pageNo': 1,
'pageSize': -1,
}
}).then((response) => {
let funcData = response.data.list
let funcList = []
for (let i = 0, l = funcData.length; i < l; i++) {
funcList.push(funcData[i].clubId)
}
console.log(funcList)
wx.setStorageSync('clubEnterId', funcList)
}).catch((response) => {})
},
/**
* 查询俱乐部列表
* @function
* @param {object} - funcEvent
* @returns
*/
queryClub: function (funcTabIndex) {
console.log(funcTabIndex)
queryClub: function () {
App.request({
url: 'v3/club/getClubList',
params: {
'pageNo': this.data.clubPageIndex,
'pageSize': this.data.clubPageSize,
'clubTypes': this.data.tabItem[funcTabIndex].value
'pageNo': this.data.pageIndex,
'pageSize': this.data.pageSize,
'clubTypes': this.data.tabItem[this.data.tabIndex].value
}
}).then((response) => {
let funcData = response.data.list
......@@ -108,7 +136,7 @@ Page({
}
this.setData({
clubList: funcList
clubList: this.data.clubList.concat(funcList)
})
}).catch((response) => {})
},
......@@ -188,10 +216,11 @@ Page({
onTabChange: function (funcEvent) {
let funcItem = funcEvent.detail
this.setData({
tabIndex: funcItem.index,
clubList: [],
clubPageIndex: 1
pageIndex: 1,
})
this.queryClub(funcItem.index)
this.queryClub()
},
/**
......@@ -204,6 +233,21 @@ Page({
App.pageScroll(funcEvent, this)
},
/**
* 页面触底事件
* @function
* @param {object} - funcEvent
* @returns
*/
onReachBottom: function () {
console.log('onReachBottom')
this.setData({
pageIndex: this.data.pageIndex + 1
})
this.queryClub()
},
eventNavChangeHeight: function (funcEvent) {
console.log(funcEvent)
let funcNavHeight = funcEvent.detail.navHeight
......
......@@ -18,12 +18,34 @@ Page({
this.setData({
clubInfo: {
'id': options.id,
'logo': '',
'name': '',
'describe': '',
'member': '',
'content': '',
'isOwner': false
}
})
this.queryClubInfo()
this.queryActivity()
},
onShow: function () {
let funcBackInfo = wx.getStorageSync('tempBackInfo')
switch (funcBackInfo) {
case 'winEstablish':
break
case 'winEnter':
this.setData({
winEnter: true
})
wx.removeStorageSync('tempBackInfo')
break
}
},
/**
* 查询俱乐部信息
* @function
......@@ -120,6 +142,9 @@ Page({
* @returns
*/
onClubActivityEnter: function (funcEvent) {
let funcEnterClub = wx.getSystemInfoSync('clubEnterId')
console.log(funcEvent)
let funcItem = funcEvent.currentTarget.dataset.item
wx.navigateTo({
......@@ -135,7 +160,6 @@ Page({
*/
onEnterClub: function () {
let funcItem = this.data.clubInfo
console.log(funcItem)
// 判断俱乐部是否业主专享,以及加入用户是否满足权限。
if (funcItem.isOwner) {
let funcUserType = wx.getStorageSync('userInfo').userType
......
let App = getApp()
Page({
data: {
clubInfo: {},
memberList: [],
winPowerInfo: false,
winAdminInfo: false,
clubInfo: {}, // 当前俱乐部信息
clubList: [], // 用户已经加入俱乐部列表
memberList: [], // 成员列表
adminInfo: {}, // 管理信息
winAdminInfo: false, // 管理信息弹窗空值
winPowerInfo: false, // 权限提示弹窗控制
},
onLoad: function (options) {
this.queryClubMember(options.id)
this.setData({
clubInfo: {
'id': options.id,
'logo': '',
'name': '',
'describe': '',
'member': '',
'content': '',
'isOwner': false
}
})
this.queryClubInfo()
this.queryClubMember()
},
queryClubMember: function (funcClubId) {
/**
* 查询俱乐部信息
* @function
* @param
* @returns
*/
queryClubInfo: function () {
App.request({
url: 'v3/club/get',
params: {
'clubId': this.data.clubInfo.id,
}
}).then((response) => {
let funcData = response.data
this.setData({
clubInfo: {
'id': funcData.clubId,
'logo': funcData.logo,
'name': funcData.name,
'describe': funcData.summary,
'member': funcData.memberNum,
'content': funcData.content,
'isOwner': Number(funcData.owner) === 0 ? false : true
}
})
}).catch((response) => {})
},
/**
* 查询管理员列表
* @function
* @param {object} - funcEvent
* @returns
*/
queryClubMember: function () {
App.request({
url: 'v3/club/getClubAdmin',
params: {
'clubId': funcClubId
'clubId': this.data.clubInfo.id
}
}).then((response) => {
let funcData = response.data.list
let funcData = response.data
let funcList = []
for (let i = 0, l = funcData.length; i < l; i++) {
let funcItem = {
'name': funcData[i].name,
'avatar': funcData[i].headImg,
'wx': funcData[i].wxAccountImg,
}
funcList.push(funcItem)
funcList.push(funcItem)
}
this.setData({
memberList: funcList
})
}).catch((response) => {
})
},
onPowerInfo: function () {
/**
* 获取管理员微信
* @function
* @param
* @returns
*/
onAdminWx: function (funcEvent) {
console.log(funcEvent)
let funcItem = funcEvent.currentTarget.dataset.item
let funcClubList = wx.getStorageSync('clubEnterId')
for (let i = 0, l = funcClubList.length; i < l; i++) {
if (this.data.clubInfo.id === funcClubList[i]) {
this.setData({
adminInfo: {
wx: funcItem.wx
},
winAdminInfo: true
})
return
}
}
// 没有权限
this.setData({
winPowerInfo: true
})
},
onPowerInfoClose: function () {
this.setData({
winPowerInfo: false
})
},
onAdminInfo: function () {
onAdminInfoClose: function () {
this.setData({
winAdminInfo: false
})
......
<m-nav titleText="俱乐部信息"></m-nav>
<!-- 权限提醒 -->
<view class="member-power row cc ac" wx:if="{{winPowerInfo}}">
<view class="member-power-info col cc ac">
<text>权限提醒</text>
<text>仅俱乐部会员或俱乐部申请者可查看管理员微信信息。您可在提交加入俱乐部申请后点击查看。</text>
<button class="row cc ac" bindtap="onPowerInfo">我知道了</button>
</view>
</view>
<!-- 管理员微信弹窗 -->
<view class="member-admin row cc ac" wx:if="{{winAdminInfo}}">>
<view class="member-admin-info col cc ac">
<text>管理员微信</text>
<image src=""></image>
<text>【长按保存二维码】</text>
<button class="row cc ac" bindtap="onAdminInfo">我知道了</button>
</view>
</view>
<view class="container">
<view class="club-info col cc ac">
<image class="club-info-logo" src=""></image>
<image class="club-info-logo" src="{{clubInfo.logo}}"></image>
<view class="club-info-name column cc ac">
<text class="title">马术俱乐部</text>
<text class="owner-mark">业主专享</text>
<text>1877 成员</text>
<text class="title">{{clubInfo.name}}</text>
<text class="owner-mark" wx:if="{{clubInfo.isOwner}}">业主专享</text>
<text>{{clubInfo.member + ' 成员'}}</text>
</view>
</view>
......@@ -36,17 +17,36 @@
</view>
<view class="club-member-list">
<block wx:for="{{3}}" wx:for-item="item" wx:for-index="index" wx:key="index">
<block wx:for="{{memberList}}" wx:for-item="item" wx:for-index="index" wx:key="index">
<view class="club-member-item row cb ac">
<view class="club-member-item-info row ac">
<image src=""></image>
<text>尹燃</text>
<image src="{{item.avatar}}"></image>
<text>{{item.name}}</text>
</view>
<view class="club-member-operation row ce ac">
<button class="row cc ac">添加微信</button>
<button class="row cc ac" data-item="{{item}}" bindtap="onAdminWx">添加微信</button>
</view>
</view>
</block>
</view>
</view>
</view>
<!-- 权限提醒 -->
<view class="member-power row cc ac" hidden="{{!winPowerInfo}}">
<view class="member-power-info col cc ac">
<text>权限提醒</text>
<text>仅俱乐部会员或俱乐部申请者可查看管理员微信信息。您可在提交加入俱乐部申请后点击查看。</text>
<button class="row cc ac" bindtap="onPowerInfoClose">我知道了</button>
</view>
</view>
<!-- 管理员微信弹窗 -->
<view class="member-admin row cc ac" hidden="{{!winAdminInfo}}">
<view class="member_admin_info col cc ac">
<text>管理员微信</text>
<image src="{{adminInfo.wx}}"></image>
<text>【长按保存二维码】</text>
<button class="row cc ac" bindtap="onAdminInfoClose">我知道了</button>
</view>
</view>
\ No newline at end of file
......@@ -62,7 +62,7 @@
background: rgba(0, 0, 0, .7);
}
.member-admin-info {
.member_admin_info {
width: 606rpx;
height: 726rpx;
padding: 56rpx 40rpx 48rpx 40rpx;
......@@ -70,7 +70,7 @@
background: #FFFFFF;
}
.member-admin-info > text:nth-child(1) {
.member_admin_info > text:nth-child(1) {
height: 72rpx;
font-size: 50rpx;
......@@ -79,14 +79,14 @@
color: #15191F;
}
.member-admin-info > iamge {
.member_admin_info > image {
width: 148rpx;
height: 148rpx;
margin-top: 48rpx;
background: #999999;
}
.member-admin-info > text:nth-child(2) {
.member_admin_info > text:nth-child(2) {
height: 46rpx;
font-size: 26rpx;
font-weight: 400;
......@@ -94,7 +94,7 @@
color: #15191F;
}
.member-admin-info > button {
.member_admin_info > button {
width: 526rpx;
height: 80rpx;
margin-top: 48rpx;
......
let App = getApp()
Page({
data: {
recommendList: {
'0': [], // 专场数据
'1': [], // 专场数据
},
integral: 0,
// 专场标题,列表
recommendTitle: { '0': '', '1': '' },
recommendList: { '0': [], '1': [] },
tabItemCommodity: [
{ text: '全部', value: '' },
{ text: '文创', value: '' },
{ text: '彩妆', value: '' },
{ text: '节日特供', value: '' },
{ text: '节日特供', value: '' },
{ text: '节日特供', value: '' },
],
tabGoodsIndex: 0,
tabItemPrice: [
{ text: '全部', value: '' },
{ text: '1-100', value: '' },
{ text: '100-500', value: '' },
{ text: '500-5000', value: '' },
{ text: '5000-10000', value: '' },
{ text: '1-100', value: '1-100' },
{ text: '100-500', value: '100-500' },
{ text: '500-5000', value: '500-500' },
{ text: '5000-10000', value: '5000-10000' },
],
tabPriceIndex: 0,
goodsAllList: []
},
onLoad: function (options) {
this.setData({
integral: options.integral
})
this.setTabCommodity()
this.queryRecommend()
this.queryAllGoods()
},
/**
* 设置 tab 数值
* @function
* @param
* @returns
*/
setTabCommodity: function () {
App.request({
url: 'v1/common/getSmTags',
params: {
'types': 3,
}
}).then((response) => {
let funcData = response.data
let funcList = []
for (let i = 0, l = funcData.length; i < l; i++) {
let funcItem = {
'text': funcData[i].name,
'value': funcData[i].tagId,
}
funcList.push(funcItem)
// 设置专场标题
let funcRecommendTitle = this.data.recommendTitle
switch (funcItem.text) {
case '304':
funcRecommendTitle['1'] = funcItem.text
this.setData({
recommendTitle: funcRecommendTitle
})
break
case '305':
funcRecommendTitle['0'] = funcItem.text
this.setData({
recommendTitle: funcRecommendTitle
})
break
}
console.log(funcRecommendTitle)
}
console.log(funcList)
this.setData({
tabItemCommodity: this.data.tabItemCommodity.concat(funcList)
})
}).catch((response) => {})
},
/**
* 查询专场商品数据
* @function
* @param
* @returns
*/
queryRecommend: function () {
App.request({
url: 'v3/integralGood/getGoodList',
......@@ -86,6 +147,62 @@ Page({
}).catch((response) => {})
},
queryAllGoods: function () {
let funcPriceItem = this.data.tabItemPrice[this.data.tabPriceIndex]
let funcIntegralMin = ''
let funcIntegralMax = ''
if (funcPriceItem.value) {
funcIntegralMin = funcPriceItem.value.split('-')[0]
funcIntegralMax = funcPriceItem.value.split('-')[1]
}
App.request({
url: 'v3/integralGood/getGoodList',
params: {
'pageNo': 1,
'pageSize': 5,
'tagId': this.data.tabItemCommodity[this.data.tabGoodsIndex].value,
'minIntegral': funcIntegralMin,
'maxIntegral': funcIntegralMax,
}
}).then((response) => {
let funcData = response.data.list
let funcList = []
for (let i = 0, l = funcData.length; i < l; i++) {
let funcItem = {
'id': funcData[i].commodityId,
'name': funcData[i].name,
'cover': funcData[i].cover,
'price': funcData[i].price,
'exchangeQuantity': funcData[i].sellNumber,
}
funcList.push(funcItem)
}
this.setData({
goodsAllList: this.data.goodsAllList.concat(funcList)
})
}).catch((response) => { })
},
onTabChangeCommodity: function (funcEvent) {
console.log(funcEvent)
this.setData({
goodsAllList: [],
tabGoodsIndex: funcEvent.detail.index
})
this.queryAllGoods()
},
onTabChangePrice: function (funcEvent) {
console.log(funcEvent)
this.setData({
goodsAllList: [],
tabPriceIndex: funcEvent.detail.index
})
this.queryAllGoods()
},
/**
* 页面滚动事件
* @function
......
......@@ -6,7 +6,7 @@
<image src="{{resourcesBase + 'mall/home-bgi.png'}}"></image>
<view class="row ae">
<view class="integral_quantity column">
<text>18560</text>
<text>{{integral}}</text>
<text>我的积分</text>
</view>
<view class="integral_record column cc ac">
......@@ -75,7 +75,7 @@
classTabItem="commodity_tab_item"
classActive="commodity_tab_item_active"
classInactive="commodity_tab_item_inactive"
bindtabChange="onTabChange">
bindtabChange="onTabChangeCommodity">
</m-tab>
<m-tab
......@@ -85,23 +85,23 @@
classTabItem="price_tab_item"
classActive="price_tab_item_active"
classInactive="price_tab_item_inactive"
bindtabChange="onTabChange">
bindtabChange="onTabChangePrice">
</m-tab>
<view class="routine_list">
<block wx:for="{{3}}" wx:for-item="item" wx:for-index="index" wx:key="index">
<block wx:for="{{goodsAllList}}" wx:for-item="item" wx:for-index="index" wx:key="index">
<view class="routine_item">
<view class="routine_item_info column">
<image src=""></image>
<image src="{{item.cover}}"></image>
<view class="routine_item_info_name row as">
<text>故宫 金桂浮月收纳盒书签香薰盒</text>
<text>{{item.name}}</text>
</view>
<view class="routine_item_info_price row ac">
<text>20000</text>
<text>{{item.price}}</text>
<text>积分</text>
</view>
<view class="routine_item_info_exchange row ac">
<text>{{'已兑换' + '2000' + '件'}}</text>
<text>{{'已兑换' + item.exchangeQuantity + '件'}}</text>
</view>
</view>
</view>
......
......@@ -7,9 +7,24 @@ Page({
{ text: '已回绝', value: 2 },
],
tabIndex: 0,
clubInfo: {},
examineList: [],
pageIndex: 1,
pageSize: 5,
memberInfo: {
'idMember': '',
'idExamine': '',
'name': '',
'nickname': '',
'avatar': '',
'userType': 0,
'remarks': '',
'phone': '',
'wx': '',
},
winMember: false,
},
onLoad: function (options) {
......@@ -18,6 +33,7 @@ Page({
clubInfo: { id: options.id }
})
this.queryExamine()
this.queryStatistics()
},
/**
......@@ -36,7 +52,6 @@ Page({
'clubId': this.data.clubInfo.id,
}
}).then((response) => {
console.log(response)
let funcData = response.data.list
let funcList = []
for (let i = 0, l = funcData.length; i < l; i++) {
......@@ -59,6 +74,69 @@ Page({
}).catch((response) => {})
},
/**
* 查询数量统计
* @function
* @param
* @returns
*/
queryStatistics: function () {
let funcStatistics = {
'pending': 0,
'pass': 0,
'refuse': 0
}
// 待审核
let funcPending = App.request({
url: 'v3/club/countWaitAudit',
params: {
'clubId': this.data.clubInfo.id,
'state': 0
}
}).then((response) => {
funcStatistics.pending = response.data.count
})
// 已通过
let funcPass = App.request({
url: 'v3/club/countWaitAudit',
params: {
'clubId': this.data.clubInfo.id,
'state': 1
}
}).then((response) => {
funcStatistics.pass = response.data.count
})
// 已回绝
let funcRefuse = App.request({
url: 'v3/club/countWaitAudit',
params: {
'clubId': this.data.clubInfo.id,
'state': 2
}
}).then((response) => {
funcStatistics.refuse = response.data.count
})
Promise.all([funcPending, funcPass, funcRefuse]).then((response) => {
let funcTabItem = this.data.tabItem
funcTabItem[0].text = '待审核(' + funcStatistics.pending + ')'
funcTabItem[1].text = '已通过(' + funcStatistics.pass + ')'
funcTabItem[2].text = '已回绝(' + funcStatistics.refuse + ')'
this.setData({
tabItem: funcTabItem
})
}).catch((response) => {})
},
/**
* 审核拒绝
* @function
* @param
* @returns
*/
onExamineRefuse: function (funcEvent) {
App.ui.showDialog({
type: 'input',
......@@ -70,20 +148,35 @@ Page({
success: (response) => {
let funcItem = funcEvent.currentTarget.dataset.item
App.request({
url: 'v3/club/getAuditList',
url: 'v3/club/doAuditJoin',
params: {
'state': '2',
'remarks': response.input,
'joinClubAuditId': funcItem.idExamine,
}
}).then((response) => {
}).catch((response) => {})
this.setData({
examineList: []
})
this.queryExamine()
this.queryStatistics()
}).catch((response) => {
App.ui.showToast({
iconType: 'error',
title: response.message,
})
})
},
fail: () => {},
})
},
/**
* 审核通过
* @function
* @param
* @returns
*/
onExaminePass: function (funcEvent) {
App.ui.showDialog({
type: 'confirm',
......@@ -94,24 +187,86 @@ Page({
success: () => {
let funcItem = funcEvent.currentTarget.dataset.item
App.request({
url: 'v3/club/getAuditList',
url: 'v3/club/doAuditJoin',
params: {
'state': '1',
'remarks': '',
'joinClubAuditId': funcItem.idExamine,
}
}).then((response) => {
}).catch((response) => {})
this.setData({
examineList: []
})
this.queryExamine()
this.queryStatistics()
}).catch((response) => {
App.ui.showToast({
iconType: 'error',
title: response.message,
})
})
},
fail: () => {},
})
},
/**
* 成员信息
* @function
* @param
* @returns
*/
onMemberInfo: function (funcEvent) {
let funcItem = funcEvent.currentTarget.dataset.item
App.request({
url: 'v3/club/getClubAudit',
params: {
'joinClubAuditId': funcItem.idExamine,
}
}).then((response) => {
let funcData = response.data
this.setData({
memberInfo: {
'name': funcData.name,
'nickname': funcData.nickname,
'avatar': funcData.img,
'remarks': funcData.remarks, // 备注
'phone': funcData.mobile,
'date': funcData.joinDate, // 加入日期
'refuse': funcData.auditRemarks, // 拒绝原因
'auditor': funcData.auditor ? funcData.auditor : '后台审核',
'wx': funcData.wxAccount, // 微信二维码图
},
winMember: true
})
console.log(this.data.memberInfo)
}).catch((response) => {})
},
/**
* 关闭成员信息
* @function
* @param
* @returns
*/
onMemberInfoClose: function (funcEvent) {
this.setData({
winMember: false
})
},
/**
* tab 点击事件
* @function
* @param
* @returns
*/
eventTabChange: function (funcEvent) {
let funcTabIndex = funcEvent.detail.index
this.setData({
tabIndex: funcTabIndex
tabIndex: funcTabIndex,
examineList: [],
})
this.queryExamine()
},
......
......@@ -18,19 +18,19 @@
<view class="member_info_other column">
<view class="row ac">
<text>手机号</text>
<text class="text_overflow_point">15046661378</text>
<text class="text_overflow_point">{{item.phone}}</text>
</view>
<view class="row ac">
<text>微信昵称</text>
<text class="text_overflow_point">羊羊羊</text>
<text class="text_overflow_point">{{item.nickname}}</text>
</view>
<view class="row ac">
<text>微信号</text>
<text class="text_overflow_point">wxid19910803</text>
<text class="text_overflow_point">{{item.wx}}</text>
</view>
<view class="row ac">
<text>备注</text>
<text class="text_overflow_point">5号楼3单元703业主</text>
<text class="text_overflow_point">{{item.remarks}}</text>
</view>
</view>
<view class="member_info_operation row cb ac">
......@@ -40,21 +40,74 @@
</view>
<!-- 已通过列表 -->
<view class="member_item_pass row ac" wx:if="{{tabIndex === 1}}">
<image src="{{item.avatar}}"></image>
<view class="member_item_pass_info row cb ac">
<view class="column">
<text>{{item.name}}</text>
<text>{{item.phone}}</text>
<block wx:if="{{tabIndex === 1}}">
<view class="pass_item row cb ac">
<image class="pass_item_avatar" src="{{item.avatar}}"></image>
<view class="pass_item_info column cc">
<view class="row ac">
<text class="pass_item_info_name text_overflow_point">{{item.name}}</text>
<text class="owner-mark" wx:if="{{item.userType === 1}}">业主</text>
</view>
<text class="pass_item_info_phone text_overflow_point">{{item.phone}}</text>
</view>
<image class="icon_40" src="{{imageBase + 'icon/warning-5.png'}}"></image>
<image class="icon_40" src="{{imageBase + 'icon/warning-5.png'}}" data-item="{{item}}" bindtap="onMemberInfo"></image>
</view>
</view>
<view class="pass_item_line"></view>
</block>
<!-- 已回绝列表 -->
<view class="member_item_refuse column" wx:if="{{tabIndex === 2}}">
</view>
<block wx:if="{{tabIndex === 2}}">
<view class="pass_item row cb ac">
<image class="pass_item_avatar" src="{{item.avatar}}"></image>
<view class="pass_item_info column cc">
<view class="row ac">
<text class="pass_item_info_name text_overflow_point">{{item.name}}</text>
<text class="owner-mark" wx:if="{{item.userType === 1}}">业主</text>
</view>
<text class="pass_item_info_phone text_overflow_point">{{item.phone}}</text>
</view>
<image class="icon_40" src="{{imageBase + 'icon/warning-5.png'}}" data-item="{{item}}" bindtap="onMemberInfo"></image>
</view>
<view class="pass_item_line"></view>
</block>
</block>
</view>
</view>
<!-- 弹窗信息 -->
<view class="win_member column cc ac" hidden="{{!winMember}}">
<view class="win_member_info column ac">
<image class="win_member_info_avatar" src="{{memberInfo.avatar}}"></image>
<text class="win_member_info_name">{{memberInfo.name}}</text>
<text class="win_member_info_phone">{{memberInfo.phone}}</text>
<view class="win_member_info_other column">
<view class="row">
<text>微信昵称</text>
<text class="text_overflow_point">{{memberInfo.nickname}}</text>
</view>
<view class="row">
<text>微信号</text>
<text class="text_overflow_point">{{memberInfo.wx}}</text>
</view>
<view class="row">
<text>备注</text>
<text class="text_overflow_point">{{memberInfo.remarks}}</text>
</view>
<view class="row">
<text>加入时间</text>
<text class="text_overflow_point">{{memberInfo.date}}</text>
</view>
<view class="row">
<text>拒绝原因</text>
<text class="text_overflow_point">{{memberInfo.refuse}}</text>
</view>
<view class="row">
<text>审核人</text>
<text class="text_overflow_point">{{memberInfo.auditor}}</text>
</view>
</view>
</view>
<view class="win_member_close row cc ac">
<image class="icon_48" src="{{imageBase + 'icon/close-1.png'}}" bindtap="onMemberInfoClose"></image>
</view>
</view>
\ No newline at end of file
......@@ -99,23 +99,130 @@
}
/* 已通过,已回绝列表 */
.member_item_pass,
.member_item_refuse {
.pass_item,
.refuse_item {
width: 750rpx;
height: 146rpx;
padding: 0 40rpx;
}
.member_item_pass > image {
.pass_item_avatar {
width: 88rpx;
height: 88rpx;
margin: 0 24rpx 0 40rpx;
margin: 0 24rpx 0 0;
border-radius: 4px;
background: #999999;
}
.member_item_pass_info {
.pass_item_info {
flex-grow: 1;
height: 146rpx;
padding: 0 40rpx 0 0;
border-bottom: 1px #E2E7EF solid;
}
.pass_item_info_name {
max-width: 500rpx;
height: 42rpx;
margin: 0 8rpx 0 0;
font-size: 30rpx;
font-weight: 400;
line-height: 42rpx;
color: #15191F;
}
.pass_item_info_phone {
max-width: 500rpx;
margin: 6rpx 0 0 0;
height: 36rpx;
font-size: 26rpx;
font-weight: 400;
line-height: 36rpx;
color: #959DA9;
}
.pass_item_line {
width: 598rpx;
height: 1px;
margin: 0 0 0 152rpx;
background: #E2E7EF;
}
/* 成员信息弹窗 */
.win_member {
z-index: 7;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, .65);
}
.win_member_info {
width: 622rpx;
min-height: 954rpx;
border-radius: 4px;
background: #FFFFFF;
}
.win_member_info_avatar {
width: 112rpx;
height: 112rpx;
margin: 96rpx 0 0 0;
border-radius: 4px;
background: #999999;
}
.win_member_info_name {
height: 52rpx;
margin: 32rpx 0 0 0;
font-size: 38rpx;
font-weight: 800;
line-height: 52rpx;
color: #15191F;
}
.win_member_info_phone {
height: 36rpx;
margin: 16rpx 0 0 0;
font-size: 26rpx;
font-weight: 400;
line-height: 36rpx;
color: #959DA9;
}
.win_member_info_other {
width: 494rpx;
margin: 96rpx 64rpx 0 64rpx;
}
.win_member_info_other > view {
height: 90rpx;
}
.win_member_info_other > view > text:nth-child(1) {
width: 120rpx;
height: 42rpx;
margin: 0 68rpx 0 0;
font-size: 30rpx;
font-weight: 400;
line-height: 42rpx;
color: #959DA9;
}
.win_member_info_other > view > text:nth-child(1) {
max-width: 300rpx;
height: 42rpx;
font-size: 30rpx;
font-weight: 400;
line-height: 42rpx;
color: #15191F;
}
.win_member_close {
width: 80rpx;
height: 80rpx;
border-radius: 50%;
background: #ABAAA9;
margin: 48rpx 0 0 0;
}
\ No newline at end of file
......@@ -7,8 +7,8 @@ Page({
],
tabIndex: 0,
clubList: [],
clubPageIndex: 1,
clubPageSize: 5,
pageIndex: 1,
pageSize: 5,
},
onLoad: function (options) {
......@@ -25,11 +25,10 @@ Page({
App.request({
url: 'v3/club/getMyJoinClubs',
params: {
'pageNo': this.data.clubPageIndex,
'pageSize': this.data.clubPageSize,
'pageNo': this.data.pageIndex,
'pageSize': this.data.pageSize,
}
}).then((response) => {
console.log(response)
let funcData = response.data.list
let funcList = []
for (let i = 0, l = funcData.length; i < l; i++) {
......@@ -46,7 +45,7 @@ Page({
funcList.push(funcItem)
}
this.setData({
clubList: funcList
clubList: this.data.clubList.concat(funcList)
})
}).catch((response) => {})
},
......@@ -61,8 +60,8 @@ Page({
App.request({
url: 'v3/club/getMyCreateClub',
params: {
'pageNo': this.data.clubPageIndex,
'pageSize': this.data.clubPageSize,
'pageNo': this.data.pageIndex,
'pageSize': this.data.pageSize,
}
}).then((response) => {
console.log(response)
......@@ -83,7 +82,7 @@ Page({
funcList.push(funcItem)
}
this.setData({
clubList: funcList
clubList: this.data.clubList.concat(funcList)
})
}).catch((response) => {})
},
......@@ -107,6 +106,9 @@ Page({
'iconType': 'success',
'title': funcType
})
this.setData({
clubList: [],
})
this.queryClubEnter()
}).catch((response) => {})
},
......@@ -129,6 +131,9 @@ Page({
'iconType': 'success',
'title': funcType
})
this.setData({
clubList: [],
})
this.queryClubEstablish()
}).catch((response) => {})
},
......@@ -242,10 +247,33 @@ Page({
wx.redirectTo({ url: '/pages/club/home/home' })
},
/**
* 页面触底事件
* @function
* @param {object} - funcEvent
* @returns
*/
onReachBottom: function () {
this.setData({
pageIndex: this.data.pageIndex + 1
})
switch (this.data.tabIndex) {
case 0:
this.queryClubEnter()
break
case 1:
this.queryClubEstablish()
break
}
},
eventTabChange: function (funcEvent) {
let funcTabIndex = funcEvent.detail.index
this.setData({
tabIndex: funcTabIndex
clubList: [],
tabIndex: funcTabIndex,
pageIndex: 1,
})
switch (funcTabIndex) {
......
......@@ -11,7 +11,7 @@
bindtabChange="eventTabChange">
</m-tab>
<view class="container">
<view class="club-list bg-gradient {{clubList.length ? 'column' : 'row cc ac'}}">
<view class="club_list {{clubList.length ? 'column' : 'row cc ac'}}">
<block wx:for="{{clubList}}" wx:for-item="item" wx:for-index="index" wx:key="index">
<!-- 待审核 -->
<view class="club-item row ac" wx:if="{{item.state === 0}}">
......
......@@ -33,10 +33,11 @@
}
/* 俱乐部列表 */
.club-list {
.club_list {
width: 750rpx;
min-height: 85vh;
padding: 0 40rpx 100rpx 40rpx;
background: linear-gradient(180deg, #fafafa 0%, #f5f5f5 20%, #f5f5f5 100%);
}
.club-item {
......
......@@ -507,12 +507,12 @@ Page({
* @returns
*/
onIntegralDetail: function (funcEvent) {
// let integral = funcEvent.currentTarget.dataset.integral
let funcIntegral = funcEvent.currentTarget.dataset.integral
// wx.navigateTo({
// url: '/pages/mine/accumulate/accumulate?integral=' + integral,
// })
wx.navigateTo({ url: '/pages/mall/home/home' })
wx.navigateTo({ url: '/pages/mall/home/home?integral=' + funcIntegral })
},
/**
......
......@@ -1068,9 +1068,9 @@ Page({
* @returns
*/
paySubmitActivity: function () {
App.wxRequest({
App.request({
url: 'v1/activity/doActivityEnroll',
data: {
params: {
'activityId': this.data.shoppingCartList[0].id,
'activityTimesId': this.data.entryId,
'enrollNum': this.data.quantity,
......@@ -1078,104 +1078,75 @@ Page({
'mobile': this.data.registerInfo[0].phone,
'totalPrice': Number(this.data.payAmount),
},
success: (response) => {
if (/非该俱乐部成员/.test(response.data.msg)) {
App.ui.showToast({
iconType: 'error',
title: response.data.msg,
})
this.setData({
isPaySubmit: false,
})
return
}
if (/请勿重复报名/.test(response.data.msg)) {
App.ui.showToast({
iconType: 'error',
title: response.data.msg,
})
this.setData({
isPaySubmit: false,
})
return
}
if (/名额不足/.test(response.data.msg)) {
App.ui.showToast({
iconType: 'error',
title: response.data.msg,
})
this.setData({
isPaySubmit: false,
})
return
}
if (/总价格不能为空/.test(response.data.msg)) {
App.ui.showToast({
iconType: 'error',
title: response.data.msg,
})
this.setData({
isPaySubmit: false,
})
return
}
if (/价格不一致/.test(response.data.msg)) {
App.ui.showToast({
iconType: 'error',
title: response.data.msg,
})
return
}
// 库存充足正常下单支付
let funcResponse = response.data
pagePayId = funcResponse.orderId
this.setData({
orderId: pagePayId
})
}).then((response) => {
let funcData = response.data
pagePayId = funcResponse.orderId
this.setData({
orderId: pagePayId
})
// 支付金额为零,默认支付成功
if (Number(this.data.payAmount) === 0) {
this.payStatus(true)
return
}
wx.requestPayment({
'timeStamp': funcResponse.timeStamp,
'nonceStr': funcResponse.nonceStr,
'package': funcResponse.package,
'signType': funcResponse.signType,
'paySign': funcResponse.paySign,
success: (response) => {
if (response.errMsg === 'requestPayment:ok') {
// 用户点击支付完成按钮回调
// this.payStatus(true)
}
// 支付金额为零,默认支付成功
if (Number(this.data.payAmount) === 0) {
this.payStatus(true)
return
}
wx.requestPayment({
'timeStamp': funcData.timeStamp,
'nonceStr': funcData.nonceStr,
'package': funcData.package,
'signType': funcData.signType,
'paySign': funcData.paySign,
success: (response) => {
if (response.errMsg === 'requestPayment:ok') {
// 用户点击支付完成按钮回调
// this.payStatus(true)
}
if (response.errMsg === 'requestPayment:fail cancel') {
clearInterval(App.globalData.payStateTimer)
this.payStatus(false)
}
},
fail: (response) => {
if (response.errMsg === 'requestPayment:fail cancel') {
clearInterval(App.globalData.payStateTimer)
this.payStatus(false)
}
})
},
fail: (response) => {
clearInterval(App.globalData.payStateTimer)
this.payStatus(false)
}
})
// 开启支付状态轮询
// wx.showLoading({ title: '正在获取数据', mask: true })
this.queryPayStatus(pagePayId)
},
fail: (error) => {
this.setData({
isPaySubmit: true,
})
}
// 开启支付状态轮询
// wx.showLoading({ title: '正在获取数据', mask: true })
this.queryPayStatus(pagePayId)
}).catch((response) => {
App.ui.showToast({
iconType: 'error',
title: response.message,
})
this.setData({
isPaySubmit: false,
})
})
// App.wxRequest({
// url: 'v1/activity/doActivityEnroll',
// data: {
// 'activityId': this.data.shoppingCartList[0].id,
// 'activityTimesId': this.data.entryId,
// 'enrollNum': this.data.quantity,
// 'name': this.data.registerInfo[0].name,
// 'mobile': this.data.registerInfo[0].phone,
// 'totalPrice': Number(this.data.payAmount),
// },
// success: (response) => {
// },
// fail: (error) => {
// this.setData({
// isPaySubmit: true,
// })
// }
// })
},
queryPayStatus: function () {
......
......@@ -254,6 +254,7 @@ Page({
},
onToClubList: function () {
wx.removeStorageSync('tempBackInfo')
wx.navigateTo({ url: '/pages/club/home/home' })
},
......
......@@ -4,7 +4,7 @@
"ignore": []
},
"setting": {
"urlCheck": true,
"urlCheck": false,
"es6": true,
"enhance": true,
"postcss": true,
......@@ -33,7 +33,6 @@
"userConfirmedUseCompilerModuleSwitch": false,
"packNpmManually": false,
"packNpmRelationList": [],
"enableEngineNative": false,
"minifyWXSS": true
},
"compileType": "miniprogram",
......
......@@ -4,6 +4,7 @@ const output = {
// 三期测试环境
baseUrl: 'https://sm-web.meiqicloud.com/api/',
// baseUrl: 'http://shaoguang.free.idcfengye.com/api/'
// 正式环境
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment