Commit 93370b34 by wjw

ww--畅玩修改

parent ab53f413
......@@ -128,8 +128,6 @@ App({
url: '/api/v1/login/getSmallSession?code=' + res.code,
method: 'GET',
success: (response) => {
console.log(response)
let funcResponse = response.data
this.globalData.token = funcResponse.token
this.globalData.refreshToken = funcResponse.refreshToken
......@@ -145,11 +143,16 @@ App({
'birthday': funcResponse.birthday,
'sex': funcResponse.sex,
'userType': Number(funcResponse.userType),
'status': '', // 只有游客身份该值为 ''
'isSignIn': false,
}
// 以返回信息中是否包含手机号码判断用户是否注册过
if (funcUserInfo.phone) funcUserInfo.isSignIn = true
console.log(funcUserInfo.phone)
if (funcUserInfo.phone) {
funcUserInfo.isSignIn = true
this.queryUserStatus()
}
wx.setStorageSync('userInfo', funcUserInfo)
......@@ -187,9 +190,55 @@ App({
},
/**
* 查询用户认证状态
* 尽在用户已经注册的前提下会查询此函数
* @function
* @param
* @returns
*/
queryUserStatus: function () {
this.wxRequest({
url: '/api/v1/userAuth/getAuth',
method: 'GET',
success: (response) => {
let funcResponse = response.data
let funcUserInfo = wx.getStorageSync('userInfo')
let funcStatus = Number(funcResponse.state)
let funcStatusText = '去认证'
switch (funcStatus) {
// 正在审核
case 0:
funcStatusText = '审核中'
funcUserInfo.status = funcStatus
funcUserInfo.userType = 0
break
// 通过
case 1:
funcStatusText = '审核通过 '
funcUserInfo.status = funcStatus
funcUserInfo.userType = 1
break
// 拒绝
case 2:
funcStatusText = '审核失败'
funcUserInfo.status = funcStatus
funcUserInfo.userType = 0
break
}
wx.setStorageSync('userInfo', funcUserInfo)
}
})
},
/**
* 刷新令牌
* @function
* @param {number} - funcAmountValue 金额,单位分
* @param
* @returns
*/
refreshToken: function (obj) {
......@@ -211,5 +260,5 @@ App({
}
}
})
}
},
})
\ No newline at end of file
Component({
/**
* 组件的属性列表
*/
properties: {
data: Object
},
/**
* 组件的初始数据
*/
data: {
},
lifetimes: {
attached: function () {
// console.log(this.data.data)
},
detached: function () {
// 在组件实例被从页面节点树移除时执行
},
},
/**
* 组件的方法列表
*/
methods: {
}
})
\ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
<!-- demo.wxml -->
<view class="component-strategy-item">
<image wx:if="{{data.index === 1}}" class="short" src="{{data.image}}" mode="aspectFill"></image>
<image wx:else src="{{data.image}}" mode="widthFix"></image>
<text class="component-strategy-item-title">{{data.title}}</text>
<text class="component-strategy-item-content">{{data.date}}</text>
</view>
\ No newline at end of file
.component-strategy-item {
display: flex;
flex-direction: column;
margin-top: 16rpx;
border-radius: 4rpx;
overflow: hidden;
background: #ffffff;
}
.component-strategy-item image {
width: 328rpx;
}
.component-strategy-item .short {
width: 328rpx;
height: 354rpx;
}
.component-strategy-item-title {
display: -webkit-box;
margin: 24rpx 20rpx;
font-size: 26rpx;
font-weight: bolder;
color: #000000;
overflow: hidden;
text-overflow: ellipsis;
line-clamp: 2;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.component-strategy-item-content {
margin: 0 24rpx 24rpx 24rpx;
font-size: 22rpx;
color: #959DA9;
}
\ No newline at end of file
......@@ -14,14 +14,16 @@ let Development = {
],
// 门店信息
// appId 程序内部交互确定门店
// id 数据库门店 id
shopId: [
{ appId: 1, id: '581be62a80bb4f0485abd87abcf64dc0', logo: 'shop/logo-1.png', cover: 'shop/cover-1.png', name: '海错图', title: ['海错图', '海错图购票', '海错图', '海错图文创店', '海错图', '海错图', '海错图'] },
{ appId: 2, id: '3cfe2e3b8b4342e8b62f8b45daf60d91', logo: 'shop/logo-2.png', cover: 'shop/cover-2.png', name: '星空影院', title: ['星空影院', '星空影院', '星空影院', '星空影院', '星空影院', '星空影院', '星空影院'] },
{ appId: 3, id: '8a3e59c57f564c569b3d7bb278ea50b3', logo: 'shop/logo-3.png', cover: 'shop/cover-3.png', name: '儿童营地', title: ['儿童营地', '儿童营地入园购票', '儿童营地', '儿童营地', '儿童营地', '儿童营地接待区', '儿童营地'] },
{ appId: 4, id: 'c63893bb472f43bca4ec72f890bcb4fd', logo: 'shop/logo-4.png', cover: 'shop/cover-4.png', name: '原野MOJITO', title: ['原野MOJITO', '原野MOJITO', '原野MOJITO', '原野MOJITO', '原野MOJITO', '原野MOJITO', '原野MOJITO'] },
{ appId: 5, id: '26c40446fc454a02abe61758176597f6', logo: 'shop/logo-5.png', cover: 'shop/cover-5.png', name: '拾光花坊', title: ['拾光花坊', '拾光花坊', '拾光花坊', '拾光花坊', '拾光花坊', '拾光花坊', '拾光花坊'] },
{ appId: 6, id: 'd9436d7018de43809824b6ec221ea01f', logo: 'shop/logo-6.png', cover: 'shop/cover-6.png', name: '原味舒食', title: ['原味舒食', '原味舒食', '原味舒食', '原味舒食', '原味舒食', '原味舒食', '原味舒食'] },
{ appId: 7, id: '2614f117406548718bc091f24368c16e', logo: 'shop/logo-7.png', cover: 'shop/cover-7.png', name: '元养水韵SPA', title: ['元养水韵SPA', '元养水韵SPA', '元养水韵SPA', '元养水韵SPA', '元养水韵SPA', '元养水韵SPA', '元养水韵SPA'] },
{ appId: 1, id: '581be62a80bb4f0485abd87abcf64dc0', logo: 'shop/logo-1.png', commodityLogo: 'shop/commodity-logo-1.png', cover: 'shop/cover-1.png', name: '海错图', title: ['海错图', '海错图购票', '海错图', '海错图文创店', '海错图', '海错图', '海错图'] },
{ appId: 2, id: '3cfe2e3b8b4342e8b62f8b45daf60d91', logo: 'shop/logo-2.png', commodityLogo: 'shop/commodity-logo-2.png', cover: 'shop/cover-2.png', name: '星空影院', title: ['星空影院', '星空影院', '星空影院', '星空影院', '星空影院', '星空影院', '星空影院'] },
{ appId: 3, id: '8a3e59c57f564c569b3d7bb278ea50b3', logo: 'shop/logo-3.png', commodityLogo: 'shop/commodity-logo-3.png', cover: 'shop/cover-3.png', name: '儿童营地', title: ['儿童营地', '儿童营地入园购票', '儿童营地', '儿童营地', '儿童营地', '儿童营地接待区', '儿童营地'] },
{ appId: 4, id: 'c63893bb472f43bca4ec72f890bcb4fd', logo: 'shop/logo-4.png', commodityLogo: 'shop/commodity-logo-4.png', cover: 'shop/cover-4.png', name: '原野MOJITO', title: ['原野MOJITO', '原野MOJITO', '原野MOJITO', '原野MOJITO', '原野MOJITO', '原野MOJITO', '原野MOJITO'] },
{ appId: 5, id: '26c40446fc454a02abe61758176597f6', logo: 'shop/logo-5.png', commodityLogo: 'shop/commodity-logo-5.png', cover: 'shop/cover-5.png', name: '拾光花坊', title: ['拾光花坊', '拾光花坊', '拾光花坊', '拾光花坊', '拾光花坊', '拾光花坊', '拾光花坊'] },
{ appId: 6, id: 'd9436d7018de43809824b6ec221ea01f', logo: 'shop/logo-6.png', commodityLogo: 'shop/commodity-logo-6.png', cover: 'shop/cover-6.png', name: '原味舒食', title: ['原味舒食', '原味舒食', '原味舒食', '原味舒食', '原味舒食', '原味舒食', '原味舒食'] },
{ appId: 7, id: '2614f117406548718bc091f24368c16e', logo: 'shop/logo-7.png', commodityLogo: 'shop/commodity-logo-7.png', cover: 'shop/cover-7.png', name: '元养水韵SPA', title: ['元养水韵SPA', '元养水韵SPA', '元养水韵SPA', '元养水韵SPA', '元养水韵SPA', '元养水韵SPA', '元养水韵SPA'] },
]
}
......
......@@ -80,6 +80,7 @@ Page({
this.setData({
winSide: false
})
wx.hideTabBar({animation: true})
}
let funcOpacity = (funcEvent.scrollTop - this.data.sideHeight) / 40
......@@ -93,6 +94,7 @@ Page({
winSide: true,
navigationAnimationShow: 0
})
wx.showTabBar({animation: true})
}
// 恢复滚动事件
......
......@@ -14,9 +14,9 @@
.appointment-side {
position: fixed;
right: 40rpx;
bottom: 74rpx;
width: 112rpx;
height: 224rpx;
bottom: 180rpx;
width: 80rpx;
height: 80rpx;
}
.appointment-side-top {
......
......@@ -288,6 +288,15 @@ Page({
},
onPaySubmit: function () {
// 优先检查用户是否已经注册,如果没有则跳转登录
let funcUserInfo = wx.getStorageSync('userInfo')
if (!funcUserInfo.isSignIn) {
wx.navigateTo({
url: '/pages/login/login'
})
return
}
// 检查购物车是否拥有商品
let funcShoppingCart = this.data.shoppingCart
if (funcShoppingCart.length === 0) {
......
......@@ -245,6 +245,7 @@ Page({
url: '/api/v1/strategy/getList',
data: { pageSize: that.data.pageSize+'', pageNo: that.data.pageNo+''},
success: function (res) {
console.log(res)
that.setData({
loading: false
})
......@@ -367,17 +368,4 @@ Page({
url: '/pages/home/history/history?index=' + index,
})
},
onTest: function (event) {
wx.navigateTo({
url: '/pages/pay/order-input/order-input?type=' + event.currentTarget.dataset.index + '&passType=1'
})
},
onTest2: function (event) {
},
onTest6: function (event) {
wx.navigateTo({
url: '/pages/pay/order-comment/order-comment',
});
}
})
\ No newline at end of file
......@@ -93,10 +93,6 @@
<l-water-flow column-gap="14rpx" generic:l-water-flow-item="strategy-item" bind:linitemtap="onStrategyDetail"></l-water-flow>
</view>
</block> -->
<button class="test-button" bindtap="onTest4">券码核销</button>
<button class="test-button" data-index="{{4}}" bindtap="onTest5">券码详情 普通</button>
<button class="test-button" data-index="{{5}}" bindtap="onTest5">券码详情 餐品</button>
<button class="test-button" bindtap="onTest6">评价订单</button>
</view>
<view class="footer">
......
......@@ -2,6 +2,8 @@ const App = getApp()
Page({
data: {
option: {},
height: '',
islogin: false,
isphone: false,
......@@ -10,6 +12,8 @@ Page({
},
onLoad: function (options) {
this.setData({ option: options })
let funcUserInfo = wx.getStorageSync('userInfo')
this.setData({
......@@ -38,7 +42,6 @@ Page({
*/
userInfoHandler: function (res) {
let funcGetUserInfo = res.detail.userInfo
console.log('userInfo', res)
if (!res.detail.userInfo) {
return
}
......@@ -57,8 +60,6 @@ Page({
iv: '',
},
success: (res) => {
console.log(res)
wx.setStorageSync('userInfo', funcUserInfo)
this.setData({
islogin: true
})
......@@ -88,14 +89,12 @@ Page({
},
success: (res) => {
funcUserInfo.phone = res.data.phoneNumber
wx.setStorageSync('userInfo', funcUserInfo)
this.setData({
isphone: true
})
setTimeout(() => {
this.checkFinish()
}, 1000)
}
})
},
......@@ -113,7 +112,14 @@ Page({
checkFinish: function () {
if (this.data.islogin && this.data.isphone) {
// 在注册完成之后 login 一次,重新设置用户信息以及相关状态参数
console.log('注册成功')
App.globalData.token = ''
App.login({
success: () => {
wx.navigateBack({})
}
})
}
}
})
\ No newline at end of file
......@@ -24,7 +24,7 @@ Page({
mobile: '',
nickName: '',
avatarUrl: '/pages/mine/home/image/avatar.png',
stateTest: '去认证',
statusText: '去认证',
mask: false,
type: 0, //判断是否是认证的了
approveList: ['园区门票优惠', '餐厅价格优惠', 'SPA服务优惠', '免费观看电影', '无须预约入园', '尽享多重特权'],
......@@ -112,28 +112,39 @@ Page({
url: '/pages/pay/coupon-input/coupon-input',
})
},
setUserInfo: function () {
let funcUserInfo = wx.getStorageSync('userInfo')
if (funcUserInfo.phone && funcUserInfo.name && funcUserInfo.avatar) {
// 已为登录状态
if (funcUserInfo.isSignIn) {
funcUserInfo.phone = this.toHide(funcUserInfo.phone)
let funcStatusText = ''
switch (funcUserInfo.status) {
case '':
funcStatusText = '去认证'
break
case 0:
funcStatusText = '审核中'
break
case 1:
funcStatusText = '审核通过 '
break
case 2:
funcStatusText = '审核失败'
break
}
this.setData({
type: funcUserInfo.userType,
statusText: funcStatusText,
isRegister: true,
userInfo: funcUserInfo
})
App.login({
success: (token) => {
this.getMyActivityList()
// this.getList()
this.getAuth()
}
})
let funcUserType = funcUserInfo.userType
this.setData({
type: funcUserType === 1 ? 1 : 0,
})
} else {
this.setData({
isRegister: false,
......@@ -141,7 +152,6 @@ Page({
}
},
// 登录注册页
checkRegister() {
if (this.data.isRegister) {
......@@ -297,50 +307,11 @@ Page({
})
},
// 获取业主认证信息
getAuth() {
App.wxRequest({
url: '/api/v1/userAuth/getAuth',
method: 'GET',
success: (res) => {
let state = res.data.state * 1 // 0 待审核 1 审核通过 2 不通过
let stateTest = '去认证'
switch (state) {
case 0:
stateTest = '审核中'
break
case 1:
stateTest = '审核通过 '
break
case 2:
stateTest = '审核失败'
break
}
this.setData({
type: state == 1 ? 1 : 0,
stateTest: stateTest,
})
let funcUserInfo = wx.getStorageSync('userInfo')
funcUserInfo.userType = state
wx.setStorageSync('userInfo', funcUserInfo)
}
})
},
toHide: function (array) {
var mphone = array.substring(0, 3) + '****' + array.substring(7);
return mphone;
},
// 二期代码
onOrder: function () {
console.log('onOrder')
......
<navigation class="navigation" titleText="我的" color="{{type == 1? '#FFFFFF' :''}}"></navigation>
<view class="container">
<view class="mine" wx:if="{{type == 0}}">
<view class="mine" wx:if="{{type !== 1}}">
<image class="background-image" src="./image/mine.png"></image>
<view class="row align-c">
<view class="mine-avatar" bindtap="checkRegister">
......@@ -58,15 +58,15 @@
</view>
<view class="status row con-b align-c" wx:if="{{type == 0}}">
<view class="status row con-b align-c" wx:if="{{type !== 1}}">
<view class="status-symbol col">
<text>业主认证</text>
<text>享受业主尊贵特权,预定消费专属优惠</text>
</view>
<view class="status-operation row con-c align-c" bindtap="goApprove">
<image wx:if="{{stateTest == '审核失败'}}" src="/image/fail-icon.png"></image>
<image wx:if="{{stateTest == '审核中'}}" src="/image/sh-icon.png"></image>
<text>{{stateTest}}</text>
<image wx:if="{{statusText == '审核失败'}}" src="/image/fail-icon.png"></image>
<image wx:if="{{statusText == '审核中'}}" src="/image/sh-icon.png"></image>
<text>{{statusText}}</text>
</view>
</view>
......@@ -292,57 +292,6 @@
<text>客服中心</text>
<image src="{{imageBase + 'icon/arrow-r-2.png'}}"></image>
</view>
<!-- <l-list l-content-class="menu-title" l-class="listClass" bind:lintap="myActivity">
<view slot="left-section">
<image class="fontImg" src="./image/myactive.png"></image>
</view>
</l-list> -->
<!-- 我的活动 -->
<!-- <view class="my-activities" wx:if="{{activityList.length > 0}}">
<view class="my-activities-item" data-enrollid="{{item.enrollId}}" wx:for="{{activityList}}" wx:for-index="index" wx:for-item="item" wx:key="index" bindtap="activityDetail">
<view class="my-activities-top">
<text decode="{{true}}">&nbsp;&nbsp;{{item.time}}&nbsp;&nbsp;</text>
</view>
<view class="my-activities-bottom">
<view class="my-activities-title" style="padding-top:70rpx;">{{item.title}}</view>
<view class="my-activities-content">{{item.content}}</view>
</view>
</view>
<view class="my-activities-item"></view>
</view> -->
<!-- <l-list l-content-class="menu-title" l-class="listClass" bind:lintap="myAppointment">
<view slot="left-section">
<image class="fontImg" src="./image/myappion.png"></image>
</view>
</l-list> -->
<!-- 我的预约 -->
<!-- <view class="my-activities" wx:if="{{appointmentList.length > 0}}">
<view class="my-activities-item" wx:for="{{appointmentList}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="my-activities-top">
<view class="my-activities-top">
<text decode="{{true}}">&nbsp;&nbsp;{{item.time}}&nbsp;&nbsp;</text>
</view>
</view>
<view class="my-activities-bottom">
<view class="my-activities-bottom-view">
<view class="my-activities-title">{{item.title}}</view>
<view class="my-activities-content" wx:if="{{item.type == 0}}">预约人数 {{item.num}}人</view>
</view>
<view class="subscribe" data-item="{{item}}" bindtap="gohotelAccommodation">预约凭证</view>
</view>
</view>
<view class="my-activities-item"></view>
</view> -->
<!-- <l-list l-content-class="menu-title" l-class="listClass" bind:lintap="customerService">
<view slot="left-section">
<image class="fontImg" src="./image/mycustom@2x.png"></image>
</view>
</l-list> -->
</view>
</view>
......
......@@ -7,56 +7,25 @@ Page({
navigationLogoTop: 0,
navigationLogoMarginTop: 0,
strategy: [],
strategyList: [],
strategyOriginList: [],
//接口参数
pageNo: 1,
pageSize: 10,
loading: false,
moreData: true,
movieList: [],
recentList: [
{
id: 0,
img: ''
},
{
id: 1,
img: ''
},
{
id: 2,
img: ''
}
],
activity: [],
swiperRecentCurrent: 0,
movieList: [
{
id: 0,
img: '',
name: '阿丽塔:战斗天使',
dimensional: '3D',
type: '动作 / 科幻 / 冒险',
director: '罗伯特·罗德里格兹'
},
{
id: 1,
img: '',
name: '阿丽塔:战斗天使',
dimensional: '3D',
type: '动作 / 科幻 / 冒险',
director: '罗伯特·罗德里格兹'
},
{
id: 2,
img: '',
name: '阿丽塔:战斗天使',
dimensional: '3D',
type: '动作 / 科幻 / 冒险',
director: '罗伯特·罗德里格兹'
},
],
movieList: [],
swiperMovieCurrent: 0
},
onLoad: function (options) {
this.setNavigationLogo()
this.loadVisiterPlanList()
},
onShow: function () {
......@@ -112,7 +81,7 @@ Page({
})
this.setData({
banner: tmpArr
activity: tmpArr
})
}
})
......@@ -153,10 +122,12 @@ Page({
'priceSpecialText': App.modular.utils.formatAmount(funcResponse[i].ownerPrice), // 业主价文本格式
'priceType': 1,
'tagsId': funcResponse[i].tagIds,
'tags': funcResponse[i].tags,
'tags': funcResponse[i].tags.split(' '),
}
if (funcItem.tagsId.includes('102')) {
funcList.push(funcItem)
}
}
this.setData({
movieList: funcList
})
......@@ -188,7 +159,6 @@ Page({
url: '/pages/play/service-detail/service-detail?id=' + funcItem.currentTarget.dataset.id
})
},
//跳转到艺文
onToArt: function () {
wx.navigateTo({
......@@ -240,21 +210,28 @@ Page({
url: '/pages/play/activity/activity'
})
},
onAllRecent: function () {
// 查看全部电影
onAllMovie: function () {
wx.navigateTo({
url: '/pages/play/movie/movie'
})
},
// 查看电影详情
onMovieDetail: function (event) {
let { id } = event.currentTarget.dataset
wx.navigateTo({
url: '/pages/play/movie-detail/movie-detail?id=' + id
})
},
// 游客攻略列表
loadVisiterPlanList() {
this.data.loading = true
var that = this
app.wxRequest({
App.wxRequest({
url: '/api/v1/strategy/getList',
data: { pageSize: that.data.pageSize + '', pageNo: that.data.pageNo + '' },
success: function (res) {
console.log(res)
that.setData({
loading: false
})
......@@ -272,6 +249,8 @@ Page({
title: item.title,
date: item.updateDate,
index: count + i - 1,
tags: item.tags.split(' '),
content: item.content
}
tempArray.push(strategy)
}
......@@ -300,13 +279,9 @@ Page({
}
// 游客攻略瀑布列表
wx.lin.renderWaterFlow(that.data.strategyList, that.data.pageNo == 1 ? true : false, () => { })
} else {
}
},
fail: function (err) {
that.setData({
......
......@@ -20,7 +20,7 @@
<text bindtap="onAllRecent" bindtap="onAllActivity">查看全部</text>
</view>
<swiper class="recent-swiper" next-margin="38rpx" bindchange="swiperRecentChange">
<block wx:for="{{banner}}" wx:key="id">
<block wx:for="{{activity}}" wx:key="id">
<swiper-item class="recent-item">
<image class="{{swiperRecentCurrent === index ? 'recent-item-left' : '' }} {{swiperRecentCurrent === banner.length - 1 ? 'recent-item-center' : ''}}" src="{{item.cover}}"></image>
</swiper-item>
......@@ -29,20 +29,24 @@
<view class="title row con-b align-c">
<image src="./image/title-movie.png">热映影片</image>
<text bindtap="onAllRecent">查看全部</text>
<text bindtap="onAllMovie">查看全部</text>
</view>
<swiper class="movie-swiper" next-margin="38rpx" bindchange="swiperMovieChange">
<block wx:for="{{movieList}}" wx:key="id">
<swiper-item class="movie-item col con-e">
<view class="movie-wrapper {{swiperMovieCurrent === index ? 'movie-item-left' : '' }} {{swiperMovieCurrent === movieList.length - 1 ? 'movie-item-center' : ''}}">
<view class="movie-wrapper {{swiperMovieCurrent === index ? 'movie-item-left' : '' }} {{swiperMovieCurrent === movieList.length - 1 ? 'movie-item-center' : ''}}" bindtap="onMovieDetail" data-id="{{item.name}}">
<view class="movie-cover">
<image src="{{item.cover}}"></image>
</view>
<view class="movie-info-wrapper">
<view class="movie-name row">
<view class="row">
<view class="movie-name">
<text>{{item.movieName}}</text>
<view class="movie-dimensional">
<text>{{item.movieType}}</text>
</view>
<view class="movie-tags">
<block wx:for="{{item.tags}}" wx:for-item="tags" wx:key="index">
<text>{{tags}}</text>
</block>
</view>
</view>
<view class="movie-info row">
......@@ -75,8 +79,8 @@
<view class="title row align-c">
<image src="./image/title-route.png">游客攻略</image>
</view>
<view class="route-list">
<view style="margin-bottom:10px">
<l-water-flow column-gap="14rpx" generic:l-water-flow-item="strategy-item" bind:linitemtap="onStrategyDetail"></l-water-flow>
</view>
</view>
</view>
\ No newline at end of file
......@@ -156,25 +156,27 @@
margin-left: 40rpx;
}
.movie-name text {
display: -webkit-box;
.movie-name {
max-width: 240rpx;
color: #15191f;
font-size: 30rpx;
max-width: 240rpx;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
overflow: hidden;
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap;
}
.movie-dimensional {
width: 52rpx;
.movie-tags {
flex: 1;
flex-wrap: wrap;
overflow: hidden;
height: 32rpx;
margin-top: 6rpx;
line-height: 32rpx;
}
.movie-tags text {
margin-left: 12rpx;
padding: 0 13rpx;
color: #fff;
font-size: 20rpx;
text-align: center;
line-height: 32rpx;
background: #15191f;
opacity: 0.5;
border-radius: 4rpx;
......@@ -190,9 +192,13 @@
}
.movie-info-right {
flex: 1;
margin-left: 8rpx;
color: #656e7b;
overflow: hidden;
white-space:nowrap;
overflow:hidden;
text-overflow:ellipsis;
}
.movie-btn {
......
......@@ -19,6 +19,7 @@ Page({
},
success: (response) => {
let movieInfo = response.data
movieInfo.tags = movieInfo.tags.split(' ')
// for (let key in movieInfo.allTimes) {
// console.log(key)
// }
......
......@@ -27,9 +27,11 @@
<view class="movie-info-wrapper">
<view class="movie-name row">
<text>{{movieInfo.filmName}}</text>
<view class="movie-dimensional">
<text>{{movieInfo.tags}}</text>
<block wx:for="{{movieInfo.tags}}" wx:for-item="tags" wx:key="index">
<view class="movie-tags">
<text>{{tags}}</text>
</view>
</block>
</view>
<view class="movie-info row">
<view class="movie-info-left">
......@@ -54,7 +56,7 @@
</view>
</view>
<!-- 无场次 -->
<view class="show-end col align-c" wx:if="{{false}}">
<view class="show-end col align-c" wx:if="{{showList[0].length === 0 && showList[1].length === 0}}">
<image src=""></image>
<text>观影已结束,请期待后续排片</text>
</view>
......
......@@ -58,12 +58,15 @@ page {
height: 60rpx;
color: #fff;
font-size: 30rpx;
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap;
}
.movie-dimensional {
width: 52rpx;
.movie-tags {
height: 32rpx;
margin-top: 6rpx;
margin-left: 12rpx;
padding: 0 13rpx;
color: #fff;
font-size: 20rpx;
text-align: center;
......
......@@ -17,7 +17,16 @@ Page({
// 今日热映
movieToday: [],
//全部热映
movieAll: {}
movieAll: {
movieWeek: {
title: '本周热映',
list: []
},
movieNextWeek: {
title: '下周热映',
list: []
}
}
},
onLoad: function () {
this.getTodayFilm()
......@@ -44,6 +53,8 @@ Page({
v.filmType = v.filmType.replace(/\//g, ' / ')
v.filmDirector = v.filmDirector.replace(/\//g, ' ')
v.filmLead = v.filmLead.replace(/\//g, ' ')
v.free = v.ownerPrice === '0' ? '免费' : `¥${v.ownerPrice.toFixed(2)}`
v.tags = v.tags.split(' ')
})
this.setData({
movieToday
......@@ -76,6 +87,8 @@ Page({
v.filmType = v.filmType.replace(/\//g, ' / ')
v.filmDirector = v.filmDirector.replace(/\//g, ' ')
v.filmLead = v.filmLead.replace(/\//g, ' ')
v.free = v.ownerPrice === 0 ? '免费' : `¥${v.ownerPrice.toFixed(2)}`
v.tags = v.tags.split(' ')
})
this.setData({
'movieAll.movieWeek': {
......@@ -99,6 +112,8 @@ Page({
v.filmType = v.filmType.replace(/\//g, ' / ')
v.filmDirector = v.filmDirector.replace(/\//g, ' ')
v.filmLead = v.filmLead.replace(/\//g, ' ')
v.free = v.ownerPrice === 0 ? '免费' : `¥${v.ownerPrice.toFixed(2)}`
v.tags = v.tags.split(' ')
})
this.setData({
'movieAll.movieNextWeek': {
......
......@@ -28,10 +28,14 @@
<image src="{{item.cover}}"></image>
</view>
<view class="movie-info-wrapper">
<view class="movie-name row">
<text>{{item.filmName}}</text>
<view class="movie-dimensional">
<text>{{item.tags}}</text>
<view class="row">
<view class="movie-name">
<text>{{item.movieName}}</text>
</view>
<view class="movie-tags">
<block wx:for="{{item.tags}}" wx:for-item="tags" wx:key="index">
<text>{{tags}}</text>
</block>
</view>
</view>
<view class="movie-info row">
......@@ -62,7 +66,7 @@
<text>{{item.keyword}}</text>
</view>
<view class="movie-free">
<text>{{item.ownerPrice === 0 ? '免费' : item.ownerPrice}}</text>
<text>{{item.free}}</text>
</view>
<view class="movie-btn" catchtap="onReportMovie" data-movieId="{{item.activityId}}">
<text>报名观影</text>
......@@ -93,9 +97,11 @@
<view class="movie-name">
<text>{{item.filmName}}</text>
</view>
<view class="movie-dimensional">
<text>{{item.tags}}</text>
<block wx:for="{{item.tags}}" wx:for-item="tagsItem" wx:for-index="tagsIndex" wx:key="tagsIndex">
<view class="movie-tags">
<text>{{tagsItem}}</text>
</view>
</block>
</view>
<view class="movie-info row">
<view class="movie-info-left">
......@@ -125,7 +131,7 @@
<text>{{item.keyword}}</text>
</view>
<view class="movie-free">
<text>{{item.ownerPrice === 0 ? '免费' : item.ownerPrice}}</text>
<text>{{item.free}}</text>
</view>
</view>
</view>
......
......@@ -76,28 +76,28 @@ page {
height: 52rpx;
}
.movie-name {
max-width: 240rpx;
color: #fff;
font-size: 30rpx;
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap;
}
.movie-dimensional {
.movie-tags {
flex: 1;
flex-wrap: wrap;
overflow: hidden;
height: 32rpx;
max-width: 110rpx;
padding: 0 13rpx;
margin-top: 6rpx;
line-height: 32rpx;
}
.movie-tags text {
margin-left: 12rpx;
padding: 2rpx 13rpx;
color: #fff;
font-size: 20rpx;
text-align: center;
line-height: 32rpx;
background: #15191F;
opacity: .5;
background: #15191f;
opacity: 0.5;
border-radius: 4rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.movie-info {
margin-top: 8rpx;
......@@ -107,13 +107,12 @@ page {
color: #72727A;
}
.movie-info-right {
display: -webkit-box;
width: 265rpx;
margin-left: 16rpx;
color: #C2C7CF;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
overflow: hidden;
white-space:nowrap;
overflow:hidden;
text-overflow:ellipsis;
}
.movie-label {
height:32rpx;
......
......@@ -17,8 +17,8 @@ Page({
this.setData({
bannerHeight: wx.getSystemInfoSync().windowHeight
})
this.queryDetail(Number(options.id))
// this.queryDetail(1)
// this.queryDetail(Number(options.id))
this.queryDetail(1)
},
/**
......
......@@ -92,6 +92,8 @@ page {
width: 750rpx;
height: 100%;
}
/* 分享弹窗 */
.popupImage {
width: 606rpx;
height: 977rpx;
......
......@@ -11,7 +11,8 @@ Page({
imageBase: App.globalData.appImageBase,
option: {},
// 弹出控制
showPopup: false,
// 导航栏相关属性
navigationStyle: {
normal: {
......@@ -61,8 +62,6 @@ Page({
isBlack: false,
sideHeight: 550,
......@@ -73,7 +72,10 @@ Page({
this.setData({
option: options
})
console.log(this.data.option)
this.queryDetail(Number(options.id))
this.getAppraise()
this.queryDetailCommodity()
},
/**
......@@ -104,7 +106,8 @@ Page({
time: '7.20-7.25 10:00-11:30',
price: '150',
specialPrice: '100',
}, {
},
{
cover: '',
title: '装饰干花工作坊',
tab: '亲子教育',
......@@ -243,12 +246,12 @@ Page({
for (let i = 0, l = App.globalData.shopId.length; i < l; i++) {
if (funcAppId === App.globalData.shopId[i].appId) {
let funcItem = {
'id': 'd9436d7018de43809824b6ec221ea01f',
'appId': 6,
'name': '原味舒食',
'logo': 'shop/logo-6.png',
'cover': 'shop/cover-6.png',
'shopType': ''
'id': App.globalData.shopId[i].id,
'appId': App.globalData.shopId[i].appId,
'name': App.globalData.shopId[i].name,
'logo': App.globalData.shopId[i].logo,
'cover': App.globalData.shopId[i].cover,
'shopType': '4'
}
wx.setStorageSync('shopInfoBuffer', funcItem)
break
......@@ -282,7 +285,20 @@ Page({
},
queryDetailCommodity: function () {
let that = this
let officeId = wx.getStorageSync('shopInfoBuffer').id
let genre = wx.getStorageSync('shopInfoBuffer').shopType
App.wxRequest({
url: '/api/v1/commodity/recommend',
data: {
'officeId': officeId,
'genre': genre,
'tag': '201'
},
success: function(res) {
console.log(res)
}
})
},
onLocation: function () {
......@@ -383,4 +399,45 @@ Page({
bannerIndex: funcEvent.detail.current
})
},
// 查询评论列表
getAppraise: function () {
let that = this
let officeId = wx.getStorageSync('shopInfoBuffer').id
App.wxRequest({
url: '/api/v1/appraise/getList',
data: {
'pageNo': '1',
'pageSize': '-1',
'officeId': officeId
},
success: function(res) {
let funcData = res.data
that.setData({
detailEvaluate: funcData.list
})
}
})
},
// 预览图片
onPreviewImage: function(e) {
const current = e.currentTarget.dataset.url
const index = e.currentTarget.dataset.index
const urls = this.data.detailEvaluate[index].imgUrls
wx.previewImage({
current,
urls
})
},
// 点击分享图标
onShare: function () {
this.setData({
showPopup: true
})
},
// 点击取消
onCancel: function () {
this.setData({
showPopup: false
})
},
})
\ No newline at end of file
......@@ -15,6 +15,10 @@
height: 60rpx;
}
.movie {
color: #fff;
background-color: #1C1C25;
}
.banner {
z-index: 9;
......@@ -151,6 +155,9 @@
color: #15191F;
line-height: 76rpx;
}
.movie-title {
color: #fff;
}
.commodity-title text {
flex-grow: 1;
......@@ -170,6 +177,9 @@
font-weight: 400;
line-height: 44rpx;
}
.movie-border {
border-bottom: 1px #3A3A40 solid !important;
}
.commodity-other image {
width: 40rpx;
......@@ -187,11 +197,19 @@
margin-top: 80rpx;
padding: 0 40rpx;
}
.movie-card-title {
margin-top:160rpx;
padding: 0 40rpx;
}
.commodity-card-title text:nth-child(1) {
font-size: 40rpx;
font-weight: 800;
}
.movie-card-title text:nth-child(1) {
font-size: 40rpx;
font-weight: 800;
}
.commodity-card-title text:nth-child(2) {
font-size: 26rpx;
......@@ -215,18 +233,35 @@
border-radius: 4px;
background: #F5F6F8;
}
.movie-card-item {
width: 300rpx;
margin-right: 24rpx;
padding-bottom: 32rpx;
border-radius: 4px;
background:#303041;
}
.commodity-card-item > image {
width: 562rpx;
height: 316rpx;
background: #999999;
}
.movie-card-item > image {
width: 300rpx;
height: 369rpx;
background: #999999;
}
.commodity-card-item-title {
height: 44rpx;
margin-top: 32rpx;
padding: 0 32rpx;
}
.movie-card-item-title {
height: 37rpx;
margin-top: 21rpx;
padding: 0 20rpx;
}
.commodity-card-item-title text:nth-child(1) {
font-size: 30rpx;
......@@ -234,6 +269,12 @@
line-height: 44rpx;
color: #15191F;
}
.movie-card-item-title text:nth-child(1) {
font-size: 26rpx;
font-weight: 400;
line-height: 37rpx;
color: #15191F;
}
.commodity-card-item-title text:nth-child(2) {
width: 96rpx;
......@@ -270,10 +311,42 @@
color: #656E7B;
}
.movie-card-item-info:first-child {
height: 33rpx;
margin-top: 13rpx;
padding: 0 20rpx;
}
.movie-card-item-info:last-child {
height: 33rpx;
margin-top: 9rpx;
padding: 0 20rpx;
}
.movie-card-item-info-left {
width: 44rpx;
height: 33rpx;
font-size: 22rpx;
font-weight: 400;
color: #959DA9;
line-height: 32rpx;
}
.movie-card-item-info-right {
height: 33rpx;
margin-left: 8rpx;
font-size: 22rpx;
font-weight: 400;
color: #C2C7CF;
line-height: 32rpx;
}
.commodity-card-item-operation {
margin-top: 16rpx;
padding: 0 32rpx;
}
.movie-card-item-operation {
margin-top: 16rpx;
padding: 0 20rpx;
}
.commodity-card-item-operation text:nth-child(1) {
width: 78rpx;
......@@ -289,6 +362,29 @@
color: #E8D0AF;
}
.movie-card-item-operation text:nth-child(1) {
width: 52px;
font-size: 26rpx;
font-weight: 500;
color: #FFFFFF;
line-height: 40rpx;
}
.commodity-card-item-operation text:nth-child(1) {
width: 78rpx;
height: 32rpx;
margin-right: 12rpx;
background: linear-gradient(180deg, #3F4357 0%, #252532 100%);
border-radius: 4px;
text-align: center;
font-size: 18rpx;
font-weight: 500;
line-height: 28rpx;
color: #E8D0AF;
}
.commodity-card-item-operation text:nth-child(2) {
margin-right: 16rpx;
text-align: center;
......@@ -312,11 +408,52 @@
height: 56rpx;
border-radius: 4px;
background: #86C5E1;
color: #FFFFFF;
font-size: 26rpx;
font-weight: 500;
line-height: 36rpx;
}
.movie-card-item-operation button {
flex-grow: 1;
width: 152rpx;
height: 57rpx;
border-radius: 4rpx;
background:#595967;
color: #FFFFFF;
font-size: 26rpx;
font-weight: 500;
line-height: 36rpx;
}
.movie-footer {
width: 750rpx;
height: 150rpx;
background-color: #ccc;
}
/* 分享弹窗 */
.popupImage {
width: 606rpx;
height: 977rpx;
margin-bottom: 64rpx;
background-color: #ccc;
}
.cancel, .download {
width: 288rpx;
height: 96rpx;
text-align: center;
line-height: 96rpx;
border-radius: 4rpx;
}
.cancel {
color: #15191F;
background-color: #fff;
}
.download {
color: #fff;
background-color: #15191F;
}
/* 简介,评论 */
......@@ -350,6 +487,17 @@
line-height: 44rpx;
color: #15191F;
}
.selection-content-item-active-movie {
width: 60rpx;
height: 64rpx;
margin-right: 64rpx;
border-bottom: 4rpx #fff solid;
font-size: 30rpx;
font-weight: 800;
line-height: 44rpx;
color: #fff;
}
/* 详情 */
.detail {
......
......@@ -26,13 +26,13 @@ Page({
name: '海错图展馆',
cover: App.globalData.appResourcesBase + 'play/detail/detail-1-2.png',
x: 108,
y: 212,
y: 232,
}, {
appId: 5,
name: '拾光花坊',
cover: App.globalData.appResourcesBase + 'play/detail/detail-1-3.png',
x: 108,
y: 264,
y: 246,
}]
}, {
describe: [
......@@ -43,7 +43,7 @@ Page({
name: '水元养韵SPA',
cover: App.globalData.appResourcesBase + 'play/detail/detail-2-2.png',
x: 108,
y: 212,
y: 246,
}]
}, {
describe: [
......@@ -54,13 +54,13 @@ Page({
name: '原味舒食',
cover: App.globalData.appResourcesBase + 'play/detail/detail-3-2.png',
x: 108,
y: 212,
y: 232,
}, {
appId: 4,
name: '原野MOJITO',
cover: App.globalData.appResourcesBase + 'play/detail/detail-3-3.png',
x: 108,
y: 212,
y: 246,
}]
}, {
describe: [
......@@ -71,7 +71,7 @@ Page({
name: '星空影院',
cover: App.globalData.appResourcesBase + 'play/detail/detail-4-2.png',
x: 108,
y: 212,
y: 246,
}]
}, {
describe: [
......
......@@ -7,7 +7,7 @@ page {
}
.container {
margin-top: 60rpx;
margin-top: 120rpx;
}
/* 详情 */
......
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