Commit acf196ae by 严立

LL - bug 修复

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