Commit 4d6c7be7 by 严立

1.m-tab 组件优化

2.退款逻辑相关问题修改
parent b52c5598
Showing with 329 additions and 484 deletions
......@@ -274,7 +274,6 @@ App({
let funcShopInfo = JSON.parse(JSON.stringify(iEnvironmental.shopId[i]))
if (funcShopType) funcShopInfo.shopType = funcShopType
console.log('11')
wx.setStorageSync('shopInfoBuffer', funcShopInfo)
return iEnvironmental.shopId[i]
}
......
......@@ -131,25 +131,21 @@ Component({
eventChange: function () {
console.log('[m-image-picker] eventChange')
console.log(this.data.selectionImageList)
this.triggerEvent('change', { type: 'change', images: this.data.selectionImageList } )
},
eventRemove: function (funcRemoveImage) {
console.log('[m-image-picker] eventRemove')
console.log(funcRemoveImage)
this.triggerEvent('remove', { type: 'remove', images: funcRemoveImage } )
},
eventErrorFormat: function (funcErrorImageList) {
console.log('[m-image-picker] eventErrorFormat')
console.log(funcErrorImageList)
this.triggerEvent('error', { type: 'format', images: funcErrorImageList } )
},
eventErrorSize: function (funcErrorImageList) {
console.log('[m-image-picker] eventErrorSize')
console.log(funcErrorImageList)
this.triggerEvent('error', { type: 'size', images: funcErrorImageList } )
},
}
......
......@@ -52,18 +52,14 @@ Component({
methods: {
onInput: function (event) {
console.log('[m-input] onInput')
// this.setData({
// value: event.detail.value
// })
},
onInputFocus: function() {
console.log('[m-input]onInputFocus')
},
onInputBlur: function (event) {
console.log('[m-input] onInputBlur')
this.setData({
value: event.detail.value
})
......@@ -72,13 +68,12 @@ Component({
},
onInputConfirm: function() {
console.log('[m-input] onInputConfirm')
this.setInputHidden()
},
setInputShow: function() {
this.setData({
value: this.data.value,
// value: this.data.value,
winText: false,
winInput: true,
})
......@@ -87,11 +82,11 @@ Component({
this.setData({
inputFocus: true,
})
clearTimeout(funcTimer)
}, 20)
},
setInputHidden: function() {
console.log('setInputHidden')
this.setData({
inputFocus: false,
winText: true,
......
Component({
scrollStart: 0,
scrollTimer: 0,
scrollLock: false,
properties: {
listOption: {
type: Object,
value: {}
},
itemOption: {
type: Object,
value: {
align: 'between', // 左对齐 - left,居中对齐 - center,右对齐 - right,两侧对齐 - between,等分对齐 - around
}
},
item: {
type: Array,
value: []
},
activeIndex: {
type: Number,
value: 0
},
listData: { type: Array, value: [] },
listAlign: { type: String, value: 'around' },
listDirection: { type: String, value: 'row' },
styleName: { type: String, value: 'routine' },
selectionIndex: { type: Number, value: 0 },
},
data: {
itemElementLeft: [],
scrollLeft: 0,
listClass: 'row ca',
},
// 属性监听
observers: {
'item': function (funcValue) {
this.setItemElement()
'listAlign': function (value) {
this.setListAlign()
},
},
methods: {
setItemElement: function () {
if (this.data.item.length === 0) return
let funcQuery = this.createSelectorQuery()
funcQuery.selectAll('.m-item-mark').boundingClientRect()
funcQuery.exec((funcResult) => {
let funcSelectionElement = funcResult[0]
this.scrollStart = funcSelectionElement[0].left
setListAlign: function () {
switch (this.data.listAlign) {
case 'left':
this.setData({ listClass: 'row cs'})
break
let funcList = [ 0 ]
for (let i = 1, l = funcSelectionElement.length; i < l; i++) {
funcList.push(funcSelectionElement[i].left - this.scrollStart)
}
this.setData({
itemElementLeft: funcList
})
})
case 'center':
this.setData({ listClass: 'row cc'})
break
case 'right':
this.setData({ listClass: 'row ce'})
break
case 'between':
this.setData({ listClass: 'row cb'})
break
case 'around':
this.setData({ listClass: 'row ca'})
break
}
},
onItem: function (funcEvent) {
let funcItem = funcEvent.currentTarget.dataset.item
let funcIndex = funcEvent.currentTarget.dataset.index
onItem: function (event) {
let funcItem = event.currentTarget.dataset.item
let funcIndex = event.currentTarget.dataset.index
this.setData({
activeIndex: funcIndex
selectionIndex: funcIndex
})
this.triggerEvent('tabChange', Object.assign(funcItem, { index: funcIndex }))
},
}
})
})
\ No newline at end of file
<view class="m-tab m-tab-container">
<view class="m-tab-list">
<block wx:for="{{item}}" wx:for-item="item" wx:for-index="index" wx:key="index">
<view class="m-item-mark m-item" data-item="{{item}}" data-index="{{index}}" bindtap="onItem">
<view class="row cc ac m-item-active" wx:if="{{activeIndex === index}}">
<view class="m-tab {{styleName}}">
<!-- 横向列表 -->
<view class="list-row list {{listClass}}" wx:if="{{listDirection === 'row'}}">
<block wx:for="{{listData}}" wx:for-item="item" wx:for-index="index" wx:key="index">
<view class="list-item {{styleName}}" data-item="{{item}}" data-index="{{index}}" bindtap="onItem">
<view class="row cc ac default" wx:if="{{selectionIndex !== index}}">
<text>{{item.text}}</text>
</view>
<view class="row cc ac selection" wx:if="{{selectionIndex === index}}">
<text>{{item.text}}</text>
</view>
<view class="row cc ac tip" wx:if="{{item.tip}}">
<text>{{item.tip}}</text>
</view>
</view>
</block>
</view>
<view class="row cc ac m-item-inactive" wx:if="{{activeIndex !== index}}">
<!-- 纵向列表 -->
<view class="list-column {{styleName + ' ' + listClass}}" wx:if="{{listDirection === 'column'}}">
<block wx:for="{{listData}}" wx:for-item="item" wx:for-index="index" wx:key="index">
<view class="list-item {{styleName}}" data-item="{{item}}" data-index="{{index}}" bindtap="onItem">
<view class="row cc ac default" wx:if="{{selectionIndex !== index}}">
<text>{{item.text}}</text>
</view>
<view class="row cc ac selection" wx:if="{{selectionIndex === index}}">
<text>{{item.text}}</text>
</view>
</view>
......
@import '../m-main.wxss';
@import './option.wxss';
.m-tab-container {
z-index: 4;
width: 750rpx;
border-bottom: 1px #E2E7EF solid;
background: #FFFFFF;
.list::-webkit-scrollbar {
display: none;
}
.m-tab-list {
.list-row {
z-index: 4;
width: 750rpx;
margin: 0;
padding: 0;
white-space: nowrap;
border: none;
overflow: scroll;
}
.m-tab-list::-webkit-scrollbar {
display: none;
}
.m-item {
display: inline-block;
margin: 0 40rpx;
overflow-x: scroll;
text-align: left;
}
.m-item-active {
height: 60rpx;
padding: 0 0 24rpx 0;
border-bottom: 4rpx #15191F solid;
font-size: 26rpx;
font-weight: 800;
line-height: 36rpx;
color: #15191F;
.list-column {
z-index: 4;
overflow-y: scroll;
}
.m-item-inactive {
height: 60rpx;
padding: 0 0 24rpx 0;
border-bottom: 4rpx rgba(0, 0, 0, 0) solid;
font-size: 26rpx;
font-weight: 800;
line-height: 36rpx;
color: #656E7B;
.list-item {
position: relative;
display: inline-block;
white-space: nowrap;
}
\ No newline at end of file
/* routine */
.routine > .list{
border: 1px #e2e7ef solid;
border-style: none none solid none;
background: #FFFFFF;
}
.routine > .default {
height: 60rpx;
padding: 0 0 24rpx 0;
border-bottom: 2px rgba(0, 0, 0, 0) solid;
font-size: 26rpx;
font-weight: 800;
line-height: 36rpx;
color: #959DA9;
}
.routine > .selection {
height: 60rpx;
padding: 0 0 24rpx 0;
border-bottom: 2px #15191F solid;
font-size: 26rpx;
font-weight: 800;
line-height: 36rpx;
color: #15191F;
}
.routine > .tip {
position: absolute;
top: 0;
right: -40rpx;
min-width: 32rpx;
height: 32rpx;
border-radius: 16rpx;
background: #E66060;
font-size: 22rpx;
font-weight: 800;
line-height: 36rpx;
color: #FFFFFF;
}
/* scroll-row */
.scroll-row > .list {
padding: 0 0 0 40rpx;
border: 1px #e2e7ef solid;
border-style: none none solid none;
}
.scroll-row > .default {
height: 60rpx;
margin: 0 82rpx 0 0;
padding: 0 0 24rpx 0;
border-bottom: 2px rgba(0, 0, 0, 0) solid;
font-size: 26rpx;
font-weight: 800;
line-height: 36rpx;
color: #959DA9;
}
.scroll-row > .selection {
height: 60rpx;
margin: 0 82rpx 0 0;
padding: 0 0 24rpx 0;
border-bottom: 2px #15191F solid;
font-size: 26rpx;
font-weight: 800;
line-height: 36rpx;
color: #15191F;
}
/* scroll-row-mall */
.scroll-row-mall > .list {
padding: 0 0 0 40rpx;
}
.scroll-row-mall > .default {
height: 60rpx;
margin: 0 16rpx 0 0;
padding: 0 32rpx;
border: 1px #D4D9E2 solid;
border-radius: 2px;
font-size: 26rpx;
font-weight: 800;
line-height: 36rpx;
color: #959DA9;
}
.scroll-row-mall > .selection {
height: 60rpx;
margin: 0 16rpx 0 0;
padding: 0 32rpx;
border: 1px #15191F solid;
border-radius: 2px;
font-size: 26rpx;
font-weight: 800;
line-height: 36rpx;
color: #15191F;
}
\ No newline at end of file
......@@ -18,7 +18,6 @@ Component({
observers: {
'focus': function (value) {
console.log('observers focus', value)
if (value) {
this.setData({
inputFocus: false,
......@@ -60,8 +59,10 @@ Component({
*/
onInput: function (event) {
this.setData({
value: event.detail.value,
inputQuantity: event.detail.value.length
})
this.triggerEvent('input', { id: this.data.inputId, value: this.data.value })
},
/**
......@@ -134,8 +135,6 @@ Component({
},
eventFocus: function (event) {
console.log('[m-textarea] eventFocus')
console.log(event)
this.triggerEvent('focus', { height: event.detail.height, value: event.detail.value } )
},
}
......
......@@ -52,7 +52,6 @@ Page({
this.setData({
establishInfo: this.establishBuffer
})
console.log(this.data.establishInfo)
},
onEstablish: function () {
......
......@@ -61,8 +61,6 @@ Page({
},
enterInfoCustom: funcCustomKey,
})
console.log(this.data.clubInfo)
}).catch((response) => {})
},
......
......@@ -150,8 +150,6 @@ Page({
}
funcList.push(funcItem)
}
console.log(funcList)
this.setData({
clubInfoList: this.data.pageIndex === 1 ? funcList : this.data.clubInfoList.concat(funcList)
})
......
......@@ -37,7 +37,7 @@
<!-- tab -->
<view class="tab">
<m-tab item="{{tabItem}}" bindtabChange="onTabChange"></m-tab>
<m-tab listData="{{tabItem}}" listAlign="left" styleName="scroll-row" bindtabChange="onTabChange"></m-tab>
</view>
<view class="club-list">
......
......@@ -20,6 +20,8 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
// 俱乐部没有商店概念,因此删除门店缓存,避免出错。
wx.removeStorageSync('shopInfoBuffer')
this.setData({
clubInfo: {
'id': options.id,
......@@ -194,8 +196,6 @@ Page({
this.setData({
clubActivity: funcList
})
console.log(this.data.clubActivity)
}).catch((response) => {})
},
......
......@@ -36,9 +36,6 @@ Page({
this.setData({
option: option
})
console.log(option)
this.resetShoppingCart()
},
......@@ -110,7 +107,6 @@ Page({
},
setShopInfo: function () {
console.log('this.data.option', this.data.option)
if (this.data.option.formPage === 'order') {
let funcAppId = Number(this.data.option.shopAppId)
for (let i = 0, l = App.globalData.shopId.length; i < l; i++) {
......@@ -122,8 +118,6 @@ Page({
'logo': App.globalData.shopId[i].logo,
'shopType': Number(this.data.option.commodityType)
}
console.log('77')
wx.setStorageSync('shopInfoBuffer', funcShopInfo)
break
}
......@@ -151,8 +145,6 @@ Page({
* @returns
*/
querySideBar: function () {
console.log('querySideBar', this.data.shopInfo.id)
console.log('querySideBar', this.data.shopInfo.shopType)
App.request({
url: 'v1/commodity/getClassifys',
params: {
......@@ -203,8 +195,6 @@ Page({
title: '加载中',
duration: 30000
})
console.log(this.data.shopInfo)
App.request({
url: 'v1/commodity/getCommoditys',
params: {
......@@ -327,8 +317,6 @@ Page({
this.setData({
sideBarHeight: funcSideBarHeight
})
console.log(funcSideBarHeight)
})
this.setCommodityDetail()
......
......@@ -48,8 +48,6 @@ Page({
shopLogo: funcShopInfo.commodityLogo,
shopInfo: funcShopInfo
})
console.log(this.data.shopLogo)
},
/**
......
......@@ -228,7 +228,6 @@ Page({
},
onPointDetail: function () {
console.log(this.data.pointDetail)
// 临时屏蔽门店
if (!this.data.appStatus) {
if (this.data.pointDetail === 'guide/card/02.png') return
......
......@@ -2,7 +2,7 @@ let App = getApp()
Page({
data: {
pageIndex: 1,
pageSize: 5,
pageSize: 10,
recordList: [],
},
......@@ -10,14 +10,12 @@ Page({
this.queryRecord()
},
onShow: function () {
if (wx.getStorageSync('tempOptions') === 'exchangeRecordSeset') {
wx.removeStorageSync('tempOptions')
this.setData({
pageIndex: 1
})
this.queryRecord()
}
onReload: function (options) {
this.setData({
pageIndex: 1,
recordList: [],
})
this.queryRecord()
},
/**
......
......@@ -192,10 +192,6 @@ Page({
}
}
}
console.log(funcGoodsInfo)
console.log(funcList)
this.setData({
couponCodeList: funcList,
})
......@@ -295,13 +291,17 @@ Page({
'orderId': this.data.exchangeInfo.id
}
}).then((response) => {
let funcData = response.data
App.ui.showToast({
iconType: 'success',
title: '收货成功',
})
wx.setStorageSync('tempOptions', 'exchangeRecordSeset')
this.queryExchangeDetail()
wx.emit({
event: {
'type': 'onReload',
'receivePage': 'pages/mall/exchange-record/exchange-record',
}
})
}).catch((response) => {})
},
fail: () => {},
......@@ -335,13 +335,18 @@ Page({
'type': 1,
}
}).then((response) => {
let funcData = response.data
App.ui.showToast({
iconType: 'success',
title: '删除成功',
})
wx.setStorageSync('tempOptions', 'exchangeRecordSeset')
wx.navigateBack()
wx.navigateBack({
delta: 1,
event: {
type: 'onReload',
option: {},
receivePage: 'pages/mall/exchange-record/exchange-record',
}
})
}).catch((response) => {})
},
fail: () => {},
......@@ -353,11 +358,13 @@ Page({
let funcTempOptions = wx.getStorageSync('tempOptions')
if (funcTempOptions) {
wx.removeStorageSync('tempOptions')
switch (funcTempOptions) {
case 'exchange':
wx.switchTab({ url: '/pages/mine/home/home' })
break
}
wx.switchTab({ url: '/pages/mine/home/home' })
wx.emit({
event: {
'type': 'onReload',
'receivePage': 'pages/mine/home/home',
}
})
}
},
})
\ No newline at end of file
......@@ -70,24 +70,11 @@
<!-- 常规商品列表 -->
<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"
classTabItem="commodity_tab_item"
classActive="commodity_tab_item_active"
classInactive="commodity_tab_item_inactive"
bindtabChange="onTabChangeCommodity">
</m-tab>
<m-tab listData="{{tabItemCommodity}}" listAlign="left" styleName="scroll-row" bindtabChange="onTabChangeCommodity"></m-tab>
<view class="tab-price">
<m-tab listData="{{tabItemPrice}}" listAlign="left" styleName="scroll-row-mall" bindtabChange="onTabChangePrice"></m-tab>
</view>
<m-tab
item="{{tabItemPrice}}"
classTab="price_tab"
classTabList="price_tab_list"
classTabItem="price_tab_item"
classActive="price_tab_item_active"
classInactive="price_tab_item_inactive"
bindtabChange="onTabChangePrice">
</m-tab>
<view class="routine_list">
<block wx:for="{{goodsAllList}}" wx:for-item="item" wx:for-index="index" wx:key="index">
......
......@@ -124,6 +124,10 @@
line-height: 20rpx;
}
.tab-price {
margin: 38rpx 0 0 0;
}
/* 所有商品 */
.routine_nothing_fill {
width: 750rpx;
......@@ -140,79 +144,6 @@
top: -22rpx;
}
.commodity_tab {
width: 750rpx;
padding: 0 0 0 40rpx;
border-bottom: 1px #E2E7EF solid;
overflow-x: scroll;
}
.commodity_tab_item {
display: inline-block;
margin: 0 80rpx 0 0;
text-align: left;
}
.commodity_tab_item_active {
align-items: flex-start;
height: 64rpx;
border-bottom: 4rpx #15191F solid;
font-size: 26rpx;
font-weight: 800;
line-height: 36rpx;
color: #15191F;
}
.commodity_tab_item_inactive {
align-items: flex-start;
height: 64rpx;
border-bottom: 4rpx rgba(0, 0, 0, 0) solid;
font-size: 26rpx;
font-weight: 500;
line-height: 36rpx;
color: #656E7B;
}
/* 积分范围 tab */
.price_tab {
width: 750rpx;
margin: 40rpx 0 0 0;
padding: 0 0 0 40rpx;
overflow-x: scroll;
}
.price_tab_list {
white-space: nowrap;
}
.price_tab_item {
display: inline-block;
margin: 0 16rpx 0 0;
font-size: 26rpx;
font-weight: 800;
line-height: 36rpx;
}
.price_tab_item_active {
height: 60rpx;
padding: 0 32rpx;
border: 1px solid #000000;
border-radius: 4px;
color: #000000;
}
.price_tab_item_inactive {
height: 60rpx;
padding: 0 32rpx;
border: 1px solid #D4D9E2;
border-radius: 4px;
font-weight: 500;
color: #656E7B;
}
/* 商品列表 */
.routine_list_nothing {
width: 750rpx;
......
......@@ -10,7 +10,6 @@ Page({
this.setData({
options: options
})
console.log(options)
},
onShow: function () {
......
......@@ -23,7 +23,6 @@ Page({
options: options,
addressInfo: Object.assign(this.data.addressInfo, { id: options.id }),
})
console.log(options)
this.queryAddressList()
},
......@@ -95,7 +94,6 @@ Page({
})
break
}
console.log(this.data.addressInfo)
},
inspectForm: function () {
......@@ -134,7 +132,6 @@ Page({
this.setData({
addressInfo: Object.assign(this.data.addressInfo, { 'isDefault': funcValue })
})
console.log(this.data.addressInfo)
},
/**
......@@ -216,7 +213,6 @@ Page({
iconType: 'success',
title: '删除成功',
ending: () => {
console.log(this.data.options)
if (this.data.options.fromPage === 'exchange') {
wx.setStorageSync('tempOptions', {})
}
......
......@@ -34,7 +34,6 @@ Page({
},
onLoad: function (options) {
console.log(options)
this.setData({
options: options,
activityId: options.activityId,
......@@ -269,7 +268,6 @@ Page({
},
// 去支付
onOrderPay: function (event) {
let funcThis = this
// 数据校验不通过
let wxRequest = this.data.orderInfo.wxRequest
// 待支付返回的wx支付参数
......@@ -280,8 +278,8 @@ Page({
package: wxRequest.package,
signType: wxRequest.signType,
paySign: wxRequest.paySign,
success(res) {
funcThis.queryOrderDetail()
success: (response) => {
this.queryOrderDetail()
wx.emit({
event: {
type: 'onReload',
......@@ -289,7 +287,7 @@ Page({
}
})
},
fail(res) { }
fail: (response) => {}
})
}
},
......
......@@ -19,7 +19,6 @@ Page({
},
onLoad: function (options) {
console.log(options)
switch (options.tab) {
case 'active': options.tab = 0; break
case 'activity': options.tab = 0; break
......@@ -282,14 +281,10 @@ Page({
package: wxRequest.package,
signType: wxRequest.signType,
paySign: wxRequest.paySign,
success(res) {
this.setData({
'orderList': [],
'orderPages': 1,
})
this.queryOrder()
success: (response) => {
this.onReload()
},
fail(res) {}
fail: (response) => {}
})
}
},
......@@ -301,9 +296,9 @@ Page({
})
},
onToActivityDetail: function (funcEvent) {
onOrderAgain: function (funcEvent) {
let funcItem = funcEvent.currentTarget.dataset.item
if (funcItem.belongType === -3) {
if (funcItem.belongType === 2) {
wx.navigateTo({ url: '/pages/club/home/home' })
} else {
wx.navigateTo({ url: '/pages/play/activity/activity' })
......
......@@ -53,7 +53,7 @@
<button wx:if="{{itemButton.buttonId === 4}}" class="operation-tip row cc ac" data-item="{{item}}" catchtap="onOrderUse">去使用</button>
<button wx:if="{{itemButton.buttonId === 5}}" class="operation-tip row cc ac" data-item="{{item}}" catchtap="onOrderEvaluate">去评价</button>
<button wx:if="{{itemButton.buttonId === 6}}" class="operation-invalid row cc ac" data-item="{{item}}" data-type="1" catchtap="doCancel">删除报名</button>
<button wx:if="{{itemButton.buttonId === 7}}" class="operation-tip row cc ac" data-item="{{item}}" catchtap="onToActivityDetail">再次报名</button>
<button wx:if="{{itemButton.buttonId === 7}}" class="operation-tip row cc ac" data-item="{{item}}" catchtap="onOrderAgain">再次报名</button>
</block>
</view>
</view>
......@@ -86,7 +86,7 @@
<!-- 主题活动数据为空 -->
<view class="noActive" wx:if="{{activityList.length === 0 && active === 0&&!isLoading}}">
<view class="noActive-title">暂无活动预约</view>
<view class="noActive-botton" bindtap="onToActivityDetail">去预约</view>
<view class="noActive-botton" bindtap="onOrderAgain">去预约</view>
</view>
</view>
......
......@@ -30,7 +30,6 @@ Page({
},
onLoad: function (options) {
console.log(options)
this.setData({
clubInfo: { id: options.id }
})
......@@ -259,8 +258,6 @@ Page({
},
winMember: true
})
console.log(this.data.memberInfo)
}).catch((response) => {})
},
......
......@@ -3,7 +3,7 @@
<m-nav titleText="入会审核" styleIndex="{{1}}"></m-nav>
<view class="tab">
<m-tab item="{{tabItem}}" classTabList="row cb tab_list" bindtabChange="eventTabChange"></m-tab>
<m-tab listData="{{tabItem}}" bindtabChange="eventTabChange"></m-tab>
</view>
<view class="container">
<view class="member_list column ac">
......
......@@ -2,8 +2,8 @@ let App = getApp()
Page({
data: {
segmentItem: [
{ text: '我加入的', value: 0, quantity: 0 },
{ text: '我管理的', value: 1, quantity: wx.getStorageSync('clubExamine') },
{ text: '我加入的', value: 0, tip: 0 },
{ text: '我管理的', value: 1, tip: wx.getStorageSync('clubExamine') },
],
segmentIndex: 0,
......@@ -126,7 +126,7 @@ Page({
}
}).then((response) => {
let funcSegmentItem = this.data.segmentItem
funcSegmentItem[1].quantity = response.data.count
funcSegmentItem[1].tip = response.data.count
this.setData({
segmentItem: funcSegmentItem
})
......
<m-toast></m-toast>
<m-dialog></m-dialog>
<m-nav titleText="我的俱乐部" styleIndex="{{1}}"></m-nav>
<m-segment
classSegmentList="segment_list"
classSegmentbItem="segment_item"
segmentItem="{{segmentItem}}"
bind:segmentChange="eventSegmentChange"
>
<block wx:for="{{segmentItem}}" wx:for-item="item" wx:for-index="index" wx:key="index">
<view slot="{{'segmentItem' + index}}">
<text>{{item.text}}</text>
<view class="segment_item_quantity row cc ac" wx:if="{{segmentItem[index].quantity > 0}}">
<text class="fs22 fw400 c90">{{segmentItem[index].quantity}}</text>
</view>
</view>
</block>
</m-segment>
<m-tab listData="{{segmentItem}}" bindtabChange="eventSegmentChange"></m-tab>
<view class="container">
<view class="club_list {{clubList.length ? 'column' : 'row cc ac'}}">
......
.segment_list {
width: 750rpx;
margin: 40rpx 0 0 0;
}
.segment_item {
width: 104rpx;
margin: 0 auto;
}
.segment_item_quantity {
position: absolute;
top: 0;
left: 114rpx;
min-width: 32rpx;
height: 32rpx;
padding: 0 10rpx;
border-radius: 16rpx;
background: #E66060;
}
/* 俱乐部列表 */
.club_list {
width: 750rpx;
......
......@@ -95,7 +95,7 @@ Page({
switch (funcOptions) {
case 'exchange':
wx.removeStorageSync('tempOptions')
this.onIntegralDetail()
break
}
},
......@@ -119,6 +119,10 @@ Page({
this.queryClubAuditTotal() // 查询俱乐部审核数量
},
onReload: function () {
this.onIntegralDetail()
},
onHide: function () {
wx.removeStorageSync('shopInfoBuffer')
},
......@@ -373,8 +377,6 @@ Page({
this.setData({
orderList: funcList
})
console.log(this.data.orderList)
}).catch((response) => {})
},
......
......@@ -28,8 +28,6 @@ Page({
this.setData({
userInfo: funcUserInfo
})
console.log(this.data.userInfo)
},
......
......@@ -9,23 +9,11 @@ Page({
orderTypeHeight: 0,
orderType: [],
orderTypeActive: 0,
isDoing: false,
tabItem: [{
'value': '',
'text': '全部'
},
{
'value': '0',
'text': '待付款'
},
{
'value': '2',
'text': '待使用'
},
{
'value': `-1','4`,
'text': '取消/过期'
},
tabItem: [
{ value: '', text: '全部'},
{ value: '0', text: '待付款'},
{ value: '2', text: '待使用'},
{ value: `-1','4`, text: '取消/过期' },
],
statusActive: 0,
orderList: [],
......@@ -89,7 +77,7 @@ Page({
params: {
'goodType': this.data.orderTypeActive ? this.data.orderType[this.data.orderTypeActive].value : this.data.orderType[0].value,
'status': this.data.tabItem[this.data.statusActive].value,
'pageSize': 20,
'pageSize': 10,
'pageNo': this.data.orderPages,
}
})
......@@ -400,9 +388,6 @@ Page({
'title': '处理中',
'duration': 60000
})
this.setData({
isDoing: true
})
let funcItem = event.target.dataset.item
App.request({
url: 'v1/order/cancelOrder',
......@@ -417,7 +402,6 @@ Page({
'title': '取消成功'
})
this.setData({
'isDoing': false,
'orderList': [],
'orderPages': 1,
})
......@@ -447,9 +431,6 @@ Page({
'title': '处理中',
'duration': 60000
})
this.setData({
isDoing: true
})
let funcItem = event.target.dataset.item
App.request({
url: 'v1/order/cancelOrder',
......@@ -464,7 +445,6 @@ Page({
'title': '删除成功'
})
this.setData({
'isDoing': false,
'orderList': [],
'orderPages': 1,
})
......@@ -487,9 +467,6 @@ Page({
'iconType': 'loading',
'title': '处理中',
})
this.setData({
isDoing: true
})
let funcItem = event.target.dataset.item
App.request({
url: 'v1/order/orderRefund/' + funcItem.id,
......@@ -502,7 +479,6 @@ Page({
'title': '退款申请已提交'
})
this.setData({
'isDoing': false,
'orderList': [],
'orderPages': 1,
})
......
......@@ -35,13 +35,7 @@
</view>
<view class="order_type_selection_occupy" style="{{'margin: ' + cssNavHeight + 'px 0 0 0;'}}"></view>
<m-tab
item="{{tabItem}}"
classTab="tab"
classTabList="tab_list"
bindtabChange="eventTabChange"
>
</m-tab>
<m-tab listData="{{tabItem}}" bindtabChange="eventTabChange"></m-tab>
<!-- 订单列表 -->
<view class="container bg-gradient">
......
......@@ -80,16 +80,6 @@
height: 44rpx;
}
/* 订单状态 */
.tab {
width: 750rpx;
}
.tab_list {
padding: 0 40rpx;
border-bottom: 1px #e8ecf2 solid;
}
.container {
position: relative;
min-height: 100vh;
......@@ -130,13 +120,6 @@
color: #86c5e1;
}
.order-list-item-title image {
/* display: block;
max-width: 100rpx;
height: 60rpx;
margin-right: 20rpx; */
}
.order-list-item-service {
margin: 34rpx 0 48rpx 0;
}
......
......@@ -23,7 +23,6 @@ Page({
evaluateAlbumTemp: [],
},
onLoad: function (options) {
console.log(options)
let pageFrom = options.pageFrom
this.setData({
orderInfo: Object.assign(this.data.orderInfo, { 'id': options.id }),
......@@ -169,7 +168,6 @@ Page({
this.setData({
evaluateAlbumTemp: funcEvaluateAlbum
})
console.log('eventImageChange', funcEvaluateAlbum)
},
eventImageError: function (funcEvent) {
......@@ -192,8 +190,13 @@ Page({
}
},
onInput: function (event) {
this.setData({
evaluateContent: event.detail.value
})
},
doInputContent: function (funcEvent) {
console.log(funcEvent.detail.value)
this.setData({
evaluateContent: funcEvent.detail.value
})
......@@ -215,7 +218,6 @@ Page({
'token': funcToken,
},
success: (response) => {
console.log(response)
let funcResponseData = JSON.parse(response.data).data
let funcEvaluateAlbum = this.data.evaluateAlbum
funcEvaluateAlbum.push(funcResponseData.fileUrl[0])
......
......@@ -79,13 +79,7 @@
</view>
</view>
<view class="order-comment">
<m-textarea
inputId="evaluate"
external-input="evaluate-content"
placeholder="您的评价与建议,会让园区做的更好"
inputMax="{{200}}"
bindblur="doInputContent">
</m-textarea>
<m-textarea inputId="evaluate" external-input="evaluate-content" placeholder="您的评价与建议,会让园区做的更好" inputMax="{{200}}" bindinput="onInput" bindblur="doInputContent"></m-textarea>
<view class="order-picker">
<m-image-picker bind:change="eventImageChange" bind:error="eventImageError"></m-image-picker>
</view>
......
......@@ -96,6 +96,7 @@ Page({
},
onLoad: function (options) {
console.log('options', options)
if (options.type) options.type = Number(options.type)
logicData.option = options
......@@ -290,6 +291,8 @@ Page({
* @returns
*/
setShopInfo: function () {
let funcShopInfo = wx.getStorageSync('shopInfoBuffer')
if (!funcShopInfo) return
this.setData({
shopInfo: wx.getStorageSync('shopInfoBuffer'),
})
......@@ -513,6 +516,7 @@ Page({
* @returns
*/
onEntryTime: function (event) {
console.log('onEntryTime', event.detail.value)
let funcDateIndex = event.detail.value[0]
let funcTimeIndex = event.detail.value[1]
let funcStock = this.data.entryDate[funcDateIndex][funcTimeIndex].residue
......@@ -540,6 +544,7 @@ Page({
let funcDateList = this.data.entryDateList
funcDateList[1] = this.data.entryTimeList[funcIndex]
// 当选择日期时,同步该日期下的时间。
if (funcColumn === 0) {
this.setData({
entryDateList: funcDateList,
......
......@@ -10,8 +10,6 @@ Page({
},
onLoad: function (options) {
console.log(options)
if (options.state === 'true') {
this.setData({
payState: true,
......
......@@ -17,7 +17,6 @@ Page({
},
onLoad: function (options) {
console.log(options)
this.setData({
id: options.id
})
......
......@@ -2,9 +2,9 @@ let App = getApp()
Page({
data: {
imageBase: App.globalData.appImageBase,
tabItem: [{ text: '全部', value: 0 }],
tabTop: 0,
tabItem: [{ text: '全部', value: 0 }],
tabClass: '',
pageIndex: 1,
......@@ -40,6 +40,12 @@ Page({
this.queryTab()
},
onShow: function () {
this.setData({
tabTop: wx.getStorageSync('navHeight')
})
},
/**
* 设置电影类型标签
* @function
......@@ -76,7 +82,6 @@ Page({
'types': 2,
}
}).then((response) => {
console.log(response)
let funcData = response.data
let funcList = [{ text: '全部', value: 0 }]
for (let i = 0, l = funcData.length; i < l; i++) {
......@@ -283,12 +288,6 @@ Page({
console.log(funcEvent)
},
eventNavChangeHeight: function (event) {
this.setData({
tabTop: event.detail.navHeight,
})
},
//开启下拉刷新
onReachBottom: function () {
console.log('onPullDownRefresh')
......
<m-nav titleText="主题活动" scrollHeight="{{navScroll}}" styleIndex="{{1}}" bindnavChangeHeight="eventNavChangeHeight"></m-nav>
<m-tab class="tab-type" item="{{tabItem}}" isFixed="{{true}}" fixedTop="{{tabTop}}" bindtabChange="eventTabChange"></m-tab>
<m-nav titleText="主题活动" scrollHeight="{{navScroll}}" styleIndex="{{1}}"></m-nav>
<view class="container bg-gradient">
<view class="tab row ae" style="{{'top: ' + tabTop + 'px;'}}">
<m-tab listData="{{tabItem}}" listAlign="left" styleName="scroll-row" bindtabChange="eventTabChange"></m-tab>
</view>
<view class="container bg-gradient" style="'padding: ' + tabTop + 'px 0 0 0;'">
<!-- 近期活动 -->
<block wx:if="{{activity.length > 0}}">
<view class="list">
<block wx:for="{{activity}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="item" data-id="{{item.id}}" data-index="{{index}}" bindtap="onActivityLately">
<view class="item-cover" wx:if="{{item.cover !== ''}}">
<image src="{{item.cover}}" mode="aspectFill"></image>
<view class="list">
<block wx:for="{{activity}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="item" data-id="{{item.id}}" data-index="{{index}}" bindtap="onActivityLately">
<view class="item-cover" wx:if="{{item.cover !== ''}}">
<image src="{{item.cover}}" mode="aspectFill"></image>
</view>
<view class="item-info column">
<view class="item-title row cb ac">
<text class="fs30 fw800 c01">{{item.name}}</text>
<text wx:if="{{item.tagNames[0]}}">{{item.tagNames[0]}}</text>
</view>
<view class="item-date row ac">
<image src="{{imageBase + 'icon/clock-2.png'}}"></image>
<text>{{item.date}}</text>
</view>
<view class="item-info column">
<view class="item-title row cb ac">
<text class="fs30 fw800 c01">{{item.name}}</text>
<text wx:if="{{item.tagNames[0]}}">{{item.tagNames[0]}}</text>
<view class="item-describe">
<text>{{item.describe}}</text>
</view>
<view class="item-operation row cb ac">
<view class="row ac" wx:if="{{item.priceType === 1}}">
<text>活动价</text>
<text class="price-symbol">¥</text>
<text>{{item.priceSpecialText == '0' ? '免费' : item.priceSpecialText}}</text>
<text>{{item.priceText}}</text>
</view>
<view class="item-date row ac">
<image src="{{imageBase + 'icon/clock-2.png'}}"></image>
<text>{{item.date}}</text>
<view class="row ac" wx:if="{{item.priceType === 2}}">
<text>业主价</text>
<text class="price-symbol">{{item.priceSpecial == '0' ? '': '¥'}}</text>
<text>{{item.priceSpecial == '0' ? '免费' : item.priceSpecialText}}</text>
<text>{{item.priceText}}</text>
</view>
<view class="item-describe">
<text>{{item.describe}}</text>
<view class="row ac" wx:if="{{item.priceType === 3}}">
<text style="display: none"></text>
<text class="price-symbol">{{item.price == '0' ? '': '¥'}}</text>
<text>{{item.price == '0' ? '免费' : item.priceText}}</text>
</view>
<view class="item-operation row cb ac">
<view class="row ac" wx:if="{{item.priceType === 1}}">
<text>活动价</text>
<text class="price-symbol">¥</text>
<text>{{item.priceSpecialText == '0' ? '免费' : item.priceSpecialText}}</text>
<text>{{item.priceText}}</text>
</view>
<view class="row ac" wx:if="{{item.priceType === 2}}">
<text>业主价</text>
<text class="price-symbol">{{item.priceSpecial == '0' ? '': '¥'}}</text>
<text>{{item.priceSpecial == '0' ? '免费' : item.priceSpecialText}}</text>
<text>{{item.priceText}}</text>
</view>
<view class="row ac" wx:if="{{item.priceType === 3}}">
<text style="display: none"></text>
<text class="price-symbol">{{item.price == '0' ? '': '¥'}}</text>
<text>{{item.price == '0' ? '免费' : item.priceText}}</text>
</view>
<view>
<button class="row cc ac" catchtap="onReport" data-item="{{item}}">报名</button>
</view>
<view>
<button class="row cc ac" catchtap="onReport" data-item="{{item}}">报名</button>
</view>
</view>
</view>
</block>
</view>
</block>
</view>
</block>
</view>
<!-- 往期活动 -->
<block wx:if="{{selectedOther.length > 0}}">
......
.tab-type {
margin: 44rpx 0 0 0;
}
.container {
min-height: 100vh;
padding-bottom: 100rpx;
}
/* 状态筛选菜单 */
.status {
.tab {
z-index: 2;
position: fixed;
top: 0;
left: 0;
width: 750rpx;
padding: 0 40rpx;
border-bottom: 1px #e2e7ef solid;
overflow-x: scroll;
flex-wrap: nowrap;
background-color: #fff;
}
.status-item {
height: 94rpx;
margin-right: 80rpx;
font-size: 26rpx;
font-weight: 400;
color: #959da9;
}
.status-item text {
display: inline-block;
white-space: nowrap;
}
.status-item:last-child {
padding-right: 40rpx;
}
.status-item-active {
height: 94rpx;
color: #15191f;
font-weight: 600;
border-bottom: 4rpx #15191f solid;
}
::-webkit-scrollbar {
width: 0;
height: 0;
color: transparent;
height: 100rpx;
background: #FFFFFF;
}
.title {
......@@ -65,7 +27,7 @@
/* 活动列表 */
.list {
padding: 0rpx 40rpx 50rpx 40rpx;
padding: 100rpx 40rpx 50rpx 40rpx;
}
.item {
......
......@@ -66,7 +66,6 @@ Page({
this.setData({
recentActivitiesList: funcList
})
console.log(this.data.recentActivitiesList)
}).catch((response) => {
})
......
......@@ -60,7 +60,6 @@ Page({
},
onLoad: function(options) {
console.log(options)
this.setData({
option: options,
cssTabContentTop: wx.getStorageSync('navHeight'),
......@@ -626,6 +625,7 @@ Page({
this.setData({
detailEvaluate: funcEvaluate
})
wx.pageScrollTo({ selector: '.scrollTopMark', duration: 500 })
})
})
},
......@@ -717,18 +717,19 @@ Page({
this.setData({
contentType: funcContentType
})
wx.pageScrollTo({ selector: '.scrollTopMark', duration: 500 })
break
case 'evaluate':
this.setData({
contentType: funcContentType
})
this.getOfficeAppraise()
this.getAppraise()
break
}
},
// 跳转到服务详情
onContact: function() {
App.setShopInfo(Number(this.data.option.id), 3)
......
......@@ -163,6 +163,8 @@
<image src="{{resourcesBase + 'play/service/service-flower.png'}}" bindtap="onBuySnacks" data-id="{{5}}"></image>
</view>
<view class="scrollTopMark"></view>
<!-- 简介,评价 -->
<view class="tab-content row" style="{{ 'top: ' + cssTabContentTop + 'px;'}}">
<view class="tab-content-item row ac {{contentType === 'detail' ? 'tab-content-active' : ''}}" data-type="detail" bindtap="onSelectionContent">
......@@ -363,6 +365,8 @@
</view>
</view>
<view class="scrollTopMark"></view>
<!-- 简介,评价 -->
<view class="tab-content movie-border row" style="{{ 'top: ' + cssTabContentTop + 'px;'}}">
<view class="tab-content-item row ac {{contentType === 'detail' ? 'tab-content-active-movie' : ''}}" data-type="detail" bindtap="onSelectionContent">
......
......@@ -28,13 +28,14 @@
"disablePlugins": [],
"outputPath": ""
},
"enableEngineNative": false,
"useIsolateContext": true,
"useCompilerModule": true,
"userConfirmedUseCompilerModuleSwitch": false,
"userConfirmedBundleSwitch": false,
"packNpmManually": false,
"packNpmRelationList": [],
"minifyWXSS": true
"minifyWXSS": true,
"bundle": false
},
"compileType": "miniprogram",
"libVersion": "2.11.0",
......
......@@ -55,8 +55,6 @@ function navigateBack (wxObject) {
for (let i = funcPageList.length - 1; 0 <= i; i--) {
if (funcPageList[i].route === funcReceivePagePath) {
funcPageList[i].onCatchNewEvent(object.event)
console.log(funcPageList[i])
if (typeof funcPageList[i][object.event.type] === 'function' ) funcPageList[i][object.event.type]()
break
}
......
......@@ -83,7 +83,6 @@ let Output = {
break
case 500:
console.log('request 500', funcResponse)
return {
success: false,
response: {
......
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