Commit acf196ae by 严立

LL - bug 修复

parent 1d9aa20e
...@@ -79,7 +79,7 @@ App({ ...@@ -79,7 +79,7 @@ App({
*/ */
userUpdate: function () { userUpdate: function () {
console.log('userUpdate') console.log('userUpdate')
this.queryClubEstablishTotal() this.queryClubAuditTotal()
}, },
/** /**
...@@ -322,28 +322,21 @@ App({ ...@@ -322,28 +322,21 @@ App({
* @param * @param
* @returns * @returns
*/ */
queryClubEstablishTotal: function () { queryClubAuditTotal: function () {
this.request({ this.request({
url: 'v3/club/getMyCreateClub', url: 'v3/club/countWaitAudit',
params: { params: {
'pageNo': 1, 'state': 0
'pageSize': -1,
} }
}).then((response) => { }).then((response) => {
let funcData = response.data.list wx.setStorageSync('clubExamine', response.data.count)
let funcExamine = 0 if (response.data.count > 0) {
for (let i = 0, l = funcData.length; i < l; i++) {
funcExamine = funcExamine + Number(funcData[i].count)
}
if (funcExamine > 0) {
wx.setTabBarItem({ wx.setTabBarItem({
'index': 4, index: 4,
'text': '我的', iconPath: '/image/tabbar/mine-red.png',
'iconPath': 'image/tabbar/mine-red.png', selectedIconPath: '/image/tabbar/mine-s-red.png'
'selectedIconPath': 'image/tabbar/mine-s-red.png',
}) })
} }
wx.setStorageSync('clubExamine', funcExamine)
}).catch((response) => {}) }).catch((response) => {})
}, },
...@@ -441,7 +434,6 @@ App({ ...@@ -441,7 +434,6 @@ App({
return funcInfo return funcInfo
}, },
// s3 新增函数
/** /**
* 全局函数 - 设置价格类型 * 全局函数 - 设置价格类型
* @function * @function
......
...@@ -30,8 +30,8 @@ ...@@ -30,8 +30,8 @@
"pages/mine/info/info", "pages/mine/info/info",
"pages/mine/order/order", "pages/mine/order/order",
"pages/mine/card/card", "pages/mine/card/card",
"pages/mine/club/club",
"pages/mine/club-manage/club-manage", "pages/mine/club-manage/club-manage",
"pages/mine/club/club",
"pages/mine/accumulate/accumulate", "pages/mine/accumulate/accumulate",
"pages/mine/appointment/appointment", "pages/mine/appointment/appointment",
"pages/mine/appointment-ticket/appointment-ticket", "pages/mine/appointment-ticket/appointment-ticket",
......
...@@ -48,7 +48,7 @@ Component({ ...@@ -48,7 +48,7 @@ Component({
methods: { methods: {
onInput: function (funcEvent) { onInput: function (funcEvent) {
console.log('onInputBlur', funcEvent.detail.value) console.log('onInput', funcEvent.detail.value)
this.setData({ this.setData({
inputContent: funcEvent.detail.value inputContent: funcEvent.detail.value
}) })
...@@ -60,8 +60,8 @@ Component({ ...@@ -60,8 +60,8 @@ Component({
}, },
onConfirm: function () { onConfirm: function () {
console.log('onConfirm', this.data.inputContent)
this.data.success({ input: this.data.inputContent }) this.data.success({ input: this.data.inputContent })
console.log('Dialog', this.data.inputContent)
App.ui.hideDialog() App.ui.hideDialog()
}, },
} }
......
...@@ -53,8 +53,7 @@ ...@@ -53,8 +53,7 @@
<text class="secondary">{{content}}</text> <text class="secondary">{{content}}</text>
</view> </view>
<view class="dialog-input row cc"> <view class="dialog-input row cc">
<input auto-focus placeholder="{{placeholder}}" placeholder-class="dialog-input-placeholder" bindinput="onInput"> <input auto-focus placeholder="{{placeholder}}" placeholder-class="dialog-input-placeholder" value="{{inputContent}}" bindinput="onInput"></input>
</input>
</view> </view>
<view class="dialog-operation row cb ac border-base"> <view class="dialog-operation row cb ac border-base">
<button class="dialog-operation-cancel row cc ac secondary" bindtap="onCancel">{{cancel}}</button> <button class="dialog-operation-cancel row cc ac secondary" bindtap="onCancel">{{cancel}}</button>
......
...@@ -83,6 +83,7 @@ function hideDialog () { ...@@ -83,6 +83,7 @@ function hideDialog () {
content: '这里是提示信息', content: '这里是提示信息',
cancel: '取消', cancel: '取消',
confirm: '确定', confirm: '确定',
inputContent: '',
success: function () {}, success: function () {},
fail: function () {}, fail: function () {},
winDialog: false, winDialog: false,
......
...@@ -119,10 +119,15 @@ Component({ ...@@ -119,10 +119,15 @@ Component({
}.bind(this), 1000) }.bind(this), 1000)
}, },
onClosePopup: function () { onClosePopup: function (event) {
console.log('onClosePopup', event)
this.setData({ this.setData({
isShow: false isShow: false
}) })
}, },
onPreventClosePopup: function (event) {
console.log('onPreventClosePopup', event)
}
} }
}) })
\ No newline at end of file
<view class="m-popup" wx:if="{{isShow}}" bindtap="onClosePopup"> <view class="m-popup" wx:if="{{isShow}}" bind:tap="onClosePopup">
<view <view class="m-popup-content" style="{{cssPopup + 'opacity: ' + elementOpacity + ';'}}" animation="{{animationData}}" catch:tap="onPreventClosePopup">
class="m-popup-content"
style="{{cssPopup + 'opacity: ' + elementOpacity + ';'}}"
animation="{{animationData}}"
>
<slot name="content"></slot> <slot name="content"></slot>
</view> </view>
</view> </view>
\ No newline at end of file
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
.ac { align-items: center; } .ac { align-items: center; }
.ae { align-items: flex-end; } .ae { align-items: flex-end; }
.overflow_point_1 { display: -webkit-box; overflow: hidden; text-overflow: ellipsis; -webkit-line-clamp: 1; -webkit-box-orient: vertical; } .overflow_point_1 { overflow: hidden; text-overflow: ellipsis; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.overflow_point_2 { display: -webkit-box; overflow: hidden; text-overflow: ellipsis; -webkit-line-clamp: 2; -webkit-box-orient: vertical; } .overflow_point_2 { display: -webkit-box; overflow: hidden; text-overflow: ellipsis; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.overflow_point_3 { display: -webkit-box; overflow: hidden; text-overflow: ellipsis; -webkit-line-clamp: 3; -webkit-box-orient: vertical; } .overflow_point_3 { display: -webkit-box; overflow: hidden; text-overflow: ellipsis; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.overflow_point_4 { display: -webkit-box; overflow: hidden; text-overflow: ellipsis; -webkit-line-clamp: 4; -webkit-box-orient: vertical; } .overflow_point_4 { display: -webkit-box; overflow: hidden; text-overflow: ellipsis; -webkit-line-clamp: 4; -webkit-box-orient: vertical; }
\ No newline at end of file
...@@ -19,8 +19,8 @@ let Development = { ...@@ -19,8 +19,8 @@ let Development = {
// id 数据库门店 id // id 数据库门店 id
shopId: [ shopId: [
// 特殊门店 - 页面没有入口,只作信息展示 // 特殊门店 - 页面没有入口,只作信息展示
{ appId: 0, id: '03d9806e6f534152b20d9733f854c43d', logo: '', commodityLogo: '', cover: 'shop/cover-0.png', printUse: '', print: '', name: '碧海银湖', title: ['碧海银湖', '碧海银湖', '碧海银湖', '碧海银湖', '碧海银湖', '碧海银湖', '碧海银湖'] }, { appId: 0, id: '03d9806e6f534152b20d9733f854c43d', logo: 'shop/logo-0.png', commodityLogo: '', cover: 'shop/cover-0.png', printUse: '', print: '', name: '世茂碧海银湖', title: ['碧海银湖', '碧海银湖', '碧海银湖', '碧海银湖', '碧海银湖', '碧海银湖', '碧海银湖'] },
{ appId: 0, id: '2da1a0cd375447f6b7e51d06b11b5300', logo: '', commodityLogo: '', cover: 'shop/cover-0.png', printUse: '', print: '', name: '碧海银湖', title: ['碧海银湖', '碧海银湖', '碧海银湖', '碧海银湖', '碧海银湖', '碧海银湖', '碧海银湖'] }, { appId: 0, id: '2da1a0cd375447f6b7e51d06b11b5300', logo: 'shop/logo-0.png', commodityLogo: '', cover: 'shop/cover-0.png', printUse: '', print: '', name: '世茂碧海银湖', title: ['碧海银湖', '碧海银湖', '碧海银湖', '碧海银湖', '碧海银湖', '碧海银湖', '碧海银湖'] },
// 普通门店 // 普通门店
{ appId: 1, id: '581be62a80bb4f0485abd87abcf64dc0', logo: 'shop/logo-1.png', commodityLogo: 'shop/commodity-logo-1.png', cover: 'shop/cover-1.png', printUse: 'shop/print/print-1-1.png', print: 'shop/print/print-1-2.png', name: '海错图', title: ['海错图', '海错图购票', '海错图', '海错图文创店', '海错图', '海错图', '海错图'] }, { appId: 1, id: '581be62a80bb4f0485abd87abcf64dc0', logo: 'shop/logo-1.png', commodityLogo: 'shop/commodity-logo-1.png', cover: 'shop/cover-1.png', printUse: 'shop/print/print-1-1.png', print: 'shop/print/print-1-2.png', name: '海错图', title: ['海错图', '海错图购票', '海错图', '海错图文创店', '海错图', '海错图', '海错图'] },
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
<text>俱乐部名称</text> <text>俱乐部名称</text>
<m-input <m-input
inputId="clubName" inputId="clubName"
maxlength="{{12}}"
className="form-item-input row ac" className="form-item-input row ac"
placeholder="请输入俱乐部名称" placeholder="请输入俱乐部名称"
bindblur="onInputBlur"> bindblur="onInputBlur">
...@@ -28,6 +29,7 @@ ...@@ -28,6 +29,7 @@
<text>姓名</text> <text>姓名</text>
<m-input <m-input
inputId="userName" inputId="userName"
maxlength="{{12}}"
className="form-item-input row ac" className="form-item-input row ac"
placeholder="请输入姓名" placeholder="请输入姓名"
bindblur="onInputBlur"> bindblur="onInputBlur">
......
...@@ -179,10 +179,6 @@ Page({ ...@@ -179,10 +179,6 @@ Page({
}).then((response) => { }).then((response) => {
App.ui.hideToast() App.ui.hideToast()
wx.setStorageSync('tempBackInfo', 'winEnter') wx.setStorageSync('tempBackInfo', 'winEnter')
let funcClubEnterId = wx.getStorageSync('clubEnterId')
if (!funcClubEnterId) funcClubEnterId = []
funcClubEnterId.push(this.data.clubInfo.id)
wx.setStorageSync('clubEnterId', funcClubEnterId)
wx.navigateBack() wx.navigateBack()
}).catch((response) => { }).catch((response) => {
App.ui.showToast({ App.ui.showToast({
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<view class="club-info col cc ac"> <view class="club-info col cc ac">
<image class="club-info-logo" src="{{clubInfo.logo}}"></image> <image class="club-info-logo" src="{{clubInfo.logo}}"></image>
<view class="club-info-name column cc ac"> <view class="club-info-name column cc ac">
<text class="title">{{clubInfo.name}}</text> <text class="title overflow_point_1">{{clubInfo.name}}</text>
</view> </view>
</view> </view>
......
...@@ -81,30 +81,6 @@ Page({ ...@@ -81,30 +81,6 @@ 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)
}
wx.setStorageSync('clubEnterId', funcList)
}).catch((response) => {})
},
/**
* 查询俱乐部列表 * 查询俱乐部列表
* @function * @function
* @param {object} - funcEvent * @param {object} - funcEvent
......
...@@ -144,7 +144,6 @@ Page({ ...@@ -144,7 +144,6 @@ Page({
* @returns * @returns
*/ */
onClubActivityEnter: function (funcEvent) { onClubActivityEnter: function (funcEvent) {
let funcEnterClub = wx.getSystemInfoSync('clubEnterId')
let funcItem = funcEvent.currentTarget.dataset.item let funcItem = funcEvent.currentTarget.dataset.item
wx.navigateTo({ wx.navigateTo({
url: '/pages/play/activity-detail/activity-detail?id=' + funcItem.id, url: '/pages/play/activity-detail/activity-detail?id=' + funcItem.id,
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<view class="club-info row cc ac"> <view class="club-info row cc ac">
<image class="club-info-logo" src="{{clubInfo.logo}}"></image> <image class="club-info-logo" src="{{clubInfo.logo}}"></image>
<view class="club-info-name column cc ac"> <view class="club-info-name column cc ac">
<text class="title">{{clubInfo.name}}</text> <text class="title overflow_point_1">{{clubInfo.name}}</text>
<text class="owner-mark" wx:if="{{clubInfo.isOwner}}">业主专享</text> <text class="owner-mark" wx:if="{{clubInfo.isOwner}}">业主专享</text>
<view class="club_info_member row cc ac" bindtap="onMemberList"> <view class="club_info_member row cc ac" bindtap="onMemberList">
<text>{{clubInfo.member + ' 成员'}}</text> <text>{{clubInfo.member + ' 成员'}}</text>
......
...@@ -96,6 +96,7 @@ Page({ ...@@ -96,6 +96,7 @@ Page({
isWritePhotosAlbum: function () { isWritePhotosAlbum: function () {
wx.getSetting({ wx.getSetting({
success: (response) => { success: (response) => {
console.log('isWritePhotosAlbum', response)
if (response.authSetting['scope.writePhotosAlbum'] || response.authSetting['scope.writePhotosAlbum'] === undefined) { if (response.authSetting['scope.writePhotosAlbum'] || response.authSetting['scope.writePhotosAlbum'] === undefined) {
this.setData({ isWritePhotosAlbum: true }) this.setData({ isWritePhotosAlbum: true })
} }
...@@ -115,24 +116,36 @@ Page({ ...@@ -115,24 +116,36 @@ Page({
*/ */
onAdminWx: function (funcEvent) { onAdminWx: function (funcEvent) {
if (this.data.isWritePhotosAlbum) { if (this.data.isWritePhotosAlbum) {
let funcItem = funcEvent.currentTarget.dataset.item App.request({
let funcClubList = wx.getStorageSync('clubEnterId') url: 'v3/club/getMyJoinClubs',
for (let i = 0, l = funcClubList.length; i < l; i++) { params: {
if (this.data.clubInfo.id === funcClubList[i]) { 'pageNo': 1,
this.setData({ 'pageSize': -1,
adminInfo: {
wx: funcItem.wx
},
winAdminInfo: true
})
return
} }
} }).then((response) => {
let funcItem = funcEvent.currentTarget.dataset.item
// 没有权限 let funcData = response.data.list
this.setData({ for (let i = 0, l = funcData.length; i < l; i++) {
winPowerInfo: true if (this.data.clubInfo.id === funcData[i].clubId) {
}) if (funcItem.wx === '') {
App.ui.showToast({ iconType: 'error', title: '暂无二维码', })
return
}
this.setData({
adminInfo: {
wx: funcItem.wx
},
winAdminInfo: true
})
return
}
}
// 没有权限
this.setData({
winPowerInfo: true
})
}).catch((response) => {})
} else { } else {
wx.openSetting({ wx.openSetting({
success: (response) => { success: (response) => {
...@@ -169,6 +182,7 @@ Page({ ...@@ -169,6 +182,7 @@ Page({
App.ui.showToast({ iconType: 'success', title: '二维码已保存至相册', }) App.ui.showToast({ iconType: 'success', title: '二维码已保存至相册', })
}, },
fail: (response) => { fail: (response) => {
console.log('response')
App.ui.showToast({ iconType: 'error', title: '二维码保存失败', }) App.ui.showToast({ iconType: 'error', title: '二维码保存失败', })
this.setData({ winAdminInfo: false, }) this.setData({ winAdminInfo: false, })
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<view class="club-info col cc ac"> <view class="club-info col cc ac">
<image class="club-info-logo" src="{{clubInfo.logo}}"></image> <image class="club-info-logo" src="{{clubInfo.logo}}"></image>
<view class="column cc ac"> <view class="column cc ac">
<text class="club_info_name title font_bold_34 color_regular">{{clubInfo.name}}</text> <text class="club_info_name title font_bold_34 color_regular overflow_point_1">{{clubInfo.name}}</text>
<text class="club_info_type owner-mark" wx:if="{{clubInfo.isOwner}}">业主专享</text> <text class="club_info_type owner-mark" wx:if="{{clubInfo.isOwner}}">业主专享</text>
<text class="club_info_member font_normal_22 color_secondary">{{clubInfo.member + ' 成员'}}</text> <text class="club_info_member font_normal_22 color_secondary">{{clubInfo.member + ' 成员'}}</text>
</view> </view>
......
...@@ -58,6 +58,7 @@ Page({ ...@@ -58,6 +58,7 @@ Page({
'orderId': this.data.exchangeInfo.id 'orderId': this.data.exchangeInfo.id
} }
}).then((response) => { }).then((response) => {
debugger
let funcData = response.data let funcData = response.data
// 设置订单状态 // 设置订单状态
let funcState = Number(funcData.status) let funcState = Number(funcData.status)
...@@ -97,8 +98,8 @@ Page({ ...@@ -97,8 +98,8 @@ Page({
// 券码信息 // 券码信息
let funcCouponInfo = { let funcCouponInfo = {
'shopName': funcData.useOffice.officeName, 'shopName': funcData.useOffice ? funcData.useOffice.officeName : '积分商城',
'shopTime': funcData.useOffice.businessTime, 'shopTime': funcData.useOffice ? funcData.useOffice.businessTime : '',
'userName': funcData.name, 'userName': funcData.name,
'userPhone': funcData.mobilePhone, 'userPhone': funcData.mobilePhone,
} }
...@@ -112,6 +113,7 @@ Page({ ...@@ -112,6 +113,7 @@ Page({
'price': funcData.smOrderDetails[i].unitPrice, 'price': funcData.smOrderDetails[i].unitPrice,
'quantity': funcData.smOrderDetails[i].number, 'quantity': funcData.smOrderDetails[i].number,
'state': Number(funcData.smOrderDetails[i].status), 'state': Number(funcData.smOrderDetails[i].status),
'couponCodeId': funcData.smOrderDetails[i].volumeId,
} }
funcGoodsInfo.push(funcItem) funcGoodsInfo.push(funcItem)
} }
...@@ -165,15 +167,27 @@ Page({ ...@@ -165,15 +167,27 @@ Page({
}).then((response) => { }).then((response) => {
let funcData = response.data let funcData = response.data
let funcList = [] let funcList = []
for (let i = 0, l = funcData.length; i < l; i++) {
let funcItem = { let funcGoodsInfo = this.data.goodsInfo
'name': funcData[i].name, for (let i = 0, l = funcGoodsInfo.length; i < l; i++) {
'codeBase64': funcData[i].qrcode, couponCode: for (let ii = 0, ll = funcData.length; ii < ll; ii++) {
'codeNumber': funcData[i].serialNumber, if (funcGoodsInfo[i].couponCodeId === funcData[ii].volumeId) {
'state': Number(funcData[i].status), let funcItem = {
'name': funcData[ii].name,
'codeBase64': funcData[ii].qrcode,
'codeNumber': funcData[ii].serialNumber,
'state': Number(funcData[ii].status),
'couponCodeId': funcData[ii].volumeId,
}
funcList.push(funcItem)
break couponCode
}
} }
funcList.push(funcItem)
} }
console.log(funcGoodsInfo)
console.log(funcList)
this.setData({ this.setData({
couponCodeList: funcList, couponCodeList: funcList,
}) })
...@@ -199,10 +213,18 @@ Page({ ...@@ -199,10 +213,18 @@ Page({
* @returns * @returns
*/ */
onCouponCodeScan: function (funcEvent) { onCouponCodeScan: function (funcEvent) {
let funcIndex = funcEvent.currentTarget.dataset.index
if (funcIndex) this.setData({ couponCodeSelectionIndex: funcIndex })
this.setData({ winCouponCode: true }) this.setData({ winCouponCode: true })
console.log(funcEvent) console.log(funcEvent)
let funcItem = funcEvent.currentTarget.dataset.item
if (!funcItem) return
let funcCouponCodeList = this.data.couponCodeList
for (let i = 0, l = funcCouponCodeList.length; i < l; i++ ) {
if (funcItem.couponCodeId === funcCouponCodeList[i].couponCodeId) {
this.setData({ couponCodeSelectionIndex: i })
break
}
}
}, },
/** /**
......
...@@ -137,9 +137,9 @@ ...@@ -137,9 +137,9 @@
</view> </view>
</view> </view>
<view class="row"> <view class="row">
<button class="goods_item_operation_code font_bold_22 color_submit row cc ac" wx:if="{{item.state === 1}}" data-index="{{index}}" catchtap="onCouponCodeScan">查看券码</button> <button class="goods_item_operation_code font_bold_22 color_submit row cc ac" wx:if="{{item.state === 1}}" data-item="{{item}}" catchtap="onCouponCodeScan">查看券码</button>
<button class="goods_item_operation_used font_bold_22 color_submit row cc ac" wx:if="{{item.state === 2}}" data-index="{{index}}" catchtap="onCouponCodeScan">已使用</button> <button class="goods_item_operation_used font_bold_22 color_submit row cc ac" wx:if="{{item.state === 2}}" data-item="{{item}}" catchtap="onCouponCodeScan">已使用</button>
<button class="goods_item_operation_used font_bold_22 color_submit row cc ac" wx:if="{{item.state === 4}}" data-index="{{index}}" catchtap="onCouponCodeScan">已过期</button> <button class="goods_item_operation_used font_bold_22 color_submit row cc ac" wx:if="{{item.state === 4}}" data-item="{{item}}" catchtap="onCouponCodeScan">已过期</button>
</view> </view>
</view> </view>
</block> </block>
......
...@@ -38,6 +38,7 @@ Page({ ...@@ -38,6 +38,7 @@ Page({
onShow: function () { onShow: function () {
let funcTempOptions = wx.getStorageSync('tempOptions') let funcTempOptions = wx.getStorageSync('tempOptions')
console.log('funcTempOptions', funcTempOptions)
if (funcTempOptions) { if (funcTempOptions) {
this.setData({ this.setData({
addressSelection: funcTempOptions addressSelection: funcTempOptions
...@@ -178,13 +179,6 @@ Page({ ...@@ -178,13 +179,6 @@ Page({
* @returns * @returns
*/ */
onAddressSelection: function () { onAddressSelection: function () {
// 地址列表为空,默认添加。
if (this.data.addressList.length < 1) {
wx.navigateTo({ url: '/pages/mine/address-operate/address-operate?fromPage=exchange' })
return
}
// 地址列表不为空,跳转选择地址。
wx.navigateTo({ url: '/pages/mine/address-list/address-list?fromPage=exchange' }) wx.navigateTo({ url: '/pages/mine/address-list/address-list?fromPage=exchange' })
}, },
...@@ -204,7 +198,7 @@ Page({ ...@@ -204,7 +198,7 @@ Page({
this.setData({ isExpress: !this.data.isExpress }) this.setData({ isExpress: !this.data.isExpress })
} else { } else {
App.ui.showToast({ iconType: 'error', title: '商品不支持快递', }) App.ui.showToast({ iconType: 'error', title: '商品不支持快递', })
}vv }
}, },
/** /**
...@@ -317,7 +311,7 @@ Page({ ...@@ -317,7 +311,7 @@ Page({
'name': this.data.goodsInfo.name, 'name': this.data.goodsInfo.name,
'number': 1, 'number': 1,
'unitPrice': this.data.goodsInfo.price, 'unitPrice': this.data.goodsInfo.price,
'totalPrices': 1 'totalPrices': this.data.goodsInfo.price
}) })
} }
......
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
<text class="address_info_detail_phone">{{addressSelection.phone}}</text> <text class="address_info_detail_phone">{{addressSelection.phone}}</text>
</view> </view>
<view class="row"> <view class="row">
<text class="address_info_detail_address">{{addressSelection.area + addressSelection.address}}</text> <text class="address_info_detail_address overflow_point_2">{{addressSelection.area + addressSelection.address}}</text>
</view> </view>
</view> </view>
</block> </block>
......
...@@ -102,7 +102,7 @@ ...@@ -102,7 +102,7 @@
} }
.address_info_detail_address { .address_info_detail_address {
height: 36rpx; min-height: 36rpx;
margin: 16rpx 0 0 0; margin: 16rpx 0 0 0;
font-size: 26rpx; font-size: 26rpx;
font-weight: 400; font-weight: 400;
......
...@@ -89,7 +89,7 @@ Page({ ...@@ -89,7 +89,7 @@ Page({
url: 'v3/integralGood/getGoodList', url: 'v3/integralGood/getGoodList',
params: { params: {
'pageNo': 1, 'pageNo': 1,
'pageSize': 5, 'pageSize': 10,
'tagId': '304', 'tagId': '304',
} }
}).then((response) => { }).then((response) => {
...@@ -117,7 +117,7 @@ Page({ ...@@ -117,7 +117,7 @@ Page({
url: 'v3/integralGood/getGoodList', url: 'v3/integralGood/getGoodList',
params: { params: {
'pageNo': 1, 'pageNo': 1,
'pageSize': 5, 'pageSize': 10,
'tagId': '305', 'tagId': '305',
} }
}).then((response) => { }).then((response) => {
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
</view> </view>
</view> </view>
<view class="commodity_info column cc ac"> <view class="commodity_info column ac">
<!-- 专场商品列表 --> <!-- 专场商品列表 -->
<view class="recommend" wx:if="{{recommendList['0'].length > 0}}"> <view class="recommend" wx:if="{{recommendList['0'].length > 0}}">
<view class="recommend_card"> <view class="recommend_card">
...@@ -68,7 +68,8 @@ ...@@ -68,7 +68,8 @@
</view> </view>
<!-- 常规商品列表 --> <!-- 常规商品列表 -->
<view class="routine {{recommendList['0'].length > 0 || recommendList['1'].length > 0 ? 'routine_near_recommend' : ''}}"> <view class="routine_nothing_fill" wx:if="{{recommendList['0'].length === 0 && recommendList['1'].length === 0}}"></view>
<view class="routine column ac {{recommendList['0'].length > 0 || recommendList['1'].length > 0 ? 'routine_near_recommend' : ''}}">
<m-tab <m-tab
item="{{tabItemCommodity}}" item="{{tabItemCommodity}}"
classTab="commodity_tab" classTab="commodity_tab"
...@@ -107,6 +108,9 @@ ...@@ -107,6 +108,9 @@
</view> </view>
</block> </block>
</view> </view>
<view class="routine_list_nothing row cc ac" wx:if="{{recommendList['0'].length === 0 && recommendList['1'].length === 0}}">
<text class="font_bold_38 color_secondary">暂无商品</text>
</view>
</view> </view>
</view> </view>
</view> </view>
\ No newline at end of file
...@@ -51,6 +51,7 @@ ...@@ -51,6 +51,7 @@
} }
.commodity_info { .commodity_info {
flex-grow: 1;
width: 750rpx; width: 750rpx;
padding: 0 0 140rpx 0; padding: 0 0 140rpx 0;
background: #F3F4F6; background: #F3F4F6;
...@@ -132,8 +133,14 @@ ...@@ -132,8 +133,14 @@
} }
/* 所有商品 */ /* 所有商品 */
.routine_nothing_fill {
width: 750rpx;
height: 60rpx;
}
.routine { .routine {
width: 750rpx; width: 750rpx;
flex-grow: 1;
} }
.routine_near_recommend { .routine_near_recommend {
...@@ -214,6 +221,11 @@ ...@@ -214,6 +221,11 @@
} }
/* 商品列表 */ /* 商品列表 */
.routine_list_nothing {
width: 750rpx;
flex-grow: 1;
}
.routine_list { .routine_list {
width: 750rpx; width: 750rpx;
margin: 56rpx 0 0 0; margin: 56rpx 0 0 0;
......
...@@ -3,12 +3,14 @@ Page({ ...@@ -3,12 +3,14 @@ Page({
data: { data: {
options: {}, options: {},
addressList:[], addressList:[],
newAddressInfo: {},
}, },
onLoad: function (options) { onLoad: function (options) {
this.setData({ this.setData({
options: options options: options
}) })
console.log(options)
}, },
onShow: function () { onShow: function () {
...@@ -29,29 +31,17 @@ Page({ ...@@ -29,29 +31,17 @@ Page({
} }
}, },
/**
* 地址编辑操作
* @param {event} event
*/
onAddressEdit: function (funcEvent) { onAddressEdit: function (funcEvent) {
let funcItem = funcEvent.currentTarget.dataset.item let funcItem = funcEvent.currentTarget.dataset.item
wx.navigateTo({ url: '../address-operate/address-operate?id=' + funcItem.id }) wx.navigateTo({ url: '/pages/mine/address-operate/address-operate?id=' + funcItem.id })
}, },
onAddressAdd: function () {
/** if (this.data.options.fromPage === 'exchange') {
* 地址添加操作 wx.navigateTo({ url: '/pages/mine/address-operate/address-operate?fromPage=' + this.data.options.fromPage })
* @function } else {
* @param {object} - funcEvent wx.navigateTo({ url: '/pages/mine/address-operate/address-operate' })
* @returns
*/
onAddressAdd: function (event) {
let param = {
type: "add",
} }
wx.navigateTo({
url: '../address-operate/address-operate?param='+JSON.stringify(param),
})
}, },
/** /**
...@@ -74,8 +64,20 @@ Page({ ...@@ -74,8 +64,20 @@ Page({
} }
funcList.push(funcItem) funcList.push(funcItem)
} }
console.log(funcList) console.log(funcList)
console.log(wx.getStorageSync('newAddressInfo'))
// 在积分商城下单时,通过比对新增地址的信息,来获取新增地址的 id。
if (wx.getStorageSync('tempOptions') === 'address') {
let funcNewAddressInfo = wx.getStorageSync('newAddressInfo')
for (let i = 0, l = funcList.length; i < l; i++) {
if (funcNewAddressInfo.name === funcList[i].name && funcNewAddressInfo.phone === funcList[i].phone && funcNewAddressInfo.address === funcList[i].address) {
funcNewAddressInfo.id = funcList[i].id
wx.setStorageSync('tempOptions', funcNewAddressInfo)
break
}
}
}
this.setData({ this.setData({
addressList: funcList addressList: funcList
}) })
......
...@@ -2,7 +2,7 @@ let App = getApp() ...@@ -2,7 +2,7 @@ let App = getApp()
Page({ Page({
data: { data: {
navTitle: '', navTitle: '',
options: {},
addressInfo: { addressInfo: {
'id': '', 'id': '',
'name': '', 'name': '',
...@@ -20,9 +20,10 @@ Page({ ...@@ -20,9 +20,10 @@ Page({
onLoad: function (options) { onLoad: function (options) {
this.setData({ this.setData({
navTitle: options.id ? '编辑收货地址' : '添加收货地址', navTitle: options.id ? '编辑收货地址' : '添加收货地址',
options: options,
addressInfo: Object.assign(this.data.addressInfo, { id: options.id }), addressInfo: Object.assign(this.data.addressInfo, { id: options.id }),
}) })
console.log(this.data.addressInfo) console.log(options)
this.queryAddressList() this.queryAddressList()
}, },
...@@ -165,6 +166,20 @@ Page({ ...@@ -165,6 +166,20 @@ Page({
iconType: 'success', iconType: 'success',
title: '提交成功', title: '提交成功',
ending: () => { ending: () => {
// 需要后台返回新增的地址 id 。
console.log(this.data.addressInfo)
if (this.data.options.fromPage === 'exchange') {
let funcAddressInfo = {
'id': '',
'name': this.data.addressInfo.name,
'phone': this.data.addressInfo.phone,
'area': this.data.addressInfo.area.join(''),
'address': this.data.addressInfo.address,
'isDefault': this.data.addressInfo.isDefault,
}
wx.setStorageSync('tempOptions', 'address')
wx.setStorageSync('newAddressInfo', funcAddressInfo)
}
wx.navigateBack() wx.navigateBack()
} }
}) })
......
...@@ -2,12 +2,11 @@ let App = getApp() ...@@ -2,12 +2,11 @@ let App = getApp()
Page({ Page({
data: { data: {
options: {},
isDoing: false, isDoing: false,
showNotice: false, showNotice: false,
swiperCurrent: 0, swiperCurrent: 0,
showCodePopup: false, showCodePopup: false,
imageBase: App.globalData.appImageBase,
resourcesBase: App.globalData.appResourcesBase,
shopInfo: {}, shopInfo: {},
orderType: 1, // 1 - 年卡/月卡,2 - 次票, 3 - SPA, 4 - 文创, 5 - 餐品, 6 - 活动, 7 - 观影 orderType: 1, // 1 - 年卡/月卡,2 - 次票, 3 - SPA, 4 - 文创, 5 - 餐品, 6 - 活动, 7 - 观影
...@@ -25,9 +24,6 @@ Page({ ...@@ -25,9 +24,6 @@ Page({
shopConfig: App.globalData.shopId, shopConfig: App.globalData.shopId,
shopAppId: "", shopAppId: "",
activityId: '', activityId: '',
}, },
...@@ -36,6 +32,7 @@ Page({ ...@@ -36,6 +32,7 @@ Page({
let funcOrderInfo = this.data.orderInfo let funcOrderInfo = this.data.orderInfo
funcOrderInfo.id = options.id funcOrderInfo.id = options.id
this.setData({ this.setData({
options: options,
activityId: options.activityId, activityId: options.activityId,
shopInfo: wx.getStorageSync('shopInfoBuffer'), shopInfo: wx.getStorageSync('shopInfoBuffer'),
orderInfo: funcOrderInfo, orderInfo: funcOrderInfo,
...@@ -146,43 +143,46 @@ Page({ ...@@ -146,43 +143,46 @@ Page({
this.setData({ this.setData({
isDoing: true, isDoing: true,
}) })
App.wxRequest({ App.request({
url: 'v1/activity/doCancel', url: 'v1/activity/doCancel',
data: { params: {
'enrollId': this.data.activityId, 'enrollId': this.data.activityId,
'type': type, 'type': type,
},
success: (response) => {
App.ui.hideToast()
this.setData({
isDoing: false,
})
App.ui.showToast({
'iconType': 'success',
'title': type == 1 ? '订单删除成功' : '订单取消成功'
})
setTimeout(function () {
if (type == 1) {
// 删除操作
wx.navigateBack({
delta: 1
})
wx.setStorageSync('option-appointment', 'refresh')
} else {
// 取消操作
let state = `orderInfo.state`
this.setData({
isDoing: false,
[state]: -1
})
}
}, 2000)
} }
}).then((response) => {
App.ui.hideToast()
this.setData({
isDoing: false,
})
App.ui.showToast({
'iconType': 'success',
'title': type == 1 ? '订单删除成功' : '订单取消成功'
})
setTimeout(function () {
if (type == 1) {
// 删除操作
wx.navigateBack({
delta: 1
})
wx.setStorageSync('option-appointment', 'refresh')
} else {
// 取消操作
let state = `orderInfo.state`
this.setData({
isDoing: false,
[state]: -1
})
}
}, 2000)
}).catch((response) => {
App.ui.showToast({
'iconType': 'error',
'title': response.message,
})
}) })
}, }
fail: () => {},
}) })
}, },
...@@ -236,94 +236,90 @@ Page({ ...@@ -236,94 +236,90 @@ Page({
* @returns * @returns
*/ */
queryOrderDetail: function () { queryOrderDetail: function () {
App.wxRequest({ App.request({
url: 'v1/order/getOrderDetail', url: 'v1/order/getOrderDetail',
data: { params: {
'orderId': this.data.orderInfo.id 'orderId': this.data.orderInfo.id
}, }
success: (response) => { }).then((response) => {
let funcResponse = response.data let funcData = response.data
let funcOrderInfo = { let funcOrderInfo = {
'id': this.data.orderInfo.id, 'id': this.data.orderInfo.id,
'score': funcResponse.integral, // 积分 'score': funcData.integral,
'state': Number(funcResponse.status), // 订单状态 'state': Number(funcData.status),
'amount': funcResponse.totalMoney, // 实付金额 'amount': funcData.totalMoney,
'contactName': funcResponse.name, // 联系人名称 'contactName': funcData.name,
'contactPhone': funcResponse.mobilePhone, // 联系人电话 'contactPhone': funcData.mobilePhone,
'commodityType': Number(funcResponse.goodType), // 商品类型 'commodityType': Number(funcData.goodType),
'commodity': [], 'commodity': [],
'tipOrderNo': funcResponse.orderSerialNumber, // 订单编号 'tipOrderNo': funcData.orderSerialNumber,
'tipTimeSubmit': funcResponse.createDate, 'tipTimeSubmit': funcData.createDate,
'tipTimePay': funcResponse.paymentTime ? App.modular.miment(funcResponse.paymentTime).format('YYYY-MM-DD hh:mm:ss') : '', 'tipTimePay': funcData.paymentTime ? App.modular.miment(funcData.paymentTime).format('YYYY-MM-DD hh:mm:ss') : '',
'tipIntegral': funcResponse.integral, 'tipIntegral': funcData.integral,
'officeName': funcResponse.officeName, 'officeName': funcData.officeName,
'wxRequest': funcResponse.wxRequest, 'wxRequest': funcData.wxRequest,
'businessTime': funcResponse.businessTime, //营业时间 'businessTime': this.options.date,
'expireTime': funcResponse.expireTime, //订单有效期 'expireTime': funcData.expireTime,
'particulars': funcResponse.particulars 'particulars': funcData.particulars,
} 'belongType': Number(this.data.options.belongType)
// 设置印章 }
let shopName = funcResponse.officeName; if (funcOrderInfo.state === 3 && funcOrderInfo.belongType === 2) funcOrderInfo.state = 7
let shopFilter = this.data.shopConfig.filter(
item => {
return item.name.toLowerCase() == shopName.toLowerCase() || shopName.toLowerCase().indexOf(item.name.toLowerCase()) != -1
}
)
funcOrderInfo.shopInfo = shopFilter[0]
// 添加订单商品列表
let funcCommodity = funcResponse.smOrderDetails
for (let i = 0, l = funcCommodity.length; i < l; i++) {
let funcCommodityItem = {
'cover': funcCommodity[i].imgUrl,
'name': funcCommodity[i].name, // 名称
'quantity': funcCommodity[i].number, // 数量
'amount': funcCommodity[i].unitPrice, // 总价
'state': Number(funcCommodity[i].status), // 状态
'codeId': funcCommodity[i].volumeId, // 券码
}
funcOrderInfo.commodity.push(funcCommodityItem)
}
// 倒计时
if (funcOrderInfo.state == 0) {
// 待付款状态
let doTime = 15 * 60 * 1000
let timeInter = setInterval(() => {
let creatdTime = new Date(funcOrderInfo.tipTimeSubmit.replace(/-/g, '/')).getTime()
let endTime = creatdTime + doTime
let now = new Date().getTime()
let residueStamp = endTime - now
let residuePayTime = App.modular.miment(residueStamp).format('mm:ss')
if (residueStamp > 0) {
this.setData({
residuePayTime: residuePayTime
})
} else {
console.log(residueStamp, 'residueStamp----------------');
clearInterval(timeInter)
// that.queryOrderDetail()
let state = `orderInfo.state`
this.setData({
[state]: -1
})
}
}, 1000) // 设置印章
let shopName = funcData.officeName
let shopFilter = this.data.shopConfig.filter(
item => {
return item.name.toLowerCase() == shopName.toLowerCase() || shopName.toLowerCase().indexOf(item.name.toLowerCase()) != -1
}
)
funcOrderInfo.shopInfo = shopFilter[0]
console.log('funcOrderInfo.shopInfo', funcOrderInfo.shopInfo)
// 添加订单商品列表
let funcCommodity = funcData.smOrderDetails
for (let i = 0, l = funcCommodity.length; i < l; i++) {
let funcCommodityItem = {
'cover': funcCommodity[i].imgUrl,
'name': funcCommodity[i].name, // 名称
'quantity': funcCommodity[i].number, // 数量
'amount': funcCommodity[i].unitPrice, // 总价
'state': Number(funcCommodity[i].status), // 状态
'codeId': funcCommodity[i].volumeId, // 券码
} }
funcOrderInfo.commodity.push(funcCommodityItem)
}
// 倒计时
if (funcOrderInfo.state == 0) {
// 待付款状态
let doTime = 15 * 60 * 1000
let timeInter = setInterval(() => {
let creatdTime = new Date(funcOrderInfo.tipTimeSubmit.replace(/-/g, '/')).getTime()
let endTime = creatdTime + doTime
let now = new Date().getTime()
let residueStamp = endTime - now
let residuePayTime = App.modular.miment(residueStamp).format('mm:ss')
if (residueStamp > 0) {
this.setData({
residuePayTime: residuePayTime
})
} else {
clearInterval(timeInter)
let state = `orderInfo.state`
this.setData({
[state]: -1
})
}
}, 1000)
}
this.setData({ this.setData({
orderInfo: funcOrderInfo orderInfo: funcOrderInfo
}) })
// 判断是否自动展示二维码 console.log(this.data.orderInfo)
// 订单列表 去使用 按钮 }).catch(() => {
if (this.data.isFromUse) {
}
}
}) })
}, },
......
...@@ -41,6 +41,11 @@ ...@@ -41,6 +41,11 @@
<text>订单已评价</text> <text>订单已评价</text>
</view> </view>
</view> </view>
<view class="state-content state-content-invalid col con-c" wx:if="{{orderInfo.state === 7}}">
<view class="state-content-title row">
<text>订单已完成</text>
</view>
</view>
</view> </view>
<!-- 订单信息 --> <!-- 订单信息 -->
......
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
} }
.info-content-item-label { .info-content-item-label {
width: 104rpx; width: 108rpx;
height: 36rpx; height: 36rpx;
margin-right: 48rpx; margin-right: 48rpx;
font-size: 26rpx; font-size: 26rpx;
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
} }
.info-content-item-describe { .info-content-item-describe {
height: 42rpx; min-height: 42rpx;
font-size: 30rpx; font-size: 30rpx;
font-weight: 500; font-weight: 500;
line-height: 42rpx; line-height: 42rpx;
......
...@@ -92,10 +92,10 @@ Page({ ...@@ -92,10 +92,10 @@ Page({
// 跳转详情页面 // 跳转详情页面
onOrderDetail: function (event) { onOrderDetail: function (event) {
console.log('onOrderDetail')
let funcItem = event.currentTarget.dataset.item let funcItem = event.currentTarget.dataset.item
console.log('onOrderDetail', funcItem)
wx.navigateTo({ wx.navigateTo({
url: '/pages/mine/appointment-detail/appointment-detail?id=' + funcItem.orderId + '&activityId=' + funcItem.enrollId, url: '/pages/mine/appointment-detail/appointment-detail?id=' + funcItem.orderId + '&activityId=' + funcItem.enrollId + '&date=' + funcItem.date + '&belongType=' + funcItem.belongType,
}) })
}, },
// 点击导航切换,默认是全部的 // 点击导航切换,默认是全部的
...@@ -104,7 +104,6 @@ Page({ ...@@ -104,7 +104,6 @@ Page({
if (index === 0) { if (index === 0) {
this.setData({ this.setData({
pageNo: 1, pageNo: 1,
activityList: [],
}) })
this.getActivity() this.getActivity()
} else { } else {
...@@ -173,8 +172,6 @@ Page({ ...@@ -173,8 +172,6 @@ Page({
// 删除,取消预约 // 删除,取消预约
doCancel: function (event) { doCancel: function (event) {
console.log('doCancel')
let type = event.currentTarget.dataset.type let type = event.currentTarget.dataset.type
App.ui.showDialog({ App.ui.showDialog({
...@@ -214,7 +211,6 @@ Page({ ...@@ -214,7 +211,6 @@ Page({
setTimeout(() => { setTimeout(() => {
this.setData({ this.setData({
'isDoing': false, 'isDoing': false,
'activityList': [],
'pageNo': 1, 'pageNo': 1,
}) })
this.getActivity() this.getActivity()
...@@ -230,51 +226,52 @@ Page({ ...@@ -230,51 +226,52 @@ Page({
// 我的活动 // 我的活动
getActivity: function () { getActivity: function () {
wx.setStorageSync('option-appointment', '') wx.setStorageSync('option-appointment', '')
App.ui.showToast({ App.ui.showToast({
'iconType': 'loading', 'iconType': 'loading',
'title': '加载中', 'title': '加载中',
'duration': 60000, 'duration': 30000,
}) })
this.setData({ App.request({
isLoading: true
})
App.wxRequest({
url: 'v1/activity/getMyActivityList', url: 'v1/activity/getMyActivityList',
data: { params: {
'type': '', 'type': '',
'activeState': '', 'activeState': '',
'pageSize': this.data.pageSize, 'pageSize': this.data.pageSize,
'pageNo': this.data.pageNo, 'pageNo': this.data.pageNo,
},
success: (res) => {
this.setData({
isLoading: false
})
App.ui.hideToast()
let funcData = res.data.list
let tmpArr = []
funcData.forEach(item => {
let obj = {
'orderId': item.orderId,
'enrollId': item.enrollId,
'name': item.name,
'status': item.status, // 订单状态(-1已取消, 0未付款, 2待使用, 3已使用, 4已过期 6已关闭)
'activeState': item.activeState, // 活动状态(0 未开始 1进行中 2 已结束)
'cover': item.cover,
'date': item.activeTime,
'address': item.address,
'num': item.number,
'amount': item.totalMoney ? item.totalMoney.toFixed(2) : 0,
'wxRequest': item.wxRequest
}
tmpArr.push(obj)
})
this.setData({
activityList: this.data.activityList.concat(tmpArr),
isLoading: false
})
} }
}).then((response) => {
App.ui.hideToast()
let funcData = response.data.list
let funcList = []
for (let i = 0, l = funcData.length; i < l; i++) {
let funcItem = {
'orderId': funcData[i].orderId,
'enrollId': funcData[i].enrollId,
'name': funcData[i].name,
'status': Number(funcData[i].status), // 订单状态(-1已取消, 0未付款, 2待使用, 3已使用, 4已过期 6已关闭)
'activeState': Number(funcData[i].activeState), // 活动状态(0 未开始 1进行中 2 已结束)
'cover': funcData[i].cover,
'date': funcData[i].activeTime,
'address': funcData[i].address,
'num': funcData[i].number,
'amount': funcData[i].totalMoney ? funcData[i].totalMoney.toFixed(2) : 0,
'wxRequest': funcData[i].wxRequest,
'belongType': Number(funcData[i].type)
}
if (funcItem.status === 3 && funcItem.belongType === 2) funcItem.status = 6
funcList.push(funcItem)
}
if (this.data.pageNo !== 1) funcList = this.data.activityList.concat(funcList)
this.setData({
activityList: funcList,
isLoading: false
})
console.log(this.data.activityList)
}).catch(() => {
}) })
}, },
// 预约列表/我的预约 // 预约列表/我的预约
......
...@@ -12,200 +12,200 @@ ...@@ -12,200 +12,200 @@
<view class="myActivity-container"> <view class="myActivity-container">
<!-- 主题活动 --> <!-- 主题活动 -->
<view class="myAppointment-body" wx:if="{{activityList.length > 0 && active === 0}}"> <view class="myAppointment-body" wx:if="{{activityList.length > 0 && active === 0}}">
<block wx:for="{{activityList}}" wx:for-item="activity" wx:for-index="indexActivity" wx:key="index"> <block wx:for="{{activityList}}" wx:for-item="item" wx:for-index="index" wx:key="index">
<!-- 待付款 --> <!-- 待付款 -->
<view class="appointment-wrapper" wx:if="{{activity.status === '0'}}" bindtap="onOrderDetail" data-item="{{activity}}"> <view class="appointment-wrapper" wx:if="{{item.status === 0}}" data-item="{{item}}" bindtap="onOrderDetail">
<view class="appointment-time">{{activity.date}}</view> <view class="appointment-time">{{item.date}}</view>
<view class="appintment-activity-status-pay"> <view class="appintment-activity-status-pay">
<text>待付款</text> <text>待付款</text>
</view> </view>
<view class="appointment-activity-content row align-c"> <view class="appointment-activity-content row align-c">
<view class="appointment-activity-img"> <view class="appointment-activity-img">
<image src="{{activity.cover}}"></image> <image src="{{item.cover}}"></image>
</view> </view>
<view class="appointment-activity-info col con-a"> <view class="appointment-activity-info col con-a">
<view class="appointment-activity-title"> <view class="appointment-activity-title">
<text>{{activity.name}}</text> <text>{{item.name}}</text>
</view> </view>
<view class="appointment-activity-address"> <view class="appointment-activity-address">
<text>{{activity.address}}</text> <text>{{item.address}}</text>
</view> </view>
</view> </view>
<view class="appointment-activity-num"> <view class="appointment-activity-num">
<text>{{'共' + activity.num + '人'}}</text> <text>{{'共' + item.num + '人'}}</text>
</view> </view>
</view> </view>
<view class="appointment-activity-footer row con-b align-c"> <view class="appointment-activity-footer row con-b align-c">
<view class="appointment-activity-price"> <view class="appointment-activity-price">
<text>¥</text> <text>¥</text>
<text>{{activity.amount}}</text> <text>{{item.amount}}</text>
</view> </view>
<view class="appointment-activity-btn row"> <view class="appointment-activity-btn row">
<view catchtap="doCancel" data-item="{{activity}}" data-type='0' class="cancel-btn">取消报名</view> <view catchtap="doCancel" data-item="{{item}}" data-type='0' class="cancel-btn">取消报名</view>
<view catchtap="onOrderPay" data-item="{{activity}}" class="confirm-btn">去支付</view> <view catchtap="onOrderPay" data-item="{{item}}" class="confirm-btn">去支付</view>
</view> </view>
</view> </view>
</view> </view>
<!-- 未开始 --> <!-- 未开始 -->
<view class="appointment-wrapper" wx:if="{{activity.status === '2' && activity.activeState === '0'}}" bindtap="onOrderDetail" data-item="{{activity}}"> <view class="appointment-wrapper" wx:if="{{item.status === 2 && item.activeState === 0}}" data-item="{{item}}" bindtap="onOrderDetail">
<view class="appointment-time">{{activity.date}}</view> <view class="appointment-time">{{item.date}}</view>
<view class="appintment-activity-status"> <view class="appintment-activity-status">
<text>未开始</text> <text>未开始</text>
</view> </view>
<view class="appointment-activity-content row align-c"> <view class="appointment-activity-content row align-c">
<view class="appointment-activity-img"> <view class="appointment-activity-img">
<image src="{{activity.cover}}"></image> <image src="{{item.cover}}"></image>
</view> </view>
<view class="appointment-activity-info col con-a"> <view class="appointment-activity-info col con-a">
<view class="appointment-activity-title"> <view class="appointment-activity-title">
<text>{{activity.name}}</text> <text>{{item.name}}</text>
</view> </view>
<view class="appointment-activity-address"> <view class="appointment-activity-address">
<text>{{activity.address}}</text> <text>{{item.address}}</text>
</view> </view>
</view> </view>
<view class="appointment-activity-num"> <view class="appointment-activity-num">
<text>{{'共' + activity.num + '人'}}</text> <text>{{'共' + item.num + '人'}}</text>
</view> </view>
</view> </view>
<view class="appointment-activity-footer row con-b align-c"> <view class="appointment-activity-footer row con-b align-c">
<view class="appointment-activity-price"> <view class="appointment-activity-price">
<text>¥</text> <text>¥</text>
<text>{{activity.amount}}</text> <text>{{item.amount}}</text>
</view> </view>
<view class="appointment-activity-btn row"> <view class="appointment-activity-btn row">
<view data-item="{{activity}}" catchtap="onOrderUse" class="confirm-btn">去使用</view> <view data-item="{{item}}" catchtap="onOrderUse" class="confirm-btn">去使用</view>
</view> </view>
</view> </view>
</view> </view>
<!-- 进行中 --> <!-- 进行中 -->
<view class="appointment-wrapper" wx:if="{{activity.status === '2' && activity.activeState === '1'}}" bindtap="onOrderDetail" data-item="{{activity}}"> <view class="appointment-wrapper" wx:if="{{item.status === 2 && item.activeState === 1}}" data-item="{{item}}" bindtap="onOrderDetail">
<view class="appointment-time">{{activity.date}}</view> <view class="appointment-time">{{item.date}}</view>
<view class="appintment-activity-status"> <view class="appintment-activity-status">
<text>进行中</text> <text>进行中</text>
</view> </view>
<view class="appointment-activity-content row align-c"> <view class="appointment-activity-content row align-c">
<view class="appointment-activity-img"> <view class="appointment-activity-img">
<image src="{{activity.cover}}"></image> <image src="{{item.cover}}"></image>
</view> </view>
<view class="appointment-activity-info col con-a"> <view class="appointment-activity-info col con-a">
<view class="appointment-activity-title"> <view class="appointment-activity-title">
<text>{{activity.name}}</text> <text>{{item.name}}</text>
</view> </view>
<view class="appointment-activity-address"> <view class="appointment-activity-address">
<text>{{activity.address}}</text> <text>{{item.address}}</text>
</view> </view>
</view> </view>
<view class="appointment-activity-num"> <view class="appointment-activity-num">
<text>{{'共' + activity.num + '人'}}</text> <text>{{'共' + item.num + '人'}}</text>
</view> </view>
</view> </view>
<view class="appointment-activity-footer row con-b align-c"> <view class="appointment-activity-footer row con-b align-c">
<view class="appointment-activity-price"> <view class="appointment-activity-price">
<text>¥</text> <text>¥</text>
<text>{{activity.amount}}</text> <text>{{item.amount}}</text>
</view> </view>
<view class="appointment-activity-btn row"> <view class="appointment-activity-btn row">
<view data-item="{{activity}}" catchtap="onOrderUse" class="confirm-btn">去使用</view> <view data-item="{{item}}" catchtap="onOrderUse" class="confirm-btn">去使用</view>
</view> </view>
</view> </view>
</view> </view>
<!-- 待评价 --> <!-- 待评价 -->
<view class="appointment-wrapper" wx:if="{{activity.status === '3' && activity.activeState !== '0'}}" bindtap="onOrderDetail" data-item="{{activity}}"> <view class="appointment-wrapper" wx:if="{{item.status === 3 && item.activeState !== 0}}" data-item="{{item}}" bindtap="onOrderDetail">
<view class="appointment-time">{{activity.date}}</view> <view class="appointment-time">{{item.date}}</view>
<view class="appintment-activity-status"> <view class="appintment-activity-status">
<text>待评价</text> <text>待评价</text>
</view> </view>
<view class="appointment-activity-content row align-c"> <view class="appointment-activity-content row align-c">
<view class="appointment-activity-img"> <view class="appointment-activity-img">
<image src="{{activity.cover}}"></image> <image src="{{item.cover}}"></image>
</view> </view>
<view class="appointment-activity-info col con-a"> <view class="appointment-activity-info col con-a">
<view class="appointment-activity-title"> <view class="appointment-activity-title">
<text>{{activity.name}}</text> <text>{{item.name}}</text>
</view> </view>
<view class="appointment-activity-address"> <view class="appointment-activity-address">
<text>{{activity.address}}</text> <text>{{item.address}}</text>
</view> </view>
</view> </view>
<view class="appointment-activity-num"> <view class="appointment-activity-num">
<text>{{'共' + activity.num + '人'}}</text> <text>{{'共' + item.num + '人'}}</text>
</view> </view>
</view> </view>
<view class="appointment-activity-footer row con-b align-c"> <view class="appointment-activity-footer row con-b align-c">
<view class="appointment-activity-price"> <view class="appointment-activity-price">
<text>¥</text> <text>¥</text>
<text>{{activity.amount}}</text> <text>{{item.amount}}</text>
</view> </view>
<view class="appointment-activity-btn row"> <view class="appointment-activity-btn row">
<view class="confirm-btn" data-item="{{activity}}" catchtap="onOrderEvaluate">去评价</view> <view class="confirm-btn" data-item="{{item}}" catchtap="onOrderEvaluate">去评价</view>
</view> </view>
</view> </view>
</view> </view>
<!-- 已过期 --> <!-- 已过期 -->
<view class="appointment-wrapper" wx:if="{{activity.status === '4'||activity.status === '6'}}" bindtap="onOrderDetail" data-item="{{activity}}"> <view class="appointment-wrapper" wx:if="{{item.status === 4 || item.status === 6}}" data-item="{{item}}" bindtap="onOrderDetail">
<view wx:if="{{activity.status === '4'}}" class="mask-cancel"></view> <view wx:if="{{item.status === 4}}" class="mask-cancel"></view>
<view class="appointment-time mask-cancel-time">{{activity.date}}</view> <view class="appointment-time mask-cancel-time">{{item.date}}</view>
<view class="appintment-activity-status-cancel"> <view class="appintment-activity-status-cancel">
<text wx:if="{{activity.status === '4'}}">已过期</text> <text wx:if="{{item.status === 4}}">已过期</text>
<text wx:if="{{activity.status === '6'}}">已评价</text> <text wx:if="{{item.status === 6}}">{{item.belongType === 2 ? '已使用' : '已评价'}}</text>
</view> </view>
<view class="appointment-activity-content row align-c"> <view class="appointment-activity-content row align-c">
<view class="appointment-activity-img"> <view class="appointment-activity-img">
<image src="{{activity.cover}}"></image> <image src="{{item.cover}}"></image>
</view> </view>
<view class="appointment-activity-info col con-a"> <view class="appointment-activity-info col con-a">
<view class="appointment-activity-title"> <view class="appointment-activity-title">
<text>{{activity.name}}</text> <text>{{item.name}}</text>
</view> </view>
<view class="appointment-activity-address"> <view class="appointment-activity-address">
<text>{{activity.address}}</text> <text>{{item.address}}</text>
</view> </view>
</view> </view>
<view class="appointment-activity-num"> <view class="appointment-activity-num">
<text>{{'共' + activity.num + '人'}}</text> <text>{{'共' + item.num + '人'}}</text>
</view> </view>
</view> </view>
<view class="appointment-activity-footer row con-b align-c"> <view class="appointment-activity-footer row con-b align-c">
<view class="appointment-activity-price"> <view class="appointment-activity-price">
<text>¥</text> <text>¥</text>
<text>{{activity.amount}}</text> <text>{{item.amount}}</text>
</view> </view>
<view class="appointment-activity-btn row"> <view class="appointment-activity-btn row">
<view data-item="{{activity}}" data-type='1' catchtap="doCancel" class="cancel-btn">删除报名</view> <view data-item="{{item}}" data-type='1' class="cancel-btn" catchtap="doCancel">删除报名</view>
</view> </view>
</view> </view>
</view> </view>
<!-- 已取消 --> <!-- 已取消 -->
<view class="appointment-wrapper" wx:if="{{activity.status === '-1'}}"> <view class="appointment-wrapper" wx:if="{{item.status === -1}}">
<view class="mask-cancel" bindtap="onOrderDetail" data-item="{{activity}}"></view> <view class="mask-cancel" data-item="{{item}}" bindtap="onOrderDetail"></view>
<view class="appointment-time mask-cancel-time">{{activity.date}}</view> <view class="appointment-time mask-cancel-time">{{item.date}}</view>
<view class="appintment-activity-status-cancel"> <view class="appintment-activity-status-cancel">
<text>已取消</text> <text>已取消</text>
</view> </view>
<view class="appointment-activity-content row align-c"> <view class="appointment-activity-content row align-c">
<view class="appointment-activity-img"> <view class="appointment-activity-img">
<image src="{{activity.cover}}"></image> <image src="{{item.cover}}"></image>
</view> </view>
<view class="appointment-activity-info col con-a"> <view class="appointment-activity-info col con-a">
<view class="appointment-activity-title"> <view class="appointment-activity-title">
<text>{{activity.name}}</text> <text>{{item.name}}</text>
</view> </view>
<view class="appointment-activity-address"> <view class="appointment-activity-address">
<text>{{activity.address}}</text> <text>{{item.address}}</text>
</view> </view>
</view> </view>
<view class="appointment-activity-num"> <view class="appointment-activity-num">
<text>{{'共' + activity.num + '人'}}</text> <text>{{'共' + item.num + '人'}}</text>
</view> </view>
</view> </view>
<view class="appointment-activity-footer row con-b align-c"> <view class="appointment-activity-footer row con-b align-c">
<view class="appointment-activity-price"> <view class="appointment-activity-price">
<text>¥</text> <text>¥</text>
<text>{{activity.amount}}</text> <text>{{item.amount}}</text>
</view> </view>
<view class="appointment-activity-btn row"> <view class="appointment-activity-btn row">
<view data-item="{{activity}}" catchtap="doCancel" data-type="1" class="cancel-btn cancel">删除报名</view> <view class="cancel-btn cancel" data-item="{{item}}" catchtap="doCancel" data-type="1">删除报名</view>
<view data-index="0" catchtap="goAppoint" class="confirm-btn confirm-once">再次报名</view> <view data-index="0" catchtap="goAppoint" class="confirm-btn confirm-once">再次报名</view>
</view> </view>
</view> </view>
......
...@@ -26,7 +26,7 @@ Page({ ...@@ -26,7 +26,7 @@ Page({
'userType': 0, 'userType': 0,
}, },
winMember: true, winMember: false,
}, },
onLoad: function (options) { onLoad: function (options) {
...@@ -62,7 +62,7 @@ Page({ ...@@ -62,7 +62,7 @@ Page({
'idExamine': funcData[i].joinClubAuditId, // 审核 id 'idExamine': funcData[i].joinClubAuditId, // 审核 id
'name': funcData[i].name, // 名称 'name': funcData[i].name, // 名称
'nickname': funcData[i].nickname, // 昵称 'nickname': funcData[i].nickname, // 昵称
'avatar': funcData[i].img, // 头像 'avatar': funcData[i].img ? funcData[i].img : this.data.resourcesBase + 'other/default-1.png', // 头像
'userType': Number(funcData[i].userType), // 用户身份 'userType': Number(funcData[i].userType), // 用户身份
'remarks': funcData[i].remarks, 'remarks': funcData[i].remarks,
'phone': funcData[i].mobile, 'phone': funcData[i].mobile,
...@@ -161,8 +161,6 @@ Page({ ...@@ -161,8 +161,6 @@ Page({
}) })
return return
} }
console.log('response.input', funcRemarkContent)
App.request({ App.request({
url: 'v3/club/doAuditJoin', url: 'v3/club/doAuditJoin',
params: { params: {
...@@ -180,6 +178,7 @@ Page({ ...@@ -180,6 +178,7 @@ Page({
}) })
this.queryExamine() this.queryExamine()
this.queryStatistics() this.queryStatistics()
wx.setStorageSync('tempOptions', 'clubRefresh')
}).catch((response) => { }).catch((response) => {
App.ui.showToast({ App.ui.showToast({
iconType: 'error', iconType: 'error',
...@@ -219,6 +218,7 @@ Page({ ...@@ -219,6 +218,7 @@ Page({
}) })
this.queryExamine() this.queryExamine()
this.queryStatistics() this.queryStatistics()
wx.setStorageSync('tempOptions', 'clubRefresh')
}).catch((response) => { }).catch((response) => {
App.ui.showToast({ App.ui.showToast({
iconType: 'error', iconType: 'error',
...@@ -249,7 +249,7 @@ Page({ ...@@ -249,7 +249,7 @@ Page({
memberInfo: { memberInfo: {
'name': funcData.name, 'name': funcData.name,
'nickname': funcData.nickname, 'nickname': funcData.nickname,
'avatar': funcData.img, 'avatar': funcData.img ? funcData.img : this.data.resourcesBase + 'other/default-1.png',
'remarks': funcData.remarks, // 备注 'remarks': funcData.remarks, // 备注
'phone': funcData.mobile, 'phone': funcData.mobile,
'date': App.modular.miment(funcData.joinDate).format('YYYY年MM月DD日'), // 加入日期 'date': App.modular.miment(funcData.joinDate).format('YYYY年MM月DD日'), // 加入日期
......
...@@ -23,6 +23,19 @@ Page({ ...@@ -23,6 +23,19 @@ Page({
this.queryClubEnter() this.queryClubEnter()
}, },
onShow: function () {
this.queryClubAuditTotal()
if (wx.getStorageSync('tempOptions') === 'clubRefresh') {
if (this.data.segmentIndex === 0) {
this.queryClubEnter()
wx.removeStorageSync('tempOptions')
} else {
this.queryClubEstablish()
wx.removeStorageSync('tempOptions')
}
}
},
/** /**
* 查询我加入的 * 查询我加入的
* @function * @function
...@@ -91,16 +104,6 @@ Page({ ...@@ -91,16 +104,6 @@ Page({
'isOwner': Number(funcData[i].owner) === 0 ? false : true 'isOwner': Number(funcData[i].owner) === 0 ? false : true
} }
funcList.push(funcItem) funcList.push(funcItem)
// 统计审核数量
funcExamine = funcExamine + funcItem.examine
wx.setStorageSync('clubExamine', funcExamine)
let funcSegmentItem = this.data.segmentItem
funcSegmentItem[1].quantity = funcExamine
this.setData({
segmentItem: funcSegmentItem
})
} }
this.setData({ this.setData({
clubList: this.data.clubList.concat(funcList) clubList: this.data.clubList.concat(funcList)
...@@ -109,6 +112,28 @@ Page({ ...@@ -109,6 +112,28 @@ Page({
}, },
/** /**
* 查询我管理的俱乐部审核总数
* @function
* @param
* @returns
*/
queryClubAuditTotal: function () {
App.request({
url: 'v3/club/countWaitAudit',
params: {
'state': 0
}
}).then((response) => {
let funcSegmentItem = this.data.segmentItem
funcSegmentItem[1].quantity = response.data.count
this.setData({
segmentItem: funcSegmentItem
})
wx.setStorageSync('clubExamine', response.data.count)
}).catch((response) => {})
},
/**
* 取消俱乐部加入申请 * 取消俱乐部加入申请
* @function * @function
* @param {object} - funcEvent * @param {object} - funcEvent
......
...@@ -79,12 +79,10 @@ ...@@ -79,12 +79,10 @@
<text>{{item.date + ' 创建'}}</text> <text>{{item.date + ' 创建'}}</text>
</view> </view>
<view class="club_operation row cb ae"> <view class="club_operation row cb ae">
<block wx:if="{{item.examine > 0}}"> <view class="club_operation_examine row cc ac" wx:if="{{item.examine > 0}}">
<view class="club_operation_examine row cc ac"> <text>{{item.examine}}</text>
<text>{{item.examine}}</text> </view>
</view> <button class="row cc ac"data-item="{{item}}" catchtap="onEnterClubAuditList">入会审核</button>
<button class="row cc ac"data-item="{{item}}" catchtap="onEnterClubAuditList">入会审核</button>
</block>
</view> </view>
</view> </view>
</view> </view>
......
...@@ -345,6 +345,7 @@ Page({ ...@@ -345,6 +345,7 @@ Page({
funcPriceUnit = funcShoppingCart[i].priceFinal funcPriceUnit = funcShoppingCart[i].priceFinal
if (funcShoppingCart[i].isActive) funcPayAmount = funcPayAmount + funcShoppingCart[i].priceUnit * funcShoppingCart[i].quantity if (funcShoppingCart[i].isActive) funcPayAmount = funcPayAmount + funcShoppingCart[i].priceUnit * funcShoppingCart[i].quantity
console.log(funcPayAmount)
} }
this.setData({ this.setData({
...@@ -397,102 +398,101 @@ Page({ ...@@ -397,102 +398,101 @@ Page({
*/ */
setEntryTime: function (funcEntryId) { setEntryTime: function (funcEntryId) {
let funcItem = wx.getStorageSync('shoppingCartBuffer')[0] let funcItem = wx.getStorageSync('shoppingCartBuffer')[0]
App.wxRequest({ App.request({
url: 'v1/activity/getEnrollView', url: 'v1/activity/getEnrollView',
data: { params: {
'id': funcItem.id, 'id': funcItem.id,
}, }
success: (response) => { }).then((response) => {
let funcResponse = response.data let funcResponse = response.data
let funcTimetable = funcResponse.activityTimes let funcTimetable = funcResponse.activityTimes
let funcDate = [] let funcDate = []
let funcDateList = [] let funcDateList = []
let funcTimeList = [] let funcTimeList = []
let funcListIndex = -1 let funcListIndex = -1
let funcActiveTime = '' let funcActiveTime = ''
// 生成日期数组 ['YYYY-MM-DD', YYYY-MM-DD', YYYY-MM-DD', ] // 生成日期数组 ['YYYY-MM-DD', YYYY-MM-DD', YYYY-MM-DD', ]
// 生成对应日期场次数组 [['hh:mm:ss'], ['hh:mm:ss', 'hh:mm:ss'], ['hh:mm:ss', 'hh:mm:ss', 'hh:mm:ss']] // 生成对应日期场次数组 [['hh:mm:ss'], ['hh:mm:ss', 'hh:mm:ss'], ['hh:mm:ss', 'hh:mm:ss', 'hh:mm:ss']]
for (let i = 0, l = funcTimetable.length; i < l; i++) { for (let i = 0, l = funcTimetable.length; i < l; i++) {
let funcDateString = App.modular.miment(funcTimetable[i].beginTime).format('YYYY-MM-DD') let funcDateString = App.modular.miment(funcTimetable[i].beginTime).format('YYYY-MM-DD')
let funcTimeString = App.modular.miment(funcTimetable[i].beginTime).format('hh:mm') let funcTimeString = App.modular.miment(funcTimetable[i].beginTime).format('hh:mm')
if (funcActiveTime === funcDateString) { if (funcActiveTime === funcDateString) {
// 渲染数组 // 渲染数组
funcTimeList[funcListIndex].push(funcTimeString) funcTimeList[funcListIndex].push(funcTimeString)
// 映射数据 // 映射数据
funcDate[funcListIndex].push(funcTimetable[i]) funcDate[funcListIndex].push(funcTimetable[i])
} else { } else {
// 渲染数据 // 渲染数据
funcActiveTime = funcDateString funcActiveTime = funcDateString
funcListIndex = funcListIndex + 1 funcListIndex = funcListIndex + 1
funcDateList.push(funcDateString) funcDateList.push(funcDateString)
funcTimeList[funcListIndex] = [funcTimeString] funcTimeList[funcListIndex] = [funcTimeString]
// 映射数据 // 映射数据
funcDate[funcListIndex] = [funcTimetable[i]] funcDate[funcListIndex] = [funcTimetable[i]]
}
} }
}
// 活动没有场次的异常处理,添加空字段,使页面可以正常显示,但无法通过报名校验 // 活动没有场次的异常处理,添加空字段,使页面可以正常显示,但无法通过报名校验
if (funcDateList.length === 0) { if (funcDateList.length === 0) {
funcDateList = [''] funcDateList = ['']
funcTimeList = [['']] funcTimeList = [['']]
funcDate = [[{ funcDate = [[{
beginTime: '', beginTime: '',
endTime: '', endTime: '',
enroll: '0', enroll: '0',
id: '', id: '',
residue: 0, residue: 0,
}]] }]]
} }
this.setData({ this.setData({
entryId: funcEntryId ? funcEntryId : funcDate[0][0].id, entryId: funcEntryId ? funcEntryId : funcDate[0][0].id,
entryDate: funcDate, entryDate: funcDate,
entrySelection: funcDateList[0] + ' ' + funcTimeList[0][0], entrySelection: funcDateList[0] + ' ' + funcTimeList[0][0],
entryDateList: [funcDateList, funcTimeList[0]], entryDateList: [funcDateList, funcTimeList[0]],
entryTimeList: funcTimeList, entryTimeList: funcTimeList,
quantityTipNumber: funcDate[0][0].residue, quantityTipNumber: funcDate[0][0].residue,
quantityMax: funcDate[0][0].residue < 3 ? funcDate[0][0].residue : 3, quantityMax: funcDate[0][0].residue < 3 ? funcDate[0][0].residue : 3,
quantityMin: 1, quantityMin: 1,
buyContentCover: funcResponse.cover buyContentCover: funcResponse.cover
}) })
console.log(funcDate) console.log(funcDate)
console.log(this.data.quantityTipNumber, funcEntryId) console.log(this.data.quantityTipNumber, funcEntryId)
// 如果存在场次 id 则重新设置场次信息 // 如果存在场次 id 则重新设置场次信息
if (funcEntryId) { if (funcEntryId) {
let funcDateBegin = '' let funcDateBegin = ''
let funcTimeBegin = '' let funcTimeBegin = ''
let funcTimeEnd = '' let funcTimeEnd = ''
for (let i = 0, l = funcTimetable.length; i < l; i++) { for (let i = 0, l = funcTimetable.length; i < l; i++) {
if (funcEntryId === funcTimetable[i].id) { if (funcEntryId === funcTimetable[i].id) {
funcDateBegin = App.modular.miment(funcTimetable[i].beginTime).format('MM月DD日') funcDateBegin = App.modular.miment(funcTimetable[i].beginTime).format('MM月DD日')
funcTimeBegin = App.modular.miment(funcTimetable[i].beginTime).format('hh:mm') funcTimeBegin = App.modular.miment(funcTimetable[i].beginTime).format('hh:mm')
funcTimeEnd = App.modular.miment(funcTimetable[i].endTime).format('hh:mm') funcTimeEnd = App.modular.miment(funcTimetable[i].endTime).format('hh:mm')
this.setData({ this.setData({
quantityTipNumber: funcDate[0][i].residue, quantityTipNumber: funcDate[0][i].residue,
buyContentTime: funcDateBegin + ' ' + funcTimeBegin + ' - ' + funcTimeEnd buyContentTime: funcDateBegin + ' ' + funcTimeBegin + ' - ' + funcTimeEnd
}) })
break break
}
} }
} }
}
// 活动时间显示取范围实现,观影时间显示取选择场次时间 // 活动时间显示取范围实现,观影时间显示取选择场次时间
if (this.data.orderType === 6) { if (this.data.orderType === 6) {
this.setData({ this.setData({
buyContentTime: funcResponse.activeDate + ' ' + funcResponse.activeTime buyContentTime: funcResponse.activeDate + ' ' + funcResponse.activeTime
}) })
}
} }
}) })
}, },
...@@ -504,13 +504,16 @@ Page({ ...@@ -504,13 +504,16 @@ Page({
* @returns * @returns
*/ */
onEntryTime: function (event) { onEntryTime: function (event) {
let funcDateIndex = event.detail.value[0]
let funcTimeIndex = event.detail.value[1]
console.log('entryDate', this.data.entryDate)
console.log('entryDateList', this.data.entryDateList)
console.log('entryDateList', this.data.entryTimeList)
let funcIndex = event.detail.value let funcIndex = event.detail.value
console.log(funcIndex) let funcStock = this.data.entryDate[funcDateIndex][funcTimeIndex].residue
console.log(this.data.entryDate[funcIndex[0]])
let funcStock = this.data.entryDate[funcIndex[0]][funcIndex[1]].residue
this.setData({ this.setData({
entrySelection: this.data.entryDateList[0][funcIndex[0]] + ' ' + this.data.entryTimeList[this.data.entryDateIndex][funcIndex[1]], entrySelection: this.data.entryDateList[0][funcDateIndex] + ' ' + this.data.entryTimeList[this.data.entryDateIndex][funcTimeIndex],
entryId: this.data.entryDate[funcIndex[0]][funcIndex[1]].id, entryId: this.data.entryDate[funcDateIndex][funcTimeIndex].id,
quantityTipNumber: funcStock, quantityTipNumber: funcStock,
quantityMax: funcStock < 3 ? funcStock : 3, quantityMax: funcStock < 3 ? funcStock : 3,
...@@ -655,24 +658,7 @@ Page({ ...@@ -655,24 +658,7 @@ Page({
* @param * @param
* @returns * @returns
*/ */
onNotice: function () { onNotice: function () {
// 初始底部弹出动画
let funcUnitProportion = wx.getStorageSync('unitProportion')
let funcMoveHeight = funcUnitProportion * 950
this.animation.translate(0, 0)
this.setData({
winNoticeDetail: true,
animation: this.animation.export()
})
let funcTimer = setTimeout(() => {
this.animation.translate(0, -funcMoveHeight).step()
this.setData({
animation: this.animation.export()
})
clearTimeout(funcTimer)
}, 100)
switch (this.data.orderType) { switch (this.data.orderType) {
case 6: case 6:
case 7: case 7:
...@@ -712,17 +698,9 @@ Page({ ...@@ -712,17 +698,9 @@ Page({
} }
}) })
} }
},
/**
* 关闭须知详情
* @function
* @param
* @returns
*/
onNoticeClose: function () {
this.setData({ this.setData({
winNoticeDetail: false winNoticeDetail: true,
}) })
}, },
...@@ -1125,28 +1103,6 @@ Page({ ...@@ -1125,28 +1103,6 @@ Page({
isPaySubmit: false, 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 () { queryPayStatus: function () {
......
...@@ -374,16 +374,14 @@ ...@@ -374,16 +374,14 @@
</view> </view>
<!-- 购买须知详情 --> <!-- 购买须知详情 -->
<view class="notice-detail" wx:if="{{winNoticeDetail}}" bindtap="onNoticeClose"> <m-popup isShow="{{winNoticeDetail}}">
<view class="notice-item" animation="{{animation}}"> <view class="popup_container column" slot="content">
<view class="notice-title"> <text class="popup_title font_bold_42 color_regular">兑换须知</text>
<text>{{noticeText}}</text> <view class="popup_content">
</view>
<view class="notice-rich">
<rich-text nodes="{{noticeDetail}}"></rich-text> <rich-text nodes="{{noticeDetail}}"></rich-text>
</view> </view>
</view> </view>
</view> </m-popup>
<!-- 库存不足提示 --> <!-- 库存不足提示 -->
<view class="stock-mask row cc ac" wx:if="{{winStockTip}}"> <view class="stock-mask row cc ac" wx:if="{{winStockTip}}">
......
...@@ -418,6 +418,17 @@ ...@@ -418,6 +418,17 @@
margin-left: 8rpx; margin-left: 8rpx;
} }
/* 使用须知弹窗 */
.popup_container {
max-height: 1100rpx;
padding: 56rpx 40rpx;
}
.popup_content {
min-height: 200rpx;
margin: 40rpx 0 0 0;
}
/* 报名组件 */ /* 报名组件 */
.entry-title { .entry-title {
margin-top: 32rpx; margin-top: 32rpx;
......
...@@ -119,7 +119,7 @@ ...@@ -119,7 +119,7 @@
<view class="club-item row cc" data-item="{{item}}" bindtap="onClubDetail"> <view class="club-item row cc" data-item="{{item}}" bindtap="onClubDetail">
<view class="club-item-info column ac"> <view class="club-item-info column ac">
<image src="{{item.logo}}"></image> <image src="{{item.logo}}"></image>
<text class="club-item-info-name">{{item.name}}</text> <text class="club-item-info-name overflow_point_1">{{item.name}}</text>
<text class="club-item-info-owner owner-mark" wx:if="{{item.isOwner}}">业主专享</text> <text class="club-item-info-owner owner-mark" wx:if="{{item.isOwner}}">业主专享</text>
</view> </view>
</view> </view>
......
...@@ -302,8 +302,10 @@ ...@@ -302,8 +302,10 @@
} }
.club-item-info-name { .club-item-info-name {
width: 400rpx;
height: 44rpx; height: 44rpx;
text-align: center;
font-size: 30rpx; font-size: 30rpx;
font-weight: 800; font-weight: 800;
line-height: 44rpx; line-height: 44rpx;
......
...@@ -39,46 +39,4 @@ ...@@ -39,46 +39,4 @@
* eventXX: function () {}, * eventXX: function () {},
* 逻辑事件函数,所有不是用户触发的事件,比如 swiper 组件 bindchange 事件 * 逻辑事件函数,所有不是用户触发的事件,比如 swiper 组件 bindchange 事件
* }) * })
*/ */
\ No newline at end of file
// 轻提示
App.ui.showToast({
iconType: 'error',
title: '',
duration: 30000
})
// 请求示例
App.request({
url: '',
params: {}
}).then((response) => {
}).catch((response) => {
})
// 常用循环
let funcList = []
for (let i = 0, l = funcData.length; i < l; i++) {
let funcItem = {
}
funcList.push(funcItem)
}
// 界面循环 <block wx:for="{{lineStyle}}" wx:for-index="index" wx:for-item="item" wx:key="index">
// 常用变量命名
// 物件类型,商品,券码等等
let funcItem = {
'id': '', // 唯一标识
'number': '', // 编号
'name': '', // 名称
'type': '', // 类型
'quantity': '', // 数量
}
// 审核失败 - FailedAudit
// 审核成功 - SuccessAudit
// 数据检查 - inspection
\ No newline at end of file
...@@ -17,11 +17,7 @@ let output = { ...@@ -17,11 +17,7 @@ let output = {
break break
} }
if (funcAmountValue === '000') { return funcAmountValue.toString().replace(/([0-9]{2})$/, '.$1')
return '免费'
} else {
return funcAmountValue.toString().replace(/([0-9]{2})$/, '.$1')
}
}, },
// 项目通用函数 // 项目通用函数
......
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