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