Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wxapp
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
亲子游项目
wxapp
Commits
f4f8bf07
Commit
f4f8bf07
authored
Jun 30, 2022
by
汪睦雄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改玩皮研学文案
parent
a32a0a1d
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
138 additions
and
91 deletions
+138
-91
app.json
+1
-1
components/navs/index.js
+70
-72
components/navs/index.wxml
+3
-3
pages/index/index.js
+1
-0
pages/index/index.wxml
+2
-2
pages/me/vip/index.js
+46
-10
pages/me/vip/index.wxml
+8
-3
utils/Api.js
+7
-0
No files found.
app.json
View file @
f4f8bf07
...
...
@@ -75,7 +75,7 @@
],
"plugins"
:
{
"live-player-plugin"
:
{
"version"
:
"1.
1
.0"
,
"version"
:
"1.
2
.0"
,
"provider"
:
"wx2b03c6e691cd7370"
}
}
...
...
components/navs/index.js
View file @
f4f8bf07
// components/navs/index.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
()
{
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide
:
function
()
{
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload
:
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
,
})
},
// 商家合作
gotoShopJoin
:
function
(
event
)
{
wx
.
navigateTo
({
url
:
'/pages/webview/index?url='
+
Config
.
shopJoinPath
+
'&t=商家合作'
,
})
},
// 获取个人资料
getAudit
:
function
(
callback
)
{
api
.
setting
.
audit
().
then
(
res
=>
{
// 渲染数据
console
.
log
(
111
,
res
)
this
.
setData
({
audit
:
res
.
data
})
typeof
callback
==
"function"
&&
callback
()
})
}
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh
:
function
()
{
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom
:
function
()
{
},
/**
* 用户点击右上角分享
*/
onShareAppMessage
:
function
()
{
},
// 分类点击
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
,
})
},
// 美行攻略
// gotoGuides: function(event) {
// wx.navigateTo({
// url: '/pages/guide/index',
// })
// },
// 商家合作
gotoShopJoin
:
function
(
event
)
{
wx
.
navigateTo
({
url
:
'/pages/webview/index?url='
+
Config
.
shopJoinPath
+
'&t=商家合作'
,
})
/*组件生命周期*/
lifetimes
:
{
created
()
{
this
.
getAudit
()
},
attached
()
{
console
.
log
(
"在组件实例进入页面节点树时执行"
)
},
ready
()
{
console
.
log
(
"在组件在视图层布局完成后执行"
)
},
moved
()
{
console
.
log
(
"在组件实例被移动到节点树另一个位置时执行"
)
},
detached
()
{
console
.
log
(
"在组件实例被从页面节点树移除时执行"
)
},
error
()
{
console
.
log
(
"每当组件方法抛出错误时执行"
)
},
/*组件所在页面的生命周期 */
pageLifetimes
:
{
show
:
function
()
{
// 页面被展示
console
.
log
(
"页面被展示"
)
},
hide
:
function
()
{
// 页面被隐藏
console
.
log
(
"页面被隐藏"
)
},
resize
:
function
(
size
)
{
// 页面尺寸变化
console
.
log
(
"页面尺寸变化"
)
}
}
}
})
\ No newline at end of file
components/navs/index.wxml
View file @
f4f8bf07
...
...
@@ -27,11 +27,11 @@
</i-grid-item>
</i-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">
<image src="/images/navs/icon_nav_5.png" />
</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-class="nav-grid-item" catchtap='catalogClick' data-name='房券专区'>
<i-grid-icon i-class="nav-icon">
...
...
@@ -45,7 +45,7 @@
</i-grid-icon>
<i-grid-label i-class="nav-label">儿童教育</i-grid-label>
</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">
<image src="/images/navs/icon_nav_8.png" />
</i-grid-icon>
...
...
pages/index/index.js
View file @
f4f8bf07
...
...
@@ -139,6 +139,7 @@ Page({
getHomeData
:
function
(
callback
)
{
api
.
home
.
all
().
then
(
res
=>
{
console
.
log
(
'房券专区'
,
res
.
data
.
heatProjects
)
this
.
setData
({
news
:
res
.
data
.
newProjects
,
tuans
:
res
.
data
.
tuans
,
// 超值团购 - 分类7-水果零食
...
...
pages/index/index.wxml
View file @
f4f8bf07
...
...
@@ -26,8 +26,8 @@
</i-cell-group>
<i-cell-group i-class="section-wrapper">
<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>
<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>
</i-cell>
<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}}">
...
...
pages/me/vip/index.js
View file @
f4f8bf07
...
...
@@ -16,15 +16,16 @@ Page({
vip_price
:
49.9
,
order
:
{},
user
:
{},
phone
:
''
,
formPhone
:
''
,
phone
:
''
,
formPhone
:
''
,
name
:
''
,
address
:
''
,
wx_number
:
''
,
sessionId
:
''
,
visible
:
false
,
errMsg
:
false
,
errMessage
:
''
errMessage
:
''
,
platform
:
'pc'
},
handleChange1
({
...
...
@@ -73,18 +74,53 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad
:
function
(
options
)
{
this
.
getPlatform
()
this
.
getUserInfo
()
this
.
getVipPrice
()
// 获取session id
let
that
=
this
this
.
getSessionKey
(
function
(
sid
)
{
this
.
getSessionKey
(
function
(
sid
)
{
that
.
setData
({
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
()
{
api
.
me
.
info
().
then
(
res
=>
{
...
...
@@ -109,7 +145,7 @@ Page({
let
that
=
this
// 检查session key是否过期,如果过期的话,那么就获取新的再请求,否则直接请求
wx
.
checkSession
({
success
:
function
(
res
)
{
success
:
function
(
res
)
{
//session_key未过期,直接操作
let
sessionId
=
that
.
data
.
sessionId
api
.
getPhoneNumber
({
...
...
@@ -136,12 +172,12 @@ Page({
}
})
},
fail
:
function
()
{
fail
:
function
()
{
// session_key 已过期,进行登录操作,提示错误
// 获取session id
console
.
log
(
'checkSession fail!'
)
let
that
=
this
this
.
getSessionKey
(
function
(
sid
)
{
this
.
getSessionKey
(
function
(
sid
)
{
that
.
setData
({
sessionId
:
sid
})
...
...
@@ -280,7 +316,7 @@ Page({
name
:
name
,
address
:
address
}
wx
.
showNavigationBarLoading
()
wx
.
showLoading
({
title
:
'加载中...'
,
...
...
@@ -376,7 +412,7 @@ Page({
'errMsg'
:
true
,
'errMessage'
:
'*'
+
res
.
msg
})
}
})
...
...
@@ -400,7 +436,7 @@ Page({
})
},
handlePhone
:
function
(
event
)
{
handlePhone
:
function
(
event
)
{
this
.
setData
({
formPhone
:
event
.
detail
.
detail
.
value
})
...
...
pages/me/vip/index.wxml
View file @
f4f8bf07
...
...
@@ -19,6 +19,7 @@
<view class='vip_intro'>
会员卡说明:用户购买一次会员卡后,增加一年的会员时限,多次购买则在先有的基础上延长时间,单次以1年为标准,已购卡会员请添加美行客服微信(mxkf00),邀请进会员群。
<view style="color:#2BA3D7;" wx-if="{{platform=='ios'}}">iOS苹果用户请联系客服微信:<text bindtap='makeClipboard'>13120365050(点击复制)</text></view>
</view>
<!-- 用户输入的信息 -->
...
...
@@ -36,19 +37,22 @@
<i-input bindchange="handleAddress" value="{{ user.address }}" right="true" type="text" title="地址" placeholder="请输入地址" maxlength="50" />
<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-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>
<!-- 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}}">
<view class="modelCancel">系统已自动关联您在其他平台购买的美行者VIP会员,请点击确定查看详情</view>
</i-modal> -->
<!-- 手机号授权框 -->
<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>
</i-modal>
\ No newline at end of file
utils/Api.js
View file @
f4f8bf07
...
...
@@ -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
=
{
lists
:
(
params
)
=>
{
...
...
@@ -153,6 +159,7 @@ export default {
home
,
guide
,
live
,
setting
,
address
,
search
,
saveFormId
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment