Commit f4f8bf07 by 汪睦雄

修改玩皮研学文案

parent a32a0a1d
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
], ],
"plugins": { "plugins": {
"live-player-plugin": { "live-player-plugin": {
"version": "1.1.0", "version": "1.2.0",
"provider": "wx2b03c6e691cd7370" "provider": "wx2b03c6e691cd7370"
} }
} }
......
// components/navs/index.js // components/navs/index.js
import Config from '../../utils/Config.js' import Config from '../../utils/Config.js'
Page({ import api from '../../utils/Api.js'
Component({
/** /**
* 页面的初始数据 * 组件的属性列表
*/ */
data: { properties: {
}, },
/** /**
* 生命周期函数--监听页面加载 * 页面的初始数据
*/ */
onLoad: function(options) { data: {
audit: 0
}, },
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function() {
},
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow: function() { methods: {
// 分类点击
}, catalogClick: function(event) {
let _catalog = event.currentTarget.dataset.catalog
/** let _ptitle = event.currentTarget.dataset.name
* 生命周期函数--监听页面隐藏 wx.navigateTo({
*/ url: '/pages/search/list/list?catalog=' + _catalog + '&ptitle=' + _ptitle,
onHide: function() { })
},
},
// 商家合作
/** gotoShopJoin: function(event) {
* 生命周期函数--监听页面卸载 wx.navigateTo({
*/ url: '/pages/webview/index?url=' + Config.shopJoinPath + '&t=商家合作',
onUnload: function() { })
},
// 获取个人资料
getAudit: function(callback) {
api.setting.audit().then(res => {
// 渲染数据
console.log(111, res)
this.setData({
audit: res.data
})
typeof callback == "function" && callback()
})
}
}, },
/** /*组件生命周期*/
* 页面相关事件处理函数--监听用户下拉动作 lifetimes: {
*/ created() {
onPullDownRefresh: function() { this.getAudit()
},
}, attached() {
console.log("在组件实例进入页面节点树时执行")
/** },
* 页面上拉触底事件的处理函数 ready() {
*/ console.log("在组件在视图层布局完成后执行")
onReachBottom: function() { },
moved() {
}, console.log("在组件实例被移动到节点树另一个位置时执行")
},
/** detached() {
* 用户点击右上角分享 console.log("在组件实例被从页面节点树移除时执行")
*/ },
onShareAppMessage: function() { error() {
console.log("每当组件方法抛出错误时执行")
}, },
/*组件所在页面的生命周期 */
// 分类点击 pageLifetimes: {
catalogClick: function(event) { show: function() {
let _catalog = event.currentTarget.dataset.catalog // 页面被展示
let _ptitle = event.currentTarget.dataset.name console.log("页面被展示")
wx.navigateTo({ },
url: '/pages/search/list/list?catalog=' + _catalog + '&ptitle=' + _ptitle, hide: function() {
}) // 页面被隐藏
}, console.log("页面被隐藏")
},
// 美行攻略 resize: function(size) {
// gotoGuides: function(event) { // 页面尺寸变化
// wx.navigateTo({ console.log("页面尺寸变化")
// url: '/pages/guide/index', }
// }) }
// },
// 商家合作
gotoShopJoin: function(event) {
wx.navigateTo({
url: '/pages/webview/index?url=' + Config.shopJoinPath + '&t=商家合作',
})
} }
}) })
\ No newline at end of file
...@@ -27,11 +27,11 @@ ...@@ -27,11 +27,11 @@
</i-grid-item> </i-grid-item>
</i-grid> </i-grid>
<i-grid i-class="nav-grid"> <i-grid i-class="nav-grid">
<i-grid-item i-class="nav-grid-item" catchtap='catalogClick' data-catalog='7' data-name='水果零食'> <i-grid-item i-class="nav-grid-item" catchtap='catalogClick' data-catalog='7' data-name='玩皮研学'>
<i-grid-icon i-class="nav-icon"> <i-grid-icon i-class="nav-icon">
<image src="/images/navs/icon_nav_5.png" /> <image src="/images/navs/icon_nav_5.png" />
</i-grid-icon> </i-grid-icon>
<i-grid-label i-class="nav-label">水果零食</i-grid-label> <i-grid-label i-class="nav-label">玩皮研学</i-grid-label>
</i-grid-item> </i-grid-item>
<i-grid-item i-class="nav-grid-item" catchtap='catalogClick' data-name='房券专区'> <i-grid-item i-class="nav-grid-item" catchtap='catalogClick' data-name='房券专区'>
<i-grid-icon i-class="nav-icon"> <i-grid-icon i-class="nav-icon">
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
</i-grid-icon> </i-grid-icon>
<i-grid-label i-class="nav-label">儿童教育</i-grid-label> <i-grid-label i-class="nav-label">儿童教育</i-grid-label>
</i-grid-item> </i-grid-item>
<i-grid-item i-class="nav-grid-item" catchtap='gotoShopJoin'> <i-grid-item i-class="nav-grid-item" catchtap='gotoShopJoin' wx-if="{{audit!=1}}">
<i-grid-icon i-class="nav-icon"> <i-grid-icon i-class="nav-icon">
<image src="/images/navs/icon_nav_8.png" /> <image src="/images/navs/icon_nav_8.png" />
</i-grid-icon> </i-grid-icon>
......
...@@ -139,6 +139,7 @@ Page({ ...@@ -139,6 +139,7 @@ Page({
getHomeData: function(callback) { getHomeData: function(callback) {
api.home.all().then(res => { api.home.all().then(res => {
console.log('房券专区', res.data.heatProjects)
this.setData({ this.setData({
news: res.data.newProjects, news: res.data.newProjects,
tuans: res.data.tuans, // 超值团购 - 分类7-水果零食 tuans: res.data.tuans, // 超值团购 - 分类7-水果零食
......
...@@ -26,8 +26,8 @@ ...@@ -26,8 +26,8 @@
</i-cell-group> </i-cell-group>
<i-cell-group i-class="section-wrapper"> <i-cell-group i-class="section-wrapper">
<i-cell title="超值团购" is-link i-class="text-mtitle"> <i-cell title="玩皮研学" is-link i-class="text-mtitle">
<text slot="footer" class='text-gray text-small' catchtap='gotoMoreTuans' data-type='1' data-name='超值团购'>更多</text> <text slot="footer" class='text-gray text-small' catchtap='gotoMoreTuans' data-type='1' data-name='玩皮研学'>更多</text>
</i-cell> </i-cell>
<i-row i-class="col-wrapper"> <i-row i-class="col-wrapper">
<i-col span="8" i-class="col-class" wx:for="{{tuans}}" wx:for-index="idx" wx:for-item="n" wx:key="n.id" wx:if="{{idx < 6}}"> <i-col span="8" i-class="col-class" wx:for="{{tuans}}" wx:for-index="idx" wx:for-item="n" wx:key="n.id" wx:if="{{idx < 6}}">
......
...@@ -16,15 +16,16 @@ Page({ ...@@ -16,15 +16,16 @@ Page({
vip_price: 49.9, vip_price: 49.9,
order: {}, order: {},
user: {}, user: {},
phone:'', phone: '',
formPhone:'', formPhone: '',
name: '', name: '',
address: '', address: '',
wx_number: '', wx_number: '',
sessionId: '', sessionId: '',
visible: false, visible: false,
errMsg: false, errMsg: false,
errMessage:'' errMessage: '',
platform: 'pc'
}, },
handleChange1({ handleChange1({
...@@ -73,18 +74,53 @@ Page({ ...@@ -73,18 +74,53 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function(options) { onLoad: function(options) {
this.getPlatform()
this.getUserInfo() this.getUserInfo()
this.getVipPrice() this.getVipPrice()
// 获取session id // 获取session id
let that = this let that = this
this.getSessionKey(function (sid) { this.getSessionKey(function(sid) {
that.setData({ that.setData({
sessionId: sid sessionId: sid
}) })
}) })
}, },
getPlatform: function() {
var that = this;
wx.getSystemInfo({
success: function(res) {
if (res.platform == "devtools") {
that.setData({
platform: 'pc',
})
} else if (res.platform == "ios") {
that.setData({
platform: 'ios',
})
} else if (res.platform == "android") {
that.setData({
platform: 'android',
})
}
}
})
},
makeClipboard: function (e){
console.log(122222)
wx.setClipboardData({
data: '13120365050',
success: function (res) {
wx.showToast({
title: '复制成功',
})
}
})
console.log(2111111)
},
// 获取个人资料 // 获取个人资料
getUserInfo: function() { getUserInfo: function() {
api.me.info().then(res => { api.me.info().then(res => {
...@@ -109,7 +145,7 @@ Page({ ...@@ -109,7 +145,7 @@ Page({
let that = this let that = this
// 检查session key是否过期,如果过期的话,那么就获取新的再请求,否则直接请求 // 检查session key是否过期,如果过期的话,那么就获取新的再请求,否则直接请求
wx.checkSession({ wx.checkSession({
success: function (res) { success: function(res) {
//session_key未过期,直接操作 //session_key未过期,直接操作
let sessionId = that.data.sessionId let sessionId = that.data.sessionId
api.getPhoneNumber({ api.getPhoneNumber({
...@@ -136,12 +172,12 @@ Page({ ...@@ -136,12 +172,12 @@ Page({
} }
}) })
}, },
fail: function () { fail: function() {
// session_key 已过期,进行登录操作,提示错误 // session_key 已过期,进行登录操作,提示错误
// 获取session id // 获取session id
console.log('checkSession fail!') console.log('checkSession fail!')
let that = this let that = this
this.getSessionKey(function (sid) { this.getSessionKey(function(sid) {
that.setData({ that.setData({
sessionId: sid sessionId: sid
}) })
...@@ -280,7 +316,7 @@ Page({ ...@@ -280,7 +316,7 @@ Page({
name: name, name: name,
address: address address: address
} }
wx.showNavigationBarLoading() wx.showNavigationBarLoading()
wx.showLoading({ wx.showLoading({
title: '加载中...', title: '加载中...',
...@@ -376,7 +412,7 @@ Page({ ...@@ -376,7 +412,7 @@ Page({
'errMsg': true, 'errMsg': true,
'errMessage': '*' + res.msg 'errMessage': '*' + res.msg
}) })
} }
}) })
...@@ -400,7 +436,7 @@ Page({ ...@@ -400,7 +436,7 @@ Page({
}) })
}, },
handlePhone: function (event) { handlePhone: function(event) {
this.setData({ this.setData({
formPhone: event.detail.detail.value formPhone: event.detail.detail.value
}) })
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
<view class='vip_intro'> <view class='vip_intro'>
会员卡说明:用户购买一次会员卡后,增加一年的会员时限,多次购买则在先有的基础上延长时间,单次以1年为标准,已购卡会员请添加美行客服微信(mxkf00),邀请进会员群。 会员卡说明:用户购买一次会员卡后,增加一年的会员时限,多次购买则在先有的基础上延长时间,单次以1年为标准,已购卡会员请添加美行客服微信(mxkf00),邀请进会员群。
<view style="color:#2BA3D7;" wx-if="{{platform=='ios'}}">iOS苹果用户请联系客服微信:<text bindtap='makeClipboard'>13120365050(点击复制)</text></view>
</view> </view>
<!-- 用户输入的信息 --> <!-- 用户输入的信息 -->
...@@ -36,19 +37,22 @@ ...@@ -36,19 +37,22 @@
<i-input bindchange="handleAddress" value="{{ user.address }}" right="true" type="text" title="地址" placeholder="请输入地址" maxlength="50" /> <i-input bindchange="handleAddress" value="{{ user.address }}" right="true" type="text" title="地址" placeholder="请输入地址" maxlength="50" />
<i-row class='height'> <i-row class='height'>
<i-col span="20" offset='2' i-class="col-class"> <i-col span="20" offset='2' i-class="col-class" wx-if="{{platform!='ios'}}">
<i-button bind:click="handleClick" type="primary" shape="circle" size="small">立即{{user.is_vip==1?'续费':'购买'}} ¥{{common.numFixed(vip_price*value1, 2)}}</i-button> <i-button bind:click="handleClick" type="primary" shape="circle" size="small">立即{{user.is_vip==1?'续费':'购买'}} ¥{{common.numFixed(vip_price*value1, 2)}}</i-button>
</i-col> </i-col>
<i-col span="20" offset='2' i-class="col-class" wx-if="{{platform=='ios'}}">
<i-button type="primary" disabled shape="circle" size="small">由于相关规范,iOS功能暂不可用</i-button>
</i-col>
</i-row> </i-row>
<!-- toast弹窗 --> <!-- toast弹窗 -->
<i-toast id="toast" class="alert-index" /> <i-toast id="toast" class="alert-index" />
<!-- <i-modal visible="{{ visible2 }}" bind:ok="modelCancel" title="温馨提示" show-cancel="{{false}}"> <!-- <i-modal visible="{{ visible2 }}" bind:ok="modelCancel" title="温馨提示" show-cancel="{{false}}">
<view class="modelCancel">系统已自动关联您在其他平台购买的美行者VIP会员,请点击确定查看详情</view> <view class="modelCancel">系统已自动关联您在其他平台购买的美行者VIP会员,请点击确定查看详情</view>
</i-modal> --> </i-modal> -->
<!-- 手机号授权框 --> <!-- 手机号授权框 -->
<i-modal title="填写手机号" visible="{{ visible }}" bind:ok="savePhone" bind:cancel="alertClose"> <i-modal title="填写手机号" visible="{{ visible }}" bind:ok="savePhone" bind:cancel="alertClose">
<i-input error="{{ errMsg }}" value="{{ value }}" type="number" bindchange='handlePhone' title="手机号" placeholder="请输入手机号" /> <i-input error="{{ errMsg }}" value="{{ value }}" type="number" bindchange='handlePhone' title="手机号" placeholder="请输入手机号" />
<view class="color-red">{{ errMessage }}</view> <view class="color-red">{{ errMessage }}</view>
</i-modal> </i-modal>
\ No newline at end of file
...@@ -50,6 +50,12 @@ export const live = { ...@@ -50,6 +50,12 @@ export const live = {
} }
} }
export const setting = {
audit: (params) => {
return req.post('setting/audit', params).then(res => res.data)
}
}
// 地址 // 地址
export const address = { export const address = {
lists: (params) => { lists: (params) => {
...@@ -153,6 +159,7 @@ export default { ...@@ -153,6 +159,7 @@ export default {
home, home,
guide, guide,
live, live,
setting,
address, address,
search, search,
saveFormId, saveFormId,
......
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 to comment