Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
U
uniapp_vedio
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
android
uniapp_vedio
Commits
ee3b8180
Commit
ee3b8180
authored
Jul 30, 2024
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
bae59d4e
Changes
16
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
95 additions
and
387 deletions
+95
-387
index.js
vedio/common/services/index.js
+0
-11
page-route.js
vedio/common/services/page-route.js
+2
-2
userServices.js
vedio/common/services/userServices.js
+2
-2
bookshelf.vue
vedio/components/bookshelf/bookshelf.vue
+1
-1
c-empty.vue
vedio/components/c-empty/c-empty.vue
+1
-1
c-list.vue
vedio/components/c-list/c-list.vue
+7
-5
coin-popup.vue
vedio/components/coin-popup/coin-popup.vue
+14
-61
warehouse-list.vue
vedio/components/warehouse/components/warehouse-list.vue
+3
-2
warehouse.vue
vedio/components/warehouse/warehouse.vue
+9
-16
warehousetemp.vue
vedio/components/warehouse/warehousetemp.vue
+0
-165
book-content.vue
vedio/page-subs/sub_A/book-content/book-content.vue
+16
-16
index.js
vedio/page-subs/sub_A/book-content/services/index.js
+2
-1
home.vue
vedio/pages/home.vue
+7
-38
loading.vue
vedio/pages/loading.vue
+4
-7
vipPay.vue
vedio/pagesA/vipPay/vipPay.vue
+25
-55
utils.js
vedio/utils/utils.js
+2
-4
No files found.
vedio/common/services/index.js
View file @
ee3b8180
...
...
@@ -262,16 +262,6 @@ function getPayInfo(id, amount, openId, callback, typeId = ENUM_PAY_TYPE.VIP.val
})
}
function
getPayInfoDy
(
pid
)
{
apiPOST
({
url
:
`/vip/getVipPayParams/douyin`
,
data
:
{
pid
:
pid
},
callback
})
}
/**
* 获取书豆套餐数据
...
...
@@ -318,7 +308,6 @@ module.exports = {
getOpenId
,
getFeedback
,
ENUM_PAY_TYPE
,
getPayInfoDy
,
getPayInfo
,
buyBookWithBookBean
,
...
...
vedio/common/services/page-route.js
View file @
ee3b8180
...
...
@@ -29,7 +29,7 @@ function gotoBookContentPage(bookId, shortis) {
function
gotoShortBookContentPage
(
bookId
)
{
// 短篇小说
uni
.
navigateTo
({
url
:
`/page-subs/sub_A/book-content/book-content
`
,
url
:
`/page-subs/sub_A/book-content/book-content
?bookId=`
+
bookId
,
success
:
(
res
)
=>
{
res
.
eventChannel
.
emit
(
"openBookContentPage"
,
{
bookId
...
...
@@ -41,7 +41,7 @@ function gotoShortBookContentPage(bookId) {
// 长篇文章详情
function
gotoLongBookContentPage
(
bookId
)
{
uni
.
navigateTo
({
url
:
`/page-subs/sub_A/book-long-content/book-long-content
`
,
url
:
`/page-subs/sub_A/book-long-content/book-long-content
?bookId=`
+
bookId
,
success
:
(
res
)
=>
{
res
.
eventChannel
.
emit
(
"openBookContentPage"
,
{
bookId
...
...
vedio/common/services/userServices.js
View file @
ee3b8180
...
...
@@ -114,7 +114,7 @@ function refreshUserInfo() {
id
:
userData
.
idcode
,
memberExpirationDate
:
userData
.
expireTime
})
saveNickname
(
userData
.
nickname
);
//
saveNickname(userData.nickname);
saveUserInfo
(
user
);
// 存储用户数据
postNotification
(
KEY_NOTIFICATION_LOGIN_SUCCESS
);
// 通知登录成功
}
...
...
@@ -147,7 +147,7 @@ function postPhone(data, callback) {
// 请求token
function
requestToken
(
data
,
callback
)
{
let
url
=
`
${
config
[
"BASE_URL"
]}
/user/
wechatl
ogin`
;
let
url
=
`
${
config
[
"BASE_URL"
]}
/user/
ksL
ogin`
;
let
header
=
{
pkgName
:
PAKEAGE_NAME
,
version
:
VERSION_CODE
,
...
...
vedio/components/bookshelf/bookshelf.vue
View file @
ee3b8180
<
template
>
<z-paging>
<
c-navi
id=
'navi'
></c-navi
>
<
!--
<c-navi
id=
'navi'
></c-navi>
--
>
<book-search-box
id=
'search'
:searchType=
'searchType'
></book-search-box>
<read-time-count-row
id=
'count'
ref=
'timeCount'
@
resize=
'resizeTimeCount'
></read-time-count-row>
<BookshelfList
ref=
'bookList'
:height=
'listHeight'
></BookshelfList>
...
...
vedio/components/c-empty/c-empty.vue
View file @
ee3b8180
<
template
>
<view
v-if=
"false"
class=
"c-empty"
:style=
"[emptyStyle]"
>
<view
class=
"c-empty"
:style=
"[emptyStyle]"
>
<image
class=
'empty-image'
:style=
"[emptyImgStyle]"
:src=
'emptyImg'
>
</image>
<view
class=
"empty-title"
:style=
"[emptyTitleStyle]"
>
...
...
vedio/components/c-list/c-list.vue
View file @
ee3b8180
...
...
@@ -204,6 +204,8 @@
this
.
refreshTrigger
=
false
;
}
this
.
refreshTrigger
=
true
;
this
.
refresh
()
},
closeTrigger
()
{
if
(
!
this
.
refreshTrigger
)
{
...
...
vedio/components/coin-popup/coin-popup.vue
View file @
ee3b8180
...
...
@@ -132,7 +132,7 @@
}
this
.
post
({
url
:
'/vip/getVipProducts
/cyc
'
,
url
:
'/vip/getVipProducts'
,
data
:
{
bookId
:
that
.
vedioId
},
...
...
@@ -199,83 +199,36 @@
message
.
notify
(
'暂不支持ios系统~'
);
}
else
{
this
.
post
({
url
:
'/vip/getVipPayParams/
wechat
'
,
url
:
'/vip/getVipPayParams/
kuaishou
'
,
data
:
{
pid
:
vipBean
.
pid
,
payChannel
:
'
WEIXIN
'
payChannel
:
'
kuaishou
'
},
showLoading
:
true
,
success
:
({
data
})
=>
{
if
(
vipBean
.
firstPayPrice
==
0
)
{
//签约
that
.
wxSign
(
data
,
vipBean
.
largeType
);
}
else
{
//普通支付
that
.
wxPay
(
data
,
vipBean
.
largeType
);
}
}
});
}
},
wxPay
(
wxData
,
largeType
)
{
let
wxParams
=
wxData
.
params
;
ksPay
(
wxData
,
largeType
)
{
let
that
=
this
;
// 发起微信支付
wx
.
requestPayment
({
timeStamp
:
wxParams
.
timeStamp
,
nonceStr
:
wxParams
.
nonceStr
,
package
:
wxParams
.
packageStr
,
signType
:
wxParams
.
signType
,
paySign
:
wxParams
.
paySign
,
success
(
res
)
{
ks
.
pay
({
serviceId
:
'1'
,
orderInfo
:
ksData
.
params
,
// paymentChannel: ksData.params.paymentChannel,
success
()
{
message
.
notify
(
'支付成功'
)
that
.
queryOrderStatus
(
largeType
,
wxData
.
tidStr
);
},
fail
(
res
)
{}
})
fail
(
)
{
message
.
notify
(
'支付失败'
);
},
wxSign
(
wxData
,
largeType
)
{
let
wxParams
=
wxData
.
params
;
let
that
=
this
;
// 发起微信签约
wx
.
navigateToMiniProgram
({
appId
:
"wxbd687630cd02ce1d"
,
path
:
'pages/index/index'
,
extraData
:
wxData
.
params
,
success
(
res
)
{
console
.
log
(
"wxSign suc="
,
res
);
if
(
res
.
return_code
==
'SUCCESS'
)
{
console
.
log
(
"wxSign suc1111"
);
// 成功跳转到签约小程序
that
.
queryOrderStatus
(
largeType
,
wxData
.
tidStr
);
}
else
{
// 签约失败
console
.
log
(
"wxSign fail22222"
);
}
},
fail
(
res
)
{
// 未成功跳转到签约小程序
console
.
log
(
"wxSign fail=3333"
,
res
);
}
})
},
queryOrderStatus
(
largeType
,
tid
)
{
let
that
=
this
;
this
.
post
({
data
:
{
tid
:
tid
},
url
:
'/vip/queryVipOrder'
,
showLoading
:
true
,
success
:
({
data
})
=>
{
that
.
paySuccess
(
largeType
);
}
});
}
},
watch
:
{
show
:
{
...
...
vedio/components/warehouse/components/warehouse-list.vue
View file @
ee3b8180
...
...
@@ -16,6 +16,7 @@
import
{
isEmpty
}
from
'../../../common/utils/util'
import
{
login
}
from
'../../../utils/fun'
;
import
WarehouseBookItem
from
'../models/WarehouseBookItem.js'
;
export
default
{
components
:
{},
...
...
vedio/components/warehouse/warehouse.vue
View file @
ee3b8180
<
template
>
<z-paging>
<c-navi
id=
'navi'
></c-navi>
<view>
<book-search-box
id=
'search'
></book-search-box>
<CategoryBar
id=
'category'
:range=
'categorys'
:current=
'currentIndex'
@
change=
'changeCategory'
@
ready=
'readyCategory'
></CategoryBar>
<view
:style=
"[listStyle]"
v-if=
'showEmpty'
>
<c-empty
emptyTitle=
"
暂无数据
"
></c-empty>
<c-empty
emptyTitle=
"
正在加载中~
"
></c-empty>
</view>
<view
:style=
"[listStyle]"
v-else
>
<swiper
:style=
"[listStyle]"
:indicator-dots=
"false"
:autoplay=
"false"
:current=
"currentIndex"
...
...
@@ -16,8 +15,8 @@
</swiper-item>
</swiper>
</view>
<
c-login></c-login
>
</
z-paging
>
<
!--
<c-login></c-login>
--
>
</
view
>
</
template
>
<
script
>
...
...
@@ -80,13 +79,6 @@
setTimeout
(()
=>
{
this
.
$refs
[
`bookList
${
n
.
currentIndex
}
`
][
0
].
initRefresh
();
},
500
)
// this.$nextTick(() => {
// // this.$refs[`bookList${n.currentIndex}`][0].initRefresh();
// let ref = this.$refs.bookList;
// if (ref) {
// ref[n.currentIndex].initRefresh();
// }
// })
},
deep
:
true
}
...
...
@@ -145,15 +137,16 @@
},
initHeight
()
{
const
query
=
uni
.
createSelectorQuery
().
in
(
this
);
query
.
select
(
"#navi"
).
boundingClientRect
();
query
.
select
(
"#search"
).
boundingClientRect
();
query
.
select
(
"#category"
).
boundingClientRect
();
query
.
exec
((
res
)
=>
{
let
result
=
0
;
var
result
=
0
;
res
.
forEach
(
item
=>
{
if
(
item
)
{
if
(
item
.
height
)
{
result
=
result
+
item
.
height
;
}
}
})
this
.
listHeight
=
this
.
windowHeight
-
result
-
(
this
.
windowHeight
*
0.1
);
})
...
...
vedio/components/warehouse/warehousetemp.vue
deleted
100644 → 0
View file @
bae59d4e
<
template
>
<view
style=
"padding-top: 50rpx;"
>
<profile-header
:userInfo=
'userInfo'
></profile-header>
<CategoryBar
id=
'category'
:range=
'categorys'
:current=
'currentIndex'
@
change=
'changeCategory'
@
ready=
'readyCategory'
></CategoryBar>
<view
:style=
"[listStyle]"
v-if=
'showEmpty'
>
<c-empty
emptyTitle=
"暂无数据"
></c-empty>
</view>
<view
:style=
"[listStyle]"
v-else
>
<swiper
:style=
"[listStyle]"
:indicator-dots=
"false"
:autoplay=
"false"
:current=
"currentIndex"
@
change=
"changeSwiper"
>
<swiper-item
v-for=
'(item, index) in categorys'
:key=
'index'
>
<WarehouseList
ref=
'bookList'
:category=
'item'
:height=
'listHeight'
></WarehouseList>
</swiper-item>
</swiper>
</view>
<c-login></c-login>
</view>
</
template
>
<
script
>
import
ProfileHeader
from
"./components/profile-headertemp.vue"
;
import
{
watchUserInfoChange
,
refreshUserInfo
}
from
"../../common/services/userServices.js"
import
CategoryBar
from
"./components/category-bar.vue"
;
import
WarehouseList
from
"./components/warehouse-list.vue"
;
import
SystemInfoMixin
from
"../../common/mixins/system-info-mixin.js"
;
import
Category
from
"./models/Category.js"
;
import
{
getCategorys
}
from
"./services/index.js"
import
{
isEmpty
}
from
"../../common/utils/util"
;
import
{
readStorage
,
saveStorage
}
from
'../../common/utils/storageUtil'
;
export
default
{
mixins
:
[
SystemInfoMixin
],
components
:
{
CategoryBar
,
ProfileHeader
,
WarehouseList
},
data
()
{
return
{
userInfo
:
null
,
listHeight
:
0
,
categorys
:
[],
currentIndex
:
0
};
},
onLoad
()
{
},
computed
:
{
showEmpty
:
function
()
{
return
isEmpty
(
this
.
categorys
);
},
listStyle
:
function
()
{
return
{
height
:
`
${
this
.
listHeight
}
px`
}
},
categroyChange
:
function
()
{
const
{
categorys
,
currentIndex
}
=
this
;
return
{
categorys
,
currentIndex
}
}
},
watch
:
{
categroyChange
:
{
handler
:
function
(
n
,
o
)
{
this
.
$nextTick
(()
=>
{
let
ref
=
this
.
$refs
.
bookList
;
if
(
ref
)
{
ref
[
n
.
currentIndex
].
initRefresh
();
}
})
},
deep
:
true
}
},
methods
:
{
show
(){
console
.
log
(
"123123123"
)
this
.
getCategoryData
();
watchUserInfoChange
((
info
)
=>
{
this
.
userInfo
=
info
.
userInfo
},
this
);
this
.
refreshUserData
();
},
hide
()
{
},
readyCategory
()
{
setTimeout
(()
=>
{
this
.
initHeight
()
},
300
)
},
getCategoryData
()
{
getCategorys
((
success
,
data
)
=>
{
if
(
success
)
{
let
result
=
data
?
data
.
map
(
item
=>
{
return
new
Category
(
item
)
}).
sort
((
a
,
b
)
=>
{
return
a
.
sort
-
b
.
sort
})
:
[];
result
.
unshift
(
new
Category
({
name
:
"全部"
,
id
:
""
}))
this
.
categorys
=
result
;
}
})
},
initHeight
()
{
const
query
=
uni
.
createSelectorQuery
().
in
(
this
);
// query.select("#navi").boundingClientRect();
// query.select("#search").boundingClientRect();
query
.
select
(
"#category"
).
boundingClientRect
();
query
.
exec
((
res
)
=>
{
let
result
=
0
;
res
.
forEach
(
item
=>
{
result
=
result
+
item
.
height
;
})
this
.
listHeight
=
this
.
windowHeight
-
result
;
})
},
changeCategory
(
e
)
{
this
.
changeCurrent
(
e
.
index
);
},
changeSwiper
(
e
)
{
this
.
changeCurrent
(
e
.
detail
.
current
);
},
changeCurrent
(
index
)
{
if
(
index
!=
this
.
currentIndex
)
{
this
.
currentIndex
=
index
;
}
},
refreshUserData
()
{
if
(
this
.
userInfo
)
{
refreshUserInfo
();
}
}
}
}
</
script
>
<
style
lang=
"scss"
>
.name
{
font-size
:
34rpx
;
font-weight
:
700
;
}
</
style
>
\ No newline at end of file
vedio/page-subs/sub_A/book-content/book-content.vue
View file @
ee3b8180
<
template
>
<z-paging
:style=
"[bgStyle]"
>
<c-empty
v-if=
'showEmpty'
></c-empty>
<template
v-else
>
<template
v-if=
"bookData"
>
<detail-warn></detail-warn>
<detail-thumb
:detail=
'bookData'
@
tapThumb=
'tapThumb'
></detail-thumb>
<detail-content
@
tapVip=
'tapPayPop'
:detail=
'bookData'
:userInfo=
'userInfo'
></detail-content>
...
...
@@ -18,6 +17,7 @@
:vedioId=
"bookData.id"
@
paySuccess=
"paySuccess"
>
</coin-popup>
</
template
>
<c-empty
v-else
emptyTitle=
"正在加载中~"
></c-empty>
<c-login
:isShareLink=
"true"
></c-login>
<popup
:show=
"showMoibleLogin"
@
close=
"showMoibleLogin=false"
>
<view>
...
...
@@ -142,14 +142,14 @@
uni
.
startPullDownRefresh
({})
})
// 绑定分享参数
//
#ifdef MP-WEIXIN
wx
.
onCopyUrl
(()
=>
{
return
{
query
:
`bookId=
${
this
.
bookData
.
id
}
`
}
})
// #endif
//
//
绑定分享参数
//
// #ifdef MP-KUAISHOU
// ks
.onCopyUrl(() => {
//
return {
//
query: `bookId=${this.bookData.id}`
//
}
//
})
//
//
#endif
},
onShow
()
{
refreshUserInfo
();
...
...
@@ -167,10 +167,10 @@
removeContentFormatChangeWatch
(
this
);
removeUserInfoChangeWatch
(
this
);
// 取消绑定分享参数
//
#ifdef MP-WEIXIN
wx
.
offCopyUrl
()
// #endif
//
//
取消绑定分享参数
//
// #ifdef MP-KUAISHOU
// ks
.offCopyUrl()
//
//
#endif
},
onPullDownRefresh
()
{
this
.
refreshBookData
(
this
.
bookId
)
...
...
vedio/page-subs/sub_A/book-content/services/index.js
View file @
ee3b8180
...
...
@@ -12,6 +12,7 @@ import {
apiGET
,
apiPOST
}
from
"../../../../common/utils/apiRequest.js"
import
Book
from
"../../../../common/models/Book"
;
/** 获取文章详情
* @param {Object} bookId
...
...
vedio/pages/home.vue
View file @
ee3b8180
<
template
>
<view
v-if=
"localActiviteFlag==1"
class=
"body"
>
<view
class=
"body"
>
<view
style=
"height: 92%;"
>
<bookshelf
v-show=
"currentPage==0"
ref=
"index"
/>
<warehouse
v-show=
"currentPage==1"
ref=
"recommend"
/>
...
...
@@ -36,22 +36,6 @@
</view>
</view>
</view>
<view
v-else
class=
"body"
>
<view
:style=
"'display: flex;flex-direction: row;align-items: center;margin: 20rpx;padding-left: 10rpx;margin-top:'+10+'px;'"
>
<image
class=
"avatar"
src=
"@/static/logo-about.png"
></image>
<view>
<view
style=
"font-size: 34rpx;color: black;margin-left: 30rpx;"
>
用户ID:
{{
localIdcode
}}
</view>
<view
style=
"font-size: 26rpx;color: #b5b5b5;margin-left: 30rpx;margin-top: 10rpx;"
>
书中自有颜如玉,书中自有黄金屋,书中自有千钟黍
</view>
</view>
</view>
<view
style=
"height: 92%;"
>
<warehouse
v-show=
"currentPage==1"
ref=
"recommend"
/>
</view>
</view>
</
template
>
<
script
>
...
...
@@ -77,13 +61,11 @@
data
()
{
return
{
currentPage
:
1
,
localActiviteFlag
:
0
,
localIdcode
:
0
,
}
},
onLoad
(
options
)
{
let
index
=
options
.
index
??
''
this
.
localActiviteFlag
=
options
.
activiteFlag
;
this
.
localIdcode
=
options
.
idcode
;
if
(
index
!=
''
&&
index
!=
undefined
)
{
this
.
currentPage
=
index
...
...
@@ -107,13 +89,6 @@
// 渲染完成 初始化首页数据
this
.
loadComponentData
();
let
that
=
this
if
(
this
.
localActiviteFlag
==
1
)
{
uni
.
$on
(
'goWareHouse'
,
function
(
data
)
{
that
.
tabChange
(
1
)
})
}
uni
.
$on
(
'refreshPreviousPage'
,
(
data
)
=>
{
if
(
data
.
vipFlag
==
'1'
)
{
...
...
@@ -131,7 +106,6 @@
this
.
loadComponentData
();
},
loadComponentData
()
{
if
(
this
.
localActiviteFlag
==
1
)
{
if
(
this
.
currentPage
==
0
)
{
this
.
$refs
.
index
.
show
();
}
else
if
(
this
.
currentPage
==
1
)
{
...
...
@@ -139,11 +113,6 @@
}
else
if
(
this
.
currentPage
==
2
)
{
this
.
$refs
.
user
.
show
();
}
}
else
{
if
(
this
.
currentPage
==
1
)
{
this
.
$refs
.
recommend
.
show
();
}
}
}
}
}
...
...
vedio/pages/loading.vue
View file @
ee3b8180
...
...
@@ -46,10 +46,10 @@
this
.
tips1
=
options
.
tips1
},
onShow
(
options
)
{
this
.
tt
Loging
()
this
.
ks
Loging
()
},
methods
:
{
tt
Loging
()
{
ks
Loging
()
{
var
that
=
this
;
var
obj
=
ks
.
getLaunchOptionsSync
()
...
...
@@ -89,11 +89,8 @@
app
.
globalData
.
userId
=
data
.
idcode
;
saveToken
(
data
.
token
)
setTimeout
(()
=>
{
redirectTo
(
'home?activiteFlag='
+
data
.
activiteFlag
+
"&idcode="
+
data
.
idcode
);
// redirectTo('/pagesA/vipPay/vipPay');
},
1000
);
redirectTo
(
'home?&idcode='
+
data
.
idcode
);
},
500
);
}
});
},
...
...
vedio/pagesA/vipPay/vipPay.vue
View file @
ee3b8180
...
...
@@ -49,15 +49,15 @@
</view>
<view
class=
"agreementWrp"
>
<checkbox-group
@
change=
"checkboxChange"
style=
"width: 50rpx;"
>
<checkbox-group
@
change=
"checkboxChange"
style=
"width: 50rpx;
margin-right: 10rpx;
"
>
<checkbox
:checked=
"checked"
style=
"transform:scale(0.9)"
>
</checkbox>
</checkbox-group>
<
text
>
您已阅读并同意
<
view
>
您已阅读并同意
<text
class=
"agreementText"
@
click=
"goAgreement(1)"
>
《连续订阅服务协议》
</text>
与
<text
class=
"agreementText"
@
click=
"goAgreement(2)"
>
《支付协议》
</text>
与
<text
class=
"agreementText"
@
click=
"goAgreement(3)"
>
《隐私政策》
</text>
</
text
>
</
view
>
</view>
<view
class=
"section"
>
...
...
@@ -98,7 +98,7 @@
}
this
.
post
({
url
:
'/vip/getVipProducts
/cyc
'
,
url
:
'/vip/getVipProducts'
,
showLoading
:
false
,
success
:
({
data
...
...
@@ -163,58 +163,27 @@
message
.
notify
(
'暂不支持ios系统~'
);
}
else
{
this
.
post
({
url
:
'/vip/getVipPayParams/
wechat
'
,
url
:
'/vip/getVipPayParams/
kuaishou
'
,
data
:
{
pid
:
vipBean
.
pid
,
payChannel
:
'
WEIXIN
'
payChannel
:
'
kuaishou
'
},
showLoading
:
true
,
success
:
({
data
})
=>
{
if
(
vipBean
.
firstPayPrice
==
0
)
{
//签约
that
.
wxSign
(
data
,
vipBean
.
largeType
);
}
else
{
//普通支付
that
.
wxPay
(
data
,
vipBean
.
largeType
);
}
that
.
ksPay
(
data
);
}
});
}
},
wxSign
(
wxData
,
largeType
)
{
ksPay
(
ksData
)
{
let
that
=
this
;
// 发起微信签约
wx
.
navigateToMiniProgram
({
appId
:
"wxbd687630cd02ce1d"
,
path
:
'pages/index/index'
,
extraData
:
wxData
.
params
,
success
(
res
)
{
message
.
notify
(
'支付成功'
)
setTimeout
(()
=>
{
navigateBack
();
},
1000
);
},
fail
(
res
)
{
// 未成功跳转到签约小程序
console
.
log
(
"wxSign fail="
,
res
);
}
})
},
wxPay
(
wxData
)
{
let
wxParams
=
wxData
.
params
;
let
that
=
this
;
// 发起微信支付
wx
.
requestPayment
({
timeStamp
:
wxParams
.
timeStamp
,
nonceStr
:
wxParams
.
nonceStr
,
package
:
wxParams
.
packageStr
,
signType
:
wxParams
.
signType
,
paySign
:
wxParams
.
paySign
,
success
(
res
)
{
ks
.
pay
({
serviceId
:
'1'
,
orderInfo
:
ksData
.
params
,
// paymentChannel: ksData.params.paymentChannel,
success
()
{
message
.
notify
(
'支付成功'
)
setTimeout
(()
=>
{
...
...
@@ -226,9 +195,9 @@
});
},
1000
);
},
fail
(
res
)
{
message
.
notify
(
'
取消支付'
)
}
fail
()
{
message
.
notify
(
'
支付失败'
);
}
,
})
},
checkboxChange
(
e
)
{
...
...
@@ -353,8 +322,8 @@
}
.label
{
margin-top
:
-4rpx
;
margin-left
:
-4rpx
;
//
margin-top: -4rpx;
//
margin-left: -4rpx;
border-radius
:
20rpx
0
20rpx
0
;
width
:
80%
;
background
:
linear-gradient
(
90deg
,
#FC4F3B
,
#FBCB7A
);
...
...
@@ -370,9 +339,9 @@
}
.label2
{
margin-bottom
:
-4rpx
;
margin-left
:
-4rpx
;
margin-right
:
-4rpx
;
//
margin-bottom: -4rpx;
//
margin-left: -4rpx;
//
margin-right: -4rpx;
width
:
100%
;
border-radius
:
0
0
20rpx
20rpx
;
background-color
:
#FC4F3B
;
...
...
@@ -408,7 +377,8 @@
color
:
darkgray
;
font-size
:
26rpx
;
margin-top
:
30rpx
;
padding-left
:
30rpx
;
padding
:
0
30rpx
;
.agreementText
{
color
:
#387EF4
;
...
...
vedio/utils/utils.js
View file @
ee3b8180
export
const
PAKEAGE_NAME
=
'com.mingce.wxhelibook'
export
const
VERSION_CODE
=
'1.0.3'
// export const PAKEAGE_NAME = 'com.test.test'
export
const
PAKEAGE_NAME
=
'com.mingce.kshelibook'
export
const
VERSION_CODE
=
'1.0.0'
export
function
trim
(
str
)
{
return
str
?
str
.
replace
(
/
(
^
\s
*
)
|
(\s
*$
)
/g
,
""
)
:
''
...
...
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