Commit b826bd05 by 严立

LL - 二期初始代码

parent 848a39fe
Showing with 1420 additions and 2416 deletions
import iMiment from './npm/miment.js'
import iUtils from './utils/utils.js'
App({ App({
modular: {
'utils': iUtils,
'miment': iMiment,
},
globalData: { globalData: {
appImageBase: '../../../image/',
appResourcesBase: 'https://sm-web.meiqicloud.com/userfiles/appResources/', appResourcesBase: 'https://sm-web.meiqicloud.com/userfiles/appResources/',
token: '', token: '',
refreshToken: '', refreshToken: '',
......
{ {
"pages": [ "pages": [
"pages/home/home/home",
"pages/home/dynamic/dynamic",
"pages/home/home", "pages/home/dynamic-detail/dynamic-detail",
"pages/mine/mine", "pages/home/night-appointment/night-appointment",
"pages/play/play", "pages/home/guide/guide",
"pages/ownerCertification/ownerCertification", "pages/home/history/history",
"pages/hotelAccommodation/hotelAccommodation", "pages/play/home/home",
"pages/login/login", "pages/play/service/service",
"pages/guide/guide", "pages/play/service-detail/service-detail",
"pages/campsite/campsite", "pages/play/service-sell/service-sell",
"pages/campsite-mirror/campsite-mirror", "pages/play/activity/activity",
"pages/play/activity-detail/activity-detail",
"pages/myInfo/myInfo", "pages/play/activity-entry/activity-entry",
"pages/myActivity/myActivity", "pages/play/movie/movie",
"pages/myAppointment/myAppointment", "pages/play/movie-detail/movie-detail",
"pages/moreProblems/moreProblems", "pages/play/point-detail/point-detail",
"pages/customerService/customerService", "pages/play/strategy-detail/strategy-detail",
"pages/appointment/appointment", "pages/commodity/home/home",
"pages/activity/activity", "pages/commodity/shopping-cart/shopping-cart",
"pages/activityDetail/activityDetail", "pages/commodity/food/food",
"pages/activity-detail/activity-detail", "pages/commodity/project/project",
"pages/activity-entry/activity-entry", "pages/commodity/snacks/snacks",
"pages/notice/notice", "pages/commodity/art/art",
"pages/notice-detail/notice-detail", "pages/commodity/room/room",
"pages/shop-detail/shop-detail", "pages/commodity/room-appointment/room-appointment",
"pages/shop-point-detail/shop-point-detail", "pages/campsite/home/home",
"pages/strategy/strategy", "pages/campsite/home-mirror/home-mirror",
"pages/mine/home/home",
"pages/index/index" "pages/mine/info/info",
"pages/mine/order/order",
"pages/mine/card/card",
"pages/mine/accumulate/accumulate",
"pages/mine/appointment/appointment",
"pages/mine/appointment-ticket/appointment-ticket",
"pages/mine/appointment-detail/appointment-detail",
"pages/mine/authentication-state/authentication-state",
"pages/mine/authentication-input/authentication-input",
"pages/mine/question/question",
"pages/mine/question-more/question-more",
"pages/pay/home/home",
"pages/pay/order-input/order-input",
"pages/pay/order-detail/order-detail",
"pages/pay/coupon/coupon",
"pages/pay/coupon-input/coupon-input",
"pages/pay/coupon-detail/coupon-detail",
"pages/login/login"
], ],
"usingComponents": { "usingComponents": {
"navigation": "../component/navigation/navigation", "navigation": "../component/navigation/navigation",
...@@ -45,13 +62,13 @@ ...@@ -45,13 +62,13 @@
"l-tabpanel": "../miniprogram_npm/lin-ui/tabpanel/index", "l-tabpanel": "../miniprogram_npm/lin-ui/tabpanel/index",
"l-toast": "../miniprogram_npm/lin-ui/toast/index", "l-toast": "../miniprogram_npm/lin-ui/toast/index",
"l-water-flow": "../miniprogram_npm/lin-ui/water-flow/index", "l-water-flow": "../miniprogram_npm/lin-ui/water-flow/index",
"l-input":"../miniprogram_npm/lin-ui/input/index", "l-input": "../miniprogram_npm/lin-ui/input/index",
"l-mask":"../miniprogram_npm/lin-ui/mask/index", "l-mask": "../miniprogram_npm/lin-ui/mask/index",
"l-arc-popup":"../miniprogram_npm/lin-ui/arc-popup/index", "l-arc-popup": "../miniprogram_npm/lin-ui/arc-popup/index",
"l-collapse":"../miniprogram_npm/lin-ui/collapse/index", "l-collapse": "../miniprogram_npm/lin-ui/collapse/index",
"l-collapse-item":"../miniprogram_npm/lin-ui/collapse-item/index", "l-collapse-item": "../miniprogram_npm/lin-ui/collapse-item/index",
"l-textarea":"../miniprogram_npm/lin-ui/textarea/index", "l-textarea": "../miniprogram_npm/lin-ui/textarea/index",
"l-notice-bar":"../miniprogram_npm/lin-ui/notice-bar/index" "l-notice-bar": "../miniprogram_npm/lin-ui/notice-bar/index"
}, },
"window": { "window": {
"navigationStyle": "custom", "navigationStyle": "custom",
...@@ -67,25 +84,25 @@ ...@@ -67,25 +84,25 @@
"backgroundColor": "#ffffff", "backgroundColor": "#ffffff",
"list": [ "list": [
{ {
"pagePath": "pages/home/home", "pagePath": "pages/home/home/home",
"iconPath": "image/tabbar/home.png", "iconPath": "image/tabbar/home.png",
"selectedIconPath": "image/tabbar/home-s.png", "selectedIconPath": "image/tabbar/home-s.png",
"text": "首页" "text": "首页"
}, },
{ {
"pagePath": "pages/play/play", "pagePath": "pages/play/home/home",
"iconPath": "image/tabbar/play.png", "iconPath": "image/tabbar/play.png",
"selectedIconPath": "image/tabbar/play-s.png", "selectedIconPath": "image/tabbar/play-s.png",
"text": "畅玩" "text": "畅玩"
}, },
{ {
"pagePath": "pages/campsite/campsite", "pagePath": "pages/campsite/home/home",
"iconPath": "image/tabbar/campsite.png", "iconPath": "image/tabbar/campsite.png",
"selectedIconPath": "image/tabbar/campsite-s.png", "selectedIconPath": "image/tabbar/campsite-s.png",
"text": "营地" "text": "营地"
}, },
{ {
"pagePath": "pages/mine/mine", "pagePath": "pages/mine/home/home",
"iconPath": "image/tabbar/mine.png", "iconPath": "image/tabbar/mine.png",
"selectedIconPath": "image/tabbar/mine-s.png", "selectedIconPath": "image/tabbar/mine-s.png",
"text": "我的" "text": "我的"
......
Component({ Component({
/**
* 组件的属性列表
*/
properties: { properties: {
bannerActiveIndex: { bannerActiveIndex: {
type: Number, type: Number,
...@@ -37,7 +34,6 @@ Component({ ...@@ -37,7 +34,6 @@ Component({
lifetimes: { lifetimes: {
attached: function () { attached: function () {
console.log(this.data.bannerStyle)
this.setStyle() this.setStyle()
}, },
}, },
......
// pages/activityDetail/activityDetail.js
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
type:'1',
cover: '',
activityName: '',
activeDate: '',
name: '',
mobile: '',
enrollDate: '',
enrollNum: '',
activityId: '',
// 接口参数
enrollId: '',
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
var that =this;
console.log(options);
// var options = JSON.parse(options);
that.setData({
enrollId : options.enrollid
})
app.login({
success: function() {
that.getMyActivityDetail()
}
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
},
activityDetail() {
wx.navigateTo({
url: '/pages/activity-detail/activity-detail?id='+this.data.activityId
})
},
// 我的活动详情
getMyActivityDetail() {
let that = this
wx.lin.showToast({
icon: 'loading',
title: '正在加载',
show: true,
duration: 1000*60,
})
app.wxRequest({
url: '/api/v1/activity/getMyActivityDetail',
data: {
enrollId: this.data.enrollId
},
success: function(res) {
wx.lin.hideToast()
let state = res.data.activeState*1
let type = 0
switch (state) {
case 0: type = 1;break;
case 1: type = 0;break;
case 2: type = 2;break;
}
that.setData({
activityId: res.data.activityId,
type: type,
cover: res.data.cover,
activityName: res.data.activityName,
activeDate: res.data.activeDate,
name: res.data.name,
mobile: res.data.mobile,
enrollDate: res.data.enrollDate,
enrollNum: res.data.enrollNum + '人',
})
},
fail: function(err) {
wx.lin.showToast({
image: '/image/error.png',
title: err.msg,
})
}
})
}
})
\ No newline at end of file
<l-toast l-image-class="toast-image"></l-toast>
<navigation class="navigation" titleText="报名详情" backIcon="/image/back.png"></navigation>
<view class="container">
<view class="header {{type == 0 ? 'ongoingBGC' : (type == 2 ? 'endBGC':'')}}" >
<!-- 活动未开始 -->
<image wx:if="{{type == 1}}" class="fontsImg" src="./image/nostart.png"></image>
<!-- 活动进行中 -->
<image wx:if="{{type == 0}}" class="fontsImg" src="./image/ing.png"></image>
<!-- 活动结束 -->
<image wx:if="{{type == 2}}" class="fontsImg" src="./image/end.png"></image>
</view>
<view class="body">
<view class="activityBody">
<view class="title">报名活动</view>
<view class="item" bindtap="activityDetail">
<image class="activity-contanier-img" src="{{cover}}"></image>
<view class="my-activities-content">
<view class="my-activities-title clamp-ellipsis">{{activityName}}</view>
<view class="time ellipsis">{{activeDate}}</view>
</view>
<l-icon name="right" color="rgb(172,172,174)" size="26" style="margin-right:12rpx;"/>
</view>
<view class="title">报名信息</view>
<view class="info-item">
<text>姓名</text>
<text>{{name}}</text>
</view>
<view class="info-item">
<text>手机号</text>
<text>{{mobile}} </text>
</view>
<view class="info-item">
<text>报名日期</text>
<text>{{enrollDate}}</text>
</view>
<view class="info-item">
<text>报名人数</text>
<text>{{enrollNum}}</text>
</view>
</view>
</view>
</view>
<wxs module="status" >
var status =function(type){
if(type == 0){
return '活动进行中'
}else if(type == 1){
return '活动未开始'
}else{
return '活动已结束'
}
}
module.exports.status = status;
</wxs>
/* pages/activityDetail/activityDetail.wxss */
.header{
width: 750rpx;
height: 380rpx;
background:rgba(206,218,194,1);
}
.fontsImg{
width: 250rpx;
height: 50rpx;
position: absolute;
top: 260rpx;
left: 40rpx;
}
/* 进行中的背景图 */
.ongoingBGC{
background:rgba(199,224,235,1);
}
/* 已结束的背景色 */
.endBGC{
background:rgba(231,233,237,1);
}
.status{
position: absolute;
top: 260rpx;
left: 40rpx;
font-size: 40rpx;
font-weight: 500;
}
.body{
width: 750rpx;
background-color: white;
height: auto;
}
.activityBody{
width: 670rpx;
padding-top: 60rpx;
margin: auto;
}
.title{
color:rgba(149,157,169,1);
font-size:30rpx;
letter-spacing: 1px;
font-weight:400;
margin-bottom: 45rpx;
}
.item{
width: 100%;
height: 220rpx;
background:rgba(245,246,248,1);
display: flex;
align-items: center;
justify-content: space-around;
margin-bottom: 60rpx;
}
.activity-contanier-img{
width: 140rpx;
height: 140rpx;
}
.my-activities-content{
height: 140rpx;
width: 380rpx;
display: flex;
flex-direction: column;
justify-content: center;
}
.my-activities-title{
color:rgba(21,25,31,1);
font-weight: 500;
font-size: 30rpx;
letter-spacing: 1px;
margin-bottom: 16rpx;
}
.time{
font-size: 26rpx;
color:rgba(101,110,123,1);
}
/* 超出部分省略 */
.ellipsis{
white-space:nowrap;
overflow:hidden;
text-overflow:ellipsis;
}
/* 两行超出部分省略 */
.clamp-ellipsis{
word-break: break-all;
text-overflow: ellipsis;
overflow: hidden;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.info-item{
width: 100%;
display: flex;
justify-content: space-between;
margin-bottom: 90rpx;
color: rgb(32, 29, 32);
}
...@@ -7,6 +7,8 @@ let logicData = { ...@@ -7,6 +7,8 @@ let logicData = {
Page({ Page({
data: { data: {
imageBase: App.globalData.appImageBase,
winSide: true, winSide: true,
sideHeight: 1250, sideHeight: 1250,
......
...@@ -8,10 +8,10 @@ ...@@ -8,10 +8,10 @@
</view> </view>
<view class="appointment-side col con-b align-c" hidden="{{winSide}}"> <view class="appointment-side col con-b align-c" hidden="{{winSide}}">
<button class="appointment-side-top" bindtap="onBackTop"> <button class="appointment-side-top" bindtap="onBackTop">
<image src="../../image/top.png"></image> <image src="{{imageBase + 'top.png'}}"></image>
</button> </button>
<button class="appointment-side-phone" bind:tap="onServic"> <button class="appointment-side-phone" bind:tap="onServic">
<image src="../../image/phone.png"></image> <image src="{{imageBase + 'phone.png'}}"></image>
</button> </button>
</view> </view>
<block wx:for="{{detailImageUrl}}" wx:for-index="index" wx:for-item="item" wx:key="index"> <block wx:for="{{detailImageUrl}}" wx:for-index="index" wx:for-item="item" wx:key="index">
......
...@@ -7,6 +7,8 @@ let logicData = { ...@@ -7,6 +7,8 @@ let logicData = {
Page({ Page({
data: { data: {
imageBase: App.globalData.appImageBase,
winSide: true, winSide: true,
sideHeight: 1250, sideHeight: 1250,
......
...@@ -4,10 +4,10 @@ ...@@ -4,10 +4,10 @@
</view> </view>
<view class="appointment-side col con-b align-c" hidden="{{winSide}}"> <view class="appointment-side col con-b align-c" hidden="{{winSide}}">
<button class="appointment-side-top" bindtap="onBackTop"> <button class="appointment-side-top" bindtap="onBackTop">
<image src="../../image/top.png"></image> <image src="{{imageBase + 'top.png'}}"></image>
</button> </button>
<button class="appointment-side-phone" bind:tap="onServic"> <button class="appointment-side-phone" bind:tap="onServic">
<image src="../../image/phone.png"></image> <image src="{{imageBase + 'phone.png'}}"></image>
</button> </button>
</view> </view>
<block wx:for="{{detailImageUrl}}" wx:for-index="index" wx:for-item="item" wx:key="index"> <block wx:for="{{detailImageUrl}}" wx:for-index="index" wx:for-item="item" wx:key="index">
......
import iLinuiUtil from "../../miniprogram_npm/lin-ui/utils/device-util"
Page({ Page({
data: { data: {
capsuleBarHeight: iLinuiUtil.getNavigationBarHeight(),
},
onLoad: function (options) {
},
onShow: function () {
},
onHide: function () {
}, },
onUnload: function () { onLoad: function (options) {
}, },
}) })
\ No newline at end of file
<!--pages/home/home/home.wxml-->
<text>pages/home/home/home.wxml</text>
/* pages/home/home/home.wxss */
\ No newline at end of file
Page({
data: {
},
onLoad: function (options) {
},
})
\ No newline at end of file
<!--pages/home/home/home.wxml-->
<text>pages/home/home/home.wxml</text>
/* pages/home/home/home.wxss */
\ No newline at end of file
Page({
data: {
},
onLoad: function (options) {
},
})
\ No newline at end of file
<!--pages/home/home/home.wxml-->
<text>pages/home/home/home.wxml</text>
/* pages/home/home/home.wxss */
\ No newline at end of file
Page({
data: {
},
onLoad: function (options) {
},
})
\ No newline at end of file
<!--pages/home/home/home.wxml-->
<text>pages/home/home/home.wxml</text>
/* pages/home/home/home.wxss */
\ No newline at end of file
Page({
data: {
},
onLoad: function (options) {
},
})
\ No newline at end of file
<!--pages/home/home/home.wxml-->
<text>pages/home/home/home.wxml</text>
/* pages/home/home/home.wxss */
\ No newline at end of file
Page({
data: {
},
onLoad: function (options) {
},
})
\ No newline at end of file
<!--pages/home/home/home.wxml-->
<text>pages/home/home/home.wxml</text>
/* pages/home/home/home.wxss */
\ No newline at end of file
Page({
data: {
},
onLoad: function (options) {
},
})
\ No newline at end of file
<!--pages/home/home/home.wxml-->
<text>pages/home/home/home.wxml</text>
/* pages/home/home/home.wxss */
\ No newline at end of file
Page({
data: {
},
onLoad: function (options) {
},
})
\ No newline at end of file
<!--pages/home/home/home.wxml-->
<text>pages/home/home/home.wxml</text>
/* pages/home/home/home.wxss */
\ No newline at end of file
...@@ -14,7 +14,7 @@ Page({ ...@@ -14,7 +14,7 @@ Page({
}) })
let that = this let that = this
app.login({ app.login({
success: function() { success: function () {
that.getNoticeDetail() that.getNoticeDetail()
} }
}) })
......
{ {
"navigationBarTextStyle": "black", "navigationBarTextStyle": "black",
"usingComponents": { "usingComponents": {
"picker":"../../component/picker/picker" "parser": "../../component/parser.min/parser"
} }
} }
\ No newline at end of file
import iMiment from '../../npm/miment.js' const App = getApp()
const app = getApp()
Page({ Page({
data: { data: {
...@@ -14,8 +13,8 @@ Page({ ...@@ -14,8 +13,8 @@ Page({
onLoad: function () { onLoad: function () {
var that = this var that = this
app.login({ App.login({
success: function(token) { success: function (token) {
that.getNoticeList() that.getNoticeList()
} }
}) })
...@@ -24,17 +23,17 @@ Page({ ...@@ -24,17 +23,17 @@ Page({
onNoticeDetail: function (funcItem) { onNoticeDetail: function (funcItem) {
console.log(funcItem) console.log(funcItem)
wx.navigateTo({ wx.navigateTo({
url: '/pages/notice-detail/notice-detail?id='+funcItem.currentTarget.dataset.id url: '/pages/notice-detail/notice-detail?id=' + funcItem.currentTarget.dataset.id
}) })
}, },
// 最新动态列表 // 最新动态列表
getNoticeList() { getNoticeList() {
var that = this var that = this
app.wxRequest({ App.wxRequest({
url: '/api/v1/dynamic/getList', url: '/api/v1/dynamic/getList',
data: { pageSize: that.data.pageSize, pageNo: that.data.pageNo}, data: { pageSize: that.data.pageSize, pageNo: that.data.pageNo },
success: function(res) { success: function (res) {
that.setData({ that.setData({
loading: false loading: false
}) })
...@@ -67,7 +66,7 @@ Page({ ...@@ -67,7 +66,7 @@ Page({
} }
}, },
fail: function(err) { fail: function (err) {
that.setData({ that.setData({
loading: false loading: false
}) })
...@@ -75,7 +74,7 @@ Page({ ...@@ -75,7 +74,7 @@ Page({
}) })
}, },
onReachBottom: function() { onReachBottom: function () {
console.log('触底啦') console.log('触底啦')
if (this.data.loading || !this.data.moreData) { if (this.data.loading || !this.data.moreData) {
return return
......
{ {
"navigationBarTextStyle": "black", "navigationBarTextStyle": "black",
"usingComponents": { "usingComponents": {
"parser":"../../component/parser.min/parser" "parser": "../../component/parser.min/parser"
} }
} }
\ No newline at end of file
...@@ -185,12 +185,15 @@ Page({ ...@@ -185,12 +185,15 @@ Page({
}, },
onPointDetail: function () { onPointDetail: function () {
console.log('onPointDetail')
// 当从景点详情进入屏蔽该功能 // 当从景点详情进入屏蔽该功能
if (logicData.option.id) return if (logicData.option.id) return
let funcPointInfo = this.data.pointInfo let funcPointInfo = this.data.pointInfo
for (let i = 0, l = funcPointInfo.length; i < l; i++) { for (let i = 0, l = funcPointInfo.length; i < l; i++) {
if (funcPointInfo[i].isActive) { if (funcPointInfo[i].isActive) {
console.log(funcPointInfo[i].detail)
wx.navigateTo({ wx.navigateTo({
url: funcPointInfo[i].detail url: funcPointInfo[i].detail
}) })
......
...@@ -6,7 +6,7 @@ let output = [ ...@@ -6,7 +6,7 @@ let output = [
name: '温泉洋房(建设中)', name: '温泉洋房(建设中)',
icon: './image/icon/01.png', icon: './image/icon/01.png',
card: './image/card/01.png', card: './image/card/01.png',
detail: '/pages/shop-point-detail/shop-point-detail?id=105', detail: '/pages/play/point-detail/point-detail?id=105',
isActive: false, isActive: false,
}, { }, {
x: 810, x: 810,
...@@ -15,7 +15,7 @@ let output = [ ...@@ -15,7 +15,7 @@ let output = [
name: '海错图2号馆', name: '海错图2号馆',
icon: './image/icon/02.png', icon: './image/icon/02.png',
card: './image/card/02.png', card: './image/card/02.png',
detail: '/pages/shop-detail/shop-detail?id=1', detail: '/pages/play/service-detail/service-detail?id=1',
isActive: false, isActive: false,
}, { }, {
x: 1060, x: 1060,
...@@ -24,7 +24,7 @@ let output = [ ...@@ -24,7 +24,7 @@ let output = [
name: '海错图1号馆', name: '海错图1号馆',
icon: './image/icon/03.png', icon: './image/icon/03.png',
card: './image/card/03.png', card: './image/card/03.png',
detail: '/pages/shop-detail/shop-detail?id=1', detail: '/pages/play/service-detail/service-detail?id=1',
isActive: false, isActive: false,
}, { }, {
x: 1300, x: 1300,
...@@ -33,7 +33,7 @@ let output = [ ...@@ -33,7 +33,7 @@ let output = [
name: '原味舒食', name: '原味舒食',
icon: './image/icon/04.png', icon: './image/icon/04.png',
card: './image/card/04.png', card: './image/card/04.png',
detail: '/pages/shop-detail/shop-detail?id=4', detail: '/pages/play/service-detail/service-detail?id=4',
isActive: false, isActive: false,
}, { }, {
x: 666, x: 666,
...@@ -42,7 +42,7 @@ let output = [ ...@@ -42,7 +42,7 @@ let output = [
name: '星空影院', name: '星空影院',
icon: './image/icon/05.png', icon: './image/icon/05.png',
card: './image/card/05.png', card: './image/card/05.png',
detail: '/pages/shop-detail/shop-detail?id=6', detail: '/pages/play/service-detail/service-detail?id=6',
isActive: false, isActive: false,
}, { }, {
x: 1120, x: 1120,
...@@ -51,7 +51,7 @@ let output = [ ...@@ -51,7 +51,7 @@ let output = [
name: '元养水韵SPA', name: '元养水韵SPA',
icon: './image/icon/06.png', icon: './image/icon/06.png',
card: './image/card/06.png', card: './image/card/06.png',
detail: '/pages/shop-detail/shop-detail?id=3', detail: '/pages/play/service-detail/service-detail?id=3',
isActive: false, isActive: false,
}, { }, {
x: 1370, x: 1370,
...@@ -60,7 +60,7 @@ let output = [ ...@@ -60,7 +60,7 @@ let output = [
name: '原野MOJITO', name: '原野MOJITO',
icon: './image/icon/07.png', icon: './image/icon/07.png',
card: './image/card/07.png', card: './image/card/07.png',
detail: '/pages/shop-detail/shop-detail?id=5', detail: '/pages/play/service-detail/service-detail?id=5',
isActive: false, isActive: false,
}, { }, {
x: 1708, x: 1708,
...@@ -69,7 +69,7 @@ let output = [ ...@@ -69,7 +69,7 @@ let output = [
name: '拾光花坊', name: '拾光花坊',
icon: './image/icon/08.png', icon: './image/icon/08.png',
card: './image/card/08.png', card: './image/card/08.png',
detail: '/pages/shop-detail/shop-detail?id=2', detail: '/pages/play/service-detail/service-detail?id=2',
isActive: false, isActive: false,
}, { }, {
x: 1016, x: 1016,
...@@ -78,7 +78,7 @@ let output = [ ...@@ -78,7 +78,7 @@ let output = [
name: '星光广场', name: '星光广场',
icon: './image/icon/09.png', icon: './image/icon/09.png',
card: './image/card/09.png', card: './image/card/09.png',
detail: '/pages/shop-point-detail/shop-point-detail?id=101', detail: '/pages/play/point-detail/point-detail?id=101',
isActive: false, isActive: false,
}, { }, {
x: 1002, x: 1002,
...@@ -87,7 +87,7 @@ let output = [ ...@@ -87,7 +87,7 @@ let output = [
name: '云之亭', name: '云之亭',
icon: './image/icon/10.png', icon: './image/icon/10.png',
card: './image/card/10.png', card: './image/card/10.png',
detail: '/pages/shop-point-detail/shop-point-detail?id=102', detail: '/pages/play/point-detail/point-detail?id=102',
isActive: false, isActive: false,
}, { }, {
x: 1390, x: 1390,
...@@ -96,7 +96,7 @@ let output = [ ...@@ -96,7 +96,7 @@ let output = [
name: '湿地公园', name: '湿地公园',
icon: './image/icon/11.png', icon: './image/icon/11.png',
card: './image/card/11.png', card: './image/card/11.png',
detail: '/pages/shop-point-detail/shop-point-detail?id=103', detail: '/pages/play/point-detail/point-detail?id=103',
isActive: false, isActive: false,
}, { }, {
x: 1782, x: 1782,
...@@ -105,7 +105,7 @@ let output = [ ...@@ -105,7 +105,7 @@ let output = [
name: '新月码头', name: '新月码头',
icon: './image/icon/12.png', icon: './image/icon/12.png',
card: './image/card/12.png', card: './image/card/12.png',
detail: '/pages/shop-point-detail/shop-point-detail?id=104', detail: '/pages/play/point-detail/point-detail?id=104',
isActive: false, isActive: false,
}, { }, {
x: 2794, x: 2794,
...@@ -114,7 +114,7 @@ let output = [ ...@@ -114,7 +114,7 @@ let output = [
name: '儿童营地', name: '儿童营地',
icon: './image/icon/13.png', icon: './image/icon/13.png',
card: './image/card/13.png', card: './image/card/13.png',
detail: '/pages/campsite-mirror/campsite-mirror', detail: '/pages/campsite/home-mirror/home-mirror',
isActive: false, isActive: false,
}, { }, {
x: 2112, x: 2112,
...@@ -123,7 +123,7 @@ let output = [ ...@@ -123,7 +123,7 @@ let output = [
name: '星耀银湖', name: '星耀银湖',
icon: './image/icon/14.png', icon: './image/icon/14.png',
card: './image/card/14.png', card: './image/card/14.png',
detail: '/pages/shop-point-detail/shop-point-detail?id=106', detail: '/pages/play/point-detail/point-detail?id=106',
isActive: false, isActive: false,
}, { }, {
x: 1610, x: 1610,
...@@ -132,7 +132,7 @@ let output = [ ...@@ -132,7 +132,7 @@ let output = [
name: '奇幻森林', name: '奇幻森林',
icon: './image/icon/15.png', icon: './image/icon/15.png',
card: './image/card/15.png', card: './image/card/15.png',
detail: '/pages/shop-point-detail/shop-point-detail?id=107', detail: '/pages/play/point-detail/point-detail?id=107',
isActive: false, isActive: false,
}, },
......
Page({
data: {
},
onLoad: function (options) {
},
})
\ No newline at end of file
<!--pages/home/home/home.wxml-->
<text>pages/home/home/home.wxml</text>
/* pages/home/home/home.wxss */
\ No newline at end of file
import iUtils from '../../utils/utils.js' const App = getApp()
const app = getApp()
let logicData = { let logicData = {
pageScrollLock: false, pageScrollLock: false,
...@@ -9,6 +7,8 @@ let logicData = { ...@@ -9,6 +7,8 @@ let logicData = {
Page({ Page({
data: { data: {
imageBase: App.globalData.appImageBase,
// 导航栏相关属性 // 导航栏相关属性
navigationStyle: { navigationStyle: {
normal: { normal: {
...@@ -54,31 +54,14 @@ Page({ ...@@ -54,31 +54,14 @@ Page({
}, },
onLoad: function (options) { onLoad: function (options) {
// this.queryBanner()
// this.queryStrategy()
this.setNavigationLogo() this.setNavigationLogo()
// wx.lin.showToast({
// title: '创建成功~',
// icon: 'success',
// image: '/image/more-w.png',
// success: (res) => {
// console.log(res)
// },
// complete: (res) => {
// console.log(res)
// }
// })
}, },
onShow: function() { onShow: function() {
this.setData({ this.setData({
pageNo: 1 pageNo: 1
}) })
var that = this var that = this
app.login({ App.login({
success: function(token) { success: function(token) {
that.getBanner() that.getBanner()
that.loadVisiterPlanList() that.loadVisiterPlanList()
...@@ -87,107 +70,28 @@ Page({ ...@@ -87,107 +70,28 @@ Page({
}) })
}, },
/**
* 获取 banner 渲染数据
* @function
* @param {string} - funcToken
* @returns
*/
queryBanner: function () {
let funcUrl = [
'https://image-1256588539.cos.ap-shanghai.myqcloud.com/miniapp/home/banner/banner-0.jpg',
'https://image-1256588539.cos.ap-shanghai.myqcloud.com/miniapp/home/banner/banner-1.jpg',
'https://image-1256588539.cos.ap-shanghai.myqcloud.com/miniapp/home/banner/banner-2.jpg',
]
this.setData({
banner: funcUrl
})
},
/**
* 获取 strategy 渲染数据
* @function
* @param {string} - funcToken
* @returns
*/
queryStrategy: function () {
let response = [{
id: '1',
index: 0,
image: 'https://image-1256588539.cos.ap-shanghai.myqcloud.com/miniapp/home/strategy/strategy-01.jpg',
title: '碧海银湖里的自然系饮食|原味舒食。',
date: '2020-07-10'
}, {
id: '2',
index: 1,
image: 'https://image-1256588539.cos.ap-shanghai.myqcloud.com/miniapp/home/strategy/strategy-02.jpg',
title: '漫游海岛奇境,搞定熊孩子的理想国约15000m²',
date: '2020-07-10'
}, {
id: '3',
index: 2,
image: 'https://image-1256588539.cos.ap-shanghai.myqcloud.com/miniapp/home/strategy/strategy-03.jpg',
title: '盛放的海岛秘境,全家人敞开玩的度假胜地之选,后面的内容巴拉巴拉。',
date: '2020-07-10'
}, {
id: '4',
index: 3,
image: 'https://image-1256588539.cos.ap-shanghai.myqcloud.com/miniapp/home/strategy/strategy-04.jpg',
title: '周末给不了你的快乐,40万方超级乐园给你尽情玩耍。',
date: '2020-07-10'
}, {
id: '5',
index: 4,
image: 'https://image-1256588539.cos.ap-shanghai.myqcloud.com/miniapp/home/strategy/strategy-05.jpg',
title: '这里的蓝真的舒服,美好的微风吹得让人沉醉了,躺下了。',
date: '2020-07-10'
}, {
id: '6',
index: 5,
image: 'https://image-1256588539.cos.ap-shanghai.myqcloud.com/miniapp/home/strategy/strategy-06.jpg',
title: '懂生活的你,必定喜欢懂品质的碧海银湖。',
date: '2020-07-10'
}]
this.setData({
strategyList: response
})
// 游客攻略瀑布列表
wx.lin.renderWaterFlow(this.data.strategyList, false, () => {})
},
/**
* 获取 notice 渲染数据
* @function
* @param {string} - funcToken
* @returns
*/
queryNotice: function () {
},
setNavigationLogo: function () { setNavigationLogo: function () {
this.setData({ this.setData({
navigationLogoTop: iUtils.navigationElementCenterMarginTop(60) navigationLogoTop: App.modular.utils.navigationElementCenterMarginTop(60)
}) })
}, },
onGuide: function () { onGuide: function () {
console.log('onGuide') console.log('onGuide')
wx.navigateTo({ wx.navigateTo({
url: '/pages/guide/guide' url: '/pages/home/guide/guide'
}) })
}, },
onNotice: function (event) { onNotice: function (event) {
wx.navigateTo({ wx.navigateTo({
url: '/pages/notice/notice' url: '/pages/home/dynamic/dynamic'
}) })
}, },
onAppointmentInto: function () { onAppointmentInto: function () {
wx.navigateTo({ wx.navigateTo({
url: '/pages/appointment/appointment?type=1' url: '/pages/home/night-appointment/night-appointment?type=1'
}) })
}, },
...@@ -276,7 +180,7 @@ Page({ ...@@ -276,7 +180,7 @@ Page({
break; break;
case 2: case 2:
wx.navigateTo({ wx.navigateTo({
url: '/pages/notice-detail/notice-detail?id='+jumpId url: '/pages/home/dynamic-detail/dynamic-detail?id='+jumpId
}) })
break; break;
case 3: case 3:
...@@ -290,13 +194,13 @@ Page({ ...@@ -290,13 +194,13 @@ Page({
noticClick(e) { noticClick(e) {
let notic = this.data.notice[e.detail.index] let notic = this.data.notice[e.detail.index]
wx.navigateTo({ wx.navigateTo({
url: '/pages/notice-detail/notice-detail?id='+notic.id url: '/pages/home/dynamic-detail/dynamic-detail?id='+notic.id
}) })
}, },
getBanner() { getBanner() {
var that = this var that = this
app.wxRequest({ App.wxRequest({
url: '/api/v1/banner/getList', url: '/api/v1/banner/getList',
success: function(res) { success: function(res) {
that.setData({ that.setData({
...@@ -311,7 +215,7 @@ Page({ ...@@ -311,7 +215,7 @@ Page({
loadVisiterPlanList() { loadVisiterPlanList() {
this.data.loading = true this.data.loading = true
var that = this var that = this
app.wxRequest({ App.wxRequest({
url: '/api/v1/strategy/getList', url: '/api/v1/strategy/getList',
data: { pageSize: that.data.pageSize+'', pageNo: that.data.pageNo+''}, data: { pageSize: that.data.pageSize+'', pageNo: that.data.pageNo+''},
success: function (res) { success: function (res) {
...@@ -389,7 +293,7 @@ Page({ ...@@ -389,7 +293,7 @@ Page({
// 最新动态列表 // 最新动态列表
getNoticeList() { getNoticeList() {
var that = this var that = this
app.wxRequest({ App.wxRequest({
url: '/api/v1/dynamic/getList', url: '/api/v1/dynamic/getList',
data: { pageSize: 5, pageNo: 1, orderBy: " a.release_time desc "}, data: { pageSize: 5, pageNo: 1, orderBy: " a.release_time desc "},
success: function(res) { success: function(res) {
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
</view> </view>
<view class="row con-b align-c"> <view class="row con-b align-c">
<l-notice-bar show="{{true}}" type="swip" swip-arr="{{noticeTitles}}" speed="2000" l-class="notice-bar" bind:lintap="noticClick"></l-notice-bar> <l-notice-bar show="{{true}}" type="swip" swip-arr="{{noticeTitles}}" speed="2000" l-class="notice-bar" bind:lintap="noticClick"></l-notice-bar>
<image class="banner-image" src="../../image/more-g.png" bindtap="onNotice"></image> <image class="banner-image" src="{{imageBase + 'more-g.png'}}" bindtap="onNotice"></image>
</view> </view>
</view> </view>
</view> </view>
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
</view> </view>
<view class="night-info-more row align-c"> <view class="night-info-more row align-c">
<text>去预约</text> <text>去预约</text>
<image src="../../image/more-w.png"></image> <image src="{{imageBase + 'more-w.png'}}"></image>
</view> </view>
</view> </view>
...@@ -64,22 +64,6 @@ ...@@ -64,22 +64,6 @@
</view> </view>
</view> </view>
<!-- 预约看房 -->
<view class="appointment detail-item">
<view class="appointment-content" bindtap="onAppointmentHouse">
<image class="background-image" src="./image/appointment.png" mode="aspectFit"></image>
<view class="row con-b align-c">
<view class="col">
<text class="appointment-info-title">看房预约</text>
<text class="appointment-info-describe">体验海洋温泉,享受湿地与海景双重景观</text>
</view>
<view class="appointment-info-more">
<image src="../../image/more-w.png"></image>
</view>
</view>
</view>
</view>
<!-- 游客攻略 --> <!-- 游客攻略 -->
<block wx:if="{{strategyOriginList.length > 0}}"> <block wx:if="{{strategyOriginList.length > 0}}">
<view class="strategy detail-item" bindtap="onFirstStrategyDetail"> <view class="strategy detail-item" bindtap="onFirstStrategyDetail">
......
import iMiment from '../../npm/miment.js' const App = getApp()
const app = getApp()
Page({ Page({
data: { data: {
imageBase: App.globalData.appImageBase,
navigationTitle: '123213231', navigationTitle: '123213231',
formType: 1, formType: 1,
...@@ -35,7 +36,7 @@ Page({ ...@@ -35,7 +36,7 @@ Page({
}, },
setReset: function () { setReset: function () {
let funcDate = iMiment(new Date().getTime()).format('YYYY-MM-DD') let funcDate = App.modular.miment(new Date().getTime()).format('YYYY-MM-DD')
let endDate = this.getNextDay(funcDate, 3) let endDate = this.getNextDay(funcDate, 3)
console.log('endDate', endDate) console.log('endDate', endDate)
this.setData({ this.setData({
...@@ -101,6 +102,7 @@ Page({ ...@@ -101,6 +102,7 @@ Page({
break break
} }
this.updateSubmitButtonStatus()
}, },
onQuantityCut: function () { onQuantityCut: function () {
...@@ -110,15 +112,15 @@ Page({ ...@@ -110,15 +112,15 @@ Page({
errorQuantity: '', errorQuantity: '',
}) })
} }
this.inspectForm() this.updateSubmitButtonStatus()
}, },
onQuantityAdd: function () { onQuantityAdd: function () {
if (this.data.total*1 == 0) { if (this.data.total * 1 == 0) {
this.setData({ this.setData({
errorQuantity: '所选日期预约名额已满' errorQuantity: '所选日期预约名额已满'
}) })
} else if (this.data.formQuantity >= this.data.total*1) { } else if (this.data.formQuantity >= this.data.total * 1) {
this.setData({ this.setData({
errorQuantity: '所选日期预约的名额仅剩' + activityTime.residue + '人' errorQuantity: '所选日期预约的名额仅剩' + activityTime.residue + '人'
}) })
...@@ -131,8 +133,8 @@ Page({ ...@@ -131,8 +133,8 @@ Page({
formQuantity: this.data.formQuantity + 1, formQuantity: this.data.formQuantity + 1,
errorQuantity: '', errorQuantity: '',
}) })
this.inspectForm()
} }
this.updateSubmitButtonStatus()
}, },
onSelectionDate: function (event) { onSelectionDate: function (event) {
...@@ -192,10 +194,33 @@ Page({ ...@@ -192,10 +194,33 @@ Page({
}, },
updateSubmitButtonStatus() {
let complete = true
if (this.data.formName === '') {
complete = false
}
if (this.data.formPhone === '') {
complete = false
} else if (this.data.formPhone.length != 11) {
complete = false
}
if (this.data.formQuantity === 0) {
complete = false
}
this.setData({
canSubmit: complete
})
return complete
},
onSubmit: function () { onSubmit: function () {
var that = this var that = this
app.login({ App.login({
success: function() { success: function () {
if (!that.inspectForm()) { if (!that.inspectForm()) {
return return
...@@ -206,9 +231,9 @@ Page({ ...@@ -206,9 +231,9 @@ Page({
title: '提交中', title: '提交中',
show: true, show: true,
mask: true, mask: true,
duration: 1000*60, duration: 1000 * 60,
}) })
app.wxRequest({ App.wxRequest({
url: '/api/v1/subscribe/doSubscribe', url: '/api/v1/subscribe/doSubscribe',
data: { data: {
mobile: that.data.formPhone, mobile: that.data.formPhone,
...@@ -217,13 +242,13 @@ Page({ ...@@ -217,13 +242,13 @@ Page({
name: that.data.formName, name: that.data.formName,
type: that.data.formType === 1 ? 0 : 1, type: that.data.formType === 1 ? 0 : 1,
}, },
success: function(res) { success: function (res) {
that.setData({ that.setData({
appointmentComplete: true, appointmentComplete: true,
}) })
wx.lin.hideToast() wx.lin.hideToast()
}, },
fail: function(err) { fail: function (err) {
wx.lin.showToast({ wx.lin.showToast({
image: '/image/error.png', image: '/image/error.png',
title: err.msg, title: err.msg,
...@@ -250,20 +275,22 @@ Page({ ...@@ -250,20 +275,22 @@ Page({
// 预约入园查询返回剩余名额 // 预约入园查询返回剩余名额
getResidue() { getResidue() {
var that = this var that = this
app.login({ App.login({
success: function() { success: function () {
app.wxRequest({ App.wxRequest({
url: '/api/v1/subscribe/getResidue', url: '/api/v1/subscribe/getResidue',
data: { data: {
subscribeDate: that.data.formDate + ' 00:00:00', subscribeDate: that.data.formDate + ' 00:00:00',
type: 0, type: 0,
}, },
success: function(res) { success: function (res) {
that.setData({ that.setData({
total: res.data.total, total: res.data.total,
winQuota: true, winQuota: true,
formQuantity: 0,
}) })
that.updateSubmitButtonStatus()
} }
}) })
...@@ -272,15 +299,15 @@ Page({ ...@@ -272,15 +299,15 @@ Page({
}, },
getNextDay(d,t){ getNextDay(d, t) {
console.log(d,t)//格式为---2019-02-13 3 console.log(d, t)//格式为---2019-02-13 3
d = new Date(d); d = new Date(d);
console.log(d)//格式为---Wed Feb 13 2019 08:00:00 GMT+0800 (中国标准时间) console.log(d)//格式为---Wed Feb 13 2019 08:00:00 GMT+0800 (中国标准时间)
d = +d + (1000*60*60*24)*t; d = +d + (1000 * 60 * 60 * 24) * t;
console.log(d)//格式为--时间戳1550275200000 console.log(d)//格式为--时间戳1550275200000
d = new Date(d); d = new Date(d);
console.log(d)//格式为---Sat Feb 16 2019 08:00:00 GMT+0800 (中国标准时间) console.log(d)//格式为---Sat Feb 16 2019 08:00:00 GMT+0800 (中国标准时间)
return iMiment(new Date(d)).format("YYYY-MM-DD") //格式为"2019-02-16 00:00:00" return App.modular.miment(new Date(d)).format("YYYY-MM-DD") //格式为"2019-02-16 00:00:00"
}, },
}) })
\ No newline at end of file
...@@ -61,11 +61,11 @@ ...@@ -61,11 +61,11 @@
</view> </view>
<view class="input-wrap row con-b align-c" style="padding: 0"> <view class="input-wrap row con-b align-c" style="padding: 0">
<l-button special="{{true}}" bind:lintap="onQuantityCut"> <l-button special="{{true}}" bind:lintap="onQuantityCut">
<image class="input-icon" src="../../image/cut.png"></image> <image class="input-icon" src="{{imageBase + 'cut.png'}}"></image>
</l-button> </l-button>
<text class="text" style="{{formQuantity === 0 ? 'color: #C2C7CF' : 'color: #15191F'}}">{{formQuantity}}</text> <text class="text" style="{{formQuantity === 0 ? 'color: #C2C7CF' : 'color: #15191F'}}">{{formQuantity}}</text>
<l-button special="{{true}}" bind:lintap="onQuantityAdd"> <l-button special="{{true}}" bind:lintap="onQuantityAdd">
<image class="input-icon" src='../../image/add.png'></image> <image class="input-icon" src="{{imageBase + 'add.png'}}"></image>
</l-button> </l-button>
</view> </view>
</view> </view>
...@@ -83,9 +83,9 @@ ...@@ -83,9 +83,9 @@
</view> </view>
<view class="input-wrap row con-b align-c" style="padding: 0 0 0 24rpx"> <view class="input-wrap row con-b align-c" style="padding: 0 0 0 24rpx">
<picker class="input-picker" mode="date" value="{{date}}" start="{{appointmentDate}}" end="{{appointmentEndDate}}" bindchange="onSelectionDate"> <picker class="input-picker" mode="date" value="{{date}}" start="{{appointmentDate}}" end="{{appointmentEndDate}}" bindchange="onSelectionDate">
<view class="picker text">{{formDate}}</view> <view class="picker text" style="display: inline-block;width:400rpx">{{formDate}}</view>
<image class="input-icon" style="float: right;" src="{{imageBase + 'more.png'}}"></image>
</picker> </picker>
<image class="input-icon" src="../../image/more.png"></image>
</view> </view>
</view> </view>
<view class="quota row con-e align-c" hidden="{{!winQuota}}"> <view class="quota row con-e align-c" hidden="{{!winQuota}}">
...@@ -151,9 +151,9 @@ ...@@ -151,9 +151,9 @@
</view> </view>
<view class="input-wrap row align-c" style="padding: 0 0 0 24rpx"> <view class="input-wrap row align-c" style="padding: 0 0 0 24rpx">
<picker class="input-picker" mode="date" value="{{date}}" start="{{appointmentDate}}" bindchange="onSelectionDate"> <picker class="input-picker" mode="date" value="{{date}}" start="{{appointmentDate}}" bindchange="onSelectionDate">
<view class="picker text">{{formDate}}</view> <view class="picker text" style="display: inline-block;width:400rpx">{{formDate}}</view>
<image class="input-icon" style="float: right;" src="{{imageBase + 'more.png'}}"></image>
</picker> </picker>
<image class="input-icon" src="../../image/more.png"></image>
</view> </view>
</view> </view>
</view> </view>
......
...@@ -93,7 +93,7 @@ ...@@ -93,7 +93,7 @@
font-size: 30rpx; font-size: 30rpx;
font-weight: 400; font-weight: 400;
color: #1E2025; color: #1E2025;
line-height: 32rpx; line-height: 80rpx;
} }
.input-tip { .input-tip {
...@@ -110,6 +110,7 @@ ...@@ -110,6 +110,7 @@
.input-picker { .input-picker {
flex-grow: 1; flex-grow: 1;
display: flex;
} }
.form-error { .form-error {
......
<navigation class="navigation" titleText="预约凭证" color="#FFFFFF" backIcon="/image/back-w.png"></navigation>
<view class="container">
<image class="Img" wx:if="{{type == 0}}" src="http://upload.miaomiao-bao.com/f6dfe202008192103225871.jpg"></image>
<image class="Img" wx:if="{{type == 1}}" src="http://upload.miaomiao-bao.com/8883f202008192105356616.jpg"></image>
<view class="appiont-container">
<image wx:if="{{type == 0}}" class="bgcImg" src="http://upload.miaomiao-bao.com/f8e92202008192102227949.jpg"></image>
<image wx:if="{{type == 1}}" class="bgcImg" src="http://upload.miaomiao-bao.com/11174202008192100431340.jpg"></image>
<view class="form">
<image class="card" src="http://upload.miaomiao-bao.com/b6d15202008192102456807.png"></image>
<image wx:if="{{type == 0}}" src="http://sm-web.meiqicloud.com/userfiles/appResources/appointment/night/title-1.png" class="title" style="width:400rpx;margin-left:112rpx;"></image>
<image wx:if="{{type == 1}}" src="http://sm-web.meiqicloud.com/userfiles/appResources/appointment/night/title-2.png" class="title" style="width:300rpx;margin-left:160rpx;"></image>
<view class="form-content">
<view class="form-item">
<view class="form-item-nav">姓名</view>
<view class="form-item-content">{{name}}</view>
</view>
<view class="form-item">
<view class="form-item-nav">手机号</view>
<view class="form-item-content">{{mobile}}</view>
</view>
<view class="form-item" wx:if="{{type == 0}}">
<view class="form-item-nav">入园人数</view>
<view class="form-item-content">{{num}}人</view>
</view>
<view class="form-item" wx:if="{{type == 0}}">
<view class="form-item-nav">入园时间</view>
<view class="form-item-content">{{time}}</view>
</view>
<view class="form-item" wx:if="{{type == 1}}">
<view class="form-item-nav">看房日期</view>
<view class="form-item-content">{{time}}</view>
</view>
</view>
<image src="http://sm-web.meiqicloud.com/userfiles/appResources/appointment/night/ornament-1.png" class="thanks"></image>
</view>
<view class="custom" bindtap="showHotline">客服咨询</view>
</view>
</view>
<!-- 客服热线 -->
<l-arc-popup show="{{hotline}}" arc-radius="30">
<view class="phone">{{phone}}</view>
<view class="call" bindtap="call">呼叫</view>
<view style="height:10rpx;background-color:rgb(246,247,249);"></view>
<view class="call" bindtap="cancel">取消</view>
</l-arc-popup>
/* pages/hotelAccommodation/hotelAccommodation.wxss */
.Img{
position: absolute;
z-index: -2;
width: 100%;
height: 1624rpx;
}
.bgcImg{
width: 100%;
height: 316rpx;
}
.appiont-container{
width: 622rpx;
padding-top: 173rpx;
margin: auto;
position: relative;
z-index: 0;
}
.form{
width: 100%;
height: auto;
position: relative;
height: 780rpx;
margin-top: -5rpx;
overflow: hidden;
}
.card{
width: 100%;
height: 1096rpx;
position: absolute;
z-index: -1;
top:-316rpx;
}
.title{
height: 50rpx;
margin-top: 50rpx;
margin-bottom: 94rpx;
}
.form-content{
width: 494rpx;
margin: auto;
}
.form-item{
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 48rpx;
}
.form-item-nav{
width: 120rpx;
height: 40rpx;
line-height: 40rpx;
text-align: justify;
text-align-last: justify;
font-size:30rpx;
color:rgba(149,157,169,1);
}
.form-item-nav::after{
content: "";
display: inline-block;
width: 100%;
height: 0;
}
.form-item-content{
width: 310rpx;
font-size:30rpx;
font-weight:400;
color:rgba(21,25,31,1);
}
.thanks{
width: 462rpx;
height: 22rpx;
position: absolute;
bottom: 56rpx;
left: 76rpx;
}
.icon{
width: 170rpx;
height: 52rpx;
position: absolute;
top: 210rpx;
right: 46rpx;
z-index: 10;
}
.custom{
width:622rpx;
height:96rpx;
background:rgba(134,197,225,1);
border-radius:4px;
margin-top: 72rpx;
line-height: 96rpx;
text-align: center;
color:rgba(255,255,255,1);
margin-bottom: 68rpx;
}
.phone{
height: 85rpx;
text-align: center;
color: rgb(160, 157, 160);
line-height: 85rpx;
}
.call{
height: 125rpx;
text-align: center;
line-height: 125rpx;
font: 30rpx;
}
\ No newline at end of file
<view class="container">
<scroll-view scroll-y style="height: 800rpx">
<view>shui</view>
<view>shui</view>
<view>shui</view>
<view>shui</view>
<view>shui</view>
<view>shui</view>
<view>shui</view>
<view>shui</view>
<view>shui</view>
<view>shui</view>
<view>shui</view>
<view>shui</view>
<view>shui</view>
<view>shui</view>
<view>shui</view>
<view>shui</view>
<view>shui</view>
<view>shui</view>
<view>shui</view>
<view>shui</view>
<view>shui</view>
<view>shui</view>
<view>shui</view>
<view>shui</view>
<view>shui</view>
<view>shui</view>
<view>shui</view>
<view>shui</view>
<view>shui</view>
<view>shui</view>
<view>shui</view>
<view>shui</view>
<view>shui</view>
<view>shui</view>
<view>shui</view>
<view>shui</view>
<view>shui</view>
<view>shui</view>
<view>shui</view>
<view>shui3333</view>
<view>shui2222</view>
<view>shui1111</view>
</scroll-view>
</view>
\ No newline at end of file
.container {
width:100%;
border: 1rpx red solid;
overflow: scroll;
background: green;
}
.navigation-bar-image{
width:100%;
position:fixed;
top:0;
left:0;
}
\ No newline at end of file
// pages/login/login.js
const app = getApp() const app = getApp()
Page({ Page({
/**
* 页面的初始数据
*/
data: { data: {
height:'', height: '',
islogin:false, islogin: false,
isphone:false, isphone: false,
}, },
/** onLoad: function(options) {
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
let mobile = wx.getStorageSync('mobile') let mobile = wx.getStorageSync('mobile')
let nickName = wx.getStorageSync('nickName') let nickName = wx.getStorageSync('nickName')
let avatarUrl = wx.getStorageSync('avatarUrl') let avatarUrl = wx.getStorageSync('avatarUrl')
...@@ -26,61 +17,8 @@ Page({ ...@@ -26,61 +17,8 @@ Page({
islogin: (nickName && avatarUrl) ? true : false, islogin: (nickName && avatarUrl) ? true : false,
isphone: (mobile) ? true : false, isphone: (mobile) ? true : false,
}) })
}, },
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
},
/*
* 返回
*/
back: function(e) { back: function(e) {
if (this.data.islogin && this.data.isphone) { if (this.data.islogin && this.data.isphone) {
console.log('授权及绑定成功') console.log('授权及绑定成功')
...@@ -164,7 +102,7 @@ Page({ ...@@ -164,7 +102,7 @@ Page({
registUserInfo(obj) { registUserInfo(obj) {
app.registUserInfo({ app.registUserInfo({
param: obj.param, param: obj.param,
success: function (res) { success: function(res) {
if (obj.success) { if (obj.success) {
obj.success(res) obj.success(res)
} }
...@@ -177,5 +115,4 @@ Page({ ...@@ -177,5 +115,4 @@ Page({
wx.navigateBack({}) wx.navigateBack({})
} }
} }
}) })
\ No newline at end of file
<!--pages/login/login.wxml--> <!--pages/login/login.wxml-->
<navigation class="navigation" backIcon="/image/back-w.png" bindback="back"></navigation> <navigation class="navigation" backIcon="/image/back-w.png" bindback="back"></navigation>
<view class="container" > <view class="container">
<view style="height:{{height}}px;overflow:hidden;"> <view style="height:{{height}}px;overflow:hidden;">
<image class="bgClass" src="http://upload.miaomiao-bao.com/97b52202008201410189925.png"></image> <image class="bgClass" src="http://upload.miaomiao-bao.com/97b52202008201410189925.png"></image>
<view class="imgContainer"> <view class="imgContainer">
...@@ -11,9 +11,15 @@ ...@@ -11,9 +11,15 @@
</view> </view>
<view class="btn-contanier"> <view class="btn-contanier">
<button class="loginBtn" hidden="{{islogin}}" open-type="getUserInfo" bindgetuserinfo="userInfoHandler">微信授权登录</button> <button class="loginBtn" hidden="{{islogin}}" open-type="getUserInfo" bindgetuserinfo="userInfoHandler">微信授权登录</button>
<view class="isloginBtn loginBtn" hidden="{{!islogin}}"> <view style="margin-right:10rpx;">已授权</view> <l-icon name="success" color="rgba(255,255,255,1);" size="28" /></view> <view class="isloginBtn loginBtn" hidden="{{!islogin}}">
<view style="margin-right:10rpx;">已授权</view>
<l-icon name="success" color="rgba(255,255,255,1);" size="28" />
</view>
<button class="loginBtn" hidden="{{isphone}}" open-type="getPhoneNumber" bindgetphonenumber="userPhoneHandler">绑定手机号</button> <button class="loginBtn" hidden="{{isphone}}" open-type="getPhoneNumber" bindgetphonenumber="userPhoneHandler">绑定手机号</button>
<view class="isloginBtn loginBtn" hidden="{{!isphone}}"><view style="margin-right:10rpx;">已绑定手机号</view><l-icon name="success" color="rgba(255,255,255,1);" size="28"/></view> <view class="isloginBtn loginBtn" hidden="{{!isphone}}">
<view style="margin-right:10rpx;">已绑定手机号</view>
<l-icon name="success" color="rgba(255,255,255,1);" size="28" />
</view>
</view> </view>
</view> </view>
......
/* pages/login/login.wxss */ /* pages/login/login.wxss */
.all{
.all {
height: 100%; height: 100%;
} }
.content{
width:750rpx; .content {
position:relative; width: 750rpx;
position: relative;
/* overflow: hidden; */ /* overflow: hidden; */
} }
.bgClass{
.bgClass {
height: 1624rpx; height: 1624rpx;
width: 750rpx; width: 750rpx;
z-index: -1; z-index: -1;
} }
.imgContainer{
.imgContainer {
width: 750rpx; width: 750rpx;
position: absolute; position: absolute;
top: 326rpx; top: 326rpx;
...@@ -20,41 +24,46 @@ ...@@ -20,41 +24,46 @@
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
} }
.titleImg{
.titleImg {
width: 528rpx; width: 528rpx;
height: 230rpx; height: 230rpx;
left: 112rpx; left: 112rpx;
margin-bottom: 26rpx; margin-bottom: 26rpx;
} }
.contentImg{
.contentImg {
width: 456rpx; width: 456rpx;
height: 190rpx; height: 190rpx;
margin-top: 132rpx; margin-top: 132rpx;
} }
.font{
.font {
height: 42rpx; height: 42rpx;
margin-bottom: 32rpx; margin-bottom: 32rpx;
} }
.btn-contanier{
width:558rpx; .btn-contanier {
width: 558rpx;
position: absolute; position: absolute;
bottom: 80rpx; bottom: 80rpx;
left: 96rpx; left: 96rpx;
/* margin-top: 176rpx; */ /* margin-top: 176rpx; */
} }
.loginBtn{
width:558rpx; .loginBtn {
height:96rpx; width: 558rpx;
background:rgba(134,197,225,1); height: 96rpx;
border-radius:4px; background: rgba(134, 197, 225, 1);
border-radius: 4px;
line-height: 96rpx; line-height: 96rpx;
text-align: center; text-align: center;
color:rgba(255,255,255,1); color: rgba(255, 255, 255, 1);
margin-bottom: 44rpx; margin-bottom: 44rpx;
font-size: 32rpx; font-size: 32rpx;
} }
.isloginBtn{ .isloginBtn {
background-color: rgb(200, 225, 236); background-color: rgb(200, 225, 236);
display: flex; display: flex;
justify-content: center; justify-content: center;
......
Page({
data: {
},
onLoad: function (options) {
},
})
\ No newline at end of file
<!--pages/home/home/home.wxml-->
<text>pages/home/home/home.wxml</text>
/* pages/home/home/home.wxss */
\ No newline at end of file
Page({
data: {
},
onLoad: function (options) {
},
})
\ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file
<!--pages/home/home/home.wxml-->
<text>pages/home/home/home.wxml</text>
/* pages/home/home/home.wxss */
\ No newline at end of file
Page({
data: {
},
onLoad: function (options) {
},
})
\ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file
<!--pages/home/home/home.wxml-->
<text>pages/home/home/home.wxml</text>
/* pages/home/home/home.wxss */
\ No newline at end of file
...@@ -7,26 +7,37 @@ Page({ ...@@ -7,26 +7,37 @@ Page({
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
navItem:[ navItem: [{
{content:'全部',type:'0'}, content: '全部',
{content:'未开始',type:'1'}, type: '0'
{content:'进行中',type:'2'}, },
{content:'已结束',type:'3'}, {
content: '未开始',
type: '1'
},
{
content: '进行中',
type: '2'
},
{
content: '已结束',
type: '3'
},
], ],
height:0, height: 0,
data:[], data: [],
active:0, active: 0,
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
loading: false, loading: false,
moreData: true, moreData: true,
}, },
goPlay(){ goPlay() {
wx.switchTab({ wx.switchTab({
url: '../../pages/play/play', url: '../../pages/play/play',
}) })
}, },
chageNav(e){ chageNav(e) {
let index = e.currentTarget.dataset.index let index = e.currentTarget.dataset.index
this.setData({ this.setData({
active: index, active: index,
...@@ -34,78 +45,35 @@ Page({ ...@@ -34,78 +45,35 @@ Page({
}) })
this.getMyActivityList() this.getMyActivityList()
}, },
activityDetail(e){ activityDetail(e) {
wx.navigateTo({ wx.navigateTo({
url: '../activityDetail/activityDetail?enrollid='+e.currentTarget.dataset.enrollid, url: '../activityDetail/activityDetail?enrollid=' + e.currentTarget.dataset.enrollid,
}) })
}, },
/**
* 生命周期函数--监听页面加载 onLoad: function(options) {
*/
onLoad: function (options) {
this.setData({ this.setData({
height: wx.getSystemInfoSync().windowHeight, //获取屏幕的高度 height: wx.getSystemInfoSync().windowHeight, //获取屏幕的高度
}) })
this.getMyActivityList() this.getMyActivityList()
}, },
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
},
// 我的活动 // 我的活动
getMyActivityList() { getMyActivityList() {
let state = '' let state = ''
switch (Number(this.data.active)) { switch (Number(this.data.active)) {
case 0: state = ''; break; case 0:
case 1: state = 0; break; state = '';
case 2: state = 1; break; break;
case 3: state = 2; break; case 1:
state = 0;
break;
case 2:
state = 1;
break;
case 3:
state = 2;
break;
} }
var that = this var that = this
app.login({ app.login({
...@@ -115,20 +83,30 @@ Page({ ...@@ -115,20 +83,30 @@ Page({
}) })
app.wxRequest({ app.wxRequest({
url: '/api/v1/activity/getMyActivityList', url: '/api/v1/activity/getMyActivityList',
data: { activeState: state, pageSize: that.data.pageSize, pageNo: that.data.pageNo }, data: {
activeState: state,
pageSize: that.data.pageSize,
pageNo: that.data.pageNo
},
success: function(res) { success: function(res) {
let list = res.data.list let list = res.data.list
let tmpArr = [] let tmpArr = []
list.forEach(item => { list.forEach(item => {
let state = item.activeState*1 let state = item.activeState * 1
let type = 0 let type = 0
switch (state) { switch (state) {
case 0: type = 1;break; case 0:
case 1: type = 0;break; type = 1;
case 2: type = 2;break; break;
case 1:
type = 0;
break;
case 2:
type = 2;
break;
} }
let obj = { let obj = {
time: item.enrollDate,//item.activeDate + ' ' + item.activeTime, time: item.enrollDate, //item.activeDate + ' ' + item.activeTime,
type: type, type: type,
content: item.address, content: item.address,
title: item.name, title: item.name,
...@@ -145,7 +123,7 @@ Page({ ...@@ -145,7 +123,7 @@ Page({
loading: false, loading: false,
}) })
that.setData({ that.setData({
moreData: (that.data.data.length >= res.data.count*1) ? false: true moreData: (that.data.data.length >= res.data.count * 1) ? false : true
}) })
}, },
fail: function(err) { fail: function(err) {
......
{ {
"disableScroll": true,
"navigationStyle": "custom",
"usingComponents": {} "usingComponents": {}
} }
\ No newline at end of file
<navigation class="navigation" titleText="我的活动" backIcon="/image/back.png"></navigation> <navigation class="navigation" titleText="我的活动" backIcon="/image/back.png"></navigation>
<view class="container all" > <view class="container all">
<view class="myActivity-container" style="min-height:{{height}}px;"> <view class="myActivity-container" style="min-height:{{height}}px;">
<view class="activity-nav"> <view class="activity-nav">
<!-- 遍历头部导航 --> <!-- 遍历头部导航 -->
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
<view class="ellipsis itemContent {{item.type == 2?'contentEndColor':''}}">{{item.content}}</view> <view class="ellipsis itemContent {{item.type == 2?'contentEndColor':''}}">{{item.content}}</view>
</view> </view>
<view style="width:80rpx;height:100%;display:flex;align-items: center;flex-direction: row-reverse;"> <view style="width:80rpx;height:100%;display:flex;align-items: center;flex-direction: row-reverse;">
<l-icon name="right" color="rgb(172,172,174)" size="26" style="margin-right:12rpx;"/> <l-icon name="right" color="rgb(172,172,174)" size="26" />
</view> </view>
</view> </view>
</view> </view>
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
</view> </view>
<view class="noActive" hidden="{{data.length > 0}}" > <view class="noActive" hidden="{{data.length > 0}}">
<view class="noActive-title">暂无已报名的活动</view> <view class="noActive-title">暂无已报名的活动</view>
<view class="noActive-botton" bindtap="goPlay">发现畅玩活动</view> <view class="noActive-botton" bindtap="goPlay">发现畅玩活动</view>
</view> </view>
...@@ -36,13 +36,13 @@ ...@@ -36,13 +36,13 @@
</view> </view>
<!-- 状态值格式化 --> <!-- 状态值格式化 -->
<wxs module="status" > <wxs module="status">
var status =function(type){ var status = function(type) {
if(type == 0){ if (type == 0) {
return '进行中' return '进行中'
}else if(type == 1){ } else if (type == 1) {
return '未开始' return '未开始'
}else{ } else {
return '已结束' return '已结束'
} }
} }
......
/* pages/myActivity/myActivity.wxss */ /* pages/myActivity/myActivity.wxss */
.all{
background-color: rgba(243,244,246,1); .all {
background-color: rgba(243, 244, 246, 1);
} }
.myActivity-container{
.myActivity-container {
width: 750rpx; width: 750rpx;
height: 100%; height: 100%;
} }
.noActive{
.noActive {
width: 750rpx; width: 750rpx;
position: absolute; position: absolute;
top: 50%; top: 50%;
text-align: center; text-align: center;
height: auto; height: auto;
} }
.noActive-title{
font-size:38rpx; .noActive-title {
font-weight:500; font-size: 38rpx;
color:rgba(149,157,169,1); font-weight: 500;
line-height:52rpx; color: rgba(149, 157, 169, 1);
} line-height: 52rpx;
.noActive-rule{ }
font-size:26rpx;
font-weight:400; .noActive-rule {
color:rgba(149,157,169,1); font-size: 26rpx;
line-height:36rpx; font-weight: 400;
color: rgba(149, 157, 169, 1);
line-height: 36rpx;
margin-top: 24rpx; margin-top: 24rpx;
} }
.noActive-botton{
width:308rpx; .noActive-botton {
height:96rpx; width: 308rpx;
font-size:26rpx; height: 96rpx;
font-size: 26rpx;
text-align: center; text-align: center;
font-weight:400; font-weight: 400;
line-height: 96rpx; line-height: 96rpx;
background:rgba(134,197,225,1); background: rgba(134, 197, 225, 1);
border-radius:4px; border-radius: 4px;
color:rgba(255,255,255,1); color: rgba(255, 255, 255, 1);
font-size:30rpx; font-size: 30rpx;
margin: 0 auto; margin: 0 auto;
margin-top: 64rpx; margin-top: 64rpx;
} }
.activity-nav{
.activity-nav {
width: 750rpx; width: 750rpx;
padding-top: 150rpx; padding-top: 224rpx;
/* height: 95rpx; */ /* height: 95rpx; */
border-bottom: 1px solid rgb(238, 238, 238); border-bottom: 1px solid rgb(238, 238, 238);
background: -webkit-linear-gradient(rgb(255,255,255), rgb(249,249,251)); /* Safari 5.1 - 6.0 */ background: -webkit-linear-gradient(rgb(255, 255, 255), rgb(249, 249, 251)); /* Safari 5.1 - 6.0 */
background: -o-linear-gradient(rgb(255,255,255), rgb(249,249,251)); /* Opera 11.1 - 12.0 */ background: -o-linear-gradient(rgb(255, 255, 255), rgb(249, 249, 251)); /* Opera 11.1 - 12.0 */
background: -moz-linear-gradient(rgb(255,255,255), rgb(249,249,251)); /* Firefox 3.6 - 15 */ background: -moz-linear-gradient(rgb(255, 255, 255), rgb(249, 249, 251)); /* Firefox 3.6 - 15 */
background: linear-gradient(rgb(255,255,255), rgb(249,249,251)); /* 标准的语法(必须放在最后) */ background: linear-gradient(rgb(255, 255, 255), rgb(249, 249, 251)); /* 标准的语法(必须放在最后) */
display: flex; display: flex;
justify-content: space-around; justify-content: space-around;
} }
.navItem{
.navItem {
line-height: 95rpx; line-height: 95rpx;
color: #959DA9; color: #959da9;
} }
.active{
.active {
border-bottom: 3px solid rgb(0, 0, 2); border-bottom: 3px solid rgb(0, 0, 2);
color: #15191F; color: #15191f;
} }
.itemContent{
font-size:26rpx; .itemContent {
color:rgba(149,157,169,1); font-size: 26rpx;
color: rgba(149, 157, 169, 1);
} }
.activity-body{
.activity-body {
width: 750rpx; width: 750rpx;
/* min-height: 1400rpx; */ /* min-height: 1400rpx; */
padding-top: 50rpx; padding-top: 50rpx;
background-color: rgb(243,244,246,1); background-color: rgb(243, 244, 246, 1);
height: auto; height: auto;
position: relative; position: relative;
} }
.my-activities-item{
.my-activities-item {
width: 675rpx; width: 675rpx;
height: 280rpx; height: 280rpx;
position: relative; position: relative;
margin: 0 auto; margin: 0 auto;
margin-bottom: 50rpx; margin-bottom: 50rpx;
} }
.my-activities-top{
.my-activities-top {
position: absolute; position: absolute;
top: 0; top: 0;
padding:0 25rpx 0 25rpx; padding: 0 25rpx 0 25rpx;
height: 60rpx; height: 60rpx;
background-color: rgb(2, 0, 2); background-color: rgb(2, 0, 2);
color: white; color: white;
line-height:60rpx ; line-height: 60rpx;
z-index: 2; z-index: 2;
border-radius: 3px; border-radius: 3px;
font-size: 30rpx; font-size: 30rpx;
} }
.my-activities-bottom{
.my-activities-bottom {
width: 100%; width: 100%;
height: 250rpx; height: 250rpx;
position: absolute; position: absolute;
...@@ -100,18 +113,21 @@ ...@@ -100,18 +113,21 @@
background-color: white; background-color: white;
border-radius: 3px; border-radius: 3px;
} }
.my-activities-title{
.my-activities-title {
line-height: 2; line-height: 2;
color:rgba(21,25,31,1); color: rgba(21, 25, 31, 1);
font-size: 30rpx; font-size: 30rpx;
} }
.my-activities-content{
.my-activities-content {
color: rgb(169, 174, 181); color: rgb(169, 174, 181);
font-size: 26rpx; font-size: 26rpx;
padding-left:50rpx ; padding-left: 50rpx;
line-height: 2; line-height: 2;
} }
.subscribe{
.subscribe {
width: 150rpx; width: 150rpx;
height: 70rpx; height: 70rpx;
position: absolute; position: absolute;
...@@ -121,62 +137,77 @@ ...@@ -121,62 +137,77 @@
line-height: 70rpx; line-height: 70rpx;
text-align: center; text-align: center;
font-size: 26rpx; font-size: 26rpx;
top:92rpx ; top: 92rpx;
} }
.activity-status{
.activity-status {
text-align: right; text-align: right;
line-height: 65rpx; /* line-height: 65rpx; */
padding-top: 32rpx;
padding-right: 30rpx; padding-right: 30rpx;
color: rgb(154, 192, 227); color: rgb(154, 192, 227);
font-size: 28rpx; font-size: 28rpx;
} }
.activity-contanier{
.activity-contanier {
height: 160rpx; height: 160rpx;
width: 600rpx; width: 600rpx;
margin: auto; margin: auto;
display: flex; display: flex;
align-items: center; align-items: center;
} }
.activity-contanier-img{
.activity-contanier-img {
width: 140rpx; width: 140rpx;
height: 140rpx; height: 136rpx;
} }
.my-activities-content{
.my-activities-content {
height: 140rpx; height: 140rpx;
width: 380rpx; width: 380rpx;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-around; justify-content: center;
} }
.my-activities-title{
.my-activities-title {
font-weight: 500; font-weight: 500;
letter-spacing: 1px; letter-spacing: 1px;
} }
/* 超出部分省略 */ /* 超出部分省略 */
.ellipsis{
white-space:nowrap; .ellipsis {
overflow:hidden; white-space: nowrap;
text-overflow:ellipsis; overflow: hidden;
text-overflow: ellipsis;
} }
/* 两行超出部分省略 */ /* 两行超出部分省略 */
.clamp-ellipsis{
.clamp-ellipsis {
word-break: break-all; word-break: break-all;
text-overflow: ellipsis; text-overflow: ellipsis;
overflow: hidden; overflow: hidden;
display: -webkit-box; display: -webkit-box;
-webkit-line-clamp: 2; -webkit-line-clamp: 2;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
} }
.opcity{
.opcity {
opacity: 0.6; opacity: 0.6;
} }
.timeendColor{
background:rgba(217,222,231,1); .timeendColor {
background: rgba(217, 222, 231, 1);
} }
.contentEndColor{
color:rgba(194,199,207,1); .contentEndColor {
color: rgba(194, 199, 207, 1);
} }
/* 未开始字体颜色 */ /* 未开始字体颜色 */
.stautsColor{
.stautsColor {
color: rgb(164, 183, 133) !important; color: rgb(164, 183, 133) !important;
} }
...@@ -7,90 +7,90 @@ Page({ ...@@ -7,90 +7,90 @@ Page({
*/ */
data: { data: {
type: 1, //判断页面显示的类型 1.填写表单 2.认证中 3.认证失败 type: 1, //判断页面显示的类型 1.填写表单 2.认证中 3.认证失败
nameErr:'',// 请输入姓名 nameErr: '', // 请输入姓名
phoneErr:'',//请输入正确的手机号 phoneErr: '', //请输入正确的手机号
idCardErr:'',//请输入正确的身份证号, idCardErr: '', //请输入正确的身份证号,
roomErr:'',//请输入房号 roomErr: '', //请输入房号
room:'', room: '',
name:'', name: '',
phone:'', phone: '',
idCard:'', idCard: '',
list:['园区门票优惠','餐厅价格优惠','SPA服务优惠','免费观看电影','无须预约入园','尽享多重特权'], list: ['园区门票优惠', '餐厅价格优惠', 'SPA服务优惠', '免费观看电影', '无须预约入园', '尽享多重特权'],
remarks: '', remarks: '',
}, },
//输入房号 //输入房号
inputRoom(e){ inputRoom(e) {
this.setData({ this.setData({
room:e.detail.value room: e.detail.value
}) })
}, },
roomBlur(e){ roomBlur(e) {
let val = e.detail.value; let val = e.detail.value;
if(!val){ if (!val) {
this.setData({ this.setData({
roomErr:'请输入房号' roomErr: '请输入房号'
}) })
}else{ } else {
this.setData({ this.setData({
roomErr:'' roomErr: ''
}) })
} }
}, },
//输入身份证 //输入身份证
inputIdCard(e){ inputIdCard(e) {
this.setData({ this.setData({
idCard:e.detail.value idCard: e.detail.value
}) })
}, },
idCardBlur(e){ idCardBlur(e) {
let val = e.detail.value; let val = e.detail.value;
if(!val || (val.length != 18)){ if (!val || (val.length != 18)) {
this.setData({ this.setData({
idCardErr:'请输入正确的身份证号' idCardErr: '请输入正确的身份证号'
}) })
}else{ } else {
this.setData({ this.setData({
idCardErr:'' idCardErr: ''
}) })
} }
}, },
//输入姓名 //输入姓名
inputName(e){ inputName(e) {
this.setData({ this.setData({
name:e.detail.value name: e.detail.value
}) })
}, },
//输入框姓名失去焦点事件 //输入框姓名失去焦点事件
nameBlur(e){ nameBlur(e) {
let val = e.detail.value; let val = e.detail.value;
console.log(val) console.log(val)
if(!val){ if (!val) {
this.setData({ this.setData({
nameErr:'请输入姓名' nameErr: '请输入姓名'
}) })
}else{ } else {
this.setData({ this.setData({
nameErr:'' nameErr: ''
}) })
} }
}, },
//手机号输入 //手机号输入
inputPhone(e){ inputPhone(e) {
this.setData({ this.setData({
phone:e.detail.value phone: e.detail.value
}) })
}, },
//手机号验证 //手机号验证
phoneBlur(e){ phoneBlur(e) {
let val = e.detail.value; let val = e.detail.value;
if(!val || (val.length != 11)){ if (!val || (val.length != 11)) {
this.setData({ this.setData({
phoneErr:'请输入正确的手机号' phoneErr: '请输入正确的手机号'
}) })
}else{ } else {
this.setData({ this.setData({
phoneErr:'' phoneErr: ''
}) })
} }
}, },
...@@ -101,56 +101,56 @@ Page({ ...@@ -101,56 +101,56 @@ Page({
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function(options) {
this.getAuth() this.getAuth()
}, },
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
onReady: function () { onReady: function() {
}, },
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow: function () { onShow: function() {
}, },
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
onHide: function () { onHide: function() {
}, },
/** /**
* 生命周期函数--监听页面卸载 * 生命周期函数--监听页面卸载
*/ */
onUnload: function () { onUnload: function() {
}, },
/** /**
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
*/ */
onPullDownRefresh: function () { onPullDownRefresh: function() {
}, },
/** /**
* 页面上拉触底事件的处理函数 * 页面上拉触底事件的处理函数
*/ */
onReachBottom: function () { onReachBottom: function() {
}, },
/** /**
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage: function () { onShareAppMessage: function() {
}, },
...@@ -161,10 +161,12 @@ Page({ ...@@ -161,10 +161,12 @@ Page({
url: '/api/v1/userAuth/getAuth', url: '/api/v1/userAuth/getAuth',
method: 'GET', method: 'GET',
success: function(res) { success: function(res) {
let state = res.data.state*1 // 0 待审核 1 审核通过 2 不通过 let state = res.data.state * 1 // 0 待审核 1 审核通过 2 不通过
let type = 1 // 判断页面显示的类型 1.填写表单 2.认证中 3.认证失败 let type = 1 // 判断页面显示的类型 1.填写表单 2.认证中 3.认证失败
switch (state) { switch (state) {
case 0: type = 2; break; case 0:
type = 2;
break;
case 1: case 1:
wx.lin.showToast({ wx.lin.showToast({
image: '/image/success.png', image: '/image/success.png',
...@@ -174,7 +176,9 @@ Page({ ...@@ -174,7 +176,9 @@ Page({
wx.navigateBack({}) wx.navigateBack({})
}, 2000) }, 2000)
break; break;
case 2: type = 3; break; case 2:
type = 3;
break;
} }
that.setData({ that.setData({
type: type, type: type,
...@@ -209,7 +213,7 @@ Page({ ...@@ -209,7 +213,7 @@ Page({
icon: 'loading', icon: 'loading',
title: '提交中', title: '提交中',
show: true, show: true,
duration: 1000*60, duration: 1000 * 60,
}) })
app.wxRequest({ app.wxRequest({
url: '/api/v1/userAuth/doAuth', url: '/api/v1/userAuth/doAuth',
......
{
"usingComponents": {}
}
\ No newline at end of file
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
</view> </view>
</view> </view>
<view class="content" wx:if="{{type == 1}}" > <view class="content" wx:if="{{type == 1}}">
<view class="content-title">填写认证信息</view> <view class="content-title">填写认证信息</view>
<text class="rquire">请填写与购房合同一致的信息</text> <text class="rquire">请填写与购房合同一致的信息</text>
<view class="form"> <view class="form">
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
<view class="marginB"> <view class="marginB">
<view class="form-item"> <view class="form-item">
<view class="form-item-nav">房号</view> <view class="form-item-nav">房号</view>
<input placeholder-class="placeholder" maxlength="10" class="{{roomErr.length>0 ? 'form-input-error' : 'form-input'}}"bindinput="inputRoom" bindblur="roomBlur" placeholder="请输入房号" value="{{room}}"></input> <input placeholder-class="placeholder" maxlength="10" class="{{roomErr.length>0 ? 'form-input-error' : 'form-input'}}" bindinput="inputRoom" bindblur="roomBlur" placeholder="请输入房号" value="{{room}}"></input>
</view> </view>
<view class="error" hidden="{{!roomErr.length>0}}">{{roomErr}}</view> <view class="error" hidden="{{!roomErr.length>0}}">{{roomErr}}</view>
</view> </view>
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
</view> </view>
<!-- 审核状态 --> <!-- 审核状态 -->
<view class="content" wx:else > <view class="content" wx:else>
<view class="aduit"> <view class="aduit">
<image wx:if="{{type == 2}}" src="/image/audit-ing.png" class="audit-Img"></image> <image wx:if="{{type == 2}}" src="/image/audit-ing.png" class="audit-Img"></image>
<image wx:if="{{type == 3}}" src="/image/audit-err.png" class="audit-Img"></image> <image wx:if="{{type == 3}}" src="/image/audit-err.png" class="audit-Img"></image>
......
/* pages/ownerCertification/ownerCertification.wxss */ /* pages/ownerCertification/ownerCertification.wxss */
.banner{
.banner {
width: 750rpx; width: 750rpx;
height: 594rpx; height: 594rpx;
position: absolute; position: absolute;
z-index: -1; z-index: -1;
} }
.header{
.header {
width: 750rpx; width: 750rpx;
height: 594rpx; height: 594rpx;
} }
.yztq{
.yztq {
width: 320rpx; width: 320rpx;
height: 78rpx; height: 78rpx;
} }
.items{
.items {
width: 584rpx; width: 584rpx;
margin: auto; margin: auto;
margin-top: 60rpx; margin-top: 60rpx;
...@@ -22,195 +25,222 @@ ...@@ -22,195 +25,222 @@
flex-wrap: wrap; flex-wrap: wrap;
justify-content: space-between; justify-content: space-between;
} }
.item{
.item {
/* width: 50%; */ /* width: 50%; */
display: flex; display: flex;
align-items: center; align-items: center;
margin-bottom: 24rpx; margin-bottom: 24rpx;
} }
.item-text{
color: rgba(246,219,191,1); .item-text {
font-size:30rpx; color: rgba(246, 219, 191, 1);
font-weight:400; font-size: 30rpx;
font-weight: 400;
margin-left: 16rpx; margin-left: 16rpx;
} }
.rule{
font-weight:400;
color:rgba(255,255,255,1);
font-size:22rpx;
margin-left: 8rpx;
opacity: 0.4;
.rule {
font-weight: 400;
color: rgba(255, 255, 255, 1);
font-size: 22rpx;
margin-left: 8rpx;
opacity: 0.4;
} }
.content{
.content {
width: 670rpx; width: 670rpx;
height: auto; height: auto;
margin: auto; margin: auto;
padding-top: 55rpx; padding-top: 55rpx;
} }
.content-title{
font-size:30rpx; .content-title {
font-weight:500; font-size: 30rpx;
color:rgba(21,25,31,1); font-weight: 500;
color: rgba(21, 25, 31, 1);
} }
.rquire{
color: #D1A074; .rquire {
font-size:26rpx; color: #d1a074;
line-height:36rpx; font-size: 26rpx;
line-height: 36rpx;
} }
.form{
.form {
width: 100%; width: 100%;
margin-top: 48rpx; margin-top: 48rpx;
} }
.form-item{
.form-item {
width: 100%; width: 100%;
display: flex; display: flex;
align-items: center; align-items: center;
} }
.form-item-nav{
.form-item-nav {
width: 120rpx; width: 120rpx;
height: 80rpx; height: 80rpx;
line-height: 80rpx; line-height: 80rpx;
text-align:justify; text-align: justify;
text-align-last:justify ; text-align-last: justify;
font-size:30rpx; font-size: 30rpx;
vertical-align: middle; vertical-align: middle;
} }
.form-item-nav::after{
.form-item-nav::after {
content: ""; content: "";
display: inline-block; display: inline-block;
width: 100%; width: 100%;
height: 0; height: 0;
} }
.form-input{
width:510rpx; .form-input {
height:80rpx; width: 510rpx;
border-radius:4px; height: 80rpx;
border:1px solid rgba(200,200,200,1); border-radius: 4px;
border: 1px solid rgba(200, 200, 200, 1);
font-size: 32rpx; font-size: 32rpx;
margin-left: 40rpx; margin-left: 40rpx;
padding-left:24rpx ; padding-left: 24rpx;
} }
.form-input-error{
width:510rpx; .form-input-error {
height:80rpx; width: 510rpx;
height: 80rpx;
font-size: 32rpx; font-size: 32rpx;
border-radius:4px; border-radius: 4px;
border:1px solid rgba(217,43,58,1); border: 1px solid rgba(217, 43, 58, 1);
margin-left: 40rpx; margin-left: 40rpx;
padding-left:24rpx ; padding-left: 24rpx;
} }
.marginB{
.marginB {
width: 100%; width: 100%;
height: 120rpx; height: 120rpx;
margin-bottom: 32rpx; margin-bottom: 32rpx;
} }
.error{
color: #D92B3A; .error {
font-weight:400; color: #d92b3a;
font-weight: 400;
font-size: 22rpx; font-size: 22rpx;
padding-left: 160rpx; padding-left: 160rpx;
padding-top: 10rpx; padding-top: 10rpx;
} }
.prompt{
font-size:26rpx; .prompt {
font-weight:400; font-size: 26rpx;
color:rgba(21,25,31,1); font-weight: 400;
line-height:36rpx; color: rgba(21, 25, 31, 1);
line-height: 36rpx;
} }
.placeholder { .placeholder {
/* WebKit browsers */ /* WebKit browsers */
color:rgba(194,199,207,1); color: rgba(194, 199, 207, 1);
} }
input:-moz-placeholder {
input:-moz-placeholder {
/* Mozilla Firefox 4 to 18 */ /* Mozilla Firefox 4 to 18 */
color:rgba(194,199,207,1); color: rgba(194, 199, 207, 1);
} }
input::-moz-placeholder {
input::-moz-placeholder {
/* Mozilla Firefox 19+ */ /* Mozilla Firefox 19+ */
color:rgba(194,199,207,1); color: rgba(194, 199, 207, 1);
} }
input:-ms-input-placeholder {
input:-ms-input-placeholder {
/* Internet Explorer 10+ */ /* Internet Explorer 10+ */
color:rgba(194,199,207,1); color: rgba(194, 199, 207, 1);
} }
.submit{
width:670rpx; .submit {
height:96rpx; width: 670rpx;
background:rgba(37,37,50,1); height: 96rpx;
border-radius:1px; background: rgba(37, 37, 50, 1);
border-radius: 1px;
margin-top: 24rpx; margin-top: 24rpx;
line-height: 96rpx; line-height: 96rpx;
font-size:30rpx; font-size: 30rpx;
font-weight:500; font-weight: 500;
color:rgba(241,233,220,1); color: rgba(241, 233, 220, 1);
text-align: center; text-align: center;
margin-bottom: 80rpx; margin-bottom: 80rpx;
} }
.aduit{
width:112rpx; .aduit {
height:112rpx; width: 112rpx;
background:rgba(243,244,246,1); height: 112rpx;
background: rgba(243, 244, 246, 1);
border-radius: 50%; border-radius: 50%;
margin: 0 auto; margin: 0 auto;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
.audit-Img{
.audit-Img {
width: 64rpx; width: 64rpx;
height: 64rpx; height: 64rpx;
} }
.audit-results{
.audit-results {
margin-top: 48rpx; margin-top: 48rpx;
text-align: center; text-align: center;
font-size:54rpx; font-size: 54rpx;
font-weight:500; font-weight: 500;
color:rgba(21,25,31,1); color: rgba(21, 25, 31, 1);
line-height:76rpx; line-height: 76rpx;
} }
.audit-results-err{
color: #D92B3A; .audit-results-err {
} color: #d92b3a;
.aduit-prompt{ }
.aduit-prompt {
margin-top: 16rpx; margin-top: 16rpx;
font-size:26rpx; font-size: 26rpx;
font-weight:400; font-weight: 400;
color:rgba(101,110,123,1); color: rgba(101, 110, 123, 1);
line-height:36rpx; line-height: 36rpx;
text-align: center; text-align: center;
} }
.audit-info{
.audit-info {
width: 100%; width: 100%;
height:360rpx; height: 360rpx;
background:rgba(243,244,246,1); background: rgba(243, 244, 246, 1);
border-radius:2px; border-radius: 2px;
margin-top: 64rpx; margin-top: 64rpx;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-around; justify-content: space-around;
margin-bottom: 70rpx; margin-bottom: 70rpx;
} }
.audit-infoItems{
.audit-infoItems {
width: 574rpx; width: 574rpx;
margin:auto; margin: auto;
margin-top: 48rpx; margin-top: 48rpx;
margin-bottom: 48rpx; margin-bottom: 48rpx;
} }
.audit-infoItems{
.audit-infoItems {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
} }
.audit-item-nav{
color:rgba(21,25,31,1); .audit-item-nav {
font-size:30rpx; color: rgba(21, 25, 31, 1);
font-weight:500; font-size: 30rpx;
font-weight: 500;
margin-bottom: 16rpx; margin-bottom: 16rpx;
} }
.audit-item-content{
font-weight:400; .audit-item-content {
color:rgba(21,25,31,1); font-weight: 400;
font-size:30rpx; color: rgba(21, 25, 31, 1);
} font-size: 30rpx;
}
// pages/hotelAccommodation/hotelAccommodation.js // pages/mine/authentication-state/authentication-state.js
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
phone:'13685970580',
hotline:false,//客服热线
type:0,//夜间入园
name: '',
mobile: '',
num: '',
time: '',
}, },
showHotline(){
this.setData({
hotline:true
})
},
//客服热线拨打
call(){
wx.makePhoneCall({
phoneNumber: this.data.phone,
})
},
//取消拨打
cancel(){
this.setData({
hotline:false,
})
},
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function (options) {
console.log('.............', options.detail)
let detail=JSON.parse(options.detail);
console.log(detail);
this.setData({
type: detail.type,
name: detail.name,
mobile: detail.mobile,
num: detail.num,
time: detail.time,
})
}, },
/** /**
......
{
"usingComponents": {}
}
\ No newline at end of file
<!--pages/mine/authentication-state/authentication-state.wxml-->
<text>pages/mine/authentication-state/authentication-state.wxml</text>
/* pages/mine/authentication-state/authentication-state.wxss */
\ No newline at end of file
Page({
data: {
},
onLoad: function (options) {
},
})
\ No newline at end of file
{ {
"usingComponents": { "usingComponents": {}
"parser":"../../component/parser.min/parser"
}
} }
\ No newline at end of file
<!--pages/home/home/home.wxml-->
<text>pages/home/home/home.wxml</text>
/* pages/home/home/home.wxss */
\ No newline at end of file
import iRequest from '../../utils/request/corvus.js' const App = getApp()
const app = getApp()
Page({ Page({
...@@ -9,26 +8,26 @@ Page({ ...@@ -9,26 +8,26 @@ Page({
data: { data: {
mobile: '', mobile: '',
nickName: '', nickName: '',
avatarUrl: '/pages/mine/image/avatar.png', avatarUrl: '/pages/mine/home/image/avatar.png',
stateTest: '去认证', stateTest: '去认证',
mask:false, mask: false,
type:0, //判断是否是认证的了 type: 0, //判断是否是认证的了
approveList:['园区门票优惠','餐厅价格优惠','SPA服务优惠','免费观看电影','无须预约入园','尽享多重特权'], approveList: ['园区门票优惠', '餐厅价格优惠', 'SPA服务优惠', '免费观看电影', '无须预约入园', '尽享多重特权'],
activityList: [], activityList: [],
appointmentList: [], appointmentList: [],
isRegister: false, // 是否注册 isRegister: false, // 是否注册
}, },
close(){ close() {
this.setData({ this.setData({
mask:false mask: false
}); });
wx.showTabBar({ wx.showTabBar({
animation: true, animation: true,
}) })
}, },
maskShow(){ maskShow() {
this.setData({ this.setData({
mask:true mask: true
}); });
wx.hideTabBar({ wx.hideTabBar({
animation: true, animation: true,
...@@ -52,8 +51,8 @@ Page({ ...@@ -52,8 +51,8 @@ Page({
isRegister: true, isRegister: true,
}) })
app.login({ App.login({
success: function(token) { success: function (token) {
that.getMyActivityList() that.getMyActivityList()
that.getList() that.getList()
that.getAuth() that.getAuth()
...@@ -77,17 +76,17 @@ Page({ ...@@ -77,17 +76,17 @@ Page({
return true return true
} else { } else {
wx.navigateTo({ wx.navigateTo({
url: '../login/login', url: '/pages/login/login',
}) })
return false return false
} }
}, },
//去认证 //去认证
goApprove(){ goApprove() {
if (this.checkRegister()) { if (this.checkRegister()) {
wx.navigateTo({ wx.navigateTo({
url: '../ownerCertification/ownerCertification', url: '/pages/mine/authentication-input/authentication-input',
}) })
} }
}, },
...@@ -95,7 +94,7 @@ Page({ ...@@ -95,7 +94,7 @@ Page({
myActivity() { myActivity() {
if (this.checkRegister()) { if (this.checkRegister()) {
wx.navigateTo({ wx.navigateTo({
url: "../myActivity/myActivity", url: '/pages/mine/appointment/appointment',
}) })
} }
}, },
...@@ -111,29 +110,29 @@ Page({ ...@@ -111,29 +110,29 @@ Page({
customerService() { customerService() {
if (this.checkRegister()) { if (this.checkRegister()) {
wx.navigateTo({ wx.navigateTo({
url: "../customerService/customerService", url: "/pages/mine/question/question",
}) })
} }
}, },
//我的活动详情 //我的活动详情
activityDetail(e){ activityDetail(e) {
wx.navigateTo({ wx.navigateTo({
url: '../activityDetail/activityDetail?enrollid='+e.currentTarget.dataset.enrollid, url: '../activityDetail/activityDetail?enrollid=' + e.currentTarget.dataset.enrollid,
}) })
}, },
//预约凭证 //预约凭证
gohotelAccommodation(e){ gohotelAccommodation(e) {
wx.navigateTo({ wx.navigateTo({
url: '../hotelAccommodation/hotelAccommodation?detail='+JSON.stringify(e.currentTarget.dataset.item), url: '../hotelAccommodation/hotelAccommodation?detail=' + JSON.stringify(e.currentTarget.dataset.item),
}) })
}, },
//点击前往修改页面 //点击前往修改页面
goMyInfo(){ goMyInfo() {
if (this.checkRegister()) { if (this.checkRegister()) {
wx.navigateTo({ wx.navigateTo({
url: '../myInfo/myInfo', url: '/pages/mine/info/info',
}) })
} }
}, },
...@@ -141,19 +140,19 @@ Page({ ...@@ -141,19 +140,19 @@ Page({
// 我的活动 // 我的活动
getMyActivityList() { getMyActivityList() {
var that = this var that = this
app.wxRequest({ App.wxRequest({
url: '/api/v1/activity/getMyActivityList', url: '/api/v1/activity/getMyActivityList',
data: { activeState: '0,1', pageSize: 10, pageNo: 1 }, data: { activeState: '0,1', pageSize: 10, pageNo: 1 },
success: function(res) { success: function (res) {
let list = res.data.list let list = res.data.list
let tmpArr = [] let tmpArr = []
list.forEach(item => { list.forEach(item => {
let state = item.activeState*1 let state = item.activeState * 1
let type = 0 let type = 0
switch (state) { switch (state) {
case 0: type = 1;break; case 0: type = 1; break;
case 1: type = 0;break; case 1: type = 0; break;
case 2: type = 2;break; case 2: type = 2; break;
} }
let obj = { let obj = {
time: item.enrollDate,//activeDate + ' ' + item.activeTime, time: item.enrollDate,//activeDate + ' ' + item.activeTime,
...@@ -174,16 +173,16 @@ Page({ ...@@ -174,16 +173,16 @@ Page({
// 预约列表/我的预约 // 预约列表/我的预约
getList() { getList() {
let that = this let that = this
app.wxRequest({ App.wxRequest({
url: '/api/v1/subscribe/getList', url: '/api/v1/subscribe/getList',
data: { data: {
state: '1', state: '1',
type: ''//0 入园预约 1 看房预约 全部 空字符 type: ''//0 入园预约 1 看房预约 全部 空字符
}, },
success: function(res) { success: function (res) {
let tmpArr = [] let tmpArr = []
res.data.forEach(item => { res.data.forEach(item => {
let type = item.type*1 let type = item.type * 1
let title = '' let title = ''
let url = '' let url = ''
switch (type) { switch (type) {
...@@ -197,9 +196,9 @@ Page({ ...@@ -197,9 +196,9 @@ Page({
break; break;
} }
let obj = { let obj = {
title:title, title: title,
type: type, type: type,
time: item.subscribeDate.substring(5,11).replace('-','月').replace(' ','日') + ((type == 0) ? ' 20:00-24:00' : ''), time: item.subscribeDate.substring(5, 11).replace('-', '月').replace(' ', '日') + ((type == 0) ? ' 20:00-24:00' : ''),
num: item.subscribeNum, num: item.subscribeNum,
url: url, url: url,
id: item.id, id: item.id,
...@@ -219,11 +218,11 @@ Page({ ...@@ -219,11 +218,11 @@ Page({
// 获取业主认证信息 // 获取业主认证信息
getAuth() { getAuth() {
let that = this let that = this
app.wxRequest({ App.wxRequest({
url: '/api/v1/userAuth/getAuth', url: '/api/v1/userAuth/getAuth',
method: 'GET', method: 'GET',
success: function(res) { success: function (res) {
let state = res.data.state*1 // 0 待审核 1 审核通过 2 不通过 let state = res.data.state * 1 // 0 待审核 1 审核通过 2 不通过
let stateTest = '去认证' let stateTest = '去认证'
switch (state) { switch (state) {
case 0: stateTest = '审核中'; break; case 0: stateTest = '审核中'; break;
...@@ -240,7 +239,7 @@ Page({ ...@@ -240,7 +239,7 @@ Page({
}, },
toHide: function(array) { toHide: function (array) {
var mphone = array.substring(0, 3) + '****' + array.substring(7); var mphone = array.substring(0, 3) + '****' + array.substring(7);
return mphone; return mphone;
} }
......
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
<text style="color:#333333;font-weight:500;">登录/注册</text> <text style="color:#333333;font-weight:500;">登录/注册</text>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
...@@ -62,7 +61,11 @@ ...@@ -62,7 +61,11 @@
</view> </view>
<view class="menu"> <view class="menu">
<l-list l-content-class="menu-title" l-class="listClass" title="我的活动" bind:lintap="myActivity"></l-list> <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" 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-item" data-enrollid="{{item.enrollId}}" wx:for="{{activityList}}" wx:for-index="index" wx:for-item="item" wx:key="index" bindtap="activityDetail">
...@@ -70,13 +73,17 @@ ...@@ -70,13 +73,17 @@
<text decode="{{true}}">&nbsp;&nbsp;{{item.time}}&nbsp;&nbsp;</text> <text decode="{{true}}">&nbsp;&nbsp;{{item.time}}&nbsp;&nbsp;</text>
</view> </view>
<view class="my-activities-bottom"> <view class="my-activities-bottom">
<view class="my-activities-title">{{item.title}}</view> <view class="my-activities-title" style="padding-top:70rpx;">{{item.title}}</view>
<view class="my-activities-content">{{item.content}}</view> <view class="my-activities-content">{{item.content}}</view>
</view> </view>
</view> </view>
<view class="my-activities-item"></view> <view class="my-activities-item"></view>
</view> </view>
<l-list l-content-class="menu-title" title="我的预约" l-class="listClass" bind:lintap="myAppointment"></l-list> <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" 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-item" wx:for="{{appointmentList}}" wx:for-index="index" wx:for-item="item" wx:key="index">
...@@ -86,15 +93,21 @@ ...@@ -86,15 +93,21 @@
</view> </view>
</view> </view>
<view class="my-activities-bottom"> <view class="my-activities-bottom">
<view class="my-activities-bottom-view">
<view class="my-activities-title">{{item.title}}</view> <view class="my-activities-title">{{item.title}}</view>
<view class="my-activities-content" wx:if="{{item.type == 0}}">预约人数 {{item.num}}人</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 class="subscribe" data-item="{{item}}" bindtap="gohotelAccommodation">预约凭证</view>
</view> </view>
</view> </view>
<view class="my-activities-item"></view> <view class="my-activities-item"></view>
</view> </view>
<l-list l-content-class="menu-title" title="客服中心" l-class="listClass" bind:lintap="customerService"></l-list> <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>
</view> </view>
......
...@@ -131,9 +131,16 @@ ...@@ -131,9 +131,16 @@
background-color: rgb(239, 242, 250); background-color: rgb(239, 242, 250);
border-radius: 3px; border-radius: 3px;
} }
.my-activities-bottom-view{
display: flex;
flex-direction: column;
justify-content: center;
height: 110rpx;
margin-top: 70rpx;
}
.my-activities-title{ .my-activities-title{
padding-left:50rpx ; padding-left:50rpx ;
margin-top: 70rpx;
line-height: 2; line-height: 2;
font-size:30rpx; font-size:30rpx;
font-weight:500; font-weight:500;
...@@ -154,13 +161,19 @@ ...@@ -154,13 +161,19 @@
width: 150rpx; width: 150rpx;
height: 70rpx; height: 70rpx;
position: absolute; position: absolute;
border: 1px solid rgb(134, 137, 145); border: 1px solid #15191F;
border-radius: 3px; border-radius: 3px;
right: 50rpx; right: 50rpx;
line-height: 70rpx; line-height: 70rpx;
text-align: center; text-align: center;
font-size: 26rpx; font-size: 26rpx;
top:92rpx ; top:92rpx ;
font-weight: 500;
color: #15191F;
}
.fontImg{
width: 120rpx;
height: 30rpx;
} }
.approve{ .approve{
padding-top: 100rpx; padding-top: 100rpx;
......

633 Bytes | W: | H:

633 Bytes | W: | H:

pages/mine/image/inform.png
pages/mine/home/image/inform.png
pages/mine/image/inform.png
pages/mine/home/image/inform.png
  • 2-up
  • Swipe
  • Onion skin

17.4 KB | W: | H:

17.4 KB | W: | H:

pages/mine/image/mine.png
pages/mine/home/image/mine.png
pages/mine/image/mine.png
pages/mine/home/image/mine.png
  • 2-up
  • Swipe
  • Onion skin
// pages/myInfo/myInfo.js const App = getApp()
import iMiment from '../../npm/miment.js'
const app = getApp()
Page({ Page({
/**
* 页面的初始数据
*/
data: { data: {
birthdayEnd: iMiment(new Date().getTime()).format('YYYY-MM-DD'), birthdayEnd: App.modular.miment(new Date().getTime()).format('YYYY-MM-DD'),
mobile: '', mobile: '',
nickName: '', nickName: '',
avatarUrl: '', avatarUrl: '',
...@@ -20,10 +14,6 @@ Page({ ...@@ -20,10 +14,6 @@ Page({
birthday: '', birthday: '',
address: '', address: '',
}, },
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) { onLoad: function (options) {
let mobile = wx.getStorageSync('mobile') let mobile = wx.getStorageSync('mobile')
...@@ -36,62 +26,13 @@ Page({ ...@@ -36,62 +26,13 @@ Page({
mobile: this.toHide(mobile), mobile: this.toHide(mobile),
nickName: nickName, nickName: nickName,
avatarUrl: avatarUrl, avatarUrl: avatarUrl,
genderIndex: sex == 1 ? 0 : 1, genderIndex: sex == 2 ? 1 : 0,
birthday: birthday ? birthday : this.data.birthdayEnd, birthday: birthday ? birthday : this.data.birthdayEnd,
address: address, address: address,
}) })
}, },
/** toHide: function (array) {
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
},
toHide: function(array) {
var mphone = array.substring(0, 3) + '****' + array.substring(7); var mphone = array.substring(0, 3) + '****' + array.substring(7);
return mphone; return mphone;
}, },
...@@ -154,10 +95,10 @@ Page({ ...@@ -154,10 +95,10 @@ Page({
birthday: birthday, birthday: birthday,
} }
console.log(param) console.log(param)
app.wxRequest({ App.wxRequest({
url: '/api/v1/smUser/doUpdateInfo', url: '/api/v1/smUser/doUpdateInfo',
data: param, data: param,
success: function(res) { success: function (res) {
wx.setStorageSync('nickName', nickName) wx.setStorageSync('nickName', nickName)
wx.setStorageSync('sex', sex) wx.setStorageSync('sex', sex)
wx.setStorageSync('birthday', birthday) wx.setStorageSync('birthday', birthday)
......
{
"usingComponents": {}
}
\ No newline at end of file
...@@ -6,39 +6,32 @@ ...@@ -6,39 +6,32 @@
<view class="myInfo"> <view class="myInfo">
<l-list is-hover="{{false}}" l-content-class="menu-title" title="头像" is-link="{{false}}"> <l-list is-hover="{{false}}" l-content-class="menu-title" title="头像" is-link="{{false}}">
<view style="margin-bottom:30rpx;" slot="right-section"> <view style="margin-bottom:30rpx;" slot="right-section">
<l-avatar size="100" src="{{avatarUrl}}"/> <l-avatar size="100" src="{{avatarUrl}}" />
</view> </view>
</l-list> </l-list>
<l-list is-hover="{{false}}" l-content-class="menu-title" title="姓名" is-link="{{false}}"> <l-list is-hover="{{false}}" l-content-class="menu-title" title="姓名" is-link="{{false}}">
<view slot="right-section"> <view slot="right-section">
<input maxlength="10" style="text-align:right;" placeholder="请填写姓名" placeholder-class="phone" value="{{nickName}}" data-type="name" bindblur="onInputBlur"/> <input maxlength="10" style="text-align:right;" placeholder="请填写姓名" placeholder-class="phone" value="{{nickName}}" data-type="name" bindblur="onInputBlur" />
</view> </view>
</l-list> </l-list>
<l-list is-hover="{{false}}" l-content-class="menu-title" title="性别" is-link="{{false}}"> <l-list is-hover="{{false}}" l-content-class="menu-title" title="性别" is-link="{{false}}">
<picker slot="right-section" class="input-picker" mode="selector" range-key="{{'name'}}" range="{{genderArray}}" bindchange="onSelectionGender"> <picker slot="right-section" class="input-picker" mode="selector" value="{{genderIndex}}" range-key="{{'name'}}" range="{{genderArray}}" bindchange="onSelectionGender">
<view class="picker">{{genderArray[genderIndex].name}}</view> <view class="picker">{{genderArray[genderIndex].name}}</view>
</picker> </picker>
<!-- <view slot="right-section">
<input style="text-align:right;" value="女" />
</view> -->
</l-list> </l-list>
<l-list is-hover="{{false}}" l-content-class="menu-title" title="生日" is-link="{{false}}"> <l-list is-hover="{{false}}" l-content-class="menu-title" title="生日" is-link="{{false}}">
<!-- <view slot="right-section">
<input style="text-align:right;" value="1990-01-01" />
</view> -->
<picker slot="right-section" class="input-picker" mode="date" value="{{birthday}}" end="{{birthdayEnd}}" bindchange="onSelectionDate"> <picker slot="right-section" class="input-picker" mode="date" value="{{birthday}}" end="{{birthdayEnd}}" bindchange="onSelectionDate">
<view class="picker">{{birthday}}</view> <view class="picker">{{birthday}}</view>
</picker> </picker>
</l-list> </l-list>
<l-list is-hover="{{false}}" l-content-class="menu-title" title="地址" is-link="{{false}}"> <l-list is-hover="{{false}}" l-content-class="menu-title" title="地址" is-link="{{false}}">
<view slot="right-section"> <view slot="right-section">
<input maxlength="30" style="text-align:right;" placeholder="请填写地址" placeholder-class="phone" value="{{address}}" data-type="address" bindblur="onInputBlur"/> <input maxlength="30" style="text-align:right;" placeholder="请填写地址" placeholder-class="phone" value="{{address}}" data-type="address" bindblur="onInputBlur" />
</view> </view>
</l-list> </l-list>
<l-list is-hover="{{false}}" l-content-class="menu-title" title="手机号" is-link="{{false}}"> <l-list is-hover="{{false}}" l-content-class="menu-title" title="手机号" is-link="{{false}}">
<view slot="right-section"> <view slot="right-section">
<view class="phone">{{mobile}}</view> <view class="phone">{{mobile}}</view>
<!-- <view class="phone">{{phone.toHide("13685970580")}}</view> -->
</view> </view>
</l-list> </l-list>
</view> </view>
...@@ -46,9 +39,9 @@ ...@@ -46,9 +39,9 @@
<!-- 使用wxs 手机号码中间四位显示为*号 --> <!-- 使用wxs 手机号码中间四位显示为*号 -->
<wxs module="phone"> <wxs module="phone">
var toHide = function(array) { var toHide = function(array) {
var mphone = array.substring(0, 3) + '****' + array.substring(7); var mphone = array.substring(0, 3) + '****' + array.substring(7);
return mphone; return mphone;
} }
module.exports.toHide = toHide; module.exports.toHide = toHide;
</wxs> </wxs>
\ No newline at end of file
Page({
data: {
},
onLoad: function (options) {
},
})
\ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file
<!--pages/home/home/home.wxml-->
<text>pages/home/home/home.wxml</text>
/* pages/home/home/home.wxss */
\ No newline at end of file
...@@ -6,23 +6,23 @@ Page({ ...@@ -6,23 +6,23 @@ Page({
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
isExpandContent:false, isExpandContent: false,
checkInProblems: [], // 入住问题 checkInProblems: [], // 入住问题
ticketsProblems: [], // 门票问题 ticketsProblems: [], // 门票问题
serviceProblems: [], // 服务问题 serviceProblems: [], // 服务问题
}, },
linexpand(e){ linexpand(e) {
console.log(e) console.log(e)
}, },
linfold(e){ linfold(e) {
console.log('66'); console.log('66');
console.log(e) console.log(e)
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function(options) {
this.getCommonProblem(1) this.getCommonProblem(1)
this.getCommonProblem(2) this.getCommonProblem(2)
this.getCommonProblem(3) this.getCommonProblem(3)
...@@ -31,70 +31,70 @@ Page({ ...@@ -31,70 +31,70 @@ Page({
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
onReady: function () { onReady: function() {
}, },
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow: function () { onShow: function() {
}, },
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
onHide: function () { onHide: function() {
}, },
/** /**
* 生命周期函数--监听页面卸载 * 生命周期函数--监听页面卸载
*/ */
onUnload: function () { onUnload: function() {
}, },
/** /**
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
*/ */
onPullDownRefresh: function () { onPullDownRefresh: function() {
}, },
/** /**
* 页面上拉触底事件的处理函数 * 页面上拉触底事件的处理函数
*/ */
onReachBottom: function () { onReachBottom: function() {
}, },
/** /**
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage: function () { onShareAppMessage: function() {
}, },
checkInTranform(e){ checkInTranform(e) {
let flag = !e.currentTarget.dataset.flag let flag = !e.currentTarget.dataset.flag
let index = e.currentTarget.dataset.index; let index = e.currentTarget.dataset.index;
this.setData({ this.setData({
[`checkInProblems[${index}].flag`]:flag [`checkInProblems[${index}].flag`]: flag
}); });
}, },
ticketsTranform(e){ ticketsTranform(e) {
let flag = !e.currentTarget.dataset.flag let flag = !e.currentTarget.dataset.flag
let index = e.currentTarget.dataset.index; let index = e.currentTarget.dataset.index;
this.setData({ this.setData({
[`ticketsProblems[${index}].flag`]:flag [`ticketsProblems[${index}].flag`]: flag
}); });
}, },
tranform(e){ tranform(e) {
let flag = !e.currentTarget.dataset.flag let flag = !e.currentTarget.dataset.flag
let index = e.currentTarget.dataset.index; let index = e.currentTarget.dataset.index;
this.setData({ this.setData({
[`serviceProblems[${index}].flag`]:flag [`serviceProblems[${index}].flag`]: flag
}); });
}, },
// 常见问题 // 常见问题
...@@ -107,8 +107,8 @@ Page({ ...@@ -107,8 +107,8 @@ Page({
top: '', top: '',
}, },
success: function(res) { success: function(res) {
res.data.forEach(function(item){ res.data.forEach(function(item) {
item.flag =false; item.flag = false;
}) })
switch (type) { switch (type) {
case 1: case 1:
......
{
"usingComponents": {}
}
\ No newline at end of file
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<block wx:if="{{checkInProblems.length > 0}}"> <block wx:if="{{checkInProblems.length > 0}}">
<view class="row align-c"> <view class="row align-c">
<view class="icon"> <view class="icon">
<image class="icon-img" src="./images/Icon/24pt/Service@2x.png"></image> <image class="icon-img" src="./image/Icon/24pt/Service@2x.png"></image>
</view> </view>
<view class="title">入住问题</view> <view class="title">入住问题</view>
</view> </view>
...@@ -14,12 +14,12 @@ ...@@ -14,12 +14,12 @@
<view class="content-item" wx:for="{{checkInProblems}}" wx:key="index"> <view class="content-item" wx:for="{{checkInProblems}}" wx:key="index">
<l-collapse> <l-collapse>
<l-collapse-item l-body-class="l-body-class" l-title-class="l-title-class" customTitle="{{true}}" data-index="{{index}}" data-flag="{{item.flag}}" bindtap="checkInTranform"> <l-collapse-item l-body-class="l-body-class" l-title-class="l-title-class" customTitle="{{true}}" data-index="{{index}}" data-flag="{{item.flag}}" bindtap="checkInTranform">
<view class="item-title" slot="title" > <view class="item-title" slot="title">
<view class="row align-c"> <view class="row align-c">
<view class="circle"></view> <view class="circle"></view>
<view>{{item.title}}</view> <view>{{item.title}}</view>
</view> </view>
<l-icon l-class="{{item.flag ? 'tranform':''}}" name="right" size="28" color="#999"/> <l-icon l-class="{{item.flag ? 'tranform':''}}" name="right" size="28" color="#999" />
</view> </view>
<text class="text">{{item.content}}</text> <text class="text">{{item.content}}</text>
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
<block wx:if="{{ticketsProblems.length > 0}}"> <block wx:if="{{ticketsProblems.length > 0}}">
<view class="row align-c"> <view class="row align-c">
<view class="icon"> <view class="icon">
<image class="icon-img" src="./images/Icon/24pt/Ticket@2x.png"></image> <image class="icon-img" src="./image/Icon/24pt/Ticket@2x.png"></image>
</view> </view>
<view class="title">门票问题</view> <view class="title">门票问题</view>
</view> </view>
...@@ -41,12 +41,12 @@ ...@@ -41,12 +41,12 @@
<view class="content-item" wx:for="{{ticketsProblems}}" wx:key="index"> <view class="content-item" wx:for="{{ticketsProblems}}" wx:key="index">
<l-collapse> <l-collapse>
<l-collapse-item l-body-class="l-body-class" l-title-class="l-title-class" customTitle="{{true}}" data-index="{{index}}" data-flag="{{item.flag}}" bindtap="ticketsTranform"> <l-collapse-item l-body-class="l-body-class" l-title-class="l-title-class" customTitle="{{true}}" data-index="{{index}}" data-flag="{{item.flag}}" bindtap="ticketsTranform">
<view class="item-title" slot="title" > <view class="item-title" slot="title">
<view class="row align-c"> <view class="row align-c">
<view class="circle"></view> <view class="circle"></view>
<view>{{item.title}}</view> <view>{{item.title}}</view>
</view> </view>
<l-icon l-class="{{item.flag ? 'tranform':''}}" name="right" size="28" color="#999"/> <l-icon l-class="{{item.flag ? 'tranform':''}}" name="right" size="28" color="#999" />
</view> </view>
<view class="text">{{item.content}}</view> <view class="text">{{item.content}}</view>
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
<block wx:if="{{serviceProblems.length > 0}}"> <block wx:if="{{serviceProblems.length > 0}}">
<view class="row align-c"> <view class="row align-c">
<view class="icon"> <view class="icon">
<image class="icon-img" src="./images/Icon/24pt/Ticket@2x.png"></image> <image class="icon-img" src="./image/Icon/24pt/Ticket@2x.png"></image>
</view> </view>
<view class="title">服务问题</view> <view class="title">服务问题</view>
</view> </view>
...@@ -67,12 +67,12 @@ ...@@ -67,12 +67,12 @@
<view class="content-item" wx:for="{{serviceProblems}}" wx:key="index"> <view class="content-item" wx:for="{{serviceProblems}}" wx:key="index">
<l-collapse> <l-collapse>
<l-collapse-item l-body-class="l-body-class" l-title-class="l-title-class" customTitle="{{true}}" data-index="{{index}}" data-flag="{{item.flag}}" bindtap="tranform"> <l-collapse-item l-body-class="l-body-class" l-title-class="l-title-class" customTitle="{{true}}" data-index="{{index}}" data-flag="{{item.flag}}" bindtap="tranform">
<view class="item-title" slot="title" > <view class="item-title" slot="title">
<view class="row align-c"> <view class="row align-c">
<view class="circle"></view> <view class="circle"></view>
<view>{{item.title}}</view> <view>{{item.title}}</view>
</view> </view>
<l-icon name="right" l-class="{{item.flag ? 'tranform':''}}" size="28" color="#999"/> <l-icon name="right" l-class="{{item.flag ? 'tranform':''}}" size="28" color="#999" />
</view> </view>
<view class="text">{{item.content}}</view> <view class="text">{{item.content}}</view>
...@@ -85,10 +85,3 @@ ...@@ -85,10 +85,3 @@
</view> </view>
</view> </view>
\ No newline at end of file
/* pages/moreProblems/moreProblems.wxss */ /* pages/moreProblems/moreProblems.wxss */
.body{
.body {
width: 670rpx; width: 670rpx;
padding-top: 200rpx; padding-top: 200rpx;
} }
.icon{
.icon {
width: 75rpx; width: 75rpx;
height: 75rpx; height: 75rpx;
border-radius: 50%; border-radius: 50%;
...@@ -12,41 +14,47 @@ ...@@ -12,41 +14,47 @@
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
.icon-img{
.icon-img {
width: 55rpx; width: 55rpx;
height: 55rpx; height: 55rpx;
} }
.title{
.title {
font-size: 40rpx; font-size: 40rpx;
margin-left: 25rpx; margin-left: 25rpx;
color: rgb(24, 23, 26); color: rgb(24, 23, 26);
font-weight: 500; font-weight: 500;
} }
.content{
.content {
padding-top: 60rpx; padding-top: 60rpx;
padding-bottom: 60rpx; padding-bottom: 60rpx;
} }
.content-item{
.content-item {
width: 100%; width: 100%;
height: auto; height: auto;
border-bottom: 1px solid rgb(247, 246, 247); border-bottom: 1px solid rgb(247, 246, 247);
} }
.circle{ .circle {
width: 10rpx; width: 10rpx;
height: 10rpx; height: 10rpx;
border-radius: 50%; border-radius: 50%;
background-color: black; background-color: black;
margin-right: 20rpx; margin-right: 20rpx;
} }
.item-title{
.item-title {
width: 100%; width: 100%;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
padding:30rpx 0 30rpx 0; padding: 30rpx 0 30rpx 0;
} }
.text{
.text {
width: 610rpx; width: 610rpx;
height: auto; height: auto;
margin: auto; margin: auto;
...@@ -55,6 +63,7 @@ ...@@ -55,6 +63,7 @@
padding-left: 40rpx; padding-left: 40rpx;
margin-bottom: 20rpx; margin-bottom: 20rpx;
} }
.tranform{
.tranform {
transform: rotate(90deg); transform: rotate(90deg);
} }
// pages/customerService/customerService.js const App = getApp()
const app = getApp()
Page({ Page({
/**
* 页面的初始数据
*/
data: { data: {
title:'客服中心', title: '客服中心',
inputHidden:true, inputHidden: true,
commonProblems: [], commonProblems: [],
data:[ data: [{
{title:'进入碧海银虎园区需要提前预约吗?'}, title: '进入碧海银虎园区需要提前预约吗?'
{title:'园区餐厅有哪些?如何预订?'}, },
{title:'如何预订海错图门票?'}, {
{title:'如何预订儿童营地门票?'}, title: '园区餐厅有哪些?如何预订?'
},
{
title: '如何预订海错图门票?'
},
{
title: '如何预订儿童营地门票?'
},
], ],
mask:false,//控制客服微信的遮罩层显示 height: 0,
phone:'13316748039', mask: false, //控制客服微信的遮罩层显示
hotline:false,//客服热线 phone: '13316748039',
bottom:0, hotline: false, //客服热线
focus:false, bottom: 0,
focus: false,
remark: '', remark: '',
isIphoneX: '', //判断是否为iphonex
}, },
//获取焦点的时候 //获取焦点的时候
linfocus(e){ linfocus(e) {
console.log('linfocus', e.detail.height)
this.setData({ this.setData({
bottom: e.detail.height, bottom: e.detail.height,
}) })
wx.pageScrollTo({ wx.pageScrollTo({
scrollTop:0, scrollTop: 0,
}) })
}, },
saveImage(e){ saveImage(e) {
let url = e.currentTarget.dataset.url; let url = e.currentTarget.dataset.url;
console.log(url); console.log(url);
//用户需要授权 //用户需要授权
...@@ -43,40 +46,40 @@ Page({ ...@@ -43,40 +46,40 @@ Page({
if (!res.authSetting['scope.writePhotosAlbum']) { if (!res.authSetting['scope.writePhotosAlbum']) {
wx.authorize({ wx.authorize({
scope: 'scope.writePhotosAlbum', scope: 'scope.writePhotosAlbum',
success:()=> { success: () => {
// 同意授权 // 同意授权
this.saveImg1(url); this.saveImg1(url);
}, },
fail: (res) =>{ fail: (res) => {
console.log(res); console.log(res);
} }
}) })
}else{ } else {
// 已经授权了 // 已经授权了
this.saveImg1(url); this.saveImg1(url);
} }
}, },
fail: (res) =>{ fail: (res) => {
console.log(res); console.log(res);
} }
}) })
}, },
saveImg1(url){ saveImg1(url) {
wx.getImageInfo({ wx.getImageInfo({
src: url, src: url,
success:(res)=> { success: (res) => {
let path = res.path; let path = res.path;
wx.saveImageToPhotosAlbum({ wx.saveImageToPhotosAlbum({
filePath:path, filePath: path,
success:(res)=> { success: (res) => {
console.log(res); console.log(res);
}, },
fail:(res)=>{ fail: (res) => {
console.log(res); console.log(res);
} }
}) })
}, },
fail:(res)=> { fail: (res) => {
console.log(res); console.log(res);
} }
}) })
...@@ -84,123 +87,78 @@ Page({ ...@@ -84,123 +87,78 @@ Page({
//失去焦点 //失去焦点
inputBlur(e) { inputBlur(e) {
this.setData({ this.setData({
inputHidden:true, inputHidden: true,
title:'客服中心', title: '客服中心',
}) })
}, },
bindFeedbackInput: function (e) { bindFeedbackInput: function(e) {
this.setData({ this.setData({
remark: e.detail.value remark: e.detail.value
}) })
}, },
//填写反馈 //填写反馈
feedback(e){ feedback(e) {
console.log(e.detail.height); console.log(e.detail.height);
this.setData({ this.setData({
focus:true, focus: true,
inputHidden:false, inputHidden: false,
title:'填写反馈' title: '填写反馈'
}) })
}, },
// 关闭遮罩层 // 关闭遮罩层
close(){ close() {
this.setData({ this.setData({
mask:false mask: false
}) })
}, },
//开启微信客服 //开启微信客服
openMask(){ openMask() {
this.setData({ this.setData({
mask:true mask: true
}) })
}, },
//客服热线拨打 //客服热线拨打
call(){ call() {
wx.makePhoneCall({ wx.makePhoneCall({
phoneNumber: this.data.phone, phoneNumber: this.data.phone,
}) })
}, },
//取消拨打 //取消拨打
cancel(){ cancel() {
this.setData({ this.setData({
hotline:false, hotline: false,
}) })
}, },
showHotline(){ showHotline() {
this.setData({ this.setData({
hotline:true hotline: true
}) })
}, },
moreProblems(){ moreProblems() {
wx.navigateTo({ wx.navigateTo({
url: '../moreProblems/moreProblems', url: '/pages/mine/question-more/question-more',
}) })
}, },
tranform(e){ tranform(e) {
let flag = !e.currentTarget.dataset.flag let flag = !e.currentTarget.dataset.flag
let index = e.currentTarget.dataset.index; let index = e.currentTarget.dataset.index;
this.setData({ this.setData({
[`commonProblems[${index}].flag`]:flag [`commonProblems[${index}].flag`]: flag
}); });
console.log(this.data.commonProblems); console.log(this.data.commonProblems);
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function(options) {
this.getCommonProblem() this.getCommonProblem();
}, this.setData({
height: wx.getSystemInfoSync().windowHeight, //获取屏幕的高度
/** isIphoneX: wx.getSystemInfoSync().model.indexOf("iPhone X")
* 生命周期函数--监听页面初次渲染完成 })
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}, },
// 提交意见反馈 // 提交意见反馈
...@@ -214,9 +172,9 @@ Page({ ...@@ -214,9 +172,9 @@ Page({
title: '提交中', title: '提交中',
show: true, show: true,
mask: true, mask: true,
duration: 1000*60, duration: 1000 * 60,
}) })
app.wxRequest({ App.wxRequest({
url: '/api/v1/smFeedback/doFeedBack', url: '/api/v1/smFeedback/doFeedBack',
data: { data: {
content: that.data.remark content: that.data.remark
...@@ -227,8 +185,8 @@ Page({ ...@@ -227,8 +185,8 @@ Page({
title: '提交成功', title: '提交成功',
}) })
that.setData({ that.setData({
inputHidden:true, inputHidden: true,
title:'客服中心', title: '客服中心',
remark: '', remark: '',
}) })
}, },
...@@ -244,14 +202,14 @@ Page({ ...@@ -244,14 +202,14 @@ Page({
// 常见问题 // 常见问题
getCommonProblem() { getCommonProblem() {
let that = this let that = this
app.wxRequest({ App.wxRequest({
url: '/api/v1/smCommonProblem/getList', url: '/api/v1/smCommonProblem/getList',
data: { data: {
type: '', type: '',
top: 1, top: 1,
}, },
success: function(res) { success: function(res) {
res.data.forEach(function(item){ res.data.forEach(function(item) {
item.flag = false; item.flag = false;
}); });
that.setData({ that.setData({
......
{
"usingComponents": {}
}
\ No newline at end of file
<!--pages/customerService/customerService.wxml-->
<l-toast l-image-class="toast-image"></l-toast> <l-toast l-image-class="toast-image"></l-toast>
<navigation class="navigation" titleText="{{title}}" backIcon="/image/back-w.png" color="#ffffff"></navigation> <navigation class="navigation" titleText="{{title}}" backIcon="/image/back-w.png" color="#ffffff"></navigation>
<view class="container"> <view style="height:{{height}}px;background-color:white;">
<image class="banner-img" src="http://upload.miaomiao-bao.com/70161202008161703131621.jpg"></image> <image class="banner-img" src="http://upload.miaomiao-bao.com/70161202008161703131621.jpg"></image>
<view class="customer-body"> <view class="customer-body">
<view class="customer-body-header"> <view class="customer-body-header">
<view class="customer-body-title">常见问题</view> <view class="customer-body-title">常见问题</view>
<view class="row" style="align-items: center;"> <view class="row" style="align-items: center;padding-right:10rpx;">
<text bindtap="moreProblems" style="color:rgb(43,45,46);padding-right:15rpx;font-size:26rpx;">更多问题</text> <text bindtap="moreProblems" style="color:rgb(43,45,46);padding-right:15rpx;font-size:26rpx;">更多问题</text>
<l-icon name="right" color="rgb(172,172,174)" size="26"/> <l-icon name="right" color="rgb(172,172,174)" size="26" />
</view> </view>
</view> </view>
<block wx:if="{{commonProblems.length > 0}}"> <block wx:if="{{commonProblems.length > 0}}">
...@@ -21,7 +20,7 @@ ...@@ -21,7 +20,7 @@
<view class="circle"></view> <view class="circle"></view>
<view style="width:540rpx;">{{item.title}}</view> <view style="width:540rpx;">{{item.title}}</view>
</view> </view>
<l-icon l-class="{{item.flag ? 'tranform':''}}" name="right" size="28" color="#999"/> <l-icon l-class="{{item.flag ? 'tranform':''}}" name="right" size="26" color="#999" />
</view> </view>
<view class="text">{{item.content}}</view> <view class="text">{{item.content}}</view>
...@@ -39,7 +38,7 @@ ...@@ -39,7 +38,7 @@
</view> --> </view> -->
</view> </view>
</view> </view>
<view class="footer-nav"> <view class="footer-nav" style="padding-bottom:{{isIphoneX >=0?68:0}}rpx;">
<view class="nav-item" bindtap="call"> <view class="nav-item" bindtap="call">
<image class="nav-icon" src="./images/Hotline@2x.png"></image> <image class="nav-icon" src="./images/Hotline@2x.png"></image>
<view class="nav-item-title">客服热线</view> <view class="nav-item-title">客服热线</view>
...@@ -70,7 +69,7 @@ ...@@ -70,7 +69,7 @@
</view> </view>
<view class="close" bindtap="close"> <view class="close" bindtap="close">
<l-icon name="close" color="black" size="28"/> <l-icon name="close" color="black" size="28" />
</view> </view>
</l-mask> </l-mask>
...@@ -85,7 +84,8 @@ ...@@ -85,7 +84,8 @@
<!-- 填写意见反馈 --> <!-- 填写意见反馈 -->
<view class="textBox" style="bottom:{{bottom}}px" hidden="{{inputHidden}}"> <view class="textBox" style="bottom:{{bottom}}px" hidden="{{inputHidden}}">
<view class="textBox-container"> <view class="textBox-container">
<l-textarea cursor-spacing='0' bind:linblur="inputBlur" bind:lininput="bindFeedbackInput" focus="{{focus}}" adjust-position="{{false}}" bind:linfocus="linfocus" l-class="textArea-class" indicator="{{true}}" maxlength="200" placeholder="请留下您的宝贵意见" value="{{remark}}"/> <l-textarea cursor-spacing='0' bind:linblur="inputBlur" bind:lininput="bindFeedbackInput" focus="{{focus}}" adjust-position="{{false}}" bind:linfocus="linfocus" l-class="textArea-class" indicator="{{true}}" maxlength="200" placeholder="请留下您的宝贵意见" value="{{remark}}"
/>
<view class="feedbackButton" bindtap="feedbackSubmit">提交反馈</view> <view class="feedbackButton" bindtap="feedbackSubmit">提交反馈</view>
</view> </view>
......
.banner-img{ .banner-img {
width: 750rpx; width: 750rpx;
height: 480rpx; height: 480rpx;
} }
.footer-nav{
.footer-nav {
position: fixed; position: fixed;
bottom: 38rpx; bottom: 0rpx;
width: 750rpx; width: 750rpx;
height: 100rpx; min-height: 100rpx;
height: auto;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-around; justify-content: space-around;
border-top: 1px solid rgb(244, 242, 244); border-top: 1px solid rgb(244, 242, 244);
background-color: white; background-color: white;
} }
.customer-body{
.customer-body {
padding-bottom: 120rpx; padding-bottom: 120rpx;
padding-top: 60rpx; padding-top: 60rpx;
width: 670rpx; width: 670rpx;
margin: auto; margin: auto;
height: auto; height: auto;
} }
.tranform{
.tranform {
transform: rotate(90deg); transform: rotate(90deg);
} }
.customer-body-header{
.customer-body-header {
width: 100%; width: 100%;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
margin-bottom: 10rpx; margin-bottom: 10rpx;
} }
.customer-body-title{
font-size:46rpx ; .customer-body-title {
font-size: 46rpx;
} }
.circle{
.circle {
width: 10rpx; width: 10rpx;
height: 10rpx; height: 10rpx;
border-radius: 50%; border-radius: 50%;
...@@ -41,29 +48,41 @@ ...@@ -41,29 +48,41 @@
margin-left: 12rpx; margin-left: 12rpx;
margin-right: 18rpx; margin-right: 18rpx;
} }
.nav-item{
text-align: center; .nav-item {
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-around;
} }
.nav-item-title{
font-size: 24rpx; .nav-item-title {
color: rgb(169, 171, 177); font-size: 22rpx;
font-weight: 400;
color: #959da9;
line-height: 32rpx;
} }
.nav-icon{
.nav-icon {
width: 48rpx; width: 48rpx;
height: 48rpx; height: 48rpx;
margin-top: 14rpx;
} }
.mask-content{
.mask-content {
width: 610rpx; width: 610rpx;
height: 860rpx; height: 860rpx;
background-color: white; background-color: white;
position: relative; position: relative;
} }
.mask-img{
.mask-img {
width: 100%; width: 100%;
position: absolute; position: absolute;
bottom:0 ; bottom: 0;
} }
.mask-contanier{
.mask-contanier {
width: 570rpx; width: 570rpx;
height: 820rpx; height: 820rpx;
margin: auto; margin: auto;
...@@ -73,42 +92,49 @@ ...@@ -73,42 +92,49 @@
left: 20rpx; left: 20rpx;
border-radius: 3px; border-radius: 3px;
} }
.logo-container{
.logo-container {
/* width: 300rpx; */ /* width: 300rpx; */
height: 110rpx; height: 110rpx;
overflow: hidden; overflow: hidden;
position: relative; position: relative;
margin-top: 30rpx; margin-top: 30rpx;
} }
.logo{
.logo {
width: 300rpx; width: 300rpx;
position: absolute; position: absolute;
top: -190rpx; top: -190rpx;
right: 30rpx; right: 30rpx;
} }
.er-code-div{
.er-code-div {
width: 280rpx; width: 280rpx;
height: 280rpx; height: 280rpx;
margin:auto; margin: auto;
margin-top: 30rpx; margin-top: 30rpx;
} }
.er-code{
.er-code {
width: 280rpx; width: 280rpx;
height: 280rpx; height: 280rpx;
} }
.title{
.title {
font-size: 38rpx; font-size: 38rpx;
text-align: center; text-align: center;
margin-top: 40rpx; margin-top: 40rpx;
color: rgb(59, 59, 59); color: rgb(59, 59, 59);
} }
.operation{
.operation {
font-size: 26rpx; font-size: 26rpx;
text-align: center; text-align: center;
margin-top: 20rpx; margin-top: 20rpx;
color: rgb(63, 61, 59); color: rgb(63, 61, 59);
} }
.close{
.close {
width: 80rpx; width: 80rpx;
height: 80rpx; height: 80rpx;
background-color: rgb(172, 169, 170); background-color: rgb(172, 169, 170);
...@@ -118,36 +144,42 @@ ...@@ -118,36 +144,42 @@
border-radius: 50%; border-radius: 50%;
line-height: 80rpx; line-height: 80rpx;
} }
.phone{
.phone {
height: 85rpx; height: 85rpx;
text-align: center; text-align: center;
color: rgb(160, 157, 160); color: rgb(160, 157, 160);
line-height: 85rpx; line-height: 85rpx;
} }
.call{
.call {
height: 125rpx; height: 125rpx;
text-align: center; text-align: center;
line-height: 125rpx; line-height: 125rpx;
font: 30rpx; font: 30rpx;
} }
.textBox{
.textBox {
width: 750rpx; width: 750rpx;
height: 510rpx; height: 510rpx;
background-color: white; background-color: white;
position: absolute; position: absolute;
bottom: 0; bottom: 0;
} }
.textBox-container{
.textBox-container {
width: 660rpx; width: 660rpx;
height: 300rpx; height: 300rpx;
margin: auto; margin: auto;
margin-top: 50rpx; margin-top: 50rpx;
} }
.textArea-class{
.textArea-class {
height: 300rpx; height: 300rpx;
background-color: rgb(244, 246, 250); background-color: rgb(244, 246, 250);
} }
.feedbackButton{
.feedbackButton {
margin-top: 30rpx; margin-top: 30rpx;
border-radius: 3px; border-radius: 3px;
width: 100%; width: 100%;
...@@ -157,11 +189,13 @@ ...@@ -157,11 +189,13 @@
background-color: rgb(132, 199, 224); background-color: rgb(132, 199, 224);
text-align: center; text-align: center;
} }
.content{
.content {
padding-top: 0rpx; padding-top: 0rpx;
padding-bottom: 60rpx; padding-bottom: 60rpx;
} }
.content-item{
.content-item {
width: 100%; width: 100%;
height: auto; height: auto;
border-bottom: 1px solid rgb(247, 246, 247); border-bottom: 1px solid rgb(247, 246, 247);
...@@ -174,14 +208,16 @@ ...@@ -174,14 +208,16 @@
background-color: black; background-color: black;
margin-right: 20rpx; margin-right: 20rpx;
} */ } */
.item-title{
.item-title {
width: 100%; width: 100%;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
padding:30rpx 0 30rpx 0; padding: 30rpx 0 30rpx 0;
} }
.text{
.text {
width: 610rpx; width: 610rpx;
height: auto; height: auto;
margin: auto; margin: auto;
......
// pages/myAppointment/myAppointment.js
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
navItem:[
// {content:'全部',type:'0'},
{content:'夜间入园预约',type:'1'},
{content:'看房预约',type:'2'},
],
data:[ // 假数据数组,type=0入园预约,type=1 看房预约
// {title:'夜间入园预约',type:'0',time:'6月30日 20:00-24:00',num:3,url:'http://upload.miaomiao-bao.com/36acd202008141719598303.jpg'},
// {title:'看房预约',type:'1',time:'6月30日',num:3,url:' http://upload.miaomiao-bao.com/4c644202008141702599692.jpg'},
],
active:0,
height:0,
},
// 点击导航切换,默认是全部的
chageNav(e){
let index = e.currentTarget.dataset.index
this.setData({
active: index
})
this.getList(index)
},
//预约凭证
gohotelAccommodation(e){
console.log(e)
wx.navigateTo({
url: '../hotelAccommodation/hotelAccommodation?detail='+JSON.stringify(e.currentTarget.dataset.item),
})
},
//预约
goAppoint(e){
let type = e.currentTarget.dataset.index;
wx.navigateTo({
url: '/pages/appointment/appointment?type='+type,
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({
height: wx.getSystemInfoSync().windowHeight, //获取屏幕的高度
})
this.getList(this.data.active)
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
},
// 预约列表/我的预约
getList(index) {
let type = ''
switch (index) {
case 0: type = 0; break;
case 1: type = 1 ; break;
}
let that = this
app.wxRequest({
url: '/api/v1/subscribe/getList',
data: {
state: '',
type: type//0 入园预约 1 看房预约 全部 空字符
},
success: function(res) {
let tmpArr = []
res.data.forEach(item => {
let type = item.type*1
let title = ''
let url = ''
switch (type) {
case 0:
title = '夜间入园预约'
url = 'http://upload.miaomiao-bao.com/36acd202008141719598303.jpg'
break;
case 1:
title = '看房预约'
url = 'http://upload.miaomiao-bao.com/4c644202008141702599692.jpg'
break;
}
let obj = {
title:title,
type: type,
time: item.subscribeDate.substring(5,11).replace('-','月').replace(' ','日') + ((type == 0) ? ' 20:00-24:00' : ''),
num: item.subscribeNum,
url: url,
id: item.id,
mobile: item.mobile,
name: item.name,
}
tmpArr.push(obj)
})
that.setData({
data: tmpArr
})
}
})
}
})
\ No newline at end of file
<!--pages/myAppointment/myAppointment.wxml-->
<navigation class="navigation" titleText="我的预约" backIcon="/image/back.png"></navigation>
<view class="container all">
<view class="myActivity-container" style="min-height:{{height}}px;">
<view class="myAppointment-nav">
<!-- 遍历头部导航 -->
<view bindtap="chageNav" data-index="{{index}}" wx:for="{{navItem}}" wx:key="index" class="navItem {{index == active? 'active':''}}">{{item.content}}</view>
</view>
<view class="myAppointment-body">
<view class="myAppointment-item" wx:for="{{data}}" wx:key="index">
<image src="{{item.url}}" class="item-img"></image>
<view class="item-content">
<view class="item-title {{item.type == 0 ?'item-num-1' : ''}}">{{item.title}}</view>
<view class="item-time {{item.type == 1 ?'item-time-1' : ''}}">预约时间 {{item.time}}</view>
<view wx:if="{{item.type == 0}}" class="item-num">预约人数 {{item.num}}人</view>
</view>
<view class="button" data-item="{{item}}" bindtap="gohotelAccommodation">预约凭证</view>
</view>
</view>
</view>
<view class="noActive" hidden="{{data.length > 0 || active == 1}}" >
<view class="noActive-title">暂无夜间入园预约</view>
<view class="noActive-rule">20:00后入园需要提前预约,每日限流200人</view>
<view class="noActive-botton" data-index="1" bindtap="goAppoint">去预约</view>
</view>
<view class="noActive" hidden="{{data.length > 0 || active == 0}}" >
<view class="noActive-title">暂无看房预约</view>
<view class="noActive-botton" data-index="2" bindtap="goAppoint">去预约</view>
</view>
</view>
<wxs module = "m1">
var getDate = function(date,type){
return date.substring(5,11).replace('-','月').replace(' ','日') + ((type == 0) ? ' 20:00-24:00' : '');
}
module.exports.getDate = getDate;
</wxs>
/* pages/myAppointment/myAppointment.wxss */
.myAppointment-nav{
width: 750rpx;
padding-top: 150rpx;
/* height: 95rpx; */
border-bottom: 1px solid rgb(238, 238, 238);
background: -webkit-linear-gradient(rgb(255,255,255), rgb(249,249,251)); /* Safari 5.1 - 6.0 */
background: -o-linear-gradient(rgb(255,255,255), rgb(249,249,251)); /* Opera 11.1 - 12.0 */
background: -moz-linear-gradient(rgb(255,255,255), rgb(249,249,251)); /* Firefox 3.6 - 15 */
background: linear-gradient(rgb(255,255,255), rgb(249,249,251)); /* 标准的语法(必须放在最后) */
display: flex;
justify-content: space-around;
}
.all{
background-color: rgba(243,244,246,1);
}
.navItem{
line-height: 95rpx;
color: rgb(156, 158, 163);
}
.active{
border-bottom: 3px solid rgb(0, 0, 2);
color: rgb(28, 27, 30);
}
.myAppointment-body{
width: 750rpx;
/* min-height: 1000rpx; */
height: auto;
/* background-color: rgb(245, 244, 249); */
padding-top: 50rpx;
}
.noActive{
width: 750rpx;
position: absolute;
top: 50%;
text-align: center;
height: auto;
}
.noActive-title{
font-size:38rpx;
font-weight:500;
color:rgba(149,157,169,1);
line-height:52rpx;
}
.noActive-rule{
font-size:26rpx;
font-weight:400;
color:rgba(149,157,169,1);
line-height:36rpx;
margin-top: 24rpx;
}
.noActive-botton{
width:308rpx;
height:96rpx;
font-size:26rpx;
text-align: center;
font-weight:400;
line-height: 96rpx;
background:rgba(134,197,225,1);
border-radius:4px;
color:rgba(255,255,255,1);
font-size:30rpx;
margin: 0 auto;
margin-top: 64rpx;
}
.myAppointment-item{
width: 670rpx;
height: 360rpx;
margin: auto;
margin-bottom: 50rpx;
background-color: rgb(220, 214, 220);
border-radius: 4px;
position: relative;
overflow: hidden;
}
.item-img{
width: 100%;
position: absolute;
height:360rpx;
}
.item-content{
width: 610rpx;
height: auto;
position: absolute;
bottom: 45rpx;
left: 30rpx;
}
.item-title{
font-size: 36rpx;
line-height: 70rpx;
}
.item-time{
line-height: 48rpx;
font-size: 28rpx;
color: rgb(220, 214, 220);
}
.item-num{
font-size:28rpx ;
color: rgb(220, 214, 220);
line-height: 48rpx;
}
/* 入园标题样式 */
.item-num-1{
color: rgb(244, 254, 255);
}
.item-time-1{
color: rgb(40, 50, 56);
}
.button{
width: 170rpx;
height: 70rpx;
position: absolute;
bottom: 45rpx;
right: 30rpx;
line-height: 70rpx;
text-align: center;
color: white;
background:rgba(255,255,255,0.53);
border-radius: 3px;
font-size: 28rpx;
}
\ No newline at end of file
Page({
data: {
},
onLoad: function (options) {
},
})
\ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file
<!--pages/home/home/home.wxml-->
<text>pages/home/home/home.wxml</text>
/* pages/home/home/home.wxss */
\ No newline at end of file
Page({
data: {
},
onLoad: function (options) {
},
})
\ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file
<!--pages/home/home/home.wxml-->
<text>pages/home/home/home.wxml</text>
/* pages/home/home/home.wxss */
\ No newline at end of file
Page({
data: {
},
onLoad: function (options) {
},
})
\ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file
<!--pages/home/home/home.wxml-->
<text>pages/home/home/home.wxml</text>
/* pages/home/home/home.wxss */
\ No newline at end of file
Page({
data: {
},
onLoad: function (options) {
},
})
\ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file
<!--pages/home/home/home.wxml-->
<text>pages/home/home/home.wxml</text>
/* pages/home/home/home.wxss */
\ No newline at end of file
Page({
data: {
},
onLoad: function (options) {
},
})
\ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file
<!--pages/home/home/home.wxml-->
<text>pages/home/home/home.wxml</text>
/* pages/home/home/home.wxss */
\ No newline at end of file
Page({
data: {
},
onLoad: function (options) {
},
})
\ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file
<!--pages/home/home/home.wxml-->
<text>pages/home/home/home.wxml</text>
/* pages/home/home/home.wxss */
\ No newline at end of file
const app = getApp() const App = getApp()
let logicData = { let logicData = {
pageScrollLock: false, pageScrollLock: false,
...@@ -38,56 +38,22 @@ Page({ ...@@ -38,56 +38,22 @@ Page({
}, },
onLoad: function (options) { onLoad: function (options) {
// this.queryDetail()
this.setData({ this.setData({
id: options.id id: options.id
}) })
var that = this var that = this
app.login({ App.login({
success: function() { success: function () {
that.getActivityDetail() that.getActivityDetail()
} }
}) })
}, },
/**
* 获取 banner 渲染数据
* @function
* @param {string} - funcToken
* @returns
*/
queryDetail: function () {
let response = {
banner: [
'https://image-1256588539.cos.ap-shanghai.myqcloud.com/miniapp/activity/banner-1.png',
'https://image-1256588539.cos.ap-shanghai.myqcloud.com/miniapp/activity/banner-2.png',
'https://image-1256588539.cos.ap-shanghai.myqcloud.com/miniapp/activity/banner-3.png',
],
title: '艺术花坊国际花艺设计基础知识交流分享会',
date: '6月30日 - 7月12日 10:00 - 18:30',
address: '艺术花坊五号展厅',
quota: '50人',
describe: '跟随老师结合各类花材,运用色彩,将生活灵感巧妙实践于花艺作品中。体验者全程鲜花实操亲自参与鲜花制作,用花木来抒发情怀,从而点缀生活中的美。',
contact: '13316748039'
}
this.setData({
banner: response.banner,
info: {
title: response.title,
date: response.date,
address: response.address,
quota: response.quota,
describe: response.describe,
contact: response.contact,
}
})
},
onContact: function () { onContact: function () {
if (this.data.activeState == 1) { if (this.data.activeState == 1) {
wx.navigateTo({ wx.navigateTo({
url: '/pages/activity-entry/activity-entry?id='+this.data.id url: '/pages/play/activity-entry/activity-entry?id=' + this.data.id
}) })
} }
...@@ -106,12 +72,12 @@ Page({ ...@@ -106,12 +72,12 @@ Page({
}, },
//主题活动详情 //主题活动详情
getActivityDetail(){ getActivityDetail() {
var that = this var that = this
app.wxRequest({ App.wxRequest({
url: '/api/v1/activity/getDetail', url: '/api/v1/activity/getDetail',
data: { id: that.data.id }, data: { id: that.data.id },
success: function(res) { success: function (res) {
var response = res.data var response = res.data
that.setData({ that.setData({
banner: response.banners, banner: response.banners,
...@@ -124,19 +90,19 @@ Page({ ...@@ -124,19 +90,19 @@ Page({
// contact: response.contact, // contact: response.contact,
} }
}) })
that.configActiveState(response.activeState*1) that.configActiveState(response.activeState * 1)
} }
}) })
}, },
configActiveState(state) { configActiveState(state) {
var text = this.data.stateText var text = this.data.stateText
switch(state) { switch (state) {
case 0:text = '未开始' case 0: text = '未开始'
break; break;
case 1:text = '立即报名' case 1: text = '立即报名'
break; break;
case 2:text = '报名已截止' case 2: text = '报名已截止'
break; break;
} }
this.setData({ this.setData({
......
{ {
"usingComponents": { "usingComponents": {
"parser":"../../component/parser.min/parser" "parser": "../../../component/parser.min/parser"
} }
} }
\ No newline at end of file
import iMiment from '../../npm/miment.js' const App = getApp()
const app = getApp()
Page({ Page({
data: { data: {
...@@ -15,7 +14,7 @@ Page({ ...@@ -15,7 +14,7 @@ Page({
activityImage: '', activityImage: '',
activityName: '', activityName: '',
activeTime: '', activeTime: '',
activityTimes: [{beginTime:'',endTime:'', date:''}],// 活动场次 activityTimes: [{ beginTime: '', endTime: '', date: '' }],// 活动场次
activityIndex: 0, activityIndex: 0,
isShow: false, isShow: false,
...@@ -36,31 +35,14 @@ Page({ ...@@ -36,31 +35,14 @@ Page({
id: options.id id: options.id
}) })
// this.setReset()
var that = this var that = this
app.login({ App.login({
success: function() { success: function () {
that.getEnrollView() that.getEnrollView()
} }
}) })
}, },
// setReset: function () {
// let funcDate = iMiment(new Date().getTime()).format('YYYY-MM-DD')
// let funcFormInto = {
// name: '',
// phone: '',
// quantity: 0,
// date: funcDate,
// }
// this.setData({
// formInto: funcFormInto,
// appointmentDate: funcDate,
// })
// },
onQuantityCut: function () { onQuantityCut: function () {
let funcFormInto = this.data.formInto let funcFormInto = this.data.formInto
if (0 < funcFormInto.quantity) { if (0 < funcFormInto.quantity) {
...@@ -69,6 +51,8 @@ Page({ ...@@ -69,6 +51,8 @@ Page({
this.setData({ this.setData({
formInto: funcFormInto formInto: funcFormInto
}) })
this.updateSubmitButtonStatus()
}, },
onQuantityAdd: function () { onQuantityAdd: function () {
...@@ -80,11 +64,11 @@ Page({ ...@@ -80,11 +64,11 @@ Page({
}) })
return return
} }
if (1 == activityTime.enroll*1) { if (1 == activityTime.enroll * 1) {
this.setData({ this.setData({
errorQuantity: '该场次已报名过,请选择其他场次', errorQuantity: '该场次已报名过,请选择其他场次',
}) })
} else if (funcFormInto.quantity >= activityTime.residue*1) { } else if (funcFormInto.quantity >= activityTime.residue * 1) {
this.setData({ this.setData({
errorQuantity: '该场次剩余名额' + activityTime.residue + '人', errorQuantity: '该场次剩余名额' + activityTime.residue + '人',
}) })
...@@ -103,6 +87,7 @@ Page({ ...@@ -103,6 +87,7 @@ Page({
formInto: funcFormInto formInto: funcFormInto
}) })
this.updateSubmitButtonStatus()
}, },
showPicker() { showPicker() {
...@@ -122,11 +107,11 @@ Page({ ...@@ -122,11 +107,11 @@ Page({
let activityTime = this.data.activityTimes[this.data.activityIndex] let activityTime = this.data.activityTimes[this.data.activityIndex]
if (1 == activityTime.enroll*1) { if (1 == activityTime.enroll * 1) {
this.setData({ this.setData({
errorQuantity: '该场次已报名过,请选择其他场次', errorQuantity: '该场次已报名过,请选择其他场次',
}) })
} else if (0 == activityTime.residue*1) { } else if (0 == activityTime.residue * 1) {
this.setData({ this.setData({
errorQuantity: '该场次人数已满,请选择其他场次', errorQuantity: '该场次人数已满,请选择其他场次',
}) })
...@@ -136,6 +121,8 @@ Page({ ...@@ -136,6 +121,8 @@ Page({
}) })
} }
this.updateSubmitButtonStatus()
}, },
cancleCallBack() { cancleCallBack() {
this.setData({ this.setData({
...@@ -151,8 +138,8 @@ Page({ ...@@ -151,8 +138,8 @@ Page({
onSubmit: function () { onSubmit: function () {
var that = this var that = this
app.login({ App.login({
success: function() { success: function () {
that.doActivityEnroll() that.doActivityEnroll()
} }
}) })
...@@ -214,15 +201,17 @@ Page({ ...@@ -214,15 +201,17 @@ Page({
}) })
} }
} }
this.updateSubmitButtonStatus()
}, },
//活动报名页 //活动报名页
getEnrollView(){ getEnrollView() {
var that = this var that = this
app.wxRequest({ App.wxRequest({
url: '/api/v1/activity/getEnrollView', url: '/api/v1/activity/getEnrollView',
data: { id: that.data.id }, data: { id: that.data.id },
success: function(res) { success: function (res) {
var response = res.data var response = res.data
if (response.activityTimes.length > 0) { if (response.activityTimes.length > 0) {
var activityTimes = [] var activityTimes = []
...@@ -282,12 +271,12 @@ Page({ ...@@ -282,12 +271,12 @@ Page({
let activityTime = this.data.activityTimes[this.data.activityIndex] let activityTime = this.data.activityTimes[this.data.activityIndex]
if (1 == activityTime.enroll*1) { if (1 == activityTime.enroll * 1) {
this.setData({ this.setData({
errorQuantity: '该场次已报名过,请选择其他场次', errorQuantity: '该场次已报名过,请选择其他场次',
}) })
complete = false complete = false
} else if (0 == activityTime.residue*1) { } else if (0 == activityTime.residue * 1) {
this.setData({ this.setData({
errorQuantity: '该场次人数已满,请选择其他场次', errorQuantity: '该场次人数已满,请选择其他场次',
}) })
...@@ -311,6 +300,37 @@ Page({ ...@@ -311,6 +300,37 @@ Page({
}, },
updateSubmitButtonStatus() {
let complete = true
let formInto = this.data.formInto
if (formInto.name === '') {
complete = false
}
if (formInto.phone === '') {
complete = false
} else if (formInto.phone.length != 11) {
complete = false
}
let activityTime = this.data.activityTimes[this.data.activityIndex]
if (1 == activityTime.enroll * 1) {
complete = false
} else if (0 == activityTime.residue * 1) {
complete = false
} else if (formInto.quantity === 0) {
complete = false
}
this.setData({
canSubmit: complete
})
return complete
},
// 活动报名 // 活动报名
doActivityEnroll() { doActivityEnroll() {
if (!this.inspectForm()) { if (!this.inspectForm()) {
...@@ -323,10 +343,10 @@ Page({ ...@@ -323,10 +343,10 @@ Page({
title: '提交中', title: '提交中',
show: true, show: true,
mask: true, mask: true,
duration: 1000*60, duration: 1000 * 60,
}) })
var that = this var that = this
app.wxRequest({ App.wxRequest({
url: '/api/v1/activity/doActivityEnroll', url: '/api/v1/activity/doActivityEnroll',
data: { data: {
activityId: that.data.id, activityId: that.data.id,
...@@ -335,13 +355,13 @@ Page({ ...@@ -335,13 +355,13 @@ Page({
name: formInto.name, name: formInto.name,
mobile: formInto.phone, mobile: formInto.phone,
}, },
success: function(res) { success: function (res) {
that.setData({ that.setData({
entryComplete: true, entryComplete: true,
}) })
wx.lin.hideToast() wx.lin.hideToast()
}, },
fail: function(err) { fail: function (err) {
wx.lin.showToast({ wx.lin.showToast({
image: '/image/error.png', image: '/image/error.png',
title: err.msg, title: err.msg,
......
{ {
"navigationBarTextStyle": "black", "navigationBarTextStyle": "black",
"usingComponents": { "usingComponents": {
"parser":"../../component/parser.min/parser" "picker": "../../../component/picker/picker"
} }
} }
\ No newline at end of file
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
<view class="input-picker" bindtap="showPicker"> <view class="input-picker" bindtap="showPicker">
<text class="picker">{{activityTimes[activityIndex].beginTime}}</text> <text class="picker">{{activityTimes[activityIndex].beginTime}}</text>
</view> </view>
<image class="input-icon" src="../../image/more.png"></image> <image class="input-icon" src="../../image/more.png" bindtap="showPicker"></image>
</view> </view>
</view> </view>
<view class="form-error row align-c"> <view class="form-error row align-c">
......
import iMiment from '../../npm/miment.js' const App = getApp()
const app = getApp()
Page({ Page({
data: { data: {
...@@ -8,11 +7,9 @@ Page({ ...@@ -8,11 +7,9 @@ Page({
}, },
onLoad: function () { onLoad: function () {
// this.queryActivity()
// this.queryOther()
var that = this var that = this
app.login({ App.login({
success: function() { success: function () {
that.getActivityList(1) that.getActivityList(1)
that.getActivityList(0) that.getActivityList(0)
} }
...@@ -20,80 +17,23 @@ Page({ ...@@ -20,80 +17,23 @@ Page({
}, },
queryActivity: function () {
let response = [
{
id: '1',
cover: 'https://image-1256588539.cos.ap-shanghai.myqcloud.com/miniapp/activity/activity-1.png',
title: '夏日音乐节',
date: '6月30日-7月12日 10:00-12:00',
describe: '古典、电影、摇滚、民乐...无论你喜好哪种口味,都能在这里找到你的菜!',
}, {
id: '2',
cover: 'https://image-1256588539.cos.ap-shanghai.myqcloud.com/miniapp/activity/activity-2.png',
title: '茶艺手作体验空间',
date: '7月25日-8月25日 10:00-12:00',
describe: '茶文化,以人为本,借此一叶一盏修心修德,茶席可看作茶人于 尘世间安身之处,寄托理想之所',
}, {
id: '3',
cover: 'https://image-1256588539.cos.ap-shanghai.myqcloud.com/miniapp/activity/activity-3.png',
title: '书画艺术作品鉴赏分享活动',
date: '7月25日-8月25日 10:00-12:00',
describe: '历史画作历经数千年的沧桑巨变发展到今天,艺术魅力依然光彩照人,一起来感受它们的妙不可言',
}
]
this.setData({
activity: response
})
},
queryOther: function () {
let response = [
{
id: '1',
cover: 'https://image-1256588539.cos.ap-shanghai.myqcloud.com/miniapp/activity/activity-other-1.png',
title: 'SPA养心体验',
date: '7月25日-8月25日',
describe: '',
}, {
id: '2',
cover: 'https://image-1256588539.cos.ap-shanghai.myqcloud.com/miniapp/activity/activity-other-2.png',
title: '花艺鉴赏活动',
date: '7月25日-8月25日',
describe: '',
}, {
id: '3',
cover: 'https://image-1256588539.cos.ap-shanghai.myqcloud.com/miniapp/activity/activity-other-3.png',
title: '划船比赛',
date: '7月25日-8月25日',
describe: '',
},
]
this.setData({
other: response
})
},
onActivityDetail: function (funcItem) { onActivityDetail: function (funcItem) {
console.log('onActivityDetail',funcItem)
wx.navigateTo({ wx.navigateTo({
url: '/pages/activity-detail/activity-detail?id='+funcItem.currentTarget.dataset.id url: '/pages/play/activity-detail/activity-detail?id=' + funcItem.currentTarget.dataset.id
}) })
}, },
//主题活动列表 type 1 近期 0 往期 //主题活动列表 type 1 近期 0 往期
getActivityList(type){ getActivityList(type) {
var that = this var that = this
app.wxRequest({ App.wxRequest({
url: '/api/v1/activity/getList', url: '/api/v1/activity/getList',
data: { data: {
listType: type, listType: type,
pageSize: 20, pageSize: 20,
pageNo: 1, pageNo: 1,
}, },
success: function(res) { success: function (res) {
var tmpArr = []; var tmpArr = [];
res.data.list.forEach(item => { res.data.list.forEach(item => {
var tmpItem = { var tmpItem = {
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
<navigation class="navigation" titleText="主题活动" background="#ffffff" backIcon="/image/back.png"></navigation> <navigation class="navigation" titleText="主题活动" background="#ffffff" backIcon="/image/back.png"></navigation>
<view class="container"> <view class="container">
<block wx:if="{{activity.length > 0}}">
<view class="title row"> <view class="title row">
<image src="./image/title.png"></image> <image src="./image/title.png"></image>
</view> </view>
...@@ -20,6 +21,7 @@ ...@@ -20,6 +21,7 @@
</view> </view>
</block> </block>
</view> </view>
</block>
<block wx:if="{{other.length > 0}}"> <block wx:if="{{other.length > 0}}">
<view class="title row"> <view class="title row">
...@@ -37,8 +39,8 @@ ...@@ -37,8 +39,8 @@
<text>{{item.date}}</text> <text>{{item.date}}</text>
</view> </view>
</view> </view>
<view class="other-item col"></view>
</block> </block>
<view class="other-item col"></view>
</view> </view>
</block> </block>
</view> </view>
\ No newline at end of file
import iUtils from '../../utils/utils.js' const App = getApp()
import deviceUtil from "../../miniprogram_npm/lin-ui/utils/device-util.js"
const app = getApp()
let logicData = { let logicData = {
pageScrollLock: false, pageScrollLock: false,
...@@ -20,24 +17,24 @@ Page({ ...@@ -20,24 +17,24 @@ Page({
tab: [ tab: [
{ {
'text': '艺文', 'text': '艺文',
'defaultImage': '/pages/play/image/literatue.png', 'defaultImage': './image/literatue.png',
'activeImage': '/pages/play/image/literatue-s.png', 'activeImage': './image/literatue-s.png',
}, { }, {
'text': '健康', 'text': '健康',
'defaultImage': '/pages/play/image/healthy.png', 'defaultImage': './image/healthy.png',
'activeImage': '/pages/play/image/healthy-s.png', 'activeImage': './image/healthy-s.png',
}, { }, {
'text': '美食', 'text': '美食',
'defaultImage': '/pages/play/image/food.png', 'defaultImage': './image/food.png',
'activeImage': '/pages/play/image/food-s.png', 'activeImage': './image/food-s.png',
}, { }, {
'text': '休闲', 'text': '休闲',
'defaultImage': '/pages/play/image/relaxation.png', 'defaultImage': './image/relaxation.png',
'activeImage': '/pages/play/image/relaxation-s.png', 'activeImage': './image/relaxation-s.png',
}, { }, {
'text': '住宿', 'text': '住宿',
'defaultImage': '/pages/play/image/hotel.png', 'defaultImage': './image/hotel.png',
'activeImage': '/pages/play/image/hotel-s.png', 'activeImage': './image/hotel-s.png',
} }
], ],
tabIndex: 0, tabIndex: 0,
...@@ -69,63 +66,63 @@ Page({ ...@@ -69,63 +66,63 @@ Page({
let response = [ let response = [
{ {
describe: [ describe: [
app.globalData.appResourcesBase + 'play/detail/detail-1-1.png' App.globalData.appResourcesBase + 'play/detail/detail-1-1.png'
], ],
shop: [{ shop: [{
id: 1, id: 1,
name: '海错图展馆', name: '海错图展馆',
cover: app.globalData.appResourcesBase + 'play/detail/detail-1-2.png', cover: App.globalData.appResourcesBase + 'play/detail/detail-1-2.png',
x: 108, x: 108,
y: 212, y: 212,
}, { }, {
id: 2, id: 2,
name: '拾光花坊', name: '拾光花坊',
cover: app.globalData.appResourcesBase + 'play/detail/detail-1-3.png', cover: App.globalData.appResourcesBase + 'play/detail/detail-1-3.png',
x: 108, x: 108,
y: 264, y: 264,
}] }]
}, { }, {
describe: [ describe: [
app.globalData.appResourcesBase + 'play/detail/detail-2-1.png' App.globalData.appResourcesBase + 'play/detail/detail-2-1.png'
], ],
shop: [{ shop: [{
id: 3, id: 3,
name: '水元养韵SPA', name: '水元养韵SPA',
cover: app.globalData.appResourcesBase + 'play/detail/detail-2-2.png', cover: App.globalData.appResourcesBase + 'play/detail/detail-2-2.png',
x: 108, x: 108,
y: 212, y: 212,
}] }]
}, { }, {
describe: [ describe: [
app.globalData.appResourcesBase + 'play/detail/detail-3-1.png' App.globalData.appResourcesBase + 'play/detail/detail-3-1.png'
], ],
shop: [{ shop: [{
id: 4, id: 4,
name: '原味舒食', name: '原味舒食',
cover: app.globalData.appResourcesBase + 'play/detail/detail-3-2.png', cover: App.globalData.appResourcesBase + 'play/detail/detail-3-2.png',
x: 108, x: 108,
y: 212, y: 212,
}, { }, {
id: 5, id: 5,
name: '原野MOJITO', name: '原野MOJITO',
cover: app.globalData.appResourcesBase + 'play/detail/detail-3-3.png', cover: App.globalData.appResourcesBase + 'play/detail/detail-3-3.png',
x: 108, x: 108,
y: 212, y: 212,
}] }]
}, { }, {
describe: [ describe: [
app.globalData.appResourcesBase + 'play/detail/detail-4-1.png' App.globalData.appResourcesBase + 'play/detail/detail-4-1.png'
], ],
shop: [{ shop: [{
id: 6, id: 6,
name: '星空影院', name: '星空影院',
cover: app.globalData.appResourcesBase + 'play/detail/detail-4-2.png', cover: App.globalData.appResourcesBase + 'play/detail/detail-4-2.png',
x: 108, x: 108,
y: 212, y: 212,
}] }]
}, { }, {
describe: [ describe: [
app.globalData.appResourcesBase + 'play/detail/detail-5-1.png' App.globalData.appResourcesBase + 'play/detail/detail-5-1.png'
], ],
shop: [] shop: []
}, },
...@@ -139,7 +136,7 @@ Page({ ...@@ -139,7 +136,7 @@ Page({
setNavigationLogo: function () { setNavigationLogo: function () {
let funcUnitProportion = wx.getStorageSync('unitProportion') let funcUnitProportion = wx.getStorageSync('unitProportion')
let funcLogoTop = iUtils.navigationElementCenterMarginTop(50) let funcLogoTop = App.modular.utils.navigationElementCenterMarginTop(50)
let funcLogoMinorTop = funcLogoTop + 50 * funcUnitProportion + 20 * funcUnitProportion let funcLogoMinorTop = funcLogoTop + 50 * funcUnitProportion + 20 * funcUnitProportion
let funcTabMarginTop = funcLogoMinorTop + 20 * funcUnitProportion let funcTabMarginTop = funcLogoMinorTop + 20 * funcUnitProportion
...@@ -153,14 +150,14 @@ Page({ ...@@ -153,14 +150,14 @@ Page({
onActivity: function () { onActivity: function () {
wx.navigateTo({ wx.navigateTo({
url: '/pages/activity/activity' url: '/pages/play/activity/activity'
}) })
}, },
onActivityDetail: function (funcItem) { onActivityDetail: function (funcItem) {
// console.log(funcItem) // console.log(funcItem)
wx.navigateTo({ wx.navigateTo({
url: '/pages/activity-detail/activity-detail?id='+funcItem.currentTarget.dataset.id url: '/pages/activity-detail/activity-detail?id=' + funcItem.currentTarget.dataset.id
}) })
}, },
...@@ -170,7 +167,7 @@ Page({ ...@@ -170,7 +167,7 @@ Page({
}) })
}, },
onPageScroll: function(funcEvent) { onPageScroll: function (funcEvent) {
// console.log(funcEvent) // console.log(funcEvent)
// 优化滚动事件触发频率 // 优化滚动事件触发频率
// if (logicData.pageScrollLock) return // if (logicData.pageScrollLock) return
...@@ -216,7 +213,7 @@ Page({ ...@@ -216,7 +213,7 @@ Page({
onShopDetail: function (funcItem) { onShopDetail: function (funcItem) {
wx.navigateTo({ wx.navigateTo({
url: '/pages/shop-detail/shop-detail?id=' + funcItem.currentTarget.dataset.id url: '/pages/play/service-detail/service-detail?id=' + funcItem.currentTarget.dataset.id
}) })
}, },
...@@ -227,9 +224,9 @@ Page({ ...@@ -227,9 +224,9 @@ Page({
}, },
//主题活动列表 type 1 近期 0 往期 //主题活动列表 type 1 近期 0 往期
getActivityList(type){ getActivityList(type) {
var that = this var that = this
app.wxRequest({ App.wxRequest({
url: '/api/v1/activity/getList', url: '/api/v1/activity/getList',
data: { data: {
listType: type, listType: type,
...@@ -237,7 +234,7 @@ Page({ ...@@ -237,7 +234,7 @@ Page({
pageNo: 1, pageNo: 1,
tagId: '101', tagId: '101',
}, },
success: function(res) { success: function (res) {
var tmpArr = []; var tmpArr = [];
res.data.list.forEach(item => { res.data.list.forEach(item => {
var tmpItem = { var tmpItem = {
......

3.61 KB | W: | H:

3.61 KB | W: | H:

pages/play/image/food.png
pages/play/home/image/food.png
pages/play/image/food.png
pages/play/home/image/food.png
  • 2-up
  • Swipe
  • Onion skin

719 Bytes | W: | H:

719 Bytes | W: | H:

pages/play/image/hotel-s.png
pages/play/home/image/hotel-s.png
pages/play/image/hotel-s.png
pages/play/home/image/hotel-s.png
  • 2-up
  • Swipe
  • Onion skin
Page({
data: {
},
onLoad: function (options) {
},
})
\ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file
<!--pages/home/home/home.wxml-->
<text>pages/home/home/home.wxml</text>
/* pages/home/home/home.wxss */
\ No newline at end of file
Page({
data: {
},
onLoad: function (options) {
},
})
\ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file
<!--pages/home/home/home.wxml-->
<text>pages/home/home/home.wxml</text>
/* pages/home/home/home.wxss */
\ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file
...@@ -23,4 +23,6 @@ ...@@ -23,4 +23,6 @@
<image src="{{item}}" mode="aspectFit"></image> <image src="{{item}}" mode="aspectFit"></image>
</block> </block>
</view> </view>
<view class="iphonexr-fill" style="{{info.background}}"></view>
</view> </view>
\ No newline at end of file
...@@ -74,3 +74,13 @@ page { ...@@ -74,3 +74,13 @@ page {
height: 230rpx; height: 230rpx;
margin: 56rpx 0 40rpx 40rpx; margin: 56rpx 0 40rpx 40rpx;
} }
/* iphone x 底部颜色填充 */
.iphonexr-fill {
z-index: -1;
position: fixed;
bottom: 0;
left: 0;
width: 750rpx;
height: 100%;
}
\ No newline at end of file
...@@ -8,6 +8,9 @@ let logicData = { ...@@ -8,6 +8,9 @@ let logicData = {
Page({ Page({
data: { data: {
imageBase: App.globalData.appImageBase,
// 导航栏相关属性 // 导航栏相关属性
navigationStyle: { navigationStyle: {
normal: { normal: {
...@@ -62,7 +65,6 @@ Page({ ...@@ -62,7 +65,6 @@ Page({
*/ */
queryDetail: function (funcIndex) { queryDetail: function (funcIndex) {
funcIndex = funcIndex - 1 funcIndex = funcIndex - 1
console.log('queryDetail' + funcIndex)
// 预设数据 // 预设数据
let funcDetail = [ let funcDetail = [
{ {
...@@ -189,7 +191,7 @@ Page({ ...@@ -189,7 +191,7 @@ Page({
onLocation: function () { onLocation: function () {
wx.navigateTo({ wx.navigateTo({
url: '/pages/guide/guide?id=' + Number(logicData.option.id) url: '/pages/home/guide/guide?id=' + Number(logicData.option.id)
}) })
}, },
......
{
"usingComponents": {}
}
\ No newline at end of file
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
<image class="detail-other-location" src="./image/location.png"></image> <image class="detail-other-location" src="./image/location.png"></image>
<text>地址</text> <text>地址</text>
<text>点击查看地址</text> <text>点击查看地址</text>
<image class="detail-other-more" src="../../image/more.png"></image> <image class="detail-other-more" src="{{imageBase + 'more.png'}}"></image>
</view> </view>
</view> </view>
<view class="detail-describe"> <view class="detail-describe">
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
<image class="detail-other-location" src="./image/location.png"></image> <image class="detail-other-location" src="./image/location.png"></image>
<text>地址</text> <text>地址</text>
<text>点击查看地址</text> <text>点击查看地址</text>
<image class="detail-other-more" src="../../image/more-g.png"></image> <image class="detail-other-more" src="{{imageBase + 'more-g.png'}}"></image>
</view> </view>
</view> </view>
<view class="detail-describe"> <view class="detail-describe">
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
<!-- 侧边返回顶部 --> <!-- 侧边返回顶部 -->
<view class="appointment-side col con-b align-c" hidden="{{winSide}}"> <view class="appointment-side col con-b align-c" hidden="{{winSide}}">
<button class="appointment-side-top" bindtap="onBackTop"> <button class="appointment-side-top" bindtap="onBackTop">
<image src="../../image/top.png"></image> <image src="{{imageBase + 'top.png'}}"></image>
</button> </button>
</view> </view>
</view> </view>
\ No newline at end of file
Page({
data: {
},
onLoad: function (options) {
},
})
\ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file
<!--pages/home/home/home.wxml-->
<text>pages/home/home/home.wxml</text>
/* pages/home/home/home.wxss */
\ No newline at end of file
Page({
data: {
},
onLoad: function (options) {
},
})
\ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file
<!--pages/home/home/home.wxml-->
<text>pages/home/home/home.wxml</text>
/* pages/home/home/home.wxss */
\ No newline at end of file
Page({
data: {
},
onLoad: function (options) {
},
})
\ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file
<!--pages/home/home/home.wxml-->
<text>pages/home/home/home.wxml</text>
/* pages/home/home/home.wxss */
\ No newline at end of file
let logicData = {
pageScrollLock: false,
pageScrollTimer: 0,
}
const app = getApp()
Page({
data: {
isNavigationWhite: false,
banner: [],
bannerIndex: 0,
title: '',
content: '', // 内容
detailImage: [],
detailImageUrl: [],
detailIndex: 0,
relation: [],
date: '',
//接口参数
id: '',
},
onLoad: function (options) {
this.setData({
id: options.id,
})
var that = this
app.login({
success: function() {
that.loadStrategyDetail()
}
})
},
onSwiperChange: function (funcEvent) {
this.setData({
bannerIndex: funcEvent.detail.current
})
},
onPageScroll: function(funcEvent) {
// 优化滚动事件触发频率
if (logicData.pageScrollLock) return
logicData.pageScrollLock = true
if (funcEvent.scrollTop > 40 && !this.data.isNavigationWhite) {
this.setData({
isNavigationWhite: true
})
wx.setNavigationBarColor({
frontColor: '#000000',
backgroundColor: '#000000',
})
}
if (funcEvent.scrollTop <= 40) {
this.setData({
isNavigationWhite: false
})
wx.setNavigationBarColor({
frontColor: '#ffffff',
backgroundColor: '#ffffff',
})
}
// 恢复滚动事件
logicData.pageScrollTimer = setTimeout(function () {
logicData.pageScrollLock = false
clearTimeout(logicData.pageScrollTimer)
}, 40)
},
// 攻略详情
loadStrategyDetail() {
var that = this
app.wxRequest({
url: '/api/v1/strategy/getDetail',
data: { id: that.data.id },
success: function(res) {
/**
* 此代码段处理目的为,匹配富文本代码中的 <img> 标签,并将其图片的宽度修改为适应屏幕
* width:100% --- 图片宽度加以限制,避免超出屏幕
* height:auto --- 高度自适应
* display:block --- 此代码,可以去掉图片之间的空白间隔,个人觉得好用
*/
var content = res.data.content.replace(/<img/gi, '<img style="width:100%;height:auto;display:block" ')
.replace(/<table/gi, '<table style="max-width:100%;height:auto;display:block" ')
.replace(/<section/g, '<div')
.replace(/\/section>/g, '\div>');
that.setData({
banner: res.data.banners,
content: content,
date: res.data.updateDate,
title: res.data.title
})
that.getParksByParkIds(res.data.smParkIds)
},
})
},
shopDetail(e) {
let datasetId = e.currentTarget.dataset.id
let id = ''
if (datasetId == '21a0cbbd39604380bc46fba38ac5fb63') {
// 海错图展馆
id = 1
} else if (datasetId == 'b8f04379bf164b7f8bca69be14146a17') {
// 拾光花坊
id = 2
} else if (datasetId == 'd8922a8f759245d4949b62693099edb5') {
// 元养水韵SPA馆
id = 3
} else if (datasetId == 'd0e5ff414f794e15bc33c4e11f5356a8') {
// 原味舒食
id = 4
} else if (datasetId == '81078c007c034d46b7dfe59935d84f7a') {
// 原野MOJITO
id = 5
} else if (datasetId == '29e79743f0f94e5eb726e0ebdfe64248') {
// 星空影院
id = 6
} else if (datasetId == '559d980e9eaf4459883fb3a556d24347') {
// 儿童营地信息
wx.navigateTo({
url: '/pages/campsite-mirror/campsite-mirror',
})
} else if (datasetId == 'c0a2d795a7a54dcd9459dd1b969c1771') {
// 住宿信息
}
if (id != '') {
wx.navigateTo({
url: '/pages/shop-detail/shop-detail?id=' + id
})
}
},
// 攻略详情文中提及
getParksByParkIds(parkIds) {
if (!parkIds) {
return
}
var that = this
app.wxRequest({
url: '/api/v1/park/getParksByParkIds',
data: { smParkIds: parkIds },
success: function(res) {
var tmpArr = [];
res.data.forEach(item => {
var tmpItem = {
'id': item.id,
'cover': item.guideImg,
'title': item.name,
'time': '营业时间 ' + item.businessTime,
'price': item.chargeStandard,
'describe': '',
}
tmpArr.push(tmpItem)
})
that.setData({
relation: tmpArr
})
}
})
}
})
\ No newline at end of file
<!-- 首页 - 游客攻略 -->
<navigation
class="navigation"
titleText="攻略详情"
color="{{isNavigationWhite ? '#000000' : '#ffffff'}}"
background="{{isNavigationWhite ? '#ffffff' : 'rgba(0, 0, 0, 0)'}}"
backIcon="{{isNavigationWhite ? '/image/back.png' : '/image/back-w.png'}}"
>
</navigation>
<view class="container">
<view id="banner" class="banner">
<swiper class="banner-swiper" autoplay circular interval="2000" duration="500" indicator-color="rgba(0, 0, 0, 0)" indicator-active-color="rgba(0, 0, 0, 0)" bindchange="onSwiperChange">
<block wx:for="{{banner}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<swiper-item class="banner-swiper-item">
<image class="banner-swiper-image" src="{{item}}"></image>
</swiper-item>
</block>
</swiper>
<view class="banner-swiper-point">
<swiper-point bannerActiveIndex="{{bannerIndex}}"></swiper-point>
</view>
</view>
<view class="detail column con-c">
<view class="detail-title">
<text>{{title}}</text>
</view>
<parser html="{{content}}"/>
<view class="detail-date">
<text>{{date}}</text>
</view>
</view>
<view class="relation" wx:if="{{relation.length>0}}">
<view class="relation-title">
<text>文中提及</text>
</view>
<block wx:for="{{relation}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="relation-item row con-b align-c" data-id="{{item.id}}" bindtap="shopDetail">
<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>
</view>
.navigation {
z-index: 1900;
position: fixed;
top: 0;
left: 0;
width: 750rpx;
}
.banner {
position: relative;
width: 750rpx;
height: 870rpx;
background: #ffffff;
}
.banner-swiper,
.banner-swiper-item,
.banner-swiper-image {
position: absolute;
top: 0 !important;
left: 0 !important;
width: 750rpx;
height: 870rpx;
}
.banner-swiper-point {
position: relative;
top: 760rpx;
left: 0;
}
.detail {
width: 750rpx;
padding: 6px 32rpx;
}
.detail-title {
width: 670rpx;
margin: 80rpx 0 64rpx 0;
font-size: 38rpx;
font-weight: 800;
color:#15191F;
line-height: 52rpx;
}
.detail-date {
/* width: 152rpx; */
height: 40rpx;
margin: 64rpx 0 32rpx 0;
font-size: 26rpx;
font-weight: 400;
color: #959DA9;
line-height: 40rpx;
}
.detail > image {
min-width: 100%;
}
rich-text {
margin-bottom: 52rpx;
font-size: 30rpx;
font-weight: 300;
color: #15191F;
line-height: 52rpx;
}
/* 攻略相关 */
.relation-title {
margin: 0 40rpx 90rpx 40rpx;
padding-top: 64rpx;
border-top: 1px #E2E7EF solid;
}
.relation-title text {
width: 120rpx;
height: 42rpx;
margin-top: 40rpx;
font-size: 30rpx;
font-weight: bold;
color:rgba(21,25,31,1);
}
.relation-item {
position: relative;
width: 670rpx;
height: 238rpx;
margin: 0 40rpx 104rpx 40rpx;
background:rgba(245, 246, 248, 1);
border-radius: 2px;
}
.relation-item > image {
position: absolute;
top: -24rpx;
left: 24rpx;
width: 176rpx;
height: 214rpx;
border-radius: 2px;
overflow: hidden;
}
.relation-item {
padding: 32rpx 32rpx 48rpx 230rpx;
}
.relation-item-info text:nth-child(1) {
font-size: 30rpx;
font-weight: bold;
line-height: 42rpx;
color:rgba(21, 25, 31, 1);
}
.relation-item-info text:nth-child(2) {
margin-top: 30rpx;
font-size: 26rpx;
line-height: 36rpx;
color: #656E7B;
}
.relation-item-info text:nth-child(3) {
margin-top: 12rpx;
font-size: 26rpx;
line-height: 36rpx;
color: #656E7B;
}
.relation-item-more {
height: 100%;
}
.relation-item-more image {
width: 32rpx;
height: 32rpx;
}
\ No newline at end of file
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
"compileType": "miniprogram", "compileType": "miniprogram",
"libVersion": "2.10.0", "libVersion": "2.10.0",
"appid": "wx4933acc52682049e", "appid": "wx4933acc52682049e",
"projectname": "%E4%B8%96%E8%8C%82%E5%B0%8F%E7%A8%8B%E5%BA%8F", "projectname": "%E4%B8%96%E8%8C%82%E5%B0%8F%E7%A8%8B%E5%BA%8F%E4%BA%8C%E6%9C%9F",
"debugOptions": { "debugOptions": {
"hidedInDevtools": [] "hidedInDevtools": []
}, },
......
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