Commit 0912b5b9 by 严立

LL - 增加全局界面隐藏功能

parent da21f560
...@@ -13,6 +13,7 @@ App({ ...@@ -13,6 +13,7 @@ App({
}, },
globalData: { globalData: {
appStatus: false,
test:'999', test:'999',
appImageBase: '../../../image/', appImageBase: '../../../image/',
appResourcesBase: 'https://sm-web.meiqicloud.com/userfiles/appResourcesS2/', appResourcesBase: 'https://sm-web.meiqicloud.com/userfiles/appResourcesS2/',
...@@ -33,6 +34,7 @@ App({ ...@@ -33,6 +34,7 @@ App({
onLaunch: function () { onLaunch: function () {
this.setUnitProportion() this.setUnitProportion()
this.setAppStatus()
this.login() this.login()
}, },
...@@ -43,11 +45,38 @@ App({ ...@@ -43,11 +45,38 @@ App({
this.queryUserStatus() this.queryUserStatus()
}, },
setAppStatus: function () {
this.wxRequest({
url: '/api/v1/common/getDictByType',
method: 'POST',
data: {
'type': 'is_open'
},
success: (response) => {
let funcResponse = response.data
this.globalData.appStatus = Boolean(Number(funcResponse[0].value))
console.log(this.globalData.appStatus)
}
})
},
/**
* 设置设备像素比
* @function
* @param
* @returns
*/
setUnitProportion: function () { setUnitProportion: function () {
let funcProportion = wx.getSystemInfoSync().windowWidth / 750 let funcProportion = wx.getSystemInfoSync().windowWidth / 750
wx.setStorageSync('unitProportion', funcProportion) wx.setStorageSync('unitProportion', funcProportion)
}, },
/**
* css 样式对象转换 css 字符串
* @function
* @param
* @returns
*/
cssObjectToCssString: function (funcCssObject) { cssObjectToCssString: function (funcCssObject) {
let funcCss = '' let funcCss = ''
let funcObjectKey = Object.keys(funcCssObject) let funcObjectKey = Object.keys(funcCssObject)
...@@ -57,6 +86,12 @@ App({ ...@@ -57,6 +86,12 @@ App({
return funcCss return funcCss
}, },
/**
* 请求封装
* @function
* @param {object} - 请求参数
* @returns
*/
wxRequest: function (obj) { wxRequest: function (obj) {
var token = this.globalData.token var token = this.globalData.token
var param = obj.data ? JSON.stringify(obj.data) : '' var param = obj.data ? JSON.stringify(obj.data) : ''
...@@ -240,8 +275,6 @@ App({ ...@@ -240,8 +275,6 @@ App({
funcUserInfo.userType = 0 funcUserInfo.userType = 0
break break
} }
funcUserInfo.userType = 0
wx.setStorageSync('userInfo', funcUserInfo) wx.setStorageSync('userInfo', funcUserInfo)
// 如果用户身份有更新,则自动跳转到首页 // 如果用户身份有更新,则自动跳转到首页
......
...@@ -7,8 +7,10 @@ let logicData = { ...@@ -7,8 +7,10 @@ let logicData = {
Page({ Page({
data: { data: {
appStatus: App.globalData.appStatus,
imageBase: App.globalData.appImageBase, imageBase: App.globalData.appImageBase,
appResourcesBase: App.globalData.appResourcesBase, appResourcesBase: App.globalData.appResourcesBase,
showPopup: false, showPopup: false,
winSide: true, winSide: true,
sideHeight: 1250, sideHeight: 1250,
......
...@@ -66,29 +66,31 @@ ...@@ -66,29 +66,31 @@
</view> </view>
</view> </view>
<!-- 饮品预订 文创周边--> <block wx:if="{{appStatus}}">
<view class="buy-other row con-b"> <!-- 饮品预订 文创周边-->
<!-- 饮品预订 --> <view class="buy-other row con-b">
<view class="buy-snacks row" bindtap="onBuySnacks" data-id="{{3}}"> <!-- 饮品预订 -->
<view class="buy-left col con-c"> <view class="buy-snacks row" bindtap="onBuySnacks" data-id="{{3}}">
<image src="./image/yinpinyuding.png"></image> <view class="buy-left col con-c">
<image src="./image/yinpinyuding.png"></image>
</view>
<view class="buy-right col con-c">
<image src="./image/icon-bg.png"></image>
<image class="snacks-img" src="./image/yinpin.png"></image>
</view>
</view> </view>
<view class="buy-right col con-c"> <!-- 文创周边 -->
<image src="./image/icon-bg.png"></image> <view class="buy-art row" bindtap="onBuyArt" data-id="{{3}}">
<image class="snacks-img" src="./image/yinpin.png"></image> <view class="buy-left col con-c">
<image src="./image/wenchuangzhoubian.png"></image>
</view>
<view class="buy-right col con-c">
<image src="./image/icon-bg.png"></image>
<image class="art-img" src="./image/shanzi.png"></image>
</view>
</view> </view>
</view> </view>
<!-- 文创周边 --> </block>
<view class="buy-art row" bindtap="onBuyArt" data-id="{{3}}">
<view class="buy-left col con-c">
<image src="./image/wenchuangzhoubian.png"></image>
</view>
<view class="buy-right col con-c">
<image src="./image/icon-bg.png"></image>
<image class="art-img" src="./image/shanzi.png"></image>
</view>
</view>
</view>
<!-- 全部活动 --> <!-- 全部活动 -->
<view class="activity" bindtap="onActivityAll"> <view class="activity" bindtap="onActivityAll">
......
...@@ -2,6 +2,7 @@ const App = getApp() ...@@ -2,6 +2,7 @@ const App = getApp()
Page({ Page({
data: { data: {
appStatus: App.globalData.appStatus,
imageBase: App.globalData.appImageBase, imageBase: App.globalData.appImageBase,
resourcesBase: App.globalData.appResourcesBase, resourcesBase: App.globalData.appResourcesBase,
......
...@@ -314,7 +314,7 @@ Page({ ...@@ -314,7 +314,7 @@ Page({
// 获取商品分类高度,用于判断滚动位置自动选择标签 // 获取商品分类高度,用于判断滚动位置自动选择标签
const funcQuery = wx.createSelectorQuery() const funcQuery = wx.createSelectorQuery()
funcQuery.selectAll('.right-content-title').boundingClientRect() funcQuery.selectAll('.menu-list-title').boundingClientRect()
funcQuery.exec((response) => { funcQuery.exec((response) => {
let funcElement = response[0] let funcElement = response[0]
let funcSideBarHeight = [] let funcSideBarHeight = []
...@@ -326,6 +326,8 @@ Page({ ...@@ -326,6 +326,8 @@ Page({
this.setData({ this.setData({
sideBarHeight: funcSideBarHeight sideBarHeight: funcSideBarHeight
}) })
console.log(funcSideBarHeight)
}) })
this.setCommodityDetail() this.setCommodityDetail()
......
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
<!-- 商品列表 --> <!-- 商品列表 -->
<scroll-view class="menu-list" scroll-y style="{{'padding-top: ' + sideBarTopPadding + 'px;'}}" scroll-top="{{commoditScroll}}" bindscroll="onCommoditScroll"> <scroll-view class="menu-list" scroll-y style="{{'padding-top: ' + sideBarTopPadding + 'px;'}}" scroll-top="{{commoditScroll}}" bindscroll="onCommoditScroll">
<block wx:for="{{commodityList}}" wx:for-index="index" wx:for-item="item" wx:key="index"> <block wx:for="{{commodityList}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<!-- 此处类名关联 js 逻辑标签高度判定,需要统一修改 -->
<view class="menu-list-title">{{item.tab}}</view> <view class="menu-list-title">{{item.tab}}</view>
<!-- 循环商品列表 --> <!-- 循环商品列表 -->
......
...@@ -8,6 +8,7 @@ let logicData = { ...@@ -8,6 +8,7 @@ let logicData = {
Page({ Page({
data: { data: {
appStatus: App.globalData.appStatus,
imageBase: App.globalData.appImageBase, imageBase: App.globalData.appImageBase,
resourcesBase: App.globalData.appResourcesBase, resourcesBase: App.globalData.appResourcesBase,
...@@ -225,6 +226,17 @@ Page({ ...@@ -225,6 +226,17 @@ Page({
}, },
onPointDetail: function () { onPointDetail: function () {
console.log(this.data.pointDetail)
// 临时屏蔽门店
if (!this.data.appStatus) {
if (this.data.pointDetail === 'guide/card/02.png') return
if (this.data.pointDetail === 'guide/card/03.png') return
if (this.data.pointDetail === 'guide/card/04.png') return
if (this.data.pointDetail === 'guide/card/06.png') return
if (this.data.pointDetail === 'guide/card/07.png') return
if (this.data.pointDetail === 'guide/card/08.png') return
if (this.data.pointDetail === 'guide/card/13.png') return
}
// 当从景点详情进入屏蔽该功能 // 当从景点详情进入屏蔽该功能
if (logicData.option.id) return if (logicData.option.id) return
......
...@@ -4,14 +4,25 @@ const App = getApp() ...@@ -4,14 +4,25 @@ const App = getApp()
Page({ Page({
data: { data: {
imageBase: App.globalData.appImageBase, imageBase: App.globalData.appImageBase,
animation: {},
passListType: 1, // 0为单张卡 1为多张卡 passListType: 1, // 0为单张卡 1为多张卡
privateStatus: true, privateStatus: true,
swiperCurrent: 0, swiperCurrent: 0,
shopConfig: App.globalData.shopId, shopConfig: App.globalData.shopId,
imageResourcesBase: App.globalData.appResourcesBase, imageResourcesBase: App.globalData.appResourcesBase,
passList: [] passList: [],
noticeDetail: '',
winNoticeDetail: false,
}, },
onLoad: function (options) { onLoad: function (options) {
this.animation = wx.createAnimation({
duration: 700,
timingFunction: 'ease'
})
this.getCardList() this.getCardList()
}, },
// 跳转订单详情 // 跳转订单详情
...@@ -36,7 +47,7 @@ Page({ ...@@ -36,7 +47,7 @@ Page({
}, },
//获取卡数据 //获取卡数据
getCardList() { getCardList: function () {
let that = this let that = this
wx.showLoading({ wx.showLoading({
title: '加载中', title: '加载中',
...@@ -44,7 +55,7 @@ Page({ ...@@ -44,7 +55,7 @@ Page({
App.wxRequest({ App.wxRequest({
url: '/api/v1/volume/getVolumeList', url: '/api/v1/volume/getVolumeList',
data: { data: {
status: "", //0已过期1待使用2已使用(""全部) status: '', //0已过期1待使用2已使用(""全部)
pageNo: 1, pageNo: 1,
pageSize: -1 pageSize: -1
}, },
...@@ -180,5 +191,53 @@ Page({ ...@@ -180,5 +191,53 @@ Page({
[passList]: !this.data.passList[index].privateStatus [passList]: !this.data.passList[index].privateStatus
}) })
} },
// 使用须知
onNotice: function (event) {
// 初始底部弹出动画
let funcUnitProportion = wx.getStorageSync('unitProportion')
let funcMoveHeight = funcUnitProportion * 950
this.animation.translate(0, 0)
this.setData({
winNoticeDetail: true,
animation: this.animation.export()
})
let funcTimer = setTimeout(() => {
this.animation.translate(0, -funcMoveHeight).step()
this.setData({
animation: this.animation.export()
})
clearTimeout(funcTimer)
}, 100)
let funcItem = event.currentTarget.dataset.item
App.wxRequest({
url: '/api/v1/order/getOrderDetail',
data: {
'orderId': funcItem.orderId
},
success: (response) => {
this.setData({
noticeDetail: response.data.particulars,
winNoticeDetail: true
})
}
})
},
/**
* 关闭须知详情
* @function
* @param
* @returns
*/
onNoticeClose: function () {
this.setData({
winNoticeDetail: false
})
},
}) })
\ No newline at end of file
...@@ -4,13 +4,11 @@ ...@@ -4,13 +4,11 @@
<!-- 单张卡 --> <!-- 单张卡 -->
<view class="card-wrapper" wx:if="{{passList.length == 1}}"> <view class="card-wrapper" wx:if="{{passList.length == 1}}">
<view class="card-header"> <view class="card-header">
<image wx:if="{{passList[0].cardType==1}}" class="card-bg year-bg" <image wx:if="{{passList[0].cardType==1}}" class="card-bg year-bg" src="{{imageResourcesBase +'pay/order-input/card-1.png'}}"></image>
src="{{imageResourcesBase +'pay/order-input/card-1.png'}}"></image> <image wx:elif="{{passList[0].cardType==2}}" class="card-bg year-bg" src="{{imageResourcesBase +'pay/order-input/card-2.png'}}"></image>
<image wx:elif="{{passList[0].cardType==2}}" class="card-bg year-bg"
src="{{imageResourcesBase +'pay/order-input/card-2.png'}}"></image>
<image wx:else class="card-bg month-bg" src="{{imageResourcesBase +'pay/order-input/card-3.png'}}"> <image wx:else class="card-bg month-bg" src="{{imageResourcesBase +'pay/order-input/card-3.png'}}">
</image> </image>
<view class="use-notice row align-c"> <view class="use-notice row align-c" data-item="{{passList[0]}}" bindtap="onNotice">
<text>使用须知</text> <text>使用须知</text>
<image src="{{imageBase + 'icon/arrow-r-2.png'}}"></image> <image src="{{imageBase + 'icon/arrow-r-2.png'}}"></image>
</view> </view>
...@@ -77,21 +75,16 @@ ...@@ -77,21 +75,16 @@
</view> </view>
<!-- 多张卡 --> <!-- 多张卡 -->
<swiper class="card-list" wx:else indicator-dots indicator-color="#fff" indicator-active-color="#E57C99" <swiper class="card-list" wx:else indicator-dots indicator-color="#fff" indicator-active-color="#E57C99" next-margin="44rpx" bindchange="eventSwiperChange">
next-margin="44rpx" bindchange="eventSwiperChange">
<block wx:for="{{passList}}" wx:key="id"> <block wx:for="{{passList}}" wx:key="id">
<swiper-item> <swiper-item>
<view <view class="card-wrapper {{index === swiperCurrent ? 'item-right' : ''}} {{swiperCurrent === passList.length-1 ? 'item-center' : ''}}">
class="card-wrapper {{index === swiperCurrent ? 'item-right' : ''}} {{swiperCurrent === passList.length-1 ? 'item-center' : ''}}">
<view class="card-header"> <view class="card-header">
<image wx:if="{{item.cardType==1}}" class="card-bg year-bg" <image wx:if="{{item.cardType==1}}" class="card-bg year-bg" src="{{imageResourcesBase +'pay/order-input/card-1.png'}}"></image>
src="{{imageResourcesBase +'pay/order-input/card-1.png'}}"></image> <image wx:elif="{{item.cardType==2}}" class="card-bg year-bg" src="{{imageResourcesBase +'pay/order-input/card-2.png'}}"></image>
<image wx:elif="{{item.cardType==2}}" class="card-bg year-bg" <image wx:else class="card-bg month-bg" src="{{imageResourcesBase +'pay/order-input/card-3.png'}}">
src="{{imageResourcesBase +'pay/order-input/card-2.png'}}"></image>
<image wx:else class="card-bg month-bg"
src="{{imageResourcesBase +'pay/order-input/card-3.png'}}">
</image> </image>
<view class="use-notice row align-c"> <view class="use-notice row align-c" data-item="{{item}}" bindtap="onNotice">
<text>使用须知</text> <text>使用须知</text>
<image src="{{imageBase + 'icon/arrow-r-2.png'}}"></image> <image src="{{imageBase + 'icon/arrow-r-2.png'}}"></image>
</view> </view>
...@@ -162,4 +155,16 @@ ...@@ -162,4 +155,16 @@
</swiper-item> </swiper-item>
</block> </block>
</swiper> </swiper>
</view>
<!-- 须知详情 -->
<view class="notice-detail" wx:if="{{winNoticeDetail}}" bindtap="onNoticeClose">
<view class="notice-item" animation="{{animation}}">
<view class="notice-title">
<text>使用须知</text>
</view>
<view class="notice-rich">
<rich-text nodes="{{noticeDetail}}"></rich-text>
</view>
</view>
</view> </view>
\ No newline at end of file
.container { .container {
height: 100vh; height: 100vh;
padding-top: 232rpx; padding-top: 232rpx;
background: linear-gradient(180deg, #FFFCFC 0%, #F6DADA 100%); background: linear-gradient(180deg, #fffcfc 0%, #f6dada 100%);
} }
.card-bg { .card-bg {
position: absolute; position: absolute;
left: 0; left: 0;
top: 0; top: 0;
z-index: -1; z-index: -1;
} }
.card-list { .card-list {
width: 750rpx; width: 750rpx;
height: 1062rpx; height: 1062rpx;
} }
.card-wrapper { .card-wrapper {
width: 626rpx; width: 626rpx;
height: 992rpx; height: 992rpx;
} }
.item-right { .item-right {
margin: 0 40rpx; margin: 0 40rpx;
} }
.item-center { .item-center {
margin-left: 62rpx; margin-left: 62rpx;
} }
...@@ -33,34 +38,41 @@ ...@@ -33,34 +38,41 @@
border-radius: 4rpx; border-radius: 4rpx;
z-index: 0; z-index: 0;
} }
.use-notice { .use-notice {
position: absolute; position: absolute;
top: 61rpx; top: 61rpx;
right: 34rpx; right: 34rpx;
font-size: 26rpx; font-size: 26rpx;
} }
.use-notice image { .use-notice image {
width: 32rpx; width: 32rpx;
height: 32rpx; height: 32rpx;
} }
.card-header-title { .card-header-title {
font-size: 42rpx; font-size: 42rpx;
font-weight: 600; font-weight: 600;
} }
.card-header-info { .card-header-info {
margin-top: 23rpx; margin-top: 23rpx;
font-size: 26rpx; font-size: 26rpx;
} }
.card-header-info-left { .card-header-info-left {
width: 104rpx; width: 104rpx;
height: 52rpx; height: 52rpx;
line-height: 52rpx; line-height: 52rpx;
} }
.card-header-info-right { .card-header-info-right {
margin-left: 24rpx; margin-left: 24rpx;
height: 52rpx; height: 52rpx;
line-height: 52rpx; line-height: 52rpx;
} }
.card-info-visible { .card-info-visible {
width: 40rpx; width: 40rpx;
height: 40rpx; height: 40rpx;
...@@ -73,47 +85,99 @@ ...@@ -73,47 +85,99 @@
background-color: #fff; background-color: #fff;
border-radius: 0 0 4rpx 4rpx; border-radius: 0 0 4rpx 4rpx;
} }
.code-num-wrapper { .code-num-wrapper {
margin-top: 57rpx; margin-top: 57rpx;
} }
.code-num-title { .code-num-title {
color: #959DA9; color: #959da9;
font-size: 26rpx; font-size: 26rpx;
line-height: 36rpx; line-height: 36rpx;
font-weight: 600; font-weight: 600;
} }
.code-num { .code-num {
color: #15191F; color: #15191f;
font-size: 30rpx; font-size: 30rpx;
line-height: 42rpx; line-height: 42rpx;
} }
.code-copy { .code-copy {
margin-left: 24rpx; margin-left: 24rpx;
color: #86C5E1; color: #86c5e1;
font-size: 26rpx; font-size: 26rpx;
font-weight: 600; font-weight: 600;
line-height: 36rpx; line-height: 36rpx;
} }
.QRcode { .QRcode {
width: 296rpx; width: 296rpx;
height: 296rpx; height: 296rpx;
margin: 57rpx 0; margin: 57rpx 0;
background-color: #ccc; background-color: #ccc;
} }
.code-use-time { .code-use-time {
color: #959DA9; color: #959da9;
font-size: 26rpx; font-size: 26rpx;
} }
.look-order { .look-order {
margin-top: 32rpx; margin-top: 32rpx;
} }
.look-order image{
.look-order image {
margin-left: 8rpx; margin-left: 8rpx;
width: 32rpx; width: 32rpx;
height: 32rpx; height: 32rpx;
} }
image { image {
width: 100%; width: 100%;
height: 100%; height: 100%;
}
/* 使用须知 */
.notice-detail {
z-index: 1700;
position: fixed;
left: 0;
bottom: 0;
width: 750rpx;
height: 100%;
padding-bottom: 48rpx;
background: rgba(0, 0, 0, .6);
}
.notice-item {
position: absolute;
left: 0;
bottom: -950rpx;
width: 750rpx;
height: 70%;
padding: 130rpx 40rpx 50rpx 40rpx;
border-radius: 24px 24px 0px 0px;
background: #FFFFFF;
}
.notice-title {
position: absolute;
top: 50rpx;
width: 670rpx;
height: 130rpx;
}
.notice-title text {
height: 58rpx;
font-size: 42rpx;
font-weight: 500;
line-height: 58rpx;
color: #15191F;
}
.notice-rich {
width: 670rpx;
height: 100%;
overflow-y: scroll;
} }
\ No newline at end of file
...@@ -21,6 +21,8 @@ Page({ ...@@ -21,6 +21,8 @@ Page({
}, },
navigationScroll: 0, navigationScroll: 0,
appStatus: App.globalData.appStatus,
isCheckPermission: false, isCheckPermission: false,
imageBase: App.globalData.appImageBase, imageBase: App.globalData.appImageBase,
imageResourcesBase: App.globalData.appResourcesBase, imageResourcesBase: App.globalData.appResourcesBase,
...@@ -79,7 +81,15 @@ Page({ ...@@ -79,7 +81,15 @@ Page({
authInfo: null, authInfo: null,
goodTypeCountData: {}, goodTypeCountData: {},
enrollSubscribeData: {}, enrollSubscribeData: {},
isLoadingOrder: true isLoadingOrder: true,
},
onLoad: function (options) {
},
onShow: function () {
this.setUserInfo()
}, },
// 去活动预约列表 // 去活动预约列表
...@@ -111,16 +121,6 @@ Page({ ...@@ -111,16 +121,6 @@ Page({
}) })
}, },
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
onShow: function () {
this.setUserInfo()
},
// 查看积分明细 // 查看积分明细
goIntegralDetail(event) { goIntegralDetail(event) {
let integral = event.currentTarget.dataset.integral let integral = event.currentTarget.dataset.integral
...@@ -510,17 +510,28 @@ Page({ ...@@ -510,17 +510,28 @@ Page({
// 二期代码 // 二期代码
onOrder: function () { onOrder: function () {
let funcUserInfo = wx.getStorageSync('userInfo') let funcUserInfo = wx.getStorageSync('userInfo')
if (!funcUserInfo.isSignIn) return if (funcUserInfo.isSignIn) {
wx.navigateTo({ wx.navigateTo({
url: '/pages/mine/order/order' url: '/pages/mine/order/order'
}) })
} else {
wx.navigateTo({
url: '/pages/login/login'
})
}
}, },
onAppointment: function () { onAppointment: function () {
let funcUserInfo = wx.getStorageSync('userInfo') let funcUserInfo = wx.getStorageSync('userInfo')
if (!funcUserInfo.isSignIn) return if (funcUserInfo.isSignIn) {
wx.navigateTo({ wx.navigateTo({
url: '/pages/mine/appointment/appointment' url: '/pages/mine/appointment/appointment'
}) })
} else {
wx.navigateTo({
url: '/pages/login/login'
})
}
}, },
handleToCard: function () { handleToCard: function () {
console.log('onOrder') console.log('onOrder')
......
...@@ -550,15 +550,53 @@ Page({ ...@@ -550,15 +550,53 @@ Page({
* @returns * @returns
*/ */
onOrderAgain: function (event) { onOrderAgain: function (event) {
let item = event.currentTarget.dataset.item let funcItem = event.currentTarget.dataset.item
console.log(funcItem)
let funcUrl = ''
App.setShopInfo(funcItem.shopAppId, funcItem.commodityType)
switch (funcItem.shopAppId) {
// 海错图
case 1:
if (funcItem.commodityType === 1) funcUrl = '/pages/commodity/project-detail/project-detail'
if (funcItem.commodityType === 3) funcUrl = '/pages/commodity/project-detail/project-detail'
break
// 星空影院
case 2:
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'
break
// 原野MOJITO
case 4:
if (funcItem.commodityType === 5) funcUrl = '/pages/commodity/menu-food/menu-food'
break
// 拾光花坊
case 5:
if (funcItem.commodityType === 5) funcUrl = '/pages/commodity/menu-food/menu-food'
break
// 原味舒食
case 6:
if (funcItem.commodityType === 5) funcUrl = '/pages/commodity/menu-food/menu-food'
break
// 元养水韵SPA
case 7:
if (funcItem.commodityType === 2) funcUrl = '/pages/commodity/project-detail/project-detail'
break
}
console.log(item, '再次下单')
let commodityType = item.commodityType
let shopAppId = item.shopAppId// wx.getStorageSync('shopInfoBuffer') ? wx.getStorageSync('shopInfoBuffer').appId : ""
console.log(commodityType, 'commodityType------------------------');
console.log(shopAppId, 'shopAppId------------------------');
wx.navigateTo({ wx.navigateTo({
url: `/pages/commodity/menu-food/menu-food?formPage=order&shopAppId=${shopAppId}&commodityType=${commodityType}`, url: funcUrl,
}) })
}, },
......
page { page {
min-height: 100vh; min-height: 100vh;
background: #F3F4F6; background: #f3f4f6;
} }
.fixed-tab { .fixed-tab {
...@@ -8,7 +8,6 @@ page { ...@@ -8,7 +8,6 @@ page {
background: #fff; background: #fff;
top: 176rpx; top: 176rpx;
z-index: 99; z-index: 99;
} }
.navigation-order { .navigation-order {
...@@ -18,7 +17,7 @@ page { ...@@ -18,7 +17,7 @@ page {
left: 0; left: 0;
width: 750rpx; width: 750rpx;
height: 176rpx; height: 176rpx;
background: #FFFFFF; background: #fff;
} }
.navigation-order image { .navigation-order image {
...@@ -30,7 +29,7 @@ page { ...@@ -30,7 +29,7 @@ page {
width: 200rpx; width: 200rpx;
height: 64rpx; height: 64rpx;
border-radius: 32rpx; border-radius: 32rpx;
border: 1px solid #E2E7EF; border: 1px solid #e2e7ef;
} }
.order-type text { .order-type text {
...@@ -44,6 +43,7 @@ page { ...@@ -44,6 +43,7 @@ page {
} }
/* 订单类型选择 */ /* 订单类型选择 */
.order-type-selection { .order-type-selection {
z-index: 1700; z-index: 1700;
position: fixed; position: fixed;
...@@ -51,20 +51,19 @@ page { ...@@ -51,20 +51,19 @@ page {
left: 0; left: 0;
width: 100%; width: 100%;
height: 100%; height: 100%;
background: rgba(0, 0, 0, .65); background: rgba(0, 0, 0, 0.65);
} }
.order-type-selection>view { .order-type-selection > view {
width: 750rpx; width: 750rpx;
min-height: 240rpx; min-height: 240rpx;
padding-top: 10rpx; padding-top: 10rpx;
border-radius: 0px 0px 24rpx 24rpx; border-radius: 0px 0px 24rpx 24rpx;
background: #FFFFFF; background: #fff;
font-size: 26rpx; font-size: 26rpx;
font-weight: 500; font-weight: 500;
line-height: 36rpx; line-height: 36rpx;
color: #959DA9; color: #959da9;
} }
.order-type-row { .order-type-row {
...@@ -77,18 +76,17 @@ page { ...@@ -77,18 +76,17 @@ page {
width: 192rpx; width: 192rpx;
height: 64rpx; height: 64rpx;
border-radius: 32rpx; border-radius: 32rpx;
background: #F2F3F5; background: #f2f3f5;
} }
.order-type-item-active { .order-type-item-active {
background: #86C5E1; background: #86c5e1;
color: #FFFFFF; color: #fff;
} }
.container-order { .container-order {
/* margin-top: 170rpx; */ /* margin-top: 170rpx; */
padding-top: 288rpx; padding-top: 288rpx;
} }
.container { .container {
...@@ -96,11 +94,12 @@ page { ...@@ -96,11 +94,12 @@ page {
} }
/* 状态筛选菜单 */ /* 状态筛选菜单 */
.status { .status {
width: 750rpx; width: 750rpx;
height: 112rpx; height: 112rpx;
padding: 0 34rpx 1rpx 64rpx; padding: 0 34rpx 1rpx 64rpx;
border-bottom: 1px #E2E7EF solid; border-bottom: 1px #e2e7ef solid;
} }
.status-item { .status-item {
...@@ -108,17 +107,18 @@ page { ...@@ -108,17 +107,18 @@ page {
font-size: 26rpx; font-size: 26rpx;
font-weight: 400; font-weight: 400;
line-height: 36rpx; line-height: 36rpx;
border-bottom: 4px #FFFFFF solid; border-bottom: 4px #fff solid;
color: #959DA9; color: #959da9;
} }
.status-item-active { .status-item-active {
height: 112rpx; height: 112rpx;
border-bottom: 4px #000000 solid; border-bottom: 4px #000 solid;
color: #000000; color: #000;
} }
/* 订单列表 */ /* 订单列表 */
.order-list { .order-list {
width: 750rpx; width: 750rpx;
height: 100%; height: 100%;
...@@ -131,7 +131,7 @@ page { ...@@ -131,7 +131,7 @@ page {
margin-top: 48rpx; margin-top: 48rpx;
padding: 20rpx 0 40rpx 0; padding: 20rpx 0 40rpx 0;
border-radius: 4rpx; border-radius: 4rpx;
background: #FFFFFF; background: #fff;
} }
.order-list-item>view { .order-list-item>view {
...@@ -140,12 +140,12 @@ page { ...@@ -140,12 +140,12 @@ page {
.order-list-item-title .warning { .order-list-item-title .warning {
font-weight: 800; font-weight: 800;
color: #E66060; color: #e66060;
} }
.order-list-item-title .message { .order-list-item-title .message {
font-weight: 800; font-weight: 800;
color: #C2C7CF; color: #c2c7cf;
} }
.order-list-item-title image { .order-list-item-title image {
...@@ -165,7 +165,7 @@ page { ...@@ -165,7 +165,7 @@ page {
height: 140rpx; height: 140rpx;
margin-right: 20rpx; margin-right: 20rpx;
border-radius: 4rpx; border-radius: 4rpx;
background: #999999; background: #999;
} }
.order-list-item-service .name { .order-list-item-service .name {
...@@ -181,7 +181,7 @@ page { ...@@ -181,7 +181,7 @@ page {
font-size: 26rpx; font-size: 26rpx;
font-weight: 400; font-weight: 400;
line-height: 36rpx; line-height: 36rpx;
color: #959DA9; color: #959da9;
} }
.order-list-item-operation .amount { .order-list-item-operation .amount {
...@@ -189,19 +189,18 @@ page { ...@@ -189,19 +189,18 @@ page {
font-size: 26rpx; font-size: 26rpx;
font-weight: 400; font-weight: 400;
line-height: 36rpx; line-height: 36rpx;
color: #15191F; color: #15191f;
} }
.order-list-item-operation .delete { .order-list-item-operation .delete {
width: 120rpx; width: 120rpx;
height: 56rpx; height: 56rpx;
border-radius: 4rpx; border-radius: 4rpx;
border: 1px solid #C2C7CF; border: 1px solid #c2c7cf;
font-size: 22rpx; font-size: 22rpx;
font-weight: 500; font-weight: 500;
line-height: 32rpx; line-height: 32rpx;
color: #656E7B; color: #656e7b;
} }
.order-list-item-operation .again { .order-list-item-operation .again {
...@@ -209,22 +208,22 @@ page { ...@@ -209,22 +208,22 @@ page {
height: 56rpx; height: 56rpx;
margin-left: 20rpx; margin-left: 20rpx;
border-radius: 4rpx; border-radius: 4rpx;
background: #86C5E1; background: #86c5e1;
font-size: 22rpx; font-size: 22rpx;
font-weight: 500; font-weight: 500;
line-height: 32rpx; line-height: 32rpx;
color: #FFFFFF; color: #fff;
} }
/* 券码 */ /* 券码 */
.code-mask { .code-mask {
position: fixed; position: fixed;
top: 0; top: 0;
left: 0; left: 0;
width: 100%; width: 100%;
height: 100%; height: 100%;
background: rgba(0, 0, 0, .6); background: rgba(0, 0, 0, 0.6);
} }
.code { .code {
...@@ -236,7 +235,7 @@ page { ...@@ -236,7 +235,7 @@ page {
font-size: 26rpx; font-size: 26rpx;
font-weight: 500; font-weight: 500;
line-height: 36rpx; line-height: 36rpx;
color: #FFFFFF; color: #fff;
} }
.code-tip text:nth-child(2) { .code-tip text:nth-child(2) {
...@@ -245,7 +244,7 @@ page { ...@@ -245,7 +244,7 @@ page {
font-size: 30rpx; font-size: 30rpx;
font-weight: 400; font-weight: 400;
line-height: 42rpx; line-height: 42rpx;
color: #FFFFFF; color: #fff;
} }
.code-info-qrcode { .code-info-qrcode {
...@@ -263,7 +262,7 @@ page { ...@@ -263,7 +262,7 @@ page {
height: 666rpx; height: 666rpx;
margin-top: 56rpx; margin-top: 56rpx;
border-radius: 4rpx; border-radius: 4rpx;
background: #FFFFFF; background: #fff;
} }
.code-info-copy { .code-info-copy {
...@@ -272,7 +271,7 @@ page { ...@@ -272,7 +271,7 @@ page {
margin-top: 56rpx; margin-top: 56rpx;
padding: 0 24rpx; padding: 0 24rpx;
border-radius: 4rpx; border-radius: 4rpx;
background: #F2F3F5; background: #f2f3f5;
} }
.code-info-copy text:nth-child(1) { .code-info-copy text:nth-child(1) {
...@@ -280,7 +279,7 @@ page { ...@@ -280,7 +279,7 @@ page {
font-size: 26rpx; font-size: 26rpx;
font-weight: 500; font-weight: 500;
line-height: 36rpx; line-height: 36rpx;
color: #959DA9; color: #959da9;
} }
.code-info-copy text:nth-child(2) { .code-info-copy text:nth-child(2) {
...@@ -288,7 +287,7 @@ page { ...@@ -288,7 +287,7 @@ page {
font-size: 26rpx; font-size: 26rpx;
font-weight: 500; font-weight: 500;
line-height: 36rpx; line-height: 36rpx;
color: #15191F; color: #15191f;
} }
.code-info-copy text:nth-child(3) { .code-info-copy text:nth-child(3) {
...@@ -296,7 +295,7 @@ page { ...@@ -296,7 +295,7 @@ page {
font-size: 26rpx; font-size: 26rpx;
font-weight: 500; font-weight: 500;
line-height: 36rpx; line-height: 36rpx;
color: #5DB5DD; color: #5db5dd;
} }
.code-close { .code-close {
...@@ -304,7 +303,7 @@ page { ...@@ -304,7 +303,7 @@ page {
height: 80rpx; height: 80rpx;
margin-top: 48rpx; margin-top: 48rpx;
border-radius: 50%; border-radius: 50%;
background: #A9A8A7; background: #a9a8a7;
} }
.code-close>image { .code-close>image {
...@@ -312,8 +311,6 @@ page { ...@@ -312,8 +311,6 @@ page {
height: 48rpx; height: 48rpx;
} }
.empty-cart { .empty-cart {
width: 176rpx; width: 176rpx;
height: 176rpx; height: 176rpx;
...@@ -322,7 +319,7 @@ page { ...@@ -322,7 +319,7 @@ page {
.empty-title { .empty-title {
margin-top: 64rpx; margin-top: 64rpx;
color: #959DA9; color: #959da9;
font-size: 38rpx; font-size: 38rpx;
line-height: 52rpx; line-height: 52rpx;
} }
...@@ -335,7 +332,7 @@ page { ...@@ -335,7 +332,7 @@ page {
font-size: 30rpx; font-size: 30rpx;
line-height: 96rpx; line-height: 96rpx;
text-align: center; text-align: center;
background: #86C5E1; background: #86c5e1;
border-radius: 4rpx; border-radius: 4rpx;
} }
...@@ -348,6 +345,6 @@ page { ...@@ -348,6 +345,6 @@ page {
} }
.logo-box image { .logo-box image {
max-width: 100%!important; max-width: 100% !important;
max-height: 100%!important; max-height: 100% !important;
} }
\ No newline at end of file
...@@ -857,6 +857,15 @@ Page({ ...@@ -857,6 +857,15 @@ Page({
* @returns * @returns
*/ */
onPaySubmit: function () { onPaySubmit: function () {
// 优先检查用户是否已经注册,如果没有则跳转登录
let funcUserInfo = wx.getStorageSync('userInfo')
if (!funcUserInfo.isSignIn) {
wx.navigateTo({
url: '/pages/login/login'
})
return
}
// 数据校验不通过 // 数据校验不通过
if (!this.inspectData()) return if (!this.inspectData()) return
// 支付正在进行 // 支付正在进行
......
...@@ -5,6 +5,7 @@ Page({ ...@@ -5,6 +5,7 @@ Page({
option: {}, option: {},
data: { data: {
appStatus: App.globalData.appStatus,
imageBase: App.globalData.appImageBase, imageBase: App.globalData.appImageBase,
resourcesBase: App.globalData.appResourcesBase, resourcesBase: App.globalData.appResourcesBase,
...@@ -246,7 +247,8 @@ Page({ ...@@ -246,7 +247,8 @@ Page({
url: '/api/v1/strategy/getList', url: '/api/v1/strategy/getList',
data: { data: {
'pageSize': this.data.pageSize + '', 'pageSize': this.data.pageSize + '',
'pageNo': this.data.pageNo + '' }, 'pageNo': this.data.pageNo + ''
},
success: (response) => { success: (response) => {
let funcResponse = response.data let funcResponse = response.data
let funcList = [] let funcList = []
...@@ -269,6 +271,8 @@ Page({ ...@@ -269,6 +271,8 @@ Page({
this.setData({ this.setData({
touristRouteList: this.data.touristRouteList.concat(funcList) touristRouteList: this.data.touristRouteList.concat(funcList)
}) })
console.log(this.data.touristRouteList)
}, },
fail: (err) => { fail: (err) => {
......
...@@ -7,14 +7,20 @@ ...@@ -7,14 +7,20 @@
</view> </view>
<!-- 畅玩分类 --> <!-- 畅玩分类 -->
<view class="banner"> <block wx:if="{{appStatus}}">
<image src="{{resourcesBase + 'play/home/type.png'}}"></image> <view class="banner">
<button class="art-button" bindtap="onToArt"></button> <image src="{{resourcesBase + 'play/home/type.png'}}"></image>
<button class="health-button" bindtap="onToHealth"></button> <button class="art-button" bindtap="onToArt"></button>
<button class="food-button" bindtap="onToFood"></button> <button class="health-button" bindtap="onToHealth"></button>
<button class="leisure-button" bindtap="onToLeisure"></button> <button class="food-button" bindtap="onToFood"></button>
<button class="hotel-button" bindtap="onToHotel"></button> <button class="leisure-button" bindtap="onToLeisure"></button>
</view> <button class="hotel-button" bindtap="onToHotel"></button>
</view>
</block>
<block wx:if="{{!appStatus}}">
<view class="banner-occupy"></view>
</block>
<!-- 近期活动 --> <!-- 近期活动 -->
<view class="title row con-b align-c"> <view class="title row con-b align-c">
......
...@@ -34,6 +34,11 @@ ...@@ -34,6 +34,11 @@
} }
/* 畅玩分类 */ /* 畅玩分类 */
.banner-occupy {
position: relative;
margin-top: 200rpx;
}
.banner { .banner {
position: relative; position: relative;
margin-top: 200rpx; margin-top: 200rpx;
......
...@@ -8,6 +8,7 @@ let logicData = { ...@@ -8,6 +8,7 @@ let logicData = {
Page({ Page({
data: { data: {
appStatus: App.globalData.appStatus,
imageBase: App.globalData.appImageBase, imageBase: App.globalData.appImageBase,
resourcesBase: App.globalData.appResourcesBase, resourcesBase: App.globalData.appResourcesBase,
...@@ -85,6 +86,8 @@ Page({ ...@@ -85,6 +86,8 @@ Page({
winCommodity: false, // 商品列表 winCommodity: false, // 商品列表
winCommodityMenu: false, winCommodityMenu: false,
winEvaluateAlbum: false, winEvaluateAlbum: false,
winHidden: false, // 海错图临时隐藏内容控制
}, },
onLoad: function (options) { onLoad: function (options) {
...@@ -101,6 +104,7 @@ Page({ ...@@ -101,6 +104,7 @@ Page({
this.queryActivity() this.queryActivity()
this.setData({ this.setData({
commodityTitle: '文创商品', commodityTitle: '文创商品',
winHidden: true
}) })
break break
......
...@@ -37,23 +37,9 @@ ...@@ -37,23 +37,9 @@
</view> </view>
</view> </view>
<!-- 下载图片反馈 --> <!-- 下载图片反馈 -->
<l-toast <l-toast l-class="toast" l-image-class="toast-icon" show="{{winToastSuccess}}" image="../../../image/icon/success-3.png" title="图片已保存" duration="3000"></l-toast>
l-class="toast"
l-image-class="toast-icon"
show="{{winToastSuccess}}"
image="../../../image/icon/success-3.png"
title="图片已保存"
duration="3000"
></l-toast>
<!-- 下载图片反馈 --> <!-- 下载图片反馈 -->
<l-toast <l-toast l-class="toast" l-image-class="toast-icon" show="{{winToastFail}}" image="../../../image/icon/war-3.png" title="图片保存失败" duration="3000"></l-toast>
l-class="toast"
l-image-class="toast-icon"
show="{{winToastFail}}"
image="../../../image/icon/war-3.png"
title="图片保存失败"
duration="3000"
></l-toast>
<!-- 开放时间信息 --> <!-- 开放时间信息 -->
<view class="commodity-other {{option.id === '6' || option.id === '4' ? 'food-border' : ''}} row align-c"> <view class="commodity-other {{option.id === '6' || option.id === '4' ? 'food-border' : ''}} row align-c">
<image src="./image/time.png"></image> <image src="./image/time.png"></image>
...@@ -120,8 +106,13 @@ ...@@ -120,8 +106,13 @@
<view class="commodity-card" wx:if="{{winCommodity}}"> <view class="commodity-card" wx:if="{{winCommodity}}">
<view class="commodity-card-title row con-b align-e"> <view class="commodity-card-title row con-b align-e">
<text>{{commodityTitle}}</text> <text>{{commodityTitle}}</text>
<text bindtap="onCommodityAll">查看全部</text> <text wx:if="{{!winHidden}}" bindtap="onCommodityAll">查看全部</text>
<view wx:if="{{winHidden}}" class="row align-c">
<image src="{{imageBase + 'icon/warning-2.png'}}"></image>
<text>请到线下门店购买</text>
</view>
</view> </view>
<view class="commodity-card-list row"> <view class="commodity-card-list row">
<block wx:for="{{detailCommodity}}" wx:for-index="index" wx:for-item="item" wx:key="index"> <block wx:for="{{detailCommodity}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="commodity-card-item col"> <view class="commodity-card-item col">
...@@ -134,32 +125,35 @@ ...@@ -134,32 +125,35 @@
<view class="commodity-card-item-date row align-c"> <view class="commodity-card-item-date row align-c">
<text>{{item.describe}}</text> <text>{{item.describe}}</text>
</view> </view>
<view class="commodity-card-item-operation row con-b align-c">
<!-- 活动价样式 -->
<view class="row align-c" wx:if="{{item.priceType === 1}}">
<text class="detail-price-discount">活动价</text>
<text class="price-symbol">¥</text>
<text>{{item.priceDiscountText == '0' ? '免费' : item.priceDiscountText}}</text>
<text>{{'¥' + item.priceText}}</text>
</view>
<!-- 业主价样式 --> <block wx:if="{{!winHidden}}">
<view class="row align-c" wx:if="{{item.priceType === 2}}"> <view class="commodity-card-item-operation row con-b align-c">
<text class="detail-price-special">业主价</text> <!-- 活动价样式 -->
<text class="price-symbol">¥</text> <view class="row align-c" wx:if="{{item.priceType === 1}}">
<text>{{item.priceSpecialText == '0' ? '免费' : item.priceSpecialText}}</text> <text class="detail-price-discount">活动价</text>
<text>{{'¥' + item.priceText}}</text> <text class="price-symbol">¥</text>
</view> <text>{{item.priceDiscountText == '0' ? '免费' : item.priceDiscountText}}</text>
<!-- 普通价样式 --> <text>{{'¥' + item.priceText}}</text>
<view class="row align-c" wx:if="{{item.priceType === 3}}"> </view>
<text class="">业主价</text>
<text class="price-symbol">¥</text> <!-- 业主价样式 -->
<text>{{item.priceText == '0' ? '免费' : item.priceText}}</text> <view class="row align-c" wx:if="{{item.priceType === 2}}">
</view> <text class="detail-price-special">业主价</text>
<view> <text class="price-symbol">¥</text>
<button class="row con-c align-c" data-id="{{item.id}}" data-classid="{{item.classifyId}}" bindtap="onBuyCommodity">购买</button> <text>{{item.priceSpecialText == '0' ? '免费' : item.priceSpecialText}}</text>
<text>{{'¥' + item.priceText}}</text>
</view>
<!-- 普通价样式 -->
<view class="row align-c" wx:if="{{item.priceType === 3}}">
<text class="">业主价</text>
<text class="price-symbol">¥</text>
<text>{{item.priceText == '0' ? '免费' : item.priceText}}</text>
</view>
<view>
<button class="row con-c align-c" data-id="{{item.id}}" data-classid="{{item.classifyId}}" bindtap="onBuyCommodity">购买</button>
</view>
</view> </view>
</view> </block>
</view> </view>
</block> </block>
<view class="commodity-card-item col"></view> <view class="commodity-card-item col"></view>
...@@ -319,23 +313,9 @@ ...@@ -319,23 +313,9 @@
</view> </view>
</view> </view>
<!-- 下载图片反馈 --> <!-- 下载图片反馈 -->
<l-toast <l-toast l-class="toast" l-image-class="toast-icon" show="{{winToastSuccess}}" image="../../../image/icon/success-3.png" title="图片已保存" duration="3000"></l-toast>
l-class="toast"
l-image-class="toast-icon"
show="{{winToastSuccess}}"
image="../../../image/icon/success-3.png"
title="图片已保存"
duration="3000"
></l-toast>
<!-- 下载图片反馈 --> <!-- 下载图片反馈 -->
<l-toast <l-toast l-class="toast" l-image-class="toast-icon" show="{{winToastFail}}" image="../../../image/icon/war-3.png" title="图片保存失败" duration="3000"></l-toast>
l-class="toast"
l-image-class="toast-icon"
show="{{winToastFail}}"
image="../../../image/icon/war-3.png"
title="图片保存失败"
duration="3000"
></l-toast>
<!-- 开放时间信息 --> <!-- 开放时间信息 -->
<view class="commodity-other movie-border row align-c"> <view class="commodity-other movie-border row align-c">
<image src="./image/time.png"></image> <image src="./image/time.png"></image>
...@@ -395,7 +375,7 @@ ...@@ -395,7 +375,7 @@
<view class="movie-footer"> <view class="movie-footer">
<image src="/image/movie-bottom.png"></image> <image src="/image/movie-bottom.png"></image>
</view> </view>
<!-- 简介,评价 --> <!-- 简介,评价 -->
<view class="selection-content movie-border row"> <view class="selection-content movie-border row">
<view class="row align-c {{contentType === 'detail' ? 'selection-content-item-active-movie' : 'selection-content-item'}}" data-type="detail" bindtap="onSelectionContent"> <view class="row align-c {{contentType === 'detail' ? 'selection-content-item-active-movie' : 'selection-content-item'}}" data-type="detail" bindtap="onSelectionContent">
...@@ -489,7 +469,7 @@ ...@@ -489,7 +469,7 @@
</view> </view>
<!-- 查看相册 --> <!-- 查看相册 -->
<view class="full-screen-album" wx:if="{{winEvaluateAlbum}}" bindtap="onHiddenEvaluateAlbum" > <view class="full-screen-album" wx:if="{{winEvaluateAlbum}}" bindtap="onHiddenEvaluateAlbum">
<swiper circular current="{{evaluateAlbumActive}}" class="full-screen-album-swiper" duration="500"> <swiper circular current="{{evaluateAlbumActive}}" class="full-screen-album-swiper" duration="500">
<block wx:for="{{evaluateAlbum}}" wx:for-index="index" wx:for-item="item" wx:key="index"> <block wx:for="{{evaluateAlbum}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<swiper-item class="album-item row con-c align-c"> <swiper-item class="album-item row con-c align-c">
......
...@@ -24,7 +24,7 @@ Page({ ...@@ -24,7 +24,7 @@ Page({
navigationScroll: 0, navigationScroll: 0,
isNavigationWhite: false, isNavigationWhite: false,
appStatus: App.globalData.appStatus,
banner: [], banner: [],
......
...@@ -24,22 +24,25 @@ ...@@ -24,22 +24,25 @@
<text>{{date}}</text> <text>{{date}}</text>
</view> </view>
</view> </view>
<view class="relation" wx:if="{{relation.length>0}}">
<view class="relation-title"> <block wx:if="{{appStatus}}">
<text>文中提及</text> <view class="relation" wx:if="{{relation.length > 0}}">
</view> <view class="relation-title">
<block wx:for="{{relation}}" wx:for-index="index" wx:for-item="item" wx:key="index"> <text>文中提及</text>
<view class="relation-item row con-b align-c" data-id="{{item.id}}" bindtap="onRelation">
<image mode="widthFix" src="{{item.cover}}"></image>
<view class="relation-item-info col">
<text>{{item.title}}</text>
<text>{{item.time}}</text>
<text>{{item.price}}</text>
</view>
<view class="relation-item-more row align-c">
<image src="/image/more-g.png"></image>
</view>
</view> </view>
</block> <block wx:for="{{relation}}" wx:for-index="index" wx:for-item="item" wx:key="index">
</view> <view class="relation-item row con-b align-c" data-id="{{item.id}}" bindtap="onRelation">
<image mode="widthFix" src="{{item.cover}}"></image>
<view class="relation-item-info col">
<text>{{item.title}}</text>
<text>{{item.time}}</text>
<text>{{item.price}}</text>
</view>
<view class="relation-item-more row align-c">
<image src="/image/more-g.png"></image>
</view>
</view>
</block>
</view>
</block>
</view> </view>
/**
* 代码编写规范 - js - 变量命名
* is,状态类变量,通常数值为布尔类型。例如用户登录状态,isSignIn。
* win,窗口显隐控制,通常数值为布尔类型。例如 winToast,winDialog。
* func,函数内部变量前缀。
*
* 代码编写规范 - js - 常用变量命名
* option,页面参数对象
* userInfo,用户信息对象
*
*/
\ No newline at end of file
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