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()
}
})
......
......@@ -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(() => {
})
},
// 预约列表/我的预约
......
......@@ -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>
......
......@@ -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