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
171ae531
Commit
171ae531
authored
Sep 27, 2018
by
汪睦雄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改了我的模块
parent
83d042ee
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
154 additions
and
26 deletions
+154
-26
components/navs/index.js
+0
-1
images/background-novip.png
+0
-0
images/background-vip.png
+0
-0
pages/me/collection/index.js
+71
-4
pages/me/collection/index.json
+10
-2
pages/me/collection/index.wxml
+9
-1
pages/me/collection/index.wxss
+4
-0
pages/me/index.js
+0
-1
pages/me/index.wxml
+7
-4
pages/me/index.wxss
+15
-0
pages/me/vip/index.js
+26
-2
pages/me/vip/index.wxml
+11
-11
pages/me/vip/index.wxss
+1
-0
No files found.
components/navs/index.js
View file @
171ae531
...
...
@@ -83,7 +83,6 @@ Page({
// 商家合作
gotoShopJoin
:
function
(
event
)
{
let
_url
=
""
wx
.
navigateTo
({
url
:
'/pages/webview/index?url='
+
Config
.
shopJoinPath
,
})
...
...
images/background-novip.png
0 → 100755
View file @
171ae531
254 KB
images/background-vip.png
100644 → 100755
View file @
171ae531
197 KB
|
W:
|
H:
319 KB
|
W:
|
H:
2-up
Swipe
Onion skin
pages/me/collection/index.js
View file @
171ae531
// pages/me/collection/index.js
Page
({
import
api
from
'../../../utils/Api.js'
import
Wx
from
'../../../utils/Wx.js'
import
Schedule
from
'../../../utils/Schedule.js'
const
{
$Toast
}
=
require
(
'../../../iview/base/index'
);
Page
({
/**
* 页面的初始数据
*/
data
:
{
projects
:
[],
currentPage
:
1
,
loading
:
true
,
hasMore
:
true
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
:
function
(
options
)
{
this
.
getListData
()
},
/**
* 加载
*/
getListData
:
function
(
callback
)
{
const
p
=
this
.
data
.
currentPage
let
params
=
{
p
:
p
}
// 请求数据接口
api
.
me
.
collections
(
params
).
then
(
res
=>
{
if
(
res
.
code
)
{
this
.
setData
({
hasMore
:
false
,
loading
:
false
,
currentPage
:
2
})
$Toast
({
content
:
res
.
msg
,
type
:
'error'
})
}
else
{
let
_projects
=
this
.
data
.
projects
this
.
setData
({
projects
:
_projects
.
concat
(
res
.
data
),
loading
:
false
,
hasMore
:
res
.
data
&&
res
.
data
.
length
>
0
?
true
:
false
,
currentPage
:
res
.
data
&&
res
.
data
.
length
>
0
?
p
:
(
p
-
1
)
})
typeof
callback
==
"function"
&&
callback
()
}
})
},
/**
...
...
@@ -47,14 +89,39 @@ Page({
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh
:
function
()
{
this
.
setData
({
projects
:
[],
loading
:
true
,
hasMore
:
true
,
currentPage
:
1
})
wx
.
showNavigationBarLoading
()
wx
.
showLoading
({
title
:
'加载中...'
,
})
new
Schedule
().
task
(
this
.
getListData
).
delay
(
1600
).
task
(()
=>
{
wx
.
hideNavigationBarLoading
()
wx
.
stopPullDownRefresh
()
wx
.
hideLoading
()
})
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom
:
function
()
{
let
that
=
this
if
(
that
.
data
.
loading
||
!
that
.
data
.
hasMore
)
{
return
;
}
else
{
let
page
=
that
.
data
.
currentPage
+
1
new
Schedule
().
task
(()
=>
{
that
.
setData
({
loading
:
true
,
currentPage
:
page
})
}).
delay
(
1000
).
task
(
that
.
getListData
)
}
},
/**
...
...
pages/me/collection/index.json
View file @
171ae531
{}
\ No newline at end of file
{
"navigationBarTitleText"
:
"我的收藏"
,
"enablePullDownRefresh"
:
true
,
"usingComponents"
:
{
"project-item"
:
"/components/project-item/index"
,
"more"
:
"/components/more/index"
,
"i-toast"
:
"/iview/toast/index"
}
}
\ No newline at end of file
pages/me/collection/index.wxml
View file @
171ae531
<!--pages/me/collection/index.wxml-->
<text>pages/me/collection/index.wxml</text>
<view class="page-wrapper">
<view class="projects-wrapper">
<project-item wx:for="{{projects}}" wx:for-index="idx" wx:for-item="item" wx:key="n.id" project-item="{{item}}" />
</view>
<i-toast id="toast" />
</view>
<more hasMore="{{hasMore}}" loading="{{loading}}" page="{{currentPage}}" />
\ No newline at end of file
pages/me/collection/index.wxss
View file @
171ae531
/* pages/me/collection/index.wxss */
.page-wrapper{
background: white;
}
\ No newline at end of file
pages/me/index.js
View file @
171ae531
...
...
@@ -54,7 +54,6 @@ Page({
// 商家合作
gotoShopJoin
:
function
(
event
)
{
let
_url
=
""
wx
.
navigateTo
({
url
:
'/pages/webview/index?url='
+
Config
.
shopJoinPath
,
})
...
...
pages/me/index.wxml
View file @
171ae531
...
...
@@ -40,14 +40,16 @@
</i-cell-group>
<i-cell-group i-class='vip'>
<i-cell title="VIP会员" is-link url="/pages/me/vip/index">
<i-cell title="VIP会员" is-link url="/pages/me/vip/index
?is_vip={{user.is_vip}}&vip_endtime={{user.vip_endtime}}
">
<text slot="footer" class='text-gray'>{{user.vip_endtime==null?'':user.vip_endtime}}</text>
</i-cell>
<i-cell title="我的收藏" is-link url="/pages/collection/index"></i-cell>
<i-cell title="我的收藏" is-link url="/pages/
me/
collection/index"></i-cell>
</i-cell-group>
<i-cell-group>
<i-cell title="商家合作" is-link url="/pages/dashboard/index"></i-cell>
<i-cell title="官方客服" is-link url="/pages/dashboard/index"></i-cell>
<i-cell title="商家合作" is-link catchtap="gotoShopJoin"></i-cell>
<i-cell is-link>
<button open-type='contact' class='my-btn-contact'>官方客服</button>
</i-cell>
</i-cell-group>
</view>
\ No newline at end of file
pages/me/index.wxss
View file @
171ae531
...
...
@@ -89,3 +89,17 @@ page {
.vip {
margin-bottom: 20rpx;
}
.my-btn-contact{
background-color: transparent;
font-size: 14px;
margin-left: 0;
line-height: 1.75;
width: 100%;
text-align: left;
border: none;
padding-left: 0;
}
.my-btn-contact::after{
display: none;
}
\ No newline at end of file
pages/me/vip/index.js
View file @
171ae531
// pages/me/vip/index.js
Page
({
Page
({
/**
* 页面的初始数据
*/
data
:
{
value1
:
1
,
value2
:
0.1
value2
:
0.1
,
is_vip
:
0
,
vip_endtime
:
null
,
vip_price
:
49.9
},
handleChange1
({
detail
})
{
...
...
@@ -25,7 +29,27 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad
:
function
(
options
)
{
let
is_vip
=
options
.
is_vip
let
vip_endtime
=
options
.
vip_endtime
this
.
setData
({
is_vip
:
is_vip
,
vip_endtime
:
vip_endtime
})
},
// 获取VIP单价
getVipPrice
:
function
()
{
api
.
me
.
vipPrice
().
then
(
res
=>
{
if
(
!
res
.
code
)
{
this
.
setData
({
vip_price
:
res
.
price
})
}
else
{
wx
.
showToast
({
title
:
res
.
msg
})
}
})
},
/**
...
...
pages/me/vip/index.wxml
View file @
171ae531
<!--pages/me/vip/index.wxml-->
<wxs src="../../../pages/common.wxs" module="common"></wxs>
<view class='card-box'>
<image src=
'/images/background-vip.png'
></image>
<text>
2018-09-27
</text>
<image src=
"/images/background-{{is_vip==1?'':'no'}}vip.png"
></image>
<text>
{{is_vip==1?vip_endtime:''}}
</text>
</view>
<view class='calculation-box'>
<i-row class='height'>
<i-col span="6" offset='1' i-class="col-class">
续费
会员</i-col>
<i-col span="6" i-class="col-class color-orange">¥
49.00
</i-col>
<i-col span="6" offset='1' i-class="col-class">
{{is_vip==1?'续费':'购买'}}
会员</i-col>
<i-col span="6" i-class="col-class color-orange">¥
{{vip_price}}
</i-col>
<i-col span="9" offset='1' i-class="col-class">
<i-input-number value="{{ value1 }}" min="
0" max="10
0" bindchange="handleChange1" />
<i-input-number value="{{ value1 }}" min="
1" max="1
0" bindchange="handleChange1" />
</i-col>
</i-row>
</view>
<view class='vip_intro'>
会员卡说明:用户购买一次会员卡后
,增加一年的会员时限,
多次购买则在先有的基础上延长时间,单词以1年为标准。
会员卡说明:用户购买一次会员卡后
,增加一年的会员时限,
多次购买则在先有的基础上延长时间,单词以1年为标准。
</view>
<i-row class='height'>
<i-col span="20" offset='2' i-class="col-class">
<i-button bind:click="handleClick" type="primary" shape="circle" size="small">立即续费</i-button>
<i-button bind:click="handleClick" type="primary" shape="circle" size="small">立即{{is_vip==1?'续费':'购买'}} ¥{{common.numFixed(vip_price*value1, 2)}}</i-button>
</i-col>
</i-row>
\ No newline at end of file
</i-row>
\ No newline at end of file
pages/me/vip/index.wxss
View file @
171ae531
...
...
@@ -36,6 +36,7 @@ page {
font-size: 25rpx;
color: #969696;
margin-bottom: 30rpx;
line-height: 45rpx;
}
.height {
...
...
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