Commit 0b5a6663 by TengFengLian

Merge branch 'master' of http://120.77.182.185/yanl/mini-shimao into master

parents 7cc3f14a be4586cf
......@@ -46,32 +46,32 @@ App({
},
wxRequest: function (obj) {
let that = this
var token = that.globalData.token
var token = this.globalData.token
var param = obj.data ? JSON.stringify(obj.data) : ""
var header = obj.header ? obj.header : { 'token': token || '', }
wx.request({
url: that.globalData.baseUrl + obj.url,
url: this.globalData.baseUrl + obj.url,
data: param,
method: obj.method || "POST",
header: header,
success: function (res) {
// console.log("接口:", that.globalData.baseUrl + obj.url);
success: (res) => {
// console.log("接口:", this.globalData.baseUrl + obj.url);
// console.log("参数:", JSON.stringify(obj.data));
// console.log("返回:", res);
let code = res.data.code * 1;
if (200 == code && true == res.data.success) {
if (200 == code) {
// if (200 == code && true == res.data.success) {
if (obj.success) {
obj.success(res.data)
}
} else if (402 == code) { // token失效
// that.refreshToken({
// success: function () {
// that.wxRequest(obj)
// }
// })
this.refreshToken({
success: function () {
this.wxRequest(obj)
}
})
} else {
if (obj.fail) {
let err = {
......@@ -82,10 +82,10 @@ App({
}
}
},
fail: function (err) {
console.log("接口:", that.globalData.baseUrl + obj.url);
console.log("参数:", obj.data);
console.log("返回:", err);
fail: (err) => {
console.log("接口:", this.globalData.baseUrl + obj.url)
console.log("参数:", obj.data)
console.log("返回:", err)
if (obj.fail) {
let err = {
statusCode: 9999,
......@@ -149,16 +149,16 @@ App({
}
},
registUserInfo(obj) {
registUserInfo: function (obj) {
this.wxRequest({
url: '/api/v1/login/getDecryptData',
data: obj.param,
success: function (res) {
success: (res) => {
if (obj.success) {
obj.success(res)
}
},
fail: function (err) {
fail: (err) => {
if (obj.fail) {
obj.fail(err)
}
......@@ -166,25 +166,23 @@ App({
})
},
refreshToken(obj) {
let that = this
refreshToken: function (obj) {
this.wxRequest({
url: '/api/v1/login/refreshToken',
header: {
token: this.globalData.token,
refreshToken: this.globalData.refreshToken
},
success: function (res) {
success: (res) => {
let token = res.data.token
let refreshToken = res.data.refreshToken
that.globalData.token = token
that.globalData.refreshToken = refreshToken
this.globalData.token = token
this.globalData.refreshToken = refreshToken
if (obj.success) {
obj.success()
}
}
})
}
......
......@@ -59,29 +59,29 @@
],
"usingComponents": {
"navigation": "../component/navigation/navigation",
"swiper-point": "../component/swiper-point/swiper-point",
"l-avatar": "../miniprogram_npm/lin-ui/avatar/index",
"l-button": "../miniprogram_npm/lin-ui/button/index",
"l-capsule-bar": "../miniprogram_npm/lin-ui/capsule-bar/index",
"l-card": "../miniprogram_npm/lin-ui/card/index",
"l-checkbox": "../miniprogram_npm/lin-ui/checkbox/index",
"l-checkbox-group": "../miniprogram_npm/lin-ui/checkbox-group/index",
"l-dialog": "../miniprogram_npm/lin-ui/dialog/index",
"l-icon": "../miniprogram_npm/lin-ui/icon/index",
"l-list": "../miniprogram_npm/lin-ui/list/index",
"l-price": "../miniprogram_npm/lin-ui/price/index",
"l-tabs": "../miniprogram_npm/lin-ui/tabs/index",
"l-tabpanel": "../miniprogram_npm/lin-ui/tabpanel/index",
"l-toast": "../miniprogram_npm/lin-ui/toast/index",
"l-water-flow": "../miniprogram_npm/lin-ui/water-flow/index",
"l-input": "../miniprogram_npm/lin-ui/input/index",
"l-mask": "../miniprogram_npm/lin-ui/mask/index",
"l-arc-popup": "../miniprogram_npm/lin-ui/arc-popup/index",
"l-collapse": "../miniprogram_npm/lin-ui/collapse/index",
"l-collapse-item": "../miniprogram_npm/lin-ui/collapse-item/index",
"l-textarea": "../miniprogram_npm/lin-ui/textarea/index",
"l-notice-bar": "../miniprogram_npm/lin-ui/notice-bar/index",
"navigation": "./component/navigation/navigation",
"swiper-point": "./component/swiper-point/swiper-point",
"l-avatar": "./miniprogram_npm/lin-ui/avatar/index",
"l-button": "./miniprogram_npm/lin-ui/button/index",
"l-capsule-bar": "./miniprogram_npm/lin-ui/capsule-bar/index",
"l-card": "./miniprogram_npm/lin-ui/card/index",
"l-checkbox": "./miniprogram_npm/lin-ui/checkbox/index",
"l-checkbox-group": "./miniprogram_npm/lin-ui/checkbox-group/index",
"l-dialog": "./miniprogram_npm/lin-ui/dialog/index",
"l-icon": "./miniprogram_npm/lin-ui/icon/index",
"l-list": "./miniprogram_npm/lin-ui/list/index",
"l-price": "./miniprogram_npm/lin-ui/price/index",
"l-tabs": "./miniprogram_npm/lin-ui/tabs/index",
"l-tabpanel": "./miniprogram_npm/lin-ui/tabpanel/index",
"l-toast": "./miniprogram_npm/lin-ui/toast/index",
"l-water-flow": "./miniprogram_npm/lin-ui/water-flow/index",
"l-input": "./miniprogram_npm/lin-ui/input/index",
"l-mask": "./miniprogram_npm/lin-ui/mask/index",
"l-arc-popup": "./miniprogram_npm/lin-ui/arc-popup/index",
"l-collapse": "./miniprogram_npm/lin-ui/collapse/index",
"l-collapse-item": "./miniprogram_npm/lin-ui/collapse-item/index",
"l-textarea": "./miniprogram_npm/lin-ui/textarea/index",
"l-notice-bar": "./miniprogram_npm/lin-ui/notice-bar/index",
"l-popup": "./miniprogram_npm/lin-ui/popup/index",
"l-image-picker": "./miniprogram_npm/lin-ui/image-picker/index",
"l-rate": "./miniprogram_npm/lin-ui/rate/index"
......
......@@ -14,6 +14,10 @@ Page({
},
onLoad: function () {
},
onShow: function () {
this.queryRecommend()
},
......
......@@ -36,6 +36,11 @@ Page({
this.querySideBar()
},
onUnload: function () {
// 离开页面清空商品数据
wx.setStorageSync('shoppingCartBuffer', [])
},
/**
* 添加动画初始
* @function
......@@ -143,7 +148,7 @@ Page({
for (let i = 0, l = funcResponse.length; i < l; i++) {
let funcItem = {
'id': funcResponse[i].id, // 商品标识
'typeId': funcResponse[i].classifyId, // 商品分类标识
'typeId': funcResponse[i].genre, // 商品分类标识
'inventoriesId': funcResponse[i].inventoriesId, // 仓库标识
'name': funcResponse[i].name,
'cover': funcResponse[i].coverImg, // 商品封面
......@@ -157,6 +162,7 @@ Page({
'describe': funcResponse[i].synopsis,
'describeDetail': '', // 商品描述详情,在点击详情时获得数据
'tags': funcResponse[i].tags,
'notificationId': funcResponse[i].notificationId, // 下单须知
'quantityMin': 1,
'quantityMax': funcResponse[i].number,
......
......@@ -7,6 +7,7 @@ Page({
animationData: {},
animationPointHeight: 0,
animationPointOrigin: 0,
winAnimationPoint: false,
......@@ -30,12 +31,19 @@ Page({
},
onLoad: function () {
this.resetShoppingCart()
this.setCartAnimation()
this.setShopInfo()
this.querySideBar()
},
onShow: function () {
if (wx.getStorageSync('shoppingCartBuffer').length === 0) {
this.resetShoppingCart()
}
},
/**
* 添加动画初始
* @function
......@@ -48,6 +56,16 @@ Page({
duration: 500,
timingFunction: 'ease'
})
// 获取购物车高度
const funcQuery = wx.createSelectorQuery()
funcQuery.select('#cart').boundingClientRect()
funcQuery.exec((result) => {
console.log(result)
this.setData({
animationPointOrigin: result[0].top + 4
})
})
},
/**
......@@ -69,7 +87,7 @@ Page({
winAnimationPoint: true,
})
let funcTimer = setTimeout(() => {
this.animation.translate(0, 0).step()
this.animation.translate(0, this.data.animationPointOrigin).step()
this.setData({
animationData: this.animation.export(),
// winAnimationPoint: false,
......@@ -86,6 +104,14 @@ Page({
console.log(this.data.shopInfo)
},
resetShoppingCart: function () {
this.setData({
shoppingCart: [],
shoppingCartTotal: 0,
})
wx.setStorageSync('shoppingCartBuffer', [])
},
/**
* 查询分类
* @function
......@@ -143,7 +169,7 @@ Page({
for (let i = 0, l = funcResponse.length; i < l; i++) {
let funcItem = {
'id': funcResponse[i].id, // 商品标识
'typeId': funcResponse[i].classifyId, // 商品分类标识
'typeId': funcResponse[i].genre, // 商品分类标识
'inventoriesId': funcResponse[i].inventoriesId, // 仓库标识
'name': funcResponse[i].name,
'cover': funcResponse[i].coverImg, // 商品封面
......@@ -157,9 +183,10 @@ Page({
'describe': funcResponse[i].synopsis,
'describeDetail': '', // 商品描述详情,在点击详情时获得数据
'tags': funcResponse[i].tags,
'notificationId': funcResponse[i].notificationId, // 下单须知
'quantityMin': 1,
'quantityMax': funcResponse[i].number,
'quantityMax': funcResponse[i].number < 20 ? funcResponse[i].number : 20, // 最大上限 20 件
'isActive': true,
}
......@@ -183,6 +210,9 @@ Page({
winLoading: false,
commodityList: funcCommodityList,
})
console.log('commodityList')
console.log(JSON.stringify(this.data.commodityList))
},
})
},
......@@ -212,6 +242,7 @@ Page({
* @returns
*/
onCommodityDetail: function (event) {
console.log('onCommodityDetail', event)
let funcItem = event.currentTarget.dataset.item
App.wxRequest({
......
......@@ -31,8 +31,8 @@
<view class="menu-list">
<view class="right-content-title">{{menuTitle}}</view>
<block wx:for="{{commodityList}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="commodity-item row">
<view class="item-img" data-item="{{item}}" bindtap="onCommodityDetail">
<view class="commodity-item row" data-item="{{item}}" bind:tap="onCommodityDetail">
<view class="item-img">
<image src="{{item.cover}}" mode="widthFix"></image>
</view>
<view class="item-info">
......@@ -79,7 +79,7 @@
</view>
<view class="item-operation-add">
<button class="row con-c align-c" data-item="{{item}}" bindtap="onCommodityAdd">
<button class="row con-c align-c" data-item="{{item}}" catchtap="onCommodityAdd">
<image mode="widthFix" src="{{imageBase + 'icon/cart-3.png'}}"></image>
</button>
</view>
......@@ -89,7 +89,7 @@
</block>
<!-- 购物车按钮 -->
<view class="cart-btn row con-c align-c" bindtap="onShoppingCart">
<view id="cart" class="cart row con-c align-c" bindtap="onShoppingCart">
<!-- 添加动画圆点 -->
<view class="cart-animation" wx:if="{{winAnimationPoint}}" animation="{{animationData}}"></view>
......
......@@ -58,7 +58,7 @@ page {
color: #959da9;
}
.cart-btn {
.cart {
position: fixed;
right: 48rpx;
bottom: 160rpx;
......@@ -378,9 +378,10 @@ image {
/* 购物车样式 */
.cart-animation {
position: fixed;
top: 0;
right: 48rpx;
width: 26rpx;
height: 26rpx;
border-radius: 50%;
background: red;
background: #86c5e1;
}
\ No newline at end of file
......@@ -36,6 +36,11 @@ Page({
this.querySideBar()
},
onUnload: function () {
// 离开页面清空商品数据
wx.setStorageSync('shoppingCartBuffer', [])
},
/**
* 添加动画初始
* @function
......@@ -143,7 +148,7 @@ Page({
for (let i = 0, l = funcResponse.length; i < l; i++) {
let funcItem = {
'id': funcResponse[i].id, // 商品标识
'typeId': funcResponse[i].classifyId, // 商品分类标识
'typeId': funcResponse[i].genre, // 商品分类标识
'inventoriesId': funcResponse[i].inventoriesId, // 仓库标识
'name': funcResponse[i].name,
'cover': funcResponse[i].coverImg, // 商品封面
......@@ -157,6 +162,7 @@ Page({
'describe': funcResponse[i].synopsis,
'describeDetail': '', // 商品描述详情,在点击详情时获得数据
'tags': funcResponse[i].tags,
'notificationId': funcResponse[i].notificationId, // 下单须知
'quantityMin': 1,
'quantityMax': funcResponse[i].number,
......
......@@ -81,7 +81,7 @@ Page({
for (let i = 0, l = funcResponse.length; i < l; i++) {
let funcItem = {
'id': funcResponse[i].id, // 商品标识
'typeId': funcResponse[i].classifyId, // 商品分类标识
'typeId': funcResponse[i].genre, // 商品类型
'inventoriesId': funcResponse[i].inventorie[0].inventoriesId, // 仓库标识
'name': funcResponse[i].name,
'cover': funcResponse[i].coverImg, // 商品封面
......@@ -112,7 +112,6 @@ Page({
funcCommodityList.push(funcItem)
}
console.log(JSON.stringify(funcCommodityList))
break
// 普通商品
......@@ -153,7 +152,6 @@ Page({
}
funcCommodityList.push(funcItem)
}
console.log(JSON.stringify(funcCommodityList))
break
}
......@@ -176,8 +174,6 @@ Page({
funcCommodityInfo.isActive = true
wx.setStorageSync('shoppingCartBuffer', [funcCommodityInfo])
console.log(JSON.stringify(funcCommodityInfo))
wx.navigateTo({
url: '/pages/pay/order-input/order-input?type=' + this.data.shopInfo.shopType
})
......
......@@ -29,98 +29,17 @@ Page({
projectType: 3,
btn: '购买门票',
titleImg: '',
list: [
{
id: 0,
cover: '',
name: '海错图平日票',
msg: {
0: '周一至周五'
},
priceSpecial: '42',
price: '49',
unit: '人'
},
{
id: 1,
cover: '',
name: '海错图平日票',
msg: {
0: '周六至周日'
},
priceSpecial: '42',
price: '49',
unit: '人'
}
]
list: []
},
projectSpa: {
projectType: 2,
btn: '查看服务',
list: [
{
id: '0',
name: 'SPA套餐',
cover: '',
priceSpecial: '298 - 698',
price: '300 - 900',
unit: '人'
}
]
list: []
},
projectChild: {
projectType: 1,
btn: '购买门票',
list: [
{
id: 0,
name: '日票(次票)',
priceSpecial: '10',
price: '49',
unit: '次',
msg: {
0: '单次进园',
1: '室外游乐设备免费',
2: '室内场馆及马场需单独收费'
}
},
{
id: 1,
name: '日票(套票)',
priceSpecial: '80',
price: '100',
unit: '次',
msg: {
0: '单次进园',
1: '室外游乐设备免费',
2: '室内场馆及马场均免费'
}
},
{
id: 2,
name: '儿童营地月卡',
priceSpecial: '300',
price: '500',
unit: '人',
msg: {
0: '一个月内无限次进园',
1: '室外游乐设备免费',
2: '室内场馆及马场均免费'
}
},
{
id: 3,
name: '儿童营地年卡',
priceSpecial: '1680',
price: '2680',
unit: '人',
msg: {
0: '一年内无限次进园',
1: '室外游乐设备免费',
2: '室内场馆及马场均免费'
}
}
]
list: []
}
}
},
......@@ -178,7 +97,7 @@ Page({
'priceSpecialText': App.modular.utils.formatAmount(funcResponse[i].inventorie[0].ownerPrice), // 业主价文本格式
'priceDiscount': funcResponse[i].inventorie[0].price, // 活动价
'priceDiscountText': App.modular.utils.formatAmount(funcResponse[i].inventorie[0].price), // 活动价文本格式
'priceType': 1,
'priceType': '',
'describe': funcResponse[i].synopsis,
'tags': funcResponse[i].tags,
}
......
......@@ -17,7 +17,7 @@ Page({
amountPay: 0, // 支付金额
amountDiscount: 0, // 优惠金额
winToast: false,
......@@ -80,15 +80,6 @@ Page({
onLoad: function () {
this.setShopInfo()
// // 读取上级页面的购物车数据,默认选中所有。
// let funcShoppingCart = wx.getStorageSync('shoppingCartBuffer')
// for (let i = 0, l = funcShoppingCart.length; i < l; i++) {
// // 设置默认库存为 100 ,在提交订单时矫正为实际库存
// funcShoppingCart[i].quantityMin = 1
// funcShoppingCart[i].quantityMax = 100
// funcShoppingCart[i].isActive = true
// }
this.setData({
shoppingCart: wx.getStorageSync('shoppingCartBuffer')
})
......@@ -96,6 +87,10 @@ Page({
this.selectionTotal()
},
onShow: function () {
},
/**
* 设置本店信息
* @function
......@@ -142,12 +137,16 @@ Page({
let funcIndex = event.currentTarget.dataset.index
let funcShoppingCart = this.data.shoppingCart
if (funcShoppingCart[funcIndex].quantity === 1) return
funcShoppingCart[funcIndex].quantity = funcShoppingCart[funcIndex].quantity - 1
// 当数量减少到零时,移除改商品
if (funcShoppingCart[funcIndex].quantity === 1) {
funcShoppingCart.splice(funcIndex, 1)
} else {
funcShoppingCart[funcIndex].quantity = funcShoppingCart[funcIndex].quantity - 1
}
this.setData({
shoppingCart: funcShoppingCart
})
this.selectionTotal()
},
......@@ -161,8 +160,8 @@ Page({
let funcIndex = event.currentTarget.dataset.index
let funcShoppingCart = this.data.shoppingCart
if (funcShoppingCart[funcIndex].quantityMax < funcShoppingCart[funcIndex].quantity) return
funcShoppingCart[funcIndex].quantity = funcShoppingCart[funcIndex].quantity + 1
if (funcShoppingCart[funcIndex].quantityMax <= funcShoppingCart[funcIndex].quantity) return
funcShoppingCart[funcIndex].quantity = funcShoppingCart[funcIndex].quantity + 10
this.setData({
shoppingCart: funcShoppingCart
})
......@@ -271,14 +270,46 @@ Page({
amountPay: funcAmountPay,
amountDiscount: funcAmountDiscount,
selectionTotal: funcSelectionTotal,
allSelectionIsActive: funcCommodityTotal === funcSelectionTotal ? true : false,
})
if (funcCommodityTotal === funcSelectionTotal && funcCommodityTotal !== 0) {
this.setData({
allSelectionIsActive: true
})
} else {
this.setData({
allSelectionIsActive: false
})
}
// 只要改变购物车数据就缓存
wx.setStorageSync('shoppingCartBuffer', this.data.shoppingCart)
},
onPaySubmit: function () {
// 检查购物车是否拥有商品
let funcShoppingCart = this.data.shoppingCart
if (funcShoppingCart.length === 0) {
this.setData({
winToast: true
})
return
}
// 检查是否有商品被选中
let funcIsSelection = false
for (let i = 0, l = funcShoppingCart.length; i < l; i++) {
if (funcShoppingCart[i].isActive) {
funcIsSelection = true
}
}
if (!funcIsSelection) {
this.setData({
winToast: true
})
return
}
// let isEnough = true
// this.setData({
// isEnough
......@@ -301,4 +332,9 @@ Page({
isEnough
})
},
onToBuy: function () {
wx.navigateBack({
delta: 1,
})
}
})
\ No newline at end of file
<navigation class="navigation" titleText="购物车" background="#FFFFFF;" backIcon="/image/back.png"></navigation>
<view class="container">
<l-toast show="{{winToast}}" icon="error" title="请选购商品后结算"></l-toast>
<view class="container" wx:if="{{shoppingCart.length > 0}}">
<view class="shop-info row align-c">
<image wx:if="{{shopLogo}}" src="{{resourcesBase + shopLogo}}" mode="left"></image>
<text>{{shopName}}</text>
......@@ -66,9 +68,9 @@
<view class="list-item-quantity col con-e align-e">
<view class="list-item-quantity-operation row con-b align-c">
<text class="{{item.quantity === item.quantityMin ? 'list-item-quantity-disable' : ''}}" data-index="{{index}}" bindtap="onQuantityReduce">-</text>
<text class="{{item.quantity === item.quantityMin ? '' : ''}}" data-index="{{index}}" bindtap="onQuantityReduce">-</text>
<text>{{item.quantity}}</text>
<text class="{{item.quantityMax < item.quantity ? 'list-item-quantity-disable' : ''}}" data-index="{{index}}" bindtap="onQuantityAdd">+</text>
<text class="{{item.quantityMax <= item.quantity ? 'list-item-quantity-disable' : ''}}" data-index="{{index}}" bindtap="onQuantityAdd">+</text>
</view>
<view class="list-item-quantity-warning">
<text>{{item.quantityMax < 5 ? '仅剩' + item.quantityMax + '件' : ''}}</text>
......@@ -132,5 +134,15 @@
</view>
</view>
<view class="empty col con-c align-c" wx:else>
<image class="empty-cart" src=""></image>
<view class="empty-title">
<text>购物车还没有商品哦</text>
</view>
<view class="empty-btn" bindtap="onToBuy">
<text>去逛逛</text>
</view>
</view>
<!-- 清空弹窗 -->
<l-dialog l-content-class="l-content" l-cancel-class="l-cancel" title-color="#15191F" cancel-color="#656E7B" confirm-color="#5DB5DD"></l-dialog>
\ No newline at end of file
......@@ -315,4 +315,33 @@
font-size: 30rpx;
color: #fff;
background-color: #86c5e1;
}
.empty {
height: 100vh;
}
.empty-cart {
width: 176rpx;
height: 176rpx;
background-color: #ccc;
}
.empty-title {
margin-top: 64rpx;
color: #959DA9;
font-size: 38rpx;
line-height: 52rpx;
}
.empty-btn {
width: 308rpx;
height: 96rpx;
margin-top: 68rpx;
color: #fff;
font-size: 30rpx;
line-height: 96rpx;
text-align: center;
background: #86C5E1;
border-radius: 4rpx;
}
\ No newline at end of file
......@@ -10,6 +10,8 @@ Page({
imageBase: App.globalData.appImageBase,
resourcesBase: App.globalData.appResourcesBase,
isLogin: false, // 是否登录
// 导航栏相关属性
navigationStyle: {
normal: {
......@@ -53,9 +55,26 @@ Page({
pageNo: 1,
pageSize: 10,
// 底部图片数据
footerImage: [
{
id: 0,
url: ''
},
{
id: 1,
url: ''
},
{
id: 2,
url: ''
}
]
},
onLoad: function (options) {
this.setNavigationLogo()
this.setLogin()
},
onShow: function() {
this.setData({
......@@ -70,7 +89,14 @@ Page({
}
})
},
setLogin: function () {
let funcUserInfo = wx.getStorageSync('userInfo')
if (funcUserInfo.phone && funcUserInfo.name && funcUserInfo.avatar) {
this.setData({
isLogin: true,
})
}
},
onShareAppMessage: function (res) {
if (res.from === 'button') {
// 来自页面内转发按钮
......@@ -326,7 +352,12 @@ Page({
}
})
},
// 跳转到登录
onLogin: function () {
wx.navigateTo({
url: '/pages/login/login',
})
},
onTest: function (event) {
wx.navigateTo({
url: '/pages/pay/order-input/order-input?type=' + event.currentTarget.dataset.index + '&passType=1'
......
......@@ -21,8 +21,8 @@
<image src="/image/ornament-0.png" mode="widthFix"></image>
</view>
<view class="banner-notice row align-c {{true ? 'login-notice' : ''}}">
<view class="row align-c" bindtap="onNotice">
<view class="banner-notice login-notice row align-c" bindtap="onLogin" wx:if="{{!isLogin}}">
<view class="row align-c">
<image src="./image/inform.png"></image>
<text>微信登陆</text>
</view>
......@@ -47,7 +47,7 @@
</view>
</view>
<view class="detail">
<view class="detail {{!isLogin ? 'login-detail' : ''}}">
<!-- 预约公告 -->
<view class="night row con-b" bindtap="onAppointmentInto">
<image src="./image/into.png" mode="aspectFit"></image>
......@@ -98,4 +98,10 @@
<button class="test-button" data-index="{{5}}" bindtap="onTest5">券码详情 餐品</button>
<button class="test-button" bindtap="onTest6">评价订单</button>
</view>
<view class="footer">
<block wx:for="{{footerImage}}" wx:key="index">
<image src="{{item.url}}"></image>
</block>
</view>
</view>
\ No newline at end of file
......@@ -106,11 +106,15 @@
}
.detail {
margin-top: 40rpx;
margin-top: 60rpx;
padding: 0 40rpx;
background: linear-gradient(#ffffff, #F2F2F2);
}
.login-detail {
margin-top: 208rpx;
}
.detail-item {
margin-top: 58rpx;
}
......@@ -312,4 +316,18 @@
display: block;
margin: 20rpx;
background: #808080;
}
.footer {
margin-top: 88rpx;
}
.footer image {
width: 750rpx;
height: 1148rpx;
margin-bottom: 40rpx;
background-color: #ccc;
}
.footer image:last-child {
margin-bottom: 0rpx;
}
\ No newline at end of file
Page({
data: {
showMenu: false
},
onLoad: function (options) {
......
<!--pages/home/home/home.wxml-->
<text>pages/home/home/home.wxml</text>
<navigation class="navigation" titleText="我的积分" color="#FFFFFF" backIcon="/image/back-w.png"></navigation>
<view class="container con-s">
<!-- 积分背景图 -->
<image class="banner" src=""></image>
<view class="my-accumulate">
<text>1888</text>
</view>
<view class="accumulate-tips">
<text>积分用于兑换积分商品,积分商城即将上线,敬请期待</text>
</view>
<view class="banner-menu row align-c">
<text>全部</text>
<image src="/image/icon/arrow-b-2.png"></image>
<view class="banner-menu-down col" wx:if="{{showMenu}}">
<text>全部</text>
<text>获取</text>
<text>已使用</text>
</view>
</view>
<!-- 积分列表 -->
<!-- 无积分 -->
<!-- <view class="accumulate-empty" wx:if="{{true}}">
<text>暂无积分明细</text>
</view> -->
<!-- 有积分 -->
<view class="accumulate-wrapper col align-c">
<block>
<view class="accumulate row con-b align-c">
<view class="accumulate-left col con-b">
<view class="accumulate-type">
<text>消费</text>
</view>
<view class="accumulate-time">
<text>2020-08-26 11:47</text>
</view>
</view>
<view class="accumulate-right {{item.type === '0' ? 'accumulate-type-color' : ''}}">
<text wx:if="{{item.type === '0'}}">+</text>
<text wx:else>-</text>
<text>50</text>
</view>
</view>
<view class="accumulate row con-b align-c">
<view class="accumulate-left col con-b">
<view class="accumulate-type">
<text>消费</text>
</view>
<view class="accumulate-time">
<text>2020-08-26 11:47</text>
</view>
</view>
<view class="accumulate-right {{item.type === '0' ? 'accumulate-type-color' : ''}}">
<text wx:if="{{item.type === '0'}}">+</text>
<text wx:else>-</text>
<text>50</text>
</view>
</view>
</block>
</view>
</view>
\ No newline at end of file
/* pages/home/home/home.wxss */
\ No newline at end of file
page {
height: 100vh;
background: linear-gradient(180deg, #FFFFFF 0%, #F3F4F6 100%);
}
.container {
position: relative;
}
.banner {
position: fixed;
z-index: -1;
top: 0;
left: 0;
width: 750rpx;
height: 480rpx;
background: linear-gradient(218deg, rgba(63, 67, 87, 0.8) 0%, #252532 100%);
opacity: 0.84;
}
.my-accumulate {
width: 670rpx;
margin-top: 232rpx;
font-size: 70rpx;
font-weight: 600;
color: #F0DABB;
line-height: 97rpx;
}
.banner-menu {
position: absolute;
top: 254rpx;
right: 40rpx;
width: 140rpx;
height: 56rpx;
padding-left: 24rpx;
color: #000;
font-size: 26rpx;
background: rgba(255, 255, 255, 0.95);
border-radius: 4rpx;
}
.banner-menu image {
width: 32rpx;
height: 32rpx;
margin-left: 8rpx;
}
.banner-menu-down {
position: absolute;
z-index: 99999999;
left: 0;
top: 64rpx;
width: 140rpx;
height: 180rpx;
background: rgba(255, 255, 255, 0.95);
box-shadow: 10px 4px 40px 0px rgba(181,164,164,0.3);
border-radius: 4rpx;
}
.banner-menu-down text{
flex: 1;
padding-left: 24rpx;
color: #959CA8;
font-size: 26rpx;
line-height: 56rpx;
border-radius: 4rpx;
}
.accumulate-tips {
width: 670rpx;
margin-top: 8rpx;
font-size: 22rpx;
color: #FFFFFF;
line-height: 32rpx;
}
.accumulate-empty {
margin-top: 426rpx;
font-size: 38rpx;
font-weight: 500;
color: #959DA9;
line-height: 5r2px;
}
.accumulate-wrapper {
position: absolute;
z-index: 1;
top: 410rpx;
width: 670rpx;
padding: 12rpx 0 14rpx;
background-color: #fff;
border-radius: 4rpx;
}
.accumulate {
width: 606rpx;
height: 120rpx;
padding: 20rpx 0 18rpx;
border-bottom: 1px solid #E2E7EF;
}
.accumulate:last-child {
border-bottom: none;
}
.accumulate-type {
margin-bottom: 8rpx;
font-size: 30rpx;
color: #15191F;
}
.accumulate-time {
font-size: 22rpx;
color: #959DA9;
}
.accumulate-right {
font-size: 30rpx;
color: #E66060;
}
.accumulate-right text {
margin-left: 6rpx;
}
.accumulate-type-color {
color: #959DA9;
}
\ No newline at end of file
......@@ -126,7 +126,7 @@ Page({
App.login({
success: (token) => {
this.getMyActivityList()
this.getList()
// this.getList()
this.getAuth()
}
})
......@@ -296,9 +296,17 @@ Page({
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;
case 0:
stateTest = '审核中'
break
case 1:
stateTest = '审核通过 '
break
case 2:
stateTest = '审核失败'
break
}
this.setData({
type: state == 1 ? 1 : 0,
......
......@@ -245,13 +245,38 @@
</view>
</view>
<!-- 夜间入园预约 -->
<!-- <view class="appointment-wrapper">
<view class="appointment-time"></view>
</view> -->
<view class="appointment-wrapper">
<view class="appointment-time">
<text>7月15日 10:00-12:00</text>
</view>
<view class="appointment-activity-content row align-c con-b">
<view class="appointment-content col con-b">
<view class="appointment-activity-title">
<text>夜间入园预约</text>
</view>
<view class="appointment-activity-num">
<text>预约人数 3人</text>
</view>
</view>
<view class="border-right"></view>
<view class="appointment-subscribe" data-item="{{item}}" bindtap="gohotelAccommodation">预约凭证</view>
</view>
</view>
<!-- 看房预约 -->
<!-- <view class="appointment-wrapper">
<view class="appointment-time"></view>
</view> -->
<view class="appointment-wrapper">
<view class="appointment-time">
<text>7月15日 10:00-12:00</text>
</view>
<view class="appointment-activity-content row align-c con-b">
<view class="appointment-content col con-c">
<view class="appointment-activity-title">
<text>看房预约</text>
</view>
</view>
<view class="border-right"></view>
<view class="appointment-subscribe" data-item="{{item}}" bindtap="gohotelAccommodation">预约凭证</view>
</view>
</view>
</view>
<!-- more -->
<view class="more row align-c con-c" bindtap="onShowMoreActivity">
......
......@@ -546,6 +546,28 @@
font-size: 26rpx;
}
.appointment-content {
width: 305rpx;
height: 110rpx;
}
.border-right {
width: 1rpx;
height: 75rpx;
background-color: #E2E7EF;
}
.appointment-subscribe {
width: 150rpx;
height: 70rpx;
border: 1px solid #15191f;
border-radius: 4px;
line-height: 70rpx;
text-align: center;
font-size: 26rpx;
font-weight: 500;
color: #15191f;
}
.more {
margin-top: 32rpx;
}
......
......@@ -222,6 +222,7 @@ Page({
})
this.setData({
'orderList': [],
'orderPages': 1,
})
this.queryOrder()
},
......@@ -246,6 +247,7 @@ Page({
})
this.setData({
'orderList': [],
'orderPages': 1,
})
this.queryOrder()
},
......@@ -267,7 +269,7 @@ Page({
* @returns
*/
onOrderUse: function (event) {
this.onOrderDetail()
},
/**
......
<!-- 订单分类选择 -->
<view class="navigation-order row con-b align-c">
<image src="{{imageBase + 'icon/arrow-l-1.png'}}" bindtap="onNavigationBack"></image>
<view class="order-type row con-c align-c" bindtap="onOrderType">
......@@ -7,6 +8,7 @@
<image src=""></image>
</view>
<!-- 订单状态选择 -->
<view class="order-type-selection col" wx:if="{{winOrderType}}" bindtap="onOrderType">
<view>
<view class="order-type-row row con-b align-c">
......@@ -51,6 +53,7 @@
</view>
</view>
<!-- 订单列表 -->
<view class="container-order">
<view class="status row con-b align-c">
<block wx:for="{{statusList}}" wx:for-index="index" wx:for-item="item" wx:key="index">
......@@ -74,14 +77,14 @@
<text class="warning" wx:if="{{item.status === 3}}">待评价</text>
<text class="message" wx:if="{{item.status === -1}}">已取消</text>
<text class="message" wx:if="{{item.status === 4}}">已过期</text>
<text class="message" wx:if="{{item.status === 3}}">已评价</text>
<text class="message" wx:if="{{item.status === 6}}">已评价</text>
</view>
</view>
<!-- 商品数量样式一 -->
<view class="order-list-item-service row con-b align-c" wx:if="{{item.commodity.length === 1}}">
<image class="cover" src="{{item.commodity[0].cover}}"></image>
<text class="name">精灵鸟理想国单人次票精灵鸟理想国单人次票</text>
<text class="name">{{item.commodity[0].name}}</text>
<text class="total">{{'x ' + item.total}}</text>
</view>
......@@ -110,4 +113,30 @@
</view>
</block>
</view>
</view>
<!-- 二维码弹窗 -->
<view class="code-mask row con-c align-c" wx:if="{{winCode}}">
<view class="code col con-c align-c">
<view class="code-tip col con-c align-c">
<text>{{'请将券码出示给门店核销人员'}}</text>
<text>{{'请将券码出示给门店核销人员'}}</text>
</view>
<view class="code-info col con-c align-c">
<view class="code-info-title">
<text>{{'《 阿凡达 》电影票'}}</text>
</view>
<view class="code-info-qrcode">
<image src="{{'data:image/png;base64,' + code.codeBase64}}"></image>
</view>
<view class="code-info-copy row con-b align-c">
<text>券码</text>
<text>{{'2719 7092 0925'}}</text>
<text>复制</text>
</view>
</view>
<view class="code-close row con-c align-c" bindtap="onCodeClose">
<image src="{{imageBase + 'icon/close-1.png'}}"></image>
</view>
</view>
</view>
\ No newline at end of file
......@@ -112,7 +112,7 @@ page {
width: 750rpx;
height: 100%;
padding-bottom: 120rpx;
background: linear-gradient(180deg, #FFFFFF 0%, #F3F4F6 100%);
background: #F3F4F6;
}
.order-list-item {
......@@ -205,4 +205,99 @@ page {
font-weight: 500;
line-height: 32rpx;
color: #FFFFFF;
}
/* 券码 */
.code-mask {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, .6);
}
.code {
padding: 56rpx 40rpx 64rpx 40rpx;
}
.code-tip text:nth-child(1) {
height: 36rpx;
font-size: 26rpx;
font-weight: 500;
line-height: 36rpx;
color: #FFFFFF;
}
.code-tip text:nth-child(2) {
height: 42rpx;
margin-top: 28rpx;
font-size: 30rpx;
font-weight: 400;
line-height: 42rpx;
color: #FFFFFF;
}
.code-info-qrcode {
margin-top: 56rpx;
}
.code-info-qrcode > image {
display: block;
width: 296rpx;
height: 296rpx;
}
.code-info {
width: 526rpx;
height: 666rpx;
margin-top: 56rpx;
border-radius: 4px;
background: #FFFFFF;
}
.code-info-copy {
width: 446rpx;
height: 96rpx;
margin-top: 56rpx;
padding: 0 24rpx;
border-radius: 4px;
background: #F2F3F5;
}
.code-info-copy text:nth-child(1) {
height: 36rpx;
font-size: 26rpx;
font-weight: 500;
line-height: 36rpx;
color: #959DA9;
}
.code-info-copy text:nth-child(2) {
height: 36rpx;
font-size: 26rpx;
font-weight: 500;
line-height: 36rpx;
color: #15191F;
}
.code-info-copy text:nth-child(3) {
height: 36rpx;
font-size: 26rpx;
font-weight: 500;
line-height: 36rpx;
color: #5DB5DD;
}
.code-close {
width: 80rpx;
height: 80rpx;
margin-top: 48rpx;
border-radius: 50%;
background: #A9A8A7;
}
.code-close > image {
width: 48rpx;
height: 48rpx;
}
\ No newline at end of file
......@@ -11,8 +11,8 @@ Page({
orderInfo: {},
fromPage: '',
code: {},
winCode: false,
codeInfo: {},
isFromUse: false,
winCode: false,
},
......@@ -22,11 +22,11 @@ Page({
this.setData({
shopInfo: wx.getStorageSync('shopInfoBuffer'),
orderInfo: funcOrderInfo,
fromPage: options.fromPage === 'order' ? 'order' : ''
fromPage: options.fromPage === 'order' ? 'order' : '',
isFromUse: options.showCode === 'true' ? true : false,
})
console.log(funcOrderInfo, '--------------------------')
console.log(this.data.shopInfo)
this.queryOrderDetail()
},
......@@ -78,8 +78,11 @@ Page({
orderInfo: funcOrderInfo
})
console.log(JSON.stringify(funcOrderInfo))
console.log(this.data.shopInfo)
// 判断是否自动展示二维码
// 订单列表 去使用 按钮
if (this.data.isFromUse) {
}
}
})
},
......@@ -93,16 +96,29 @@ Page({
},
success: (response) => {
let funcResponse = response.data
let funcCode = {
'codeBase64': funcResponse.qrcode
let funcCodeInfo = {
'codeNo': funcResponse.serialNumber,
'codeName': funcResponse.name,
'codeBase64': funcResponse.qrcode,
}
this.setData({
code: funcCode,
codeInfo: funcCodeInfo,
winCode: true,
})
}
})
console.log(funcOrderInfo)
},
onCodeCopy: function () {
wx.setClipboardData({
data: this.data.codeInfo.codeNo,
})
},
onCodeClose: function () {
this.setData({
winCode: false,
})
},
navBack: function () {
......@@ -111,6 +127,5 @@ Page({
url: '/pages/mine/home/home',
})
}
console.log('navBack')
}
},
})
\ No newline at end of file
......@@ -97,9 +97,74 @@
color: #15191F;
}
.info-line {
position: relative;
background: #F3F4F6;
}
.info-line-line {
width: 670rpx;
height: 1px;
border: 1px #E2E7EF dashed;
}
.info-line-point-left {
position: absolute;
left: -18rpx;
width: 36rpx;
height: 36rpx;
border-radius: 50%;
background: #FFFFFF;
}
.info-line-point-right {
position: absolute;
right: -18rpx;
width: 36rpx;
height: 36rpx;
border-radius: 50%;
background: #FFFFFF;
}
.info-code {
width: 670rpx;
min-height: 330rpx;
background: #F3F4F6;
}
.info-code text:nth-child(1) {
height: 48rpx;
font-size: 34rpx;
font-weight: 500;
line-height: 48rpx;
color: #15191F;
}
.info-code button {
width: 606rpx;
height: 96rpx;
margin-top: 40rpx;
border-radius: 4px;
background: #86C5E1;
font-size: 30rpx;
font-weight: 500;
line-height: 42rpx;
color: #FFFFFF;
}
.info-code text:nth-child(3) {
height: 36rpx;
margin-top: 40rpx;
font-size: 26rpx;
font-weight: 400;
line-height: 36rpx;
color: #959DAA;
}
/* 商品信息 */
.commodity {
margin: 0 40rpx;
margin: 64rpx 40rpx 0 40rpx;
}
.commodity-title {
......@@ -201,7 +266,96 @@
}
/* 券码 */
.code-info-content {
.code-mask {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, .6);
}
.code {
padding: 56rpx 40rpx 64rpx 40rpx;
}
.code-tip text:nth-child(1) {
height: 36rpx;
font-size: 26rpx;
font-weight: 500;
line-height: 36rpx;
color: #FFFFFF;
}
.code-tip text:nth-child(2) {
height: 42rpx;
margin-top: 28rpx;
font-size: 30rpx;
font-weight: 400;
line-height: 42rpx;
color: #FFFFFF;
}
.code-info-qrcode {
margin-top: 56rpx;
}
.code-info-qrcode > image {
display: block;
width: 296rpx;
height: 296rpx;
}
.code-info {
width: 526rpx;
height: 666rpx;
margin-top: 56rpx;
border-radius: 4px;
background: #FFFFFF;
}
.code-info-copy {
width: 446rpx;
height: 96rpx;
margin-top: 56rpx;
padding: 0 24rpx;
border-radius: 4px;
background: #F2F3F5;
}
.code-info-copy text:nth-child(1) {
height: 36rpx;
font-size: 26rpx;
font-weight: 500;
line-height: 36rpx;
color: #959DA9;
}
.code-info-copy text:nth-child(2) {
height: 36rpx;
font-size: 26rpx;
font-weight: 500;
line-height: 36rpx;
color: #15191F;
}
.code-info-copy text:nth-child(3) {
height: 36rpx;
font-size: 26rpx;
font-weight: 500;
line-height: 36rpx;
color: #5DB5DD;
}
.code-close {
width: 80rpx;
height: 80rpx;
margin-top: 48rpx;
border-radius: 50%;
background: #A9A8A7;
}
.code-close > image {
width: 48rpx;
height: 48rpx;
}
\ No newline at end of file
......@@ -30,6 +30,9 @@ Page({
formIdNum: '',
isSubmit: false,
winToast: false,
toastContent: '',
// 购买内容
buyContent: '', // 商品封面
buyContentCover: '',
......@@ -82,6 +85,7 @@ Page({
winNoticeDetail: false, // 购买须知详情
},
onLoad: function (options) {
console.log(options)
if (options.type) options.type = Number(options.type)
logicData.option = options
......@@ -293,9 +297,6 @@ Page({
shoppingCartList: funcShoppingCart,
payAmount: App.modular.utils.formatAmount(funcPayAmount),
})
console.log('----------')
console.log('funcShoppingCart', JSON.stringify(this.data.shoppingCartList))
},
/**
......@@ -329,7 +330,6 @@ Page({
},
onInputBlur: function(event) {
console.log(event)
let funcType = event.target.dataset.type
let funcIndex = event.target.dataset.index
let funcValue = event.detail.value
......@@ -485,8 +485,6 @@ Page({
}
}
}
console.log('inspectData', funcPass)
return funcPass
},
......@@ -503,9 +501,8 @@ Page({
// 整合商品数据
let funcCommodity = []
let funcShoppingCartList = this.data.shoppingCartList
console.log(funcShoppingCartList)
for (let i = 0, l = funcShoppingCartList.length; i < l; i++) {
if (funcShoppingCartList.isActive) {
if (funcShoppingCartList[i].isActive) {
let funcItem = {
'smCommodity': {
'id': funcShoppingCartList[i].id,
......@@ -546,10 +543,17 @@ Page({
'smPersonalDetails': funcUserInfo
},
success: (response) => {
let funcResponse = response.data.wxRequest
// 库存不足
// if (funcResponse.)
console.log(response)
if (/库存不足/.test(response.data.message)) {
this.setData({
winToast: true,
toastContent: response.msg,
})
return
}
let funcResponse = response.data.wxRequest
// 库存充足正常下单支付
pagePayId = response.data.orderId
this.setData({
......@@ -598,7 +602,6 @@ Page({
'orderId': pagePayId
},
success: (response) => {
console.log(response)
// -1 - 已取消,0 - 未付款,1 - 未发货,2 - 待使用,3 - 已使用,4 - 已过期
let funcResponse = response.data
if (funcResponse.status === '2') {
......@@ -623,7 +626,7 @@ Page({
clearInterval(App.globalData.payStateTimer)
if (funcPayResult) {
// 支付成功进入成功页面
wx.navigateTo({
wx.reLaunch({
url: '/pages/pay/order-state/order-state?state=' + funcPayResult + '&amount=' + this.data.buyContentAmount + '&orderId=' + this.data.orderId
})
} else {
......
<l-toast show="{{winToast}}" icon="error" title="{{toastContent}}"></l-toast>
<!-- 购买须知详情 -->
<view class="notice-detail" wx:if="{{winNoticeDetail}}" bindtap="onNoticeClose">
<view class="notice-item" animation="{{animation}}">
......
......@@ -53,6 +53,7 @@
height: 96rpx;
border-radius: 4px;
border: 1px solid #86C5E1;
background: #FFFFFF;
font-size: 30rpx;
font-weight: 500;
......
......@@ -58,7 +58,6 @@ Page({
onLoad: function (options) {
this.setNavigationLogo()
this.queryActivity()
},
onShow: function () {
......@@ -82,10 +81,6 @@ Page({
})
},
queryActivity: function () {
},
/**
* 设置标题高度
* @function
......
......@@ -9,7 +9,6 @@ Page({
statusList: [],
movieInfo: {},
showList: {},
free: '免费'
},
onLoad: function (options) {
let activityId = options.id
......@@ -46,7 +45,7 @@ Page({
this.setData({
statusList: [
{ 'id': 0, 'name': `今日${month}${day}日`},
{ 'id': 1, 'name': `${month}${day+1}日`},
{ 'id': 1, 'name': `${month}${day+1}日`},
],
})
},
......
<navigation class="navigation" titleText="龙猫" color="#ffffff" backIcon="/image/back-w.png"></navigation>
<navigation class="navigation" titleText="{{movieInfo.filmName}}" color="#ffffff" backIcon="/image/back-w.png"></navigation>
<view class="container">
<view class="banner">
......@@ -78,7 +78,7 @@
<text>{{item.endTime}}</text>
</view>
<view class="show-free">
<text>{{free}}</text>
<text>{{item.ownerPrice === 0 ? '免费' : item.ownerPrice}}</text>
</view>
<view class="show-btn">
<text>报名观影</text>
......
......@@ -8,7 +8,7 @@ Page({
pageSize: '-1'
},
statusActive: 0,
statusActive: 1,
statusList: [
{ 'id': 0, 'name': '今日放映' },
{ 'id': 1, 'name': '全部热映' },
......@@ -17,16 +17,7 @@ Page({
// 今日热映
movieToday: [],
//全部热映
movieAll: {
movieWeek: {
title: '本周热映',
list: []
},
movieNextWeek: {
title: '下周热映',
list: []
}
}
movieAll: {}
},
onLoad: function () {
this.getTodayFilm()
......@@ -81,7 +72,10 @@ Page({
v.filmLead = v.filmLead.replace(/\//g, ' ')
})
this.setData({
'movieAll.movieWeek.list': movieWeek
'movieAll.movieWeek': {
title: '本周热映',
list: movieWeek
}
})
}
})
......@@ -101,7 +95,10 @@ Page({
v.filmLead = v.filmLead.replace(/\//g, ' ')
})
this.setData({
'movieAll.movieNextWeek.list': movieNextWeek
'movieAll.movieNextWeek': {
title: '下周热映',
list: movieNextWeek
}
})
}
})
......@@ -123,7 +120,7 @@ Page({
onReportMovie: function (event) {
let id = event.currentTarget.dataset.movieid
wx.navigateTo({
url: '/pages/pay/order-input/order-input?type=' + '7' + '&id' + id,
url: '/pages/pay/order-input/order-input?type=' + '7' + '&id=' + id,
})
}
})
\ No newline at end of file
......@@ -13,7 +13,7 @@
<view wx:if="{{statusActive === 0}}">
<block wx:for="{{movieToday}}" wx:key="id">
<view class="movie-wrapper row">
<view class="movie-wrapper row" bindtap="onToMovieDetail" data-movieId="{{item.activityId}}">
<view class="movie-time-wrapper row align-c">
<view class="movie-time-start">
<text>{{item.beginTime}}</text>
......@@ -21,6 +21,7 @@
<view class="movie-time-end">
<text>{{item.endTime}}</text>
</view>
<image class="time-star" src=""></image>
</view>
<view class="row">
<view class="movie-cover">
......@@ -61,7 +62,7 @@
<text>{{item.keyword}}</text>
</view>
<view class="movie-free">
<text>{{item.ownerPrice}}</text>
<text>{{item.ownerPrice === 0 ? '免费' : item.ownerPrice}}</text>
</view>
<view class="movie-btn" catchtap="onReportMovie" data-movieId="{{item.activityId}}">
<text>报名观影</text>
......@@ -73,8 +74,14 @@
</view>
<view wx:else>
<block wx:for="{{movieAll}}" wx:for-index="key" wx:for-item="movieList" wx:key="key">
<view class="movie-week" wx:if="{{movieList.list.length > 0}}">
<text>{{movieList.title}}</text>
<view class="movie-week row align-c con-c" wx:if="{{movieList.list.length > 0}}">
<view class="line"></view>
<view class="movie-week-title">
<image class="star-left" src=""></image>
<text>{{movieList.title}}</text>
<image class="star-right" src="/image/star-right.png"></image>
</view>
<view class="line"></view>
</view>
<block wx:for="{{movieList.list}}" wx:key="id">
<view class="all-movie-wrapper" bindtap="onToMovieDetail" data-movieId="{{item.activityId}}">
......@@ -118,7 +125,7 @@
<text>{{item.keyword}}</text>
</view>
<view class="movie-free">
<text>{{item.ownerPrice}}</text>
<text>{{item.ownerPrice === 0 ? '免费' : item.ownerPrice}}</text>
</view>
</view>
</view>
......
......@@ -55,6 +55,15 @@ page {
color: #C2C7CF;
font-size: 22rpx;
}
.time-star {
position: absolute;
top: 0;
right: 0;
width: 64rpx;
height: 20rpx;
background-color: #ccc;
}
.movie-cover {
width: 206rpx;
height: 302rpx;
......@@ -141,8 +150,39 @@ page {
color: #C2C7CF;
font-size: 22rpx;
text-align: center;
letter-spacing: 3rpx;
line-height: 44rpx;
}
.movie-week-title {
position: relative;
margin: 0 8rpx;
padding: 8rpx 40rpx 4rpx;
}
.star-left {
position: absolute;
left: 0;
bottom: 0;
width: 36rpx;
height: 8rpx;
background-color: #ccc;
}
.star-right {
position: absolute;
right: 0;
top: 0;
width: 68rpx;
height: 40rpx;
background-color: #ccc;
}
.line {
width: 80rpx;
height: 1rpx;
background: #E2E7EF;
}
.all-movie-wrapper {
position: relative;
width: 670rpx;
......
......@@ -9,6 +9,8 @@ Page({
bannerHeight: 0,
info: {},
// 弹出控制
showPopup: false
},
onLoad: function (options) {
......@@ -16,6 +18,7 @@ Page({
bannerHeight: wx.getSystemInfoSync().windowHeight
})
this.queryDetail(Number(options.id))
// this.queryDetail(1)
},
/**
......@@ -44,6 +47,7 @@ Page({
App.globalData.appResourcesBase + 'guide/detail/detail-1-4.png',
],
background: 'background: #314f88;',
popupImage: ''
}, {
id: 102,
name: '云之亭',
......@@ -61,6 +65,7 @@ Page({
App.globalData.appResourcesBase + 'guide/detail/detail-2-4.png',
],
background: 'background: #9d9ee0;',
popupImage: ''
}, {
id: 103,
name: '湿地公园',
......@@ -78,6 +83,7 @@ Page({
App.globalData.appResourcesBase + 'guide/detail/detail-3-4.png',
],
background: 'background: #8bac7d;',
popupImage: ''
}, {
id: 104,
name: '新月码头',
......@@ -95,6 +101,7 @@ Page({
App.globalData.appResourcesBase + 'guide/detail/detail-4-4.png',
],
background: 'background: #6fc0d0;',
popupImage: ''
}, {
id: 105,
name: '温泉洋房',
......@@ -112,6 +119,7 @@ Page({
App.globalData.appResourcesBase + 'guide/detail/detail-5-4.png',
],
background: 'background: #5ca2e2;',
popupImage: ''
}, {
id: 106,
name: '星耀银湖',
......@@ -129,6 +137,7 @@ Page({
App.globalData.appResourcesBase + 'guide/detail/detail-6-4.png',
],
background: 'background: #82524c;',
popupImage: ''
}, {
id: 107,
name: '奇幻森林',
......@@ -146,6 +155,7 @@ Page({
App.globalData.appResourcesBase + 'guide/detail/detail-7-4.png',
],
background: 'background: #659b82;',
popupImage: ''
}
]
......@@ -159,6 +169,7 @@ Page({
this.setData({
banner: funcDetail[funcIndex].banner,
bannerWave: funcDetail[funcIndex].ornament,
popupImage: funcDetail[funcIndex].popupImage,
info: {
id: funcDetail[funcIndex].id,
name: funcDetail[funcIndex].name,
......@@ -188,4 +199,20 @@ Page({
bannerIndex: funcEvent.detail.current
})
},
// 点击分享图标
onShare: function () {
this.setData({
showPopup: true
})
},
// 点击取消
onCancel: function () {
this.setData({
showPopup: false
})
},
// 点击下载图片
onDownload: function () {
console.log('download')
}
})
\ No newline at end of file
......@@ -22,7 +22,23 @@
<block wx:for="{{info.describe}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<image src="{{item}}" mode="aspectFit"></image>
</block>
<image class="icon-share" src="/image/icon/share-3.png" bindtap="onShare"></image>
</view>
<view class="iphonexr-fill" style="{{info.background}}"></view>
<!-- 弹出图片 -->
<l-popup show="{{showPopup}}" animation="{{false}}">
<view class="popupImage">
<image src="popupImage"></image>
</view>
<view class="row con-b">
<view class="cancel" bindtap="onCancel">
<text>取消</text>
</view>
<view class="download" bindtap="onDownload">
<text>下载图片</text>
</view>
</view>
</l-popup>
</view>
\ No newline at end of file
......@@ -48,6 +48,7 @@ page {
/* 详情样式 */
.describe {
position: relative;
width: 750rpx;
}
......@@ -74,6 +75,13 @@ page {
height: 230rpx;
margin: 56rpx 0 40rpx 40rpx;
}
.icon-share {
position: absolute;
top: 55rpx;
left: 274rpx;
width: 40rpx;
height: 40rpx;
}
/* iphone x 底部颜色填充 */
.iphonexr-fill {
......@@ -83,4 +91,27 @@ page {
left: 0;
width: 750rpx;
height: 100%;
}
.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;
}
\ No newline at end of file
......@@ -166,6 +166,34 @@
"pathName": "pages/play/service-detail/service-detail",
"query": "",
"scene": null
},
{
"id": -1,
"name": "pages/commodity/shopping-cart/shopping-cart",
"pathName": "pages/commodity/shopping-cart/shopping-cart",
"query": "",
"scene": null
},
{
"id": 15,
"name": "pages/play/point-detail/point-detail",
"pathName": "pages/play/point-detail/point-detail",
"query": "",
"scene": null
},
{
"id": -1,
"name": "pages/mine/accumulate/accumulate",
"pathName": "pages/mine/accumulate/accumulate",
"query": "",
"scene": null
},
{
"id": -1,
"name": "pages/mine/home/home",
"pathName": "pages/mine/home/home",
"query": "",
"scene": null
}
]
}
......
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