Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CFFP-HB
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
Chao Sun
CFFP-HB
Commits
6a6f8fe5
Commit
6a6f8fe5
authored
Nov 18, 2022
by
sunchao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
轮播图组件化
parent
87f2b601
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
88 additions
and
41 deletions
+88
-41
components/carousel/carousel.vue
+39
-0
manifest.json
+2
-4
pages/courselist/courselist.vue
+14
-6
pages/index/index.vue
+13
-21
pages/orderConfirm/orderConfirm.vue
+20
-10
No files found.
components/carousel/carousel.vue
0 → 100644
View file @
6a6f8fe5
<
template
>
<view
class=
"banner"
>
<view
class=
"uni-margin-wrap"
>
<swiper
class=
"swiper"
circular
:indicator-dots=
"indicatorDots"
:autoplay=
"autoplay"
:interval=
"interval"
:duration=
"duration"
>
<swiper-item
v-for=
"bannerItem in carouselList"
>
<navigator
url=
"bannerItem.destinationAddress"
><image
:src=
"bannerItem.filePath"
mode=
"widthFix"
></image></navigator>
</swiper-item>
</swiper>
</view>
</view>
</
template
>
<
script
>
export
default
{
props
:[
'carouselList'
],
data
(){
return
{
indicatorDots
:
true
,
autoplay
:
true
,
interval
:
2000
,
duration
:
500
,
}
},
name
:
'carousel'
,
components
:{},
onLoad
(){
console
.
log
(
this
.
fileUploadItemList
)
},
methods
:{
}
}
</
script
>
<
style
lang=
"scss"
>
</
style
>
\ No newline at end of file
manifest.json
View file @
6a6f8fe5
...
@@ -64,10 +64,8 @@
...
@@ -64,10 +64,8 @@
},
},
"ad"
:
{},
"ad"
:
{},
"payment"
:
{
"payment"
:
{
"weixin"
:
{
"alipay"
:
{
"__platform__"
:
[
"ios"
,
"android"
],
"__platform__"
:
[
"ios"
,
"android"
]
"appid"
:
"wxec09b9be6cff4eb3"
,
"UniversalLinks"
:
""
}
}
},
},
"oauth"
:
{
"oauth"
:
{
...
...
pages/courselist/courselist.vue
View file @
6a6f8fe5
<
template
>
<
template
>
<view>
<view
:class=
"
{pad:onlyShowList!=0}">
<carousel
:carouselList=
"fileUploadItemCFFPList"
v-if=
"onlyShowList!=0"
></carousel>
<h4
v-if=
"cffpCourseInfos.length
<
=
0
"
class=
"noListTip"
>
暂无课程列表
</h4>
<h4
v-if=
"cffpCourseInfos.length
<
=
0
"
class=
"noListTip"
>
暂无课程列表
</h4>
<view
class=
"ulBox"
v-if=
"cffpCourseInfos.length>0"
>
<view
class=
"ulBox"
v-if=
"cffpCourseInfos.length>0"
>
<view
class=
"liBox"
v-for=
"item in cffpCourseInfos"
:key=
"item.fileId"
@
click=
"goDetail(item)"
>
<view
class=
"liBox"
v-for=
"item in cffpCourseInfos"
:key=
"item.fileId"
@
click=
"goDetail(item)"
>
...
@@ -7,27 +8,31 @@
...
@@ -7,27 +8,31 @@
</view>
</view>
</view>
</view>
</view>
</view>
<tabBar
:currentPage=
"currentPage"
v-if=
"
fromPage!='index'
"
></tabBar>
<tabBar
:currentPage=
"currentPage"
v-if=
"
onlyShowList!=0
"
></tabBar>
</
template
>
</
template
>
<
script
>
<
script
>
import
api
from
"../../api/api"
;
import
api
from
"../../api/api"
;
import
courseItem
from
"@/components/courseItem/courseItem.vue"
;
import
courseItem
from
"@/components/courseItem/courseItem.vue"
;
import
tabBar
from
'../../components/tabBar/tabBar.vue'
;
import
tabBar
from
'../../components/tabBar/tabBar.vue'
;
import
carousel
from
'@/components/carousel/carousel.vue'
export
default
{
export
default
{
props
:[
'tagIds'
,
'
fromPage
'
],
props
:[
'tagIds'
,
'
onlyShowList
'
],
data
(){
data
(){
return
{
return
{
cffpCourseInfos
:[],
cffpCourseInfos
:[],
currentPage
:
'courselist'
currentPage
:
'courselist'
,
fileUploadItemCFFPList
:[]
}
}
},
},
name
:
'courselist'
,
name
:
'courselist'
,
components
:{
components
:{
courseItem
,
courseItem
,
tabBar
tabBar
,
carousel
},
},
onLoad
(){
onLoad
(){
this
.
fileUploadItemCFFPList
=
uni
.
getStorageSync
(
'fileUploadItemCFFPList'
);
},
},
methods
:{
methods
:{
goDetail
(
item
){
goDetail
(
item
){
...
@@ -76,5 +81,7 @@
...
@@ -76,5 +81,7 @@
margin-bottom
:
10
rpx
;
margin-bottom
:
10
rpx
;
padding
:
10
rpx
;
padding
:
10
rpx
;
}
}
.pad
{
padding
:
0
30
rpx
100
rpx
30
rpx
;
}
</
style
>
</
style
>
\ No newline at end of file
pages/index/index.vue
View file @
6a6f8fe5
...
@@ -8,20 +8,12 @@
...
@@ -8,20 +8,12 @@
</view>
</view>
<view
class=
"search"
>
<view
class=
"search"
>
<input
class=
"searchInput"
type=
"text"
name=
""
id=
""
/>
<input
class=
"searchInput"
type=
"text"
name=
""
id=
""
/>
<text
class=
"iconfont icon-sousuo"
></text>
<text
class=
"iconfont icon-sousuo"
@
click=
"searchBtn()"
></text>
<text
class=
"iconfont icon-xiaoxi"
></text>
<text
class=
"iconfont icon-xiaoxi"
></text>
<text
class=
"system_msg"
@
click=
"jumpToSystemMsg()"
>
{{
messageUnreadCount
}}
</text>
<text
class=
"system_msg"
@
click=
"jumpToSystemMsg()"
>
{{
messageUnreadCount
}}
</text>
</view>
</view>
<view
class=
"banner"
>
<!--轮播组件-->
<view
class=
"uni-margin-wrap"
>
<carousel
:carouselList=
"cffpUserInfo.fileUploadItemList"
></carousel>
<swiper
class=
"swiper"
circular
:indicator-dots=
"indicatorDots"
:autoplay=
"autoplay"
:interval=
"interval"
:duration=
"duration"
>
<swiper-item
v-for=
"bannerItem in cffpUserInfo.fileUploadItemList"
>
<navigator
url=
"bannerItem.destinationAddress"
><image
:src=
"bannerItem.filePath"
mode=
"widthFix"
></image></navigator>
</swiper-item>
</swiper>
</view>
</view>
</view>
</view>
<view
class=
"message"
@
click=
"jumpToAnnouncement()"
>
<view
class=
"message"
@
click=
"jumpToAnnouncement()"
>
<view
style=
"display: flex;align-items: center;"
>
<view
style=
"display: flex;align-items: center;"
>
...
@@ -48,7 +40,7 @@
...
@@ -48,7 +40,7 @@
<h4>
精品课程
</h4>
<h4>
精品课程
</h4>
<view
@
click=
"goToCourselist()"
>
更多
<text
class=
"iconfont icon-youjiantou"
></text></view>
<view
@
click=
"goToCourselist()"
>
更多
<text
class=
"iconfont icon-youjiantou"
></text></view>
</view>
</view>
<courselist
:tagIds=
"[1111]"
:
fromPage=
"'index'
"
></courselist>
<courselist
:tagIds=
"[1111]"
:
onlyShowList=
"0
"
></courselist>
</view>
</view>
<tabBar
:currentPage=
"currentPage"
></tabBar>
<tabBar
:currentPage=
"currentPage"
></tabBar>
</view>
</view>
...
@@ -63,6 +55,7 @@
...
@@ -63,6 +55,7 @@
import
courselist
from
'@/pages/courselist/courselist.vue'
;
import
courselist
from
'@/pages/courselist/courselist.vue'
;
import
api
from
"../../api/api"
;
import
api
from
"../../api/api"
;
import
tabBar
from
'../../components/tabBar/tabBar.vue'
;
import
tabBar
from
'../../components/tabBar/tabBar.vue'
;
import
carousel
from
'@/components/carousel/carousel.vue'
;
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
...
@@ -84,20 +77,17 @@
...
@@ -84,20 +77,17 @@
name
:
''
,
name
:
''
,
type
:
''
//类型1,区域中心,2工作室
type
:
''
//类型1,区域中心,2工作室
},
},
background
:
[
'color1'
,
'color2'
,
'color3'
],
indicatorDots
:
true
,
autoplay
:
true
,
interval
:
2000
,
duration
:
500
,
announcementInfo
:
null
,
announcementInfo
:
null
,
messageUnreadCount
:
null
,
messageUnreadCount
:
null
,
tagIds
:
123
,
tagIds
:
123
,
currentPage
:
'index'
,
currentPage
:
'index'
,
carouselList
:[]
}
}
},
},
components
:{
components
:{
courselist
,
courselist
,
tabBar
tabBar
,
carousel
},
},
onLoad
()
{
onLoad
()
{
this
.
queryAreaCenterInfo
();
this
.
queryAreaCenterInfo
();
...
@@ -125,6 +115,7 @@
...
@@ -125,6 +115,7 @@
if
(
res
[
'success'
]){
if
(
res
[
'success'
]){
this
.
cffpUserInfo
=
res
[
'data'
];
this
.
cffpUserInfo
=
res
[
'data'
];
// this.cffpUserInfo.logo = res['logo'];
// this.cffpUserInfo.logo = res['logo'];
uni
.
setStorageSync
(
'fileUploadItemCFFPList'
,
this
.
cffpUserInfo
[
'fileUploadItemCFFPList'
])
}
else
{
}
else
{
uni
.
showToast
({
uni
.
showToast
({
title
:
res
[
'message'
],
title
:
res
[
'message'
],
...
@@ -170,6 +161,9 @@
...
@@ -170,6 +161,9 @@
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
'../../pages/courselist/courselist'
url
:
'../../pages/courselist/courselist'
})
})
},
searchBtn
(){
}
}
},
},
onShow
()
{
onShow
()
{
...
@@ -210,8 +204,6 @@
...
@@ -210,8 +204,6 @@
margin
:
30
rpx
auto
;
margin
:
30
rpx
auto
;
align-items
:
center
;
align-items
:
center
;
.searchInput{
.searchInput{
height
:
50
rpx
;
line-height
:
50
rpx
;
border-radius
:
60
rpx
;
border-radius
:
60
rpx
;
width
:
95%
;
width
:
95%
;
background
:
linear-gradient
(
to
right
,
#E6F5FC
,
#FDE9F2
);
background
:
linear-gradient
(
to
right
,
#E6F5FC
,
#FDE9F2
);
...
@@ -222,7 +214,7 @@
...
@@ -222,7 +214,7 @@
font-size
:
60
rpx
;
font-size
:
60
rpx
;
position
:
absolute
;
position
:
absolute
;
right
:
80
rpx
;
right
:
80
rpx
;
top
:
1
4
rpx
;
top
:
1
0
rpx
;
opacity
:
.7
;
opacity
:
.7
;
}
}
.icon-xiaoxi
{
.icon-xiaoxi
{
...
...
pages/orderConfirm/orderConfirm.vue
View file @
6a6f8fe5
...
@@ -153,17 +153,27 @@
...
@@ -153,17 +153,27 @@
methods
:
{
methods
:
{
// 支付
// 支付
pay
(){
pay
(){
if
(
this
.
paymentMethod
===
1
){
// if(this.paymentMethod===1){
const
param
=
{
// const param = {
orderId
:
this
.
orderId
,
// orderId:this.orderId,
amount
:
this
.
totalPrice
,
// amount:this.totalPrice,
paymentMethod
:
this
.
paymentMethod
,
// paymentMethod:this.paymentMethod,
userId
:
this
.
userId
// userId:this.userId
}
// }
api
.
wxAppPay
(
param
).
then
(
res
=>
{
// api.wxAppPay(param).then(res=>{
console
.
log
(
res
)
// console.log(res)
})
// })
// }
uni
.
requestPayment
({
provider
:
'alipay'
,
orderInfo
:
'alipay_root_cert_sn=687b59193f3f462dd5336e5abf83c5d8_02941eef3187dddf3d3b83462e1dfcf6&alipay_sdk=alipay-sdk-java-dynamicVersionNo&app_cert_sn=f974d178cb6bd0cd2c4e3dca07825e92&app_id=2021003161624312&biz_content=%7B%22out_trade_no%22%3A%22YD2022101000001%22%2C%22product_code%22%3A%22FACE_TO_FACE_PAYMENT%22%2C%22subject%22%3A%22%E6%88%91%E6%98%AF%E6%B5%8B%E8%AF%95%E6%95%B0%E6%8D%AE%22%2C%22total_amount%22%3A%220.00%22%7D&charset=UTF-8&format=json&method=alipay.trade.app.pay¬ify_url=https%3A%2F%2Fmdev.zuihuibi.cn%2Fapi%2Fpay%2FwxPayNotify&sign=RyxnIM9pBC4V4sfFXZc2ksb0nwRWtbJjQQ%2BzNOJ083AA0rl%2BP206AWerCJatS2D%2BWUjarSc8nZXfqbJ9CX0xZwWoDv6QelM5SOZmzcnPUyh4i3H8K6tj6fo2eFbv%2Bn%2F7Mep%2BfXmepAfArzzxedoSLnwIN%2Bp%2Fsiw6c%2Fkg4asBIoT4g%2FRHjdgMuycm%2B5zOGOGvzzGA2DOuD%2F8mnsnGSgu0gRGMXY9PfPNPULRKPosHw4%2Bc%2BkWzcKvy2j7izUGcGscixNdtbwjQVrfS2jrsVoVc6OCmKGGJEklIRG%2F3SWnyoIPCwO42KAbJOtb6vxZ0C8a7wvo%2B%2BBtRjZ2%2Fqv7SGZexWA%3D%3D&sign_type=RSA2×tamp=2022-11-18+09%3A32%3A58&version=1.0'
,
//支付宝订单数据
success
:
function
(
res
)
{
alert
(
'success:'
+
JSON
.
stringify
(
res
));
},
fail
:
function
(
err
)
{
alert
(
'fail:'
+
JSON
.
stringify
(
err
));
}
}
});
},
},
// 积分查询
// 积分查询
queryByUserIdFortuneStatistic
(){
queryByUserIdFortuneStatistic
(){
...
...
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