Commit 38d785c8 by 严立

LL - bug 修改

parent 773fab64
import iMui from './component/m-init.js' import iMui from './component/m-init.js'
import iBase64 from './npm/base64.js' import iBase64 from './npm/base64.js'
import iMiment from './npm/miment.js' import iMiment from './npm/miment.js'
import iPageExtend from './utils/extend/page.js' import pageExtend from './utils/extend/page.js'
import wxApiExtend from './utils/extend/api.js'
import iUtils from './utils/utils.js' import iUtils from './utils/utils.js'
import iLogin from './utils/login/login.js' import iLogin from './utils/login/login.js'
import iRule from './utils/rule/rule.js' import iRule from './utils/rule/rule.js'
...@@ -30,7 +31,8 @@ App({ ...@@ -30,7 +31,8 @@ App({
}, },
onLaunch: function () { onLaunch: function () {
iPageExtend(this) // Page 实例拓展,为所有 Page 统一增加属性或者方法 wxApiExtend(wx) // wx.api 拓展,重新定义某些 api 接口。
pageExtend(this) // Page 实例拓展,为所有 Page 统一增加属性或者方法
iMui(this) // m-ui 相关函数引入 iMui(this) // m-ui 相关函数引入
iLogin(this) // 全局登录,根据 token 的情况执行相关操作 iLogin(this) // 全局登录,根据 token 的情况执行相关操作
this.setUnitProportion() this.setUnitProportion()
......
...@@ -48,7 +48,6 @@ Component({ ...@@ -48,7 +48,6 @@ Component({
methods: { methods: {
onInput: function (funcEvent) { onInput: function (funcEvent) {
console.log('onInput', funcEvent.detail.value)
this.setData({ this.setData({
inputContent: funcEvent.detail.value inputContent: funcEvent.detail.value
}) })
...@@ -60,7 +59,6 @@ Component({ ...@@ -60,7 +59,6 @@ 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 })
App.ui.hideDialog() App.ui.hideDialog()
}, },
......
...@@ -332,8 +332,8 @@ Component({ ...@@ -332,8 +332,8 @@ Component({
onBack: function () { onBack: function () {
// 页面层级小于一级时不触发返回 // 页面层级小于一级时不触发返回
let funcPageLength = getCurrentPages().length let funcPageLength = getCurrentPages().length
if (funcPageLength > 1) wx.navigateBack({ delta: 1 }) if (funcPageLength > 1) wx.navigateBack({ delta: 1, })
this.triggerEvent('navBack', { back: 1 }) this.triggerEvent('navBack', { back: 1, })
}, },
/** /**
......
...@@ -40,6 +40,10 @@ let styleOption = [ ...@@ -40,6 +40,10 @@ let styleOption = [
// 9 - pages/campsite/home/home // 9 - pages/campsite/home/home
'normal': { titleColor: '#f6dada;', bgColor: 'rgba(246, 218, 218, 0);', iconBack: '', iconHome: '', logo: '', logoSize: { width: '', height: '' } }, 'normal': { titleColor: '#f6dada;', bgColor: 'rgba(246, 218, 218, 0);', iconBack: '', iconHome: '', logo: '', logoSize: { width: '', height: '' } },
'scroll': { titleColor: '#000000;', bgColor: 'rgba(246, 218, 218, 1);', iconBack: '', iconHome: '', logo: '', logoSize: { width: '', height: '' } } 'scroll': { titleColor: '#000000;', bgColor: 'rgba(246, 218, 218, 1);', iconBack: '', iconHome: '', logo: '', logoSize: { width: '', height: '' } }
}, {
// 10 - pages/campsite/home-mirror/home-mirror
'normal': { titleColor: '#f6dada;', bgColor: 'rgba(246, 218, 218, 0);', iconBack: './image/back-1.png', iconHome: '', logo: '', logoSize: { width: '', height: '' } },
'scroll': { titleColor: '#000000;', bgColor: 'rgba(246, 218, 218, 1);', iconBack: './image/back-1.png', iconHome: '', logo: '', logoSize: { width: '', height: '' } }
}, },
] ]
......
...@@ -51,7 +51,6 @@ Component({ ...@@ -51,7 +51,6 @@ Component({
query.select('.m-popup-content').boundingClientRect() query.select('.m-popup-content').boundingClientRect()
query.exec((response) => { query.exec((response) => {
let funcElementInfo = response[0] let funcElementInfo = response[0]
console.log(funcElementInfo)
if (!funcElementInfo) return if (!funcElementInfo) return
this.setData({ this.setData({
deviationX: funcElementInfo.width, deviationX: funcElementInfo.width,
......
...@@ -2,33 +2,25 @@ let App = getApp() ...@@ -2,33 +2,25 @@ let App = getApp()
Page({ Page({
data: { data: {
imageBase: App.globalData.appImageBase, appStatus: false,
appResourcesBase: App.globalData.appResourcesBase,
showPopup: false, showPopup: false,
winSide: true, winSide: true,
sideHeight: 1250, sideHeight: 1250,
shareImage: App.globalData.appResourcesBase + 'share/share-1.png', shareImage: App.globalData.appResourcesBase + 'share/share-1.png',
childActivity: [], childActivity: [],
bannerImage: App.globalData.appResourcesBase + 'campsite/campsite-header.png', bannerImage: App.globalData.appResourcesBase + 'campsite/campsite-header.png',
bottomImage: App.globalData.appResourcesBase + 'campsite/bottom.png',
detailImage: [], campsiteDescribe: [],
detailImageUrl: [
App.globalData.appResourcesBase + 'campsite/campsite-1.png',
App.globalData.appResourcesBase + 'campsite/campsite-2.png',
App.globalData.appResourcesBase + 'campsite/campsite-3.png',
App.globalData.appResourcesBase + 'campsite/campsite-4.png',
App.globalData.appResourcesBase + 'campsite/campsite-5.png',
App.globalData.appResourcesBase + 'campsite/campsite-6.png',
],
detailIndex: 0,
}, },
onLoad: function (options) { onLoad: function (options) {
this.setSideHeight() this.setSideHeight()
this.setData({ appStatus: App.globalData.appStatus })
console.log(App.globalData.appStatus)
}, },
onShow: function () { onShow: function () {
this.setShopInfo(3, 1) this.setShopInfo(3, 1)
this.queryDetail() this.queryCampsiteDescribe()
this.queryActivity() this.queryActivity()
}, },
...@@ -57,19 +49,22 @@ Page({ ...@@ -57,19 +49,22 @@ Page({
} }
} }
}, },
// 获取后台信息 // 获取后台信息
queryDetail: function () { queryCampsiteDescribe: function () {
let that = this App.request({
App.wxRequest({
url: 'v1/park/getList', url: 'v1/park/getList',
success: function(res) { }).then((response) => {
let funcData = res.list.filter(v => v.name === '儿童营地') let funcData = response.data
that.setData({ for (let i = 0, l = funcData.length; i < l; i++) {
detailImageUrl: funcData[0].content if (funcData[i].name === '儿童营地') {
}) this.setData({ campsiteDescribe: funcData[i].content })
break
}
} }
}) })
}, },
// 获取活动信息 // 获取活动信息
queryActivity: function () { queryActivity: function () {
let that = this let that = this
...@@ -90,6 +85,11 @@ Page({ ...@@ -90,6 +85,11 @@ Page({
} }
}) })
}, },
onEvaluateMore: function () {
wx.navigateTo({ url: '/pages/campsite/evaluate/evaluate' })
},
onBackTop: function () { onBackTop: function () {
wx.pageScrollTo({ wx.pageScrollTo({
scrollTop: 0 scrollTop: 0
...@@ -202,12 +202,18 @@ Page({ ...@@ -202,12 +202,18 @@ Page({
}, },
// 点击分享图标 // 点击分享图标
onShare: function () { onShare: function () {
wx.hideTabBar({
animation: true,
})
this.setData({ this.setData({
showPopup: true showPopup: true
}) })
}, },
// 点击取消 // 点击取消
onCancel: function () { onCancel: function () {
wx.showTabBar({
animation: true,
})
this.setData({ this.setData({
showPopup: false showPopup: false
}) })
...@@ -245,8 +251,8 @@ Page({ ...@@ -245,8 +251,8 @@ Page({
'iconType': 'error', 'iconType': 'error',
'title': '图片保存失败' 'title': '图片保存失败'
}) })
this.setData({ wx.showTabBar({
winToastFail: true animation: true,
}) })
} }
}) })
......
<!-- 此页面是为了让其他页面进行跳转的镜像页面 -->
<!-- 如果直接跳转 tabbar 的营地页面会导致路由错乱问题 -->
<m-toast></m-toast> <m-toast></m-toast>
<m-nav titleText="营地" scrollHeight="{{navScroll}}" styleIndex="{{9}}" isOccupy="{{false}}"></m-nav> <m-nav titleText="营地" scrollHeight="{{navScroll}}" styleIndex="{{10}}" isOccupy="{{false}}"></m-nav>
<view class="container"> <view class="container">
<view class="appointment-side col con-b align-c" hidden="{{winSide}}"> <image class="title" src="{{resourcesBase + 'campsite/bgi.png'}}"></image>
<button class="appointment-side-top" bindtap="onBackTop">
<image src="{{imageBase + 'top.png'}}"></image>
</button>
</view>
<!-- 头部背景图 -->
<image class="banner" src="{{bannerImage}}"></image>
<!-- 分享按钮 --> <!-- 开放时间,总合评价,分享,位置 -->
<view class="share col con-c align-c" bindtap="onShare"> <view class="other">
<image class="icon-share" src="/image/icon/share-3.png"></image> <view class="other_business_hours row ac">
<image class="other_business_hours_title" src="../home/image/business-hours-title.png"></image>
<image class="other_business_hours_time" src="../home/image/business-hours.png"></image>
</view>
<view class="row cb ac">
<view class="other_evaluate row ac">
<image class="other_evaluate_title" src="../home/image/evaluate-title.png"></image>
<block wx:for="{{5}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<image class="other_evaluate_start" src="{{imageBase + 'icon/star-1.png'}}"></image>
</block>
<image class="other_evaluate_more" src="../home/image/evaluate.png" bindtap="onEvaluateMore"></image>
</view> </view>
<!-- 分享弹出图片 --> <view class="row ac">
<view class="container-share row con-c align-c" hidden="{{!showPopup}}"> <view class="share column cc ac" bindtap="onShare">
<view class="col con-c"> <image class="icon-share" src="/image/icon/share-3.png"></image>
<view class="share-content">
<image src="{{shareImage}}"></image>
</view> </view>
<view class="share-operation row con-b align-c"> <view class="location column cc ac" bindtap="onLocation">
<button bindtap="onCancel">取消</button> <image class="icon-location" src="/image/icon/location-3.png"></image>
<button bindtap="onDownload">下载图片</button>
</view> </view>
</view> </view>
</view> </view>
<!-- 位置按钮 -->
<view class="location col con-c align-c" bindtap="onLocation">
<image class="icon-location" src="/image/icon/location-3.png"></image>
</view> </view>
<!-- 入园购票 --> <!-- 入园购票 -->
<view class="buy-coupon" bindtap="onBuyMembership" data-id="{{3}}"> <view class="buy-coupon" bindtap="onBuyMembership" data-id="{{3}}">
<view class="buy-coupon-title row align-c"> <view class="buy-coupon-title row ac">
<image src="../home/image/ruyuangoupiao.png"></image> <image src="../home/image/ruyuangoupiao.png"></image>
<image src="{{imageBase + 'icon/arrow-r-1.png'}}"></image> <image src="{{imageBase + 'icon/arrow-r-1.png'}}"></image>
</view> </view>
<view class="buy-coupon-type row con-b"> <view class="buy-coupon-type row cb">
<image src="../home/image/single.png"></image> <image src="../home/image/single.png"></image>
<image src="../home/image/month.png"></image> <image src="../home/image/month.png"></image>
<image src="../home/image/year.png"></image> <image src="../home/image/year.png"></image>
</view> </view>
</view> </view>
<!-- 饮品预订 文创周边--> <!-- 餐品预定,文创周边 -->
<view class="buy-other row con-b"> <view class="buy-other row cb" wx:if="{{appStatus}}">
<!-- 饮品预订 --> <image src="../home/image/shop-food.png" data-id="{{3}}" bindtap="onBuySnacks"></image>
<view class="buy-snacks row" bindtap="onBuySnacks" data-id="{{3}}"> <image src="../home/image/shop-art.png" data-id="{{3}}" bindtap="onBuyArt"></image>
<view class="buy-left col con-c">
<image src="../home/image/yinpinyuding.png"></image>
</view>
<view class="buy-right col con-c">
<image src="../home/image/icon-bg.png"></image>
<image class="snacks-img" src="../home/image/yinpin.png"></image>
</view>
</view>
<!-- 文创周边 -->
<view class="buy-art row" bindtap="onBuyArt" data-id="{{3}}">
<view class="buy-left col con-c">
<image src="../home/image/wenchuangzhoubian.png"></image>
</view>
<view class="buy-right col con-c">
<image src="../home/image/icon-bg.png"></image>
<image class="art-img" src="../home/image/shanzi.png"></image>
</view>
</view>
</view> </view>
<!-- 全部活动 --> <!-- 活动展示 -->
<view class="activity" bindtap="onActivityAll"> <view class="all_activity" bindtap="onActivityAll">
<image src="{{appResourcesBase + 'campsite/title.png'}}"></image> <image class="all_activity_title" src="{{resourcesBase + 'campsite/all-activities.png'}}"></image>
</view>
<!-- 滚动图片 -->
<!-- 无活动 -->
<view class="activity-empty" wx:if="{{childActivity.length === 0}}">
<block>
<image src="{{appResourcesBase + 'campsite/empty.png'}}"></image>
</block>
</view>
<!-- 单活动 --> <!-- 单活动 -->
<view class="swiper" wx:if="{{childActivity.length === 1}}"> <view class="swiper" wx:if="{{childActivity.length === 1}}">
<image mode="scaleToFill" src="{{childActivity[0].childImg}}" bindtap="onActivityDetail" data-id="{{childActivity[0].id}}"></image> <image mode="scaleToFill" src="{{childActivity[0].childImg}}" bindtap="onActivityDetail" data-id="{{childActivity[0].id}}"></image>
...@@ -96,11 +65,35 @@ ...@@ -96,11 +65,35 @@
</block> </block>
</swiper> </swiper>
<view class="all_activity_nothing">
<image src="{{resourcesBase + 'campsite/all-activities-nothing.png'}}"></image>
</view>
</view>
<!-- 详情展示 -->
<block wx:for="{{detailImageUrl}}" wx:for-index="index" wx:for-item="item" wx:key="index"> <view class="describe">
<block wx:for="{{campsiteDescribe}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<image mode="widthFix" src="{{item}}"></image> <image mode="widthFix" src="{{item}}"></image>
</block> </block>
</view>
</view>
<!-- 分享弹出图片 -->
<view class="container-share row cc ac" hidden="{{!showPopup}}">
<view class="column cc">
<view class="share-content">
<image src="{{shareImage}}"></image>
</view>
<view class="share-operation row cb ac">
<button bindtap="onCancel">取消</button>
<button bindtap="onDownload">下载图片</button>
</view>
</view>
</view>
<image mode="widthFix" src="{{bottomImage}}"></image> <!-- 侧边返回顶部 -->
<view class="appointment-side column cb ac" hidden="{{winSide}}">
<button class="appointment-side-top" bindtap="onBackTop">
<image src="{{imageBase + 'top.png'}}"></image>
</button>
</view> </view>
\ No newline at end of file
.title {
position: absolute;
top: 0;
left: 0;
width: 750rpx;
height: 1460rpx;
}
/* 开放时间,总合评价,分享,位置 */
.other {
z-index: 4;
width: 750rpx;
margin: 728rpx 0 0 0;
padding: 0 40rpx;
}
.other_business_hours {
margin: 0 0 16rpx 0;
}
.other_business_hours_title {
width: 120rpx;
height: 34rpx;
margin: 0 24rpx 0 0;
}
.other_business_hours_time {
width: 188rpx;
height: 30rpx;
}
.other_evaluate_title {
width: 122rpx;
height: 34rpx;
margin: 0 24rpx 0 0;
}
.other_evaluate_start {
display: inline-block;
width: 32rpx;
height: 32rpx;
}
.other_evaluate_more {
width: 76rpx;
height: 34rpx;
margin: 0 0 0 8rpx;
}
.appointment { .appointment {
position: absolute; position: absolute;
top: 1250rpx; top: 1250rpx;
...@@ -48,29 +97,20 @@ ...@@ -48,29 +97,20 @@
} }
.container > image { .container > image {
display: block;
width: 750rpx; width: 750rpx;
} }
.banner {
width: 750rpx;
height: 1676rpx;
}
.share { .share {
position: absolute;
top: 710rpx;
right: 136rpx;
width: 64rpx; width: 64rpx;
height: 64rpx; height: 64rpx;
margin: 0 32rpx 0 0;
background: #F28FA2; background: #F28FA2;
box-shadow: 8rpx 8rpx 20rpx 0rpx rgba(242,143,162,0.3); box-shadow: 8rpx 8rpx 20rpx 0rpx rgba(242,143,162,0.3);
border-radius: 50%; border-radius: 50%;
} }
.location { .location {
position: absolute;
top: 710rpx;
right: 40rpx;
width: 64rpx; width: 64rpx;
height: 64rpx; height: 64rpx;
background: #F28FA2; background: #F28FA2;
...@@ -84,10 +124,10 @@ ...@@ -84,10 +124,10 @@
} }
.buy-coupon { .buy-coupon {
position: absolute; z-index: 2;
top: 804rpx;
width: 670rpx; width: 670rpx;
height: 312rpx; height: 312rpx;
margin: 32rpx 0 0 0;
padding: 40rpx 32rpx; padding: 40rpx 32rpx;
background: rgba(255, 255, 255, 0.85); background: rgba(255, 255, 255, 0.85);
box-shadow: 8rpx 10rpx 52rpx 0rpx rgba(238,211,153,0.3); box-shadow: 8rpx 10rpx 52rpx 0rpx rgba(238,211,153,0.3);
...@@ -114,12 +154,12 @@ ...@@ -114,12 +154,12 @@
} }
.buy-other { .buy-other {
position: absolute; z-index: 4;
top: 1140rpx;
width: 670rpx; width: 670rpx;
margin: 24rpx 0 96rpx 0;
} }
.buy-snacks, .buy-art { .buy-other > image {
width: 322rpx; width: 322rpx;
height: 154rpx; height: 154rpx;
background: rgba(255, 255, 255, 0.65); background: rgba(255, 255, 255, 0.65);
...@@ -127,51 +167,14 @@ ...@@ -127,51 +167,14 @@
border-radius: 4px; border-radius: 4px;
} }
.buy-left, .buy-right { .all_activity_title {
position: relative; display: block;
margin-left: 32rpx;
}
.buy-left image{
width: 120rpx;
height: 34rpx;
}
.buy-right image:first-child {
width: 132rpx;
height: 136rpx;
}
.snacks-img {
position: absolute;
top: 38rpx;
left: 42rpx;
width: 50rpx;
height: 76rpx;
}
.art-img {
position: absolute;
top: 42rpx;
left: 12rpx;
width: 86rpx;
height: 70rpx;
}
.activity {
position: absolute;
top: 1602rpx;
}
.activity image{
width: 160rpx;
height: 34rpx;
}
.activity-empty {
width: 750rpx; width: 750rpx;
height: 544rpx; height: 250rpx;
} }
.activity-empty image {
.all_activity_nothing > image {
display: block;
width: 750rpx; width: 750rpx;
height: 544rpx; height: 544rpx;
} }
...@@ -192,10 +195,10 @@ ...@@ -192,10 +195,10 @@
left: 0; left: 0;
right: 0; right: 0;
} }
.wx-swiper-dots.wx-swiper-dots-horizontal{ .wx-swiper-dots.wx-swiper-dots-horizontal{
margin-bottom: 64rpx; margin-bottom: 64rpx;
} }
/* 分享弹窗 */ /* 分享弹窗 */
.container-share { .container-share {
z-index: 1700; z-index: 1700;
...@@ -243,15 +246,7 @@ ...@@ -243,15 +246,7 @@
color: #FFFFFF; color: #FFFFFF;
} }
.toast { .describe > image {
width: 262rpx; display: block;
height: 262rpx; width: 750rpx;
border-radius: 4px;
box-shadow: 0px 0px 68px 0px rgba(0,0,0,0.16);
background: #1F252E;
}
.toast-icon {
width: 88rpx !important;
height: 88rpx !important;
} }
\ No newline at end of file
...@@ -151,7 +151,6 @@ Page({ ...@@ -151,7 +151,6 @@ Page({
App.ui.showToast({ App.ui.showToast({
iconType: 'loading', iconType: 'loading',
title: '正在提交', title: '正在提交',
duration: 30000
}) })
let funcEnterInfo = this.data.enterInfo let funcEnterInfo = this.data.enterInfo
...@@ -177,10 +176,12 @@ Page({ ...@@ -177,10 +176,12 @@ Page({
'smClub': { id: this.data.clubInfo.id } 'smClub': { id: this.data.clubInfo.id }
} }
}).then((response) => { }).then((response) => {
console.log('then')
App.ui.hideToast() App.ui.hideToast()
wx.setStorageSync('tempBackInfo', 'winEnter') wx.setStorageSync('tempBackInfo', 'winEnter')
wx.navigateBack() wx.navigateBack()
}).catch((response) => { }).catch((response) => {
console.log('catch')
App.ui.showToast({ App.ui.showToast({
'iconType': 'error', 'iconType': 'error',
'title': response.message 'title': response.message
......
...@@ -24,7 +24,6 @@ Page({ ...@@ -24,7 +24,6 @@ Page({
onLoad: function (options) { onLoad: function (options) {
this.setClubTab() this.setClubTab()
this.queryClubEnter()
}, },
onShow: function () { onShow: function () {
......
...@@ -505,6 +505,13 @@ Page({ ...@@ -505,6 +505,13 @@ Page({
if (funcItem.quantityMax > 0) { if (funcItem.quantityMax > 0) {
funcItem.quantity = 1 funcItem.quantity = 1
funcShoppingCart.push(funcItem) funcShoppingCart.push(funcItem)
} else {
App.ui.showToast({
iconType: 'error',
title: '没有更多商品了',
duration: 500
})
funcWinToast = false
} }
} }
......
{ {
"usingComponents": { "usingComponents": {}
"parser": "../../component/parser.min/parser"
}
} }
\ No newline at end of file
...@@ -8,6 +8,6 @@ ...@@ -8,6 +8,6 @@
<text>{{notice.date}}</text> <text>{{notice.date}}</text>
</view> </view>
<view class="describe"> <view class="describe">
<parser html="{{notice.describe}}"/> <rich-text nodes="{{notice.describe}}"></rich-text>
</view> </view>
</view> </view>
\ No newline at end of file
{ {
"usingComponents": { "usingComponents": {}
"parser": "../../component/parser.min/parser"
}
} }
\ No newline at end of file
...@@ -14,8 +14,7 @@ ...@@ -14,8 +14,7 @@
<text>{{item.date}}</text> <text>{{item.date}}</text>
</view> </view>
<view class="notice-describe"> <view class="notice-describe">
<!-- <text>{{item.describe}}</text> --> <rich-text nodes="{{item.describe}}"></rich-text>
<parser html="{{item.describe}}"/>
</view> </view>
<view class="notice-cover" wx:if="{{item.cover !== ''}}"> <view class="notice-cover" wx:if="{{item.cover !== ''}}">
<image src="{{item.cover}}" mode="widthFix"></image> <image src="{{item.cover}}" mode="widthFix"></image>
......
...@@ -164,57 +164,59 @@ Page({ ...@@ -164,57 +164,59 @@ Page({
}, },
// 再次下单 // 再次下单
onOrderAgain: function (event) { onOrderAgain: function () {
let funcItem = this.data.orderInfo
funcItem.shopAppId = wx.getStorageSync('shopInfoBuffer').appId
let funcUrl = '' let funcUrl = ''
App.setShopInfo(funcItem.shopAppId, funcItem.commodityType) let funcGoodsType = this.data.orderInfo.goodsType
switch (funcItem.shopAppId) { let funcShopAppId = App.getShopInfo(this.data.shopInfo.id).appId
App.setShopInfo(this.data.shopInfo.id, funcGoodsType)
switch (funcShopAppId) {
case 0:
funcUrl = '/pages/club/home/home'
break
// 海错图 // 海错图
case 1: case 1:
if (funcItem.commodityType === -1) funcUrl = '/pages/play/activity/activity' if (funcGoodsType === -1) funcUrl = '/pages/play/activity/activity'
if (funcItem.commodityType === 1) funcUrl = '/pages/commodity/project-detail/project-detail' if (funcGoodsType === 1) funcUrl = '/pages/commodity/project-detail/project-detail'
if (funcItem.commodityType === 3) funcUrl = '/pages/commodity/project-detail/project-detail' if (funcGoodsType === 3) funcUrl = '/pages/commodity/project-detail/project-detail'
break break
// 星空影院 // 星空影院
case 2: case 2:
if (funcItem.commodityType === -2) funcUrl = '/pages/play/movie/movie' if (funcGoodsType === -2) funcUrl = '/pages/play/movie/movie'
break break
// 儿童营地 // 儿童营地
case 3: case 3:
if (funcItem.commodityType === 1) funcUrl = '/pages/commodity/project-detail/project-detail' if (funcGoodsType === 1) funcUrl = '/pages/commodity/project-detail/project-detail'
if (funcItem.commodityType === 2) funcUrl = '/pages/commodity/menu-food/menu-food' if (funcGoodsType === 2) funcUrl = '/pages/commodity/menu-food/menu-food'
if (funcItem.commodityType === 3) funcUrl = '/pages/commodity/project-detail/project-detail' if (funcGoodsType === 3) funcUrl = '/pages/commodity/project-detail/project-detail'
break break
// 原野MOJITO // 原野MOJITO
case 4: case 4:
if (funcItem.commodityType === 5) funcUrl = '/pages/commodity/menu-food/menu-food' if (funcGoodsType === 5) funcUrl = '/pages/commodity/menu-food/menu-food'
break break
// 拾光花坊 // 拾光花坊
case 5: case 5:
if (funcItem.commodityType === -1) funcUrl = '/pages/play/activity/activity' if (funcGoodsType === -1) funcUrl = '/pages/play/activity/activity'
if (funcItem.commodityType === 5) funcUrl = '/pages/commodity/menu-food/menu-food' if (funcGoodsType === 5) funcUrl = '/pages/commodity/menu-food/menu-food'
break break
// 原味舒食 // 原味舒食
case 6: case 6:
if (funcItem.commodityType === 5) funcUrl = '/pages/commodity/menu-food/menu-food' if (funcGoodsType === 5) funcUrl = '/pages/commodity/menu-food/menu-food'
break break
// 元养水韵SPA // 元养水韵SPA
case 7: case 7:
if (funcItem.commodityType === 2) funcUrl = '/pages/commodity/project-detail/project-detail' if (funcGoodsType === 2) funcUrl = '/pages/commodity/project-detail/project-detail'
break break
} }
wx.navigateTo({ console.log(funcUrl)
url: funcUrl, wx.navigateTo({ url: funcUrl })
})
}, },
// 去支付 // 去支付
onOrderPay: function (event) { onOrderPay: function (event) {
......
...@@ -201,8 +201,11 @@ Page({ ...@@ -201,8 +201,11 @@ Page({
onToActivityDetail: function (funcEvent) { onToActivityDetail: function (funcEvent) {
let funcItem = funcEvent.currentTarget.dataset.item let funcItem = funcEvent.currentTarget.dataset.item
console.log(funcItem) if (funcItem.belongType === 2) {
wx.navigateTo({ url: '/pages/club/home/home' })
} else {
wx.navigateTo({ url: '/pages/play/activity/activity' }) wx.navigateTo({ url: '/pages/play/activity/activity' })
}
}, },
onToVisitParkAppointment: function () { onToVisitParkAppointment: function () {
......
...@@ -178,7 +178,7 @@ Page({ ...@@ -178,7 +178,7 @@ Page({
}) })
this.queryExamine() this.queryExamine()
this.queryStatistics() this.queryStatistics()
wx.setStorageSync('tempOptions', 'clubRefresh') wx.emit({ event: { type: 'onReload', receivePage: 'pages/mine/club/club' }})
}).catch((response) => { }).catch((response) => {
App.ui.showToast({ App.ui.showToast({
iconType: 'error', iconType: 'error',
......
...@@ -21,18 +21,17 @@ Page({ ...@@ -21,18 +21,17 @@ Page({
onLoad: function (options) { onLoad: function (options) {
this.queryClubEnter() this.queryClubEnter()
this.queryClubAuditTotal()
}, },
onShow: function () { onReload: function () {
console.log('onReload')
this.setData({ pageIndex: 1 })
this.queryClubAuditTotal() this.queryClubAuditTotal()
if (wx.getStorageSync('tempOptions') === 'clubRefresh') {
if (this.data.segmentIndex === 0) { if (this.data.segmentIndex === 0) {
this.queryClubEnter() this.queryClubEnter()
wx.removeStorageSync('tempOptions')
} else { } else {
this.queryClubEstablish() this.queryClubEstablish()
wx.removeStorageSync('tempOptions')
}
} }
}, },
...@@ -68,7 +67,7 @@ Page({ ...@@ -68,7 +67,7 @@ Page({
funcList.push(funcItem) funcList.push(funcItem)
} }
this.setData({ this.setData({
clubList: this.data.clubList.concat(funcList) clubList: this.data.pageIndex === 1 ? funcList : this.data.clubList.concat(funcList)
}) })
}).catch((response) => {}) }).catch((response) => {})
}, },
...@@ -106,7 +105,7 @@ Page({ ...@@ -106,7 +105,7 @@ Page({
funcList.push(funcItem) funcList.push(funcItem)
} }
this.setData({ this.setData({
clubList: this.data.clubList.concat(funcList) clubList: this.data.pageIndex === 1 ? funcList : this.data.clubList.concat(funcList)
}) })
}).catch((response) => {}) }).catch((response) => {})
}, },
...@@ -165,7 +164,6 @@ Page({ ...@@ -165,7 +164,6 @@ Page({
'title': '取消成功' 'title': '取消成功'
}) })
this.setData({ this.setData({
clubList: [],
pageIndex: 1, pageIndex: 1,
}) })
this.queryClubEnter() this.queryClubEnter()
...@@ -207,7 +205,6 @@ Page({ ...@@ -207,7 +205,6 @@ Page({
'title': '删除成功' 'title': '删除成功'
}) })
this.setData({ this.setData({
clubList: [],
pageIndex: 1, pageIndex: 1,
}) })
this.queryClubEnter() this.queryClubEnter()
...@@ -249,7 +246,6 @@ Page({ ...@@ -249,7 +246,6 @@ Page({
'title': '取消成功' 'title': '取消成功'
}) })
this.setData({ this.setData({
clubList: [],
pageIndex: 1, pageIndex: 1,
}) })
this.queryClubEstablish() this.queryClubEstablish()
...@@ -291,7 +287,6 @@ Page({ ...@@ -291,7 +287,6 @@ Page({
'title': '删除成功' 'title': '删除成功'
}) })
this.setData({ this.setData({
clubList: [],
pageIndex: 1, pageIndex: 1,
}) })
this.queryClubEstablish() this.queryClubEstablish()
...@@ -464,7 +459,6 @@ Page({ ...@@ -464,7 +459,6 @@ Page({
eventSegmentChange: function (funcEvent) { eventSegmentChange: function (funcEvent) {
let funcSegmentIndex = funcEvent.detail.index let funcSegmentIndex = funcEvent.detail.index
this.setData({ this.setData({
clubList: [],
segmentIndex: funcSegmentIndex, segmentIndex: funcSegmentIndex,
pageIndex: 1, pageIndex: 1,
}) })
......
...@@ -102,7 +102,6 @@ Page({ ...@@ -102,7 +102,6 @@ Page({
onShow: function () { onShow: function () {
this.setData({ this.setData({
clubExamine: wx.getStorageSync('clubExamine'),
isMoreOrder: false, isMoreOrder: false,
isMoreActivity: false, isMoreActivity: false,
}) })
...@@ -117,6 +116,7 @@ Page({ ...@@ -117,6 +116,7 @@ Page({
this.queryAppointmentCategory() // 查询预约分类 this.queryAppointmentCategory() // 查询预约分类
this.queryAppointmentActivity() // 查询活动预约 this.queryAppointmentActivity() // 查询活动预约
this.queryAppointmentOther() // 查询其他预约 this.queryAppointmentOther() // 查询其他预约
this.queryClubAuditTotal() // 查询俱乐部审核数量
}, },
/** /**
...@@ -476,6 +476,25 @@ Page({ ...@@ -476,6 +476,25 @@ Page({
}, },
/** /**
* 查询我管理的俱乐部审核总数
* @function
* @param
* @returns
*/
queryClubAuditTotal: function () {
App.request({
url: 'v3/club/countWaitAudit',
params: {
'state': 0
}
}).then((response) => {
if (response.data.count > 0) {
this.setData({ clubExamine: response.data.count })
}
}).catch((response) => {})
},
/**
* 业主身份认证申请 * 业主身份认证申请
* @function * @function
* @param * @param
......
...@@ -44,14 +44,21 @@ Page({ ...@@ -44,14 +44,21 @@ Page({
optionsGoodType: options.goodType != undefined ? 1 * options.goodType : '' optionsGoodType: options.goodType != undefined ? 1 * options.goodType : ''
}) })
this.setNavTop() this.setNavTop()
this.setOrderType()
}, },
onShow: function () { onReload: function () {
this.setData({ this.setData({
orderPages: 1, orderPages: 1,
orderList: [],
}) })
this.setOrderType() this.queryOrder()
},
onCatchNewEvent: function (funcEvent) {
console.log('page', funcEvent)
switch (funcEvent.type) {
case 'onReload': this.onReload()
}
}, },
setNavTop: function () { setNavTop: function () {
...@@ -147,7 +154,7 @@ Page({ ...@@ -147,7 +154,7 @@ Page({
} }
this.setData({ this.setData({
orderList: this.data.orderList.concat(funcList) orderList: this.data.orderPages === 1 ? funcList : this.data.orderList.concat(funcList)
}) })
} }
}) })
......
...@@ -69,7 +69,7 @@ Page({ ...@@ -69,7 +69,7 @@ Page({
'integral': funcResponse.integral, 'integral': funcResponse.integral,
'instructions': funcResponse.particulars, 'instructions': funcResponse.particulars,
'expireTime': funcResponse.expireTime.replace(/-/g, '.').replace('~', '-'), //订单有效期 'expireTime': funcResponse.expireTime.replace(/-/g, '.').replace('~', '-'), //订单有效期
// 'wxRequest': funcResponse.wxRequest, 'wxRequest': funcResponse.wxRequest,
} }
// 电影 // 电影
...@@ -106,8 +106,6 @@ Page({ ...@@ -106,8 +106,6 @@ Page({
userInfo: funcUserInfo, userInfo: funcUserInfo,
goodsList: funcGoodsList, goodsList: funcGoodsList,
}) })
console.log(this.data.goodsList)
// 等待支付时间计时 // 等待支付时间计时
if (funcOrderInfo.state == 0) this.setPayCountdown(funcOrderInfo.submitTime) if (funcOrderInfo.state == 0) this.setPayCountdown(funcOrderInfo.submitTime)
}) })
...@@ -244,7 +242,12 @@ Page({ ...@@ -244,7 +242,12 @@ Page({
title: type == 1 ? '订单删除成功' : '订单取消成功', title: type == 1 ? '订单删除成功' : '订单取消成功',
ending: function () { ending: function () {
wx.navigateBack({ wx.navigateBack({
delta: 1 delta: 1,
event: {
type: 'onReload',
option: {},
receivePage: 'pages/mine/order/order',
}
}) })
} }
}) })
...@@ -286,6 +289,16 @@ Page({ ...@@ -286,6 +289,16 @@ Page({
} }
} }
// 如果券码列表等于空的话,表示商品中不存在券码 id,此为餐品。
if (funcList.length === 0) {
funcList.push({
'couponId': funcData[0].volumeId,
'couponName': funcData[0].name,
'couponNumber': funcData[0].serialNumber,
'couponQrCode': funcData[0].qrcode,
'couponState': Number(funcData[0].status),
})
}
console.log(funcEvent) console.log(funcEvent)
let funcItem = funcEvent.currentTarget.dataset.item let funcItem = funcEvent.currentTarget.dataset.item
if (funcItem) { if (funcItem) {
......
...@@ -76,11 +76,11 @@ ...@@ -76,11 +76,11 @@
<view class="info-content-item row"> <view class="info-content-item row">
<text class="info-content-item-label">订单信息</text> <text class="info-content-item-label">订单信息</text>
<text class="info-content-item-tip">{{orderInfo.contactName}}</text> <text class="info-content-item-tip">{{userInfo.name}}</text>
</view> </view>
<view class="info-content-item row"> <view class="info-content-item row">
<text class="info-content-item-label"></text> <text class="info-content-item-label"></text>
<text class="info-content-item-tip">{{orderInfo.contactPhone}}</text> <text class="info-content-item-tip">{{userInfo.phone}}</text>
</view> </view>
<image wx:if="{{orderInfo.state !== 2}}" class="seal-shot" src="{{resourcesBase + shopInfo.seal}}"> <image wx:if="{{orderInfo.state !== 2}}" class="seal-shot" src="{{resourcesBase + shopInfo.seal}}">
</image> </image>
......
...@@ -32,6 +32,7 @@ Page({ ...@@ -32,6 +32,7 @@ Page({
formPhone: '', formPhone: '',
formIdNum: '', formIdNum: '',
isSubmit: false, isSubmit: false,
isEntryDateEnd: false,
// 购买内容 // 购买内容
buyContent: '', // 商品封面 buyContent: '', // 商品封面
...@@ -411,6 +412,9 @@ Page({ ...@@ -411,6 +412,9 @@ Page({
iconType: 'error', iconType: 'error',
title: '当前报名已结束', title: '当前报名已结束',
}) })
this.setData({
isEntryDateEnd: true
})
} }
let funcDate = [] let funcDate = []
...@@ -470,9 +474,6 @@ Page({ ...@@ -470,9 +474,6 @@ Page({
buyContentCover: funcResponse.cover buyContentCover: funcResponse.cover
}) })
console.log(funcDate)
console.log(this.data.quantityTipNumber, funcEntryId)
// 如果存在场次 id 则重新设置场次信息 // 如果存在场次 id 则重新设置场次信息
if (funcEntryId) { if (funcEntryId) {
let funcDateBegin = '' let funcDateBegin = ''
...@@ -512,10 +513,6 @@ Page({ ...@@ -512,10 +513,6 @@ Page({
onEntryTime: function (event) { onEntryTime: function (event) {
let funcDateIndex = event.detail.value[0] let funcDateIndex = event.detail.value[0]
let funcTimeIndex = event.detail.value[1] let funcTimeIndex = event.detail.value[1]
console.log('entryDate', this.data.entryDate)
console.log('entryDateList', this.data.entryDateList)
console.log('entryDateList', this.data.entryTimeList)
let funcIndex = event.detail.value
let funcStock = this.data.entryDate[funcDateIndex][funcTimeIndex].residue let funcStock = this.data.entryDate[funcDateIndex][funcTimeIndex].residue
this.setData({ this.setData({
entrySelection: this.data.entryDateList[0][funcDateIndex] + ' ' + this.data.entryTimeList[this.data.entryDateIndex][funcTimeIndex], entrySelection: this.data.entryDateList[0][funcDateIndex] + ' ' + this.data.entryTimeList[this.data.entryDateIndex][funcTimeIndex],
...@@ -866,6 +863,14 @@ Page({ ...@@ -866,6 +863,14 @@ Page({
return return
} }
if (this.data.isEntryDateEnd) {
App.ui.showToast({
iconType: 'error',
title: '当前报名已结束',
})
return
}
// 数据校验不通过 // 数据校验不通过
if (!this.inspectData()) return if (!this.inspectData()) return
// 支付正在进行 // 支付正在进行
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
<text class="font_bold_54 color_regular overflow_point_2">{{item.name}}</text> <text class="font_bold_54 color_regular overflow_point_2">{{item.name}}</text>
</view> </view>
</view> </view>
<image class="recent_activities_item_cover" mode="aspectFill" src="{{item.cover}}"></image> <image class="recent_activities_item_cover" mode="aspectFill" src="{{item.banner}}"></image>
</view> </view>
</block> </block>
<view class="recent_activities_item"></view> <view class="recent_activities_item"></view>
...@@ -56,8 +56,8 @@ ...@@ -56,8 +56,8 @@
<!-- 热映影片 --> <!-- 热映影片 -->
<view class="hot_movie"> <view class="hot_movie">
<view class="row cb ac"> <view class="hot_movie_title row cb ac">
<image class="hot_movie_title" src="./image/title-movie.png"></image> <image src="./image/title-movie.png"></image>
<text class="font_normal_26 color_secondary" bindtap="onAllMovie">查看全部</text> <text class="font_normal_26 color_secondary" bindtap="onAllMovie">查看全部</text>
</view> </view>
<swiper class="movie-swiper" next-margin="38rpx" bindchange="swiperMovieChange" wx:if="{{movieList.length > 0}}"> <swiper class="movie-swiper" next-margin="38rpx" bindchange="swiperMovieChange" wx:if="{{movieList.length > 0}}">
......
...@@ -160,6 +160,10 @@ ...@@ -160,6 +160,10 @@
} }
.hot_movie_title { .hot_movie_title {
padding: 0 40rpx;
}
.hot_movie_title > image {
width: 184rpx; width: 184rpx;
height: 44rpx; height: 44rpx;
} }
......
...@@ -2,11 +2,11 @@ let App = getApp() ...@@ -2,11 +2,11 @@ let App = getApp()
Page({ Page({
data: { data: {
resourcesBase: App.globalData.appResourcesBase,
navHeight: 0, navHeight: 0,
classHeight: 0, classHeight: 0,
movieTypeTag: [],
// 请求参数 // 请求参数
queryParams: { queryParams: {
...@@ -23,29 +23,13 @@ Page({ ...@@ -23,29 +23,13 @@ Page({
footerFixed: true, footerFixed: true,
statusActive: 0, statusActive: 0,
statusList: [{ statusList: [
'id': 0, { 'id': 0, 'name': '今日放映' },
'name': '今日放映' { 'id': 1, 'name': '全部热映' },
},
{
'id': 1,
'name': '全部热映'
},
], ],
// 今日热映
movieToday: [], movieToday: [],
//全部热映 movieAll: {}
movieAll: {
movieWeek: {
title: '本周热映',
list: []
},
movieNextWeek: {
title: '下周热映',
list: []
}
}
}, },
onLoad: function() { onLoad: function() {
this.setData({ this.setData({
...@@ -53,9 +37,42 @@ Page({ ...@@ -53,9 +37,42 @@ Page({
classHeight: 60 * wx.getStorageSync('unitProportion') classHeight: 60 * wx.getStorageSync('unitProportion')
}) })
this.setMovieTypeTag()
this.setShowHeight() this.setShowHeight()
this.setFooterLocation() this.setFooterLocation()
},
setMovieTypeTag: function () {
App.request({
url: 'v1/common/getSmTags',
params: {
'types': 1
}
}).then((response) => {
let funcData = response.data
let funcList = []
let funcMovieAll = []
for (let i = 0, l = funcData.length; i < l; i++) {
let funcItem = {
'text': funcData[i].name,
'value': funcData[i].tagId,
}
funcList.push(funcItem)
if (['102', '110', '111','112' ].includes(funcItem.value)) {
funcMovieAll.push({
'text': funcData[i].name,
'value': funcData[i].tagId,
'movieList': []
})
}
}
this.setData({
movieTypeTag: funcList,
movieAll: funcMovieAll,
})
this.getTodayFilm() this.getTodayFilm()
})
}, },
/** /**
...@@ -106,21 +123,17 @@ Page({ ...@@ -106,21 +123,17 @@ Page({
* @returns * @returns
*/ */
getTodayFilm: function() { getTodayFilm: function() {
wx.showLoading({ App.ui.showToast({
title: '加载中...', iconType: 'loading',
success: () => { title: '正在获取',
this.setData({
loading: true
}) })
} App.request({
})
App.wxRequest({
url: 'v1/film/getTodayFilm', url: 'v1/film/getTodayFilm',
data: { params: {
'pageNo': this.data.queryParams.pageNo, 'pageNo': this.data.queryParams.pageNo,
'pageSize': this.data.queryParams.pageSize, 'pageSize': this.data.queryParams.pageSize,
}, }
success: (response) => { }).then((response) => {
let funcResponse = response.data let funcResponse = response.data
let funcList = [] let funcList = []
for (let i = 0, l = funcResponse.list.length; i < l; i++) { for (let i = 0, l = funcResponse.list.length; i < l; i++) {
...@@ -143,7 +156,7 @@ Page({ ...@@ -143,7 +156,7 @@ Page({
'priceDiscount': funcResponse.list[i].price, // 活动价 'priceDiscount': funcResponse.list[i].price, // 活动价
'priceDiscountText': App.modular.utils.formatAmount(funcResponse.list[i].price), 'priceDiscountText': App.modular.utils.formatAmount(funcResponse.list[i].price),
'priceType': 1, 'priceType': 1,
'tags': funcResponse.list[i].tags.replace(/( )?热映影片( )?/, ' ').split(' '), 'tags': this.ignoreMovieTypeTag(['102', '110', '111','112' ]),
} }
let funcUserType = wx.getStorageSync('userInfo').userType let funcUserType = wx.getStorageSync('userInfo').userType
...@@ -159,22 +172,14 @@ Page({ ...@@ -159,22 +172,14 @@ Page({
funcItem.priceType = 3 funcItem.priceType = 3
} }
} }
funcList.push(funcItem) funcList.push(funcItem)
} }
App.ui.hideToast()
this.setData({ this.setData({
movieToday: funcList, movieToday: funcList,
}, function() { }, function() {
this.setFooterLocation() this.setFooterLocation()
}) })
wx.hideLoading({
success: () => {
this.setData({
loading: false
})
},
})
}
}) })
}, },
/** /**
...@@ -184,26 +189,22 @@ Page({ ...@@ -184,26 +189,22 @@ Page({
* @returns * @returns
*/ */
getAllFilm: function() { getAllFilm: function() {
wx.showLoading({ App.ui.showToast({
title: '加载中...', iconType: 'loading',
success: () => { title: '正在获取',
this.setData({
loading: true
})
}
}) })
// weekType: 0本周热映 1下周 // weekType: 0本周热映 1下周
let movieWeek = [] let movieWeek = []
let movieNextWeek = [] let movieNextWeek = []
//本周热映 //本周热映
App.wxRequest({ App.request({
url: 'v1/film/getAllFilm', url: 'v1/film/getAllFilm',
data: { params: {
'pageNo': this.data.queryParams.pageNo, 'pageNo': this.data.queryParams.pageNo,
'pageSize': this.data.queryParams.pageSize, 'pageSize': this.data.queryParams.pageSize,
'weekType': '0' 'weekType': '0'
}, }
success: (response) => { }).then((response) => {
let funcResponse = response.data let funcResponse = response.data
let funcList = [] let funcList = []
for (let i = 0, l = funcResponse.list.length; i < l; i++) { for (let i = 0, l = funcResponse.list.length; i < l; i++) {
...@@ -226,7 +227,7 @@ Page({ ...@@ -226,7 +227,7 @@ Page({
'priceDiscount': funcResponse.list[i].price, // 活动价 'priceDiscount': funcResponse.list[i].price, // 活动价
'priceDiscountText': App.modular.utils.formatAmount(funcResponse.list[i].price), 'priceDiscountText': App.modular.utils.formatAmount(funcResponse.list[i].price),
'priceType': 1, 'priceType': 1,
'tags': funcResponse.list[i].tags.replace(/( )?热映影片( )?/, ' ').split(' '), 'tags': this.ignoreMovieTypeTag(['102', '110', '111','112' ]),
} }
let funcUserType = wx.getStorageSync('userInfo').userType let funcUserType = wx.getStorageSync('userInfo').userType
...@@ -244,6 +245,7 @@ Page({ ...@@ -244,6 +245,7 @@ Page({
} }
funcList.push(funcItem) funcList.push(funcItem)
} }
App.ui.hideToast()
this.setData({ this.setData({
'movieAll.movieWeek': { 'movieAll.movieWeek': {
title: '本周热映', title: '本周热映',
...@@ -252,23 +254,15 @@ Page({ ...@@ -252,23 +254,15 @@ Page({
}, function() { }, function() {
this.setFooterLocation() this.setFooterLocation()
}) })
wx.hideLoading({
success: () => {
this.setData({
loading: false
})
},
})
}
}) })
App.wxRequest({ App.request({
url: 'v1/film/getAllFilm', url: 'v1/film/getAllFilm',
data: { params: {
'pageNo': this.data.queryParams.pageNo, 'pageNo': this.data.queryParams.pageNo,
'pageSize': this.data.queryParams.pageSize, 'pageSize': this.data.queryParams.pageSize,
'weekType': '1' 'weekType': '1'
}, }
success: (response) => { }).then((response) => {
let funcResponse = response.data let funcResponse = response.data
let funcList = [] let funcList = []
for (let i = 0, l = funcResponse.list.length; i < l; i++) { for (let i = 0, l = funcResponse.list.length; i < l; i++) {
...@@ -291,7 +285,7 @@ Page({ ...@@ -291,7 +285,7 @@ Page({
'priceDiscount': funcResponse.list[i].price, // 活动价 'priceDiscount': funcResponse.list[i].price, // 活动价
'priceDiscountText': App.modular.utils.formatAmount(funcResponse.list[i].price), 'priceDiscountText': App.modular.utils.formatAmount(funcResponse.list[i].price),
'priceType': 1, 'priceType': 1,
'tags': funcResponse.list[i].tags.replace(/( )?热映影片( )?/, ' ').split(' '), 'tags': this.ignoreMovieTypeTag(['102', '110', '111','112' ])
} }
let funcUserType = wx.getStorageSync('userInfo').userType let funcUserType = wx.getStorageSync('userInfo').userType
...@@ -309,6 +303,7 @@ Page({ ...@@ -309,6 +303,7 @@ Page({
} }
funcList.push(funcItem) funcList.push(funcItem)
} }
App.ui.hideToast()
this.setData({ this.setData({
'movieAll.movieNextWeek': { 'movieAll.movieNextWeek': {
title: '下周热映', title: '下周热映',
...@@ -317,17 +312,18 @@ Page({ ...@@ -317,17 +312,18 @@ Page({
}, function() { }, function() {
this.setFooterLocation() this.setFooterLocation()
}) })
wx.hideLoading({
success: () => {
this.setData({
loading: false
}) })
}, },
})
}
})
ignoreMovieTypeTag: function (funcIgnoreTag) {
let funcRemainTag = []
let funcMovieTypeTag = this.data.movieTypeTag
for (let i = 0, l = funcMovieTypeTag.length; i < l; i++) {
if (!funcIgnoreTag.includes(funcMovieTypeTag[i].value)) funcRemainTag.push(funcMovieTypeTag[i].text)
}
return funcRemainTag
}, },
// 切换今日放映 全部热映 // 切换今日放映 全部热映
onSelectionStatus: function(event) { onSelectionStatus: function(event) {
let statusActive = Number(event.currentTarget.dataset.type) let statusActive = Number(event.currentTarget.dataset.type)
...@@ -350,8 +346,6 @@ Page({ ...@@ -350,8 +346,6 @@ Page({
// 跳转到报名页面 // 跳转到报名页面
onReportMovie: function(event) { onReportMovie: function(event) {
let funcItem = event.currentTarget.dataset.item let funcItem = event.currentTarget.dataset.item
console.log(funcItem)
let funcMovieInfo = { let funcMovieInfo = {
'id': funcItem.id, // 活动 id 'id': funcItem.id, // 活动 id
'name': funcItem.filmName, // 电影名称 'name': funcItem.filmName, // 电影名称
......
<m-toast></m-toast>
<m-nav titleText="所有影片" scrollHeight="{{navScroll}}" changeHeight="50rpx" styleIndex="{{7}}"></m-nav> <m-nav titleText="所有影片" scrollHeight="{{navScroll}}" changeHeight="50rpx" styleIndex="{{7}}"></m-nav>
<view class="status row align-c" style="{{'top: ' + navHeight + 'px'}}"> <view class="status row align-c" style="{{'top: ' + navHeight + 'px'}}">
...@@ -12,7 +13,7 @@ ...@@ -12,7 +13,7 @@
<view id="page" class="contaniner con-s" style="{{'margin-top: ' + (navHeight + classHeight) + 'px;'}}"> <view id="page" class="contaniner con-s" style="{{'margin-top: ' + (navHeight + classHeight) + 'px;'}}">
<view wx:if="{{statusActive === 0}}"> <view wx:if="{{statusActive === 0}}">
<block wx:for="{{movieToday}}" wx:key="index" wx:if="{{movieToday.length !== 0}}"> <block wx:for="{{movieToday}}" wx:for-index="index" wx:for-item="item" wx:key="index" wx:if="{{movieToday.length !== 0}}">
<view class="movie-wrapper row" bindtap="onToMovieDetail" data-movieId="{{item.activityId}}"> <view class="movie-wrapper row" bindtap="onToMovieDetail" data-movieId="{{item.activityId}}">
<view class="movie-time-wrapper row align-c"> <view class="movie-time-wrapper row align-c">
<view class="movie-time-start"> <view class="movie-time-start">
...@@ -28,13 +29,11 @@ ...@@ -28,13 +29,11 @@
<image src="{{item.cover}}"></image> <image src="{{item.cover}}"></image>
</view> </view>
<view class="movie-info-wrapper"> <view class="movie-info-wrapper">
<view class="movie-name-wrapper row align-c"> <view class="movie-name-wrapper row ac">
<view class="movie-name"> <text class="movie-name">{{item.filmName}}</text>
<text>{{item.filmName}}</text> <block wx:for="{{item.tags}}" wx:for-index="indexTags" wx:for-item="itemTags" wx:key="indexTags">
</view> <text class="movie-tags">{{itemTags}}</text>
<view class="movie-tags row"> </block>
<text wx:if="{{item.tags[0]}}">{{item.tags[0]}}</text>
</view>
</view> </view>
<view class="movie-info row"> <view class="movie-info row">
<view class="movie-info-left"> <view class="movie-info-left">
...@@ -99,19 +98,17 @@ ...@@ -99,19 +98,17 @@
</view> </view>
<view class="line"></view> <view class="line"></view>
</view> </view>
<block wx:for="{{movieList.list}}" wx:key="index" wx:for-index="index"> <block wx:for="{{movieList.list}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="all-movie-wrapper" bindtap="onToMovieDetail" data-movieId="{{item.activityId}}"> <view class="all-movie-wrapper" bindtap="onToMovieDetail" data-movieId="{{item.activityId}}">
<view class="all-movie-cover"> <view class="all-movie-cover">
<image src="{{item.cover}}"></image> <image src="{{item.cover}}"></image>
</view> </view>
<view class="movie-info-wrapper"> <view class="movie-info-wrapper">
<view class="movie-name-wrapper row align-c"> <view class="movie-name-wrapper row ac">
<view class="movie-name"> <text class="movie-name">{{item.filmName}}</text>
<text>{{item.filmName}}</text> <block wx:for="{{item.tags}}" wx:for-index="indexTags" wx:for-item="itemTags" wx:key="indexTags">
</view> <text class="movie-tags">{{itemTags}}</text>
<view class="movie-tags row"> </block>
<text wx:if="{{item.tags[0]}}">{{item.tags[0]}}</text>
</view>
</view> </view>
<view class="movie-info row"> <view class="movie-info row">
<view class="movie-info-left"> <view class="movie-info-left">
......
...@@ -66,31 +66,34 @@ page { ...@@ -66,31 +66,34 @@ page {
height: 20rpx; height: 20rpx;
} }
.movie-cover { .movie-cover > image {
width: 206rpx; width: 206rpx;
height: 302rpx; height: 302rpx;
border-radius: 4rpx; border-radius: 4rpx;
background-color: #fff;
} }
.movie-info-wrapper { .movie-info-wrapper {
margin-left: 34rpx; margin-left: 34rpx;
} }
.movie-name-wrapper { .movie-name-wrapper {
height: 52rpx; height: 40rpx;
margin: 0 0 12rpx 0;
overflow: hidden;
flex-wrap: wrap;
} }
.movie-name { .movie-name {
display: inline-block;
max-width: 240rpx; max-width: 240rpx;
color: #fff; color: #fff;
font-size: 30rpx; font-size: 30rpx;
overflow:hidden; overflow:hidden;
text-overflow:ellipsis; text-overflow: ellipsis;
white-space:nowrap; white-space: nowrap;
} }
.movie-tags { .movie-tags {
display: inline-block;
height: 32rpx; height: 32rpx;
line-height: 32rpx;
}
.movie-tags text {
margin-left: 12rpx; margin-left: 12rpx;
padding: 2rpx 13rpx; padding: 2rpx 13rpx;
color: #fff !important; color: #fff !important;
......
...@@ -76,7 +76,7 @@ Page({ ...@@ -76,7 +76,7 @@ Page({
break break
case 2: case 2:
// this.queryMovie() this.queryMovie()
this.setData({ this.setData({
cssDetail: 'padding-bottom: 0;', cssDetail: 'padding-bottom: 0;',
}) })
...@@ -294,10 +294,11 @@ Page({ ...@@ -294,10 +294,11 @@ Page({
}] }]
// 查询景点信息 // 查询景点信息
App.wxRequest({ App.request({
url: 'v1/park/getList', url: 'v1/park/getList',
success: (res) => { }).then((response) => {
let funcData = res.list console.log(response)
let funcData = response.data
funcDetail.forEach(shop => { funcDetail.forEach(shop => {
funcData.forEach(item => { funcData.forEach(item => {
if (shop.id === item.id) { if (shop.id === item.id) {
...@@ -321,7 +322,6 @@ Page({ ...@@ -321,7 +322,6 @@ Page({
contact: funcDetail[funcIndex].contact, contact: funcDetail[funcIndex].contact,
}, },
}) })
}
}) })
// 读取预设信息,banner 图片等等 // 读取预设信息,banner 图片等等
......
...@@ -422,14 +422,13 @@ ...@@ -422,14 +422,13 @@
</view> </view>
</view> </view>
<!-- 评论隐藏样式 --> <!-- 评论 -->
<view class="evaluate-item-content" wx:if="{{!item.isDetail}}"> <view class="{{!item.isDetail ? 'evaluate-item-content' : 'evaluate-item-content-whole'}}" hidden="{{!item.content}}">
<view> <text class="evaluate-item-content-mark" style="color: #FFFFFF;">{{item.content}}</text>
<text class="evaluate-item-content-mark" style="color: #FFFFFF">{{item.content}}</text>
</view>
<view wx:if="{{item.isMore}}" class="evaluate-item-content-more row con-e align-e" style="background: #1C1C25;" data-item="{{item}}" data-index="{{index}}" bindtap="onEvaluateMore">
<text>全文</text>
</view> </view>
<view wx:if="{{!item.isDetail && item.isMore && item.content}}" class="evaluate-item-content-more row ac" data-item="{{item}}" data-index="{{index}}" bindtap="onEvaluateMore">
<text style="color: #FFFFFF;">全文</text>
</view> </view>
<!-- 评论展开样式 --> <!-- 评论展开样式 -->
......
/** /**
* 代码编写规范 - js - 变量命名 * 代码编写规范 - js - 变量命名
* is,状态类变量,通常数值为布尔类型。例如用户登录状态,isSignIn。 * is,状态类变量,通常数值为布尔类型。例如用户登录状态,isSignIn。
* win,窗口显隐控制,通常数值为布尔类型。例如 winToast,winDialog。 * view,窗口显隐控制,通常数值为布尔类型。例如 viewToast,viewDialog。
* func,函数内部变量前缀。 * func,函数内部变量前缀。
* *
* 代码编写规范 - js - 变量命名禁忌 * 代码编写规范 - js - 变量命名禁忌
...@@ -40,3 +40,5 @@ ...@@ -40,3 +40,5 @@
* 逻辑事件函数,所有不是用户触发的事件,比如 swiper 组件 bindchange 事件 * 逻辑事件函数,所有不是用户触发的事件,比如 swiper 组件 bindchange 事件
* }) * })
*/ */
\ No newline at end of file
function inspectEventFormat (eventObject) {
if (!eventObject.type && eventObject.type !== '') {
console.error('[extend api] event.type is not define')
return false
}
let funcEventTypeEnumeration = ['', 'onLoad', 'onShow', 'onReload']
if (!funcEventTypeEnumeration.includes(eventObject.type)) {
console.error('[extend api] event.type only allow ' + funcEventType.join())
return false
}
return true
}
function emit (wxObject) {
let funcRedefinition = function (object) {
console.log('[extend api] emit', object)
if (object && object.event && inspectEventFormat(object.event)) {
if (!object.event.receivePage) {
console.error('[extend api] emit.receivePage is not define', object)
return
}
let funcPageList = getCurrentPages()
console.log(funcPageList)
let funcReceivePagePath = object.event.receivePage
if (funcPageList.length > 1) {
for (let i = funcPageList.length - 1; 0 <= i; i--) {
if (funcPageList[i].route === funcReceivePagePath) {
funcPageList[i].onCatchNewEvent(object.event)
if (typeof funcPageList[i][object.event.type] === 'function' ) funcPageList[i][object.event.type]()
break
}
}
}
}
}
Object.defineProperty(wxObject, 'emit', {
value : (object) => { funcRedefinition(object) },
writable : true,
enumerable : true,
configurable : true
})
}
function navigateBack (wxObject) {
let funcOriginal = wx.navigateBack
let funcRedefinition = function (object) {
console.log('[extend api] navigateBack', object)
if (object && object.event && inspectEventFormat(object.event)) {
let funcPageList = getCurrentPages()
let funcReceivePagePath = object.event.receivePage ? object.event.receivePage : funcPageList[funcPageList.length - 1].route
if (funcPageList.length > 1) {
for (let i = funcPageList.length - 1; 0 <= i; i--) {
if (funcPageList[i].route === funcReceivePagePath) {
funcPageList[i].onCatchNewEvent(object.event)
if (typeof funcPageList[i][object.event.type] === 'function' ) funcPageList[i][object.event.type]()
break
}
}
}
}
funcOriginal(object)
}
Object.defineProperty(wxObject, 'navigateBack', {
value : (object) => { funcRedefinition(object) },
writable : true,
enumerable : true,
configurable : true
})
}
let funcApiExtend = function (wxObject) {
// 自定义拓展函数
emit(wxObject)
// 原生函数增强
navigateBack(wxObject)
}
export default funcApiExtend
\ No newline at end of file
let funcPageExtend = function (App) { let funcPageExtend = function (App) {
let funcPage = Page let funcPage = Page
Page = function (funcOption) { Page = function (funPage) {
const { onLoad, onShow, onHide, onCatchNewEvent, onShareAppMessage } = funPage
// 页面全局变量初始化。 // 页面全局变量初始化。
funcOption.data = Object.assign(funcOption.data, { funPage.data = Object.assign(funPage.data, {
'imageBase': App.globalData.appImageBase, 'imageBase': App.globalData.appImageBase,
'resourcesBase': App.globalData.appResourcesBase, 'resourcesBase': App.globalData.appResourcesBase,
'isViewDataReady': false, // 视图显示控制,当页面数据请求到位时设置为 true ,以显示视图。避免请求过程中页面显示不完整问题。 'isViewDataReady': false, // 视图显示控制,当页面数据请求到位时设置为 true ,以显示视图。避免请求过程中页面显示不完整问题。
}) })
// 捕获发送给当前页面的待处理事件
funPage.onCatchNewEvent = function (event) {
if (typeof onCatchNewEvent === 'function') {
onCatchNewEvent.call(this, event)
}
}
// 增加全局分享 // 增加全局分享
funcOption.onShareAppMessage = function () { funPage.onShareAppMessage = function () {
if (typeof onShareAppMessage === 'function') {
onShareAppMessage.call(this)
} else {
return { return {
title: '碧海银湖 | 理想生活', title: '碧海银湖 | 理想生活',
path: '/pages/home/home/home', path: '/pages/home/home/home',
imageUrl: App.globalData.appImageBase + 'share.png', imageUrl: App.globalData.appImageBase + 'share.png',
} }
} }
funcPage(funcOption) }
funcPage(funPage)
} }
} }
......
...@@ -48,7 +48,6 @@ let Output = { ...@@ -48,7 +48,6 @@ let Output = {
console.log('request:fail - 2') console.log('request:fail - 2')
return false return false
} }
// 请求正常 // 请求正常
// 此处可以根据后台返回数据,格式化返回数据。 // 此处可以根据后台返回数据,格式化返回数据。
if (funcResponse.statusCode === 200) { if (funcResponse.statusCode === 200) {
...@@ -58,26 +57,25 @@ let Output = { ...@@ -58,26 +57,25 @@ let Output = {
break break
case 200: case 200:
if (funcResponse.data.data) { if (funcResponse.data.list) {
return { return {
success: true, success: true,
response: { response: {
code: funcResponse.data.code, code: funcResponse.data.code,
data: funcResponse.data.data, data: funcResponse.data.list,
message: funcResponse.data.msg message: funcResponse.data.msg
} }
} }
} }
if (funcResponse.data.list) {
return { return {
success: true, success: true,
response: { response: {
code: funcResponse.data.code, code: funcResponse.data.code,
data: funcResponse.data.list, data: funcResponse.data.data ? funcResponse.data.data : {},
message: funcResponse.data.msg message: funcResponse.data.msg
} }
} }
}
break break
case 402: case 402:
......
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