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
097b1b1f
Commit
097b1b1f
authored
Jan 05, 2023
by
sunchao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://139.224.139.2:9091/chaosun/CFFP
into dev
parents
bbf0933d
b30043d5
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
641 additions
and
414 deletions
+641
-414
components/login/login.vue
+2
-2
components/myteam/time-picker.vue
+7
-4
manifest.json
+12
-0
pages/courseDetail/courseDetail.vue
+104
-58
pages/invitationRegister/invitationlogin.vue
+1
-1
pages/myPoints/myPoints.vue
+6
-4
pages/myShare/myShare.vue
+88
-65
pages/orderConfirm/orderConfirm.vue
+363
-279
pages/saleCourseLists/saleCourseLists.vue
+3
-1
util/currentDate.js
+55
-0
No files found.
components/login/login.vue
View file @
097b1b1f
...
@@ -12,9 +12,9 @@
...
@@ -12,9 +12,9 @@
{{
loginTypeName
}}
{{
loginTypeName
}}
</view>
</view>
<form>
<form>
<view
class=
"inputItem"
v-if=
"loginType==='register'"
>
<!--
<view
class=
"inputItem"
v-if=
"loginType==='register'"
>
<input
class=
"uni-input"
name=
"invitationCode"
placeholder=
"输入邀请码(非必填)"
v-model=
"invitation_code"
/>
<input
class=
"uni-input"
name=
"invitationCode"
placeholder=
"输入邀请码(非必填)"
v-model=
"invitation_code"
/>
</view>
</view>
-->
<view
class=
"inputItem"
v-if=
"loginType!=='agentlogin'"
>
<view
class=
"inputItem"
v-if=
"loginType!=='agentlogin'"
>
<input
class=
"uni-input"
name=
"mobileNo"
placeholder=
"输入手机号"
v-model=
"form.mobile"
maxlength=
"11"
/>
<input
class=
"uni-input"
name=
"mobileNo"
placeholder=
"输入手机号"
v-model=
"form.mobile"
maxlength=
"11"
/>
</view>
</view>
...
...
components/myteam/time-picker.vue
View file @
097b1b1f
...
@@ -10,6 +10,7 @@
...
@@ -10,6 +10,7 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
fmdata
}
from
'@/util/currentDate.js'
export
default
{
export
default
{
props
:{
props
:{
fields
:{
fields
:{
...
@@ -22,16 +23,18 @@
...
@@ -22,16 +23,18 @@
name
:
"time-picker"
,
name
:
"time-picker"
,
data
()
{
data
()
{
return
{
return
{
queryDate
:
`
${
new
Date
().
getFullYear
()}
-
${
new
Date
().
getMonth
()
+
1
}
`
,
queryDate
:
fmdata
(
new
Date
(),
'M'
),
// queryDate: `${new Date().getFullYear()}-${new Date().getMonth() + 1}`,
maxDate
:
`
${
new
Date
().
getFullYear
()}
-
${
new
Date
().
getMonth
()
+
1
}
`
,
maxDate
:
`
${
new
Date
().
getFullYear
()}
-
${
new
Date
().
getMonth
()
+
1
}
`
,
};
};
},
},
mounted
()
{
mounted
()
{
if
(
this
.
fields
==
"month"
){
if
(
this
.
fields
==
"month"
){
this
.
queryDate
=
`
${
new
Date
().
getFullYear
()}
-
${
new
Date
().
getMonth
()
+
1
}
`
// this.queryDate = `${new Date().getFullYear()}-${new Date().getMonth() + 1}`
this
.
queryDate
=
fmdata
(
new
Date
(),
'M'
);
}
else
if
(
this
.
fields
==
"year"
)
{
}
else
if
(
this
.
fields
==
"year"
)
{
this
.
queryDate
=
`
${
new
Date
().
getFullYear
()}
`
//
this.queryDate = `${new Date().getFullYear()}`
console
.
log
(
this
.
queryDate
,
'cak'
)
this
.
queryDate
=
fmdata
(
new
Date
(),
'Y'
);
}
else
{
}
else
{
return
false
return
false
}
}
...
...
manifest.json
View file @
097b1b1f
...
@@ -136,6 +136,10 @@
...
@@ -136,6 +136,10 @@
}
}
}
}
}
}
},
"nvueLaunchMode"
:
""
,
"uniStatistics"
:
{
"enable"
:
false
}
}
},
},
/*
快应用特有相关
*/
/*
快应用特有相关
*/
...
@@ -187,6 +191,14 @@
...
@@ -187,6 +191,14 @@
}
}
}
}
}
}
},
"uniStatistics"
:
{
"enable"
:
false
},
"optimization"
:
{
"treeShaking"
:
{
"enable"
:
true
}
}
}
},
},
"_spaceID"
:
"mp-68e17e23-e517-4839-8210-27480303cc51"
,
"_spaceID"
:
"mp-68e17e23-e517-4839-8210-27480303cc51"
,
...
...
pages/courseDetail/courseDetail.vue
View file @
097b1b1f
...
@@ -22,8 +22,8 @@
...
@@ -22,8 +22,8 @@
<!-- v-show="!sliceshare" -->
<!-- v-show="!sliceshare" -->
<view
class=
"courseBannerBox"
v-if=
"!sliceshare"
>
<view
class=
"courseBannerBox"
v-if=
"!sliceshare"
>
<video
v-if=
"isRenderVideo"
id=
"myVideo"
:src=
"courseInfo.filePathOss"
:initial-time=
"viewTime"
<video
v-if=
"isRenderVideo"
id=
"myVideo"
:src=
"courseInfo.filePathOss"
:initial-time=
"viewTime"
object-fit=
"contain"
class=
"videoBox"
:poster=
"courseInfo.fileFirstImage"
object-fit=
"contain"
class=
"videoBox"
:poster=
"courseInfo.fileFirstImage"
:title=
"courseInfo.fileTitle"
:title=
"courseInfo.fileTitle"
@
play=
"playVideo"
@
pause=
"pause"
@
timeupdate=
"timeupdate"
style=
"width: 100vw;height: 320rpx;"
></video>
@
play=
"playVideo"
@
pause=
"pause"
@
timeupdate=
"timeupdate"
style=
"width: 100vw;height: 320rpx;"
></video>
</view>
</view>
<!-- 课程详情图 -->
<!-- 课程详情图 -->
...
@@ -39,6 +39,17 @@
...
@@ -39,6 +39,17 @@
</view>
</view>
<text>
唤醒App
</text>
<text>
唤醒App
</text>
</view>
</view>
<!-- v-if="isWeixin == true" -->
<!--
<view
class=
"awakenApp"
>
<wx-open-launch-app
id=
"launch-btn"
appid=
"wxb591d0034cdcf0cd"
extinfo=
"extinfo"
>
<script
type=
"text/wxtag-template"
>
<button
class=
"btn"
>
打开/下载App
</button>
</script>
</wx-open-launch-app>
</view>
-->
<strong>
</strong>
</view>
</view>
</view>
</view>
<view
class=
"dataBox"
>
<view
class=
"dataBox"
>
...
@@ -139,6 +150,7 @@
...
@@ -139,6 +150,7 @@
},
},
data
()
{
data
()
{
return
{
return
{
isWeixin
:
false
,
isRenderVideo
:
false
,
isRenderVideo
:
false
,
fileId
:
null
,
fileId
:
null
,
lecturerId
:
null
,
lecturerId
:
null
,
...
@@ -170,13 +182,13 @@
...
@@ -170,13 +182,13 @@
shareCode
:
null
,
shareCode
:
null
,
sharelogin
:
false
,
sharelogin
:
false
,
startTime
:
''
,
startTime
:
''
,
newCourseInfo
:{},
newCourseInfo
:
{},
isPauseFlag
:
true
,
isPauseFlag
:
true
,
CONFIG
:
{
CONFIG
:
{
android
:
'https://a.app.qq.com/o/simple.jsp?pkgname=com.xiaoxiao.shihaoo'
,
android
:
'https://a.app.qq.com/o/simple.jsp?pkgname=com.xiaoxiao.shihaoo'
,
ios
:
'https://apps.apple.com/cn/app/%E6%98%AF%E5%A5%BD/id1457958161'
,
ios
:
'https://apps.apple.com/cn/app/%E6%98%AF%E5%A5%BD/id1457958161'
,
scheme
:
'com.qdxxzy.user://'
scheme
:
'com.qdxxzy.user://'
}
}
};
};
},
},
methods
:
{
methods
:
{
...
@@ -188,17 +200,17 @@
...
@@ -188,17 +200,17 @@
this
.
userId
=
val
this
.
userId
=
val
uni
.
setStorageSync
(
'cffp_userId'
,
this
.
userId
);
uni
.
setStorageSync
(
'cffp_userId'
,
this
.
userId
);
this
.
courseDetail
();
this
.
courseDetail
();
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
getuserRead
(
this
.
courseInfo
.
status
)
this
.
getuserRead
(
this
.
courseInfo
.
status
)
},
500
)
},
500
)
}
else
{
}
else
{
this
.
sharelogin
=
false
this
.
sharelogin
=
false
}
}
},
},
/**
/**
* 判断是否为微信浏览器
* 判断是否为微信浏览器
* 兼容ios
* 兼容ios
* */
* */
// isWeiXin() {
// isWeiXin() {
// return /micromessenger/i.test(navigator.userAgent.toLowerCase()) || typeof navigator.wxuserAgent !== 'undefined'
// return /micromessenger/i.test(navigator.userAgent.toLowerCase()) || typeof navigator.wxuserAgent !== 'undefined'
// },
// },
...
@@ -218,11 +230,11 @@
...
@@ -218,11 +230,11 @@
// }
// }
// document.body.removeChild(ifr);
// document.body.removeChild(ifr);
// }, 2000);
// }, 2000);
// ifr.setAttribute('src', url);
// ifr.setAttribute('src', url);
// ifr.setAttribute('style', 'display:none');
// ifr.setAttribute('style', 'display:none');
// document.body.appendChild(ifr);
// document.body.appendChild(ifr);
// setTimeout(function () { //启动app时间较长处理
// setTimeout(function () { //启动app时间较长处理
// let t2 = Date.now();
// let t2 = Date.now();
// if (t2 - t1
<
t
+
100
)
{
// if (t2 - t1
<
t
+
100
)
{
...
@@ -240,9 +252,9 @@
...
@@ -240,9 +252,9 @@
// }, 1000);
// }, 1000);
// }
// }
// },
// },
/**
/**
* 超时跳转h5页面
* 超时跳转h5页面
* */
* */
// goConfirmAddr() {
// goConfirmAddr() {
// let { isAndroid } = judgePhoneType();
// let { isAndroid } = judgePhoneType();
// window.location.href = !isAndroid ? CONFIG.ios : CONFIG.android ;
// window.location.href = !isAndroid ? CONFIG.ios : CONFIG.android ;
...
@@ -250,7 +262,6 @@
...
@@ -250,7 +262,6 @@
jumpapp
()
{
jumpapp
()
{
let
platform
=
uni
.
getSystemInfoSync
().
platform
let
platform
=
uni
.
getSystemInfoSync
().
platform
if
(
platform
==
'ios'
)
{
if
(
platform
==
'ios'
)
{
// var loadDateTime = new Date();
window
.
location
.
href
=
"https://mcffp.anjibao.cn/app/"
;
window
.
location
.
href
=
"https://mcffp.anjibao.cn/app/"
;
// window.setTimeout(function() { //如果没有安装app,便会执行setTimeout跳转下载页
// window.setTimeout(function() { //如果没有安装app,便会执行setTimeout跳转下载页
// var timeOutDateTime = new Date();
// var timeOutDateTime = new Date();
...
@@ -262,29 +273,17 @@
...
@@ -262,29 +273,17 @@
// }, 500);
// }, 500);
}
else
if
(
platform
==
'android'
)
{
}
else
if
(
platform
==
'android'
)
{
window
.
location
.
href
=
"cffpapp://"
;
// window.location.href = "cffpapp://";
// window.open('cffpapp://');
// var loadDateTime = new Date();
// window.setTimeout(function() { //如果没有安装app,便会执行setTimeout跳转下载页
// var timeOutDateTime = new Date();
// if (timeOutDateTime - loadDateTime
<
500
)
{
// } else {
// // window.location = "https://mdev.anjibao.cn/cffp/app.ipa"; //ios下载地址
// window.location = "www.baidu.com"; //ios下载地址
// }
// }, 500);
}
}
},
},
goBack
()
{
goBack
()
{
let
back
=
getCurrentPages
();
let
back
=
getCurrentPages
();
if
(
back
&&
back
.
length
>
1
)
{
if
(
back
&&
back
.
length
>
1
)
{
uni
.
navigateBack
({
uni
.
navigateBack
({
delta
:
1
delta
:
1
});
});
}
else
{
}
else
{
history
.
back
();
history
.
back
();
}
}
},
},
// 监听空白关闭
// 监听空白关闭
...
@@ -413,7 +412,7 @@
...
@@ -413,7 +412,7 @@
}
}
if
(
this
.
courseInfo
.
status
==
2
)
{
if
(
this
.
courseInfo
.
status
==
2
)
{
this
.
findVideoPlayback
();
this
.
findVideoPlayback
();
}
else
{
}
else
{
this
.
isRenderVideo
=
true
;
this
.
isRenderVideo
=
true
;
}
}
}
}
...
@@ -450,16 +449,16 @@
...
@@ -450,16 +449,16 @@
});
});
}
else
{
}
else
{
this
.
videoContext
.
pause
();
this
.
videoContext
.
pause
();
if
(
this
.
fileId
!=
item
.
fileId
)
{
if
(
this
.
fileId
!=
item
.
fileId
)
{
// 当点击的课程和当前播放的课程不一致时,执行此方法
// 当点击的课程和当前播放的课程不一致时,执行此方法
uni
.
showLoading
({
uni
.
showLoading
({
title
:
'加载中'
title
:
'加载中'
});
});
this
.
newCourseInfo
=
{
this
.
newCourseInfo
=
{
fileId
:
item
.
fileId
,
fileId
:
item
.
fileId
,
packFileId
:
item
.
packFileId
,
packFileId
:
item
.
packFileId
,
}
}
if
(
this
.
isPauseFlag
)
{
if
(
this
.
isPauseFlag
)
{
this
.
pause
()
this
.
pause
()
}
}
}
}
...
@@ -478,20 +477,20 @@
...
@@ -478,20 +477,20 @@
viewTime
:
Math
.
floor
(
this
.
viewTime
),
viewTime
:
Math
.
floor
(
this
.
viewTime
),
playbackStatus
:
this
.
viewTime
>=
this
.
totalTime
?
'2'
:
'1'
playbackStatus
:
this
.
viewTime
>=
this
.
totalTime
?
'2'
:
'1'
}
}
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
if
(
this
.
viewTime
==
0
)
{
if
(
this
.
viewTime
==
0
)
{
resolve
(
'success'
);
resolve
(
'success'
);
return
;
return
;
}
}
api
.
saveVideoPlayback
(
param
).
then
(
res
=>
{
api
.
saveVideoPlayback
(
param
).
then
(
res
=>
{
if
(
res
[
'success'
])
{
if
(
res
[
'success'
])
{
this
.
playbackId
=
res
[
'data'
][
'id'
];
this
.
playbackId
=
res
[
'data'
][
'id'
];
console
.
log
(
'save已经执行完毕'
);
console
.
log
(
'save已经执行完毕'
);
resolve
(
'success'
);
resolve
(
'success'
);
}
else
{
}
else
{
reject
(
'fail'
)
reject
(
'fail'
)
}
}
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
reject
(
'fail'
)
reject
(
'fail'
)
})
})
})
})
...
@@ -509,7 +508,7 @@
...
@@ -509,7 +508,7 @@
api
.
findVideoPlayback
(
param
).
then
(
res
=>
{
api
.
findVideoPlayback
(
param
).
then
(
res
=>
{
if
(
res
[
'success'
])
{
if
(
res
[
'success'
])
{
this
.
videoPlaybackInfo
=
res
[
'data'
];
this
.
videoPlaybackInfo
=
res
[
'data'
];
console
.
log
(
'查询视频播放轨迹结果====='
,
this
.
videoPlaybackInfo
)
console
.
log
(
'查询视频播放轨迹结果====='
,
this
.
videoPlaybackInfo
)
this
.
viewTime
=
this
.
videoPlaybackInfo
.
viewTime
this
.
viewTime
=
this
.
videoPlaybackInfo
.
viewTime
this
.
viewTime
=
this
.
videoPlaybackInfo
.
viewTime
?
this
.
videoPlaybackInfo
.
viewTime
:
0
;
this
.
viewTime
=
this
.
videoPlaybackInfo
.
viewTime
?
this
.
videoPlaybackInfo
.
viewTime
:
0
;
this
.
totalTime
=
this
.
videoPlaybackInfo
.
totalTime
?
this
.
videoPlaybackInfo
.
totalTime
:
0
;
this
.
totalTime
=
this
.
videoPlaybackInfo
.
totalTime
?
this
.
videoPlaybackInfo
.
totalTime
:
0
;
...
@@ -518,7 +517,7 @@
...
@@ -518,7 +517,7 @@
// 跳转到指定位置
// 跳转到指定位置
this
.
videoContext
.
seek
(
this
.
viewTime
);
this
.
videoContext
.
seek
(
this
.
viewTime
);
uni
.
hideLoading
();
uni
.
hideLoading
();
}
else
{
}
else
{
this
.
isRenderVideo
=
true
;
this
.
isRenderVideo
=
true
;
this
.
totalTime
=
this
.
viewTime
=
0
;
this
.
totalTime
=
this
.
viewTime
=
0
;
// 跳转到指定位置
// 跳转到指定位置
...
@@ -529,9 +528,9 @@
...
@@ -529,9 +528,9 @@
},
},
// 点击播放
// 点击播放
playVideo
(
e
)
{
playVideo
(
e
)
{
console
.
log
(
'playVideo'
,
this
.
totalTime
,
this
.
viewTime
)
console
.
log
(
'playVideo'
,
this
.
totalTime
,
this
.
viewTime
)
this
.
isPauseFlag
=
false
;
this
.
isPauseFlag
=
false
;
if
(
this
.
viewTime
>=
this
.
totalTime
)
{
if
(
this
.
viewTime
>=
this
.
totalTime
)
{
this
.
viewTime
=
0
;
this
.
viewTime
=
0
;
this
.
videoContext
.
seek
(
this
.
viewTime
);
this
.
videoContext
.
seek
(
this
.
viewTime
);
}
}
...
@@ -547,14 +546,14 @@
...
@@ -547,14 +546,14 @@
},
},
// // 暂停播放
// // 暂停播放
async
pause
()
{
async
pause
()
{
if
(
this
.
courseInfo
.
status
!=
1
){
if
(
this
.
courseInfo
.
status
!=
1
)
{
console
.
log
(
'pause'
)
console
.
log
(
'pause'
)
this
.
isPauseFlag
=
true
;
this
.
isPauseFlag
=
true
;
if
(
this
.
timer
)
{
if
(
this
.
timer
)
{
clearInterval
(
this
.
timer
)
clearInterval
(
this
.
timer
)
}
}
const
result
=
await
this
.
saveVideoPlayback
()
const
result
=
await
this
.
saveVideoPlayback
()
if
(
result
==
'success'
&&
this
.
newCourseInfo
.
fileId
)
{
if
(
result
==
'success'
&&
this
.
newCourseInfo
.
fileId
)
{
console
.
log
(
'新的课程要进行赋值查询了'
)
console
.
log
(
'新的课程要进行赋值查询了'
)
this
.
fileId
=
this
.
newCourseInfo
.
fileId
;
this
.
fileId
=
this
.
newCourseInfo
.
fileId
;
this
.
courseInfo
.
packFileId
=
this
.
newCourseInfo
.
packFileId
;
this
.
courseInfo
.
packFileId
=
this
.
newCourseInfo
.
packFileId
;
...
@@ -615,6 +614,27 @@
...
@@ -615,6 +614,27 @@
var
url
=
window
.
location
.
href
.
split
(
'#'
)[
0
]
var
url
=
window
.
location
.
href
.
split
(
'#'
)[
0
]
hshare
(
data
,
url
)
hshare
(
data
,
url
)
},
},
// 唤醒app 测试
JsApiTicketApi
()
{
let
WxConfigRequestVO
=
{
url
:
window
.
location
.
href
.
split
(
'#'
)[
0
],
systemType
:
'1'
}
api
.
Wxshare
(
WxConfigRequestVO
).
then
(
res
=>
{
console
.
log
(
res
,
'第三步'
);
jWeixin
.
config
({
debug
:
false
,
//调试的时候需要 在app上回弹出errmg:config ok 的时候就证明没问题了 这时候就可以改为false
appId
:
res
.
data
.
appId
,
//appid
timestamp
:
res
.
data
.
timestamp
,
//时间戳
nonceStr
:
res
.
data
.
nonceStr
,
//随机串
signature
:
res
.
data
.
signature
,
//签名
jsApiList
:
res
.
data
.
jsApiList
//必填 是下面需要用到的方法集合
})
if
(
callback
)
{
callback
()
}
})
},
},
},
...
@@ -624,6 +644,8 @@
...
@@ -624,6 +644,8 @@
if
(
option
.
coursesharing
)
{
if
(
option
.
coursesharing
)
{
this
.
userId
=
''
this
.
userId
=
''
this
.
coursesharing
=
option
.
coursesharing
this
.
coursesharing
=
option
.
coursesharing
// this.isWeixin = true; // 是微信端
// this.JsApiTicketApi();
this
.
serialsNo
=
option
.
serialsNo
this
.
serialsNo
=
option
.
serialsNo
this
.
shareCode
=
option
.
shareCode
this
.
shareCode
=
option
.
shareCode
this
.
shareUserId
=
option
.
shareUserId
this
.
shareUserId
=
option
.
shareUserId
...
@@ -636,7 +658,6 @@
...
@@ -636,7 +658,6 @@
uni
.
setStorageSync
(
'h5_coursesharing'
,
this
.
coursesharing
);
uni
.
setStorageSync
(
'h5_coursesharing'
,
this
.
coursesharing
);
this
.
getshareData
()
this
.
getshareData
()
}
}
let
dataForm
=
uni
.
getStorageSync
(
'userinfodataForm'
)
let
dataForm
=
uni
.
getStorageSync
(
'userinfodataForm'
)
this
.
realName
=
dataForm
.
realName
this
.
realName
=
dataForm
.
realName
// this.switchTab(1);
// this.switchTab(1);
...
@@ -645,16 +666,41 @@
...
@@ -645,16 +666,41 @@
this
.
switchTab
(
1
);
this
.
switchTab
(
1
);
this
.
loginType
=
uni
.
getStorageSync
(
'loginType'
)
this
.
loginType
=
uni
.
getStorageSync
(
'loginType'
)
},
},
// mounted() {
// let _this = this;
// var btn = document.getElementById('launch-btn');
// alert(btn)
// btn.addEventListener('launch', function(e) {
// alert('success')
// console.log('success');
// });
// btn.addEventListener('error', function(e) {
// console.log('fail', e.detail);
// alert('fail')
// uni.showModal({
// title: '系统消息',
// content: '您的手机未找到当前应用,是否去下载?',
// success: function(res) {
// if (res.confirm) {
// window.location.href = _this.versionsData.versionResources
// console.log('用户点击确定');
// } else if (res.cancel) {
// console.log('用户点击取消');
// }
// }
// });
// });
// },
onReady
()
{
onReady
()
{
this
.
videoContext
=
uni
.
createVideoContext
(
'myVideo'
);
this
.
videoContext
=
uni
.
createVideoContext
(
'myVideo'
);
},
},
onUnload
()
{
onUnload
()
{
if
(
this
.
courseInfo
.
status
!=
1
&&
this
.
viewTime
!=
0
)
{
if
(
this
.
courseInfo
.
status
!=
1
&&
this
.
viewTime
!=
0
)
{
this
.
videoContext
.
pause
();
this
.
videoContext
.
pause
();
this
.
saveVideoPlayback
();
this
.
saveVideoPlayback
();
if
(
this
.
timer
)
{
if
(
this
.
timer
)
{
clearInterval
(
this
.
timer
)
clearInterval
(
this
.
timer
)
}
}
}
}
}
}
}
}
...
...
pages/invitationRegister/invitationlogin.vue
View file @
097b1b1f
...
@@ -199,7 +199,7 @@
...
@@ -199,7 +199,7 @@
padding
:
20
rpx
;
padding
:
20
rpx
;
.grey{
.grey{
min-width
:
100
rpx
;
min-width
:
100
rpx
;
font-size
:
2
4
rpx
;
font-size
:
2
2
rpx
;
color
:
#CECECE
;
color
:
#CECECE
;
}
}
}
}
...
...
pages/myPoints/myPoints.vue
View file @
097b1b1f
...
@@ -66,11 +66,12 @@
...
@@ -66,11 +66,12 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
fmdata
}
from
'@/util/currentDate.js'
import
api
from
'../../api/api'
;
import
api
from
'../../api/api'
;
export
default
{
export
default
{
data
(){
data
(){
return
{
return
{
fortuneDate
:
`
${
new
Date
().
getFullYear
()}
-
${
new
Date
().
getMonth
()
+
1
}
-
${
new
Date
().
getDate
()}
`
,
fortuneDate
:
fmdata
(
new
Date
(),
'D'
)
,
maxDate
:
`
${
new
Date
().
getFullYear
()}
-
${
new
Date
().
getMonth
()
+
1
}
`
,
maxDate
:
`
${
new
Date
().
getFullYear
()}
-
${
new
Date
().
getMonth
()
+
1
}
`
,
navList
:[{
name
:
'日积分'
,
timeFlag
:
'D'
},{
name
:
'月积分'
,
timeFlag
:
'M'
},{
name
:
'年积分'
,
timeFlag
:
'Y'
}],
navList
:[{
name
:
'日积分'
,
timeFlag
:
'D'
},{
name
:
'月积分'
,
timeFlag
:
'M'
},{
name
:
'年积分'
,
timeFlag
:
'Y'
}],
timeFlag
:
'D'
,
timeFlag
:
'D'
,
...
@@ -92,14 +93,15 @@
...
@@ -92,14 +93,15 @@
selectNav
(
navItem
){
selectNav
(
navItem
){
this
.
timeFlag
=
navItem
.
timeFlag
;
this
.
timeFlag
=
navItem
.
timeFlag
;
if
(
this
.
timeFlag
==
'D'
){
if
(
this
.
timeFlag
==
'D'
){
this
.
fortuneDate
=
`
${
new
Date
().
getFullYear
()}
-
${
new
Date
().
getMonth
()
+
1
}
-
${
new
Date
().
getDate
()}
`
this
.
fortuneDate
=
fmdata
(
new
Date
(),
'D'
);
}
}
if
(
this
.
timeFlag
==
'M'
){
if
(
this
.
timeFlag
==
'M'
){
this
.
fortuneDate
=
`
${
new
Date
().
getFullYear
()}
-
${
new
Date
().
getMonth
()
+
1
}
`
this
.
fortuneDate
=
fmdata
(
new
Date
(),
'M'
);
this
.
fields
=
'month'
this
.
fields
=
'month'
}
}
if
(
this
.
timeFlag
==
'Y'
){
if
(
this
.
timeFlag
==
'Y'
){
this
.
fortuneDate
=
`
${
new
Date
().
getFullYear
()}
`
this
.
fortuneDate
=
fmdata
(
new
Date
(),
'Y'
);
// this.fortuneDate=`${new Date().getFullYear()}`
this
.
fields
=
'year'
this
.
fields
=
'year'
}
}
this
.
findByUserIdForFortuneStatistic
();
this
.
findByUserIdForFortuneStatistic
();
...
...
pages/myShare/myShare.vue
View file @
097b1b1f
...
@@ -43,7 +43,10 @@
...
@@ -43,7 +43,10 @@
<view
class=
"shareOrderInfoItem"
v-for=
"item in userShareCourses"
:key=
"item.fileId"
>
<view
class=
"shareOrderInfoItem"
v-for=
"item in userShareCourses"
:key=
"item.fileId"
>
<view
class=
"timeBox"
>
{{
item
.
shareDate
}}
</view>
<view
class=
"timeBox"
>
{{
item
.
shareDate
}}
</view>
<view
class=
"courseInfoContent"
>
<view
class=
"courseInfoContent"
>
<course-item
:thumbnailPath=
"item.displayImage"
:title=
"item.fileTitle"
:summaryBox=
"item.fileSynopsis"
:dataList=
"
{coursePrice:item.coursePrice,salesNumber:item.salesNumber}" :fileLecturerId="item.fileLecturerId">
</course-item>
<course-item
:thumbnailPath=
"item.displayImage"
:title=
"item.fileTitle"
:summaryBox=
"item.fileSynopsis"
:dataList=
"
{coursePrice:item.coursePrice,salesNumber:item.salesNumber}"
:fileLecturerId="item.fileLecturerId">
</course-item>
</view>
</view>
<view
class=
"countsContent"
>
<view
class=
"countsContent"
>
<view
@
click=
"goDetail(item.fileId,1)"
>
<view
@
click=
"goDetail(item.fileId,1)"
>
...
@@ -71,94 +74,98 @@
...
@@ -71,94 +74,98 @@
<
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
{
fmdata
}
from
'@/util/currentDate.js'
export
default
{
export
default
{
components
:{
components
:
{
courseItem
courseItem
},
},
data
()
{
data
()
{
return
{
return
{
queryDate
:
`
${
new
Date
().
getFullYear
()}
-
${
new
Date
().
getMonth
()
+
1
}
`
,
queryDate
:
fmdata
(
new
Date
(),
'M'
),
maxDate
:
`
${
new
Date
().
getFullYear
()}
-
${
new
Date
().
getMonth
()
+
1
}
`
,
// queryDate:`${new Date().getFullYear()}-${new Date().getMonth() + 1}`,
userId
:
uni
.
getStorageSync
(
'cffp_userId'
),
maxDate
:
`
${
new
Date
().
getFullYear
()}
-
${
new
Date
().
getMonth
()
+
1
}
`
,
userId
:
uni
.
getStorageSync
(
'cffp_userId'
),
coursesCountInfos
:
{
coursesCountInfos
:
{
shareFrequencyMonth
:
0
,
shareFrequencyMonth
:
0
,
integralMonth
:
0
,
integralMonth
:
0
,
shareSectionMonth
:
0
,
shareSectionMonth
:
0
,
shareFrequencyCount
:
0
,
shareFrequencyCount
:
0
,
integralCount
:
0
,
integralCount
:
0
,
shareSectionCount
:
0
shareSectionCount
:
0
},
},
userShareCourses
:[]
userShareCourses
:
[]
}
}
},
},
methods
:
{
methods
:
{
goBack
(){
goBack
()
{
let
back
=
getCurrentPages
();
let
back
=
getCurrentPages
();
if
(
back
&&
back
.
length
>
1
)
{
if
(
back
&&
back
.
length
>
1
)
{
uni
.
navigateBack
({
uni
.
navigateBack
({
delta
:
1
delta
:
1
});
});
}
else
{
}
else
{
history
.
back
();
history
.
back
();
}
}
},
},
bindDateChange
:
function
(
e
)
{
bindDateChange
:
function
(
e
)
{
this
.
queryDate
=
e
.
detail
.
value
;
this
.
queryDate
=
e
.
detail
.
value
;
this
.
userShareCount
();
this
.
userShareCount
();
this
.
userShareQuery
();
this
.
userShareQuery
();
},
},
userShareCount
(){
userShareCount
()
{
const
params
=
{
const
params
=
{
userId
:
this
.
userId
,
userId
:
this
.
userId
,
queryDate
:
this
.
queryDate
queryDate
:
this
.
queryDate
}
}
api
.
userShareCount
(
params
).
then
(
res
=>
{
api
.
userShareCount
(
params
).
then
(
res
=>
{
console
.
log
(
res
)
console
.
log
(
res
)
if
(
res
[
'success'
])
{
if
(
res
[
'success'
])
{
this
.
coursesCountInfos
=
res
[
'data'
]
?
res
[
'data'
]
:
this
.
coursesCountInfos
;
this
.
coursesCountInfos
=
res
[
'data'
]
?
res
[
'data'
]
:
this
.
coursesCountInfos
;
Object
.
keys
(
this
.
coursesCountInfos
).
forEach
((
item
)
=>
{
Object
.
keys
(
this
.
coursesCountInfos
).
forEach
((
item
)
=>
{
if
(
!
this
.
coursesCountInfos
[
item
])
{
if
(
!
this
.
coursesCountInfos
[
item
])
{
this
.
coursesCountInfos
[
item
]
=
0
;
this
.
coursesCountInfos
[
item
]
=
0
;
}
}
})
})
}
else
{
}
else
{
this
.
coursesCountInfos
=
{
this
.
coursesCountInfos
=
{
shareFrequencyMonth
:
0
,
shareFrequencyMonth
:
0
,
integralMonth
:
0
,
integralMonth
:
0
,
shareSectionMonth
:
0
,
shareSectionMonth
:
0
,
shareFrequencyCount
:
0
,
shareFrequencyCount
:
0
,
integralCount
:
0
,
integralCount
:
0
,
shareSectionCount
:
0
shareSectionCount
:
0
};
};
console
.
log
(
this
.
coursesCountInfos
)
console
.
log
(
this
.
coursesCountInfos
)
}
}
})
})
},
},
userShareQuery
(){
userShareQuery
()
{
const
params
=
{
const
params
=
{
userId
:
this
.
userId
,
userId
:
this
.
userId
,
queryDate
:
this
.
queryDate
queryDate
:
this
.
queryDate
}
}
console
.
log
(
this
.
userShareCourses
)
console
.
log
(
this
.
userShareCourses
)
api
.
userShareQuery
(
params
).
then
(
res
=>
{
api
.
userShareQuery
(
params
).
then
(
res
=>
{
console
.
log
(
res
)
console
.
log
(
res
)
if
(
res
[
'success'
])
{
if
(
res
[
'success'
])
{
this
.
userShareCourses
=
res
[
'data'
][
'userShareCourses'
];
this
.
userShareCourses
=
res
[
'data'
][
'userShareCourses'
];
}
else
{
}
else
{
this
.
userShareCourses
=
[];
this
.
userShareCourses
=
[];
}
}
})
})
},
},
// 查看详情
// 查看详情
goDetail
(
val
,
type
)
{
goDetail
(
val
,
type
)
{
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
`/pages/commonDetail/commonDetail?fileId=
${
val
}
&type=
${
type
}
`
url
:
`/pages/commonDetail/commonDetail?fileId=
${
val
}
&type=
${
type
}
`
})
})
},
},
// 查看积分
// 查看积分
viewIntegral
(){
viewIntegral
()
{
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
`/pages/myPoints/myPoints`
url
:
`/pages/myPoints/myPoints`
})
})
}
}
},
},
...
@@ -167,35 +174,39 @@
...
@@ -167,35 +174,39 @@
this
.
userShareQuery
();
this
.
userShareQuery
();
},
},
mounted
()
{
mounted
()
{
}
}
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
>
<
style
lang=
"scss"
>
.container
{
.container
{
height
:
100%
;
height
:
100%
;
.timeSelectContent{
.timeSelectContent
{
background-color
:
#fff
;
background-color
:
#fff
;
padding
:
20
rpx
0
;
padding
:
20
rpx
0
;
display
:
flex
;
display
:
flex
;
justify-content
:
center
;
justify-content
:
center
;
align-items
:
baseline
;
align-items
:
baseline
;
color
:
#333
;
color
:
#333
;
.xiajiantou{
.xiajiantou
{
color
:
#999
;
color
:
#999
;
font-size
:
24
rpx
;
font-size
:
24
rpx
;
transform
:
rotate
(
90deg
);
transform
:
rotate
(
90deg
);
margin-left
:
8
rpx
;
margin-left
:
8
rpx
;
}
}
}
}
.shareStatisticalContent
{
.shareStatisticalContent
{
background-color
:
#fff
;
background-color
:
#fff
;
margin
:
10
rpx
20
rpx
;
margin
:
10
rpx
20
rpx
;
padding
:
20
rpx
14
rpx
;
padding
:
20
rpx
14
rpx
;
display
:
flex
;
display
:
flex
;
flex-wrap
:
wrap
;
flex-wrap
:
wrap
;
.statisticItem{
.statisticItem
{
flex
:
1
;
flex
:
1
;
min-width
:
33%
;
min-width
:
33%
;
display
:
flex
;
display
:
flex
;
...
@@ -203,29 +214,35 @@
...
@@ -203,29 +214,35 @@
align-items
:
center
;
align-items
:
center
;
border-right
:
1px
solid
#F4F4F4
;
border-right
:
1px
solid
#F4F4F4
;
margin-bottom
:
10
rpx
;
margin-bottom
:
10
rpx
;
&:nth-of-type(3n){
&:nth-of-type(3n)
{
border-right
:
none
;
border-right
:
none
;
}
}
text
{
text
{
color
:
#333
;
color
:
#333
;
font-size
:
36
rpx
;
font-size
:
36
rpx
;
&:last-child{
&:last-child
{
color
:
#666
;
color
:
#666
;
font-size
:
28
rpx
;
font-size
:
28
rpx
;
}
}
&
.colorText
{
&
.colorText
{
color
:
#F15A1F
;
color
:
#F15A1F
;
}
}
}
}
}
}
}
}
.shareDetailContent
{
h3{
.shareDetailContent
{
h3
{
color
:
#333
;
color
:
#333
;
font-size
:
36
rpx
;
font-size
:
36
rpx
;
position
:
relative
;
position
:
relative
;
margin
:
10
rpx
0
10
rpx
58
rpx
;
margin
:
10
rpx
0
10
rpx
58
rpx
;
&::before{
&::before
{
content
:
''
;
content
:
''
;
display
:
block
;
display
:
block
;
position
:
absolute
;
position
:
absolute
;
...
@@ -237,27 +254,33 @@
...
@@ -237,27 +254,33 @@
background-color
:
#FA882F
;
background-color
:
#FA882F
;
}
}
}
}
.shareOrderInfoItem
{
.shareOrderInfoItem
{
margin
:
0
20
rpx
;
margin
:
0
20
rpx
;
.timeBox{
.timeBox
{
font-size
:
28
rpx
;
font-size
:
28
rpx
;
color
:
#999
;
color
:
#999
;
margin
:
10
rpx
0
10
rpx
50
rpx
;
margin
:
10
rpx
0
10
rpx
50
rpx
;
}
}
.countsContent
{
.countsContent
{
background-color
:
#fff
;
background-color
:
#fff
;
display
:
flex
;
display
:
flex
;
border-bottom-left-radius
:
20
rpx
;
border-bottom-left-radius
:
20
rpx
;
border-bottom-right-radius
:
20
rpx
;
border-bottom-right-radius
:
20
rpx
;
padding
:
10
rpx
10
rpx
20
rpx
10
rpx
;
padding
:
10
rpx
10
rpx
20
rpx
10
rpx
;
view{
view
{
flex
:
1
;
flex
:
1
;
font-size
:
24
rpx
;
font-size
:
24
rpx
;
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
text{
text
{
color
:
#666
;
color
:
#666
;
&:last-child{
&:last-child
{
margin-left
:
10
rpx
;
margin-left
:
10
rpx
;
color
:
#0A2F99
;
color
:
#0A2F99
;
font-weight
:
bold
;
font-weight
:
bold
;
...
...
pages/orderConfirm/orderConfirm.vue
View file @
097b1b1f
...
@@ -3,7 +3,10 @@
...
@@ -3,7 +3,10 @@
<!-- 课程详情 -->
<!-- 课程详情 -->
<template
v-if=
"courseInfoItem"
>
<template
v-if=
"courseInfoItem"
>
<view
class=
"courseItemBox"
>
<view
class=
"courseItemBox"
>
<course-item
:thumbnailPath=
"courseInfoItem.displayImage"
:title=
"courseInfoItem.fileTitle"
:summaryBox=
"courseInfoItem.fileSynopsis"
:dataList=
"
{coursePrice:courseInfoItem.coursePrice,salesNumber:courseInfoItem.salesNumber}" :fileLecturerId="courseInfoItem.fileLecturerId" :fileId="fileId">
</course-item>
<course-item
:thumbnailPath=
"courseInfoItem.displayImage"
:title=
"courseInfoItem.fileTitle"
:summaryBox=
"courseInfoItem.fileSynopsis"
:dataList=
"
{coursePrice:courseInfoItem.coursePrice,salesNumber:courseInfoItem.salesNumber}"
:fileLecturerId="courseInfoItem.fileLecturerId" :fileId="fileId">
</course-item>
</view>
</view>
</
template
>
</
template
>
<!-- 价格明细 -->
<!-- 价格明细 -->
...
@@ -12,10 +15,15 @@
...
@@ -12,10 +15,15 @@
<view><text>
现价
</text><text>
¥{{Number(courseInfoItem.coursePrice).toFixed(2)}}
</text></view>
<view><text>
现价
</text><text>
¥{{Number(courseInfoItem.coursePrice).toFixed(2)}}
</text></view>
<view>
<view>
<text
@
click=
"toggle(1,'bottom')"
>
积分抵扣
<i
class=
"iconfont icon-31tishi"
></i></text>
<text
@
click=
"toggle(1,'bottom')"
>
积分抵扣
<i
class=
"iconfont icon-31tishi"
></i></text>
<text
class=
"integralBox"
@
click=
"toggle(2,'bottom')"
v-if=
"intergralInfo.preFortune"
>
{{!isDeduction ? '未选' : '已选'}}积分,可抵扣{{deductionCore}}
<i
class=
"iconfont icon-youjiantou"
></i></text>
<text
class=
"integralBox"
@
click=
"toggle(2,'bottom')"
v-if=
"intergralInfo.preFortune"
>
{{isDeduction != 'true' ? '未选' : '已选'}}积分,可抵扣{{deductionCore}}
<i
class=
"iconfont icon-youjiantou"
></i></text>
<text
style=
"color: #666666;font-size: 30rpx;"
v-else
>
暂无积分
</text>
<text
style=
"color: #666666;font-size: 30rpx;"
v-else
>
暂无积分
</text>
</view>
</view>
<view><text>
合计
</text><text>
¥{{Number(totalPrice).toFixed(2)}}
</text></view>
<view><text>
合计
</text>
<text
v-if=
"isRedirect == 1"
>
{{calculatedPrice}}
</text>
<text
v-else
>
¥{{Number(totalPrice).toFixed(2)}}
</text>
</view>
</view>
</view>
<!-- 支付方式 -->
<!-- 支付方式 -->
<view
class=
"paymentMethodContent"
>
<view
class=
"paymentMethodContent"
>
...
@@ -28,7 +36,7 @@
...
@@ -28,7 +36,7 @@
<view
class=
"selectRadio"
:class=
"{'actived':paymentMethod===2}"
>
<view
class=
"selectRadio"
:class=
"{'actived':paymentMethod===2}"
>
<i
class=
"iconfont icon-duihao"
></i>
<i
class=
"iconfont icon-duihao"
></i>
</view>
</view>
</view>
</view>
<view
class=
"paymentItem"
@
click=
"selectPaymentMethod(1)"
v-if=
"deviceType==3"
>
<view
class=
"paymentItem"
@
click=
"selectPaymentMethod(1)"
v-if=
"deviceType==3"
>
<view>
<view>
...
@@ -40,7 +48,7 @@
...
@@ -40,7 +48,7 @@
</view>
</view>
</view>
</view>
<!-- #ifdef APP-PLUS -->
<!-- #ifdef APP-PLUS -->
<view
class=
"paymentItem"
@
click=
"selectPaymentMethod(1)"
>
<!-- <view class="paymentItem" @click="selectPaymentMethod(1)"
>
<view>
<view>
<i class="iconfont icon-py_weixinzhifu"></i>
<i class="iconfont icon-py_weixinzhifu"></i>
<text>微信支付</text>
<text>微信支付</text>
...
@@ -48,23 +56,37 @@
...
@@ -48,23 +56,37 @@
<view class="selectRadio" :class="{'actived':paymentMethod===1}">
<view class="selectRadio" :class="{'actived':paymentMethod===1}">
<i class="iconfont icon-duihao"></i>
<i class="iconfont icon-duihao"></i>
</view>
</view>
</view>
</view>
-->
<!-- #endif -->
<!-- #endif -->
</view>
</view>
<!-- 底部 -->
<!-- 底部 -->
<view
class=
"totalContent"
>
<view
class=
"totalContent"
>
<view
class=
"priceInfoBox"
>
<view
class=
"priceInfoBox"
>
<view>
合计:
<strong
style=
"font-size: 36rpx;"
>
¥{{totalPrice}}
</strong></view>
<view>
合计:
<view>
共优惠:
<strong
style=
"color:#F15A1F"
v-if=
"isDeduction == true"
>
¥{{Number(deductionCore * intergralInfo.preFortune).toFixed(2)}}
</strong>
<strong
v-if=
"isRedirect == 1"
>
{{calculatedPrice}}
</strong>
<text
style=
"color:#F15A1F"
v-else
>
0
</text>
<strong
v-else
style=
"font-size: 36rpx;"
>
¥{{totalPrice}}
</strong>
</view>
</view>
<view
class=
""
v-if=
"isRedirect == 1"
>
<view>
共优惠:
<strong
style=
"color:#F15A1F"
>
¥
<text
v-if=
"isDeduction == 'true'"
>
{{deductionCore}}
</text>
<text
style=
"color:#F15A1F"
v-else
>
0
</text>
</strong>
</view>
</view>
<view
class=
""
v-else
>
<view>
共优惠:
<strong
style=
"color:#F15A1F"
v-if=
"isDeduction == 'true'"
>
¥{{Number(deductionCore * intergralInfo.preFortune).toFixed(2)}}
</strong>
<text
style=
"color:#F15A1F"
v-else
>
0
</text>
</view>
</view>
</view>
</view>
<view
class=
"confirmOrder"
:class=
"{'gray':paymentBtnDisabled}"
@
click=
"pay()"
>
提交订单
</view>
<view
class=
"confirmOrder"
:class=
"{'gray':paymentBtnDisabled}"
@
click=
"pay()"
>
提交订单
</view>
</view>
</view>
<view
v-html=
"payForm"
>
<view
v-html=
"payForm"
>
</view>
</view>
<!-- 普通弹窗 -->
<!-- 普通弹窗 -->
<uni-popup
ref=
"popup"
background-color=
"#fff"
>
<uni-popup
ref=
"popup"
background-color=
"#fff"
>
<view
class=
"popup-content"
>
<view
class=
"popup-content"
>
<view
class=
"title"
>
<view
class=
"title"
>
...
@@ -72,13 +94,13 @@
...
@@ -72,13 +94,13 @@
<h3>
{{popupTitle}}
</h3>
<h3>
{{popupTitle}}
</h3>
<i
class=
"iconfont icon-guanbi"
@
click=
"closePopup(1)"
></i>
<i
class=
"iconfont icon-guanbi"
@
click=
"closePopup(1)"
></i>
</view>
</view>
<view
v-if=
"popupType===1"
><text>
1积分=1元,积分抵扣如同现金,所有课程均可使用.
</text></view>
<view
v-if=
"popupType===1"
><text>
1积分=1元,积分抵扣如同现金,所有课程均可使用.
</text></view>
<view
v-if=
"popupType===2"
>
<view
v-if=
"popupType===2"
>
<view
class=
"deductionInfoItem"
:class=
"{'actived':isDeduction}"
@
click=
"selectDeduction(true)"
>
<view
class=
"deductionInfoItem"
:class=
"{'actived':isDeduction
== 'true'
}"
@
click=
"selectDeduction(true)"
>
<view
style=
"display: flex;"
>
<view
style=
"display: flex;"
>
<text>
可抵扣
</text>
<text>
可抵扣
</text>
<view
class=
"integralInfoBox"
>
<view
class=
"integralInfoBox"
>
<text
class=
"deductionCount"
>
¥{{deductionCore * intergralInfo.preFortune || '0'}}
</text>
<text
class=
"deductionCount"
>
¥{{deductionCore * intergralInfo.preFortune || '0'}}
</text>
<text>
需{{deductionCore}}积分兑换
</text>
<text>
需{{deductionCore}}积分兑换
</text>
</view>
</view>
</view>
</view>
...
@@ -86,7 +108,7 @@
...
@@ -86,7 +108,7 @@
<i
class=
"iconfont icon-duihao"
></i>
<i
class=
"iconfont icon-duihao"
></i>
</view>
</view>
</view>
</view>
<view
class=
"deductionInfoItem"
:class=
"{'actived':
!isDeduction
}"
@
click=
"selectDeduction(false)"
>
<view
class=
"deductionInfoItem"
:class=
"{'actived':
isDeduction == 'false'
}"
@
click=
"selectDeduction(false)"
>
<view>
<view>
<text>
不使用积分抵扣
</text>
<text>
不使用积分抵扣
</text>
</view>
</view>
...
@@ -97,7 +119,7 @@
...
@@ -97,7 +119,7 @@
<view
class=
"confirmBtn"
@
click=
"closePopup(1);toggle(3,'center')"
>
<view
class=
"confirmBtn"
@
click=
"closePopup(1);toggle(3,'center')"
>
确认
确认
</view>
</view>
</view>
</view>
</view>
</view>
</uni-popup>
</uni-popup>
<view
class=
"popupContainer"
>
<view
class=
"popupContainer"
>
...
@@ -129,13 +151,13 @@
...
@@ -129,13 +151,13 @@
</uni-popup>
</uni-popup>
</view>
</view>
<view
class=
"markBox"
@
click=
"tipsFlag=false"
v-if=
"tipsFlag"
>
<view
class=
"markBox"
@
click=
"tipsFlag=false"
v-if=
"tipsFlag"
>
<view
class=
"guideImgBox"
>
<view
class=
"guideImgBox"
>
<image
src=
"../../static/Group132.png"
mode=
"widthFix"
></image>
<image
src=
"../../static/Group132.png"
mode=
"widthFix"
></image>
<view
class=
"tips"
>
<view
class=
"tips"
>
<view
class=
"text-center"
>
请点击右上角菜单
</view>
<view
class=
"text-center"
>
请点击右上角菜单
</view>
<view>
因微信屏蔽支付宝的支付请求,请使用浏览器打开页面完成支付。在浏览器内支付完成后,请返回微信,到我的订单下,以检测支付结果。
</view>
<view>
因微信屏蔽支付宝的支付请求,请使用浏览器打开页面完成支付。在浏览器内支付完成后,请返回微信,到我的订单下,以检测支付结果。
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
</template>
...
@@ -143,76 +165,80 @@
...
@@ -143,76 +165,80 @@
<
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
{
nextTick
}
from
"vue"
;
import
{
nextTick
}
from
"vue"
;
import
common
from
'../../common/common'
;
import
common
from
'../../common/common'
;
export
default
{
export
default
{
components
:{
components
:
{
courseItem
courseItem
},
},
data
()
{
data
()
{
return
{
return
{
courseInfoItem
:{},
courseInfoItem
:
{},
fileId
:
null
,
fileId
:
null
,
paymentMethod
:
2
,
paymentMethod
:
2
,
popupTitle
:
'积分抵扣规则'
,
popupTitle
:
'积分抵扣规则'
,
popupType
:
1
,
popupType
:
1
,
isDeduction
:
false
,
isDeduction
:
'false'
,
userId
:
uni
.
getStorageSync
(
'cffp_userId'
),
userId
:
uni
.
getStorageSync
(
'cffp_userId'
),
intergralInfo
:{},
intergralInfo
:
{},
orderId
:
''
,
orderId
:
''
,
paymentBtnDisabled
:
false
,
paymentBtnDisabled
:
false
,
action
:
''
,
action
:
''
,
params
:
''
,
params
:
''
,
actionType
:
''
,
actionType
:
''
,
charset
:
''
,
charset
:
''
,
contentType
:
''
,
contentType
:
''
,
payForm
:
''
,
payForm
:
''
,
deviceType
:
''
,
deviceType
:
''
,
tipsFlag
:
false
,
tipsFlag
:
false
,
isRedirect
:
null
,
isRedirect
:
null
,
amount
:
0
,
amount
:
0
,
calculatedPrice
:
0
calculatedPrice
:
0
}
}
},
},
computed
:{
computed
:
{
totalPrice
(){
totalPrice
()
{
if
(
this
.
isDeduction
==
true
){
if
(
this
.
isDeduction
==
"true"
)
{
return
(
this
.
courseInfoItem
.
coursePrice
-
(
this
.
deductionCore
*
this
.
intergralInfo
.
preFortune
)).
toFixed
(
2
)
return
(
this
.
courseInfoItem
.
coursePrice
-
(
this
.
deductionCore
*
this
.
intergralInfo
.
preFortune
))
}
else
{
.
toFixed
(
2
)
}
else
{
return
this
.
courseInfoItem
.
coursePrice
;
return
this
.
courseInfoItem
.
coursePrice
;
}
}
},
},
deductionCore
(){
deductionCore
()
{
if
(
this
.
courseInfoItem
.
coursePrice
/
this
.
intergralInfo
.
preFortune
<
this
.
intergralInfo
.
yesExchangeFortune
){
if
(
this
.
courseInfoItem
.
coursePrice
/
this
.
intergralInfo
.
preFortune
<
this
.
intergralInfo
.
yesExchangeFortune
)
{
return
parseFloat
((
this
.
courseInfoItem
.
coursePrice
/
this
.
intergralInfo
.
preFortune
)).
toFixed
(
2
)
return
parseFloat
((
this
.
courseInfoItem
.
coursePrice
/
this
.
intergralInfo
.
preFortune
)).
toFixed
(
2
)
}
else
{
}
else
{
return
this
.
intergralInfo
.
yesExchangeFortune
return
this
.
intergralInfo
.
yesExchangeFortune
}
}
}
}
},
},
methods
:
{
methods
:
{
// 支付
// 支付
pay
(){
pay
()
{
if
(
this
.
paymentBtnDisabled
)
{
if
(
this
.
paymentBtnDisabled
)
{
return
false
;
return
false
;
}
}
this
.
paymentBtnDisabled
=
true
;
this
.
paymentBtnDisabled
=
true
;
let
param
=
{
let
param
=
{
orderId
:
this
.
orderId
,
orderId
:
this
.
orderId
,
amount
:
this
.
isRedirect
==
1
?
this
.
calculatedPrice
:
this
.
totalPrice
,
amount
:
this
.
isRedirect
==
1
?
this
.
calculatedPrice
:
this
.
totalPrice
,
paymentMethod
:
this
.
paymentMethod
,
paymentMethod
:
this
.
paymentMethod
,
userId
:
this
.
userId
,
userId
:
this
.
userId
,
integralExchange
:
this
.
isDeduction
?
parseFloat
(
this
.
deductionCore
)
:
0
,
integralExchange
:
this
.
isDeduction
==
"true"
?
this
.
deductionCore
:
0
,
paymentType
:
''
,
paymentType
:
''
,
isPayOrAuth
:
''
,
isPayOrAuth
:
''
,
fileId
:
this
.
fileId
fileId
:
this
.
fileId
}
}
if
(
this
.
paymentMethod
==
1
)
{
if
(
this
.
paymentMethod
==
1
)
{
// APP:微信app支付
// APP:微信app支付
// #ifdef APP-PLUS
// #ifdef APP-PLUS
param
.
paymentType
=
1
;
param
.
paymentType
=
1
;
api
.
unifiedPay
(
param
).
then
(
res
=>
{
api
.
unifiedPay
(
param
).
then
(
res
=>
{
console
.
log
(
res
)
console
.
log
(
res
)
this
.
paymentBtnDisabled
=
false
;
this
.
paymentBtnDisabled
=
false
;
})
})
...
@@ -220,239 +246,258 @@
...
@@ -220,239 +246,258 @@
// #ifdef H5
// #ifdef H5
param
.
paymentType
=
2
;
param
.
paymentType
=
2
;
//deviceType:PC为1,移动端为2,微信为3
//deviceType:PC为1,移动端为2,微信为3
if
(
this
.
deviceType
==
3
){
if
(
this
.
deviceType
==
3
)
{
let
_this
=
this
param
.
isPayOrAuth
=
1
;
param
.
isPayOrAuth
=
1
;
api
.
wxAuthorize
(
param
).
then
((
res
)
=>
{
// } else {
this
.
paymentBtnDisabled
=
false
;
api
.
wxAuthorize
(
param
).
then
((
res
)
=>
{
if
(
this
.
amount
==
'0'
){
_this
.
paymentBtnDisabled
=
false
;
uni
.
navigateTo
({
if
(
res
[
'success'
])
{
url
:
`/pages/orderStatus/orderStatus?orderId=
${
this
.
orderId
}
&fileId=
${
this
.
fileId
}
&orderStatus=2&userId=
${
this
.
userId
}
&isRedirect=1`
if
(
param
.
amount
==
'0.00'
)
{
})
uni
.
navigateTo
({
return
false
url
:
`/pages/orderStatus/orderStatus?orderId=
${
_this
.
orderId
}
&fileId=
${
_this
.
fileId
}
&orderStatus=2&userId=
${
_this
.
userId
}
`
}
})
if
(
res
[
'success'
]){
return
false
window
.
location
.
href
=
res
[
'data'
][
'paymentForm'
][
'action'
];
}
else
{
window
.
location
.
href
=
res
[
'data'
][
'paymentForm'
][
'action'
];
}
}
}
})
})
// }
}
else
{
}
else
{
//微信二维码支付
//微信二维码支付
}
}
// #endif
// #endif
}
else
if
(
this
.
paymentMethod
==
2
)
{
}
else
if
(
this
.
paymentMethod
==
2
)
{
// APP:支付宝app支付
// APP:支付宝app支付
// #ifdef APP-PLUS
// #ifdef APP-PLUS
param
.
paymentType
=
1
;
param
.
paymentType
=
1
;
api
.
unifiedPay
(
param
).
then
(
res
=>
{
api
.
unifiedPay
(
param
).
then
(
res
=>
{
this
.
paymentBtnDisabled
=
false
;
this
.
paymentBtnDisabled
=
false
;
if
(
res
[
'success'
])
{
if
(
res
[
'success'
])
{
const
aliOrderString
=
res
[
'data'
][
'aliOrderString'
];
const
aliOrderString
=
res
[
'data'
][
'aliOrderString'
];
let
_this
=
this
let
_this
=
this
if
(
aliOrderString
)
{
if
(
aliOrderString
)
{
uni
.
requestPayment
({
uni
.
requestPayment
({
provider
:
'alipay'
,
provider
:
'alipay'
,
orderInfo
:
aliOrderString
,
orderInfo
:
aliOrderString
,
success
:
function
(
resp
)
{
success
:
function
(
resp
)
{
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
`/pages/orderStatus/orderStatus?orderId=
${
_this
.
orderId
}
&fileId=
${
_this
.
fileId
}
&orderStatus=2&userId=
${
_this
.
userId
}
&isRedirect=1`
url
:
`/pages/orderStatus/orderStatus?orderId=
${
_this
.
orderId
}
&fileId=
${
_this
.
fileId
}
&orderStatus=2&userId=
${
_this
.
userId
}
&isRedirect=1`
})
})
},
},
fail
:
function
(
err
)
{
fail
:
function
(
err
)
{
console
.
log
(
'fail:'
+
JSON
.
stringify
(
err
));
console
.
log
(
'fail:'
+
JSON
.
stringify
(
err
));
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
`/pages/orderStatus/orderStatus?orderId=
${
_this
.
orderId
}
&fileId=
${
_this
.
fileId
}
&orderStatus=1&userId=
${
_this
.
userId
}
&isRedirect=1`
url
:
`/pages/orderStatus/orderStatus?orderId=
${
_this
.
orderId
}
&fileId=
${
_this
.
fileId
}
&orderStatus=1&userId=
${
_this
.
userId
}
&isRedirect=1`
})
})
}
}
});
});
}
else
{
}
else
{
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
`/pages/orderStatus/orderStatus?orderId=
${
this
.
orderId
}
&fileId=
${
this
.
fileId
}
&orderStatus=2&userId=
${
this
.
userId
}
&isRedirect=1`
url
:
`/pages/orderStatus/orderStatus?orderId=
${
this
.
orderId
}
&fileId=
${
this
.
fileId
}
&orderStatus=2&userId=
${
this
.
userId
}
&isRedirect=1`
})
})
}
}
}
else
{
}
else
{
uni
.
showModal
({
uni
.
showModal
({
content
:
res
[
'message'
],
content
:
res
[
'message'
],
success
:
function
(
res
)
{
success
:
function
(
res
)
{
if
(
res
.
confirm
)
{
if
(
res
.
confirm
)
{
console
.
log
(
'用户点击确定'
);
console
.
log
(
'用户点击确定'
);
}
else
if
(
res
.
cancel
)
{
}
else
if
(
res
.
cancel
)
{
console
.
log
(
'用户点击取消'
);
console
.
log
(
'用户点击取消'
);
}
}
}
}
});
});
}
}
})
})
// #endif
// #endif
//#ifdef H5
//#ifdef H5
//支付宝h5支付
//支付宝h5支付
console
.
log
(
JSON
.
stringify
(
param
))
console
.
log
(
JSON
.
stringify
(
param
))
param
.
paymentType
=
2
;
param
.
paymentType
=
2
;
// this.amount = this.totalPrice;
this
.
amount
=
this
.
totalPrice
;
if
(
this
.
deviceType
==
3
){
if
(
this
.
deviceType
==
3
)
{
this
.
tipsFlag
=
true
;
if
(
param
.
amount
==
'0.00'
)
{
// this.amount = this.totalPrice;
this
.
getunifiedPay
(
param
)
this
.
paymentBtnDisabled
=
false
;
return
false
let
deductionCore
=
this
.
isDeduction
==
true
?
parseFloat
(
this
.
deductionCore
)
:
0
;
}
else
{
let
url
=
window
.
location
.
href
+
`&isRedirect=1&amount=
${
this
.
amount
}
&isDeduction=
${
this
.
isDeduction
}
&deductionCore=
${
deductionCore
}
&jumptime=
${
new
Date
()}
`
;
this
.
tipsFlag
=
true
;
window
.
history
.
replaceState
(
null
,
''
,
url
);
this
.
amount
=
this
.
totalPrice
;
return
;
this
.
paymentBtnDisabled
=
false
;
}
let
deductionCore
=
this
.
isDeduction
==
"true"
?
parseFloat
(
this
.
deductionCore
)
:
0
;
api
.
unifiedPay
(
param
).
then
((
res
)
=>
{
let
url
=
window
.
location
.
href
+
const
data
=
res
[
'data'
];
`&isRedirect=1&amount=
${
this
.
amount
}
&isDeduction=
${
this
.
isDeduction
}
&deductionCore=
${
deductionCore
}
&jumptime=
${
new
Date
()}
`
;
this
.
paymentBtnDisabled
=
false
;
window
.
history
.
replaceState
(
null
,
''
,
url
);
return
;
if
(
res
[
'success'
]){
debugger
;
if
(
data
.
orderStatus
!=
''
&&
data
.
orderStatus
!=
null
){
uni
.
navigateTo
({
url
:
`/pages/orderStatus/orderStatus?orderId=
${
this
.
orderId
}
&fileId=
${
this
.
fileId
}
&orderStatus=2&userId=
${
this
.
userId
}
&isRedirect=1`
})
return
false
}
this
.
payForm
=
res
[
'data'
][
'aliOrderString'
];
// this.$nextTick(() => {
// console.log(document.forms)
// document.forms['punchout_form'].submit();
// })
}
else
{
uni
.
showModal
({
content
:
res
[
'message'
],
success
:
function
(
res
)
{
if
(
res
.
confirm
)
{
console
.
log
(
'用户点击确定'
);
}
else
if
(
res
.
cancel
)
{
console
.
log
(
'用户点击取消'
);
}
}
});
}
}
})
}
this
.
getunifiedPay
(
param
)
//#endif
//#endif
}
}
},
getunifiedPay
(
param
){
api
.
unifiedPay
(
param
).
then
((
res
)
=>
{
const
data
=
res
[
'data'
];
this
.
paymentBtnDisabled
=
false
;
if
(
res
[
'success'
])
{
if
(
data
.
orderStatus
!=
null
&&
data
.
orderStatus
!=
''
)
{
uni
.
navigateTo
({
url
:
`/pages/orderStatus/orderStatus?orderId=
${
this
.
orderId
}
&fileId=
${
this
.
fileId
}
&orderStatus=2&userId=
${
this
.
userId
}
`
})
return
false
}
this
.
payForm
=
res
[
'data'
][
'aliOrderString'
];
this
.
$nextTick
(()
=>
{
console
.
log
(
document
.
forms
)
document
.
forms
[
'punchout_form'
].
submit
();
})
}
else
{
uni
.
showModal
({
content
:
res
[
'message'
],
success
:
function
(
res
)
{
if
(
res
.
confirm
)
{
console
.
log
(
'用户点击确定'
);
}
else
if
(
res
.
cancel
)
{
console
.
log
(
'用户点击取消'
);
}
}
});
}
})
},
},
// 积分查询
// 积分查询
queryByUserIdFortuneStatistic
(){
queryByUserIdFortuneStatistic
()
{
api
.
queryByUserIdFortuneStatistic
({
userId
:
this
.
userId
}).
then
(
res
=>
{
api
.
queryByUserIdFortuneStatistic
({
if
(
res
[
'success'
]){
userId
:
this
.
userId
}).
then
(
res
=>
{
if
(
res
[
'success'
])
{
this
.
intergralInfo
=
res
[
'data'
];
this
.
intergralInfo
=
res
[
'data'
];
this
.
intergralInfo
.
preFortune
=
1.0
;
this
.
intergralInfo
.
preFortune
=
1.0
;
}
}
})
})
},
},
// 课程详情页面
// 课程详情页面
courseDetail
(){
courseDetail
()
{
api
.
courseDetail
({
fileId
:
this
.
fileId
,
userId
:
this
.
userId
}).
then
(
res
=>
{
api
.
courseDetail
({
console
.
log
(
'课程详情'
,
res
);
fileId
:
this
.
fileId
,
if
(
res
[
'success'
]){
userId
:
this
.
userId
this
.
courseInfoItem
=
res
[
'data'
][
'data'
];
}).
then
(
res
=>
{
console
.
log
(
'课程详情'
,
res
);
if
(
res
[
'success'
])
{
this
.
courseInfoItem
=
res
[
'data'
][
'data'
];
}
}
})
})
},
},
// 选择支付方式
// 选择支付方式
selectPaymentMethod
(
value
){
selectPaymentMethod
(
value
)
{
this
.
paymentMethod
=
value
;
this
.
paymentMethod
=
value
;
},
},
// 从下往上弹出
// 从下往上弹出
toggle
(
val
,
type
)
{
toggle
(
val
,
type
)
{
// type 1为积分抵扣规则,2为优惠详情
// type 1为积分抵扣规则,2为优惠详情
this
.
popupType
=
val
;
this
.
popupType
=
val
;
// open 方法传入参数 等同在 uni-popup 组件上绑定 type属性
// open 方法传入参数 等同在 uni-popup 组件上绑定 type属性
if
(
this
.
popupType
===
3
)
{
if
(
this
.
popupType
===
3
)
{
if
(
this
.
isDeduction
)
{
if
(
this
.
isDeduction
)
{
this
.
$refs
.
popup1
.
open
(
type
);
this
.
$refs
.
popup1
.
open
(
type
);
}
}
}
else
{
}
else
{
this
.
$refs
.
popup
.
open
(
type
);
this
.
$refs
.
popup
.
open
(
type
);
}
}
if
(
this
.
popupType
===
1
)
{
if
(
this
.
popupType
===
1
)
{
this
.
popupTitle
=
'积分抵扣规则'
this
.
popupTitle
=
'积分抵扣规则'
}
else
if
(
this
.
popupType
===
2
)
{
}
else
if
(
this
.
popupType
===
2
)
{
this
.
popupTitle
=
'优惠详情'
this
.
popupTitle
=
'优惠详情'
}
else
if
(
this
.
popupType
===
3
)
{
}
else
if
(
this
.
popupType
===
3
)
{
this
.
popupTitle
=
'积分兑换'
this
.
popupTitle
=
'积分兑换'
}
}
},
},
// 关闭弹出层
// 关闭弹出层
closePopup
(
val
){
closePopup
(
val
)
{
if
(
val
===
1
)
{
if
(
val
===
1
)
{
this
.
$refs
.
popup
.
close
()
this
.
$refs
.
popup
.
close
()
}
else
{
}
else
{
this
.
$refs
.
popup1
.
close
()
this
.
$refs
.
popup1
.
close
()
}
}
},
},
// 选择是否抵扣
// 选择是否抵扣
selectDeduction
(
type
){
selectDeduction
(
type
)
{
this
.
isDeduction
=
type
;
this
.
isDeduction
=
String
(
type
)
;
},
},
// 确认积分兑换
// 确认积分兑换
confirmIntergralDeduction
(){
confirmIntergralDeduction
()
{
},
},
},
},
onLoad
(
option
){
onLoad
(
option
)
{
this
.
fileId
=
option
.
fileId
;
this
.
fileId
=
option
.
fileId
;
this
.
orderId
=
option
.
orderId
;
this
.
orderId
=
option
.
orderId
;
if
(
option
.
userId
)
{
if
(
option
.
userId
)
{
this
.
userId
=
option
.
userId
this
.
userId
=
option
.
userId
}
}
this
.
courseDetail
();
this
.
courseDetail
();
this
.
queryByUserIdFortuneStatistic
()
this
.
queryByUserIdFortuneStatistic
()
this
.
deviceType
=
common
.
checkDeviceType
();
this
.
deviceType
=
common
.
checkDeviceType
();
if
(
this
.
deviceType
==
3
)
{
if
(
this
.
deviceType
==
3
)
{
this
.
paymentMethod
=
1
;
this
.
paymentMethod
=
1
;
}
}
this
.
isRedirect
=
option
.
isRedirect
;
this
.
isRedirect
=
option
.
isRedirect
;
if
(
this
.
isRedirect
==
1
)
{
if
(
this
.
isRedirect
==
1
)
{
this
.
deductionCore
=
option
.
deductionCore
;
this
.
deductionCore
=
option
.
deductionCore
;
this
.
amount
=
Number
(
option
.
amount
);
this
.
amount
=
Number
(
option
.
amount
);
this
.
isDeduction
=
option
.
isDeduction
;
this
.
isDeduction
=
String
(
option
.
isDeduction
)
;
this
.
calculatedPrice
=
Number
(
this
.
amount
);
this
.
calculatedPrice
=
Number
(
this
.
amount
);
console
.
log
(
JSON
.
stringify
(
option
))
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
pay
();
this
.
pay
();
},
500
)
},
500
)
}
}
},
},
mounted
()
{
mounted
()
{}
}
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
>
<
style
lang=
"scss"
>
.container
{
.container
{
position
:
relative
;
position
:
relative
;
height
:
95vh
;
height
:
95vh
;
.courseItemBox{
.courseItemBox
{
padding
:
20
rpx
30
rpx
;
padding
:
20
rpx
30
rpx
;
background-color
:
#fff
;
background-color
:
#fff
;
}
}
.popup-content
{
.title{
.popup-content
{
.title
{
display
:
flex
;
display
:
flex
;
justify-content
:
space-between
;
justify-content
:
space-between
;
align-items
:
baseline
;
align-items
:
baseline
;
h3{
h3
{
text-align
:
center
;
text-align
:
center
;
color
:
#333
;
color
:
#333
;
font-size
:
32
rpx
;
font-size
:
32
rpx
;
margin-bottom
:
30
rpx
;
margin-bottom
:
30
rpx
;
}
}
.iconfont
{
.iconfont
{
color
:
#999
;
color
:
#999
;
}
}
}
}
text
{
text
{
color
:
#666
;
color
:
#666
;
font-size
:
30
rpx
;
font-size
:
30
rpx
;
}
}
.deductionInfoItem
{
.deductionInfoItem
{
display
:
flex
;
display
:
flex
;
justify-content
:
space-between
;
justify-content
:
space-between
;
align-items
:
center
;
align-items
:
center
;
...
@@ -463,20 +508,24 @@
...
@@ -463,20 +508,24 @@
border-radius
:
20
rpx
;
border-radius
:
20
rpx
;
min-height
:
90
rpx
;
min-height
:
90
rpx
;
margin-top
:
30
rpx
;
margin-top
:
30
rpx
;
.integralInfoBox{
.integralInfoBox
{
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
margin-left
:
10
rpx
;
margin-left
:
10
rpx
;
text{
text
{
font-size
:
30
rpx
;
font-size
:
30
rpx
;
color
:
#333333
;
color
:
#333333
;
}
}
.deductionCount
{
.deductionCount
{
font-size
:
36
rpx
;
font-size
:
36
rpx
;
color
:
#F15A1F
;
color
:
#F15A1F
;
}
}
}
}
.selectRadio
{
.selectRadio
{
color
:
#D8D8D8
;
color
:
#D8D8D8
;
width
:
40
rpx
;
width
:
40
rpx
;
height
:
40
rpx
;
height
:
40
rpx
;
...
@@ -486,24 +535,28 @@
...
@@ -486,24 +535,28 @@
justify-content
:
center
;
justify-content
:
center
;
align-items
:
center
;
align-items
:
center
;
}
}
&
.actived
{
&
.actived
{
border
:
3
rpx
solid
#20269B
;
border
:
3
rpx
solid
#20269B
;
background-color
:
#fff
;
background-color
:
#fff
;
.selectRadio{
.selectRadio
{
background-color
:
#20269B
;
background-color
:
#20269B
;
color
:
#fff
;
color
:
#fff
;
}
}
}
}
}
}
.integralDeductionContent
{
.intergralItem{
.integralDeductionContent
{
.intergralItem
{
display
:
flex
;
display
:
flex
;
justify-content
:
space-between
;
justify-content
:
space-between
;
margin-bottom
:
10
rpx
;
margin-bottom
:
10
rpx
;
}
}
}
}
.confirmBtn
{
.confirmBtn
{
border-radius
:
80
rpx
;
border-radius
:
80
rpx
;
height
:
80
rpx
;
height
:
80
rpx
;
width
:
60%
;
width
:
60%
;
...
@@ -515,25 +568,30 @@
...
@@ -515,25 +568,30 @@
align-items
:
center
;
align-items
:
center
;
}
}
}
}
.popup1-content
{
.popup1-content
{
padding
:
30
rpx
34
rpx
20
rpx
42
rpx
;
padding
:
30
rpx
34
rpx
20
rpx
42
rpx
;
border-radius
:
20
rpx
;
border-radius
:
20
rpx
;
.title{
.title
{
display
:
flex
;
display
:
flex
;
justify-content
:
space-between
;
justify-content
:
space-between
;
align-items
:
baseline
;
align-items
:
baseline
;
h3{
h3
{
text-align
:
center
;
text-align
:
center
;
color
:
#333
;
color
:
#333
;
font-size
:
32
rpx
;
font-size
:
32
rpx
;
margin-bottom
:
30
rpx
;
margin-bottom
:
30
rpx
;
}
}
.iconfont
{
.iconfont
{
color
:
#999
;
color
:
#999
;
}
}
}
}
.integralDeductionContent
{
.intergralItem{
.integralDeductionContent
{
.intergralItem
{
display
:
flex
;
display
:
flex
;
justify-content
:
space-between
;
justify-content
:
space-between
;
color
:
#333
;
color
:
#333
;
...
@@ -541,7 +599,8 @@
...
@@ -541,7 +599,8 @@
margin-bottom
:
10
rpx
;
margin-bottom
:
10
rpx
;
}
}
}
}
.confirmBtn
{
.confirmBtn
{
border-radius
:
80
rpx
;
border-radius
:
80
rpx
;
height
:
80
rpx
;
height
:
80
rpx
;
width
:
60%
;
width
:
60%
;
...
@@ -553,64 +612,81 @@
...
@@ -553,64 +612,81 @@
align-items
:
center
;
align-items
:
center
;
}
}
}
}
.priceInfoContent
,
.paymentMethodContent
,
.totalContent
{
.priceInfoContent
,
.paymentMethodContent
,
.totalContent
{
background-color
:
#fff
;
background-color
:
#fff
;
margin
:
0
10
rpx
;
margin
:
0
10
rpx
;
padding
:
20
rpx
;
padding
:
20
rpx
;
}
}
.priceInfoContent
{
view{
.priceInfoContent
{
view
{
display
:
flex
;
display
:
flex
;
justify-content
:
space-between
;
justify-content
:
space-between
;
text{
&:last-child{
text
{
&:last-child
{
font-weight
:
bold
;
font-weight
:
bold
;
}
}
&
.integralBox
{
&
.integralBox
{
color
:
#FA6900
;
color
:
#FA6900
;
font-weight
:
normal
;
font-weight
:
normal
;
.iconfont{
.iconfont
{
color
:
#999
;
color
:
#999
;
}
}
}
}
}
}
.iconfont
{
.iconfont
{
margin-left
:
10
rpx
;
margin-left
:
10
rpx
;
}
}
}
}
}
}
.priceInfoContent
,
.paymentMethodContent
{
.priceInfoContent
,
.paymentMethodContent
{
border-bottom
:
5px
solid
#fbfbfb
;
border-bottom
:
5px
solid
#fbfbfb
;
color
:
#333
;
color
:
#333
;
h4{
h4
{
font-size
:
32
rpx
;
font-size
:
32
rpx
;
margin-bottom
:
20
rpx
;
margin-bottom
:
20
rpx
;
}
}
view
{
view
{
margin-bottom
:
10
rpx
;
margin-bottom
:
10
rpx
;
}
}
}
}
.paymentMethodContent
{
.paymentItem{
.paymentMethodContent
{
.paymentItem
{
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
space-between
;
justify-content
:
space-between
;
view{
view
{
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
}
}
.icon-zhifubao
{
.icon-zhifubao
{
color
:
#5A9EF7
;
color
:
#5A9EF7
;
font-size
:
60
rpx
;
font-size
:
60
rpx
;
margin-right
:
20
rpx
;
margin-right
:
20
rpx
;
}
}
.icon-py_weixinzhifu
{
.icon-py_weixinzhifu
{
color
:
#09BB07
;
color
:
#09BB07
;
font-size
:
60
rpx
;
font-size
:
60
rpx
;
margin-right
:
20
rpx
;
margin-right
:
20
rpx
;
}
}
.selectRadio
{
.selectRadio
{
width
:
40
rpx
;
width
:
40
rpx
;
height
:
40
rpx
;
height
:
40
rpx
;
display
:
flex
;
display
:
flex
;
...
@@ -619,15 +695,17 @@
...
@@ -619,15 +695,17 @@
border-radius
:
50%
;
border-radius
:
50%
;
border
:
1px
solid
#D8D8D8
;
border
:
1px
solid
#D8D8D8
;
color
:
transparent
;
color
:
transparent
;
&.actived{
&.actived
{
background-color
:
#0A2F99
;
background-color
:
#0A2F99
;
color
:
#fff
;
color
:
#fff
;
}
}
}
}
}
}
}
}
.totalContent
{
.totalContent
{
position
:
absolute
;
position
:
absolute
;
bottom
:
0
;
bottom
:
0
;
left
:
0
;
left
:
0
;
...
@@ -637,67 +715,73 @@
...
@@ -637,67 +715,73 @@
align-items
:
center
;
align-items
:
center
;
justify-content
:
space-between
;
justify-content
:
space-between
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
.priceInfoBox{
.priceInfoBox
{
font-size
:
30
rpx
;
font-size
:
30
rpx
;
color
:
#333
;
color
:
#333
;
view
:
first-child
{
view
:
first-child
{
margin-bottom
:
10
rpx
;
margin-bottom
:
10
rpx
;
}
}
}
}
.confirmOrder
{
background-color
:
#20269B
;
.confirmOrder
{
color
:
#fff
;
background-color
:
#20269B
;
padding
:
14
rpx
38
rpx
;
color
:
#fff
;
border-radius
:
80
rpx
;
padding
:
14
rpx
38
rpx
;
border-radius
:
80
rpx
;
}
}
.gray
{
.gray
{
background
:
#666
;
background
:
#666
;
}
}
}
}
}
.markBox
{
position
:
fixed
;
left
:
0
;
top
:
0
;
bottom
:
0
;
right
:
0
;
width
:
100%
;
height
:
100%
;
color
:
#fff
;
display
:
flex
;
justify-content
:
flex-end
;
z-index
:
100000
;
background
:
rgba
(
0
,
0
,
0
,
0.8
);
}
}
.markBox
{
position
:
fixed
;
left
:
0
;
top
:
0
;
bottom
:
0
;
right
:
0
;
width
:
100%
;
height
:
100%
;
color
:
#fff
;
display
:
flex
;
justify-content
:
flex-end
;
z-index
:
100000
;
background
:
rgba
(
0
,
0
,
0
,
0.8
);
}
//
.iconfont
{
//
position
:
absolute
;
//
right
:
8%
;
//
font-size
:
40px
;
//
top
:
2px
;
//
font-weight
:
bold
;
//
}
.guideImgBox
{
margin
:
20px
auto
;
uni-image{
width
:
25%
!important
;
position
:
absolute
;
right
:
0
;
top
:
0
;
}
}
.tips
{
margin-top
:
20%
;
padding
:
0
30px
;
}
.tips
p
{
font-size
:
18px
;
margin-top
:
10px
;
text-align
:
justify
;
letter-spacing
:
1px
;
}
//
.iconfont
{
//
position
:
absolute
;
//
right
:
8%
;
//
font-size
:
40px
;
//
top
:
2px
;
//
font-weight
:
bold
;
//
}
.guideImgBox
{
margin
:
20px
auto
;
uni-image
{
width
:
25%
!important
;
position
:
absolute
;
right
:
0
;
top
:
0
;
}
}
.tips
{
margin-top
:
20%
;
padding
:
0
30px
;
}
.tips
p
{
font-size
:
18px
;
margin-top
:
10px
;
text-align
:
justify
;
letter-spacing
:
1px
;
}
</
style
>
</
style
>
pages/saleCourseLists/saleCourseLists.vue
View file @
097b1b1f
...
@@ -79,13 +79,15 @@
...
@@ -79,13 +79,15 @@
<
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
{
fmdata
}
from
'@/util/currentDate.js'
export
default
{
export
default
{
components
:{
components
:{
courseItem
courseItem
},
},
data
()
{
data
()
{
return
{
return
{
queryDate
:
`
${
new
Date
().
getFullYear
()}
-
${
new
Date
().
getMonth
()
+
1
}
`
,
queryDate
:
fmdata
(
new
Date
(),
'M'
),
// queryDate:`${new Date().getFullYear()}-${new Date().getMonth() + 1
<
10
?
'0'
+
(
new
Date
().
getMonth
()
+
1
):
new
Date
().
getMonth
()
+
1
}
`,
maxDate:`
$
{
new
Date
().
getFullYear
()}
-
$
{
new
Date
().
getMonth
()
+
1
}
`,
maxDate:`
$
{
new
Date
().
getFullYear
()}
-
$
{
new
Date
().
getMonth
()
+
1
}
`,
userId: uni.getStorageSync('cffp_userId'),
userId: uni.getStorageSync('cffp_userId'),
coursesCountInfos:{},
coursesCountInfos:{},
...
...
util/currentDate.js
0 → 100644
View file @
097b1b1f
export
function
fmdata
(
val
,
filets
)
{
var
date
=
new
Date
(
Number
(
val
));
//时间戳为10位需*1000,时间戳为13位的话不需乘1000
var
Y
=
date
.
getFullYear
();
var
M
=
(
date
.
getMonth
()
+
1
<
10
?
"0"
+
(
date
.
getMonth
()
+
1
)
:
date
.
getMonth
()
+
1
);
// var D = date.getDate() + " ";
var
D
=
(
date
.
getDate
()
<
10
?
"0"
+
(
date
.
getDate
())
:
date
.
getDate
())
+
" "
;
var
h
=
date
.
getHours
()
+
":"
;
var
m
=
date
.
getMinutes
()
+
":"
;
var
s
=
(
date
.
getSeconds
()
<
10
?
"0"
+
(
date
.
getSeconds
())
:
date
.
getSeconds
());
if
(
filets
==
'D'
)
{
return
Y
+
"-"
+
M
+
"-"
+
D
;
}
if
(
filets
==
'M'
)
{
return
Y
+
"-"
+
M
;
}
if
(
filets
==
'Y'
)
{
return
Y
;
}
// return Y + M + D + h + m + s;
}
export
function
fmdataTime
(
val
)
{
var
date
=
new
Date
(
Number
(
val
));
//时间戳为10位需*1000,时间戳为13位的话不需乘1000
var
Y
=
date
.
getFullYear
()
+
"-"
;
var
M
=
(
date
.
getMonth
()
+
1
<
10
?
"0"
+
(
date
.
getMonth
()
+
1
)
:
date
.
getMonth
()
+
1
)
+
"-"
;
// var D = date.getDate() + " ";
var
D
=
(
date
.
getDate
()
<
10
?
"0"
+
(
date
.
getDate
())
:
date
.
getDate
())
+
" "
;
var
h
=
date
.
getHours
()
+
":"
;
// var m = date.getMinutes() + ":";
var
m
=
(
date
.
getMinutes
()
<
10
?
"0"
+
(
date
.
getMinutes
())
:
date
.
getMinutes
())
+
":"
;
var
s
=
(
date
.
getSeconds
()
<
10
?
"0"
+
(
date
.
getSeconds
())
:
date
.
getSeconds
());
return
h
+
m
+
s
;
}
// format(date, fmt) {
// let ret;
// const opt = {
// "Y+": date.getFullYear().toString(), // 年
// "m+": (date.getMonth() + 1).toString(), // 月
// "d+": date.getDate().toString(), // 日
// "H+": date.getHours().toString(), // 时
// "M+": date.getMinutes().toString(), // 分
// "S+": date.getSeconds().toString() // 秒
// // 有其他格式化字符需求可以继续添加,必须转化成字符串
// };
// for (let k in opt) {
// ret = new RegExp("(" + k + ")").exec(fmt);
// if (ret) {
// fmt = fmt.replace(
// ret[1],
// ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, "0")
// );
// }
// }
// // str=str.Substring(0,i);
// return fmt;
// },
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