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 c82931ab
authored
Oct 17, 2022
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
提交代码
1 parent
8594e447
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
126 additions
and
31 deletions
.postcssrc.js
src/components/Action.vue
src/config/env.development.js
src/main.js
src/router/routes.js
src/components/CountDown.vue → src/views/crowdfunding/index/components/CountDown.vue
src/views/crowdfunding/index/components/GuidePage.vue
src/views/crowdfunding/index/components/index.js
src/views/crowdfunding/index.vue → src/views/crowdfunding/index/index.vue
.postcssrc.js
View file @
c82931a
...
...
@@ -16,9 +16,9 @@ module.exports = {
selectorBlackList
:
[],
// 指定不转换为视窗单位的类,可以自定义,可以无限添加,建议定义一至两个通用的类名
minPixelValue
:
0.5
,
// 小于或等于`1px`不转换为视窗单位,你也可以设置为你想要的值
mediaQuery
:
false
,
// 允许在媒体查询中转换`px`
landscape
:
true
,
landscapeUnit
:
'vw'
,
// (String) 横屏时使用的单位
landscapeWidth
:
812
,
//
landscape: true,
//
landscapeUnit: 'vw', // (String) 横屏时使用的单位
//
landscapeWidth: 812,
// viewportHeight:812,
}
}
...
...
src/components/Action.vue
View file @
c82931a
...
...
@@ -26,12 +26,27 @@
@touchstart="touchstart"
@touchend="touchend"
>
<template
v-if=
"detail.activityStatus == 1 && detail.buyFlag != 2"
>
预热下单
</
template
>
<
template
v-else-if=
"detail.activityStatus == 3"
>
活动已结束
</
template
>
<template
v-if=
"detail.isStaffLoginLink"
>
员工注册
<wx-open-launch-weapp
class=
"mini"
:path=
"path"
:username=
"miniprogramInfo.username"
:env-version=
"envVersion"
>
<script
type=
"text/wxtag-template"
>
<div
class=
"mini-btn"
>
点击跳转
</div>
</script>
</wx-open-launch-weapp>
</
template
>
<
template
v-else
>
<template
v-if=
"detail.buyFlag == 3"
>
继续参团
</
template
>
<
template
v-else-if=
"detail.buyFlag == 2"
>
已参团
</
template
>
<
template
v-else
>
立即参团
</
template
>
<template
v-if=
"detail.activityStatus == 1 && detail.buyFlag != 2"
>
预热下单
</
template
>
<
template
v-else-if=
"detail.activityStatus == 3"
>
活动已结束
</
template
>
<
template
v-else
>
<template
v-if=
"detail.buyFlag == 3"
>
继续参团
</
template
>
<
template
v-else-if=
"detail.buyFlag == 2"
>
已参团
</
template
>
<
template
v-else
>
立即参团
</
template
>
</template>
</template>
</div>
<pay-modal
...
...
@@ -88,11 +103,13 @@ export default {
immediate
:
true
,
handler
(
n
)
{
if
(
n
.
id
)
{
const
{
isStaffLoginLink
}
=
this
.
getQuery
()
let
expressFee
=
n
.
expressFee
||
0
let
[
price
,
decimal
]
=
this
.
centsToyuan
(
n
.
retailPrice
+
expressFee
).
toString
().
split
(
'.'
)
if
(
!
decimal
)
decimal
=
'00'
n
.
price
=
price
n
.
decimal
=
decimal
n
.
isStaffLoginLink
=
isStaffLoginLink
// limitPurchaseFlag 是否限购标志:1 否;2 是;
//buyFlag 1是未购买或者未限购,2是已购买且达到购买上限,3是已购买且未达到购买上限
let
formList
=
[]
...
...
@@ -156,7 +173,10 @@ export default {
payStatus
:
Date
.
now
(),
posterImg
:
''
,
carInfo
:
{},
iSMiniprogram
:
true
iSMiniprogram
:
true
,
envVersion
:
'release'
,
miniprogramInfo
:
{},
path
:
''
}
},
props
:
{
...
...
@@ -166,11 +186,25 @@ export default {
}
},
mounted
()
{
const
{
envVersion
,
miniprogramInfo
}
=
window
.
$fetchConfig
,
params
=
this
.
getLocalStorage
(
'wx_scrm_link_params'
),
userInfo
=
this
.
getUserInfo
(),
data
=
{
staffName
:
userInfo
.
nickName
,
fileUrl
:
userInfo
.
logo
,
merchantId
:
params
.
merchantId
}
this
.
envVersion
=
envVersion
this
.
miniprogramInfo
=
miniprogramInfo
this
.
iSMiniprogram
=
window
.
__wxjs_environment
===
'miniprogram'
this
.
path
=
`pages/tab/index/index.html?data=
${
encodeURIComponent
(
JSON
.
stringify
(
data
))}
`
},
methods
:
{
submit
()
{
let
{
detail
,
iSMiniprogram
}
=
this
if
(
detail
.
isStaffLoginLink
)
{
return
}
if
(
iSMiniprogram
)
{
this
.
showToast
(
'参团请拨打短信中咨询热线'
)
return
...
...
@@ -301,22 +335,6 @@ export default {
height
:
35px
;
position
:
relative
;
overflow
:
hidden
;
.mini
{
position
:
absolute
;
left
:
0
;
top
:
0
;
width
:
100%
;
height
:
100%
;
z-index
:
2
;
opacity
:
0
;
&-btn
{
width
:
100%
;
height
:
100%
;
}
}
.sprite-icon
{
margin
:
0
auto
;
}
}
}
.price
{
...
...
@@ -346,6 +364,23 @@ export default {
color
:
#ffffff
;
box-sizing
:
border-box
;
line-height
:
40px
;
position
:
relative
;
.mini
{
position
:
absolute
;
left
:
0
;
top
:
0
;
width
:
100%
;
height
:
100%
;
z-index
:
2
;
opacity
:
0
;
&-btn
{
width
:
100%
;
height
:
100%
;
}
}
.sprite-icon
{
margin
:
0
auto
;
}
}
.disabled
{
background
:
#b1b1b1
;
...
...
src/config/env.development.js
View file @
c82931a
...
...
@@ -10,7 +10,7 @@
module
.
exports
=
{
title
:
'加载中...'
,
request
:
{
baseURL
:
'http://scrm.
test
.glsx.com.cn'
,
// 本地测试项目地址,
baseURL
:
'http://scrm.
dev
.glsx.com.cn'
,
// 本地测试项目地址,
// 设置超时时间
timeout
:
180000
,
// 携带凭证
...
...
src/main.js
View file @
c82931a
...
...
@@ -68,10 +68,10 @@ let body = document.getElementsByTagName('head')[0],
ISWXWORK
=
false
,
IsIOS
=
/
(
iPhone|iPad|iPod|iOS
)
/i
.
test
(
navigator
.
userAgent
),
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.
6
.0.js'
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'
ISWXWORK
=
true
}
...
...
src/router/routes.js
View file @
c82931a
const
pages
=
{
crowdfunding
:
[
{
name
:
'index'
,
name
:
'index
/index
'
,
meta
:
{
keepAlive
:
true
,
// noAuth: true,
...
...
@@ -88,8 +88,8 @@ Object.keys(pages).map(parent => {
pages
[
parent
].
map
(
val
=>
{
let
childrenPath
=
`
${
parent
}
/
${
val
.
name
}
`
let
{
meta
}
=
val
const
path
=
`/
${
val
.
name
==
'index'
?
parent
:
childrenPath
}
`
const
name
=
val
.
name
==
'index
'
?
parent
:
childrenPath
.
replace
(
'/'
,
'.'
)
const
path
=
`/
${
val
.
name
==
'index
/index
'
?
parent
:
childrenPath
}
`
const
name
=
val
.
name
==
'index
/index'
?
parent
:
childrenPath
.
replace
(
/
\/
/g
,
'.'
)
if
(
meta
&&
meta
.
keepAlive
)
keepAlives
.
push
(
name
)
let
route
=
{
component
:
resolve
=>
require
([
`views/
${
childrenPath
}
.vue`
],
resolve
),
...
...
src/components/CountDown.vue
→
src/
views/crowdfunding/index/
components/CountDown.vue
View file @
c82931a
File moved
src/views/crowdfunding/index/components/GuidePage.vue
0 → 100644
View file @
c82931a
<
template
>
<div
class=
"guide-page"
v-if=
"show"
>
<img
:src=
"img"
@
click=
"tap"
>
</div>
</
template
>
<
script
type=
'text/ecmascript-6'
>
const
imgUrl
=
'https://img02.glsx.com.cn/weapp/resource/scrm-mobile/crowdfunding/guide-'
export
default
{
name
:
'GuidePage'
,
data
()
{
return
{
img
:
''
,
index
:
0
,
show
:
true
}
},
mounted
()
{
this
.
img
=
`
${
imgUrl
}${
this
.
index
}
.webp`
},
methods
:
{
tap
()
{
let
{
index
}
=
this
if
(
index
==
2
)
{
this
.
$parent
.
showGuidePage
=
false
this
.
show
=
false
return
}
++
this
.
index
this
.
img
=
`
${
imgUrl
}${
this
.
index
}
.webp?v=
${
Date
.
now
()}
`
}
}
}
</
script
>
<
style
scoped
lang=
'scss'
>
.guide-page
{
position
:
fixed
;
top
:
0
;
right
:
0
;
bottom
:
0
;
left
:
0
;
z-index
:
10086
;
background-color
:
#000
;
}
</
style
>
\ No newline at end of file
src/views/crowdfunding/index/components/index.js
0 → 100644
View file @
c82931a
const
componentsFiles
=
require
.
context
(
`./`
,
true
,
/.vue$/
)
let
components
=
{}
componentsFiles
.
keys
().
forEach
(
path
=>
{
const
component
=
componentsFiles
(
path
).
default
components
=
{
...
components
,
[
component
.
name
]:
component
}
})
export
default
components
src/views/crowdfunding/index.vue
→
src/views/crowdfunding/index
/index
.vue
View file @
c82931a
This diff is collapsed.
Click to expand it.
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