Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
scrm-wx-merchant-activity
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 1eaa54ca
authored
Sep 24, 2022
by
liimin
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
格式化
1 parent
58c0bdf0
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
47 changed files
with
489 additions
and
798 deletions
.eslintignore
.eslintrc.js
package.json
src/api/carLifeApi.js
src/api/index.js
src/api/mapApi.js
src/api/shopmallApi.js
src/api/ssoApi.js
src/api/utils/md5.js
src/api/utils/qs.js
src/api/wxConfig.js
src/assets/css/index.scss
src/components/Action.vue
src/components/CountDown.vue
src/components/EvaluateItem.vue
src/components/FAQItem.vue
src/components/KfModal.vue
src/components/LiveBox.vue
src/components/MoveGroup.vue
src/components/PayModal.vue
src/components/Serve.vue
src/components/ServeModal.vue
src/components/ShareGoods.vue
src/components/createOrderImg.vue
src/components/index.js
src/config/env.development.js
src/main.js
src/mixins/index.js
src/plugins/vant.js
src/router/router.js
src/router/routes.js
src/store/modules/app.js
src/utils/audio.js
src/utils/draw.js
src/utils/index.js
src/utils/store.js
src/utils/tools.js
src/utils/util.js
src/views/crowdfunding/carBrands.vue
src/views/crowdfunding/carSeries.vue
src/views/crowdfunding/evaluate.vue
src/views/crowdfunding/faq.vue
src/views/crowdfunding/imagePreview.vue
src/views/crowdfunding/index.vue
src/views/crowdfunding/orderList.vue
src/views/crowdfunding/success.vue
vue.config.js
.eslintignore
View file @
1eaa54c
...
@@ -3,3 +3,5 @@ src/assets
...
@@ -3,3 +3,5 @@ src/assets
src/config
src/config
public
public
dist
dist
node_modules
agreement.vue
.eslintrc.js
View file @
1eaa54c
module
.
exports
=
{
module
.
exports
=
{
root
:
true
,
root
:
true
,
globals
:
{
wx
:
true
,
TCPlayer
:
true
,
Hls
:
true
,
vm
:
true
},
env
:
{
env
:
{
node
:
true
node
:
true
},
},
...
@@ -9,6 +15,7 @@ module.exports = {
...
@@ -9,6 +15,7 @@ module.exports = {
},
},
rules
:
{
rules
:
{
'no-console'
:
process
.
env
.
NODE_ENV
===
'production'
?
'warn'
:
'off'
,
'no-console'
:
process
.
env
.
NODE_ENV
===
'production'
?
'warn'
:
'off'
,
'no-debugger'
:
process
.
env
.
NODE_ENV
===
'production'
?
'warn'
:
'off'
'no-debugger'
:
process
.
env
.
NODE_ENV
===
'production'
?
'warn'
:
'off'
,
'no-unused-vars'
:
'off'
}
}
}
}
package.json
View file @
1eaa54c
{
{
"name"
:
"
gh-hall
"
,
"name"
:
"
zhongchou
"
,
"version"
:
"1.0.0"
,
"version"
:
"1.0.0"
,
"description"
:
"GH Hall By Work WeChat"
,
"description"
:
"GH Hall By Work WeChat"
,
"author"
:
"limin <limin.mail@qq.com>"
,
"author"
:
"limin <limin.mail@qq.com>"
,
...
@@ -39,6 +39,7 @@
...
@@ -39,6 +39,7 @@
"babel-plugin-import"
:
"^1.13.0"
,
"babel-plugin-import"
:
"^1.13.0"
,
"babel-plugin-transform-remove-console"
:
"^6.9.4"
,
"babel-plugin-transform-remove-console"
:
"^6.9.4"
,
"eslint"
:
"^6.7.2"
,
"eslint"
:
"^6.7.2"
,
"eslint-plugin-prettier"
:
"^3.3.1"
,
"eslint-plugin-vue"
:
"^6.2.2"
,
"eslint-plugin-vue"
:
"^6.2.2"
,
"lint-staged"
:
"^9.5.0"
,
"lint-staged"
:
"^9.5.0"
,
"node-sass"
:
"^4.14.1"
,
"node-sass"
:
"^4.14.1"
,
...
@@ -50,5 +51,14 @@
...
@@ -50,5 +51,14 @@
"vue-loader"
:
"^15.9.8"
,
"vue-loader"
:
"^15.9.8"
,
"vue-template-compiler"
:
"^2.6.11"
,
"vue-template-compiler"
:
"^2.6.11"
,
"webpack-bundle-analyzer"
:
"^3.8.0"
"webpack-bundle-analyzer"
:
"^3.8.0"
},
"gitHooks"
:
{
"pre-commit"
:
"lint-staged"
},
"lint-staged"
:
{
"*.{js,jsx,vue}"
:
[
"vue-cli-service lint"
,
"git add"
]
}
}
}
}
src/api/carLifeApi.js
View file @
1eaa54c
...
@@ -3,7 +3,7 @@ const url = '/rop-scrm-carlife/router'
...
@@ -3,7 +3,7 @@ const url = '/rop-scrm-carlife/router'
import
{
util
}
from
'utils'
import
{
util
}
from
'utils'
export
default
{
export
default
{
/**获取车品牌列表 */
/**获取车品牌列表 */
getCarBrandList
(
data
=
{})
{
getCarBrandList
(
data
=
{})
{
data
.
method
=
'scrm.api.carlife.common.getOnlyCarBrandList'
data
.
method
=
'scrm.api.carlife.common.getOnlyCarBrandList'
return
window
.
$HTTP
({
return
window
.
$HTTP
({
url
,
url
,
...
@@ -11,7 +11,7 @@ export default {
...
@@ -11,7 +11,7 @@ export default {
})
})
},
},
/** 获取车系列表 */
/** 获取车系列表 */
getCarSeriesList
(
params
)
{
getCarSeriesList
(
params
)
{
let
data
=
{
let
data
=
{
method
:
'scrm.api.carlife.common.getCarSeriesList'
,
method
:
'scrm.api.carlife.common.getCarSeriesList'
,
...
params
...
params
...
@@ -22,7 +22,7 @@ export default {
...
@@ -22,7 +22,7 @@ export default {
})
})
},
},
/** 获取车型 */
/** 获取车型 */
getCarTypeList
(
carSeriesId
)
{
getCarTypeList
(
carSeriesId
)
{
let
data
=
{
let
data
=
{
method
:
'scrm.api.carlife.common.getCarTypeList'
,
method
:
'scrm.api.carlife.common.getCarTypeList'
,
carSeriesId
carSeriesId
...
@@ -31,5 +31,5 @@ export default {
...
@@ -31,5 +31,5 @@ export default {
url
,
url
,
data
data
})
})
}
,
}
}
}
src/api/index.js
View file @
1eaa54c
...
@@ -13,11 +13,4 @@ import shopmallApi from './shopmallApi'
...
@@ -13,11 +13,4 @@ import shopmallApi from './shopmallApi'
import
bigdatautilApi
from
'./bigdatautilApi'
import
bigdatautilApi
from
'./bigdatautilApi'
import
carLifeApi
from
'./carLifeApi'
import
carLifeApi
from
'./carLifeApi'
export
{
ssoApi
,
mapApi
,
wxConfig
,
shopmallApi
,
bigdatautilApi
,
carLifeApi
}
\ No newline at end of file
\ No newline at end of file
export
{
ssoApi
,
mapApi
,
wxConfig
,
shopmallApi
,
bigdatautilApi
,
carLifeApi
}
src/api/mapApi.js
View file @
1eaa54c
...
@@ -4,27 +4,28 @@ const key = 'F2HBZ-KH73F-7A2J2-JC4UR-WOHCO-UVFGZ'
...
@@ -4,27 +4,28 @@ const key = 'F2HBZ-KH73F-7A2J2-JC4UR-WOHCO-UVFGZ'
const
secret
=
'YBmrM98E5pM4gYeknWiBPaWpFR4AISUl'
const
secret
=
'YBmrM98E5pM4gYeknWiBPaWpFR4AISUl'
const
domain
=
'https://apis.map.qq.com'
const
domain
=
'https://apis.map.qq.com'
class
QQMap
{
class
QQMap
{
setLocaleCompare
(
params
)
{
setLocaleCompare
(
params
)
{
params
.
key
=
key
params
.
key
=
key
let
keys
=
[]
let
keys
=
[]
let
obj
=
{}
let
obj
=
{}
Object
.
keys
(
params
).
map
(
e
=>
keys
.
push
(
e
))
Object
.
keys
(
params
).
map
(
e
=>
keys
.
push
(
e
))
keys
.
sort
((
a
,
b
)
=>
a
.
localeCompare
(
b
)).
map
(
e
=>
obj
[
e
]
=
params
[
e
]
)
keys
.
sort
((
a
,
b
)
=>
a
.
localeCompare
(
b
)).
map
(
e
=>
(
obj
[
e
]
=
params
[
e
])
)
return
obj
return
obj
}
}
getSign
(
params
,
methods
)
{
getSign
(
params
,
methods
)
{
let
obj
=
this
.
setLocaleCompare
(
params
)
let
obj
=
this
.
setLocaleCompare
(
params
)
let
sign
=
`
${
methods
}
?
${
decodeURIComponent
(
qs
.
stringify
(
obj
))}${
secret
}
`
let
sign
=
`
${
methods
}
?
${
decodeURIComponent
(
qs
.
stringify
(
obj
))}${
secret
}
`
return
md5
(
sign
)
return
md5
(
sign
)
}
}
request
(
method
,
data
)
{
request
(
method
,
data
)
{
data
.
output
=
'jsonp'
data
.
output
=
'jsonp'
// data.callback = 'test'
// data.callback = 'test'
const
sig
=
this
.
getSign
(
data
,
method
)
const
sig
=
this
.
getSign
(
data
,
method
)
let
obj
=
{
let
obj
=
{
...
this
.
setLocaleCompare
(
data
),
...
this
.
setLocaleCompare
(
data
),
sig
sig
},
params
=
[]
},
params
=
[]
Object
.
keys
(
obj
).
map
(
key
=>
{
Object
.
keys
(
obj
).
map
(
key
=>
{
params
.
push
(
`
${
key
}
=
${
encodeURIComponent
(
obj
[
key
])}
`
)
params
.
push
(
`
${
key
}
=
${
encodeURIComponent
(
obj
[
key
])}
`
)
})
})
...
@@ -34,7 +35,7 @@ class QQMap {
...
@@ -34,7 +35,7 @@ class QQMap {
// })
// })
let
script
=
document
.
createElement
(
'script'
)
let
script
=
document
.
createElement
(
'script'
)
script
.
src
=
`
${
domain
}${
method
}
?
${
params
.
join
(
'&'
)}
`
script
.
src
=
`
${
domain
}${
method
}
?
${
params
.
join
(
'&'
)}
`
script
.
type
=
"text/javascript"
script
.
type
=
'text/javascript'
document
.
body
.
insertBefore
(
script
,
document
.
body
.
children
[
0
])
document
.
body
.
insertBefore
(
script
,
document
.
body
.
children
[
0
])
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
window
[
'QQmap'
]
=
({
status
,
result
})
=>
{
window
[
'QQmap'
]
=
({
status
,
result
})
=>
{
...
@@ -46,7 +47,7 @@ class QQMap {
...
@@ -46,7 +47,7 @@ class QQMap {
})
})
}
}
/**计算距离 */
/**计算距离 */
calculateDistance
(
from
,
to
)
{
calculateDistance
(
from
,
to
)
{
from
=
from
.
join
(
','
)
from
=
from
.
join
(
','
)
to
=
to
.
join
(
','
)
to
=
to
.
join
(
','
)
return
this
.
request
(
'/ws/distance/v1/'
,
{
return
this
.
request
(
'/ws/distance/v1/'
,
{
...
@@ -56,7 +57,7 @@ class QQMap {
...
@@ -56,7 +57,7 @@ class QQMap {
})
})
}
}
/** 批量距离计算(矩阵) */
/** 批量距离计算(矩阵) */
calculateDistanceMatrix
(
from
,
toList
)
{
calculateDistanceMatrix
(
from
,
toList
)
{
from
=
from
.
join
(
','
)
from
=
from
.
join
(
','
)
let
to
=
toList
.
join
(
';'
)
let
to
=
toList
.
join
(
';'
)
return
this
.
request
(
'/ws/distance/v1/matrix/'
,
{
return
this
.
request
(
'/ws/distance/v1/matrix/'
,
{
...
@@ -66,24 +67,24 @@ class QQMap {
...
@@ -66,24 +67,24 @@ class QQMap {
})
})
}
}
/**地址解析(地址转坐标) */
/**地址解析(地址转坐标) */
geocoder
(
address
)
{
geocoder
(
address
)
{
return
this
.
request
(
'/ws/geocoder/v1/'
,
{
return
this
.
request
(
'/ws/geocoder/v1/'
,
{
address
address
})
})
}
}
/**逆地址解析(坐标位置描述) location=lat<纬度>,lng<经度> */
/**逆地址解析(坐标位置描述) location=lat<纬度>,lng<经度> */
detailedAdrress
(
location
)
{
detailedAdrress
(
location
)
{
location
=
location
.
join
(
','
)
location
=
location
.
join
(
','
)
return
this
.
request
(
'/ws/geocoder/v1/'
,
{
return
this
.
request
(
'/ws/geocoder/v1/'
,
{
location
location
})
})
}
}
/**IP定位 */
/**IP定位 */
getLocationByIp
()
{
getLocationByIp
()
{
return
this
.
request
(
'/ws/location/v1/ip'
)
return
this
.
request
(
'/ws/location/v1/ip'
)
}
}
/**坐标转换 */
/**坐标转换 */
translate
(
locations
,
type
=
5
)
{
translate
(
locations
,
type
=
5
)
{
locations
=
locations
.
join
(
';'
)
//格式:纬度前,经度后
locations
=
locations
.
join
(
';'
)
//格式:纬度前,经度后
return
this
.
request
(
'/ws/coord/v1/translate'
,
{
return
this
.
request
(
'/ws/coord/v1/translate'
,
{
locations
,
locations
,
...
...
src/api/shopmallApi.js
View file @
1eaa54c
const
url
=
'/rop-scrm-shopmall/router'
const
url
=
'/rop-scrm-shopmall/router'
export
default
{
export
default
{
/**众筹详情 */
/**众筹详情 */
getActivityDetail
(
id
)
{
getActivityDetail
(
id
)
{
return
window
.
$HTTP
({
return
window
.
$HTTP
({
url
,
url
,
data
:
{
data
:
{
...
@@ -12,26 +12,26 @@ export default {
...
@@ -12,26 +12,26 @@ export default {
})
})
},
},
/**参团人数 */
/**参团人数 */
getActivityGroup
(
id
)
{
getActivityGroup
(
id
)
{
return
window
.
$HTTP
({
return
window
.
$HTTP
({
url
,
url
,
data
:
{
data
:
{
method
:
'scrm.api.shopmall.weapp.activity.group'
,
method
:
'scrm.api.shopmall.weapp.activity.group'
,
id
,
id
},
},
returnAll
:
true
returnAll
:
true
})
})
},
},
/** 创建订单(立即购买) */
/** 创建订单(立即购买) */
createOrder
(
data
)
{
createOrder
(
data
)
{
data
.
method
=
'scrm.api.shopmall.weapp.order.create'
data
.
method
=
'scrm.api.shopmall.weapp.order.create'
return
window
.
$HTTP
({
return
window
.
$HTTP
({
url
,
url
,
data
,
data
})
})
},
},
/**创建支付订单(去付款) */
/**创建支付订单(去付款) */
payOrder
(
data
)
{
payOrder
(
data
)
{
data
.
method
=
`scrm.api.shopmall.weapp.order.createPay`
data
.
method
=
`scrm.api.shopmall.weapp.order.createPay`
return
window
.
$HTTP
({
return
window
.
$HTTP
({
url
,
url
,
...
@@ -40,7 +40,7 @@ export default {
...
@@ -40,7 +40,7 @@ export default {
})
})
},
},
/**海报 */
/**海报 */
getPoster
(
data
)
{
getPoster
(
data
)
{
data
.
method
=
`scrm.api.shopmall.weapp.crowdFunding.poster`
data
.
method
=
`scrm.api.shopmall.weapp.crowdFunding.poster`
return
window
.
$HTTP
({
return
window
.
$HTTP
({
url
,
url
,
...
@@ -48,7 +48,7 @@ export default {
...
@@ -48,7 +48,7 @@ export default {
})
})
},
},
/** 订单详情 */
/** 订单详情 */
getOrderList
(
activityId
)
{
getOrderList
(
activityId
)
{
let
data
=
{
let
data
=
{
activityId
,
activityId
,
method
:
'scrm.api.shopmall.weapp.crowdFunding.order.list'
method
:
'scrm.api.shopmall.weapp.crowdFunding.order.list'
...
...
src/api/ssoApi.js
View file @
1eaa54c
...
@@ -2,7 +2,7 @@ const url = '/rop-scrm-sso/router'
...
@@ -2,7 +2,7 @@ const url = '/rop-scrm-sso/router'
const
returnAll
=
true
const
returnAll
=
true
export
default
{
export
default
{
/**OAuth2授权登陆 */
/**OAuth2授权登陆 */
login
(
data
)
{
login
(
data
)
{
data
.
method
=
'scrm.api.sso.weapp.login.by.wechat'
data
.
method
=
'scrm.api.sso.weapp.login.by.wechat'
return
window
.
$HTTP
({
return
window
.
$HTTP
({
url
,
url
,
...
@@ -11,7 +11,7 @@ export default {
...
@@ -11,7 +11,7 @@ export default {
})
})
},
},
/**企微 OAuth2授权登陆 */
/**企微 OAuth2授权登陆 */
wwLogin
(
data
)
{
wwLogin
(
data
)
{
data
.
method
=
'scrm.api.sso.ww.oauth.login'
data
.
method
=
'scrm.api.sso.ww.oauth.login'
data
.
productCode
=
'PC00025'
data
.
productCode
=
'PC00025'
return
window
.
$HTTP
({
return
window
.
$HTTP
({
...
@@ -21,12 +21,12 @@ export default {
...
@@ -21,12 +21,12 @@ export default {
})
})
},
},
/**验证码登录 */
/**验证码登录 */
captchaLogin
(
data
)
{
captchaLogin
(
data
)
{
data
.
method
=
'scrm.api.sso.sms.login'
data
.
method
=
'scrm.api.sso.sms.login'
return
window
.
$HTTP
({
return
window
.
$HTTP
({
url
,
url
,
data
,
data
,
returnAll
returnAll
})
})
}
,
}
}
}
src/api/utils/md5.js
View file @
1eaa54c
This diff is collapsed.
Click to expand it.
src/api/utils/qs.js
View file @
1eaa54c
This diff is collapsed.
Click to expand it.
src/api/wxConfig.js
View file @
1eaa54c
...
@@ -3,17 +3,17 @@ import { Notify } from 'vant'
...
@@ -3,17 +3,17 @@ import { Notify } from 'vant'
let
requestCount
=
0
let
requestCount
=
0
let
wwRequestCount
=
0
let
wwRequestCount
=
0
const
WxConfig
=
{
const
WxConfig
=
{
async
init
(
jsApiList
=
[])
{
async
init
(
jsApiList
=
[])
{
const
isWxWork
=
window
.
$ISWXWORK
const
isWxWork
=
window
.
$ISWXWORK
jsApiList
.
map
(
e
=>
{
jsApiList
.
map
(
e
=>
{
if
(
e
==
'chooseImage'
)
jsApiList
.
push
(
'getLocalImgData'
)
if
(
e
==
'chooseImage'
)
jsApiList
.
push
(
'getLocalImgData'
)
})
})
await
this
[
isWxWork
?
'getWWConfig'
:
'getWxConfig'
](
jsApiList
)
await
this
[
isWxWork
?
'getWWConfig'
:
'getWxConfig'
](
jsApiList
)
},
},
getWWConfig
(
jsApiList
)
{
getWWConfig
(
jsApiList
)
{
wwRequestCount
+=
1
wwRequestCount
+=
1
let
[
redirectUrl
]
=
window
.
location
.
href
.
split
(
'#'
)
let
[
redirectUrl
]
=
window
.
location
.
href
.
split
(
'#'
)
return
new
Promise
(
(
resolve
)
=>
{
return
new
Promise
(
resolve
=>
{
const
STORAGE_PARAMS
=
util
.
getLocalStorage
(
'wx_scrm_link_params'
)
const
STORAGE_PARAMS
=
util
.
getLocalStorage
(
'wx_scrm_link_params'
)
let
data
=
{
let
data
=
{
corpId
:
STORAGE_PARAMS
.
corpId
,
corpId
:
STORAGE_PARAMS
.
corpId
,
...
@@ -23,11 +23,13 @@ const WxConfig = {
...
@@ -23,11 +23,13 @@ const WxConfig = {
}
}
this
.
getWxConfig
(
jsApiList
).
then
(()
=>
{
this
.
getWxConfig
(
jsApiList
).
then
(()
=>
{
wx
.
ready
(()
=>
{
wx
.
ready
(()
=>
{
window
.
$HTTP
({
window
.
$HTTP
({
url
:
'/rop-scrm-wechat/router'
,
url
:
'/rop-scrm-wechat/router'
,
data
,
data
,
returnAll
:
true
returnAll
:
true
}).
then
(({
code
,
data
,
message
})
=>
{
})
.
then
(({
code
,
data
,
message
})
=>
{
if
(
code
==
'0'
)
{
if
(
code
==
'0'
)
{
if
(
data
)
{
if
(
data
)
{
wx
.
agentConfig
({
wx
.
agentConfig
({
...
@@ -37,10 +39,10 @@ const WxConfig = {
...
@@ -37,10 +39,10 @@ const WxConfig = {
nonceStr
:
data
.
nonceStr
,
// 必填,生成签名的随机串
nonceStr
:
data
.
nonceStr
,
// 必填,生成签名的随机串
signature
:
data
.
signature
,
// 必填,签名,见附录-JS-SDK使用权限签名算法,
signature
:
data
.
signature
,
// 必填,签名,见附录-JS-SDK使用权限签名算法,
jsApiList
:
[
'getContext'
,
...
jsApiList
],
jsApiList
:
[
'getContext'
,
...
jsApiList
],
success
(
res
)
{
success
(
res
)
{
resolve
()
resolve
()
},
},
fail
(
err
)
{
fail
(
err
)
{
Notify
(
message
)
Notify
(
message
)
// util.refreshPage(JSONStringify(err)).then(() => {
// util.refreshPage(JSONStringify(err)).then(() => {
// window.location.reload()
// window.location.reload()
...
@@ -66,11 +68,12 @@ const WxConfig = {
...
@@ -66,11 +68,12 @@ const WxConfig = {
})
})
})
})
},
},
getWxConfig
(
jsApiList
)
{
getWxConfig
(
jsApiList
)
{
requestCount
+=
1
requestCount
+=
1
let
[
redirectUrl
]
=
window
.
location
.
href
.
split
(
'#'
)
let
[
redirectUrl
]
=
window
.
location
.
href
.
split
(
'#'
)
return
new
Promise
((
resolve
)
=>
{
return
new
Promise
(
resolve
=>
{
window
.
$HTTP
({
window
.
$HTTP
({
url
:
'/rop-scrm-equity/router'
,
url
:
'/rop-scrm-equity/router'
,
data
:
{
data
:
{
url
:
redirectUrl
,
url
:
redirectUrl
,
...
@@ -78,7 +81,8 @@ const WxConfig = {
...
@@ -78,7 +81,8 @@ const WxConfig = {
method
:
'scrm.api.equity.common.wechat.jsconfig'
method
:
'scrm.api.equity.common.wechat.jsconfig'
},
},
returnAll
:
true
returnAll
:
true
}).
then
(({
code
,
data
,
message
})
=>
{
})
.
then
(({
code
,
data
,
message
})
=>
{
if
(
code
==
'0'
)
{
if
(
code
==
'0'
)
{
if
(
data
)
{
if
(
data
)
{
let
obj
=
{}
let
obj
=
{}
...
@@ -108,10 +112,11 @@ const WxConfig = {
...
@@ -108,10 +112,11 @@ const WxConfig = {
})
})
})
})
},
},
ready
(
callBack
)
{
ready
(
callBack
)
{
const
isWxWork
=
window
.
$ISWXWORK
const
isWxWork
=
window
.
$ISWXWORK
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
if
(
isWxWork
)
wx
.
invoke
(
'getContext'
,
{},
res
=>
{
if
(
isWxWork
)
wx
.
invoke
(
'getContext'
,
{},
res
=>
{
let
{
err_msg
,
entry
,
shareTicket
}
=
res
let
{
err_msg
,
entry
,
shareTicket
}
=
res
/** entry 说明
/** entry 说明
*contact_profile 从联系人详情进入 3.0.24
*contact_profile 从联系人详情进入 3.0.24
...
@@ -123,32 +128,36 @@ const WxConfig = {
...
@@ -123,32 +128,36 @@ const WxConfig = {
if
(
err_msg
==
'getContext:ok'
)
{
if
(
err_msg
==
'getContext:ok'
)
{
//entry 返回进入H5页面的入口类型,目前有normal、contact_profile、single_chat_tools、group_chat_tools、chat_attachment
//entry 返回进入H5页面的入口类型,目前有normal、contact_profile、single_chat_tools、group_chat_tools、chat_attachment
//shareTicket可用于调用getShareInfo接口
//shareTicket可用于调用getShareInfo接口
callBack
(
resolve
({
callBack
(
resolve
({
entry
,
entry
,
shareTicket
shareTicket
}),
reject
)
}),
reject
)
}
else
{
}
else
{
callBack
(
reject
)
callBack
(
reject
)
}
}
})
})
else
wx
.
ready
(()
=>
{
else
wx
.
ready
(()
=>
{
callBack
(
resolve
,
reject
)
callBack
(
resolve
,
reject
)
})
})
})
})
},
},
/**获取地理位置接口 */
/**获取地理位置接口 */
getLocation
(
type
=
'gcj02'
)
{
getLocation
(
type
=
'gcj02'
)
{
return
this
.
ready
(
(
resolve
)
=>
{
return
this
.
ready
(
resolve
=>
{
wx
.
getLocation
({
wx
.
getLocation
({
type
,
// 默认为wgs84的gps坐标,如果要返回直接给openLocation用的火星坐标,可传入'gcj02'
type
,
// 默认为wgs84的gps坐标,如果要返回直接给openLocation用的火星坐标,可传入'gcj02'
success
(
res
)
{
success
(
res
)
{
resolve
(
res
)
resolve
(
res
)
}
}
})
})
})
})
},
},
/**打开地图导航 */
/**打开地图导航 */
openLocation
(
params
)
{
openLocation
(
params
)
{
return
this
.
ready
(
resolve
=>
{
return
this
.
ready
(
resolve
=>
{
let
{
latitude
,
longitude
,
name
,
address
,
scale
=
'18'
,
infoUrl
=
''
}
=
params
let
{
latitude
,
longitude
,
name
,
address
,
scale
=
'18'
,
infoUrl
=
''
}
=
params
wx
.
openLocation
({
wx
.
openLocation
({
...
@@ -158,7 +167,7 @@ const WxConfig = {
...
@@ -158,7 +167,7 @@ const WxConfig = {
address
,
address
,
scale
,
scale
,
infoUrl
,
infoUrl
,
success
(
res
)
{
success
(
res
)
{
console
.
log
(
res
)
console
.
log
(
res
)
resolve
(
res
)
resolve
(
res
)
}
}
...
@@ -166,7 +175,7 @@ const WxConfig = {
...
@@ -166,7 +175,7 @@ const WxConfig = {
})
})
},
},
/**支付 */
/**支付 */
chooseWXPay
({
timestamp
,
nonceStr
,
packages
,
signType
,
paySign
})
{
chooseWXPay
({
timestamp
,
nonceStr
,
packages
,
signType
,
paySign
})
{
return
this
.
ready
(
resolve
=>
{
return
this
.
ready
(
resolve
=>
{
wx
.
chooseWXPay
({
wx
.
chooseWXPay
({
timestamp
,
// 支付签名时间戳,注意微信js sdk中的所有使用timestamp字段均为小写。但最新版的支付后台生成签名使用的timeStamp字段名需大写其中的S字符
timestamp
,
// 支付签名时间戳,注意微信js sdk中的所有使用timestamp字段均为小写。但最新版的支付后台生成签名使用的timeStamp字段名需大写其中的S字符
...
@@ -174,21 +183,21 @@ const WxConfig = {
...
@@ -174,21 +183,21 @@ const WxConfig = {
package
:
packages
,
// 统一支付接口返回的prepay_id参数值,提交格式如:prepay_id=\*\*\*)
package
:
packages
,
// 统一支付接口返回的prepay_id参数值,提交格式如:prepay_id=\*\*\*)
signType
,
// 签名方式,默认为'SHA1',使用新版支付需传入'MD5'
signType
,
// 签名方式,默认为'SHA1',使用新版支付需传入'MD5'
paySign
,
// 支付签名
paySign
,
// 支付签名
success
(
res
)
{
success
(
res
)
{
window
.
vm
.
showToast
(
'支付成功'
)
window
.
vm
.
showToast
(
'支付成功'
)
resolve
(
res
)
resolve
(
res
)
},
},
fail
()
{
fail
()
{
window
.
vm
.
showToast
(
'已取消支付'
)
window
.
vm
.
showToast
(
'已取消支付'
)
},
},
cancel
()
{
cancel
()
{
window
.
vm
.
showToast
(
'支付失败,请重试'
)
window
.
vm
.
showToast
(
'支付失败,请重试'
)
}
}
})
})
})
})
},
},
/**设置分享内容 */
/**设置分享内容 */
updateAppMessageShareData
(
params
)
{
updateAppMessageShareData
(
params
)
{
// title, // 分享标题
// title, // 分享标题
// desc: '', // 分享描述
// desc: '', // 分享描述
// link: '', // 分享链接,该链接域名或路径必须与当前页面对应的公众号 JS 安全域名一致
// link: '', // 分享链接,该链接域名或路径必须与当前页面对应的公众号 JS 安全域名一致
...
@@ -204,7 +213,7 @@ const WxConfig = {
...
@@ -204,7 +213,7 @@ const WxConfig = {
})
})
},
},
/**分享朋友圈内容 */
/**分享朋友圈内容 */
updateTimelineShareData
(
params
)
{
updateTimelineShareData
(
params
)
{
delete
params
.
desc
delete
params
.
desc
// title, // 分享标题
// title, // 分享标题
// link: '', // 分享链接,该链接域名或路径必须与当前页面对应的公众号 JS 安全域名一致
// link: '', // 分享链接,该链接域名或路径必须与当前页面对应的公众号 JS 安全域名一致
...
@@ -228,32 +237,32 @@ const WxConfig = {
...
@@ -228,32 +237,32 @@ const WxConfig = {
* type: '', // 分享类型,music、video或link,不填默认为link
* type: '', // 分享类型,music、video或link,不填默认为link
* dataUrl: '', // 如果 type 是music或video,则要提供数据链接,默认为空
* dataUrl: '', // 如果 type 是music或video,则要提供数据链接,默认为空
*/
*/
onMenuShareAppMessage
(
params
)
{
onMenuShareAppMessage
(
params
)
{
return
new
Promise
(
(
resolve
)
=>
{
return
new
Promise
(
resolve
=>
{
wx
.
onMenuShareAppMessage
({
wx
.
onMenuShareAppMessage
({
...
params
,
...
params
,
success
:
function
()
{
success
:
function
()
{
resolve
()
resolve
()
// 用户点击了分享后执行的回调函数
// 用户点击了分享后执行的回调函数
}
,
}
})
})
})
})
},
},
/**获取“分享到朋友圈”按钮点击状态及自定义分享内容接口(即将废弃) */
/**获取“分享到朋友圈”按钮点击状态及自定义分享内容接口(即将废弃) */
onMenuShareTimeline
(
params
)
{
onMenuShareTimeline
(
params
)
{
delete
params
.
desc
delete
params
.
desc
return
new
Promise
(
(
resolve
)
=>
{
return
new
Promise
(
resolve
=>
{
wx
.
onMenuShareTimeline
({
wx
.
onMenuShareTimeline
({
...
params
,
...
params
,
success
:
function
()
{
success
:
function
()
{
resolve
()
resolve
()
// 用户点击了分享后执行的回调函数
// 用户点击了分享后执行的回调函数
}
,
}
})
})
})
})
},
},
/**企微自定义转发到会话 */
/**企微自定义转发到会话 */
shareAppMessage
(
params
)
{
shareAppMessage
(
params
)
{
// title: '', // 分享标题
// title: '', // 分享标题
// desc: '', // 分享描述
// desc: '', // 分享描述
// link: '', // 分享链接
// link: '', // 分享链接
...
@@ -272,10 +281,10 @@ const WxConfig = {
...
@@ -272,10 +281,10 @@ const WxConfig = {
"path": "pages/home/index.html", // 所需跳转的小程序内页面路径及参数。非必填
"path": "pages/home/index.html", // 所需跳转的小程序内页面路径及参数。非必填
*
*
*/
*/
launchMiniprogram
(
params
)
{
launchMiniprogram
(
params
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
wx
.
invoke
(
'launchMiniprogram'
,
params
,
function
(
res
)
{
wx
.
invoke
(
'launchMiniprogram'
,
params
,
function
(
res
)
{
if
(
res
.
err_msg
==
"launchMiniprogram:ok"
)
resolve
(
res
)
if
(
res
.
err_msg
==
'launchMiniprogram:ok'
)
resolve
(
res
)
else
reject
(
res
)
else
reject
(
res
)
})
})
})
})
...
...
src/assets/css/index.scss
View file @
1eaa54c
...
@@ -5,11 +5,11 @@ html,
...
@@ -5,11 +5,11 @@ html,
body
.app
{
body
.app
{
color
:
#333333
;
color
:
#333333
;
font-family
:
Arial
,
Helvetica
,
'STHeiti STXihei'
,
'Microsoft YaHei'
,
Tohoma
,
sans-serif
;
font-family
:
Arial
,
Helvetica
,
'STHeiti STXihei'
,
'Microsoft YaHei'
,
Tohoma
,
sans-serif
;
background-color
:
#
F7F8FA
;
background-color
:
#
f7f8fa
;
-webkit-overflow-scrolling
:
touch
;
-webkit-overflow-scrolling
:
touch
;
height
:
100%
;
height
:
100%
;
// overflow: hidden;
// overflow: hidden;
--themeColor
:
#3975
C
6
;
--themeColor
:
#3975
c
6
;
}
}
*
{
*
{
...
@@ -84,12 +84,11 @@ video {
...
@@ -84,12 +84,11 @@ video {
content
:
''
;
content
:
''
;
width
:
100%
;
width
:
100%
;
height
:
100%
;
height
:
100%
;
background-color
:
rgba
(
$color
:
#000000
,
$alpha
:
.1
);
background-color
:
rgba
(
$color
:
#000000
,
$alpha
:
0
.1
);
display
:
block
;
display
:
block
;
}
}
}
}
#audio
{
#audio
{
position
:
fixed
;
position
:
fixed
;
top
:
-10000px
;
top
:
-10000px
;
...
@@ -103,7 +102,6 @@ video {
...
@@ -103,7 +102,6 @@ video {
position
:
relative
;
position
:
relative
;
@keyframes
side-animation
{
@keyframes
side-animation
{
0
%
,
0
%
,
50
%
,
50
%
,
100
%
{
100
%
{
...
@@ -122,7 +120,7 @@ video {
...
@@ -122,7 +120,7 @@ video {
width
:
2px
;
width
:
2px
;
height
:
6px
;
height
:
6px
;
border-radius
:
1px
;
border-radius
:
1px
;
background
:
linear-gradient
(
bottom
,
#ffe385
0%
,
#ffc34d
100%
);
background
:
linear-gradient
(
to
bottom
,
#ffe385
0%
,
#ffc34d
100%
);
animation
:
side-animation
2s
infinite
;
animation
:
side-animation
2s
infinite
;
&
:last-of-type
{
&
:last-of-type
{
...
...
src/components/Action.vue
View file @
1eaa54c
<
template
>
<
template
>
<div
<div
:class=
"['action isFullSucreen flex',
{ bgBlack: bgBlack }]" v-if="show">
:class=
"['action isFullSucreen flex',
{ bgBlack: bgBlack }]"
v-if="show"
>
<div
class=
"btn-box flex"
v-show=
"!bgBlack"
>
<div
class=
"btn-box flex"
v-show=
"!bgBlack"
>
<div
<div
class=
"item"
@
click=
"getPoster"
>
class=
"item"
@
click=
"getPoster"
>
<div
class=
"sprite-icon icon-poster"
></div>
<div
class=
"sprite-icon icon-poster"
></div>
海报
海报
</div>
</div>
</div>
</div>
<div
class=
"price"
>
<div
class=
"price"
>
<span
class=
"unit"
>
¥
</span>
{{
detail
.
price
}}
<span>
.
{{
detail
.
decimal
}}
</span>
<span
class=
"unit"
>
¥
</span>
{{
detail
.
price
}}
<span>
.
{{
detail
.
decimal
}}
</span>
</div>
</div>
<div
<div
:class=
"['btn text-center',
{ disabled: iSMiniprogram || detail.activityStatus == 3 || detail.buyFlag == 2 }, { short: detail.buyFlag == 3 }]" @click="submit" @touchstart="touchstart" @touchend="touchend">
:class=
"['btn text-center',
{'disabled': iSMiniprogram || detail.activityStatus == 3 || detail.buyFlag == 2},{'short':detail.buyFlag == 3}]"
@click="submit"
@touchstart="touchstart"
@touchend="touchend"
>
<template
v-if=
"detail.activityStatus == 1"
>
预热下单
</
template
>
<template
v-if=
"detail.activityStatus == 1"
>
预热下单
</
template
>
<
template
v-else-if=
"detail.activityStatus == 3"
>
活动已结束
</
template
>
<
template
v-else-if=
"detail.activityStatus == 3"
>
活动已结束
</
template
>
<
template
v-else
>
<
template
v-else
>
...
@@ -29,32 +20,12 @@
...
@@ -29,32 +20,12 @@
<
template
v-else
>
立即参团
</
template
>
<
template
v-else
>
立即参团
</
template
>
</template>
</template>
</div>
</div>
<pay-modal
<pay-modal
v-model=
"showModal"
:list=
"formList"
@
cancel=
"showModal = false"
@
pay=
"checkOut"
:payStatus=
"payStatus"
:carInfo=
"carInfo"
/>
v-model=
"showModal"
<van-overlay
:show=
"showPoster"
@
click
.
self=
"showPoster = false"
>
:list=
"formList"
<div
class=
"wrapper"
@
click
.
stop
>
@
cancel=
"showModal = false"
<van-image
:src=
"posterImg"
width=
"100%"
height=
"100%"
>
@
pay=
"checkOut"
:payStatus=
"payStatus"
:carInfo=
"carInfo"
/>
<van-overlay
:show=
"showPoster"
@
click
.
self=
"showPoster = false"
>
<div
class=
"wrapper"
@
click
.
stop
>
<van-image
:src=
"posterImg"
width=
"100%"
height=
"100%"
>
<
template
v-slot:loading
>
<
template
v-slot:loading
>
<van-loading
<van-loading
type=
"spinner"
size=
"20"
/>
type=
"spinner"
size=
"20"
/>
</
template
>
</
template
>
</van-image>
</van-image>
</div>
</div>
...
@@ -62,7 +33,7 @@
...
@@ -62,7 +33,7 @@
</div>
</div>
</template>
</template>
<
script
type=
'text/ecmascript-6'
>
<
script
type=
"text/ecmascript-6"
>
import
{
shopmallApi
,
wxConfig
}
from
'@/api'
import
{
shopmallApi
,
wxConfig
}
from
'@/api'
import
{
util
}
from
'@/utils'
import
{
util
}
from
'@/utils'
export
default
{
export
default
{
...
@@ -270,7 +241,7 @@ export default {
...
@@ -270,7 +241,7 @@ export default {
}
}
</
script
>
</
script
>
<
style
scoped
lang=
'scss'
>
<
style
scoped
lang=
"scss"
>
.action
{
.action
{
position
:
fixed
;
position
:
fixed
;
left
:
0
;
left
:
0
;
...
...
src/components/CountDown.vue
View file @
1eaa54c
<
template
>
<
template
>
<div
class=
"count-down"
>
<div
class=
"count-down"
>
<div
class=
"bg"
>
<div
class=
"bg"
>
<img
src=
"https://img02.glsx.com.cn/weapp/resource/scrm-mobile/crowdfunding/timer-bg.png"
>
<img
src=
"https://img02.glsx.com.cn/weapp/resource/scrm-mobile/crowdfunding/timer-bg.png"
/
>
</div>
</div>
<div
:class=
"['timer-title',
{'timer-not-started':detail.activityStatus == 1
}]">
<div
:class=
"['timer-title',
{ 'timer-not-started': detail.activityStatus == 1
}]">
<img
:src=
"`https://img02.glsx.com.cn/weapp/resource/scrm-mobile/crowdfunding/timer-$
{detail.activityStatus
== 1?1:2}.png`"
>
<img
:src=
"`https://img02.glsx.com.cn/weapp/resource/scrm-mobile/crowdfunding/timer-$
{detail.activityStatus
== 1 ? 1 : 2}.png`" /
>
</div>
</div>
<div
:class=
"['time-box text-center',
{'not-started':detail.activityStatus == 1},{'finished':finished
}]">
<div
:class=
"['time-box text-center',
{ 'not-started': detail.activityStatus == 1 }, { finished: finished
}]">
<template
v-if=
"timeFlag"
>
<template
v-if=
"timeFlag"
>
<template
v-if=
"finished"
>
{{
finished
}}
</
template
>
<template
v-if=
"finished"
>
{{
finished
}}
</
template
>
<
template
v-else
>
<
template
v-else
>
<template
v-if=
"detail.activityStatus == 1"
>
<template
v-if=
"detail.activityStatus == 1"
>
{{
new
Date
(
iosTimeFormat
(
detail
.
startTime
)).
format
(
'M月d'
)
}}
日开始,还差
</
template
>
{{
new
Date
(
iosTimeFormat
(
detail
.
startTime
)).
format
(
'M月d'
)
}}
日开始,还差
</
template
>
<
template
v-if=
"activityTime.day"
>
<
template
v-if=
"activityTime.day"
>
<div
class=
"time flex"
>
<div
class=
"time flex"
>
<span
class=
"text-center flex"
>
{{
activityTime
.
day
}}
</span>
<span
class=
"text-center flex"
>
{{
activityTime
.
day
}}
</span>
<div
class=
"unit"
>
天
</div>
<div
class=
"unit"
>
天
</div>
</div>
</div>
</
template
>
</
template
>
<
template
v-for=
"(i,index) in activityTime.dayList"
>
<
template
v-for=
"(i, index) in activityTime.dayList"
>
<div
<div
class=
"time flex"
:key=
"index"
>
class=
"time flex"
<span
class=
"text-center"
>
{{
i
.
text
}}
</span>
:key=
"index"
<div
class=
"unit"
>
{{
i
.
unit
}}
</div>
>
<span
class=
"text-center"
>
{{
i
.
text
}}
</span>
<div
class=
"unit"
>
{{
i
.
unit
}}
</div>
</div>
</div>
</
template
>
</
template
>
</template>
</template>
...
@@ -34,7 +29,7 @@
...
@@ -34,7 +29,7 @@
</div>
</div>
</template>
</template>
<
script
type=
'text/ecmascript-6'
>
<
script
type=
"text/ecmascript-6"
>
export
default
{
export
default
{
name
:
'CountDown'
,
name
:
'CountDown'
,
props
:
{
props
:
{
...
@@ -121,7 +116,7 @@ export default {
...
@@ -121,7 +116,7 @@ export default {
}
}
</
script
>
</
script
>
<
style
scoped
lang=
'scss'
>
<
style
scoped
lang=
"scss"
>
@import
'@/assets/css/crowdfunding.scss'
;
@import
'@/assets/css/crowdfunding.scss'
;
.count-down
{
.count-down
{
position
:
relative
;
position
:
relative
;
...
...
src/components/EvaluateItem.vue
View file @
1eaa54c
<
template
>
<
template
>
<div
:class=
"['share-item',
{hideBorder
}]">
<div
:class=
"['share-item',
{ hideBorder
}]">
<div
class=
"content"
>
<div
class=
"content"
>
<div
class=
"user-info flex"
>
<div
class=
"user-info flex"
>
<div>
<div>
<img
v-if=
"showAvatarNicknameFlag == 2"
class=
"icon-head"
:src=
"item.imageUrl"
>
<img
v-if=
"showAvatarNicknameFlag == 2"
class=
"icon-head"
:src=
"item.imageUrl"
/
>
<div
v-else
class=
"sprite-icon icon-avatar"
></div>
<div
v-else
class=
"sprite-icon icon-avatar"
></div>
</div>
</div>
{{
showAvatarNicknameFlag
==
2
?
item
.
name
:
'玩家'
+
num
}}
{{
showAvatarNicknameFlag
==
2
?
item
.
name
:
'玩家'
+
num
}}
</div>
</div>
<div
:class=
"['text',
{'text-two-line':indexType}]" v-text="item.experience">
<div
:class=
"['text',
{ 'text-two-line': indexType }]" v-text="item.experience">
</div>
</div>
<div
:class=
"['img-box',
{ four: indexType }]">
<div
:class=
"['img-box',
{'four':indexType}]">
<template
v-for=
"(i, index) in item.activityExperienceImgs"
>
<template
v-for=
"(i,index) in item.activityExperienceImgs"
>
<div
@
click=
"jumpPreview(index)"
v-if=
"indexType ? index
< 4
:
true
"
class=
"img-item"
:key=
"index"
>
<div
@
click=
"jumpPreview(index)"
v-if=
"indexType?index
< 4
:true
"
class=
"img-item"
:key=
"index"
>
<img
:src=
"i.imageUrl"
/>
<img
:src=
"i.imageUrl"
/>
</div>
</div>
</
template
>
</
template
>
...
@@ -21,7 +20,7 @@
...
@@ -21,7 +20,7 @@
</div>
</div>
</template>
</template>
<
script
type=
'text/ecmascript-6'
>
<
script
type=
"text/ecmascript-6"
>
export
default
{
export
default
{
name
:
'EvaluateItem'
,
name
:
'EvaluateItem'
,
props
:
{
props
:
{
...
@@ -51,7 +50,7 @@ export default {
...
@@ -51,7 +50,7 @@ export default {
}
}
</
script
>
</
script
>
<
style
scoped
lang=
'scss'
>
<
style
scoped
lang=
"scss"
>
@import
'@/assets/css/sharegoods.scss'
;
@import
'@/assets/css/sharegoods.scss'
;
.user-info
{
.user-info
{
padding
:
14px
0
10px
;
padding
:
14px
0
10px
;
...
...
src/components/FAQItem.vue
View file @
1eaa54c
<
template
>
<
template
>
<div
:class=
"['share-item',
{hideBorder},{indexType
}]">
<div
:class=
"['share-item',
{ hideBorder }, { indexType
}]">
<div
class=
"faq-item"
>
<div
class=
"faq-item"
>
<div
class=
"q flex"
>
<div
class=
"q flex"
>
<template
v-if=
"indexType"
>
<template
v-if=
"indexType"
>
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
<
template
v-else
>
<
template
v-else
>
<div
class=
"sprite-icon icon-faq-left"
></div>
<div
class=
"sprite-icon icon-faq-left"
></div>
</
template
>
</
template
>
<div
:class=
"['value',
{'text-hide':indexType}]"
>
{{item.question
}}
</div>
<div
:class=
"['value',
{ 'text-hide': indexType }]"
>
{{ item.question
}}
</div>
</div>
</div>
<div
class=
"a flex"
>
<div
class=
"a flex"
>
<
template
v-if=
"indexType"
>
<
template
v-if=
"indexType"
>
...
@@ -17,13 +17,13 @@
...
@@ -17,13 +17,13 @@
<
template
v-else
>
<
template
v-else
>
<div
class=
"sprite-icon icon-faq-right"
></div>
<div
class=
"sprite-icon icon-faq-right"
></div>
</
template
>
</
template
>
<div
:class=
"['value',
{'text-hide':indexType}]"
>
{{item.answer
}}
</div>
<div
:class=
"['value',
{ 'text-hide': indexType }]"
>
{{ item.answer
}}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
</template>
<
script
type=
'text/ecmascript-6'
>
<
script
type=
"text/ecmascript-6"
>
export
default
{
export
default
{
name
:
'FAQItem'
,
name
:
'FAQItem'
,
props
:
{
props
:
{
...
@@ -45,7 +45,7 @@ export default {
...
@@ -45,7 +45,7 @@ export default {
}
}
</
script
>
</
script
>
<
style
scoped
lang=
'scss'
>
<
style
scoped
lang=
"scss"
>
@import
'@/assets/css/sharegoods.scss'
;
@import
'@/assets/css/sharegoods.scss'
;
.faq-item
{
.faq-item
{
padding-top
:
16px
;
padding-top
:
16px
;
...
...
src/components/KfModal.vue
View file @
1eaa54c
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<div
:class=
"['kf-box flex']"
>
<div
:class=
"['kf-box flex']"
>
<template>
<template>
<div
class=
"qr-box"
>
<div
class=
"qr-box"
>
<img
src=
"@/assets/images/qr-bg.png"
/>
<img
src=
"@/assets/images/qr-bg.png"
/>
<img
:src=
"detail.groupQrCode"
class=
"qr xy-center"
/>
<img
:src=
"detail.groupQrCode"
class=
"qr xy-center"
/>
</div>
</div>
<div
class=
"btn"
@
click=
"save"
>
长按识别二维码加群
</div>
<div
class=
"btn"
@
click=
"save"
>
长按识别二维码加群
</div>
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
</van-overlay>
</van-overlay>
</template>
</template>
<
script
type=
'text/ecmascript-6'
>
<
script
type=
"text/ecmascript-6"
>
export
default
{
export
default
{
name
:
'KfModal'
,
name
:
'KfModal'
,
props
:
[
'value'
,
'detail'
],
props
:
[
'value'
,
'detail'
],
...
@@ -43,7 +43,7 @@ export default {
...
@@ -43,7 +43,7 @@ export default {
}
}
</
script
>
</
script
>
<
style
scoped
lang=
'scss'
>
<
style
scoped
lang=
"scss"
>
.van-overlay
{
.van-overlay
{
z-index
:
3
;
z-index
:
3
;
}
}
...
...
src/components/LiveBox.vue
View file @
1eaa54c
...
@@ -3,27 +3,32 @@
...
@@ -3,27 +3,32 @@
<div
class=
"small-box"
>
<div
class=
"small-box"
>
<img
class=
"icon-small-live"
src=
"@/assets/images/icon-small-live.png"
/>
<img
class=
"icon-small-live"
src=
"@/assets/images/icon-small-live.png"
/>
<div
class=
"flex small-content"
>
<div
class=
"flex small-content"
>
<div
v-if=
"liveStatus[liveDetail.status] == 'live'"
class=
"live-line"
>
<!--
<div
v-if=
"LiveStatus[liveDetail.status] == 'live'"
class=
"live-line"
>
-->
<div
v-if=
"LiveProps[liveDetail.status].isLive"
class=
"live-line"
>
<div
class=
"side"
></div>
<div
class=
"side"
></div>
<div
class=
"center side"
></div>
<div
class=
"center side"
></div>
<div
class=
"side"
></div>
<div
class=
"side"
></div>
</div>
</div>
<div
class=
"text"
>
{{
liveStatus
[
liveDetail
.
status
]
==
'live'
?
'直播'
:
'回放'
}}
</div>
<!--
<div
class=
"text"
>
{{
LiveStatus
[
liveDetail
.
status
]
==
'live'
?
'直播'
:
'回放'
}}
</div>
-->
<div
class=
"text"
>
{{
LiveProps
[
liveDetail
.
status
].
status
}}
</div>
</div>
</div>
</div>
</div>
<div
class=
"sprite-icon icon-live-close"
@
click=
"handleClose"
></div>
<div
class=
"sprite-icon icon-live-close"
@
click=
"handleClose"
></div>
<div
:class=
"
{ videoShort: detail.activityStatus != 3
&&
detail.buyFlag != 2 }">
<div
:class=
"
{ videoShort: detail.activityStatus != 3
&&
detail.buyFlag != 2 }">
<div
class=
"mask"
@
click=
"openFullscreen"
>
<div
class=
"mask"
@
click=
"openFullscreen"
>
<div
class=
"status flex"
>
<div
class=
"status flex"
>
<div
v-if=
"liveStatus[liveDetail.status] == 'live'"
class=
"live-line"
>
<!--
<div
v-if=
"LiveStatus[liveDetail.status] == 'live'"
class=
"live-line"
>
-->
<div
v-if=
"LiveProps[liveDetail.status].isLive"
class=
"live-line"
>
<div
class=
"side"
></div>
<div
class=
"side"
></div>
<div
class=
"center side"
></div>
<div
class=
"center side"
></div>
<div
class=
"side"
></div>
<div
class=
"side"
></div>
</div>
</div>
<div
class=
"text"
>
{{
liveStatus
[
liveDetail
.
status
]
==
'live'
?
'正在直播'
:
'直播回放'
}}
</div>
<!--
<div
class=
"text"
>
{{
LiveStatus
[
liveDetail
.
status
]
==
'live'
?
'正在直播'
:
'直播回放'
}}
</div>
-->
<div
class=
"text"
>
{{
LiveProps
[
liveDetail
.
status
].
text
}}
</div>
</div>
</div>
<template
v-if=
"isShowGif"
>
<template
v-if=
"isShowGif"
>
<img
v-if=
"liveStatus[liveDetail.status] == 'live'"
src=
"https://wimg.588ku.com/gif620/20/04/23/79a7882dfb0c59497976fd8b3bfe60ef.gif"
alt=
""
/>
<!--
<img
v-if=
"LiveStatus[liveDetail.status] == 'live'"
src=
"https://wimg.588ku.com/gif620/20/04/23/79a7882dfb0c59497976fd8b3bfe60ef.gif"
alt=
""
/>
-->
<img
v-if=
"LiveProps[liveDetail.status].isLive"
src=
"https://wimg.588ku.com/gif620/20/04/23/79a7882dfb0c59497976fd8b3bfe60ef.gif"
alt=
""
/>
<img
v-else
src=
"https://wimg.588ku.com/gif620/20/04/23/79a7882dfb0c59497976fd8b3bfe60ef.gif"
alt=
""
/>
<img
v-else
src=
"https://wimg.588ku.com/gif620/20/04/23/79a7882dfb0c59497976fd8b3bfe60ef.gif"
alt=
""
/>
</
template
>
</
template
>
</div>
</div>
...
@@ -40,6 +45,35 @@
...
@@ -40,6 +45,35 @@
</div>
</div>
</template>
</template>
<
script
type=
"text/ecmascript-6"
>
<
script
type=
"text/ecmascript-6"
>
const
CONSTANTS
=
Object
.
freeze
({
TCPlayerConfig
:
{
autoplay
:
true
,
// 自动播放
loop
:
true
,
// 循环播放
// muted: false, // 是否静音
controlBar
:
{
// 控制条配置
fullscreenToggle
:
false
// 隐藏全屏按钮
},
webrtcConfig
:
{
// webrtcConfig 参数列表
showLog
:
true
// 打印webrtc日志
}
},
PLAYERDOMID
:
'player-container-id'
,
LiveStatus
:
{
0
:
'ready'
,
1
:
'live'
,
2
:
'end'
},
LiveEnums
:{
READY
:
'ready'
,
LIVE
:
'live'
,
END
:
'end'
},
LiveProps
:{
'0'
:{},
'1'
:{
status
:
'直播'
,
text
:
'正在直播'
,
isLive
:
true
},
'2'
:{
status
:
'回放'
,
text
:
'直播回放'
,
isLive
:
false
}
}
})
import
{
wxConfig
}
from
'@/api'
import
{
wxConfig
}
from
'@/api'
export
default
{
export
default
{
name
:
'LiveBox'
,
name
:
'LiveBox'
,
...
@@ -50,11 +84,8 @@ export default {
...
@@ -50,11 +84,8 @@ export default {
showKf
:
false
,
showKf
:
false
,
isShowGif
:
false
,
isShowGif
:
false
,
videoStyle
:
''
,
videoStyle
:
''
,
liveStatus
:
{
LiveStatus
:
CONSTANTS
.
LiveStatus
,
0
:
'ready'
,
LiveProps
:
CONSTANTS
.
LiveProps
1
:
'live'
,
2
:
'end'
}
}
}
},
},
props
:
{
props
:
{
...
@@ -76,52 +107,89 @@ export default {
...
@@ -76,52 +107,89 @@ export default {
}
}
}
}
},
},
mounted
()
{
mounted
()
{
console
.
log
(
this
.
liveDetail
,
'============'
)
console
.
log
(
this
.
liveDetail
,
'============'
)
const
_this
=
this
this
.
createPlayerCover
()
if
(
!
this
.
IsIOS
)
{
this
.
createPlayer
()
this
.
changeGifStatus
()
this
.
play
()
}
// const _this = this
wxConfig
.
ready
(()
=>
{
// if (!this.IsIOS) {
if
(
Hls
.
isSupported
())
{
// this.changeGifStatus()
_this
.
video
=
document
.
getElementById
(
'player-container-id'
)
// }
_this
.
hls
=
new
Hls
()
// bind them together
// wxConfig.ready(() => {
_this
.
hls
.
attachMedia
(
_this
.
video
)
// if (Hls.isSupported()) {
}
// _this.video = document.getElementById('player-container-id')
const
playParams
=
{
// _this.hls = new Hls()
autoplay
:
true
,
// 自动播放
// // bind them together
loop
:
true
,
// 循环播放
// _this.hls.attachMedia(_this.video)
// muted: false, // 是否静音
// }
controlBar
:
{
// 控制条配置
// const playParams = {
fullscreenToggle
:
false
// 隐藏全屏按钮
// autoplay: true, // 自动播放
},
// loop: true, // 循环播放
webrtcConfig
:
{
// webrtcConfig 参数列表
// // muted: false, // 是否静音
showLog
:
true
// 打印webrtc日志
// controlBar: { // 控制条配置
}
// fullscreenToggle: false // 隐藏全屏按钮
}
// },
_this
.
player
=
TCPlayer
(
'player-container-id'
,
playParams
)
// webrtcConfig: { // webrtcConfig 参数列表
wx
.
getNetworkType
({
// showLog: true // 打印webrtc日志
success
:
(
result
)
=>
{
// }
_this
.
player
.
ready
(
function
()
{
// 设置播放器初始化完成后的回调
// }
const
src
=
_this
.
liveStatus
[
_this
.
liveDetail
.
status
]
==
'live'
?
_this
.
liveDetail
.
playPath
:
(
_this
.
liveDetail
.
liveBroadcastRecordingFileList
.
length
?
_this
.
liveDetail
.
liveBroadcastRecordingFileList
[
0
].
videoUrl
:
''
)
// _this.player = TCPlayer('player-container-id', playParams)
_this
.
player
.
src
(
src
)
// wx.getNetworkType({
_this
.
player
.
poster
()
// success: (result) => {
_this
.
player
.
play
()
// 播放视频
// _this.player.ready(function() { // 设置播放器初始化完成后的回调
_this
.
draggable
(
document
.
getElementById
(
'live-box'
),
_this
.
openFullscreen
)
// const src = _this.LiveStatus[_this.liveDetail.status] == 'live' ? _this.liveDetail.playPath : (_this.liveDetail.liveBroadcastRecordingFileList.length ? _this.liveDetail.liveBroadcastRecordingFileList[0].videoUrl : '')
})
// _this.player.src(src)
}
// _this.player.poster()
})
// _this.player.play() // 播放视频
// _this.draggable(document.getElementById('live-box'), _this.openFullscreen)
// })
// }
// })
// _this.player.on('play', () => {
// _this.player.on('play', () => {
// this.changeGifStatus()
// this.changeGifStatus()
// })
// })
// _this.player.on('pause', () => {
// _this.player.on('pause', () => {
// this.changeGifStatus()
// this.changeGifStatus()
// })
// })
_this
.
dealTcPlayerErr14
(
)
// _this.dealTcPlayerErr14(_this
)
})
//
})
},
},
methods
:
{
methods
:
{
createPlayerCover
()
{
!
this
.
IsIOS
&&
(
this
.
isShowGif
=
true
)
},
createPlayer
()
{
this
.
player
=
TCPlayer
(
CONSTANTS
.
PLAYERDOMID
,
CONSTANTS
.
TCPlayerConfig
)
},
play
()
{
wxConfig
.
ready
(()
=>
{
wx
.
getNetworkType
({
success
:
(
result
)
=>
{
console
.
log
(
'===='
,{
result
});
this
.
player
.
ready
(()
=>
{
// 设置播放器初始化完成后的回调
this
.
fixHls
()
const
src
=
this
.
LiveProps
[
this
.
liveDetail
.
status
].
isLive
?
this
.
liveDetail
.
playPath
:
this
.
liveDetail
.
liveBroadcastRecordingFileList
[
0
]?.
videoUrl
this
.
player
.
src
(
src
)
this
.
player
.
poster
()
this
.
player
.
play
()
// 播放视频
this
.
draggable
(
document
.
getElementById
(
'live-box'
),
this
.
openFullscreen
)
})
}
})
})
},
fixHls
()
{
if
(
Hls
.
isSupported
())
{
this
.
video
=
document
.
getElementById
(
CONSTANTS
.
PLAYERDOMID
)
this
.
hls
=
new
Hls
()
// bind them together
this
.
hls
.
attachMedia
(
this
.
video
)
this
.
dealTcPlayerErr14
()
}
},
// 打开关闭全屏
// 打开关闭全屏
openFullscreen
(
status
=
true
)
{
openFullscreen
(
status
=
true
)
{
const
[
live
]
=
document
.
getElementsByClassName
(
'live-box'
)
const
[
live
]
=
document
.
getElementsByClassName
(
'live-box'
)
...
@@ -135,22 +203,22 @@ export default {
...
@@ -135,22 +203,22 @@ export default {
this
.
$emit
(
'handleLiveFull'
,
{
isFull
:
this
.
videoFullscreen
})
this
.
$emit
(
'handleLiveFull'
,
{
isFull
:
this
.
videoFullscreen
})
},
},
// 处理tcplayer错误码14
// 处理tcplayer错误码14
dealTcPlayerErr14
(
_this
)
{
dealTcPlayerErr14
()
{
_
this
.
hls
.
on
(
Hls
.
Events
.
ERROR
,
function
(
event
,
data
)
{
this
.
hls
.
on
(
Hls
.
Events
.
ERROR
,
function
(
event
,
data
)
{
if
(
data
.
fatal
)
{
if
(
data
.
fatal
)
{
switch
(
data
.
type
)
{
switch
(
data
.
type
)
{
case
Hls
.
ErrorTypes
.
NETWORK_ERROR
:
case
Hls
.
ErrorTypes
.
NETWORK_ERROR
:
// try to recover network error
// try to recover network error
// console.log('fatal network error encountered, try to recover')
// console.log('fatal network error encountered, try to recover')
_
this
.
hls
.
startLoad
()
this
.
hls
.
startLoad
()
break
break
case
Hls
.
ErrorTypes
.
MEDIA_ERROR
:
case
Hls
.
ErrorTypes
.
MEDIA_ERROR
:
// console.log('fatal media error encountered, try to recover')
// console.log('fatal media error encountered, try to recover')
_
this
.
hls
.
recoverMediaError
()
this
.
hls
.
recoverMediaError
()
break
break
default
:
default
:
// cannot recover
// cannot recover
_
this
.
hls
.
destroy
()
this
.
hls
.
destroy
()
break
break
}
}
}
}
...
@@ -160,7 +228,7 @@ export default {
...
@@ -160,7 +228,7 @@ export default {
this
.
isShowGif
=
!
this
.
isShowGif
this
.
isShowGif
=
!
this
.
isShowGif
},
},
handleClose
(
e
)
{
handleClose
(
e
)
{
//
e.stopPropagation()
e
.
stopPropagation
()
console
.
log
(
'关闭--22222222222222222'
)
console
.
log
(
'关闭--22222222222222222'
)
}
}
}
}
...
@@ -176,7 +244,7 @@ export default {
...
@@ -176,7 +244,7 @@ export default {
height
:
148px
;
height
:
148px
;
border-radius
:
4px
;
border-radius
:
4px
;
overflow
:
hidden
;
overflow
:
hidden
;
-webkit-
user-select
:
auto
;
user-select
:
auto
;
.small-box
{
.small-box
{
position
:
relative
;
position
:
relative
;
width
:
52px
;
width
:
52px
;
...
...
src/components/MoveGroup.vue
View file @
1eaa54c
<
template
>
<
template
>
<div
<div
class=
"group-list"
ref=
"groupBox"
>
class=
"group-list"
ref=
"groupBox"
>
<div
class=
"mask"
></div>
<div
class=
"mask"
></div>
<template
v-if=
"list.length"
>
<template
v-if=
"list.length"
>
<div
<div
class=
"move"
ref=
"move"
>
class=
"move"
<template
v-for=
"(i, index) in list"
>
ref=
"move"
<div
:class=
"['item flex',
{ 'group-item': index == 0 }]" :key="index">
>
<img
:src=
"i.imageUrl"
/>
<template
v-for=
"(i,index) in list"
>
<div
class=
"text"
>
{{
i
.
name
}}
刚刚参加了活动
</div>
<div
:class=
"['item flex',
{'group-item' :index == 0}]"
:key="index"
>
<img
:src=
"i.imageUrl"
>
<div
class=
"text"
>
{{
i
.
name
}}
刚刚参加了活动
</div>
</div>
</div>
</
template
>
</
template
>
</div>
</div>
...
@@ -23,7 +14,7 @@
...
@@ -23,7 +14,7 @@
</div>
</div>
</template>
</template>
<
script
type=
'text/ecmascript-6'
>
<
script
type=
"text/ecmascript-6"
>
export
default
{
export
default
{
name
:
'MoveGroup'
,
name
:
'MoveGroup'
,
props
:
[
'groupInfo'
],
props
:
[
'groupInfo'
],
...
@@ -63,7 +54,7 @@ export default {
...
@@ -63,7 +54,7 @@ export default {
}
}
</
script
>
</
script
>
<
style
scoped
lang=
'scss'
>
<
style
scoped
lang=
"scss"
>
.group-list
{
.group-list
{
position
:
absolute
;
position
:
absolute
;
left
:
8px
;
left
:
8px
;
...
...
src/components/PayModal.vue
View file @
1eaa54c
<
template
>
<
template
>
<van-action-sheet
<van-action-sheet
v-model=
"showBox"
@
click-overlay=
"onCancel"
:lock-scroll=
"false"
>
v-model=
"showBox"
@
click-overlay=
"onCancel"
:lock-scroll=
"false"
>
<div
class=
"box"
>
<div
class=
"box"
>
<template
v-for=
"(i,index) in items"
>
<template
v-for=
"(i,
index) in items"
>
<template
v-if=
"i.name"
>
<template
v-if=
"i.name"
>
<div
<div
class=
"item flex"
:key=
"index"
>
class=
"item flex"
:key=
"index"
>
<div
class=
"label text-hide"
>
<div
class=
"label text-hide"
>
<span>
*
</span>
<span>
*
</span>
{{
i
.
name
}}
{{
i
.
name
}}
</div>
</div>
<div
class=
"value"
>
<div
class=
"value"
>
<template
v-if=
"i.route"
>
<template
v-if=
"i.route"
>
<van-field
<van-field
readonly
:placeholder=
"`请选择您的$
{i.name}`" @click="jumpCarBrands(i.route)" v-model="params[i.key]" class="readonly" right-icon="arrow">
</van-field>
readonly
:placeholder=
"`请选择您的$
{i.name}`"
@click="jumpCarBrands(i.route)"
v-model="params[i.key]"
class="readonly"
right-icon="arrow"
>
</van-field>
</
template
>
</
template
>
<
template
v-else
>
<
template
v-else
>
<van-field
<van-field
v-model=
"params[i.key]"
:placeholder=
"`请填写您的$
{i.name}`" :maxlength="i.maxlength" :type="i.type" clearable />
v-model=
"params[i.key]"
:placeholder=
"`请填写您的$
{i.name}`"
:maxlength="i.maxlength"
:type="i.type"
clearable
/>
</
template
>
</
template
>
</div>
</div>
</div>
</div>
...
@@ -44,25 +23,16 @@
...
@@ -44,25 +23,16 @@
本人已阅读且同意<span @click="jump('agreement')">《隐私协议》</span>
本人已阅读且同意<span @click="jump('agreement')">《隐私协议》</span>
</div> -->
</div> -->
<
template
v-if=
"ISWXWORK"
>
<
template
v-if=
"ISWXWORK"
>
<van-button
<van-button
color=
"#b1b1b1"
class=
"btn disabled"
>
企微暂不支持支付
</van-button>
color=
"#b1b1b1"
class=
"btn disabled"
>
企微暂不支持支付
</van-button>
</
template
>
</
template
>
<
template
v-else
>
<
template
v-else
>
<van-button
<van-button
color=
"#f13c3d"
class=
"btn"
@
click=
"pay"
loading-text=
"支付中..."
:loading=
"payLoading"
>
立即支付
</van-button>
color=
"#f13c3d"
class=
"btn"
@
click=
"pay"
loading-text=
"支付中..."
:loading=
"payLoading"
>
立即支付
</van-button>
</
template
>
</
template
>
</div>
</div>
</van-action-sheet>
</van-action-sheet>
</template>
</template>
<
script
type=
'text/ecmascript-6'
>
<
script
type=
"text/ecmascript-6"
>
import
{
ssoApi
}
from
'@/api'
import
{
ssoApi
}
from
'@/api'
import
{
Notify
}
from
'vant'
import
{
Notify
}
from
'vant'
import
store
from
'@/store'
import
store
from
'@/store'
...
@@ -214,7 +184,7 @@ export default {
...
@@ -214,7 +184,7 @@ export default {
}
}
</
script
>
</
script
>
<
style
scoped
lang=
'scss'
>
<
style
scoped
lang=
"scss"
>
.box
{
.box
{
padding
:
8px
16px
16px
;
padding
:
8px
16px
16px
;
.item
{
.item
{
...
...
src/components/Serve.vue
View file @
1eaa54c
<
template
>
<
template
>
<div
<div
class=
"serve"
v-if=
"list.length"
>
class=
"serve"
<div
class=
"box flex"
@
click=
"showModal = true"
>
v-if=
"list.length"
>
<div
class=
"box flex"
@
click=
"showModal = true"
>
服务
服务
<div
class=
"serve-text flex"
>
<div
class=
"serve-text flex"
>
<template
v-for=
"(i,index) in list"
>
<template
v-for=
"(i,
index) in list"
>
<div
:key=
"index"
class=
"flex"
>
<div
:key=
"index"
class=
"flex"
>
{{
i
.
title
}}
{{
i
.
title
}}
<span
v-if=
"index != list.length - 1"
>
·
</span>
<span
v-if=
"index != list.length - 1"
>
·
</span>
</div>
</div>
</
template
>
</
template
>
</div>
</div>
<div
class=
"sprite-icon icon-arrow"
></div>
<div
class=
"sprite-icon icon-arrow"
></div>
</div>
</div>
<serve-modal
<serve-modal
v-model=
"showModal"
@
cancel=
"showModal = false"
:list=
"list"
/>
v-model=
"showModal"
@
cancel=
"showModal = false"
:list=
"list"
/>
</div>
</div>
</template>
</template>
<
script
type=
'text/ecmascript-6'
>
<
script
type=
"text/ecmascript-6"
>
export
default
{
export
default
{
name
:
'Serve'
,
name
:
'Serve'
,
props
:
{
props
:
{
...
@@ -47,7 +37,7 @@ export default {
...
@@ -47,7 +37,7 @@ export default {
}
}
</
script
>
</
script
>
<
style
scoped
lang=
'scss'
>
<
style
scoped
lang=
"scss"
>
@import
'@/assets/css/crowdfunding.scss'
;
@import
'@/assets/css/crowdfunding.scss'
;
.box
{
.box
{
color
:
#999999
;
color
:
#999999
;
...
@@ -61,7 +51,7 @@ export default {
...
@@ -61,7 +51,7 @@ export default {
margin-left
:
20px
;
margin-left
:
20px
;
overflow
:
hidden
;
overflow
:
hidden
;
white-space
:
nowrap
;
white-space
:
nowrap
;
span{
span
{
margin
:
0
4px
;
margin
:
0
4px
;
}
}
}
}
...
...
src/components/ServeModal.vue
View file @
1eaa54c
<
template
>
<
template
>
<van-action-sheet
<van-action-sheet
v-model=
"showBox"
@
click-overlay=
"onCancel"
@
close=
"onCancel"
title=
"服务说明"
>
v-model=
"showBox"
@
click-overlay=
"onCancel"
@
close=
"onCancel"
title=
"服务说明"
>
<div
class=
"content"
>
<div
class=
"content"
>
<template
v-for=
"(i,index) in list"
>
<template
v-for=
"(i, index) in list"
>
<div
<div
:key=
"index"
class=
"item"
>
:key=
"index"
<div
class=
"title"
>
{{
i
.
title
}}
</div>
class=
"item"
<div
class=
"value"
>
{{
i
.
content
}}
</div>
>
<div
class=
"title"
>
{{
i
.
title
}}
</div>
<div
class=
"value"
>
{{
i
.
content
}}
</div>
</div>
</div>
</
template
>
</
template
>
</div>
</div>
</van-action-sheet>
</van-action-sheet>
</template>
</template>
<
script
type=
'text/ecmascript-6'
>
<
script
type=
"text/ecmascript-6"
>
export
default
{
export
default
{
name
:
'ServeModal'
,
name
:
'ServeModal'
,
props
:
{
props
:
{
...
@@ -49,7 +41,7 @@ export default {
...
@@ -49,7 +41,7 @@ export default {
}
}
</
script
>
</
script
>
<
style
scoped
lang=
'scss'
>
<
style
scoped
lang=
"scss"
>
.van-popup--bottom.van-popup--round
{
.van-popup--bottom.van-popup--round
{
border-radius
:
20px
20px
0
0
;
border-radius
:
20px
20px
0
0
;
}
}
...
...
src/components/ShareGoods.vue
View file @
1eaa54c
<
template
>
<
template
>
<div
<div
class=
"box"
v-if=
"evaList.length || faqList.length"
>
class=
"box"
v-if=
"evaList.length || faqList.length"
>
<template
v-if=
"evaList.length"
>
<template
v-if=
"evaList.length"
>
<div
<div
class=
"sub-title flex"
@
click=
"to('crowdfunding.evaluate',
{ list: evaList, detail: detail })">
class=
"sub-title flex"
玩家心得(
{{
evaList
.
length
}}
)
@
click=
"to('crowdfunding.evaluate',
{ list: evaList, detail: detail })"
>
玩家心得(
{{
evaList
.
length
}}
)
<div
class=
"all flex"
>
<div
class=
"all flex"
>
<span>
全部
</span>
<span>
全部
</span>
<div
class=
"sprite-icon icon-arrow"
></div>
<div
class=
"sprite-icon icon-arrow"
></div>
</div>
</div>
</div>
</div>
<evaluate-item
<evaluate-item
:item=
"evaList[0]"
:hideBorder=
"!faqList.length"
indexType
:num=
"1"
:showAvatarNicknameFlag=
"detail.showAvatarNicknameFlag"
></evaluate-item>
:item=
"evaList[0]"
:hideBorder=
"!faqList.length"
indexType
:num=
"1"
:showAvatarNicknameFlag=
"detail.showAvatarNicknameFlag"
>
</evaluate-item>
</
template
>
</
template
>
<
template
v-if=
"faqList.length"
>
<
template
v-if=
"faqList.length"
>
<div
<div
class=
"sprite"
v-if=
"evaList.length"
></div>
class=
"sprite"
<div
class=
"sub-title flex faq-title"
@
click=
"to('crowdfunding.faq',
{ list: faqList })">
v-if=
"evaList.length"
商品答疑(
{{
faqList
.
length
}}
)
></div>
<div
class=
"sub-title flex faq-title"
@
click=
"to('crowdfunding.faq',
{list:faqList})"
>
商品答疑(
{{
faqList
.
length
}}
)
<div
class=
"all flex"
>
<div
class=
"all flex"
>
<span>
全部
</span>
<span>
全部
</span>
<div
class=
"sprite-icon icon-arrow"
></div>
<div
class=
"sprite-icon icon-arrow"
></div>
</div>
</div>
</div>
</div>
<template
v-for=
"(i,index) in faqList"
>
<template
v-for=
"(i, index) in faqList"
>
<FAQ-item
<FAQ-item
:key=
"index"
hideBorder
indexType
:item=
"i"
v-if=
"index
< 1
"
></FAQ-item>
:key=
"index"
hideBorder
indexType
:item=
"i"
v-if=
"index
< 1
"
>
</FAQ-item>
</
template
>
</
template
>
</template>
</template>
</div>
</div>
</template>
</template>
<
script
type=
'text/ecmascript-6'
>
<
script
type=
"text/ecmascript-6"
>
export
default
{
export
default
{
name
:
'ShareGoods'
,
name
:
'ShareGoods'
,
props
:
{
props
:
{
...
@@ -81,7 +54,7 @@ export default {
...
@@ -81,7 +54,7 @@ export default {
}
}
</
script
>
</
script
>
<
style
scoped
lang=
'scss'
>
<
style
scoped
lang=
"scss"
>
@import
'@/assets/css/sharegoods.scss'
;
@import
'@/assets/css/sharegoods.scss'
;
.box
{
.box
{
...
...
src/components/createOrderImg.vue
View file @
1eaa54c
<
template
>
<
template
>
<canvas
<canvas
:id=
"canvasId"
class=
"create"
></canvas>
:id=
"canvasId"
class=
"create"
></canvas>
</
template
>
</
template
>
<
script
type=
'text/ecmascript-6'
>
<
script
type=
"text/ecmascript-6"
>
import
Draw
from
'@/utils/draw'
import
Draw
from
'@/utils/draw'
export
default
{
export
default
{
name
:
'createOrderImg'
,
name
:
'createOrderImg'
,
...
@@ -198,7 +195,7 @@ export default {
...
@@ -198,7 +195,7 @@ export default {
}
}
</
script
>
</
script
>
<
style
scoped
lang=
'scss'
>
<
style
scoped
lang=
"scss"
>
.create
{
.create
{
position
:
fixed
;
position
:
fixed
;
top
:
-1000%
;
top
:
-1000%
;
...
...
src/components/index.js
View file @
1eaa54c
src/config/env.development.js
View file @
1eaa54c
...
@@ -4,13 +4,13 @@
...
@@ -4,13 +4,13 @@
* @Author: limin
* @Author: limin
* @Date: 2021-06-07 14:12:32
* @Date: 2021-06-07 14:12:32
* @LastEditors: limin
* @LastEditors: limin
* @LastEditTime: 202
1-06-28 10:13:38
* @LastEditTime: 202
2-09-23 16:48:50
*/
*/
// 本地环境配置
// 本地环境配置
module
.
exports
=
{
module
.
exports
=
{
title
:
'加载中...'
,
title
:
'加载中...'
,
request
:
{
request
:
{
baseURL
:
'http://scrm.
test
.glsx.com.cn'
,
// 本地测试项目地址,
baseURL
:
'http://scrm.
dev
.glsx.com.cn'
,
// 本地测试项目地址,
// 设置超时时间
// 设置超时时间
timeout
:
180000
,
timeout
:
180000
,
// 携带凭证
// 携带凭证
...
@@ -27,22 +27,22 @@ module.exports = {
...
@@ -27,22 +27,22 @@ module.exports = {
logout_function
:
'reLogin'
,
logout_function
:
'reLogin'
,
code_message_map
:
{}
code_message_map
:
{}
},
},
secret
:
"c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b"
,
secret
:
'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b'
,
miniprogramInfo
:{
miniprogramInfo
:
{
username
:
'gh_21f69fe893fc'
,
username
:
'gh_21f69fe893fc'
,
miniprogramName
:
'广汇'
,
miniprogramName
:
'广汇'
,
logo
:
'gh'
,
logo
:
'gh'
,
envVersion
:
'trial'
,
envVersion
:
'trial'
,
appid
:
'wxfe82b8d65d07808f'
appid
:
'wxfe82b8d65d07808f'
},
},
// shopmall_id: "gh_e983752bf563", //嘀加
// shopmall_id: "gh_e983752bf563", //嘀加
appid
:
'wx56bed167ad463f70'
,
//公众号appid 云商 wx1cf40dc91c28a7fd test02 wx56bed167ad463f70
appid
:
'wx56bed167ad463f70'
,
//公众号appid 云商 wx1cf40dc91c28a7fd test02 wx56bed167ad463f70
sign
:
{
sign
:
{
appKey
:
"48e5e13229b82c1b4e6e8c96151f0637"
,
appKey
:
'48e5e13229b82c1b4e6e8c96151f0637'
,
format
:
"json"
,
format
:
'json'
,
locale
:
"zh_CN"
,
locale
:
'zh_CN'
,
source
:
"scrm-main"
,
source
:
'scrm-main'
,
v
:
"1.0.0"
,
v
:
'1.0.0'
},
},
vconsole
:
true
vconsole
:
true
}
}
src/main.js
View file @
1eaa54c
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
* @Author: limin
* @Author: limin
* @Date: 2021-06-07 14:12:32
* @Date: 2021-06-07 14:12:32
* @LastEditors: limin
* @LastEditors: limin
* @LastEditTime: 202
1-06-29 15:35:47
* @LastEditTime: 202
2-09-24 12:55:08
*/
*/
// 兼容 IE
// 兼容 IE
// https://github.com/zloirock/core-js/blob/master/docs/2019-03-19-core-js-3-babel-and-a-look-into-the-future.md#babelpolyfill
// https://github.com/zloirock/core-js/blob/master/docs/2019-03-19-core-js-3-babel-and-a-look-into-the-future.md#babelpolyfill
...
@@ -14,7 +14,7 @@ import Vue from 'vue'
...
@@ -14,7 +14,7 @@ import Vue from 'vue'
import
App
from
'./App.vue'
import
App
from
'./App.vue'
import
router
from
'./router'
import
router
from
'./router'
import
store
from
'./store'
import
store
from
'./store'
import
api
from
'./api'
//
import api from './api'
import
{
fetchConfig
,
cfg
}
from
'@/config'
import
{
fetchConfig
,
cfg
}
from
'@/config'
import
'@/assets/css/index.scss'
import
'@/assets/css/index.scss'
import
{
bus
,
tools
,
store
as
local
,
util
}
from
'./utils'
import
{
bus
,
tools
,
store
as
local
,
util
}
from
'./utils'
...
@@ -24,7 +24,7 @@ import { components } from '@/plugins/vant'
...
@@ -24,7 +24,7 @@ import { components } from '@/plugins/vant'
import
{
VueJsonp
}
from
'vue-jsonp'
import
{
VueJsonp
}
from
'vue-jsonp'
Vue
.
use
(
VueJsonp
)
Vue
.
use
(
VueJsonp
)
components
.
forEach
(
component
=>
Vue
.
use
(
component
))
components
.
forEach
(
component
=>
Vue
.
use
(
component
))
Vue
.
prototype
.
api
=
api
//
Vue.prototype.api = api
Vue
.
prototype
.
bus
=
bus
Vue
.
prototype
.
bus
=
bus
Vue
.
prototype
.
tools
=
tools
Vue
.
prototype
.
tools
=
tools
Vue
.
prototype
.
local
=
local
Vue
.
prototype
.
local
=
local
...
@@ -47,7 +47,8 @@ let body = document.getElementsByTagName('head')[0],
...
@@ -47,7 +47,8 @@ let body = document.getElementsByTagName('head')[0],
IsIOS
=
/
(
iPhone|iPad|iPod|iOS
)
/i
.
test
(
navigator
.
userAgent
),
IsIOS
=
/
(
iPhone|iPad|iPod|iOS
)
/i
.
test
(
navigator
.
userAgent
),
ISMiniprogram
=
window
.
__wxjs_environment
===
'miniprogram'
ISMiniprogram
=
window
.
__wxjs_environment
===
'miniprogram'
WXJDK
.
src
=
'//res.wx.qq.com/open/js/jweixin-1.2.0.js'
WXJDK
.
src
=
'//res.wx.qq.com/open/js/jweixin-1.2.0.js'
if
(
Boolean
(
ua
.
match
(
/MicroMessenger/i
))
&&
Boolean
(
ua
.
match
(
/wxwork/i
)))
{
//是否企微
if
(
Boolean
(
ua
.
match
(
/MicroMessenger/i
))
&&
Boolean
(
ua
.
match
(
/wxwork/i
)))
{
//是否企微
// WXJDK.src = '//res.wx.qq.com/open/js/jweixin-1.2.0.js'
// WXJDK.src = '//res.wx.qq.com/open/js/jweixin-1.2.0.js'
WWJDK
.
src
=
'//open.work.weixin.qq.com/wwopen/js/jwxwork-1.0.0.js'
WWJDK
.
src
=
'//open.work.weixin.qq.com/wwopen/js/jwxwork-1.0.0.js'
ISWXWORK
=
true
ISWXWORK
=
true
...
...
src/mixins/index.js
View file @
1eaa54c
export
{
}
\ No newline at end of file
\ No newline at end of file
export
{}
src/plugins/vant.js
View file @
1eaa54c
...
@@ -7,97 +7,5 @@
...
@@ -7,97 +7,5 @@
* @LastEditTime: 2021-06-23 11:44:59
* @LastEditTime: 2021-06-23 11:44:59
*/
*/
// 按需全局引入 vant组件
// 按需全局引入 vant组件
import
{
Button
,
List
,
Cell
,
Tabbar
,
TabbarItem
,
NavBar
,
Search
,
ActionSheet
,
CellGroup
,
Image
as
VanImage
,
Tag
,
Field
,
Stepper
,
Divider
,
Step
,
Steps
,
NoticeBar
,
RadioGroup
,
Radio
,
Uploader
,
Tab
,
Tabs
,
DropdownMenu
,
DropdownItem
,
Grid
,
GridItem
,
Popup
,
Calendar
,
Cascader
,
Checkbox
,
CheckboxGroup
,
Notify
,
Icon
,
Empty
,
PullRefresh
,
Picker
,
Dialog
,
ShareSheet
,
Overlay
,
loading
,
SwipeCell
,
Swipe
,
SwipeItem
,
IndexBar
,
IndexAnchor
}
from
'vant'
export
const
components
=
[
Button
,
List
,
Cell
,
Tabbar
,
TabbarItem
,
NavBar
,
Search
,
ActionSheet
,
CellGroup
,
VanImage
,
Tag
,
Field
,
Stepper
,
Divider
,
Step
,
Steps
,
NoticeBar
,
RadioGroup
,
Radio
,
Uploader
,
Tab
,
Tabs
,
DropdownMenu
,
DropdownItem
,
Grid
,
GridItem
,
Popup
,
Calendar
,
Cascader
,
Checkbox
,
CheckboxGroup
,
Notify
,
Icon
,
Empty
,
PullRefresh
,
Picker
,
Dialog
,
ShareSheet
,
Overlay
,
loading
,
SwipeCell
,
Swipe
,
SwipeItem
,
IndexBar
,
IndexAnchor
]
\ No newline at end of file
\ No newline at end of file
import
{
Button
,
List
,
Cell
,
Tabbar
,
TabbarItem
,
NavBar
,
Search
,
ActionSheet
,
CellGroup
,
Image
as
VanImage
,
Tag
,
Field
,
Stepper
,
Divider
,
Step
,
Steps
,
NoticeBar
,
RadioGroup
,
Radio
,
Uploader
,
Tab
,
Tabs
,
DropdownMenu
,
DropdownItem
,
Grid
,
GridItem
,
Popup
,
Calendar
,
Cascader
,
Checkbox
,
CheckboxGroup
,
Notify
,
Icon
,
Empty
,
PullRefresh
,
Picker
,
Dialog
,
ShareSheet
,
Overlay
,
loading
,
SwipeCell
,
Swipe
,
SwipeItem
,
IndexBar
,
IndexAnchor
}
from
'vant'
export
const
components
=
[
Button
,
List
,
Cell
,
Tabbar
,
TabbarItem
,
NavBar
,
Search
,
ActionSheet
,
CellGroup
,
VanImage
,
Tag
,
Field
,
Stepper
,
Divider
,
Step
,
Steps
,
NoticeBar
,
RadioGroup
,
Radio
,
Uploader
,
Tab
,
Tabs
,
DropdownMenu
,
DropdownItem
,
Grid
,
GridItem
,
Popup
,
Calendar
,
Cascader
,
Checkbox
,
CheckboxGroup
,
Notify
,
Icon
,
Empty
,
PullRefresh
,
Picker
,
Dialog
,
ShareSheet
,
Overlay
,
loading
,
SwipeCell
,
Swipe
,
SwipeItem
,
IndexBar
,
IndexAnchor
]
src/router/router.js
View file @
1eaa54c
...
@@ -5,7 +5,7 @@ import store from '@/store'
...
@@ -5,7 +5,7 @@ import store from '@/store'
import
{
util
}
from
'@/utils'
import
{
util
}
from
'@/utils'
// hack router push callback
// hack router push callback
const
originalPush
=
Router
.
prototype
.
push
const
originalPush
=
Router
.
prototype
.
push
Router
.
prototype
.
push
=
function
push
(
location
,
onResolve
,
onReject
)
{
Router
.
prototype
.
push
=
function
push
(
location
,
onResolve
,
onReject
)
{
if
(
onResolve
||
onReject
)
return
originalPush
.
call
(
this
,
location
,
onResolve
,
onReject
)
if
(
onResolve
||
onReject
)
return
originalPush
.
call
(
this
,
location
,
onResolve
,
onReject
)
return
originalPush
.
call
(
this
,
location
).
catch
(
err
=>
err
)
return
originalPush
.
call
(
this
,
location
).
catch
(
err
=>
err
)
}
}
...
@@ -14,7 +14,7 @@ Vue.use(Router)
...
@@ -14,7 +14,7 @@ Vue.use(Router)
const
router
=
createRouter
()
const
router
=
createRouter
()
function
createRouter
()
{
function
createRouter
()
{
return
new
Router
({
return
new
Router
({
// mode: 'history', // 如果是 history模式 需要配置vue.config.js publicPath
// mode: 'history', // 如果是 history模式 需要配置vue.config.js publicPath
base
:
process
.
env
.
BASE_URL
,
base
:
process
.
env
.
BASE_URL
,
...
@@ -39,7 +39,7 @@ router.beforeEach((to, from, next) => {
...
@@ -39,7 +39,7 @@ router.beforeEach((to, from, next) => {
})
})
// Detail see: https://github.com/vuejs/vue-router/issues/1234#issuecomment-357941465
// Detail see: https://github.com/vuejs/vue-router/issues/1234#issuecomment-357941465
export
function
resetRouter
()
{
export
function
resetRouter
()
{
const
newRouter
=
createRouter
()
const
newRouter
=
createRouter
()
router
.
matcher
=
newRouter
.
matcher
// reset router
router
.
matcher
=
newRouter
.
matcher
// reset router
}
}
...
...
src/router/routes.js
View file @
1eaa54c
...
@@ -7,7 +7,7 @@ const pages = {
...
@@ -7,7 +7,7 @@ const pages = {
// noAuth: true,
// noAuth: true,
backgroundColor
:
'#F7F7F7'
,
backgroundColor
:
'#F7F7F7'
,
showAction
:
true
showAction
:
true
}
,
}
},
},
{
{
name
:
'success'
,
name
:
'success'
,
...
@@ -16,7 +16,7 @@ const pages = {
...
@@ -16,7 +16,7 @@ const pages = {
backgroundColor
:
'#FFF'
,
backgroundColor
:
'#FFF'
,
noAuth
:
true
,
noAuth
:
true
,
title
:
'参团成功'
title
:
'参团成功'
}
,
}
},
},
{
{
name
:
'agreement'
,
name
:
'agreement'
,
...
...
src/store/modules/app.js
View file @
1eaa54c
...
@@ -18,19 +18,19 @@ const state = {
...
@@ -18,19 +18,19 @@ const state = {
updataCarInfo
:
Date
.
now
()
updataCarInfo
:
Date
.
now
()
}
}
const
mutations
=
{
const
mutations
=
{
SET_ACTIVITY_INFO
(
state
,
value
)
{
SET_ACTIVITY_INFO
(
state
,
value
)
{
state
.
activityInfo
=
value
state
.
activityInfo
=
value
state
.
updataCarInfo
=
Date
.
now
()
state
.
updataCarInfo
=
Date
.
now
()
},
},
SET_PAGE_META
(
state
,
meta
)
{
SET_PAGE_META
(
state
,
meta
)
{
state
.
pageMeta
=
meta
state
.
pageMeta
=
meta
},
},
PUSH_KEEP
(
state
,
name
)
{
PUSH_KEEP
(
state
,
name
)
{
if
(
!
state
.
keepAlives
.
includes
(
name
))
{
if
(
!
state
.
keepAlives
.
includes
(
name
))
{
state
.
keepAlives
.
push
(
name
)
state
.
keepAlives
.
push
(
name
)
}
}
},
},
REMOVE_KEEP
(
state
,
names
)
{
REMOVE_KEEP
(
state
,
names
)
{
state
.
keepAlives
=
state
.
keepAlives
.
reduce
((
arr
,
name
)
=>
{
state
.
keepAlives
=
state
.
keepAlives
.
reduce
((
arr
,
name
)
=>
{
if
(
!
names
.
includes
(
name
))
{
if
(
!
names
.
includes
(
name
))
{
return
arr
.
push
(
name
)
return
arr
.
push
(
name
)
...
@@ -38,30 +38,32 @@ const mutations = {
...
@@ -38,30 +38,32 @@ const mutations = {
return
arr
return
arr
},
[])
},
[])
},
},
SET_LAST_PATH
(
state
,
path
)
{
SET_LAST_PATH
(
state
,
path
)
{
state
.
lastPath
=
path
state
.
lastPath
=
path
}
}
}
}
const
actions
=
{
const
actions
=
{
setPageMeta
({
commit
},
meta
)
{
setPageMeta
({
commit
},
meta
)
{
document
.
title
=
meta
.
title
document
.
title
=
meta
.
title
commit
(
'SET_PAGE_META'
,
meta
)
commit
(
'SET_PAGE_META'
,
meta
)
},
},
pushKeep
({
commit
},
name
)
{
pushKeep
({
commit
},
name
)
{
commit
(
'PUSH_KEEP'
,
name
)
commit
(
'PUSH_KEEP'
,
name
)
},
},
removeKeep
({
commit
},
names
)
{
removeKeep
({
commit
},
names
)
{
commit
(
'REMOVE_KEEP'
,
names
)
commit
(
'REMOVE_KEEP'
,
names
)
},
},
setActivityInfo
({
commit
},
value
)
{
setActivityInfo
({
commit
},
value
)
{
commit
(
'SET_ACTIVITY_INFO'
,
value
)
commit
(
'SET_ACTIVITY_INFO'
,
value
)
},
},
wxLogin
({
dispatch
},
{
code
,
redirectUrl
,
appId
})
{
wxLogin
({
dispatch
},
{
code
,
redirectUrl
,
appId
})
{
ssoApi
.
login
({
ssoApi
.
login
({
code
,
code
,
appId
:
window
.
$fetchConfig
.
appid
,
appId
:
window
.
$fetchConfig
.
appid
,
state
:
'snsapi_userinfo'
state
:
'snsapi_userinfo'
}).
then
(({
code
,
data
,
message
})
=>
{
})
.
then
(({
code
,
data
,
message
})
=>
{
let
route
=
state
.
lastPath
==
'crowdfunding'
?
''
:
state
.
lastPath
||
''
let
route
=
state
.
lastPath
==
'crowdfunding'
?
''
:
state
.
lastPath
||
''
route
=
route
.
replace
(
'.'
,
'/'
)
route
=
route
.
replace
(
'.'
,
'/'
)
if
(
code
==
'0'
)
{
if
(
code
==
'0'
)
{
...
@@ -80,7 +82,7 @@ const actions = {
...
@@ -80,7 +82,7 @@ const actions = {
}
}
})
})
},
},
getWxCode
({
dispatch
})
{
getWxCode
({
dispatch
})
{
let
[
redirectUrl
]
=
window
.
location
.
href
.
split
(
'?'
)
let
[
redirectUrl
]
=
window
.
location
.
href
.
split
(
'?'
)
let
params
=
util
.
getPageQuery
()
let
params
=
util
.
getPageQuery
()
let
arr
=
[]
let
arr
=
[]
...
@@ -98,30 +100,33 @@ const actions = {
...
@@ -98,30 +100,33 @@ const actions = {
util
.
setAppId
(
appid
)
util
.
setAppId
(
appid
)
window
.
location
.
href
=
`
${
wxUrl
}
&state=STATE#wechat_redirect`
window
.
location
.
href
=
`
${
wxUrl
}
&state=STATE#wechat_redirect`
},
},
login
({
dispatch
})
{
login
({
dispatch
})
{
let
[
redirectUrl
]
=
window
.
location
.
href
.
split
(
'?'
)
let
[
redirectUrl
]
=
window
.
location
.
href
.
split
(
'?'
)
const
isWxWork
=
util
.
getLocalStorage
(
'is_wxwork'
)
const
isWxWork
=
util
.
getLocalStorage
(
'is_wxwork'
)
const
code
=
util
.
getPageQuery
(
'code'
)
const
code
=
util
.
getPageQuery
(
'code'
)
let
appId
=
util
.
getAppId
()
let
appId
=
util
.
getAppId
()
util
.
showLoading
()
util
.
showLoading
()
if
(
process
.
env
.
NODE_ENV
==
'development'
)
{
//本地开发
if
(
process
.
env
.
NODE_ENV
==
'development'
)
{
//本地开发
if
(
code
)
{
if
(
code
)
{
const
target
=
isWxWork
?
'wwLogin'
:
'login'
const
target
=
isWxWork
?
'wwLogin'
:
'login'
const
PARAMS
=
isWxWork
?
{
const
PARAMS
=
isWxWork
?
{
code
,
code
,
corpId
:
appId
,
corpId
:
appId
,
getUserInfoFlag
:
false
getUserInfoFlag
:
false
}
:
{
}
:
{
code
,
code
,
appId
:
window
.
$fetchConfig
.
appid
,
appId
:
window
.
$fetchConfig
.
appid
,
state
:
'snsapi_userinfo'
state
:
'snsapi_userinfo'
}
}
ssoApi
[
target
](
PARAMS
)
ssoApi
[
target
](
PARAMS
).
then
(({
code
,
data
,
message
})
=>
{
.
then
(({
code
,
data
,
message
})
=>
{
let
route
=
state
.
lastPath
==
'crowdfunding'
?
''
:
state
.
lastPath
||
''
let
route
=
state
.
lastPath
==
'crowdfunding'
?
''
:
state
.
lastPath
||
''
route
=
route
.
replace
(
'.'
,
'/'
)
route
=
route
.
replace
(
'.'
,
'/'
)
if
(
code
==
'0'
)
{
if
(
code
==
'0'
)
{
let
sessionId
=
''
,
userInfo
=
{}
let
sessionId
=
''
,
userInfo
=
{}
if
(
isWxWork
)
{
if
(
isWxWork
)
{
userInfo
=
data
.
loginList
[
0
]
userInfo
=
data
.
loginList
[
0
]
sessionId
=
userInfo
.
sessionId
sessionId
=
userInfo
.
sessionId
...
@@ -154,7 +159,7 @@ const actions = {
...
@@ -154,7 +159,7 @@ const actions = {
}
}
}
}
},
},
navigation
({
dispatch
})
{
navigation
({
dispatch
})
{
const
isWxWork
=
util
.
getLocalStorage
(
'is_wxwork'
)
const
isWxWork
=
util
.
getLocalStorage
(
'is_wxwork'
)
let
params
=
util
.
getPageQuery
()
//从链接获取
let
params
=
util
.
getPageQuery
()
//从链接获取
if
(
Object
.
keys
(
params
).
length
&&
params
.
id
)
util
.
setLocalStorage
(
'wx_scrm_link_params'
,
params
)
if
(
Object
.
keys
(
params
).
length
&&
params
.
id
)
util
.
setLocalStorage
(
'wx_scrm_link_params'
,
params
)
...
@@ -176,7 +181,7 @@ const actions = {
...
@@ -176,7 +181,7 @@ const actions = {
return
return
}
else
dispatch
(
'login'
)
}
else
dispatch
(
'login'
)
},
},
registerHttp
({
},
sessionId
=
''
)
{
registerHttp
({
},
sessionId
=
''
)
{
window
.
$HTTP
=
new
Http
({
...
window
.
$fetchConfig
,
alert
:
Notify
,
headers
:
{
token
:
sessionId
}
})
window
.
$HTTP
=
new
Http
({
...
window
.
$fetchConfig
,
alert
:
Notify
,
headers
:
{
token
:
sessionId
}
})
}
}
}
}
...
...
src/utils/audio.js
View file @
1eaa54c
export
function
Audio
(
url
,
callBack
)
{
export
function
Audio
(
url
,
callBack
)
{
// this.IsIOS = false
// this.IsIOS = false
this
.
IsIOS
=
window
.
$IsIOS
this
.
IsIOS
=
window
.
$IsIOS
this
.
audioContext
=
new
(
window
.
AudioContext
||
window
.
webkitAudioContext
||
window
.
mozAudioContext
)()
this
.
audioContext
=
new
(
window
.
AudioContext
||
window
.
webkitAudioContext
||
window
.
mozAudioContext
)()
...
@@ -38,7 +38,7 @@ export function Audio (url, callBack) {
...
@@ -38,7 +38,7 @@ export function Audio (url, callBack) {
console
.
log
(
'播放——————————————'
,
this
.
sourceNode
)
console
.
log
(
'播放——————————————'
,
this
.
sourceNode
)
this
.
isPlayingBGM
=
true
this
.
isPlayingBGM
=
true
}
}
let
loadAndAutoPlay
=
(
audioUrl
)
=>
{
let
loadAndAutoPlay
=
audioUrl
=>
{
let
_this
=
this
let
_this
=
this
if
(
!
this
.
IsIOS
)
{
if
(
!
this
.
IsIOS
)
{
const
audioContext
=
this
.
audioContext
const
audioContext
=
this
.
audioContext
...
@@ -50,7 +50,8 @@ export function Audio (url, callBack) {
...
@@ -50,7 +50,8 @@ export function Audio (url, callBack) {
audioContext
.
decodeAudioData
(
xhr
.
response
,
buffer
=>
{
audioContext
.
decodeAudioData
(
xhr
.
response
,
buffer
=>
{
this
.
buffer
=
buffer
this
.
buffer
=
buffer
if
(
buffer
)
{
if
(
buffer
)
{
if
(
wx
.
getNetworkType
)
wx
.
getNetworkType
({
if
(
wx
.
getNetworkType
)
wx
.
getNetworkType
({
success
:
function
(
res
)
{
success
:
function
(
res
)
{
_this
.
_playSourceNode
()
_this
.
_playSourceNode
()
callBack
()
callBack
()
...
...
src/utils/draw.js
View file @
1eaa54c
...
@@ -4,7 +4,7 @@ const _canvasObject_ = Symbol('_canvasObject_')
...
@@ -4,7 +4,7 @@ const _canvasObject_ = Symbol('_canvasObject_')
class
Draw
{
class
Draw
{
[
_ctx_
]
=
null
;
[
_ctx_
]
=
null
;
[
_pixelRatio_
]
=
null
;
[
_pixelRatio_
]
=
null
;
[
_canvasObject_
]
=
null
;
[
_canvasObject_
]
=
null
constructor
(
_this_
,
canvasObject
)
{
constructor
(
_this_
,
canvasObject
)
{
this
[
_canvasObject_
]
=
canvasObject
this
[
_canvasObject_
]
=
canvasObject
this
[
_ctx_
]
=
_this_
.
ctx
.
getContext
(
'2d'
)
this
[
_ctx_
]
=
_this_
.
ctx
.
getContext
(
'2d'
)
...
@@ -19,17 +19,10 @@ class Draw {
...
@@ -19,17 +19,10 @@ class Draw {
this
[
_ctx_
].
save
()
this
[
_ctx_
].
save
()
}
}
drawImages
(
imageParams
,
callback
)
{
drawImages
(
imageParams
,
callback
)
{
this
[
_ctx_
].
beginPath
()
this
[
_ctx_
].
beginPath
()
this
[
_ctx_
].
save
()
this
[
_ctx_
].
save
()
let
{
let
{
borderRadius
,
height
,
width
,
url
,
x
,
y
}
=
imageParams
borderRadius
,
height
,
width
,
url
,
x
,
y
,
}
=
imageParams
height
=
this
.
toRpx
(
height
)
height
=
this
.
toRpx
(
height
)
width
=
this
.
toRpx
(
width
)
width
=
this
.
toRpx
(
width
)
x
=
this
.
toRpx
(
x
)
x
=
this
.
toRpx
(
x
)
...
@@ -40,7 +33,7 @@ class Draw {
...
@@ -40,7 +33,7 @@ class Draw {
height
,
height
,
width
,
width
,
x
,
x
,
y
,
y
})
})
this
[
_ctx_
].
clip
()
this
[
_ctx_
].
clip
()
}
}
...
@@ -52,15 +45,15 @@ class Draw {
...
@@ -52,15 +45,15 @@ class Draw {
callback
()
callback
()
}
}
}
}
toRpx
(
val
)
{
toRpx
(
val
)
{
return
this
[
_pixelRatio_
]
*
val
return
this
[
_pixelRatio_
]
*
val
}
}
getTextWidth
(
text
,
fontSize
)
{
getTextWidth
(
text
,
fontSize
)
{
let
font
=
this
[
_ctx_
].
font
.
split
(
'px'
)[
1
]
let
font
=
this
[
_ctx_
].
font
.
split
(
'px'
)[
1
]
if
(
fontSize
)
this
[
_ctx_
].
font
=
`400
${
fontSize
}
px
${
font
}
`
if
(
fontSize
)
this
[
_ctx_
].
font
=
`400
${
fontSize
}
px
${
font
}
`
return
this
[
_ctx_
].
measureText
(
text
).
width
return
this
[
_ctx_
].
measureText
(
text
).
width
}
}
drawFill
(
x
,
y
,
width
,
height
,
color
)
{
drawFill
(
x
,
y
,
width
,
height
,
color
)
{
this
[
_ctx_
].
beginPath
()
this
[
_ctx_
].
beginPath
()
this
[
_ctx_
].
fillStyle
=
color
this
[
_ctx_
].
fillStyle
=
color
this
[
_ctx_
].
fillRect
(
x
,
y
,
width
,
height
)
this
[
_ctx_
].
fillRect
(
x
,
y
,
width
,
height
)
...
@@ -68,25 +61,8 @@ class Draw {
...
@@ -68,25 +61,8 @@ class Draw {
this
[
_ctx_
].
restore
()
this
[
_ctx_
].
restore
()
this
[
_ctx_
].
save
()
this
[
_ctx_
].
save
()
}
}
drawText
(
textParams
)
{
drawText
(
textParams
)
{
let
{
let
{
textDecoration
,
textBaseline
,
lineHeight
,
fontWeight
,
textAlign
,
textWidth
,
maxWidth
,
fontSize
,
lastFont
,
opacity
,
lineNum
,
width
,
color
,
text
,
x
,
y
}
=
textParams
textDecoration
,
textBaseline
,
lineHeight
,
fontWeight
,
textAlign
,
textWidth
,
maxWidth
,
fontSize
,
lastFont
,
opacity
,
lineNum
,
width
,
color
,
text
,
x
,
y
,
}
=
textParams
let
text_width
=
this
.
getTextWidth
(
text
),
let
text_width
=
this
.
getTextWidth
(
text
),
font
=
this
[
_ctx_
].
font
.
split
(
'px'
)[
1
]
font
=
this
[
_ctx_
].
font
.
split
(
'px'
)[
1
]
textAlign
=
textAlign
||
'left'
textAlign
=
textAlign
||
'left'
...
@@ -103,7 +79,7 @@ class Draw {
...
@@ -103,7 +79,7 @@ class Draw {
textAlign
,
textAlign
,
fontSize
,
fontSize
,
text
,
text
,
x
,
x
})
})
if
(
textParams
.
border
)
{
if
(
textParams
.
border
)
{
let
boxX
=
this
.
toRpx
(
textParams
.
x
-
4.5
),
let
boxX
=
this
.
toRpx
(
textParams
.
x
-
4.5
),
...
@@ -147,7 +123,7 @@ class Draw {
...
@@ -147,7 +123,7 @@ class Draw {
ellipsis
=
error
ellipsis
=
error
}
}
if
(
ellipsis
)
newText
+=
'…'
if
(
ellipsis
)
newText
+=
'…'
if
(
lastFont
)
newText
+=
lastFont
if
(
lastFont
)
newText
+=
lastFont
this
[
_ctx_
].
fillText
(
newText
,
x
,
y
,
maxWidth
)
this
[
_ctx_
].
fillText
(
newText
,
x
,
y
,
maxWidth
)
if
(
checkTextDecoration
(
textDecoration
))
{
if
(
checkTextDecoration
(
textDecoration
))
{
this
.
drawDecoration
({
this
.
drawDecoration
({
...
@@ -180,7 +156,8 @@ class Draw {
...
@@ -180,7 +156,8 @@ class Draw {
textRowArr
.
map
((
e
,
index
)
=>
{
textRowArr
.
map
((
e
,
index
)
=>
{
if
(
this
.
getTextWidth
(
e
)
>
viewWidth
&&
index
==
lineNum
-
1
)
{
if
(
this
.
getTextWidth
(
e
)
>
viewWidth
&&
index
==
lineNum
-
1
)
{
try
{
try
{
let
lastText
=
''
,
lastArr
=
e
.
split
(
''
)
let
lastText
=
''
,
lastArr
=
e
.
split
(
''
)
lastArr
.
map
(
i
=>
{
lastArr
.
map
(
i
=>
{
lastText
+=
i
lastText
+=
i
if
(
this
.
getTextWidth
(
lastText
)
>
width
-
fontX
-
this
.
getTextWidth
(
'…'
))
throw
lastText
if
(
this
.
getTextWidth
(
lastText
)
>
width
-
fontX
-
this
.
getTextWidth
(
'…'
))
throw
lastText
...
@@ -195,7 +172,7 @@ class Draw {
...
@@ -195,7 +172,7 @@ class Draw {
this
[
_ctx_
].
fillText
(
e
,
x
,
textHeight
,
maxWidth
)
this
[
_ctx_
].
fillText
(
e
,
x
,
textHeight
,
maxWidth
)
if
(
checkTextDecoration
(
textDecoration
))
{
if
(
checkTextDecoration
(
textDecoration
))
{
this
.
drawDecoration
({
this
.
drawDecoration
({
'y'
:
textHeight
,
y
:
textHeight
,
textDecoration
,
textDecoration
,
textBaseline
,
textBaseline
,
textAlign
,
textAlign
,
...
@@ -216,17 +193,9 @@ class Draw {
...
@@ -216,17 +193,9 @@ class Draw {
this
[
_ctx_
].
stroke
()
this
[
_ctx_
].
stroke
()
}
}
drawLine
(
lineParams
,
callback
)
{
drawLine
(
lineParams
,
callback
)
{
this
[
_ctx_
].
beginPath
()
this
[
_ctx_
].
beginPath
()
let
{
let
{
opacity
,
startX
,
startY
,
width
,
color
,
endX
,
endY
}
=
lineParams
opacity
,
startX
,
startY
,
width
,
color
,
endX
,
endY
,
}
=
lineParams
startX
=
this
.
toRpx
(
startX
)
startX
=
this
.
toRpx
(
startX
)
startY
=
this
.
toRpx
(
startY
)
startY
=
this
.
toRpx
(
startY
)
width
=
this
.
toRpx
(
width
)
width
=
this
.
toRpx
(
width
)
...
@@ -243,40 +212,31 @@ class Draw {
...
@@ -243,40 +212,31 @@ class Draw {
if
(
callback
)
callback
()
if
(
callback
)
callback
()
}
}
setLineY
=
params
=>
{
setLineY
=
params
=>
{
let
{
let
{
textDecoration
,
textBaseline
,
fontSize
,
y
}
=
params
textDecoration
,
textBaseline
,
fontSize
,
y
}
=
params
let
type
=
{
let
type
=
{
underline
:
{
underline
:
{
top
:
y
+
fontSize
,
top
:
y
+
fontSize
,
middle
:
y
+
fontSize
/
2
,
middle
:
y
+
fontSize
/
2
,
bottom
:
y
,
bottom
:
y
,
normal
:
y
,
normal
:
y
},
},
overline
:
{
overline
:
{
top
:
y
,
top
:
y
,
middle
:
y
-
fontSize
/
2
,
middle
:
y
-
fontSize
/
2
,
bottom
:
y
-
fontSize
,
bottom
:
y
-
fontSize
,
normal
:
y
,
normal
:
y
},
},
'line-through'
:
{
'line-through'
:
{
top
:
y
+
fontSize
/
2
,
top
:
y
+
fontSize
/
2
,
middle
:
y
-
fontSize
/
2
,
middle
:
y
-
fontSize
/
2
,
bottom
:
y
,
bottom
:
y
,
normal
:
y
,
normal
:
y
}
}
}
}
return
type
[
textDecoration
][
textBaseline
]
return
type
[
textDecoration
][
textBaseline
]
}
}
setLineX
({
setLineX
({
textAlign
,
text
,
x
})
{
textAlign
,
text
,
x
})
{
let
textWidth
=
this
.
getTextWidth
(
text
)
let
textWidth
=
this
.
getTextWidth
(
text
)
let
type
=
{
let
type
=
{
left
:
x
,
left
:
x
,
...
@@ -286,14 +246,8 @@ class Draw {
...
@@ -286,14 +246,8 @@ class Draw {
return
type
[
textAlign
]
return
type
[
textAlign
]
}
}
drawRadiusRect
({
drawRadiusRect
({
borderRadius
,
height
,
width
,
x
,
y
})
{
borderRadius
,
let
radius
=
typeof
borderRadius
===
'string'
?
((
Number
(
borderRadius
.
split
(
'%'
)[
0
])
/
100
)
*
width
)
/
2
:
borderRadius
/
2
height
,
width
,
x
,
y
,
})
{
let
radius
=
typeof
borderRadius
===
'string'
?
(
Number
(
borderRadius
.
split
(
'%'
)[
0
])
/
100
*
width
)
/
2
:
borderRadius
/
2
radius
=
radius
||
0
radius
=
radius
||
0
this
[
_ctx_
].
beginPath
()
this
[
_ctx_
].
beginPath
()
for
(
let
i
=
1
;
i
<
5
;
i
++
)
{
for
(
let
i
=
1
;
i
<
5
;
i
++
)
{
...
@@ -302,27 +256,17 @@ class Draw {
...
@@ -302,27 +256,17 @@ class Draw {
this
[
_ctx_
].
arc
(
arcX
,
arcY
,
radius
,
2
*
Math
.
PI
*
((
i
-
1
)
/
4
),
2
*
Math
.
PI
*
(
i
/
4
))
this
[
_ctx_
].
arc
(
arcX
,
arcY
,
radius
,
2
*
Math
.
PI
*
((
i
-
1
)
/
4
),
2
*
Math
.
PI
*
(
i
/
4
))
}
}
}
}
getFontWidth
({
getFontWidth
({
textAlign
,
fontSize
,
text
,
x
})
{
textAlign
,
fontSize
,
text
,
x
})
{
let
type
=
{
let
type
=
{
left
:
x
,
left
:
x
,
center
:
x
-
fontSize
*
text
.
length
/
2
,
center
:
x
-
(
fontSize
*
text
.
length
)
/
2
,
right
:
x
-
fontSize
*
text
.
length
right
:
x
-
fontSize
*
text
.
length
}
}
return
type
[
textAlign
]
<
0
?
0
:
type
[
textAlign
]
return
type
[
textAlign
]
<
0
?
0
:
type
[
textAlign
]
}
}
drawDecoration
(
params
)
{
drawDecoration
(
params
)
{
let
{
let
{
newText
,
opacity
,
y
,
x
}
=
params
newText
,
opacity
,
y
,
x
}
=
params
let
lineX
=
x
let
lineX
=
x
let
lineY
=
y
let
lineY
=
y
lineX
=
this
.
setLineX
(
params
)
lineX
=
this
.
setLineX
(
params
)
...
@@ -333,6 +277,6 @@ class Draw {
...
@@ -333,6 +277,6 @@ class Draw {
}
}
}
}
const
checkTextDecoration
=
textDecoration
=>
{
const
checkTextDecoration
=
textDecoration
=>
{
return
(
textDecoration
&&
(
textDecoration
===
'underline'
||
textDecoration
===
'overline'
||
textDecoration
===
'line-through'
)
)
return
textDecoration
&&
(
textDecoration
===
'underline'
||
textDecoration
===
'overline'
||
textDecoration
===
'line-through'
)
}
}
export
default
Draw
export
default
Draw
src/utils/index.js
View file @
1eaa54c
src/utils/store.js
View file @
1eaa54c
...
@@ -11,10 +11,10 @@ import store from 'storejs'
...
@@ -11,10 +11,10 @@ import store from 'storejs'
export
default
{
export
default
{
...
store
,
...
store
,
exp
:
{
exp
:
{
set
:
function
(
key
,
val
,
exp
=
24
*
60
*
60
*
1000
)
{
set
:
function
(
key
,
val
,
exp
=
24
*
60
*
60
*
1000
)
{
store
.
set
(
key
,
{
val
:
val
,
exp
:
exp
,
time
:
new
Date
().
getTime
()
})
store
.
set
(
key
,
{
val
:
val
,
exp
:
exp
,
time
:
new
Date
().
getTime
()
})
},
},
get
:
function
(
key
)
{
get
:
function
(
key
)
{
var
info
=
store
.
get
(
key
)
var
info
=
store
.
get
(
key
)
if
(
!
info
)
{
if
(
!
info
)
{
return
null
return
null
...
@@ -27,6 +27,6 @@ export default {
...
@@ -27,6 +27,6 @@ export default {
}
}
},
},
consts
:
{
consts
:
{
USER_KEY
:
'USER_KEY'
,
USER_KEY
:
'USER_KEY'
}
}
}
}
src/utils/tools.js
View file @
1eaa54c
...
@@ -86,21 +86,13 @@ export function param2Obj(url) {
...
@@ -86,21 +86,13 @@ export function param2Obj(url) {
if
(
!
search
)
{
if
(
!
search
)
{
return
{}
return
{}
}
}
return
JSON
.
parse
(
return
JSON
.
parse
(
'{"'
+
decodeURIComponent
(
search
).
replace
(
/"/g
,
'\\"'
).
replace
(
/&/g
,
'","'
).
replace
(
/=/g
,
'":"'
).
replace
(
/
\+
/g
,
' '
)
+
'"}'
)
'{"'
+
decodeURIComponent
(
search
)
.
replace
(
/"/g
,
'\\"'
)
.
replace
(
/&/g
,
'","'
)
.
replace
(
/=/g
,
'":"'
)
.
replace
(
/
\+
/g
,
' '
)
+
'"}'
)
}
}
export
function
debounce
(
fn
,
delay
=
500
)
{
export
function
debounce
(
fn
,
delay
=
500
)
{
// timer 是在闭包中的
// timer 是在闭包中的
let
timer
=
null
let
timer
=
null
return
function
()
{
return
function
()
{
clearTimeout
(
timer
)
clearTimeout
(
timer
)
timer
=
setTimeout
(()
=>
{
timer
=
setTimeout
(()
=>
{
fn
.
apply
(
this
,
arguments
)
fn
.
apply
(
this
,
arguments
)
...
@@ -110,7 +102,7 @@ export function debounce(fn, delay = 500) {
...
@@ -110,7 +102,7 @@ export function debounce(fn, delay = 500) {
export
function
throttle
(
fn
,
delay
=
500
)
{
export
function
throttle
(
fn
,
delay
=
500
)
{
let
timer
=
null
let
timer
=
null
return
function
(
e
)
{
return
function
(
e
)
{
if
(
timer
)
{
if
(
timer
)
{
return
return
}
}
...
...
src/utils/util.js
View file @
1eaa54c
...
@@ -162,7 +162,7 @@ const jumpChildrenPage = (to, params) => {
...
@@ -162,7 +162,7 @@ const jumpChildrenPage = (to, params) => {
const
setClipboardData
=
data
=>
{
const
setClipboardData
=
data
=>
{
wx
.
setClipboardData
({
wx
.
setClipboardData
({
data
,
data
,
success
(
res
)
{
success
(
res
)
{
Toast
(
'复制成功'
)
Toast
(
'复制成功'
)
}
}
})
})
...
@@ -207,8 +207,7 @@ const setCookie = (c_name, value, expiredays = 365) => {
...
@@ -207,8 +207,7 @@ const setCookie = (c_name, value, expiredays = 365) => {
let
exdate
=
new
Date
()
let
exdate
=
new
Date
()
console
.
log
(
c_name
,
value
)
console
.
log
(
c_name
,
value
)
exdate
.
setDate
(
exdate
.
getDate
()
+
expiredays
)
exdate
.
setDate
(
exdate
.
getDate
()
+
expiredays
)
document
.
cookie
=
c_name
+
'='
+
value
+
document
.
cookie
=
c_name
+
'='
+
value
+
(
expiredays
==
null
?
''
:
';expires='
+
exdate
.
toGMTString
())
((
expiredays
==
null
)
?
''
:
';expires='
+
exdate
.
toGMTString
())
}
}
/**获取cookie */
/**获取cookie */
const
getCookie
=
c_name
=>
{
const
getCookie
=
c_name
=>
{
...
@@ -231,24 +230,23 @@ const toUnicode = (chineseStr = '') => {
...
@@ -231,24 +230,23 @@ const toUnicode = (chineseStr = '') => {
}
}
return
unicodeStr
return
unicodeStr
}
}
const
isMobileDevice
=
()
=>
{
//判断当前设备是否为移动端
const
isMobileDevice
=
()
=>
{
//判断当前设备是否为移动端
const
ua
=
navigator
.
userAgent
.
toLowerCase
()
const
ua
=
navigator
.
userAgent
.
toLowerCase
()
const
t1
=
/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i
.
test
(
const
t1
=
/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i
.
test
(
ua
)
ua
const
t2
=
!
ua
.
match
(
'iphone'
)
&&
navigator
.
maxTouchPoints
>
1
)
const
t2
=
!
ua
.
match
(
"iphone"
)
&&
navigator
.
maxTouchPoints
>
1
return
t1
||
t2
return
t1
||
t2
}
}
/**秒数转天时分秒*/
/**秒数转天时分秒*/
const
date_format
=
num
=>
{
const
date_format
=
num
=>
{
const
addZero
=
i
=>
i
<
10
?
`0
${
i
}
`
:
`
${
i
}
`
const
addZero
=
i
=>
(
i
<
10
?
`0
${
i
}
`
:
`
${
i
}
`
)
//计算剩余的天数
//计算剩余的天数
let
days
=
addZero
(
parseInt
(
num
/
60
/
60
/
24
,
10
))
let
days
=
addZero
(
parseInt
(
num
/
60
/
60
/
24
,
10
))
//计算剩余的小时
//计算剩余的小时
let
hours
=
addZero
(
parseInt
(
num
/
60
/
60
%
24
,
10
))
let
hours
=
addZero
(
parseInt
(
(
num
/
60
/
60
)
%
24
,
10
))
//计算剩余的分钟
//计算剩余的分钟
let
minutes
=
addZero
(
parseInt
(
num
/
60
%
60
,
10
))
let
minutes
=
addZero
(
parseInt
(
(
num
/
60
)
%
60
,
10
))
//计算剩余的秒数
//计算剩余的秒数
let
second
=
addZero
(
parseInt
(
num
%
60
,
10
))
let
second
=
addZero
(
parseInt
(
num
%
60
,
10
))
if
(
days
==
0
)
{
if
(
days
==
0
)
{
...
@@ -272,7 +270,7 @@ const draggable = (drag, fun, target) => {
...
@@ -272,7 +270,7 @@ const draggable = (drag, fun, target) => {
var
disX
,
disY
,
left
,
top
,
starX
,
starY
,
oLeft
,
oTop
var
disX
,
disY
,
left
,
top
,
starX
,
starY
,
oLeft
,
oTop
drag
.
addEventListener
(
startEvt
,
startFun
)
drag
.
addEventListener
(
startEvt
,
startFun
)
function
startFun
(
event
)
{
function
startFun
(
event
)
{
if
(
!
drag
.
id
)
return
if
(
!
drag
.
id
)
return
// 阻止页面的滚动,缩放
// 阻止页面的滚动,缩放
event
.
preventDefault
()
event
.
preventDefault
()
...
@@ -292,7 +290,7 @@ const draggable = (drag, fun, target) => {
...
@@ -292,7 +290,7 @@ const draggable = (drag, fun, target) => {
document
.
addEventListener
(
endEvt
,
endFun
)
document
.
addEventListener
(
endEvt
,
endFun
)
}
}
function
moveFun
(
event
)
{
function
moveFun
(
event
)
{
// 兼容IE浏览器
// 兼容IE浏览器
var
e
=
event
||
window
.
event
var
e
=
event
||
window
.
event
left
=
(
e
.
touches
?
e
.
touches
[
0
].
clientX
:
e
.
clientX
)
-
disX
left
=
(
e
.
touches
?
e
.
touches
[
0
].
clientX
:
e
.
clientX
)
-
disX
...
@@ -311,13 +309,13 @@ const draggable = (drag, fun, target) => {
...
@@ -311,13 +309,13 @@ const draggable = (drag, fun, target) => {
}
}
drag
.
style
.
left
=
left
+
'px'
drag
.
style
.
left
=
left
+
'px'
drag
.
style
.
top
=
top
+
'px'
drag
.
style
.
top
=
top
+
'px'
}
}
function
endFun
(
event
)
{
function
endFun
(
event
)
{
drag
.
style
.
cursor
=
''
drag
.
style
.
cursor
=
''
document
.
removeEventListener
(
moveEvt
,
moveFun
)
document
.
removeEventListener
(
moveEvt
,
moveFun
)
document
.
removeEventListener
(
endEvt
,
endFun
)
document
.
removeEventListener
(
endEvt
,
endFun
)
if
(
oLeft
==
drag
.
offsetLeft
&&
oTop
==
drag
.
offsetTop
&&
fun
)
{
// 点击
if
(
oLeft
==
drag
.
offsetLeft
&&
oTop
==
drag
.
offsetTop
&&
fun
)
{
// 点击
fun
()
fun
()
}
}
}
}
...
...
src/views/crowdfunding/carBrands.vue
View file @
1eaa54c
<
template
>
<
template
>
<div
<div
class=
"car-brands"
:key=
"upData"
>
class=
"car-brands"
<van-index-bar
highlight-color=
"#FC5B32"
:index-list=
"indexList"
@
change=
"indexNumber = $event"
ref=
"indexBar"
>
:key=
"upData"
<template
v-for=
"(item, index) in brandList"
>
>
<van-index-bar
highlight-color=
"#FC5B32"
:index-list=
"indexList"
@
change=
"indexNumber = $event"
ref=
"indexBar"
>
<template
v-for=
"(item,index) in brandList"
>
<div
:key=
"index"
>
<div
:key=
"index"
>
<van-index-anchor
:index=
"item.letter"
/>
<van-index-anchor
:index=
"item.letter"
/>
<template
v-for=
"(i,ind) in item.list"
>
<template
v-for=
"(i, ind) in item.list"
>
<van-cell
<van-cell
:key=
"ind"
@
click=
"showCarSeries(i)"
>
:key=
"ind"
@
click=
"showCarSeries(i)"
>
<template
#
title
>
<template
#
title
>
<img
<img
:src=
"i.logoUrl"
v-if=
"i.logoUrl"
/>
:src=
"i.logoUrl"
<span>
{{
i
.
name
}}
</span>
v-if=
"i.logoUrl"
>
<span>
{{
i
.
name
}}
</span>
</
template
>
</
template
>
</van-cell>
</van-cell>
</template>
</template>
...
@@ -32,7 +18,7 @@
...
@@ -32,7 +18,7 @@
</div>
</div>
</template>
</template>
<
script
type=
'text/ecmascript-6'
>
<
script
type=
"text/ecmascript-6"
>
import
{
carLifeApi
}
from
'@/api'
import
{
carLifeApi
}
from
'@/api'
export
default
{
export
default
{
...
@@ -116,7 +102,7 @@ export default {
...
@@ -116,7 +102,7 @@ export default {
}
}
</
script
>
</
script
>
<
style
scoped
lang=
'scss'
>
<
style
scoped
lang=
"scss"
>
.car-brands
{
.car-brands
{
padding-bottom
:
constant
(
safe-area-inset-bottom
)
!important
;
padding-bottom
:
constant
(
safe-area-inset-bottom
)
!important
;
padding-bottom
:
env
(
safe-area-inset-bottom
)
!important
;
padding-bottom
:
env
(
safe-area-inset-bottom
)
!important
;
...
...
src/views/crowdfunding/carSeries.vue
View file @
1eaa54c
<
template
>
<
template
>
<div
class=
"layout"
>
<div
class=
"layout"
>
<van-index-bar
<van-index-bar
highlight-color=
"#FC5B32"
class=
"list"
:index-list=
"indexList"
:key=
"updata"
>
highlight-color=
"#FC5B32"
<template
v-for=
"(item, index) in list"
>
class=
"list"
<div
class=
"item"
:key=
"index"
>
:index-list=
"indexList"
:key=
"updata"
>
<template
v-for=
"(item,index) in list"
>
<div
class=
"item"
:key=
"index"
>
<van-index-anchor
:index=
"item.name"
/>
<van-index-anchor
:index=
"item.name"
/>
<template
v-if=
"item.done"
>
<template
v-if=
"item.done"
>
<template
v-if=
"item.childs && item.childs.length"
>
<template
v-if=
"item.childs && item.childs.length"
>
<template
v-for=
"(i,ind) in item.childs"
>
<template
v-for=
"(i, ind) in item.childs"
>
<div
<div
class=
"card flex"
:key=
"ind"
@
click=
"showCarType(i, item)"
>
class=
"card flex"
{{
i
.
name
}}
:key=
"ind"
@
click=
"showCarType(i,item)"
>
{{
i
.
name
}}
</div>
</div>
</
template
>
</
template
>
</template>
</template>
<
template
v-else
>
<
template
v-else
>
<div
class=
"loading text-center"
>
<div
class=
"loading text-center"
>
<van-icon
<van-icon
name=
"fail"
color=
"#282829"
size=
"80"
/>
name=
"fail"
color=
"#282829"
size=
"80"
/>
<div>
暂无该车型
</div>
<div>
暂无该车型
</div>
</div>
</div>
</
template
>
</
template
>
</template>
</template>
<
template
v-else
>
<
template
v-else
>
<div
class=
"loading text-center"
>
<div
class=
"loading text-center"
>
<van-loading
<van-loading
color=
"#282829"
size=
"80"
text-size=
"18"
vertical
>
加载中...
</van-loading>
color=
"#282829"
size=
"80"
text-size=
"18"
vertical
>
加载中...
</van-loading>
</div>
</div>
</
template
>
</
template
>
</div>
</div>
</template>
</template>
</van-index-bar>
</van-index-bar>
<van-popup
<van-popup
v-model=
"showType"
position=
"right"
class=
"popup"
>
v-model=
"showType"
position=
"right"
class=
"popup"
>
<div
class=
"car-view"
>
<div
class=
"car-view"
>
<
template
v-for=
"(i,index) in carTypeList"
>
<
template
v-for=
"(i, index) in carTypeList"
>
<div
<div
:key=
"index"
class=
"flex item"
@
click=
"choose(i)"
>
{{
i
.
name
}}
</div>
:key=
"index"
class=
"flex item"
@
click=
"choose(i)"
>
{{
i
.
name
}}
</div>
</
template
>
</
template
>
</div>
</div>
</van-popup>
</van-popup>
</div>
</div>
</template>
</template>
<
script
type=
'text/ecmascript-6'
>
<
script
type=
"text/ecmascript-6"
>
import
{
carLifeApi
}
from
'@/api'
import
{
carLifeApi
}
from
'@/api'
export
default
{
export
default
{
name
:
'carSeries'
,
name
:
'carSeries'
,
...
@@ -161,7 +130,7 @@ export default {
...
@@ -161,7 +130,7 @@ export default {
}
}
</
script
>
</
script
>
<
style
scoped
lang=
'scss'
>
<
style
scoped
lang=
"scss"
>
.list
{
.list
{
padding-bottom
:
constant
(
safe-area-inset-bottom
)
!important
;
padding-bottom
:
constant
(
safe-area-inset-bottom
)
!important
;
padding-bottom
:
env
(
safe-area-inset-bottom
)
!important
;
padding-bottom
:
env
(
safe-area-inset-bottom
)
!important
;
...
...
src/views/crowdfunding/evaluate.vue
View file @
1eaa54c
<
template
>
<
template
>
<div
class=
"box"
>
<div
class=
"box"
>
<template
v-for=
"(i,index) in list"
>
<template
v-for=
"(i, index) in list"
>
<div
<div
class=
"item"
:key=
"index"
:style=
"`padding-bottom:$
{index == list.length - 1 ? '16px' : ''};`">
class=
"item"
<evaluate-item
:item=
"i"
:hideBorder=
"index == list.length - 1"
:num=
"index + 1"
:showAvatarNicknameFlag=
"detail.showAvatarNicknameFlag"
/>
:key=
"index"
:style=
"`padding-bottom:$
{index == list.length -1 ?'16px':''};`"
>
<evaluate-item
:item=
"i"
:hideBorder=
"index == list.length - 1"
:num=
"index + 1"
:showAvatarNicknameFlag=
"detail.showAvatarNicknameFlag"
/>
</div>
</div>
</
template
>
</
template
>
</div>
</div>
</template>
</template>
<
script
type=
'text/ecmascript-6'
>
<
script
type=
"text/ecmascript-6"
>
export
default
{
export
default
{
name
:
'evaluate'
,
name
:
'evaluate'
,
data
()
{
data
()
{
...
@@ -41,7 +32,7 @@ export default {
...
@@ -41,7 +32,7 @@ export default {
}
}
</
script
>
</
script
>
<
style
scoped
lang=
'scss'
>
<
style
scoped
lang=
"scss"
>
.box
{
.box
{
padding-bottom
:
100px
;
padding-bottom
:
100px
;
.item
{
.item
{
...
...
src/views/crowdfunding/faq.vue
View file @
1eaa54c
<
template
>
<
template
>
<div
class=
"box"
>
<div
class=
"box"
>
<template
v-for=
"(i,index) in list"
>
<template
v-for=
"(i, index) in list"
>
<div
<div
class=
"item"
:key=
"index"
:style=
"`padding-bottom:$
{index == list.length - 1 ? '16px' : ''};`">
class=
"item"
<FAQ-item
:item=
"i"
:hideBorder=
"index == list.length - 1"
/>
:key=
"index"
:style=
"`padding-bottom:$
{index == list.length -1 ?'16px':''};`"
>
<FAQ-item
:item=
"i"
:hideBorder=
"index == list.length - 1"
/>
</div>
</div>
</
template
>
</
template
>
</div>
</div>
</template>
</template>
<
script
type=
'text/ecmascript-6'
>
<
script
type=
"text/ecmascript-6"
>
export
default
{
export
default
{
name
:
'faq'
,
name
:
'faq'
,
data
()
{
data
()
{
...
@@ -36,7 +29,7 @@ export default {
...
@@ -36,7 +29,7 @@ export default {
}
}
</
script
>
</
script
>
<
style
scoped
lang=
'scss'
>
<
style
scoped
lang=
"scss"
>
.box
{
.box
{
padding-bottom
:
100px
;
padding-bottom
:
100px
;
.item
{
.item
{
...
...
src/views/crowdfunding/imagePreview.vue
View file @
1eaa54c
<
template
>
<
template
>
<div
class=
"imagePreview"
>
<div
class=
"imagePreview"
>
<template
v-if=
"item"
>
<template
v-if=
"item"
>
<van-image-preview
<van-image-preview
v-model=
"show"
:images=
"item"
@
change=
"change"
:show-index=
"false"
:start-position=
"index"
ref=
"preview"
asyncClose
></van-image-preview>
v-model=
"show"
:images=
"item"
@
change=
"change"
:show-index=
"false"
:start-position=
"index"
ref=
"preview"
asyncClose
>
</van-image-preview>
<template
v-if=
"textStyle"
>
<template
v-if=
"textStyle"
>
<div
<div
class=
"text"
:style=
"textStyle"
>
class=
"text"
{{
experience
}}
:style=
"textStyle"
>
{{
experience
}}
</div>
</div>
</
template
>
</
template
>
</template>
</template>
</div>
</div>
</template>
</template>
<
script
type=
'text/ecmascript-6'
>
<
script
type=
"text/ecmascript-6"
>
import
{
ImagePreview
}
from
'vant'
import
{
ImagePreview
}
from
'vant'
export
default
{
export
default
{
name
:
'imagePreview'
,
name
:
'imagePreview'
,
...
@@ -62,7 +49,7 @@ export default {
...
@@ -62,7 +49,7 @@ export default {
}
}
</
script
>
</
script
>
<
style
scoped
lang=
'scss'
>
<
style
scoped
lang=
"scss"
>
.imagePreview
{
.imagePreview
{
position
:
relative
;
position
:
relative
;
width
:
100vw
;
width
:
100vw
;
...
...
src/views/crowdfunding/index.vue
View file @
1eaa54c
...
@@ -15,11 +15,7 @@
...
@@ -15,11 +15,7 @@
<!--👇 客服&订单按钮 -->
<!--👇 客服&订单按钮 -->
<div
class=
"page-btn"
>
<div
class=
"page-btn"
>
<template
<template
v-if=
"detail.customerServiceName || detail.customerServicePhone || detail.customerServiceQrImg || detail.customerServerUrl"
>
v-if=
"detail.customerServiceName
|| detail.customerServicePhone
|| detail.customerServiceQrImg
|| detail.customerServerUrl"
>
<div
class=
"page-item flex"
@
click=
"clickKF"
@
touchstart=
"touchstart"
@
touchend=
"touchend"
>
<div
class=
"page-item flex"
@
click=
"clickKF"
@
touchstart=
"touchstart"
@
touchend=
"touchend"
>
<div
class=
"sprite-icon icon-kf"
></div>
<div
class=
"sprite-icon icon-kf"
></div>
客服
客服
...
@@ -45,7 +41,7 @@ v-if="detail.customerServiceName
...
@@ -45,7 +41,7 @@ v-if="detail.customerServiceName
</
template
>
</
template
>
<!--👇 背景音乐按钮 -->
<!--👇 背景音乐按钮 -->
<
template
v-if=
"audioFlag"
>
<
template
v-if=
"audioFlag"
>
<div
:class=
"['music',
{musicOff
}]" @click="audioAutoPlay">
<div
:class=
"['music',
{ musicOff
}]" @click="audioAutoPlay">
<template
v-if=
"musicOff"
>
<template
v-if=
"musicOff"
>
<div
class=
"sprite-icon icon-music-off"
@
click=
"userOff = 0"
></div>
<div
class=
"sprite-icon icon-music-off"
@
click=
"userOff = 0"
></div>
</
template
>
</
template
>
...
@@ -67,8 +63,14 @@ v-if="detail.customerServiceName
...
@@ -67,8 +63,14 @@ v-if="detail.customerServiceName
<!--👇 活动人数预览 -->
<!--👇 活动人数预览 -->
<div
class=
"box"
>
<div
class=
"box"
>
<div
class=
"group-title flex"
>
<div
class=
"group-title flex"
>
<div><span>
{{
groupInfo
.
groupQuantity
}}
</span>
人已参团
</div>
<div>
<div>
<span>
{{
groupInfo
.
viewAmount
}}
</span>
人已浏览
</div>
<span>
{{
groupInfo
.
groupQuantity
}}
</span>
人已参团
</div>
<div>
<span>
{{
groupInfo
.
viewAmount
}}
</span>
人已浏览
</div>
</div>
</div>
<template
v-if=
"detail.showAvatarNicknameFlag == 2 && groupInfo.arr && groupInfo.arr.length"
>
<template
v-if=
"detail.showAvatarNicknameFlag == 2 && groupInfo.arr && groupInfo.arr.length"
>
<van-swipe
class=
"group-swipe"
vertical
:show-indicators=
"false"
:touchable=
"false"
autoplay=
"5000"
>
<van-swipe
class=
"group-swipe"
vertical
:show-indicators=
"false"
:touchable=
"false"
autoplay=
"5000"
>
...
@@ -91,13 +93,13 @@ v-if="detail.customerServiceName
...
@@ -91,13 +93,13 @@ v-if="detail.customerServiceName
<div
class=
"box progress-box"
id=
"progress"
>
<div
class=
"box progress-box"
id=
"progress"
>
<div
class=
"progress-title"
>
活动进度
</div>
<div
class=
"progress-title"
>
活动进度
</div>
<div
class=
"progress-bar"
>
<div
class=
"progress-bar"
>
<div
class=
"bar flex"
:style=
"{ left: `${progress > 89 ? 89
: progress < 11 ? 10 : progress}%`
}"
>
<div
class=
"bar flex"
:style=
"{ left: `${progress > 89 ? 89
: progress < 11 ? 10 : progress}%`
}"
>
<div
class=
"sprite-icon icon-flash"
></div>
<div
class=
"sprite-icon icon-flash"
></div>
<div
class=
"number"
>
{{ progress ? `${count}%` : '0%' }}
</div>
<div
class=
"number"
>
{{ progress ? `${count}%` : '0%' }}
</div>
<div
:class=
"['arrow',
{'right':count > 91
}]"
></div>
<div
:class=
"['arrow',
{ right: count > 91
}]"
></div>
</div>
</div>
<div
class=
"progress"
>
<div
class=
"progress"
>
<div
class=
"line"
:style=
"{ width: `${progress > 100 ? 100 : progress < 11? 10 : progress}%` }"
>
<div
class=
"line"
:style=
"{ width: `${progress > 100 ? 100 : progress < 11
? 10 : progress}%` }"
>
<div
class=
"stripe"
></div>
<div
class=
"stripe"
></div>
</div>
</div>
</div>
</div>
...
@@ -130,10 +132,10 @@ v-if="detail.customerServiceName
...
@@ -130,10 +132,10 @@ v-if="detail.customerServiceName
<video
:src=
"i.activityVideo"
:ref=
"`video-$
{index}`" :controls="false" preload @loadedmetadata="loadedmetadata($event)">
</video>
<video
:src=
"i.activityVideo"
:ref=
"`video-$
{index}`" :controls="false" preload @loadedmetadata="loadedmetadata($event)">
</video>
<div
class=
"mask"
>
<div
class=
"mask"
>
<img
:src=
"i.activityVideoCoverImage"
/>
<img
:src=
"i.activityVideoCoverImage"
/>
<div
:class=
"['sprite-icon xy-center',
detail.activityVideos.length == 1 ?'icon-big-play':
'icon-play']"
></div>
<div
:class=
"['sprite-icon xy-center',
detail.activityVideos.length == 1 ? 'icon-big-play' :
'icon-play']"
></div>
<div
class=
"line-box flex"
>
<div
class=
"line-box flex"
>
<div
class=
"line"
></div>
<div
class=
"line"
></div>
<div
v-if=
"i.activityVideoTime"
class=
"duration"
>
{{
date_format
(
i
.
activityVideoTime
)
}}
</div>
<div
v-if=
"i.activityVideoTime"
class=
"duration"
>
{{
date_format
(
i
.
activityVideoTime
)
}}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -164,9 +166,7 @@ v-if="detail.customerServiceName
...
@@ -164,9 +166,7 @@ v-if="detail.customerServiceName
<template
v-if=
"detail.distance"
>
{{
detail
.
distance
}}
km
</
template
>
<template
v-if=
"detail.distance"
>
{{
detail
.
distance
}}
km
</
template
>
<
template
v-else
>
<
template
v-else
>
<div
class=
"auth-text"
>
<div
class=
"auth-text"
>
获取门店距离
</div>
获取门店距离
</div>
</
template
>
</
template
>
</div>
</div>
</template>
</template>
...
@@ -178,15 +178,14 @@ v-if="detail.customerServiceName
...
@@ -178,15 +178,14 @@ v-if="detail.customerServiceName
<
template
v-if=
"detail.activityDetail"
>
<
template
v-if=
"detail.activityDetail"
>
<div
class=
"activity-info"
v-html=
"decodeURIComponent(detail.activityDetail)"
></div>
<div
class=
"activity-info"
v-html=
"decodeURIComponent(detail.activityDetail)"
></div>
<div
class=
"tips text-center"
>
<div
class=
"tips text-center"
>
<img
src=
"https://img02.glsx.com.cn/weapp/resource/scrm-mobile/crowdfunding/logo.png"
alt=
"技术支持:广联数科"
>
<img
src=
"https://img02.glsx.com.cn/weapp/resource/scrm-mobile/crowdfunding/logo.png"
alt=
"技术支持:广联数科"
/
>
</div>
</div>
</
template
>
</
template
>
<!--👇 客服弹窗 -->
<!--👇 客服弹窗 -->
<kf-modal
v-model=
"showKf"
:detail=
"detail"
/>
<kf-modal
v-model=
"showKf"
:detail=
"detail"
/>
<!--👇 IOS音频播放 -->
<!--👇 IOS音频播放 -->
<
template
v-if=
"detail.activityMusic"
>
<
template
v-if=
"detail.activityMusic"
>
<video
id=
"audio"
style=
"object-fit:contain;"
controls
webkit-playsinline=
"true"
playsinline=
"true"
x5-video-player-type=
"h5-page"
preload=
"auto"
:autoplay=
"!detail.liveBroadcastRoomId"
loop
>
<video
id=
"audio"
style=
"object-fit: contain"
controls
webkit-playsinline=
"true"
playsinline=
"true"
x5-video-player-type=
"h5-page"
preload=
"auto"
:autoplay=
"!detail.liveBroadcastRoomId"
loop
></video>
</video>
</
template
>
</
template
>
</div>
</div>
</div>
</div>
...
...
src/views/crowdfunding/orderList.vue
View file @
1eaa54c
<
template
>
<
template
>
<div
class=
"layout"
>
<div
class=
"layout"
>
<div
class=
"title"
>
左右滑动查看核销凭证
</div>
<div
class=
"title"
>
左右滑动查看核销凭证
</div>
<div
<div
class=
"content"
@
touchend=
"end"
>
class=
"content"
<van-swipe
class=
"img-box"
:key=
"updata"
indicator-color=
"#FFFFFF"
:loop=
"false"
@
change=
"change"
:style=
"swipeStyle"
:show-indicators=
"false"
ref=
"swipe"
duration=
"200"
>
@
touchend=
"end"
<template
v-for=
"(i, index) in orderList"
>
>
<van-swipe
class=
"img-box"
:key=
"updata"
indicator-color=
"#FFFFFF"
:loop=
"false"
@
change=
"change"
:style=
"swipeStyle"
:show-indicators=
"false"
ref=
"swipe"
duration=
"200"
>
<template
v-for=
"(i,index) in orderList"
>
<van-swipe-item
:key=
"index"
>
<van-swipe-item
:key=
"index"
>
<create-order-img
<create-order-img
:orderInfo=
"i"
:canvasId=
"`order-$
{index}`" :ref="`order-${index}`" />
:orderInfo=
"i"
<van-image
:src=
"imgList[index]"
class=
"img"
>
:canvasId=
"`order-$
{index}`"
:ref="`order-${index}`"
/>
<van-image
:src=
"imgList[index]"
class=
"img"
>
<template
v-slot:loading
>
<template
v-slot:loading
>
<van-loading
<van-loading
type=
"spinner"
size=
"20"
/>
type=
"spinner"
size=
"20"
/>
</
template
>
</
template
>
</van-image>
</van-image>
</van-swipe-item>
</van-swipe-item>
</template>
</template>
</van-swipe>
</van-swipe>
<
template
v-if=
"orderList.length > 1"
>
<
template
v-if=
"orderList.length > 1"
>
<div
class=
"dots x-center text-center"
>
<div
class=
"dots x-center text-center"
>
<template
v-for=
"(i,index) in orderList"
>
<template
v-for=
"(i, index) in orderList"
>
<div
<div
:class=
"['dots-item',
{ active: itemIndex == index }]" :key="index">
</div>
:class=
"['dots-item',
{'active':itemIndex == index}]"
:key="index"
>
</div>
</
template
>
</
template
>
</div>
</div>
</template>
</template>
...
@@ -53,7 +26,7 @@
...
@@ -53,7 +26,7 @@
</div>
</div>
</template>
</template>
<
script
type=
'text/ecmascript-6'
>
<
script
type=
"text/ecmascript-6"
>
import
{
shopmallApi
}
from
'@/api'
import
{
shopmallApi
}
from
'@/api'
const
swipeStyle
=
'padding-left: 9px;'
const
swipeStyle
=
'padding-left: 9px;'
export
default
{
export
default
{
...
@@ -114,7 +87,7 @@ export default {
...
@@ -114,7 +87,7 @@ export default {
}
}
</
script
>
</
script
>
<
style
scoped
lang=
'scss'
>
<
style
scoped
lang=
"scss"
>
.layout
{
.layout
{
user-select
:
none
;
user-select
:
none
;
.title
{
.title
{
...
...
src/views/crowdfunding/success.vue
View file @
1eaa54c
<
template
>
<
template
>
<div
class=
"layout flex"
>
<div
class=
"layout flex"
>
<div
class=
"title flex"
>
<div
class=
"title flex"
>
<div
class=
"sprite-icon icon-success"
></div>
恭喜您已参团成功!
<div
class=
"sprite-icon icon-success"
></div>
恭喜您已参团成功!
</div>
</div>
<div
class=
"info"
>
到店凭当前图片核销订单并支付尾款
</div>
<div
class=
"info"
>
到店凭当前图片核销订单并支付尾款
</div>
<van-image
<van-image
:src=
"img"
class=
"img"
>
:src=
"img"
class=
"img"
>
<template
v-slot:loading
>
<template
v-slot:loading
>
<van-loading
<van-loading
type=
"spinner"
size=
"20"
/>
type=
"spinner"
size=
"20"
/>
</
template
>
</
template
>
</van-image>
</van-image>
<div
class=
"tips text-center"
>
长按保存图片
</div>
<div
class=
"tips text-center"
>
长按保存图片
</div>
<create-order-img
<create-order-img
@
success=
"img = $event"
:orderInfo=
"orderInfo"
/>
@
success=
"img = $event"
:orderInfo=
"orderInfo"
/>
</div>
</div>
</template>
</template>
<
script
type=
'text/ecmascript-6'
>
<
script
type=
"text/ecmascript-6"
>
export
default
{
export
default
{
name
:
'success'
,
name
:
'success'
,
...
@@ -67,7 +59,7 @@ export default {
...
@@ -67,7 +59,7 @@ export default {
}
}
</
script
>
</
script
>
<
style
scoped
lang=
'scss'
>
<
style
scoped
lang=
"scss"
>
.layout
{
.layout
{
flex-direction
:
column
;
flex-direction
:
column
;
font-size
:
14px
;
font-size
:
14px
;
...
...
vue.config.js
View file @
1eaa54c
...
@@ -21,12 +21,7 @@ const cdn = {
...
@@ -21,12 +21,7 @@ const cdn = {
// 开发环境
// 开发环境
css
:
[
'//web.sdk.qcloud.com/player/tcplayer/release/v4.2.1/tcplayer.min.css'
],
css
:
[
'//web.sdk.qcloud.com/player/tcplayer/release/v4.2.1/tcplayer.min.css'
],
js
:
[
js
:
[
'//web.sdk.qcloud.com/player/tcplayer/release/v4.5.1/libs/TXLivePlayer-1.2.0.min.js'
,
'//web.sdk.qcloud.com/player/tcplayer/release/v4.5.2/libs/hls.min.0.13.2m.js'
,
'https://web.sdk.qcloud.com/player/tcplayer/release/v4.5.2/libs/flv.min.1.6.2.js'
,
'//web.sdk.qcloud.com/player/tcplayer/release/v4.5.2/tcplayer.v4.5.2.min.js'
]
'//web.sdk.qcloud.com/player/tcplayer/release/v4.5.1/libs/TXLivePlayer-1.2.0.min.js'
,
'//web.sdk.qcloud.com/player/tcplayer/release/v4.5.2/libs/hls.min.0.13.2m.js'
,
'https://web.sdk.qcloud.com/player/tcplayer/release/v4.5.2/libs/flv.min.1.6.2.js'
,
'//web.sdk.qcloud.com/player/tcplayer/release/v4.5.2/tcplayer.v4.5.2.min.js'
]
}
}
/**
/**
...
@@ -137,14 +132,7 @@ module.exports = {
...
@@ -137,14 +132,7 @@ module.exports = {
config
.
plugins
.
delete
(
'prefetch'
)
// TODO: need test
config
.
plugins
.
delete
(
'prefetch'
)
// TODO: need test
// 别名 alias
// 别名 alias
config
.
resolve
.
alias
config
.
resolve
.
alias
.
set
(
'@'
,
resolve
(
'src'
)).
set
(
'assets'
,
resolve
(
'src/assets'
)).
set
(
'api'
,
resolve
(
'src/api'
)).
set
(
'views'
,
resolve
(
'src/views'
)).
set
(
'components'
,
resolve
(
'src/components'
)).
set
(
'plugins'
,
resolve
(
'src/components'
)).
set
(
'utils'
,
resolve
(
'src/utils'
))
.
set
(
'@'
,
resolve
(
'src'
))
.
set
(
'assets'
,
resolve
(
'src/assets'
))
.
set
(
'api'
,
resolve
(
'src/api'
))
.
set
(
'views'
,
resolve
(
'src/views'
))
.
set
(
'components'
,
resolve
(
'src/components'
))
.
set
(
'plugins'
,
resolve
(
'src/components'
))
.
set
(
'utils'
,
resolve
(
'src/utils'
))
/**
/**
* 添加CDN参数到htmlWebpackPlugin配置中
* 添加CDN参数到htmlWebpackPlugin配置中
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment