Commit bc436867 by 严立

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

parent 265199e6
Showing with 789 additions and 168 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
},
......
......@@ -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