Commit 2cf686cc by 严立

LL - 客户审查初版

parent 38d785c8
......@@ -11,6 +11,7 @@ Page({
bannerImage: App.globalData.appResourcesBase + 'campsite/campsite-header.png',
campsiteDescribe: [],
average: 0,
},
onLoad: function (options) {
......@@ -22,6 +23,7 @@ Page({
this.setShopInfo(3, 1)
this.queryCampsiteDescribe()
this.queryActivity()
this.queryEvaluate()
},
setSideHeight: function () {
......@@ -86,6 +88,24 @@ Page({
})
},
queryEvaluate: function () {
let that = this
let shopInfo = wx.getStorageSync('shopInfoBuffer')
App.request({
url: 'v1/appraise/getOfficeAppraise',
params: {
'officeId': shopInfo.id
}
}).then((response) => {
let funcData = response.data
let funcAverage = Math.floor(funcData.environmentalEvaluation + funcData.productEvaluatio + funcData.serviceEvaluation) / 3
console.log(funcAverage)
this.setData({
average: funcAverage
})
})
},
onEvaluateMore: function () {
wx.navigateTo({ url: '/pages/campsite/evaluate/evaluate' })
},
......
......@@ -13,7 +13,7 @@
<view class="row cb ac">
<view class="other_evaluate row ac">
<image class="other_evaluate_title" src="../home/image/evaluate-title.png"></image>
<block wx:for="{{5}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<block wx:for="{{average}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<image class="other_evaluate_start" src="{{imageBase + 'icon/star-1.png'}}"></image>
</block>
<image class="other_evaluate_more" src="../home/image/evaluate.png" bindtap="onEvaluateMore"></image>
......
......@@ -11,6 +11,7 @@ Page({
bannerImage: App.globalData.appResourcesBase + 'campsite/campsite-header.png',
campsiteDescribe: [],
average: 0,
},
onLoad: function (options) {
......@@ -22,6 +23,7 @@ Page({
this.setShopInfo(3, 1)
this.queryCampsiteDescribe()
this.queryActivity()
this.queryEvaluate()
},
setSideHeight: function () {
......@@ -86,6 +88,24 @@ Page({
})
},
queryEvaluate: function () {
let that = this
let shopInfo = wx.getStorageSync('shopInfoBuffer')
App.request({
url: 'v1/appraise/getOfficeAppraise',
params: {
'officeId': shopInfo.id
}
}).then((response) => {
let funcData = response.data
let funcAverage = Math.floor(funcData.environmentalEvaluation + funcData.productEvaluatio + funcData.serviceEvaluation) / 3
console.log(funcAverage)
this.setData({
average: funcAverage
})
})
},
onEvaluateMore: function () {
wx.navigateTo({ url: '/pages/campsite/evaluate/evaluate' })
},
......
......@@ -13,7 +13,7 @@
<view class="row cb ac">
<view class="other_evaluate row ac">
<image class="other_evaluate_title" src="./image/evaluate-title.png"></image>
<block wx:for="{{5}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<block wx:for="{{average}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<image class="other_evaluate_start" src="{{imageBase + 'icon/star-1.png'}}"></image>
</block>
<image class="other_evaluate_more" src="./image/evaluate.png" bindtap="onEvaluateMore"></image>
......
......@@ -148,10 +148,7 @@ Page({
onEnter: function () {
if (!App.userIsRegister()) return
if (!this.inspectForm()) return
App.ui.showToast({
iconType: 'loading',
title: '正在提交',
})
App.ui.showToast({ iconType: 'loading', title: '正在提交', })
let funcEnterInfo = this.data.enterInfo
let funcEnterInfoCustom = this.data.enterInfoCustom
......@@ -176,12 +173,14 @@ Page({
'smClub': { id: this.data.clubInfo.id }
}
}).then((response) => {
console.log('then')
App.ui.hideToast()
wx.setStorageSync('tempBackInfo', 'winEnter')
wx.navigateBack()
wx.navigateBack({
event: {
'type': 'onReload',
}
})
}).catch((response) => {
console.log('catch')
App.ui.showToast({
'iconType': 'error',
'title': response.message
......
......@@ -11,7 +11,9 @@ Page({
],
tabIndex: 0,
clubList: [],
clubInfoList: [],
enterClubIdList: [],
enterClubStateList: [],
pageIndex: 1,
pageSize: 5,
......@@ -28,7 +30,6 @@ Page({
onShow: function () {
let funcBackInfo = wx.getStorageSync('tempBackInfo')
console.log('show', funcBackInfo)
switch (funcBackInfo) {
case 'winEstablish':
this.setData({
......@@ -46,6 +47,14 @@ Page({
}
},
onReload: function () {
console.log('onReload')
this.setData({
pageIndex: 1
})
this.queryEnterClubList()
},
/**
* 设置俱乐部分类 tab
* @function
......@@ -72,20 +81,48 @@ Page({
tabItem: this.data.tabItem.concat(funcList)
})
this.queryClub(0)
console.log(this.data.tabItem)
this.queryEnterClubList()
}).catch((response) => {
console.log(response)
})
},
/**
* 查询我加入的
* @function
* @param
* @returns
*/
queryEnterClubList: function () {
App.request({
url: 'v3/club/getMyJoinClubs',
params: {
'pageNo': 1,
'pageSize': -1,
}
}).then((response) => {
let funcData = response.data.list
let funcEnterClubIdList = []
let funcEnterClubStateList = []
for (let i = 0, l = funcData.length; i < l; i++) {
funcEnterClubIdList.push(funcData[i].clubId)
funcEnterClubStateList.push(Number(funcData[i].state))
}
this.setData({
enterClubIdList: funcEnterClubIdList,
enterClubStateList: funcEnterClubStateList,
})
this.queryClubInfoList()
})
},
/**
* 查询俱乐部列表
* @function
* @param {object} - funcEvent
* @param
* @returns
*/
queryClub: function () {
queryClubInfoList: function () {
App.request({
url: 'v3/club/getClubList',
params: {
......@@ -104,19 +141,23 @@ Page({
'name': funcData[i].name,
'describe': funcData[i].summary,
'member': funcData[i].memberNum,
'state': 2,
'isOwner': Number(funcData[i].owner) === 0 ? false : true
}
let funcEnterClubListIndex = this.data.enterClubIdList.indexOf(funcItem.id)
if (0 <= funcEnterClubListIndex) {
funcItem.state = this.data.enterClubStateList[funcEnterClubListIndex]
}
funcList.push(funcItem)
}
console.log(funcList)
this.setData({
clubList: this.data.clubList.concat(funcList)
clubInfoList: this.data.pageIndex === 1 ? funcList : this.data.clubInfoList.concat(funcList)
})
}).catch((response) => {})
},
/**
* 创建俱乐部
* @function
......@@ -197,10 +238,10 @@ Page({
let funcItem = funcEvent.detail
this.setData({
tabIndex: funcItem.index,
clubList: [],
clubInfoList: [],
pageIndex: 1,
})
this.queryClub()
this.queryClubInfoList()
},
/**
......@@ -220,16 +261,14 @@ Page({
* @returns
*/
onReachBottom: function () {
console.log('onReachBottom')
this.setData({
pageIndex: this.data.pageIndex + 1
})
this.queryClub()
this.queryClubInfoList()
},
eventNavChangeHeight: function (funcEvent) {
console.log(funcEvent)
let funcNavHeight = funcEvent.detail.navHeight
this.setData({
bannerCreatTop: funcNavHeight + 30 * wx.getStorageSync('unitProportion')
......
......@@ -41,7 +41,7 @@
</view>
<view class="club-list">
<block wx:for="{{clubList}}" wx:for-item="item" wx:for-index="index" wx:key="index">
<block wx:for="{{clubInfoList}}" wx:for-item="item" wx:for-index="index" wx:key="index">
<view class="club-item row" data-item="{{item}}" bindtap="onClubDetail">
<view class="club-logo">
<image src="{{item.logo}}"></image>
......@@ -56,7 +56,9 @@
</view>
<view class="club-info-other row cb ac">
<text>{{item.member + '成员'}}</text>
<button data-item="{{item}}" catchtap="onEnterClub">申请加入</button>
<button class="club_info_other_apply" wx:if="{{item.state === 0}}" data-item="{{item}}">已申请</button>
<button class="club_info_other_enter" wx:if="{{item.state === 1}}" data-item="{{item}}">已加入</button>
<button class="club_info_other_submit" wx:if="{{item.state === 2}}" data-item="{{item}}" catchtap="onEnterClub">申请加入</button>
</view>
</view>
</view>
......
......@@ -153,7 +153,20 @@
color: #959DA9;
}
.club-info-other > button {
.club_info_other_apply,
.club_info_other_enter {
width: 120rpx;
height: 56rpx;
border-radius: 2px;
background: #C8E1EC;
font-size: 22rpx;
font-weight: 500;
line-height: 56rpx;
color: #FFFFFF;
}
.club_info_other_submit {
width: 120rpx;
height: 56rpx;
border-radius: 2px;
......
......@@ -6,6 +6,8 @@ Page({
clubInfo: {},
clubActivity: [],
enterClubIdList: [],
enterClubStateList: [],
examineRemark: '',
winEnter: false, // 加入提交提示
......@@ -29,7 +31,7 @@ Page({
'isOwner': false
},
})
this.queryClubInfo()
this.queryEnterClubList()
this.queryActivity()
},
......@@ -49,6 +51,40 @@ Page({
}
},
onReload: function () {
console.log('onReload')
this.queryEnterClubList()
},
/**
* 查询我加入的
* @function
* @param
* @returns
*/
queryEnterClubList: function () {
App.request({
url: 'v3/club/getMyJoinClubs',
params: {
'pageNo': 1,
'pageSize': -1,
}
}).then((response) => {
let funcData = response.data.list
let funcEnterClubIdList = []
let funcEnterClubStateList = []
for (let i = 0, l = funcData.length; i < l; i++) {
funcEnterClubIdList.push(funcData[i].clubId)
funcEnterClubStateList.push(Number(funcData[i].state))
}
this.setData({
enterClubIdList: funcEnterClubIdList,
enterClubStateList: funcEnterClubStateList,
})
this.queryClubInfo()
})
},
/**
* 查询俱乐部信息
* @function
......@@ -63,8 +99,7 @@ Page({
}
}).then((response) => {
let funcData = response.data
this.setData({
clubInfo: {
let funcItem = {
'id': funcData.clubId,
'logo': funcData.logo,
'cover': funcData.cover,
......@@ -72,8 +107,15 @@ Page({
'describe': funcData.summary,
'member': funcData.memberNum,
'content': funcData.content,
'state': 2,
'isOwner': Number(funcData.owner) === 0 ? false : true
}
let funcEnterClubListIndex = this.data.enterClubIdList.indexOf(funcItem.id)
if (0 <= funcEnterClubListIndex) {
funcItem.state = this.data.enterClubStateList[funcEnterClubListIndex]
}
this.setData({
clubInfo: funcItem
})
}).catch((response) => {})
},
......
......@@ -94,7 +94,15 @@
<image mode="widthFix" src="./image/enter-rule.png"></image>
</view>
<block wx:if="{{clubInfo.state === 0}}">
<m-button-bottom text="已申请" isEnable="{{false}}"></m-button-bottom>
</block>
<block wx:if="{{clubInfo.state === 1}}">
<m-button-bottom text="已加入" isEnable="{{false}}"></m-button-bottom>
</block>
<block wx:if="{{clubInfo.state === 2}}">
<m-button-bottom text="申请加入" bindclick="onEnterClub"></m-button-bottom>
</block>
</view>
<!-- 俱乐部加入权限提醒 -->
......
......@@ -152,9 +152,6 @@
<!-- 商店 -->
<view class="shop">
<view class="shop-name">
<image src="{{resourcesBase + 'commodity/home/shop-title-2.png'}}"></image>
</view>
<view class="shop-title col">
<text>累计消费</text>
<text>兑换特色产品</text>
......
......@@ -66,8 +66,13 @@ Page({
'address': funcData[i].address,
'isDefault': Boolean(Number(funcData[i].defaultFlag)),
}
if (funcItem.isDefault) {
funcList.unshift(funcItem)
} else {
funcList.push(funcItem)
}
}
// 在积分商城下单时,通过比对新增地址的信息,来获取新增地址的 id。
if (wx.getStorageSync('tempOptions') === 'address') {
......
......@@ -3,7 +3,6 @@ let App = getApp()
Page({
data: {
options: {},
isDoing: false,
instructions: false,
swiperCurrent: 0,
showCodePopup: false,
......@@ -36,6 +35,7 @@ Page({
},
onLoad: function (options) {
console.log(options)
this.setData({
options: options,
activityId: options.activityId,
......@@ -89,7 +89,7 @@ Page({
'integral': funcResponse.integral,
'instructions': funcResponse.particulars,
'expireTime': funcResponse.expireTime.replace(/-/g, '.').replace('~', '-'), //订单有效期
// 'wxRequest': funcResponse.wxRequest,
'wxRequest': funcResponse.wxRequest,
}
// 电影
......@@ -127,8 +127,6 @@ Page({
goodsList: funcGoodsList,
})
// 等待支付时间计时
if (funcOrderInfo.state == 0) this.setPayCouponInfo(funcOrderInfo.submitTime)
this.setData({
orderInfo: funcOrderInfo,
shopInfo: funcShopInfo,
......@@ -165,6 +163,16 @@ Page({
// 再次下单
onOrderAgain: function () {
let funcShopInfoBuffer = App.getShopInfo(this.data.shopInfo.id)
if (funcShopInfoBuffer.appId === 0) {
wx.navigateTo({ url: '/pages/club/home/home' })
} else {
wx.navigateTo({ url: '/pages/play/activity/activity' })
}
return
let funcUrl = ''
let funcGoodsType = this.data.orderInfo.goodsType
let funcShopAppId = App.getShopInfo(this.data.shopInfo.id).appId
......@@ -220,6 +228,7 @@ Page({
},
// 去支付
onOrderPay: function (event) {
let funcThis = this
// 数据校验不通过
let wxRequest = this.data.orderInfo.wxRequest
// 待支付返回的wx支付参数
......@@ -231,7 +240,13 @@ Page({
signType: wxRequest.signType,
paySign: wxRequest.paySign,
success(res) {
this.queryOrderDetail()
funcThis.queryOrderDetail()
wx.emit({
event: {
type: 'onReload',
receivePage: 'pages/mine/appointment/appointment',
}
})
},
fail(res) { }
})
......@@ -260,10 +275,6 @@ Page({
App.ui.showToast({
'iconType': 'loading',
'title': '处理中',
'duration': 60000
})
this.setData({
isDoing: true,
})
App.request({
url: 'v1/activity/doCancel',
......@@ -273,31 +284,18 @@ Page({
}
}).then((response) => {
App.ui.hideToast()
this.setData({
isDoing: false,
})
App.ui.showToast({
'iconType': 'success',
'title': type == 1 ? '订单删除成功' : '订单取消成功'
})
setTimeout(function () {
if (type == 1) {
// 删除操作
'title': type == 1 ? '订单删除成功' : '订单取消成功',
ending: () => {
wx.navigateBack({
delta: 1
})
wx.setStorageSync('option-appointment', 'refresh')
} else {
// 取消操作
let state = `orderInfo.state`
this.setData({
isDoing: false,
[state]: -1
event: {
type: 'onReload'
}
})
}
}, 2000)
})
}).catch((response) => {
App.ui.showToast({
'iconType': 'error',
......
......@@ -71,6 +71,22 @@ Page({
}
},
onReload: function () {
this.setData({
pageNo: 1,
pageSize: 10,
data: [],
activityList: [],
})
let type = this.data.option.tab ? 1 * this.data.option.tab : 0
if (type === 0) {
this.queryActivityList()
} else {
this.getList(type)
}
},
queryActivityList: function () {
wx.setStorageSync('option-appointment', '')
App.ui.showToast({
......
<m-toast></m-toast>
<m-dialog></m-dialog>
<m-nav titleText="我的俱乐部" styleIndex="{{1}}"></m-nav>
<m-nav titleText="入会审核" styleIndex="{{1}}"></m-nav>
<view class="tab">
<m-tab item="{{tabItem}}" classTabList="row cb tab_list" bindtabChange="eventTabChange"></m-tab>
......
......@@ -103,6 +103,11 @@
width: 750rpx;
height: 146rpx;
padding: 0 40rpx;
background: #FFFFFF;
}
.pass_item_line:last-child {
display: none;
}
.pass_item_avatar {
......
......@@ -190,6 +190,7 @@ Page({
},
// 去支付
onOrderPay: function (event) {
let funcThis = this
// 数据校验不通过
let wxRequest = this.data.orderInfo.wxRequest
// 待支付返回的wx支付参数
......@@ -201,7 +202,13 @@ Page({
signType: wxRequest.signType,
paySign: wxRequest.paySign,
success(res) {
this.queryOrderDetail()
funcThis.queryOrderDetail()
wx.emit({
event: {
type: 'onReload',
receivePage: 'pages/mine/order/order',
}
})
},
fail(res) {}
})
......
......@@ -72,7 +72,6 @@ Page({
'shopId': funcData[i].officeId,
}
funcList.push(funcItem)
funcList.push(funcItem)
}
this.setData({
recentActivitiesList: funcList
......
......@@ -97,7 +97,7 @@ Page({
movieInfo.priceSpecialText = App.modular.utils.formatAmount(movieInfo.ownerPrice), // 业主价文本格式
movieInfo.priceText = App.modular.utils.formatAmount(movieInfo.visitorPrice),
movieInfo.tags = movieInfo.tags.replace(/( )?热映影片( )?/, ' ').split(' ')
movieInfo.tags = movieInfo.tags
......
page {
min-height: 100vh;
background-color: #1C1C25;
}
.contaniner {
flex-grow: 1;
}
/* 状态筛选菜单 */
.status {
z-index: 2;
position: fixed;
left: 0;
width: 750rpx;
height: 120rpx;
background-color: #1C1C25;
border-bottom: 1rpx #3A3A40 solid;
}
.status-item {
flex: 1;
height: 120rpx;
height: 60rpx;
font-size: 26rpx;
font-weight: 400;
line-height: 36rpx;
......@@ -23,12 +25,16 @@ page {
}
.status-item-active {
height: 120rpx;
color: #fff;
height: 60rpx;
font-weight: 600;
border-bottom: 4rpx #fff solid;
}
.status-item-inactive {
height: 60rpx;
}
.movie-wrapper {
position: relative;
width: 670rpx;
......@@ -159,39 +165,12 @@ page {
letter-spacing: 3rpx;
line-height: 44rpx;
}
.movie-week-title {
position: relative;
margin: 0 8rpx;
padding: 8rpx 40rpx 4rpx;
}
.star-left {
position: absolute;
left: 0;
bottom: 0;
width: 36rpx;
height: 8rpx;
}
.star-right {
position: absolute;
right: 0;
top: 0;
width: 68rpx;
height: 40rpx;
}
.line {
width: 80rpx;
height: 1rpx;
background: #3A3A40;
}
.all-movie-wrapper {
position: relative;
width: 670rpx;
height: 366rpx;
margin: 80rpx auto 0;
margin: 72rpx 40rpx 8rpx 40rpx;
padding: 32rpx 32rpx 32rpx 278rpx;
background: #272734;
border-radius: 4rpx;
......@@ -206,6 +185,7 @@ page {
border-radius: 4rpx;
}
.footer-img {
flex-grow: 1;
width: 750rpx;
height: 150rpx;
margin-top: 64rpx;
......@@ -234,3 +214,46 @@ image {
width: 100%;
height: 100%;
}
/* 全部热映 */
.hitmovie_special_wrap {
margin: 60rpx 0 0 0;
}
.hitmovie_special {
display: inline-block;
width: 100%;
color: #C2C7CF;
}
.hitmovie_special_line {
display: inline-block;
min-width: 80rpx;
height: 1px;
margin: 0 48rpx;
background: #292931;
}
.hitmovie_special_title_wrap {
position: relative;
}
.hitmovie_special_title {
color: #C2C7CF;
}
.hitmovie_special_title_ornament:nth-child(1) {
position: absolute;
left: -40rpx;
bottom: 0;
width: 36rpx;
height: 8rpx;
}
.hitmovie_special_title_ornament:nth-child(3) {
position: absolute;
right: -40rpx;
bottom: 0;
width: 68rpx;
height: 40rpx;
}
\ No newline at end of file
......@@ -28,12 +28,12 @@
"disablePlugins": [],
"outputPath": ""
},
"enableEngineNative": false,
"useIsolateContext": true,
"useCompilerModule": true,
"userConfirmedUseCompilerModuleSwitch": false,
"packNpmManually": false,
"packNpmRelationList": [],
"enableEngineNative": false,
"minifyWXSS": true
},
"compileType": "miniprogram",
......
......@@ -29,6 +29,7 @@ function emit (wxObject) {
if (funcPageList[i].route === funcReceivePagePath) {
funcPageList[i].onCatchNewEvent(object.event)
console.log(funcPageList[i][object.event.type])
if (typeof funcPageList[i][object.event.type] === 'function' ) funcPageList[i][object.event.type]()
break
}
......@@ -50,12 +51,13 @@ function navigateBack (wxObject) {
console.log('[extend api] navigateBack', object)
if (object && object.event && inspectEventFormat(object.event)) {
let funcPageList = getCurrentPages()
let funcReceivePagePath = object.event.receivePage ? object.event.receivePage : funcPageList[funcPageList.length - 1].route
let funcReceivePagePath = object.event.receivePage ? object.event.receivePage : funcPageList[funcPageList.length - 2].route
if (funcPageList.length > 1) {
for (let i = funcPageList.length - 1; 0 <= i; i--) {
if (funcPageList[i].route === funcReceivePagePath) {
funcPageList[i].onCatchNewEvent(object.event)
console.log(funcPageList[i])
if (typeof funcPageList[i][object.event.type] === 'function' ) funcPageList[i][object.event.type]()
break
}
......
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