Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
晓梦云飞
shopxo-uniapp
提交
00745363
S
shopxo-uniapp
项目概览
晓梦云飞
/
shopxo-uniapp
与 Fork 源项目一致
Fork自
纵之格 / shopxo-uniapp
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
shopxo-uniapp
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
00745363
编写于
10月 18, 2021
作者:
G
gongfuxiang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
会员开发
上级
8480a64b
变更
8
展开全部
隐藏空白更改
内联
并排
Showing
8 changed file
with
807 addition
and
1085 deletion
+807
-1085
pages.json
pages.json
+1
-41
pages/plugins/membershiplevelvip/buy/buy.css
pages/plugins/membershiplevelvip/buy/buy.css
+27
-0
pages/plugins/membershiplevelvip/buy/buy.vue
pages/plugins/membershiplevelvip/buy/buy.vue
+226
-336
pages/plugins/membershiplevelvip/index/index.css
pages/plugins/membershiplevelvip/index/index.css
+42
-0
pages/plugins/membershiplevelvip/index/index.vue
pages/plugins/membershiplevelvip/index/index.vue
+163
-259
pages/plugins/membershiplevelvip/user/user.css
pages/plugins/membershiplevelvip/user/user.css
+72
-0
pages/plugins/membershiplevelvip/user/user.vue
pages/plugins/membershiplevelvip/user/user.vue
+275
-448
pages/plugins/wallet/user/user.vue
pages/plugins/wallet/user/user.vue
+1
-1
未找到文件。
pages.json
浏览文件 @
00745363
...
...
@@ -220,10 +220,6 @@
"path"
:
"pages/plugins/membershiplevelvip/index/index"
,
"style"
:
{
"enablePullDownRefresh"
:
true
,
"navigationBarBackgroundColor"
:
"#1d1611"
,
"backgroundColorTop"
:
"#1d1611"
,
"backgroundColorBottom"
:
"#f5f5f5"
,
"backgroundTextStyle"
:
"light"
,
"navigationBarTitleText"
:
"会员VIP"
}
},
...
...
@@ -231,21 +227,13 @@
"path"
:
"pages/plugins/membershiplevelvip/buy/buy"
,
"style"
:
{
"enablePullDownRefresh"
:
true
,
"navigationBarBackgroundColor"
:
"#1d1611"
,
"backgroundColorTop"
:
"#1d1611"
,
"backgroundColorBottom"
:
"#f5f5f5"
,
"backgroundTextStyle"
:
"light"
,
"navigationBarTitleText"
:
"开通时长"
"navigationBarTitleText"
:
"开通会员"
}
},
{
"path"
:
"pages/plugins/membershiplevelvip/user/user"
,
"style"
:
{
"enablePullDownRefresh"
:
true
,
"navigationBarBackgroundColor"
:
"#1d1611"
,
"backgroundColorTop"
:
"#1d1611"
,
"backgroundColorBottom"
:
"#f5f5f5"
,
"backgroundTextStyle"
:
"light"
,
"navigationBarTitleText"
:
"我的会员"
}
},
...
...
@@ -253,10 +241,6 @@
"path"
:
"pages/plugins/membershiplevelvip/order/order"
,
"style"
:
{
"enablePullDownRefresh"
:
true
,
"navigationBarBackgroundColor"
:
"#1d1611"
,
"backgroundColorTop"
:
"#1d1611"
,
"backgroundColorBottom"
:
"#f5f5f5"
,
"backgroundTextStyle"
:
"light"
,
"navigationBarTitleText"
:
"订单列表"
}
},
...
...
@@ -264,10 +248,6 @@
"path"
:
"pages/plugins/membershiplevelvip/order-detail/order-detail"
,
"style"
:
{
"enablePullDownRefresh"
:
true
,
"navigationBarBackgroundColor"
:
"#1d1611"
,
"backgroundColorTop"
:
"#1d1611"
,
"backgroundColorBottom"
:
"#f5f5f5"
,
"backgroundTextStyle"
:
"light"
,
"navigationBarTitleText"
:
"订单详情"
}
},
...
...
@@ -275,10 +255,6 @@
"path"
:
"pages/plugins/membershiplevelvip/profit/profit"
,
"style"
:
{
"enablePullDownRefresh"
:
true
,
"navigationBarBackgroundColor"
:
"#1d1611"
,
"backgroundColorTop"
:
"#1d1611"
,
"backgroundColorBottom"
:
"#f5f5f5"
,
"backgroundTextStyle"
:
"light"
,
"navigationBarTitleText"
:
"收益明细"
}
},
...
...
@@ -286,10 +262,6 @@
"path"
:
"pages/plugins/membershiplevelvip/profit-detail/profit-detail"
,
"style"
:
{
"enablePullDownRefresh"
:
true
,
"navigationBarBackgroundColor"
:
"#1d1611"
,
"backgroundColorTop"
:
"#1d1611"
,
"backgroundColorBottom"
:
"#f5f5f5"
,
"backgroundTextStyle"
:
"light"
,
"navigationBarTitleText"
:
"收益详情"
}
},
...
...
@@ -297,10 +269,6 @@
"path"
:
"pages/plugins/membershiplevelvip/statistics/statistics"
,
"style"
:
{
"enablePullDownRefresh"
:
true
,
"navigationBarBackgroundColor"
:
"#1d1611"
,
"backgroundColorTop"
:
"#1d1611"
,
"backgroundColorBottom"
:
"#f5f5f5"
,
"backgroundTextStyle"
:
"light"
,
"navigationBarTitleText"
:
"数据统计"
}
},
...
...
@@ -308,10 +276,6 @@
"path"
:
"pages/plugins/membershiplevelvip/poster/poster"
,
"style"
:
{
"enablePullDownRefresh"
:
true
,
"navigationBarBackgroundColor"
:
"#1d1611"
,
"backgroundColorTop"
:
"#1d1611"
,
"backgroundColorBottom"
:
"#f5f5f5"
,
"backgroundTextStyle"
:
"light"
,
"navigationBarTitleText"
:
"推广返利"
}
},
...
...
@@ -319,10 +283,6 @@
"path"
:
"pages/plugins/membershiplevelvip/team/team"
,
"style"
:
{
"enablePullDownRefresh"
:
true
,
"navigationBarBackgroundColor"
:
"#1d1611"
,
"backgroundColorTop"
:
"#1d1611"
,
"backgroundColorBottom"
:
"#f5f5f5"
,
"backgroundTextStyle"
:
"light"
,
"navigationBarTitleText"
:
"我的团队"
}
},
...
...
pages/plugins/membershiplevelvip/buy/buy.css
0 → 100644
浏览文件 @
00745363
/**
* common
*/
.page
{
padding-bottom
:
120
rpx
;
}
/**
* 导航
*/
.nav
{
height
:
80
rpx
;
line-height
:
80
rpx
;
}
/**
* 内容
*/
.data-list
.item
{
border
:
1px
solid
#fff
;
}
.data-list
.item
.number
{
width
:
calc
(
40%
-
40
rpx
);
}
.data-list
.item
.price
{
width
:
calc
(
60%
-
40
rpx
)
}
\ No newline at end of file
pages/plugins/membershiplevelvip/buy/buy.vue
浏览文件 @
00745363
<
template
>
<view>
<view
v-if=
"(data_list || null) != null && data_list.length > 0"
class=
"page"
>
<!-- 导航 -->
<scroll-view
class=
"tabs bg-white tc oh"
scroll-x=
"true"
>
<block
v-for=
"(item, index) in data_list"
:key=
"index"
>
<view
:class=
"'item cr-gray ' + (selected_tabs_index === index ? 'active' : '')"
@
tap=
"tabs_event"
:data-index=
"index"
>
{{
item
.
name
}}
</view>
</block>
</scroll-view>
<!-- 内容 -->
<view
class=
"content spacing-mt"
>
<block
v-for=
"(item, index) in data_list"
:key=
"index"
>
<block
v-if=
"selected_tabs_index == index"
>
<block
v-if=
"(item.pay_period_rules || null) != null"
>
<block
v-for=
"(rules, index2) in item.pay_period_rules"
:key=
"index2"
>
<view
:class=
"'item oh tc bg-white ' + (selected_content_index === index ? 'active' : '')"
@
tap=
"content_event"
:data-index=
"index"
>
<view
class=
"fl number single-text"
>
<text
v-if=
"(rules.number || null) == null"
class=
"value"
>
终身
</text>
<text
v-else
class=
"value"
>
{{
rules
.
value
}}
</text>
<text
v-if=
"(rules.unit || null) != null"
class=
"unit"
>
{{
rules
.
unit
}}
</text>
</view>
<view
class=
"fr price bg-white single-text"
>
<text
class=
"symbol"
>
¥
</text>
<text
class=
"value"
>
{{
rules
.
price
}}
</text>
<text
class=
"unit"
>
元
</text>
</view>
<
template
>
<view>
<view
v-if=
"(data_base || null) != null"
>
<view
v-if=
"(data_list || null) != null && data_list.length > 0"
class=
"page"
>
<!-- 导航 -->
<scroll-view
class=
"nav scroll-view-horizontal bg-white tc oh"
scroll-x=
"true"
>
<block
v-for=
"(item, index) in data_list"
:key=
"index"
>
<view
:class=
"'item dis-inline-block padding-left-xxl padding-right-xxl cr-gray ' + (selected_tabs_index === index ? 'cr-main' : '')"
@
tap=
"tabs_event"
:data-index=
"index"
>
{{
item
.
name
}}
</view>
</block>
</scroll-view>
<!-- 内容 -->
<block
v-for=
"(item, index) in data_list"
:key=
"index"
>
<block
v-if=
"selected_tabs_index == index"
>
<block
v-if=
"(item.pay_period_rules || null) != null"
>
<view
class=
"data-list padding-horizontal-main padding-top-main"
>
<block
v-for=
"(rules, index2) in item.pay_period_rules"
:key=
"index2"
>
<view
:class=
"'item padding-main border-radius-main bg-white oh tc spacing-mb ' + (selected_content_index === index ? 'border-color-main' : '')"
@
tap=
"content_event"
:data-index=
"index"
>
<view
class=
"fl number single-text"
>
<text
class=
"fw-b cr-base text-size"
>
{{
((
rules
.
number
||
null
)
==
null
)
?
'
终身
'
:
rules
.
value
}}
</text>
<text
v-if=
"(rules.unit || null) != null"
class=
"cr-grey margin-left-sm"
>
{{
rules
.
unit
}}
</text>
</view>
<view
class=
"fr price bg-white single-text"
>
<text
class=
"cr-main"
>
¥
</text>
<text
class=
" fw-b cr-main text-size-lg"
>
{{
rules
.
price
}}
</text>
<text
class=
"cr-grey margin-left-sm"
>
元
</text>
</view>
</view>
</block>
<view
class=
"submit-fixed"
>
<button
class=
"bg-main br-main cr-white round text-size margin-horizontal-main margin-bottom-main"
type=
"default"
hover-class=
"none"
@
tap=
"submit_event"
:disabled=
"submit_disabled_status"
>
确认支付
</button>
</view>
</view>
<!-- 结尾 -->
<component-bottom-line
:prop-status=
"true"
></component-bottom-line>
</block>
<block
v-else
>
<!-- 提示信息 -->
<component-no-data
prop-status=
"0"
prop-msg=
"购买时长未配置"
></component-no-data>
</block>
</block>
</block>
</view>
<view
v-else
>
<!-- 提示信息 -->
<component-no-data
prop-status=
"0"
prop-msg=
"未配置会员等级"
></component-no-data>
</view>
</block>
<!--
<import
src=
"/pages/common/bottom_line.wxml"
></import>
-->
<block
data-type=
"template"
data-is=
"bottom_line"
data-attr=
"status: true"
>
<view
v-if=
"(status || false)"
class=
"data-bottom-line"
>
<view
class=
"left fl"
></view>
<view
class=
"msg fl"
>
我是有底线的
</view>
<view
class=
"right fr"
></view>
</view>
</block>
<button
class=
"submit-fixed submit-bottom"
type=
"default"
hover-class=
"none"
@
tap=
"submit_event"
:disabled=
"submit_disabled_status"
>
确认支付
</button>
</block>
<block
v-else
>
<!--
<import
src=
"/pages/common/nodata.wxml"
></import>
-->
<block
data-type=
"template"
data-is=
"nodata"
data-attr=
"status: 0, msg: '购买时长未配置'"
>
<!-- 1 加载中 -->
<view
v-if=
"0 == 1"
class=
"no-data-loding tc"
>
<text>
加载中...
</text>
</view>
<!-- 2 处理错误 -->
<view
v-else-if=
"0 == 2"
class=
"no-data-box tc"
>
<image
src=
"/static/images/error.png"
mode=
"widthFix"
></image>
<view
class=
"no-data-tips"
>
{{
msg
||
'
处理错误
'
}}
</view>
</view>
<!-- 0 默认没有数据 -->
<view
v-else-if=
"0 == 0"
class=
"no-data-box tc"
>
<image
src=
"/static/images/empty.png"
mode=
"widthFix"
></image>
<view
class=
"no-data-tips"
>
{{
msg
||
'
没有相关数据
'
}}
</view>
</view>
</block>
</block>
</block>
</block>
</view>
</view>
<view
v-else
>
<!--
<import
src=
"/pages/common/nodata.wxml"
></import>
-->
<block
data-type=
"template"
data-is=
"nodata"
data-attr=
"status: 0, msg: '未配置会员等级'"
>
<!-- 1 加载中 -->
<view
v-if=
"0 == 1"
class=
"no-data-loding tc"
>
<text>
加载中...
</text>
</view>
<!-- 2 处理错误 -->
<view
v-else-if=
"0 == 2"
class=
"no-data-box tc"
>
<image
src=
"/static/images/error.png"
mode=
"widthFix"
></image>
<view
class=
"no-data-tips"
>
{{
msg
||
'
处理错误
'
}}
</view>
</view>
<!-- 0 默认没有数据 -->
<view
v-else-if=
"0 == 0"
class=
"no-data-box tc"
>
<image
src=
"/static/images/empty.png"
mode=
"widthFix"
></image>
<view
class=
"no-data-tips"
>
{{
msg
||
'
没有相关数据
'
}}
</view>
</view>
</block>
</view>
</view>
</
template
>
<
script
>
const
app
=
getApp
();
export
default
{
data
()
{
return
{
data_bottom_line_status
:
false
,
data_list_loding_status
:
1
,
data_list_loding_msg
:
''
,
data_list
:
[],
data_base
:
null
,
selected_tabs_index
:
0
,
selected_content_index
:
null
,
submit_disabled_status
:
false
};
},
components
:
{},
props
:
{},
onLoad
(
params
)
{
this
.
init
();
},
onShow
()
{},
// 下拉刷新
onPullDownRefresh
()
{
this
.
get_data_list
();
},
methods
:
{
init
()
{
// 获取数据
this
.
get_data_list
();
},
// 获取数据
get_data_list
()
{
var
self
=
this
;
uni
.
showLoading
({
title
:
"
加载中...
"
});
if
(
self
.
data_list
.
length
<=
0
)
{
self
.
setData
({
data_list_loding_status
:
1
});
}
uni
.
request
({
url
:
app
.
globalData
.
get_request_url
(
"
index
"
,
"
buy
"
,
"
membershiplevelvip
"
),
method
:
"
POST
"
,
data
:
{},
dataType
:
"
json
"
,
success
:
res
=>
{
uni
.
hideLoading
();
uni
.
stopPullDownRefresh
();
if
(
res
.
data
.
code
==
0
)
{
var
data
=
res
.
data
.
data
;
var
status
=
(
data
.
data
||
[]).
length
>
0
;
self
.
setData
({
data_base
:
data
.
base
||
null
,
data_list
:
data
.
data
||
[],
data_list_loding_msg
:
''
,
data_list_loding_status
:
status
?
3
:
0
,
data_bottom_line_status
:
status
});
}
else
{
self
.
setData
({
data_bottom_line_status
:
false
,
data_list_loding_status
:
2
,
data_list_loding_msg
:
res
.
data
.
msg
});
if
(
app
.
globalData
.
is_login_check
(
res
.
data
,
self
,
'
get_data_list
'
))
{
app
.
globalData
.
showToast
(
res
.
data
.
msg
);
}
}
},
fail
:
()
=>
{
uni
.
hideLoading
();
uni
.
stopPullDownRefresh
();
self
.
setData
({
data_bottom_line_status
:
false
,
data_list_loding_status
:
2
,
data_list_loding_msg
:
'
服务器请求出错
'
});
app
.
globalData
.
showToast
(
"
服务器请求出错
"
);
}
});
},
// tabs事件
tabs_event
(
e
)
{
this
.
setData
({
selected_tabs_index
:
e
.
currentTarget
.
dataset
.
index
||
0
,
selected_content_index
:
null
});
},
// 时长事件
content_event
(
e
)
{
this
.
setData
({
selected_content_index
:
e
.
currentTarget
.
dataset
.
index
||
0
});
},
// 确认支付事件
submit_event
(
e
)
{
if
(
this
.
selected_tabs_index
<
0
||
this
.
selected_content_index
===
null
)
{
app
.
globalData
.
showToast
(
'
请选择开通时长
'
);
return
false
;
}
// 请求参数
var
item
=
this
.
data_list
[
this
.
selected_tabs_index
]
||
null
;
if
(
item
==
null
)
{
app
.
globalData
.
showToast
(
'
开通时长有误
'
);
return
false
;
}
var
rules
=
(
item
[
'
pay_period_rules
'
]
||
null
)
==
null
?
null
:
item
[
'
pay_period_rules
'
][
this
.
selected_content_index
]
||
null
;
if
(
rules
==
null
)
{
app
.
globalData
.
showToast
(
'
开通时长有误
'
);
return
false
;
}
// 请求生成支付订单
var
self
=
this
;
self
.
setData
({
submit_disabled_status
:
true
});
uni
.
showLoading
({
title
:
"
处理中...
"
});
uni
.
request
({
url
:
app
.
globalData
.
get_request_url
(
"
create
"
,
"
buy
"
,
"
membershiplevelvip
"
),
method
:
"
POST
"
,
data
:
{
"
opening
"
:
item
[
'
id
'
]
+
'
-
'
+
rules
[
'
number
'
]
},
dataType
:
"
json
"
,
header
:
{
'
content-type
'
:
'
application/x-www-form-urlencoded
'
},
success
:
res
=>
{
uni
.
hideLoading
();
self
.
setData
({
submit_disabled_status
:
false
});
if
(
res
.
data
.
code
==
0
)
{
// 进入以后会员中心并发起支付
uni
.
redirectTo
({
url
:
'
/pages/plugins/membershiplevelvip/order/order?is_pay=1&order_id=
'
+
res
.
data
.
data
.
id
});
}
else
{
if
(
app
.
globalData
.
is_login_check
(
res
.
data
,
self
,
'
submit_event
'
))
{
app
.
globalData
.
showToast
(
res
.
data
.
msg
);
}
}
},
fail
:
()
=>
{
self
.
setData
({
submit_disabled_status
:
false
});
uni
.
hideLoading
();
app
.
globalData
.
showToast
(
"
服务器请求出错
"
);
}
});
}
}
};
</
script
>
<
style
>
/**
* common
*/
.page
{
padding-bottom
:
100
rpx
;
}
/**
* tabs
*/
.tabs
{
width
:
100%
;
height
:
80
rpx
;
white-space
:
nowrap
;
box-sizing
:
border-box
;
}
.tabs
.item
{
padding
:
20
rpx
30
rpx
;
border-bottom
:
3px
solid
#f0f0f0
;
display
:
inline-block
;
position
:
relative
;
}
.tabs
.active
{
border-bottom
:
3px
solid
#1d1611
;
color
:
#1d1611
;
}
/**
* content
*/
.content
.item
{
cursor
:
pointer
;
border
:
1px
solid
#D6D6D6
;
margin
:
0
20
rpx
30
rpx
20
rpx
;
}
.content
.item
.number
{
background
:
#f2f2f2
;
width
:
calc
(
40%
-
40
rpx
);
}
.content
.item
.price
{
width
:
calc
(
60%
-
40
rpx
)
}
.content
.item
.number
,
.content
.item
.price
{
padding
:
20
rpx
;
}
.content
.item
.number
.value
{
color
:
#666
;
}
.content
.item
.price
.value
,
.content
.item
.price
.symbol
{
color
:
#1d1611
;
}
.content
.item
.value
{
font-size
:
38
rpx
;
}
.content
.item
.unit
{
color
:
#888
;
margin-left
:
10
rpx
;
}
.content
.active
{
border-color
:
#1d1611
;
box-shadow
:
0px
0
0px
1px
#1d1611
}
.content
.submit-bottom
{
background
:
#f9d681
!important
;
color
:
#351d06
!important
;
}
</view>
<view
v-else
>
<!-- 提示信息 -->
<component-no-data
:prop-status=
"data_list_loding_status"
:prop-msg=
"data_list_loding_msg"
></component-no-data>
</view>
</view>
</
template
>
<
script
>
const
app
=
getApp
();
import
componentNoData
from
"
../../../../components/no-data/no-data
"
;
import
componentBottomLine
from
"
../../../../components/bottom-line/bottom-line
"
;
export
default
{
data
()
{
return
{
data_bottom_line_status
:
false
,
data_list_loding_status
:
1
,
data_list_loding_msg
:
''
,
data_list
:
[],
data_base
:
null
,
selected_tabs_index
:
0
,
selected_content_index
:
null
,
submit_disabled_status
:
false
};
},
components
:
{
componentNoData
,
componentBottomLine
},
props
:
{},
onLoad
(
params
)
{
this
.
init
();
},
onShow
()
{},
// 下拉刷新
onPullDownRefresh
()
{
this
.
get_data_list
();
},
methods
:
{
init
()
{
// 获取数据
this
.
get_data_list
();
},
// 获取数据
get_data_list
()
{
uni
.
showLoading
({
title
:
"
加载中...
"
});
if
(
this
.
data_list
.
length
<=
0
)
{
this
.
setData
({
data_list_loding_status
:
1
});
}
uni
.
request
({
url
:
app
.
globalData
.
get_request_url
(
"
index
"
,
"
buy
"
,
"
membershiplevelvip
"
),
method
:
"
POST
"
,
data
:
{},
dataType
:
"
json
"
,
success
:
res
=>
{
uni
.
hideLoading
();
uni
.
stopPullDownRefresh
();
if
(
res
.
data
.
code
==
0
)
{
var
data
=
res
.
data
.
data
;
var
status
=
(
data
.
data
||
[]).
length
>
0
;
this
.
setData
({
data_base
:
data
.
base
||
null
,
data_list
:
data
.
data
||
[],
data_list_loding_msg
:
''
,
data_list_loding_status
:
status
?
3
:
0
,
data_bottom_line_status
:
status
});
}
else
{
this
.
setData
({
data_bottom_line_status
:
false
,
data_list_loding_status
:
2
,
data_list_loding_msg
:
res
.
data
.
msg
});
if
(
app
.
globalData
.
is_login_check
(
res
.
data
,
this
,
'
get_data_list
'
))
{
app
.
globalData
.
showToast
(
res
.
data
.
msg
);
}
}
},
fail
:
()
=>
{
uni
.
hideLoading
();
uni
.
stopPullDownRefresh
();
this
.
setData
({
data_bottom_line_status
:
false
,
data_list_loding_status
:
2
,
data_list_loding_msg
:
'
服务器请求出错
'
});
app
.
globalData
.
showToast
(
"
服务器请求出错
"
);
}
});
},
// tabs事件
tabs_event
(
e
)
{
this
.
setData
({
selected_tabs_index
:
e
.
currentTarget
.
dataset
.
index
||
0
,
selected_content_index
:
null
});
},
// 时长事件
content_event
(
e
)
{
this
.
setData
({
selected_content_index
:
e
.
currentTarget
.
dataset
.
index
||
0
});
},
// 确认支付事件
submit_event
(
e
)
{
if
(
this
.
selected_tabs_index
<
0
||
this
.
selected_content_index
===
null
)
{
app
.
globalData
.
showToast
(
'
请选择开通时长
'
);
return
false
;
}
// 请求参数
var
item
=
this
.
data_list
[
this
.
selected_tabs_index
]
||
null
;
if
(
item
==
null
)
{
app
.
globalData
.
showToast
(
'
开通时长有误
'
);
return
false
;
}
var
rules
=
(
item
[
'
pay_period_rules
'
]
||
null
)
==
null
?
null
:
item
[
'
pay_period_rules
'
][
this
.
selected_content_index
]
||
null
;
if
(
rules
==
null
)
{
app
.
globalData
.
showToast
(
'
开通时长有误
'
);
return
false
;
}
// 请求生成支付订单
this
.
setData
({
submit_disabled_status
:
true
});
uni
.
showLoading
({
title
:
"
处理中...
"
});
uni
.
request
({
url
:
app
.
globalData
.
get_request_url
(
"
create
"
,
"
buy
"
,
"
membershiplevelvip
"
),
method
:
"
POST
"
,
data
:
{
opening
:
item
[
'
id
'
]
+
'
-
'
+
rules
[
'
number
'
]
},
dataType
:
"
json
"
,
success
:
res
=>
{
uni
.
hideLoading
();
this
.
setData
({
submit_disabled_status
:
false
});
if
(
res
.
data
.
code
==
0
)
{
// 进入以后会员中心并发起支付
uni
.
redirectTo
({
url
:
'
/pages/plugins/membershiplevelvip/order/order?is_pay=1&order_id=
'
+
res
.
data
.
data
.
id
});
}
else
{
if
(
app
.
globalData
.
is_login_check
(
res
.
data
,
this
,
'
submit_event
'
))
{
app
.
globalData
.
showToast
(
res
.
data
.
msg
);
}
}
},
fail
:
()
=>
{
this
.
setData
({
submit_disabled_status
:
false
});
uni
.
hideLoading
();
app
.
globalData
.
showToast
(
"
服务器请求出错
"
);
}
});
}
}
};
</
script
>
<
style
>
@import
'./buy.css'
;
</
style
>
\ No newline at end of file
pages/plugins/membershiplevelvip/index/index.css
0 → 100644
浏览文件 @
00745363
/**
* banner
*/
.banner
{
background-color
:
#1d1611
;
background-position
:
center
center
;
background-repeat
:
no-repeat
;
background-size
:
auto
100%
;
height
:
1000
rpx
;
}
.banner-title
{
color
:
#f9d681
;
}
.banner-buy
{
border
:
1
rpx
solid
#f9d681
;
background-color
:
#f9d681
!important
;
color
:
#351d06
!important
;
width
:
280
rpx
;
height
:
80
rpx
;
line-height
:
80
rpx
!important
;
}
/**
* 等级介绍
*/
.data-list
.item
{
width
:
calc
(
50%
-
70
rpx
);
margin-bottom
:
20
rpx
;
}
.data-list
.item
:nth-child
(
2
n
)
{
margin-right
:
20
rpx
;
margin-left
:
10
rpx
;
}
.data-list
.item
:nth-child
(
2
n
+
1
)
{
margin-left
:
20
rpx
;
margin-right
:
10
rpx
;
}
.data-list
.item
image
{
width
:
160
rpx
;
height
:
160
rpx
!important
;
}
\ No newline at end of file
pages/plugins/membershiplevelvip/index/index.vue
浏览文件 @
00745363
<
template
>
<view>
<view
v-if=
"(data_base || null) != null"
class=
"banner tc"
:style=
"'background-image: url(' + data_base.banner_bg_images + ');'"
>
<!-- banner -->
<view
v-if=
"(data_base.banner_top_title || null) != null"
class=
"single-text banner-title"
>
{{
data_base
.
banner_top_title
}}
</view>
<view
class=
"submit"
>
<navigator
url=
"/pages/plugins/membershiplevelvip/buy/buy"
hover-class=
"none"
>
<button
size=
"mini"
type=
"default"
hover-class=
"none"
>
{{
data_base
.
banner_middle_name
||
'
开通会员
'
}}
</button>
</navigator>
</view>
<!-- 数据列表 -->
<view
v-if=
"(data_list || null) != null && data_list.length > 0"
class=
"data-list"
>
<view
v-for=
"(item, index) in data_list"
:key=
"index"
class=
"item fl"
>
<view
class=
"content"
>
<view
class=
"title single-text"
>
{{
item
.
name
}}
</view>
<view
class=
"desc multi-text"
>
{{
item
.
desc
}}
</view>
<image
:src=
"item.images_url"
mode=
"scaleToFill"
class=
"dis-block"
></image>
</view>
</view>
</view>
</view>
<view
v-if=
"(data_base.banner_bottom_content || null) != null"
class=
"bg-white rich-text"
>
<rich-text
:nodes=
"data_base.banner_bottom_content"
></rich-text>
</view>
<view
v-if=
"(data_base || null) == null && (data_list || null) == null && data_list.length
<
=
0"
>
<!--
<import
src=
"/pages/common/nodata.wxml"
></import>
-->
<block
data-type=
"template"
data-is=
"nodata"
data-attr=
"status: data_list_loding_status, msg: data_list_loding_msg"
>
<!-- 1 加载中 -->
<view
v-if=
"0 == 1"
class=
"no-data-loding tc"
>
<text>
加载中...
</text>
</view>
<!-- 2 处理错误 -->
<view
v-else-if=
"0 == 2"
class=
"no-data-box tc"
>
<image
src=
"/static/images/error.png"
mode=
"widthFix"
></image>
<view
class=
"no-data-tips"
>
{{
msg
||
'
处理错误
'
}}
</view>
</view>
<!-- 0 默认没有数据 -->
<view
v-else-if=
"0 == 0"
class=
"no-data-box tc"
>
<image
src=
"/static/images/empty.png"
mode=
"widthFix"
></image>
<view
class=
"no-data-tips"
>
{{
msg
||
'
没有相关数据
'
}}
</view>
</view>
</block>
</view>
<!--
<import
src=
"/pages/common/bottom_line.wxml"
></import>
-->
<block
data-type=
"template"
data-is=
"bottom_line"
data-attr=
"status: data_bottom_line_status"
>
<view
v-if=
"(status || false)"
class=
"data-bottom-line"
>
<view
class=
"left fl"
></view>
<view
class=
"msg fl"
>
我是有底线的
</view>
<view
class=
"right fr"
></view>
</view>
</block>
</view>
</
template
>
<view>
<view
v-if=
"(data_base || null) != null"
>
<view
class=
"banner tc oh pr wh-auto"
:style=
"'background-image: url(' + data_base.banner_bg_images + ');'"
>
<!-- 标题 -->
<view
v-if=
"(data_base.banner_top_title || null) != null"
class=
"banner-title single-text text-size-lg margin-top-xxxl"
>
{{
data_base
.
banner_top_title
}}
</view>
<!-- 购买按钮 -->
<navigator
url=
"/pages/plugins/membershiplevelvip/buy/buy"
hover-class=
"none"
class=
"dis-inline"
>
<button
class=
"banner-buy text-size fw-b round margin-top-xxxl"
type=
"default"
size=
"mini"
hover-class=
"none"
>
{{
data_base
.
banner_middle_name
||
'
开通会员
'
}}
</button>
</navigator>
<!-- 数据列表 -->
<view
v-if=
"(data_list || null) != null && data_list.length > 0"
class=
"data-list oh margin-top-xxxl"
>
<block
v-for=
"(item, index) in data_list"
:key=
"index"
class=
"item fl"
>
<view
class=
"item fl tc padding-main border-radius-main bg-white"
>
<view
class=
"single-text cr-base text-size fw-b"
>
{{
item
.
name
}}
</view>
<view
class=
"multi-text cr-grey margin-top-sm"
>
{{
item
.
desc
}}
</view>
<image
class=
"dis-block auto margin-top-sm"
:src=
"item.images_url"
mode=
"scaleToFill"
></image>
</view>
</block>
</view>
</view>
<!-- 富文本 -->
<view
v-if=
"(data_base.banner_bottom_content || null) != null"
class=
"padding-main spacing-mt"
>
<view
class=
"border-radius-main bg-white"
>
<rich-text
:nodes=
"data_base.banner_bottom_content"
></rich-text>
</view>
</view>
</view>
<view
v-else
>
<!-- 提示信息 -->
<component-no-data
:prop-status=
"data_list_loding_status"
:prop-msg=
"data_list_loding_msg"
></component-no-data>
</view>
<!-- 结尾 -->
<component-bottom-line
:prop-status=
"data_bottom_line_status"
></component-bottom-line>
</view>
</
template
>
<
script
>
const
app
=
getApp
();
const
app
=
getApp
();
import
componentNoData
from
"
../../../../components/no-data/no-data
"
;
import
componentBottomLine
from
"
../../../../components/bottom-line/bottom-line
"
;
export
default
{
data
()
{
return
{
data_bottom_line_status
:
false
,
data_list_loding_status
:
1
,
data_list_loding_msg
:
''
,
data_list
:
[],
data_base
:
null
};
},
components
:
{},
props
:
{},
onLoad
(
params
)
{
this
.
init
();
// 显示分享菜单
app
.
globalData
.
show_share_menu
();
},
onShow
()
{},
// 下拉刷新
onPullDownRefresh
()
{
this
.
get_data_list
();
},
// 自定义分享
onShareAppMessage
()
{
var
user_id
=
app
.
globalData
.
get_user_cache_info
(
'
id
'
,
0
)
||
0
;
var
name
=
(
this
.
data_base
||
null
)
!=
null
&&
(
this
.
data_base
.
application_name
||
null
)
!=
null
?
this
.
data_base
.
application_name
:
app
.
globalData
.
data
.
application_title
;
return
{
title
:
name
,
desc
:
app
.
globalData
.
data
.
application_describe
,
path
:
'
/pages/index/index?referrer=
'
+
user_id
};
},
// 分享朋友圈
onShareTimeline
()
{
var
user_id
=
app
.
globalData
.
get_user_cache_info
(
'
id
'
,
0
)
||
0
;
var
name
=
(
this
.
data_base
||
null
)
!=
null
&&
(
this
.
data_base
.
application_name
||
null
)
!=
null
?
this
.
data_base
.
application_name
:
app
.
globalData
.
data
.
application_title
;
return
{
title
:
name
,
query
:
'
referrer=
'
+
user_id
};
},
methods
:
{
init
()
{
// 获取数据
this
.
get_data_list
();
},
// 获取数据
get_data_list
()
{
var
self
=
this
;
uni
.
showLoading
({
title
:
"
加载中...
"
});
if
(
self
.
data_list
.
length
<=
0
)
{
self
.
setData
({
data_list_loding_status
:
1
});
}
uni
.
request
({
url
:
app
.
globalData
.
get_request_url
(
"
index
"
,
"
index
"
,
"
membershiplevelvip
"
),
method
:
"
POST
"
,
data
:
{},
dataType
:
"
json
"
,
success
:
res
=>
{
uni
.
hideLoading
();
uni
.
stopPullDownRefresh
();
if
(
res
.
data
.
code
==
0
)
{
var
data
=
res
.
data
.
data
;
self
.
setData
({
data_base
:
data
.
base
||
null
,
data_list
:
data
.
data
||
[],
data_list_loding_msg
:
''
,
data_list_loding_status
:
0
,
data_bottom_line_status
:
true
});
// 导航名称
if
((
data
.
base
||
null
)
!=
null
&&
(
data
.
base
.
application_name
||
null
)
!=
null
)
{
uni
.
setNavigationBarTitle
({
title
:
data
.
base
.
application_name
});
}
}
else
{
self
.
setData
({
data_bottom_line_status
:
false
,
data_list_loding_status
:
2
,
data_list_loding_msg
:
res
.
data
.
msg
});
if
(
app
.
globalData
.
is_login_check
(
res
.
data
,
self
,
'
get_data_list
'
))
{
app
.
globalData
.
showToast
(
res
.
data
.
msg
);
}
}
},
fail
:
()
=>
{
uni
.
hideLoading
();
uni
.
stopPullDownRefresh
();
self
.
setData
({
data_bottom_line_status
:
false
,
data_list_loding_status
:
2
,
data_list_loding_msg
:
'
服务器请求出错
'
});
app
.
globalData
.
showToast
(
"
服务器请求出错
"
);
}
});
}
export
default
{
data
()
{
return
{
data_bottom_line_status
:
false
,
data_list_loding_status
:
1
,
data_list_loding_msg
:
''
,
data_list
:
[],
data_base
:
null
};
},
components
:
{
componentNoData
,
componentBottomLine
},
props
:
{},
onLoad
(
params
)
{
this
.
init
();
}
};
// 显示分享菜单
app
.
globalData
.
show_share_menu
();
},
onShow
()
{},
// 下拉刷新
onPullDownRefresh
()
{
this
.
get_data_list
();
},
// 自定义分享
onShareAppMessage
()
{
var
user_id
=
app
.
globalData
.
get_user_cache_info
(
'
id
'
,
0
)
||
0
;
var
name
=
(
this
.
data_base
||
null
)
!=
null
&&
(
this
.
data_base
.
application_name
||
null
)
!=
null
?
this
.
data_base
.
application_name
:
app
.
globalData
.
data
.
application_title
;
return
{
title
:
name
,
desc
:
app
.
globalData
.
data
.
application_describe
,
path
:
'
/pages/index/index?referrer=
'
+
user_id
};
},
// 分享朋友圈
onShareTimeline
()
{
var
user_id
=
app
.
globalData
.
get_user_cache_info
(
'
id
'
,
0
)
||
0
;
var
name
=
(
this
.
data_base
||
null
)
!=
null
&&
(
this
.
data_base
.
application_name
||
null
)
!=
null
?
this
.
data_base
.
application_name
:
app
.
globalData
.
data
.
application_title
;
return
{
title
:
name
,
query
:
'
referrer=
'
+
user_id
};
},
methods
:
{
init
()
{
// 获取数据
this
.
get_data_list
();
},
// 获取数据
get_data_list
()
{
var
self
=
this
;
uni
.
showLoading
({
title
:
"
加载中...
"
});
if
(
self
.
data_list
.
length
<=
0
)
{
self
.
setData
({
data_list_loding_status
:
1
});
}
uni
.
request
({
url
:
app
.
globalData
.
get_request_url
(
"
index
"
,
"
index
"
,
"
membershiplevelvip
"
),
method
:
"
POST
"
,
data
:
{},
dataType
:
"
json
"
,
success
:
res
=>
{
uni
.
hideLoading
();
uni
.
stopPullDownRefresh
();
if
(
res
.
data
.
code
==
0
)
{
var
data
=
res
.
data
.
data
;
self
.
setData
({
data_base
:
data
.
base
||
null
,
data_list
:
data
.
data
||
[],
data_list_loding_msg
:
''
,
data_list_loding_status
:
0
,
data_bottom_line_status
:
true
});
// 导航名称
if
((
data
.
base
||
null
)
!=
null
&&
(
data
.
base
.
application_name
||
null
)
!=
null
)
{
uni
.
setNavigationBarTitle
({
title
:
data
.
base
.
application_name
});
}
}
else
{
self
.
setData
({
data_bottom_line_status
:
false
,
data_list_loding_status
:
2
,
data_list_loding_msg
:
res
.
data
.
msg
});
if
(
app
.
globalData
.
is_login_check
(
res
.
data
,
self
,
'
get_data_list
'
))
{
app
.
globalData
.
showToast
(
res
.
data
.
msg
);
}
}
},
fail
:
()
=>
{
uni
.
hideLoading
();
uni
.
stopPullDownRefresh
();
self
.
setData
({
data_bottom_line_status
:
false
,
data_list_loding_status
:
2
,
data_list_loding_msg
:
'
服务器请求出错
'
});
app
.
globalData
.
showToast
(
"
服务器请求出错
"
);
}
});
}
}
};
</
script
>
<
style
>
/**
* banner
*/
.banner
{
background-color
:
#1d1611
;
background-position
:
center
center
;
background-repeat
:
no-repeat
;
background-size
:
auto
100%
;
position
:
relative
;
height
:
1110
rpx
;
width
:
100%
;
overflow
:
hidden
;
}
.banner
.banner-title
{
font-size
:
60
rpx
;
margin-top
:
50
rpx
;
color
:
#f9d681
;
height
:
68
rpx
;
overflow
:
hidden
;
}
.banner
.submit
{
margin-top
:
60
rpx
;
}
.banner
.submit
button
{
border
:
1
rpx
solid
#f9d681
;
background-color
:
#f9d681
;
color
:
#351d06
;
width
:
320
rpx
;
height
:
80
rpx
;
line-height
:
80
rpx
;
font-size
:
36
rpx
;
border-radius
:
50
rpx
;
font-weight
:
500
;
}
/**
* 等级介绍
*/
.data-list
{
margin-top
:
40
rpx
;
}
.data-list
.item
{
padding
:
15
rpx
;
width
:
calc
(
50%
-
30
rpx
);
}
.data-list
.item
.content
{
overflow
:
hidden
;
border-radius
:
8
rpx
;
background-color
:
#fff
;
padding
:
30
rpx
10
rpx
;
}
.data-list
.item
.content
.title
{
height
:
36
rpx
;
line-height
:
36
rpx
;
font-size
:
36
rpx
;
color
:
#333
;
}
.data-list
.item
.content
.desc
{
height
:
76
rpx
;
line-height
:
38
rpx
;
font-size
:
30
rpx
;
color
:
#999
;
}
.data-list
.item
.content
.title
,
.data-list
.item
.content
.desc
{
margin-bottom
:
15
rpx
;
}
.data-list
.item
.content
image
{
max-width
:
160
rpx
;
max-height
:
160
rpx
;
margin
:
0
auto
;
}
/**
* 富文本
*/
.rich-text
{
padding
:
20
rpx
10
rpx
;
}
@import
'./index.css'
;
</
style
>
\ No newline at end of file
pages/plugins/membershiplevelvip/user/user.css
0 → 100644
浏览文件 @
00745363
/*
* 头部
*/
.head-box
{
background-color
:
#3e2a1c
;
}
.head-item
{
width
:
260
rpx
;
}
.head-item
.avatar
,
.head-item
.avatar
image
{
width
:
130
rpx
;
height
:
130
rpx
!important
;
margin
:
0
auto
;
}
.head-base
{
width
:
calc
(
100%
-
270
rpx
);
}
.head-base
.level-icon
{
width
:
35
rpx
;
height
:
35
rpx
!important
;
}
.head-base
.level-name
{
color
:
#e4cb96
;
}
.head-base
.submit-buy
{
font-size
:
26
rpx
;
height
:
55
rpx
;
line-height
:
55
rpx
;
border
:
1px
solid
#f9d681
;
background-color
:
#f9d681
;
color
:
#351d06
;
right
:
20
rpx
;
bottom
:
20
rpx
;
padding
:
0
20
rpx
;
}
/*
* 导航
*/
.nav
.item
{
width
:
calc
(
50%
-
70
rpx
);
margin-bottom
:
20
rpx
;
}
.nav
.item
:nth-child
(
2
n
)
{
margin-right
:
20
rpx
;
margin-left
:
10
rpx
;
}
.nav
.item
:nth-child
(
2
n
+
1
)
{
margin-left
:
20
rpx
;
margin-right
:
10
rpx
;
}
.nav
.item
image
{
width
:
80
rpx
;
height
:
80
rpx
;
margin
:
0
auto
;
}
/*
* 提示信息
*/
.tips-container
.tips-item
{
padding
:
0
10
rpx
;
}
.tips-container
.not-opening-vip-desc
{
background
:
#def2fd
;
border
:
1px
solid
#cfeeff
;
color
:
#1490d2
;
padding
:
10
rpx
;
font-size
:
26
rpx
;
border-radius
:
2px
;
}
\ No newline at end of file
pages/plugins/membershiplevelvip/user/user.vue
浏览文件 @
00745363
此差异已折叠。
点击以展开。
pages/plugins/wallet/user/user.vue
浏览文件 @
00745363
...
...
@@ -9,7 +9,7 @@
<view
class=
"fl cr-gray unit"
>
元
</view>
</view>
<view
class=
"item oh margin-top-sm"
>
<view
class=
"fl cr-bas"
>
冻结
</view>
<view
class=
"fl cr-bas
e
"
>
冻结
</view>
<view
class=
"fl cr-red fw-b single-text margin-left-sm margin-right-sm"
>
{{
user_wallet
.
frozen_money
||
'
0.00
'
}}
</view>
<view
class=
"fl cr-gray unit"
>
元
</view>
</view>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录