Commit bc436867 by 严立

LL - 重构我的中心,俱乐部创建

parent 265199e6
Showing with 1340 additions and 562 deletions
......@@ -6,6 +6,8 @@ import iRule from './utils/rule/rule.js'
import iRequest from './utils/request/corvus.js'
import iEnvironmental from './environmental.js'
import iOption from './utils/request/option.js'
App({
modular: {
'rule': iRule,
......@@ -26,8 +28,7 @@ App({
token: '',
refreshToken: '',
userInfo: null,
baseUrl: 'https://sm-web2.meiqicloud.com',//测试
// baseUrl: 'https://smbhyh-web.meiqicloud.com',//生产
baseUrl: iOption.baseUrl,//测试
debug: true,
isRefreshToken: false,
......@@ -48,7 +49,7 @@ App({
setAppStatus: function () {
this.wxRequest({
url: '/api/v1/common/getDictByType',
url: 'v1/common/getDictByType',
method: 'POST',
data: {
'type': 'is_open'
......@@ -160,7 +161,7 @@ App({
success: res => {
// 发送 res.code 到后台换取 openId, sessionKey, unionId
this.wxRequest({
url: '/api/v1/login/getSmallSession?code=' + res.code,
url: 'v1/login/getSmallSession?code=' + res.code,
method: 'GET',
success: (response) => {
this.globalData.isRefreshToken = false
......@@ -222,7 +223,7 @@ App({
*/
registUserInfo: function (obj) {
this.wxRequest({
url: '/api/v1/login/getDecryptData',
url: 'v1/login/getDecryptData',
data: obj.param,
success: (res) => {
if (obj.success) {
......@@ -246,7 +247,7 @@ App({
*/
queryUserStatus: function () {
this.wxRequest({
url: '/api/v1/userAuth/getAuth',
url: 'v1/userAuth/getAuth',
method: 'GET',
success: (response) => {
let funcResponse = response.data
......@@ -307,7 +308,7 @@ App({
this.globalData.isRefreshToken = true
this.wxRequest({
url: '/api/v1/login/refreshToken',
url: 'v1/login/refreshToken',
header: {
token: this.globalData.token,
refreshToken: this.globalData.refreshToken
......@@ -359,6 +360,20 @@ App({
},
/**
* 全局函数 - 获取商店信息
* @function
* @param
* @returns
*/
getShopInfo: function(funcShopId) {
for (let i = 0, l = iEnvironmental.shopId.length; i < l; i++) {
if (funcShopId === iEnvironmental.shopId[i].id) {
return iEnvironmental.shopId[i]
}
}
},
/**
* 全局函数 - 设置商品信息
* @function
* @param {object} - { commodity: '商品数据对象', complete: '回调函数' }
......
......@@ -12,6 +12,12 @@
height: 32rpx;
}
.icon {
width: 32rpx;
height: 32rpx;
}
/* 业主标记 */
.owner-mark {
height: 32rpx;
padding: 0 12rpx;
......
......@@ -14,7 +14,6 @@ function showToast (funcOption) {
// 如果传参包含 duration 数值,使用该数值。
// 删除该属性是为了不污染 toast 组件中的默认值。
console.log(App.ui.toast.data)
let funcToastDuration = App.ui.toast.data.duration
if (funcOption.duration) {
funcToastDuration = funcOption.duration
......
......@@ -3,12 +3,23 @@ Component({
styleIsolation: 'apply-shared'
},
properties: {
inputId: { type: String, value: '' },
className: { type: String, value: '' },
placeholder: { type: String, value: '' },
value: {
type: String,
value: ''
},
type: {
type: String,
value: 'text'
},
maxlength: {
type: Number,
value: 140
}
},
......@@ -20,23 +31,27 @@ Component({
methods: {
onInput: function (event) {
console.log(event.detail.value)
this.setData({
value: event.detail.value
})
console.log('[m-input] onInput')
// this.setData({
// value: event.detail.value
// })
},
onInputFocus: function() {
console.log('onInputFocus')
console.log('[m-input]onInputFocus')
},
onInputBlur: function() {
console.log('onInputBlur')
onInputBlur: function (event) {
console.log('[m-input] onInputBlur')
this.setData({
value: event.detail.value
})
this.setInputHidden()
this.triggerEvent('blur', { id: this.data.inputId, value: this.data.value} )
},
onInputConfirm: function() {
console.log('onInputConfirm')
console.log('[m-input] onInputConfirm')
this.setInputHidden()
},
......
......@@ -8,6 +8,8 @@
<input
class="row ac"
value="{{value}}"
type="{{type}}"
maxlength="{{maxlength}}"
placeholder="{{placeholder}}"
placeholder-class="container-text-placeholder"
focus="{{inputFocus}}"
......
......@@ -11,7 +11,7 @@ Component({
// 导航栏是否固定在视图顶部
isFixed: {
type: Boolean,
value: true,
value: false,
},
fixedTop: {
......
......@@ -3,6 +3,7 @@ Component({
styleIsolation: 'apply-shared'
},
properties: {
inputId: { type: String, value: '' },
className: { type: String, value: '' },
placeholder: { type: String, value: '' },
value: { type: String, value: '' },
......@@ -19,7 +20,6 @@ Component({
methods: {
onInput: function (event) {
this.setData({
value: event.detail.value,
inputQuantity: event.detail.value.length
})
......@@ -30,8 +30,12 @@ Component({
console.log('onInputFocus')
},
onInputBlur: function() {
onInputBlur: function(event) {
this.setData({
value: event.detail.value,
})
this.setInputHidden()
this.triggerEvent('blur', { id: this.data.inputId, value: this.data.value })
},
onInputConfirm: function() {
......
.swiper-point {
z-index: 1100;
z-index: 4;
position: absolute;
top: 0;
left: 0;
......
......@@ -61,7 +61,7 @@ Page({
queryDetail: function () {
let that = this
App.wxRequest({
url: '/api/v1/park/getList',
url: 'v1/park/getList',
success: function(res) {
let funcData = res.list.filter(v => v.name === '儿童营地')
that.setData({
......@@ -75,7 +75,7 @@ Page({
let that = this
let shopInfo = wx.getStorageSync('shopInfoBuffer')
App.wxRequest({
url: '/api/v1/activity/getList',
url: 'v1/activity/getList',
data: {
'listType': '1',
'pageSize': '5',
......
......@@ -64,7 +64,7 @@ Page({
queryDetail: function () {
let that = this
App.wxRequest({
url: '/api/v1/park/getList',
url: 'v1/park/getList',
success: function(res) {
let funcData = res.list.filter(v => v.name === '儿童营地')
that.setData({
......@@ -78,7 +78,7 @@ Page({
let that = this
let shopInfo = wx.getStorageSync('shopInfoBuffer')
App.wxRequest({
url: '/api/v1/activity/getList',
url: 'v1/activity/getList',
data: {
'listType': '1',
'pageSize': '5',
......
let App = getApp()
Page({
establishBuffer: {
'clubName': '',
'clubDescribe': '',
'userName': '',
'userPhone': '',
'errorClubName': '',
'errorClubDescribe': '',
'errorUserName': '',
'errorUserPhone': '',
},
data: {
imageBase: App.globalData.appImageBase,
resourcesBase: App.globalData.appResourcesBase,
isButtonBottom: false,
establishInfo: {}
},
onLoad: function (options) {
this.setData({
establishInfo: this.establishBuffer
})
},
onInputBlur: function (funcEvent) {
let funcType = funcEvent.detail.id
let funcValue = funcEvent.detail.value
switch (funcType) {
case 'clubName':
this.establishBuffer.clubName = funcValue
this.establishBuffer.errorClubName = App.modular.rule.item('required', funcValue)
if (this.establishBuffer.errorClubName !== '') this.establishBuffer.errorClubName = '俱乐部名称' + this.establishBuffer.errorClubName
break
case 'clubDescribe':
this.establishBuffer.clubDescribe = funcValue
this.establishBuffer.errorClubDescribe = App.modular.rule.item('required', funcValue)
if (this.establishBuffer.errorClubDescribe !== '') this.establishBuffer.errorClubDescribe = '俱乐部描述' + this.establishBuffer.errorClubName
break
case 'userName':
this.establishBuffer.userName = funcValue
this.establishBuffer.errorUserName = App.modular.rule.item('name', funcValue)
break
case 'userPhone':
this.establishBuffer.userPhone = funcValue
this.establishBuffer.errorUserPhone = App.modular.rule.item('phone', funcValue)
break
}
this.setData({
establishInfo: this.establishBuffer
})
console.log(funcEvent)
},
onEstablish: function () {
let funcPass = true
let funcEstablishInfoKey = Object.keys(this.data.establishInfo)
for (let i = 0, l = funcEstablishInfoKey.length; i < l; i++) {
// error 信息验证,如果存在非空字段,则表示有数据校验不通过。
if (funcEstablishInfoKey[i].indexOf('error') >= 0 && this.data.establishInfo[funcEstablishInfoKey[i]]) {
console.log('验证不通过')
funcPass = false
}
// 常规字段验证,确保没有非空字段。
if (funcEstablishInfoKey[i].indexOf('error') < 0 && this.data.establishInfo[funcEstablishInfoKey[i]] === '') {
this.onInputBlur({ detail: { id: funcEstablishInfoKey[i], value: '' }})
console.log('验证不通过')
funcPass = false
}
}
if (!funcPass) true
console.log('验证通过')
App.request({
url: 'v3/club/createClub',
params: {
'name': this.data.establishInfo.clubName,
'summary': this.data.establishInfo.describe,
'userName': this.data.establishInfo.userName,
'mobile': this.data.establishInfo.userPhone,
'wxAccount': 'wxAccount'
}
}).then((response) => {
wx.setStorageSync('tempEstablish', true)
wx.navigateBack()
}).catch((response) => {
console.log('resolve', response)
})
}
})
\ No newline at end of file
<m-nav titleText="申请加入俱乐部"></m-nav>
<m-nav titleText="申请创建俱乐部" styleIndex="{{1}}"></m-nav>
<view class="container">
<view class="club-info col cc ac">
<image class="club-info-logo" src=""></image>
<view class="club-info-name column cc ac">
<text class="title">马术俱乐部</text>
</view>
</view>
<view class="container">
<view class="club-enter">
<view class="form-item col">
<text>俱乐部名称</text>
<m-input className="form-item-input row ac" placeholder="请输入俱乐部名称"></m-input>
<text>错误提示</text>
<m-input
inputId="clubName"
className="form-item-input row ac"
placeholder="请输入俱乐部名称"
bindblur="onInputBlur"
></m-input>
<text>{{establishInfo.errorClubName}}</text>
</view>
<view class="form-item col">
<text>俱乐部简要说明</text>
<m-textarea className="form-item-textarea" placeholder="请输入俱乐部简要说明,如创建俱乐部的宗旨、意义及简要规划等" inputMax="{{200}}"></m-textarea>
<text>错误提示</text>
<m-textarea
inputId="clubDescribe"
className="form-item-textarea"
placeholder="请输入俱乐部简要说明,如创建俱乐部的宗旨、意义及简要规划等"
inputMax="{{200}}"
bindblur="onInputBlur"
></m-textarea>
<text>{{establishInfo.errorClubDescribe}}</text>
</view>
<view class="form-item col">
<text>姓名</text>
<m-input className="form-item-input row ac" placeholder="请输入姓名"></m-input>
<text>错误提示</text>
<m-input
inputId="userName"
className="form-item-input row ac"
placeholder="请输入姓名"
bindblur="onInputBlur"
></m-input>
<text>{{establishInfo.errorUserName}}</text>
</view>
<view class="form-item col">
<text>手机号</text>
<m-input className="form-item-input row ac" placeholder="请输入手机号"></m-input>
<text>错误提示</text>
</view>
<view class="form-item col">
<text>微信号</text>
<m-input className="form-item-input row ac" placeholder="请输入微信号"></m-input>
<text>错误提示</text>
<m-input
inputId="userPhone"
className="form-item-input row ac"
type="number"
maxlength="{{11}}"
placeholder="请输入手机号"
bindblur="onInputBlur"
></m-input>
<text>{{establishInfo.errorUserPhone}}</text>
</view>
</view>
......@@ -42,4 +55,4 @@
</view>
</view>
<m-button-bottom text="提交申请" isDisable="{{isButtonBottom}}"></m-button-bottom>
\ No newline at end of file
<m-button-bottom text="提交申请" bindtap="onEstablish"></m-button-bottom>
\ No newline at end of file
......@@ -47,6 +47,10 @@
padding: 0 40rpx;
}
.form-item {
margin: 40rpx 0 0 0;
}
.form-item > text:nth-child(1) {
height: 42rpx;
font-size: 30rpx;
......@@ -72,6 +76,7 @@
.form-item-textarea {
width: 670rpx;
height: 320rpx;
margin: 16rpx 0 8rpx 0;
padding: 24rpx;
border-radius: 4px;
border: 1px solid #DBDFE5;
......
let App = getApp()
Page({
data: {
imageBase: App.globalData.appImageBase,
resourcesBase: App.globalData.appResourcesBase,
bannerCreatTop: wx.getStorageSync('navTitleHeight') + 30,
tabItem: [
{ 'text': '全部', 'value': '' },
{ 'text': '亲子教育', 'value': '' },
......@@ -10,12 +15,25 @@ Page({
],
clubList: [],
winPowerInfo: false, // 非业主创建俱乐部提示
winSubmitSuccess: false, // 创建提交成功提示
},
onLoad: function (options) {
this.queryClub()
},
onShow: function () {
let funcWinSubmitSuccess = wx.getStorageSync('tempEstablish')
if (funcWinSubmitSuccess) {
this.setData({
winSubmitSuccess: true
})
wx.removeStorageSync('tempEstablish')
}
},
queryClub: function () {
let funcResponse = [
{
......@@ -44,6 +62,48 @@ Page({
* @param {object} - funcEvent
* @returns
*/
onCreatClub: function () {
let funcUserInfo = wx.getStorageSync('userInfo')
if (funcUserInfo.userType === 0) {
this.setData({
winPowerInfo: true
})
return
}
wx.navigateTo({ url: '/pages/club/create/create' })
},
/**
* 创建俱乐部提交成功关闭弹窗
* @function
* @param
* @returns
*/
onSubmitSuccess: function () {
this.setData({
winSubmitSuccess: false,
})
},
/**
* 权限提醒
* @function
* @param
* @returns
*/
onPowerInfo: function () {
this.setData({
winPowerInfo: false
})
},
/**
* 页面滚动事件
* @function
* @param {object} - funcEvent
* @returns
*/
onPageScroll: function (funcEvent) {
App.pageScroll(funcEvent, this)
},
......
<nav titleText="俱乐部" styleIndex="2" scrollHeight="{{navScroll}}" isOccupy="{{false}}"></nav>
<m-nav titleText="俱乐部" styleIndex="{{2}}" scrollHeight="{{navScroll}}" isOccupy="{{false}}"></m-nav>
<!-- 权限提醒 -->
<view class="member-power row cc ac" wx:if="{{winPowerInfo}}">
<view class="member-power-info col cc ac">
<text>权限提醒</text>
<text>仅业主可创建俱乐部,如果您是业主,可前往【我的】页面进行业主认证。</text>
<button class="row cc ac" bindtap="onPowerInfo">我知道了</button>
</view>
</view>
<!-- 提交成功 -->
<view class="submit-success row cc ac" wx:if="{{winSubmitSuccess}}">>
<image src="{{resourcesBase + 'club/establish-tip.png'}}" bindtap="onSubmitSuccess"></image>
</view>
<view class="container">
<!-- banner -->
<view class="banner">
<image></image>
<button class="row cc ac" style="{{'top: ' + bannerCreatTop + 'px;'}}" bindtap="onCreatClub">创建俱乐部</button>
<image src="{{resourcesBase + 'club/banner.png'}}"></image>
</view>
<!-- tab -->
......
.banner image {
/* 创建俱乐部成功提示 */
.submit-success {
z-index: 7;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, .7);
}
.submit-success > image {
width: 606rpx;
height: 974rpx;
}
/* 权限提醒 */
.member-power {
z-index: 7;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, .7);
}
.member-power-info {
width: 606rpx;
height: 538rpx;
padding: 56rpx 40rpx 48rpx 40rpx;
border-radius: 4px;
background: #FFFFFF;
}
.member-power-info > text:nth-child(1) {
height: 72rpx;
font-size: 50rpx;
font-weight: 800;
line-height: 72rpx;
color: #15191F;
}
.member-power-info > text:nth-child(2) {
width: 526rpx;
height: 138rpx;
margin-top: 48rpx;
font-size: 30rpx;
font-weight: 400;
line-height: 46rpx;
color: #656E7B;
}
.member-power-info > button {
width: 526rpx;
height: 80rpx;
margin-top: 96rpx;
border-radius: 4px;
border: 1px solid #15191F;
font-size: 30rpx;
font-weight: 500;
line-height: 42rpx;
color: #15191F;
}
.banner {
position: relative;
}
.banner > button {
position: absolute;
top: 0;
left: 540rpx;
width: 170rpx;
height: 60rpx;
background: #afb1b5;
border-radius: 4px;
font-size: 26rpx;
font-weight: 500;
line-height: 36rpx;
color: #FFFFFF;
}
.banner > image {
width: 750rpx;
height: 998rpx;
background: #999999;
......
......@@ -45,7 +45,7 @@ Page({
queryShopCover: function () {
function shopCover(funcType, funcIndex) {
App.wxRequest({
url: '/api/v1/banner/getOfficeByBanner',
url: 'v1/banner/getOfficeByBanner',
data: {
'smColumnId': funcType,
},
......@@ -161,7 +161,7 @@ Page({
// 顶部第一商店推荐
App.wxRequest({
url: '/api/v1/commodity/recommend',
url: 'v1/commodity/recommend',
data: {
'officeId': funcShopInfo[0].shopId,
'genre': 5,
......@@ -190,7 +190,7 @@ Page({
// 顶部第二商店推荐
App.wxRequest({
url: '/api/v1/commodity/recommend',
url: 'v1/commodity/recommend',
data: {
'officeId': funcShopInfo[1].shopId,
'genre': 5,
......@@ -219,7 +219,7 @@ Page({
// 底部第一商店推荐
App.wxRequest({
url: '/api/v1/commodity/recommend',
url: 'v1/commodity/recommend',
data: {
'officeId': funcShopInfo[2].shopId,
'genre': 4,
......@@ -248,7 +248,7 @@ Page({
// 底部第二商店推荐
App.wxRequest({
url: '/api/v1/commodity/recommend',
url: 'v1/commodity/recommend',
data: {
'officeId': funcShopInfo[3].shopId,
'genre': 4,
......@@ -326,6 +326,7 @@ Page({
* @returns
*/
onBuyRecommendFood: function (event) {
console.log('onBuyRecommendFood', event)
// funcShopType 使用函数区分商品类型,所以每个函数里的数值是固定的
let funcShopType = 5
let funcShopAppId = event.currentTarget.dataset.id
......
......@@ -37,6 +37,8 @@ Page({
option: option
})
console.log(option)
this.resetShoppingCart()
},
......@@ -148,7 +150,7 @@ Page({
*/
querySideBar: function () {
App.wxRequest({
url: '/api/v1/commodity/getClassifys',
url: 'v1/commodity/getClassifys',
data: {
'officeId': this.data.shopInfo.id,
'genre': this.data.shopInfo.shopType,
......@@ -199,7 +201,7 @@ Page({
})
App.wxRequest({
url: '/api/v1/commodity/getCommoditys',
url: 'v1/commodity/getCommoditys',
data: {
'officeId': this.data.shopInfo.id,
// 'classifyId': this.data.sideBar[this.data.sideBarIndex].id,
......@@ -420,7 +422,7 @@ Page({
let funcItem = event.currentTarget.dataset.item
App.wxRequest({
url: '/api/v1/commodity/getCommodityParticulars',
url: 'v1/commodity/getCommodityParticulars',
data: {
'commodityId': funcItem.id,
'classifyId': funcItem.typeId,
......
......@@ -67,7 +67,7 @@ Page({
})
App.wxRequest({
url: '/api/v1/commodity/getCommoditys',
url: 'v1/commodity/getCommoditys',
data: {
'officeId': this.data.shopInfo.id,
'genre': this.data.shopInfo.shopType,
......@@ -178,7 +178,7 @@ Page({
})
App.wxRequest({
url: '/api/v1/commodity/getCommoditys',
url: 'v1/commodity/getCommoditys',
data: {
'officeId': this.data.shopInfo.id,
'genre': 3,
......
......@@ -35,7 +35,7 @@ Page({
queryBanner: function () {
App.wxRequest({
url: '/api/v1/banner/getOfficeByBanner',
url: 'v1/banner/getOfficeByBanner',
data: {
'smColumnId': 1,
},
......@@ -74,7 +74,7 @@ Page({
}
App.wxRequest({
url: '/api/v1/commodity/getCommoditys',
url: 'v1/commodity/getCommoditys',
data: {
'officeId': funcShopId,
'genre': funcCommodityType,
......@@ -184,7 +184,7 @@ Page({
funcCommodityList = [funcCommodityItem]
App.wxRequest({
url: '/api/v1/commodity/getSpaPriceRange',
url: 'v1/commodity/getSpaPriceRange',
data: {
},
......@@ -275,7 +275,7 @@ Page({
// 跳转商品下单,需要查询商品参数
if (funcItme.targetId === '') return
App.wxRequest({
url: '/api/v1/commodity/getCommodityParticulars',
url: 'v1/commodity/getCommodityParticulars',
data: {
'commodityId': funcItme.targetId
},
......
......@@ -198,7 +198,7 @@ Page({
})
App.wxRequest({
url: '/api/v1/subscribe/doSubscribe',
url: 'v1/subscribe/doSubscribe',
data: {
mobile: this.data.formPhone,
subscribeNum: this.data.formQuantity,
......
......@@ -19,7 +19,7 @@ Page({
getNoticeDetail() {
var that = this
App.wxRequest({
url: '/api/v1/dynamic/getDetail',
url: 'v1/dynamic/getDetail',
data: { id: that.data.id },
success: function (res) {
var content = res.data.content.replace(/<img/gi, '<img style="width:100%;height:auto;display:block" ')
......
......@@ -26,7 +26,7 @@ Page({
getNoticeList() {
var that = this
App.wxRequest({
url: '/api/v1/dynamic/getList',
url: 'v1/dynamic/getList',
data: { pageSize: that.data.pageSize, pageNo: that.data.pageNo },
success: function (res) {
that.setData({
......
......@@ -22,7 +22,7 @@ Page({
getBrands: function (index) {
App.wxRequest({
url: '/api/v1/common/getBrands',
url: 'v1/common/getBrands',
success: (response) => {
let history = response.data[index]
this.setData({
......
......@@ -232,7 +232,7 @@ Page({
duration: 60000,
})
App.wxRequest({
url: '/api/v1/subscribe/doSubscribe',
url: 'v1/subscribe/doSubscribe',
data: {
mobile: this.data.formPhone,
subscribeNum: this.data.formQuantity,
......@@ -275,7 +275,7 @@ Page({
// 预约入园查询返回剩余名额
queryQuota: function () {
App.wxRequest({
url: '/api/v1/subscribe/getResidue',
url: 'v1/subscribe/getResidue',
data: {
subscribeDate: this.data.formDate + ' 00:00:00',
type: 0,
......
......@@ -52,7 +52,7 @@ Page({
title: '加载中',
})
App.wxRequest({
url: '/api/v1/smUser/getIntegralDetails',
url: 'v1/smUser/getIntegralDetails',
data: {
'pageNo': this.data.pageNo,
'pageSize': this.data.pageSize,
......
......@@ -147,7 +147,7 @@ Page({
isDoing: true,
})
App.wxRequest({
url: '/api/v1/activity/doCancel',
url: 'v1/activity/doCancel',
data: {
'enrollId': this.data.activityId,
'type': type,
......@@ -202,7 +202,7 @@ Page({
title: '加载中',
})
App.wxRequest({
url: '/api/v1/order/getVolumesByOrderId',
url: 'v1/order/getVolumesByOrderId',
data: {
'orderId': this.data.orderInfo.id
},
......@@ -237,7 +237,7 @@ Page({
*/
queryOrderDetail: function () {
App.wxRequest({
url: '/api/v1/order/getOrderDetail',
url: 'v1/order/getOrderDetail',
data: {
'orderId': this.data.orderInfo.id
},
......@@ -338,7 +338,7 @@ Page({
})
App.wxRequest({
url: '/api/v1/volume/getVolume',
url: 'v1/volume/getVolume',
data: {
'volumeId': funcOrderInfo.codeId
},
......
<m-toast></m-toast>
<m-dialog></m-dialog>
<m-nav titleText="订单详情" styleIndex="{{1}}" bind:navBack="onNavBack"></m-nav>
<m-nav titleText="报名详情" styleIndex="{{1}}" bind:navBack="onNavBack"></m-nav>
<view class="container">
<!-- 订单状态 -->
......@@ -219,7 +219,7 @@
</view>
<view class="notice-wrapper row con-e" bindtap="handleNotice">
<view class="notice">使用须知</view>
<view class="notice">活动须知</view>
<!-- <view class="notice">活动须知</view>
<view class="notice">观影须知</view> -->
<l-icon name="right" color="#959DAA" size="22" />
......@@ -353,10 +353,10 @@
<view class="order-btn" bindtap="onOrderAgain" wx:if="{{orderInfo.state===-1}}">再次下单</view>
</view>
<!-- 使用须知 -->
<!-- 活动须知 -->
<l-popup show="{{showNotice}}" content-align="bottom">
<view class="notice-popup-wrapper">
<view class="notice-popup-title">使用须知</view>
<view class="notice-popup-title">活动须知</view>
<scroll-view scroll-y class="notice-popup-content">
<view>
<rich-text nodes="{{orderInfo.particulars}}"></rich-text>
......
......@@ -14,9 +14,9 @@ Page({
},
onLoad: function (options) {
console.log(options)
let detail = JSON.parse(options.detail);
let detail = JSON.parse(options.detail)
console.log('onLoad')
console.log(detail)
let yyDate = detail.subscribeDate ? Date.parse(detail.subscribeDate.replace(/-/g, '/')) : 0
let nowStr = new Date().toLocaleString().substr(0, 10).replace(/-/g, '/') + " 00:00:00"
let now = Date.parse(nowStr)
......@@ -60,7 +60,7 @@ Page({
})
App.wxRequest({
url: '/api/v1/subscribe/cancelSubscribe',
url: 'v1/subscribe/cancelSubscribe',
data: {
'id': this.data.tickerInfo.id
},
......
/* pages/hotelAccommodation/hotelAccommodation.wxss */
.Img {
position: absolute;
z-index: -2;
......
......@@ -29,6 +29,21 @@ Page({
},
onLoad: function (options) {
console.log(options)
switch (options.tab) {
case 'active':
options.tab = 0
break
case 'garden':
options.tab = 1
break
case 'scanHouse':
options.tab = 2
break
}
let type = options.tab ? 1 * options.tab : 0
this.setData({
option: options,
......@@ -178,7 +193,7 @@ Page({
})
let funcItem = event.target.dataset.item
App.wxRequest({
url: '/api/v1/activity/doCancel',
url: 'v1/activity/doCancel',
data: {
'enrollId': funcItem.enrollId,
'type': type, //0取消1删除
......@@ -224,7 +239,7 @@ Page({
isLoading: true
})
App.wxRequest({
url: '/api/v1/activity/getMyActivityList',
url: 'v1/activity/getMyActivityList',
data: {
'activeState': '', //""全部 0 未开始 1进行中 2已结束
'pageSize': this.data.pageSize,
......@@ -286,7 +301,7 @@ Page({
isLoading: true
})
App.wxRequest({
url: '/api/v1/subscribe/getList',
url: 'v1/subscribe/getList',
data: {
state: 1, //未过期 1,其他 空字符""
type: type //0 入园预约 1 看房预约 全部 空字符
......
......@@ -94,7 +94,7 @@ Page({
getAuth() {
let that = this
App.wxRequest({
url: '/api/v1/userAuth/getAuth',
url: 'v1/userAuth/getAuth',
method: 'GET',
success: function(res) {
let state = res.data.state * 1 // 0 待审核 1 审核通过 2 不通过
......@@ -153,7 +153,7 @@ Page({
})
App.wxRequest({
url: '/api/v1/userAuth/doAuth',
url: 'v1/userAuth/doAuth',
data: {
mobile: phone,
name: name,
......
......@@ -48,7 +48,7 @@ Page({
'duration': 60000
})
App.wxRequest({
url: '/api/v1/volume/getVolumeList',
url: 'v1/volume/getVolumeList',
data: {
status: '', //0已过期1待使用2已使用(""全部)
pageNo: 1,
......@@ -208,7 +208,7 @@ Page({
let funcItem = event.currentTarget.dataset.item
App.wxRequest({
url: '/api/v1/order/getOrderDetail',
url: 'v1/order/getOrderDetail',
data: {
'orderId': funcItem.orderId
},
......
......@@ -19,6 +19,9 @@ Page({
// 是否有券码核销权限
isCouponPermissions: false,
// 年卡月卡
membershipCard: [],
// 我的订单分类 tab
orderCategory: [
{
......@@ -49,7 +52,33 @@ Page({
}
],
orderList: [],
isOrderMore: false,
isMoreOrder: false, // 查看更多订单
// 我的预约分类 tab
appointmentCategory: [
{
icon: './image/appointment-1.png',
name: '主题活动',
quantity: 0,
type: 'active',
}, {
icon: './image/appointment-2.png',
name: '夜间入园预约',
quantity: 0,
type: 'garden',
}, {
icon: './image/appointment-3.png',
name: '看房预约',
quantity: 0,
type: 'scanHouse',
}
],
appointmentList: [],
appointmentActivityListBuffer: [], // 活动预约列表缓存,页面不渲染此数组。
appointmentOtherListBuffer: [], // 其他预约列表,页面不渲染此数组。
isMoreAppointment: false,
mobile: '',
nickName: '',
......@@ -68,8 +97,7 @@ Page({
spaBadge: 0,
artBadge: 101,
isMoreOrder: false, // 查看更多订单
isMoreActivity: false, // 查看更多活动
myOrder: {
passOrder: [],
artOrder: {
......@@ -77,16 +105,11 @@ Page({
orderList: []
}
},
appointmentList: [],
orderListBackup: [],
integral: 0, //积分
shopConfig: App.globalData.shopId,
isYearCard: true,
isMonthCard: false,
authInfo: null,
enrollSubscribeData: {},
isLoadingOrder: true,
},
onShow: function () {
......@@ -96,9 +119,15 @@ Page({
})
this.setData({ appStatus: App.globalData.appStatus })
this.setUserInfo()
this.queryCouponPermissions()
this.queryOrderCategory()
this.setUserInfo() // 设置用户信息
this.queryIntegral() // 查询积分
this.queryCouponPermissions() // 查询券码核销权限
this.queryMembershipCard() // 查询年卡月卡
this.queryOrderCategory() // 查询订单分类
this.queryOrder() // 查询订单列表
this.queryAppointmentCategory() // 查询预约分类
this.queryAppointmentActivity() // 查询活动预约
this.queryAppointmentOther() // 查询其他预约
},
/**
......@@ -135,17 +164,30 @@ Page({
statusText: funcStatusText,
userInfo: funcUserInfo
})
this.getMyActivityList()
this.getCardList()
this.queryOrder()
this.getIntegral()
this.getCountEnrollSubscribe()
}
},
/**
* 查询积分
* @function
* @param
* @returns
*/
queryIntegral() {
let that = this
App.wxRequest({
url: 'v1/smUser/getIntegral',
data: {},
success: function (res) {
let integral = res.data ? res.data.integral : '0'
that.setData({
integral: integral
})
}
})
},
/**
* 查询用户核销权限
* @function
* @param
......@@ -167,6 +209,51 @@ Page({
},
/**
* 查询年卡月卡
* @function
* @param
* @returns
*/
queryMembershipCard: function () {
App.request({
url: 'v1/volume/getVolumeList',
params: {
'status': '',
'pageNo': 1,
'pageSize': -1
}
}).then((response) => {
let funcData = response.data
let funcList = []
for (let i = 0, l = funcData.length; i < l; i++) {
let funcItem = {
'bgi': funcData[i].name === '年卡' ? 'pay/order-input/card-1.png' : 'pay/order-input/card-2.png',
'bgc': funcData[i].name === '年卡' ? '#F7B3C5' : '#8EB9E7',
'orderId': funcData[i].orderId,
'orderStatus': funcData[i].status,
'shopAppId': 3,
'shopName': '',
'shopLogo': '',
'timeExpire': '有效期至 ' + funcData[i].expireTime.replace(/-/g, '.'),
'identity': funcData[i].identityCard.substring(0, 5) + '****' + funcData[i].identityCard.substring(8, 18),
'userName': funcData[i].personName.charAt(0) + '**',
'cardName': '精灵鸟理想国' + funcData[i].name
}
// 设置门店信息
let funcShopInfo = App.setShopInfo(funcItem.shopAppId)
funcItem.shopName = funcShopInfo.name
funcItem.shopLogo = funcShopInfo.logo
funcList.push(funcItem)
}
this.setData({
membershipCard: funcList
})
}).catch((response) => { })
},
/**
* 查询我的订单分类统计数量
* -2 - 电影,2 - SPA,3 - 门票,4 - 文创,5 - 餐饮
* @function
......@@ -186,7 +273,7 @@ Page({
let funcData = response.data
let funcOrderCategory = this.data.orderCategory
for (let i = 0, l = funcOrderCategory.length; i < l; i++) {
funcOrderCategory[i].quantity = funcData[funcOrderCategory[i].type]
funcOrderCategory[i].quantity = funcData[funcOrderCategory[i].type] ? funcData[funcOrderCategory[i].type] : 0
if (funcOrderCategory[i].quantity > 99) funcOrderCategory[i].quantity = '...'
}
......@@ -203,9 +290,6 @@ Page({
* @returns
*/
queryOrder: function () {
this.setData({
isLoadingOrder: true
})
App.request({
url: 'v1/order/getOrderList',
params: {
......@@ -218,15 +302,19 @@ Page({
let funcData = response.data
let funcList = []
for (let i = 0, l = funcData.length; i < l; i++) {
let fcunItem = {
let funcItem = {
'orderId': funcData[i].orderId,
'orderStatus': funcData[i].status,
'orderDetail': [],
'shopName': funcData[i].officeName,
'shopLogo': 'shop/logo-1.png',
'shopId': funcData[i].officeId,
'shopName': '',
'shopLogo': '',
'payAmount': funcData[i].totalMoney,
'timeExpire': funcData[i].expireTime,
'commodityType': '-2'
'commodityType': funcData[i].goodType,
'tipDate': '',
'tipQuantity': '',
'cardStyle': 0
}
let funcOrderDetail = funcData[i].smOrderDetails
......@@ -238,300 +326,221 @@ Page({
'name': funcOrderDetail[ii].name,
'priceTotal': funcOrderDetail[ii].totalPrices
}
fcunItem.orderDetail.push(funcDetailItem)
funcItem.orderDetail.push(funcDetailItem)
}
// 设置门店信息
let funcShopInfo = App.getShopInfo(funcItem.shopId)
funcItem.shopName = funcShopInfo.name
funcItem.shopLogo = funcShopInfo.logo
// 根据商品类别,设置对应的提示信息
// -2 - 电影,2 - SPA,3 - 门票,4 - 文创,5 - 餐饮
let funcDate = funcItem.timeExpire.match(/[0-9\-]+/g)[0]
let funcTime = funcItem.timeExpire.match(/[0-9]{2}:[0-9]{2}/g)
switch (funcItem.commodityType) {
case '-2':
funcItem.tipDate = funcDate.replace(/-/g, '.') + ' ' + funcTime[0] + '-' + funcTime[1]
funcItem.tipQuantity = '共' + funcItem.orderDetail.length + '张电影票'
funcItem.cardStyle = 0
break
case '2':
funcItem.tipDate = '有效期至 ' + funcDate.replace(/-/g, '.')
funcItem.tipQuantity = '共' + funcItem.orderDetail.length + '件商品'
funcItem.cardStyle = 0
break
case '3':
funcItem.tipDate = '有效期至 ' + funcDate.replace(/-/g, '.')
funcItem.tipQuantity = '共' + funcItem.orderDetail.length + '张门票'
funcItem.cardStyle = 0
break
case '4':
funcItem.tipDate = '有效期至 ' + funcDate.replace(/-/g, '.')
funcItem.tipQuantity = '共' + funcItem.orderDetail.length + '件商品'
funcItem.cardStyle = 1
break
case '5':
funcItem.tipDate = '有效期至 ' + funcDate.replace(/-/g, '.')
funcItem.tipQuantity = '共' + funcItem.orderDetail.length + '件餐品'
funcItem.cardStyle = 1
break
}
funcList.push(fcunItem)
// 排除年卡月卡类型
if (funcItem.commodityType !== '1') funcList.push(funcItem)
}
this.setData({
orderList: funcList
})
console.log(funcList)
}).catch((response) => {})
},
// 去活动预约列表
goAppointment: function (e) {
let type = e.currentTarget.dataset.type
wx.navigateTo({
url: '/pages/mine/appointment/appointment?tab=' + type,
})
},
// 去客服中心
goQuestion: function () {
wx.navigateTo({
url: '/pages/mine/question/question',
})
},
// 跳转订单详情
onOrderDetail: function (event) {
let funcItem = event.currentTarget.dataset.item
wx.navigateTo({
url: '/pages/pay/order-detail/order-detail?id=' + funcItem.orderId,
})
},
close() {
this.setData({
mask: false
});
wx.showTabBar({
animation: true,
})
},
/**
* 跳转积分明细
* 查询我的预约分类统计数量
* -2 - 电影,2 - SPA,3 - 门票,4 - 文创,5 - 餐饮
* @function
* @param
* @returns
*/
onIntegralDetail: function (event) {
let integral = event.currentTarget.dataset.integral
wx.navigateTo({
url: '/pages/mine/accumulate/accumulate?integral=' + integral,
})
},
// 去核销
goCouponInput(event) {
wx.navigateTo({
url: '/pages/pay/coupon-input/coupon-input?authInfo=' + JSON.stringify(this.data.authInfo),
})
},
// 获取积分
getIntegral() {
let that = this
App.wxRequest({
url: '/api/v1/smUser/getIntegral', //api/v1/smUser/getIntegral
data: {},
success: function (res) {
let integral = res.data ? res.data.integral : '0'
that.setData({
integral: integral
})
queryAppointmentCategory: function () {
App.request({
url: 'v1/activity/getCountEnrollSubscribe',
}).then((response) => {
let funcData = response.data
let funcAppointmentCategory = this.data.appointmentCategory
for (let i = 0, l = funcAppointmentCategory.length; i < l; i++) {
funcAppointmentCategory[i].quantity = funcData[funcAppointmentCategory[i].type]
if (funcAppointmentCategory[i].quantity > 99) funcAppointmentCategory[i].quantity = '...'
}
})
},
//获取卡数据
getCardList() {
let that = this
App.wxRequest({
url: '/api/v1/volume/getVolumeList',
data: {
status: "", //0已过期1待使用2已使用(""全部)
pageNo: 1,
pageSize: -1
},
success: function (res) {
this.setData({
appointmentCategory: funcAppointmentCategory
})
}).catch((response) => { })
},
let list = res.data.map(item => {
let shopFilter = that.data.shopConfig.filter(k => {
return k.name.toLowerCase() == item.officeName.toLowerCase()
})
item.expireTime = item.expireTime.replace(/-/g, '.')
if (item.name.indexOf('年卡') != -1) {
item.cardType = 1
} else if (item.name.indexOf('月卡') != -1) {
item.cardType = 2
} else {
item.cardType = 3
}
// 姓名隐私
if (item.personName.length > 2) {
item.privateName = item.personName.substr(0, 1) + '*' + item.personName.substr(item.personName.length - 1)
} else {
item.privateName = item.personName.substr(0, 1) + '*'
}
// 身份证隐私
item.privateIdNum = item.identityCard.substr(0, 6) + '****' + item.identityCard.substr(item.identityCard.length - 4)
item.logo = shopFilter.length > 0 ? shopFilter[0].logo : ''
return item
})
let filterList = list.filter(item => {
return item.officeName == '儿童营地'
})
let passOrder = `myOrder.passOrder`
that.setData({
[passOrder]: filterList
})
/**
* 查询我的活动预约列表
* @function
* @param
* @returns
*/
queryAppointmentActivity: function () {
App.request({
url: 'v1/activity/getMyActivityList',
params: {
'enrollState': '2',
'activeState': '',
'pageSize': -1,
'pageNo': 1,
'type': '1',
}
})
},
//获取活动预约统计
getCountEnrollSubscribe() {
let that = this
App.wxRequest({
url: '/api/v1/activity/getCountEnrollSubscribe',
data: {},
success: function (res) {
let data = res.data ? res.data : {}
that.setData({
enrollSubscribeData: data
})
}).then((response) => {
let funcData = response.data.list
let funcList = []
for (let i = 0, l = funcData.length; i < l; i++) {
let funcItem = {
'orderId': funcData[i].orderId,
'enrollId': funcData[i].enrollId,
'name': funcData[i].name,
'cover': funcData[i].cover,
'quantity': '报名人数 ' + funcData[i].number + '人',
'date': funcData[i].activeDate,
'time': funcData[i].activeTime,
'cardStyle': 0,
}
funcList.push(funcItem)
}
})
},
// 登录注册页
onSignIn: function () {
if (this.data.userInfo.isSignIn) {
return true
} else {
wx.navigateTo({
url: '/pages/login/login',
this.setData({
appointmentList: funcList.concat(this.data.appointmentOtherListBuffer),
appointmentActivityListBuffer: funcList,
})
return false
}
}).catch((response) => { })
},
//去认证
goApprove() {
if (this.onSignIn()) {
wx.navigateTo({
url: '/pages/mine/authentication-input/authentication-input',
})
}
},
/**
* 查询我的活动预约列表
* @function
* @param
* @returns
*/
queryAppointmentOther: function () {
App.request({
url: 'v1/subscribe/getList',
params: {
state: 1,
type: ''
}
}).then((response) => {
let funcData = response.data
let funcList = []
for (let i = 0, l = funcData.length; i < l; i++) {
let funcItem = {
'orderId': funcData[i].id,
'enrollId': '',
'name': Number(funcData[i].type),
'cover': '',
'quantity': '预约人数 ' + funcData[i].subscribeNum + '人',
'phone': funcData[i].mobile,
'date': funcData[i].subscribeDate,
'time': funcData[i].subscribeDate,
'cardStyle': 1,
}
funcList.push(funcItem)
}
myActivity() {
if (this.onSignIn()) {
wx.navigateTo({
url: '/pages/mine/appointment/appointment',
this.setData({
appointmentList: this.data.appointmentActivityListBuffer.concat(funcList),
appointmentOtherListBuffer: funcList,
})
}
}).catch((response) => { })
},
myAppointment() {
/**
* 业主身份认证申请
* @function
* @param
* @returns
*/
onAuthentication: function () {
if (this.onSignIn()) {
wx.navigateTo({
url: '../myAppointment/myAppointment',
url: '/pages/mine/authentication-input/authentication-input',
})
}
},
customerService() {
if (this.onSignIn()) {
wx.navigateTo({
url: "/pages/mine/question/question",
})
}
},
// 点分类跳转订单
goOrderByclass(e) {
let type = e.currentTarget.dataset.type
wx.navigateTo({
url: '/pages/mine/order/order?goodType=' + type
})
},
//我的活动详情
activityDetail(e) {
wx.navigateTo({
url: '../activityDetail/activityDetail?enrollid=' + e.currentTarget.dataset.enrollid,
})
},
//预约凭证
gohotelAccommodation(e) {
/**
* 跳转积分明细
* @function
* @param
* @returns
*/
onIntegralDetail: function (event) {
let integral = event.currentTarget.dataset.integral
wx.navigateTo({
url: '../hotelAccommodation/hotelAccommodation?detail=' + JSON.stringify(e.currentTarget.dataset.item),
url: '/pages/mine/accumulate/accumulate?integral=' + integral,
})
},
//点击前往修改页面
onEditInfo: function () {
if (this.onSignIn()) {
wx.navigateTo({
url: '/pages/mine/info/info',
})
}
},
// 获取我的活动
getMyActivityList() {
var that = this
App.wxRequest({
url: '/api/v1/activity/getMyActivityList',
data: {
enrollState: 2, //待使用
activeState: '1', //""全部 0 未开始 1进行中 2已结束
pageSize: -1,
pageNo: 1,
type: 1, //0 影片 1 活动
},
success: function (res) {
let list = res.data.list
let sliceList = []
let activityListBackup = JSON.parse(JSON.stringify(list))
if (list.length > 2) {
sliceList = list.slice(0, 2)
} else {
sliceList = list
}
that.setData({
activityList: sliceList,
activityListBackup
})
}
/**
* 年卡月卡
* @function
* @param
* @returns
*/
onMembership: function () {
wx.navigateTo({
url: '/pages/mine/card/card'
})
},
// 预约列表/我的预约
getList() {
let that = this
App.wxRequest({
url: '/api/v1/subscribe/getList',
data: {
state: '1',
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({
appointmentList: tmpArr
})
}
/**
* 我的订单 - 分类
* @function
* @param
* @returns
*/
onOrderCategory: function (funcEvent) {
let type = funcEvent.currentTarget.dataset.type
wx.navigateTo({
url: '/pages/mine/order/order?goodType=' + type
})
},
toHide: function (array) {
var mphone = array.substring(0, 3) + '****' + array.substring(7);
return mphone;
},
// 二期代码
onOrder: function () {
/**
* 我的订单 - 查看全部
* @function
* @param
* @returns
*/
onOrderList: function () {
let funcUserInfo = wx.getStorageSync('userInfo')
if (funcUserInfo.isSignIn) {
wx.navigateTo({
......@@ -543,12 +552,32 @@ Page({
})
}
},
onAppointment: function () {
/**
* 我的订单 - 查看详情
* @function
* @param
* @returns
*/
onOrderDetail: function (funcEvent) {
let funcItem = funcEvent.currentTarget.dataset.item
wx.navigateTo({
url: '/pages/pay/order-detail/order-detail?id=' + funcItem.orderId,
})
},
/**
* 我的预约 - 查看全部
* @function
* @param
* @returns
*/
onAppointmentList: function (funcEvent) {
let funcUserInfo = wx.getStorageSync('userInfo')
if (funcUserInfo.isSignIn) {
let funcType = funcEvent.currentTarget.dataset.type
wx.navigateTo({
url: '/pages/mine/appointment/appointment'
url: '/pages/mine/appointment/appointment?tab=' + funcType
})
} else {
wx.navigateTo({
......@@ -556,67 +585,124 @@ Page({
})
}
},
handleToCard: function () {
/**
* 我的预约 - 预约凭证
* @function
* @param
* @returns
*/
onAppointmentTicket: function (funcEvent) {
let funcItem = funcEvent.currentTarget.dataset.item
console.log('onAppointmentTicket')
console.log(funcItem)
// {
// 'orderId': funcData[i].id,
// 'enrollId': '',
// 'name': Number(funcData[i].type),
// 'cover': '',
// 'quantity': '预约人数 ' + funcData[i].subscribeNum + '人',
// 'phone': funcData[i].mobile,
// 'date': funcData[i].subscribeDate,
// 'time': funcData[i].subscribeDate,
// 'cardStyle': 1,
// }
let funcOptionItem
if (funcItem.name === 0) {
funcOptionItem = {
'id': funcItem.orderId,
'mobile': funcItem.phone,
'name': funcItem.name,
'num': funcItem.quantity.match(/[0-9]+/)[0],
'subscribeDate': funcItem.date,
'time': App.modular.miment(funcItem.time).format('MM月DD日') + ' 20:00-24:00',
'title': '夜间入园预约',
'type': 0,
'url': 'http://upload.miaomiao-bao.com/36acd202008141719598303.jpg',
}
}
if (funcItem.name === 1) {
funcOptionItem = {
'id': funcItem.orderId,
'mobile': funcItem.phone,
'name': funcItem.name,
'num': funcItem.quantity.match(/[0-9]+/)[0],
'subscribeDate': funcItem.date,
'time': App.modular.miment(funcItem.time).format('MM月DD日 hh:mm'),
'title': '看房预约',
'type': 1,
'url': 'http://upload.miaomiao-bao.com/36acd202008141719598303.jpg',
}
}
wx.navigateTo({
url: '/pages/mine/card/card'
url: '/pages/mine/appointment-ticket/appointment-ticket?detail=' + JSON.stringify(funcOptionItem)
})
},
/**
* 查看更多订单
* 客服中心
* @function
* @param
* @returns
*/
onMoreOrder: function () {
let isMoreOrder = !this.data.isMoreOrder
let orderList = `myOrder.artOrder.orderList`
if (isMoreOrder) {
// 展开
this.setData({
[orderList]: JSON.parse(JSON.stringify(this.data.orderListBackup)),
onService: function () {
if (this.onSignIn()) {
wx.navigateTo({
url: "/pages/mine/question/question",
})
}
},
// 登录注册页
onSignIn: function () {
if (this.data.userInfo.isSignIn) {
return true
} else {
// 收起
let list = JSON.parse(JSON.stringify(this.data.orderListBackup))
list.length = 1
this.setData({
[orderList]: list,
wx.navigateTo({
url: '/pages/login/login',
})
return false
}
},
//点击前往修改页面
onEditInfo: function () {
if (this.onSignIn()) {
wx.navigateTo({
url: '/pages/mine/info/info',
})
}
},
/**
* 查看更多订单
* @function
* @param
* @returns
*/
onMoreOrder: function () {
this.setData({
isMoreOrder,
isMoreOrder: !this.data.isMoreOrder
})
},
/**
* 查看更多预约
* 查看更多订单
* @function
* @param
* @returns
*/
onMoreActivity: function () {
let isMoreActivity = !this.data.isMoreActivity
if (isMoreActivity) {
//展开
this.setData({
activityList: JSON.parse(JSON.stringify(this.data.activityListBackup))
})
} else {
// 收起
let list = JSON.parse(JSON.stringify(this.data.activityListBackup))
let sliceList = list.slice(0, 2)
this.setData({
activityList: sliceList
})
}
onMoreAppointment: function () {
this.setData({
isMoreActivity,
isMoreAppointment: !this.data.isMoreAppointment
})
},
onToClub: function () {
wx.navigateTo({ url: '/pages/club/home/home' })
},
/**
......@@ -628,4 +714,20 @@ Page({
onPageScroll: function (funcEvent) {
App.pageScroll(funcEvent, this)
},
close() {
this.setData({
mask: false
});
wx.showTabBar({
animation: true,
})
},
// 去核销
goCouponInput(event) {
wx.navigateTo({
url: '/pages/pay/coupon-input/coupon-input?authInfo=' + JSON.stringify(this.data.authInfo),
})
},
})
\ No newline at end of file
......@@ -44,7 +44,7 @@
<text>业主认证</text>
<text>享受业主尊贵特权,预定消费专属优惠</text>
</view>
<view class="status-operation row cc ac" bindtap="goApprove">
<view class="status-operation row cc ac" bindtap="onAuthentication">
<image wx:if="{{statusText == '审核失败'}}" src="/image/fail-icon.png"></image>
<image wx:if="{{statusText == '审核中'}}" src="/image/sh-icon.png"></image>
<text>{{statusText}}</text>
......@@ -99,14 +99,14 @@
<view wx:if="{{appStatus}}" class="list-order card">
<view class="card-title row cb ac">
<text>我的订单</text>
<text bindtap="onOrder">查看全部</text>
<text bindtap="onOrderList">查看全部</text>
<image class="arrow-more" src="{{imageBase + 'icon/arrow-r-2.png'}}"></image>
</view>
<!-- 分类 tab -->
<view class="card-category row cb ac">
<block wx:for="{{orderCategory}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="card-category-item column cc ac" data-type="{{item.type}}" bindtap="goOrderByclass">
<view class="card-category-item column cc ac" data-type="{{item.type}}" bindtap="onOrderCategory">
<view class="card-item-quantity row cc ac" wx:if="{{item.quantity === 0 ? false : true}}">
<text>{{item.quantity}}</text>
</view>
......@@ -120,105 +120,159 @@
<!-- 订单卡片展示 -->
<view class="card-list">
<block wx:for="{{orderList}}" wx:for-item="item" wx:for-index="index" wx:key="index">
<!-- 电影样式 -->
<view class="card-list-item">
<view class="row ac">
<image src="{{resourcesBase + item.shopLogo}}"></image>
<!-- 年卡月卡 -->
<block wx:if="{{membershipCard.length > 0}}">
<view class="card-membership-more">
<view style="{{'background: ' + membershipCard[0].bgc + ';'}}"></view>
<view style="{{'background: ' + membershipCard[0].bgc + ';'}}"></view>
</view>
<view class="card-membership" bindtap="onMembership">
<image src="{{resourcesBase + membershipCard[0].bgi}}"></image>
<view class="card-membership-info column">
<view class="card-membership-info-shop row ac">
<view class="card-list-item-logo">
<image mode="aspectFill" src="{{resourcesBase + membershipCard[0].shopLogo}}"></image>
</view>
<text>{{membershipCard[0].shopName}}</text>
</view>
<view class="card-membership-info-date column">
<text>{{membershipCard[0].cardName}}</text>
<text>{{membershipCard[0].timeExpire}}</text>
</view>
<view class="card-membership-info-user column">
<text>{{membershipCard[0].userName}}</text>
<text>{{membershipCard[0].identity}}</text>
</view>
</view>
</view>
</block>
<block wx:for="{{isMoreOrder ? orderList : [orderList[0]]}}" wx:for-item="item" wx:for-index="index" wx:key="index">
<!-- 星空影院,元养水韵SPA,海错图展馆样式 -->
<view class="card-list-item" wx:if="{{item.cardStyle === 0}}" data-item="{{item}}" bindtap="onOrderDetail">
<view class="card-list-item-shop row ac">
<view class="card-list-item-logo">
<image mode="aspectFit" src="{{resourcesBase + item.shopLogo}}"></image>
</view>
<text>{{item.shopName}}</text>
</view>
<view class="row ac">
<image src="{{item.orderDetai[0].cover}}"></image>
<text>{{item.orderDetai[0].name}}</text>
<view class="card-list-item-commodity row ac">
<view class="card-list-item-cover">
<image mode="aspectFill" src="{{item.orderDetail[0].cover}}"></image>
</view>
<text>{{item.orderDetail[0].name}}</text>
</view>
<view class="row cb ac">
<text>有效期至</text>
<text>共1张门票</text>
<view class="card-list-item-tip row cb ac">
<text>{{item.tipDate}}</text>
<text>{{item.tipQuantity}}</text>
</view>
</view>
<!-- 海错图文创店,原味舒食,原野MOJITO,儿童营地样式 -->
<view class="card-list-item" wx:if="{{item.cardStyle === 1}}" data-item="{{item}}" bindtap="onOrderDetail">
<view class="card-list-item-shop row ac">
<view class="card-list-item-logo">
<image mode="aspectFit" src="{{resourcesBase + item.shopLogo}}"></image>
</view>
<text>{{item.shopName}}</text>
</view>
<view class="card-list-item-commodity row ac">
<block wx:for="{{item.orderDetail}}" wx:for-item="itemCover" wx:for-index="indexCover" wx:key="indexCover">
<view class="card-list-item-cover">
<image mode="aspectFill" src="{{itemCover.cover}}"></image>
</view>
</block>
</view>
<view class="card-list-item-tip row cb ac">
<text>{{item.tipDate}}</text>
<text>{{item.tipQuantity}}</text>
</view>
</view>
</block>
</view>
<!-- 展开更多 -->
<view class="order-more row cc ac">
<text>{{isOrderMore ? '收起' : '展开更多'}}</text>
<image class="arrow-more" src="{{isOrderMore ? imageBase + 'icon/arrow-t-2.png' : imageBase + 'icon/arrow-b-2.png'}}"></image>
<view class="order-more row cc ac" wx:if="{{orderList.length > 1}}" bindtap="onMoreOrder">
<text>{{isMoreOrder ? '收起' : '展开更多'}}</text>
<image class="arrow-more" src="{{isMoreOrder ? imageBase + 'icon/arrow-t-2.png' : imageBase + 'icon/arrow-b-2.png'}}"></image>
</view>
</view>
<!-- 我的预约 -->
<view class="list-activity">
<view class="order-activity">
<view class="order-activity-title-wrapper row con-b align-c">
<view class="order-activity-title row align-c">
<text>我的预约</text>
</view>
<view class="order-activity-all row align-c" bindtap="onAppointment">
<text>查看全部</text>
<image class="all-order-icon" src="{{imageBase + 'icon/arrow-r-2.png'}}"></image>
</view>
</view>
<!-- 预约分类icno -->
<view class="order-activity-icon-list row con-b">
<view class="order-activity-icon-wrapper col align-c" data-type='0' bindtap="goAppointment">
<view class="order-activity-icon row con-c align-c">
<image src="{{resourcesBase+'mine/home/yy_theme.png'}}"></image>
<view class="order-activity-badge {{ enrollSubscribeData.active > 9 ? 'badge-widen' : ''}}" wx:if="{{enrollSubscribeData.active}}">
{{enrollSubscribeData.active}}</view>
</view>
<text>主题活动</text>
</view>
<view class="order-activity-icon-wrapper col align-c" data-type='1' bindtap="goAppointment">
<view class="order-activity-icon row con-c align-c">
<image src="{{resourcesBase+'mine/home/yy_night.png'}}"></image>
<view class="order-activity-badge {{ enrollSubscribeData.garden > 9 ? 'badge-widen' : ''}}" wx:if="{{enrollSubscribeData.garden}}">
{{enrollSubscribeData.garden}}</view>
<view class="list-order card">
<view class="card-title row cb ac">
<text>我的预约</text>
<text data-type="0" bindtap="onAppointmentList">查看全部</text>
<image class="arrow-more" src="{{imageBase + 'icon/arrow-r-2.png'}}"></image>
</view>
<!-- 分类 tab -->
<view class="card-category row cb ac">
<block wx:for="{{appointmentCategory}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="card-category-item column cc ac" data-type="{{item.type}}" bindtap="onAppointmentList">
<view class="card-item-quantity row cc ac" wx:if="{{item.quantity === 0 ? false : true}}">
<text>{{item.quantity}}</text>
</view>
<text>夜间入园预约</text>
<view class="card-category-item-icon row cc ac">
<image src="{{item.icon}}"></image>
</view>
<text>{{item.name}}</text>
</view>
<view class="order-activity-icon-wrapper col align-c" data-type='2' bindtap="goAppointment">
<view class="order-activity-icon row con-c align-c">
<image src="{{resourcesBase+'mine/home/yy_house.png'}}"></image>
<view class="order-activity-badge {{ enrollSubscribeData.scanHouse > 9 ? 'badge-widen' : ''}}" wx:if="{{enrollSubscribeData.scanHouse}}">
{{enrollSubscribeData.scanHouse}}</view>
</block>
</view>
<!-- 预约卡片展示 -->
<view class="card-list">
<block wx:for="{{isMoreAppointment ? appointmentList : [appointmentList[0]]}}" wx:for-item="item" wx:for-index="index" wx:key="index">
<!-- 活动预约样式 -->
<view class="card-list-appointment row cb ac" wx:if="{{item.cardStyle === 0}}" data-type="0" bindtap="onAppointmentList">
<view class="card-list-item-date row cc ac">
<text>{{item.date}}</text>
</view>
<view class="card-list-item-cover">
<image mode="aspectFill" src="{{item.cover}}"></image>
</view>
<view class="column">
<text class="card-list-appointment-name">{{item.name}}</text>
<text class="card-list-appointment-tip">{{item.quantity}}</text>
</view>
<text>看房预约</text>
</view>
</view>
<!-- 预约卡片 -->
<view class="appointment">
<!-- 主题活动 -->
<view class="appointment-wrapper" wx:for="{{activityList}}" wx:key="{{index}}" wx:key="index" data-item="{{item}}" bindtap="onOrderDetail">
<view class="appointment-time">{{item.activeTime}}</view>
<view class="appointment-activity-content row">
<view class="appointment-activity-img">
<image src="{{item.cover}}"></image>
</view>
<view class="appointment-activity-info col con-a">
<view class="appointment-activity-title">
<text>{{item.name}}</text>
</view>
<view class="appointment-activity-num">
<text>报名人数 {{item.number}}人</text>
</view>
</view>
<!-- 夜间入园预约,看房预约 -->
<view class="card-list-appointment row cb ac" wx:if="{{item.cardStyle === 1}}" data-type="{{item.name === 0 ? '1' : '2'}}" bindtap="onAppointmentList">
<view class="card-list-item-date row cc ac">
<text>{{item.date}}</text>
</view>
<view class="column">
<text class="card-list-appointment-name">{{item.name === 0 ? '夜间入园预约' : '看房预约'}}</text>
<text class="card-list-appointment-tip">{{item.quantity}}</text>
</view>
<view class="card-list-item-operation">
<button class="row cc ac" data-item="{{item}}" catchtap="onAppointmentTicket">预约凭证</button>
</view>
</view>
</view>
<!-- more -->
<view class="more row align-c con-c" bindtap="onMoreActivity" wx:if="{{activityListBackup.length>2}}">
<text wx:if="{{!isMoreActivity}}">展开更多</text>
<text wx:else>收起</text>
<image wx:if="{{!isMoreActivity}}" src="{{imageBase + 'icon/arrow-b-2.png'}}"></image>
<image wx:else src="{{imageBase + 'up.png'}}"></image>
</view>
</block>
</view>
<!-- 展开更多 -->
<view class="order-more row cc ac" wx:if="{{appointmentList.length > 1}}" bindtap="onMoreAppointment">
<text>{{isMoreAppointment ? '收起' : '展开更多'}}</text>
<image class="arrow-more" src="{{isMoreAppointment ? imageBase + 'icon/arrow-t-2.png' : imageBase + 'icon/arrow-b-2.png'}}"></image>
</view>
</view>
<!-- 我的俱乐部 -->
<!--
<view class="club row con-b align-c" bindtap="onToClub">
<text>我的俱乐部</text>
<image class="icon" src="{{imageBase + 'icon/arrow-r-2.png'}}"></image>
</view>
-->
<!-- 客服中心 -->
<view class="service row con-b align-c" bindtap="goQuestion">
<view class="service row con-b align-c" bindtap="onService">
<text>客服中心</text>
<image src="{{imageBase + 'icon/arrow-r-2.png'}}"></image>
<image class="icon" src="{{imageBase + 'icon/arrow-r-2.png'}}"></image>
</view>
</view>
......
......@@ -236,7 +236,7 @@ page {
right: 0;
min-width: 32rpx;
max-width: 48rpx;
padding: 0 14rpx;
padding: 0 4rpx;
height: 32rpx;
border-radius: 16rpx;
background: #E66060;
......@@ -267,14 +267,222 @@ page {
height: 48rpx;
}
/* 年卡月卡 */
.card-membership-more {
position: relative;
width: 606rpx;
height: 32rpx;
margin: 72rpx 0 0 0;
}
.card-membership-more > view:nth-child(1) {
position: absolute;
top: 16rpx;
left: 16rpx;
width: 574rpx;
height: 16rpx;
border-radius: 4px 4px 0 0;
opacity: .6;
}
.card-membership-more > view:nth-child(2) {
position: absolute;
top: 0;
left: 32rpx;
width: 542rpx;
height: 32rpx;
border-radius: 4px 4px 0 0;
opacity: .3;
}
.card-membership {
position: relative;
width: 606rpx;
height: 338rpx;
border-radius: 4px;
}
.card-membership > image {
z-index: 0;
position: absolute;
top: 0;
left: 0;
width: 606rpx;
height: 338rpx;
}
.card-membership-info {
padding: 26rpx 32rpx 0 32rpx;
}
.card-membership-info text {
z-index: 2;
}
.card-membership-info-shop > text {
height: 36rpx;
font-size: 26rpx;
font-weight: 500;
line-height: 36rpx;
color: #FFFFFF;
}
.card-membership-info-date > text:nth-child(1) {
height: 58rpx;
margin: 24rpx 0 0 0;
font-size: 42rpx;
font-weight: 600;
line-height: 58rpx;
color: #FFFFFF;
}
.card-membership-info-date > text:nth-child(2) {
height: 36rpx;
margin: 8rpx 0 0 0;
font-size: 26rpx;
font-weight: 400;
line-height: 36rpx;
color: #FFFFFF;
}
.card-membership-info-user > text:nth-child(1) {
height: 32rpx;
margin: 32rpx 0 0 0;
font-size: 22rpx;
font-weight: 400;
line-height: 32rpx;
color: #FFFFFF;
}
.card-membership-info-user > text:nth-child(2) {
height: 32rpx;
margin: 8rpx 0 0 0;
font-size: 22rpx;
font-weight: 400;
line-height: 32rpx;
color: #FFFFFF;
}
/* 卡片列表样式 */
.card-list-item {
width: 606rpx;
height: 328rpx;
margin-top: 24rpx;
padding: 20rpx 32rpx 32rpx 32rpx;
border-radius: 4px;
background: #F5F6F8;
}
.card-list-item-shop > text {
height: 36rpx;
font-size: 26rpx;
font-weight: 400;
line-height: 36rpx;
color: #15191F;
}
.card-list-item-commodity {
margin: 20rpx 0 0 0;
}
.card-list-item-commodity > text {
height: 42rpx;
font-size: 30rpx;
font-weight: 800;
line-height: 42rpx;
color: #15191F;
}
.card-list-item-tip {
margin: 24rpx 0 0 0;
}
.card-list-item-tip > text {
height: 36rpx;
font-size: 26rpx;
font-weight: 400;
line-height: 36rpx;
color: #959DA9;
}
.card-list-item-logo {
z-index: 2;
width: 75rpx;
height: 60rpx;
margin-right: 20rpx;
}
.card-list-item-logo > image {
z-index: 2;
max-width: 100%;
max-height: 100%;
}
.card-list-item-cover {
width: 140rpx;
height: 136rpx;
margin: 0 32rpx 0 0;
}
.card-list-item-cover > image {
max-width: 100%;
max-height: 100%;
}
.card-list-item-date {
position: absolute;
top: -28rpx;
left: 0;
height: 56rpx;
padding: 0 24rpx;
border-radius: 4px;
background: #000000;
font-size: 26rpx;
font-weight: 800;
line-height: 36rpx;
color: #FFFFFF;
}
/* 活动预约 */
.card-list-appointment {
position: relative;
width: 606rpx;
height: 248rpx;
margin-top: 64rpx;
padding: 54rpx 32rpx 32rpx 32rpx;
border-radius: 4px;
background: #F5F6F8;
border: 1px red solid;
}
.card-list-appointment-name {
height: 42rpx;
font-size: 30rpx;
font-weight: 800;
line-height: 42rpx;
color: #15191F;
}
.card-list-appointment-tip {
height: 36rpx;
margin: 16rpx 0 0 0;
font-size: 26rpx;
font-weight: 400;
line-height: 36rpx;
color: #959DA9;
}
.card-list-item-operation > button {
width: 150rpx;
height: 68rpx;
border-radius: 2px;
border: 1px solid #15191F;
font-size: 25rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 800;
line-height: 68rpx;
color: #15191F;
}
/* 更多,收起 */
......@@ -700,6 +908,7 @@ page {
margin-left: 8rpx;
}
.club,
.service {
width: 670rpx;
height: 128rpx;
......@@ -709,27 +918,18 @@ page {
border-radius: 4rpx;
}
.club text,
.service text {
font-size: 34rpx;
color: #15191f;
font-weight: 600;
}
.service image {
width: 32rpx;
height: 32rpx;
}
.all-order-icon {
width: 32rpx;
height: 32rpx;
}
image {
width: 100%;
height: 100%;
}
.logo-box {
width: 64rpx;
height: 50rpx;
......
......@@ -126,7 +126,7 @@ Page({
birthday: this.data.userInfo.birthday,
}
App.wxRequest({
url: '/api/v1/smUser/doUpdateInfo',
url: 'v1/smUser/doUpdateInfo',
data: param,
success: (res) => {
let funcUserInfo = wx.getStorageSync('userInfo')
......
......@@ -36,12 +36,15 @@ Page({
isFinished: false,
optionsGoodType: ''
},
onLoad: function (options) {
this.setData({
option: options,
optionsGoodType: options.goodType != undefined ? 1 * options.goodType : ''
})
this.setNavTop()
},
onShow: function () {
this.setData({
orderPages: 1,
......@@ -50,6 +53,14 @@ Page({
})
this.setOrderType()
},
setNavTop: function () {
let funcStatusHeight = wx.getStorageSync('navStatusHeight')
let funcTitleHeight = wx.getStorageSync('navTitleHeight')
// 这个数值需要和 css 中的高度同步。
let funcCategoryHeight = 176
},
refresh: function () {
this.setOrderType()
},
......@@ -71,7 +82,7 @@ Page({
isLoading: true
})
App.wxRequest({
url: '/api/v1/order/getOrderList',
url: 'v1/order/getOrderList',
data: {
'goodType': this.data.orderTypeActive ? this.data.orderType[this.data.orderTypeActive].value : '',
'status': this.data.statusList[this.data.statusActive].value,
......@@ -164,7 +175,7 @@ Page({
setOrderType: function () {
let that = this;
App.wxRequest({
url: '/api/v1/common/getDictByType',
url: 'v1/common/getDictByType',
data: {
'type': 'order_good_type',
},
......@@ -342,7 +353,7 @@ Page({
})
let funcItem = event.target.dataset.item
App.wxRequest({
url: '/api/v1/order/cancelOrder',
url: 'v1/order/cancelOrder',
data: {
'orderId': funcItem.id,
'type': 0,
......@@ -389,7 +400,7 @@ Page({
})
let funcItem = event.target.dataset.item
App.wxRequest({
url: '/api/v1/order/cancelOrder',
url: 'v1/order/cancelOrder',
data: {
'orderId': funcItem.id,
'type': 1,
......
......@@ -48,7 +48,7 @@ Page({
// 常见问题
getCommonProblem: function (type) {
App.wxRequest({
url: '/api/v1/smCommonProblem/getList',
url: 'v1/smCommonProblem/getList',
data: {
type: type, // 1 入住 2门票 3 服务
top: '',
......
......@@ -175,7 +175,7 @@ Page({
'duration': 60000
})
App.wxRequest({
url: '/api/v1/smFeedback/doFeedBack',
url: 'v1/smFeedback/doFeedBack',
data: {
content: that.data.remark
},
......@@ -203,7 +203,7 @@ Page({
getCommonProblem() {
let that = this
App.wxRequest({
url: '/api/v1/smCommonProblem/getList',
url: 'v1/smCommonProblem/getList',
data: {
type: '',
top: 1,
......
......@@ -75,7 +75,7 @@ Page({
})
App.wxRequest({
url: '/api/v1/volume/doVolume',
url: 'v1/volume/doVolume',
data: {
volumeId: this.data.couponDetail.volumeId,
},
......
......@@ -56,7 +56,7 @@ Page({
duration: 60000
})
App.wxRequest({
url: '/api/v1/volume/getVolumeDetails',
url: 'v1/volume/getVolumeDetails',
data: {
serialNumber: couponCode,
},
......
......@@ -43,7 +43,7 @@ Page({
queryOrderDetail: function () {
let that = this
App.wxRequest({
url: '/api/v1/order/getOrderDetail',
url: 'v1/order/getOrderDetail',
data: {
'orderId': this.data.orderInfo.orderId
},
......@@ -220,7 +220,7 @@ Page({
mask: true
})
wx.uploadFile({
url: App.globalData.baseUrl + '/api/v1/common/upload',
url: App.globalData.baseUrl + 'v1/common/upload',
filePath: urlArr[i],
name: 'file',
header: {
......@@ -298,7 +298,7 @@ Page({
duration: 60000
})
App.wxRequest({
url: '/api/v1/order/doAppraise',
url: 'v1/order/doAppraise',
data: {
'orderId': formData.orderId,
'imgUrls': formData.imgUrls,
......
......@@ -141,7 +141,7 @@ Page({
isDoing: true,
})
App.wxRequest({
url: '/api/v1/order/cancelOrder',
url: 'v1/order/cancelOrder',
data: {
'orderId': this.data.orderInfo.id,
'type': type,
......@@ -191,7 +191,7 @@ Page({
duration: 60000,
})
App.wxRequest({
url: '/api/v1/order/getVolumesByOrderId',
url: 'v1/order/getVolumesByOrderId',
data: {
'orderId': this.data.orderInfo.id
},
......@@ -227,7 +227,7 @@ Page({
queryOrderDetail: function () {
console.log('queryOrderDetail')
App.wxRequest({
url: '/api/v1/order/getOrderDetail',
url: 'v1/order/getOrderDetail',
data: {
'orderId': this.data.orderInfo.id
},
......@@ -335,7 +335,7 @@ Page({
duration: 60000,
})
App.wxRequest({
url: '/api/v1/volume/getVolume',
url: 'v1/volume/getVolume',
data: {
'volumeId': funcOrderInfo.codeId
},
......
......@@ -305,7 +305,7 @@ Page({
}
}
App.wxRequest({
url: '/api/v1/park/getDetail',
url: 'v1/park/getDetail',
data: {
'id': funcPointId
},
......@@ -385,7 +385,6 @@ Page({
funcRegisterInfo[funcIndex].remarks = funcValue
funcRegisterInfo[funcIndex].errorRemarks = funcMessage
break
}
this.setData({
......@@ -402,7 +401,7 @@ Page({
setEntryTime: function (funcEntryId) {
let funcItem = wx.getStorageSync('shoppingCartBuffer')[0]
App.wxRequest({
url: '/api/v1/activity/getEnrollView',
url: 'v1/activity/getEnrollView',
data: {
'id': funcItem.id,
},
......@@ -559,7 +558,7 @@ Page({
let funcItem = this.data.shoppingCartList[0]
App.wxRequest({
url: '/api/v1/commodity/getCommodityParticulars',
url: 'v1/commodity/getCommodityParticulars',
data: {
'commodityId': funcItem.id,
'classifyId': funcItem.typeId,
......@@ -672,7 +671,7 @@ Page({
case 6:
case 7:
App.wxRequest({
url: '/api/v1/activity/getDetail',
url: 'v1/activity/getDetail',
data: { 'id': this.data.shoppingCartList[0].id },
success: (response) => {
let funcResponse = response.data
......@@ -690,7 +689,7 @@ Page({
default:
App.wxRequest({
url: '/api/v1/commodity/getNotification',
url: 'v1/commodity/getNotification',
data: {
'notificationId': this.data.shoppingCartList[0].notificationId
},
......@@ -941,7 +940,7 @@ Page({
// 发送下单请求
App.wxRequest({
url: '/api/v1/order/doOrder',
url: 'v1/order/doOrder',
data: {
'isPayment': Number(this.data.payAmount) === 0 ? 0 : 2,
'totalMoney': Number(this.data.payAmount),
......@@ -1064,7 +1063,7 @@ Page({
*/
paySubmitActivity: function () {
App.wxRequest({
url: '/api/v1/activity/doActivityEnroll',
url: 'v1/activity/doActivityEnroll',
data: {
'activityId': this.data.shoppingCartList[0].id,
'activityTimesId': this.data.entryId,
......@@ -1168,7 +1167,7 @@ Page({
App.globalData.payStateTimer = setInterval(() => {
if (!pagePayId) return
App.wxRequest({
url: '/api/v1/order/getOrderStatus',
url: 'v1/order/getOrderStatus',
data: {
'orderId': pagePayId
},
......
......@@ -26,7 +26,7 @@ Page({
//主题活动详情
queryActivityDetail: function () {
App.wxRequest({
url: '/api/v1/activity/getDetail',
url: 'v1/activity/getDetail',
data: { id: this.data.id },
success: (response) => {
let funcResponse = response.data
......
......@@ -3,7 +3,7 @@ Page({
data: {
imageBase: App.globalData.appImageBase,
tabItem: [],
tabItem: [{ text: '全部', value: 0 }],
tabTop: 0,
tabClass: '',
......@@ -26,7 +26,7 @@ Page({
})
}
this.queryTab()
// this.queryTab()
this.queryActivityLately()
this.queryActivityExpire()
},
......@@ -82,7 +82,13 @@ Page({
'priceSpecial': funcData[i].ownerPrice, // 业主价
'priceSpecialText': App.modular.utils.formatAmount(funcData[i].ownerPrice), // 业主价文本格式
'priceType': 1,
'isCanEenroll': false,
}
// 判断活动是否已经开始,能否报名。
let funcActiveDateStart = new Date().getFullYear() + '年' + funcData[i].activeDate.match(/[\w月日]+/g)[0]
if (App.modular.miment(funcActiveDateStart).stamp() < App.modular.miment().stamp()) funcItem.isCanEenroll = true
funcList.push(funcItem)
}
funcList = App.setPriceType(funcList)
......
......@@ -41,7 +41,8 @@
<text>{{item.price == '0' ? '免费' : item.priceText}}</text>
</view>
<view>
<button class="row con-c align-c" catchtap="onReport" data-item="{{item}}">报名</button>
<button wx:if="{{!isCanEenroll}}" class="row con-c align-c">未开始</button>
<button wx:if="{{isCanEenroll}}" class="row con-c align-c" catchtap="onReport" data-item="{{item}}">报名</button>
</view>
</view>
</view>
......
......@@ -9,6 +9,8 @@ Page({
imageBase: App.globalData.appImageBase,
resourcesBase: App.globalData.appResourcesBase,
clubList: [],
strategy: [],
strategyList: [],
strategyOriginList: [],
......@@ -25,10 +27,6 @@ Page({
movieList: [],
swiperMovieCurrent: 0,
touristRouteList: [],
},
......@@ -53,7 +51,7 @@ Page({
*/
queryActivity: function () {
App.wxRequest({
url: '/api/v1/activity/getList',
url: 'v1/activity/getList',
data: {
listType: 1,
pageSize: 10,
......@@ -89,7 +87,7 @@ Page({
*/
queryMovie: function () {
App.wxRequest({
url: '/api/v1/film/getAllFilm',
url: 'v1/film/getAllFilm',
data: {
'pageNo': '1',
'pageSize': '-1',
......@@ -218,6 +216,10 @@ Page({
})
},
onToClubList: function () {
wx.navigateTo({ url: '/pages/club/home/home' })
},
/**
* 查询游客攻略
* @function
......@@ -226,7 +228,7 @@ Page({
*/
routeList: function () {
App.wxRequest({
url: '/api/v1/strategy/getList',
url: 'v1/strategy/getList',
data: {
'pageSize': this.data.pageSize + '',
'pageNo': this.data.pageNo + ''
......
......@@ -89,6 +89,31 @@
</view>
</block>
<!-- 俱乐部 -->
<!--
<view class="title row con-b align-c">
<image src="./image/title-club.png"></image>
<text bindtap="onAllRecent" bindtap="onToClubList">查看全部</text>
</view>
<view class="club-list">
<block wx:for="{{activityList}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="club-item row cc" data-item="{{item}}" bindtap="onActivityDetail">
<view class="club-item-info column ac">
<image src="{{item.cover}}"></image>
<text class="club-item-info-name">音乐剧话剧俱乐部</text>
<text class="club-item-info-owner owner-mark">业主专享</text>
</view>
</view>
</block>
</view>
<block wx:if="{{activityList.length === 0}}">
<view class="item-nothing col con-c align-c">
<image class="nothing-activity" src="{{imageBase + 'icon/fireworks-2.png'}}"></image>
<text>暂无俱乐部信息</text>
</view>
</block>
-->
<!-- 游客攻略 -->
<view class="route">
<block wx:if="{{touristRouteList.length > 0}}">
......
......@@ -212,7 +212,6 @@
color: #656e7b;
overflow: hidden;
white-space:nowrap;
overflow:hidden;
text-overflow:ellipsis;
}
......@@ -229,6 +228,57 @@
border-radius: 4rpx;
}
/* 俱乐部 */
.club-list {
width: 710rpx;
height: 440rpx;
margin: 48rpx 0 0 40rpx;
white-space: nowrap;
overflow-x: scroll;
}
.club-item {
display: inline-block;
position: relative;
width: 480rpx;
height: 440rpx;
margin: 0 24rpx 0 0;
padding: 34rpx 0 0 0;
}
.club-item-info {
width: 480rpx;
height: 406rpx;
border-radius: 4px;
background: #F5F6F8;
}
.club-item-info > image {
position: relative;
top: -34rpx;
width: 400rpx;
height: 320rpx;
border-radius: 4px;
background: #999999;
}
.club-item-info-name {
height: 44rpx;
font-size: 30rpx;
font-weight: 800;
line-height: 44rpx;
color: #15191F;
}
.club-item-info-owner {
position: absolute;
top: 20rpx;
left: 320rpx;
width: 96rpx;
height: 32rpx;
}
/* 游客攻略 */
.route {
width: 750rpx;
......
......@@ -46,7 +46,7 @@ Page({
// 获取电影详情场次
queryDetail: function (activityId) {
App.wxRequest({
url: '/api/v1/film/getFilmDetail',
url: 'v1/film/getFilmDetail',
data: {
'activityId': activityId,
},
......
......@@ -115,7 +115,7 @@ Page({
}
})
App.wxRequest({
url: '/api/v1/film/getTodayFilm',
url: 'v1/film/getTodayFilm',
data: {
'pageNo': this.data.queryParams.pageNo,
'pageSize': this.data.queryParams.pageSize,
......@@ -197,7 +197,7 @@ Page({
let movieNextWeek = []
//本周热映
App.wxRequest({
url: '/api/v1/film/getAllFilm',
url: 'v1/film/getAllFilm',
data: {
'pageNo': this.data.queryParams.pageNo,
'pageSize': this.data.queryParams.pageSize,
......@@ -262,7 +262,7 @@ Page({
}
})
App.wxRequest({
url: '/api/v1/film/getAllFilm',
url: 'v1/film/getAllFilm',
data: {
'pageNo': this.data.queryParams.pageNo,
'pageSize': this.data.queryParams.pageSize,
......
......@@ -295,7 +295,7 @@ Page({
// 查询景点信息
App.wxRequest({
url: '/api/v1/park/getList',
url: 'v1/park/getList',
success: (res) => {
let funcData = res.list
funcDetail.forEach(shop => {
......@@ -360,7 +360,7 @@ Page({
*/
queryActivity: function() {
App.wxRequest({
url: '/api/v1/activity/getList',
url: 'v1/activity/getList',
data: {
'listType': 1,
'pageSize': 10,
......@@ -386,6 +386,7 @@ Page({
'date': funcResponse[i].activeDate + ' ' + funcResponse[i].activeTime, // 活动时间
'priceType': 1,
}
let funcUserType = wx.getStorageSync('userInfo').userType
// 根据后台判断价格显示类型
// 活动价优先级最高,如果存在活动价,则只显示活动价和普通价
......@@ -420,7 +421,7 @@ Page({
*/
queryCommodity: function() {
App.wxRequest({
url: '/api/v1/commodity/recommend',
url: 'v1/commodity/recommend',
data: {
'officeId': this.data.shopInfo.id,
'genre': this.data.shopInfo.shopType,
......@@ -481,7 +482,7 @@ Page({
*/
queryMovie: function() {
App.wxRequest({
url: '/api/v1/film/getAllFilm',
url: 'v1/film/getAllFilm',
data: {
'weekType': 0,
'pageSize': 10,
......@@ -534,7 +535,7 @@ Page({
*/
getAppraise: function() {
App.wxRequest({
url: '/api/v1/appraise/getList',
url: 'v1/appraise/getList',
data: {
'pageNo': '1',
'pageSize': '-1',
......@@ -862,7 +863,7 @@ Page({
let that = this
let officeId = wx.getStorageSync('shopInfoBuffer').id
App.wxRequest({
url: '/api/v1/appraise/getOfficeAppraise',
url: 'v1/appraise/getOfficeAppraise',
data: {
'officeId': officeId
},
......
......@@ -39,7 +39,7 @@ Page({
queryCommodityDetail: function () {
let funcCommodity = wx.getStorageSync('shoppingCartBuffer')[0]
App.wxRequest({
url: '/api/v1/commodity/getCommodityParticulars',
url: 'v1/commodity/getCommodityParticulars',
data: {
'commodityId': funcCommodity.id,
'genre': funcCommodity.typeId,
......
......@@ -89,7 +89,7 @@ Page({
},
]
App.wxRequest({
url: '/api/v1/park/getList',
url: 'v1/park/getList',
success: function(res) {
let funcData = res.list
response.forEach(res => {
......
......@@ -41,7 +41,7 @@ Page({
*/
queryTouristRouteDetail() {
App.wxRequest({
url: '/api/v1/strategy/getDetail',
url: 'v1/strategy/getDetail',
data: { id: this.data.id },
success: (res) => {
// 此代码段处理目的为,匹配富文本代码中的 <img> 标签,并将其图片的宽度修改为适应屏幕
......@@ -78,7 +78,7 @@ Page({
}
App.wxRequest({
url: '/api/v1/park/getParksByParkIds',
url: 'v1/park/getParksByParkIds',
data: { smParkIds: parkIds },
success: (response) => {
let funcResponse = response.data
......
const output = {
// 测试环境
baseUrl: 'https://sm-web2.meiqicloud.com/api/',
// 正式环境
// baseUrl: 'https://xsslc.cndrealty.com/',
}
export default output
\ No newline at end of file
const output = {
// 测试环境
baseUrl: 'https://sm-web2.meiqicloud.com/api/',
// 正式环境
// baseUrl: 'https://xsslc.cndrealty.com/',
......
let Output = {
/**
* 必填验证
* @function
* @param {string} value
* @returns {string}
*/
'required': function (value) {
let funMessage = ''
if (value === '') {
funMessage = '不能为空'
}
return funMessage
},
/**
* 姓名校验
* @function
* @param {string} value
......
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