Commit 38d785c8 by 严立

LL - bug 修改

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