Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
江名洋
/
linkwe-scrm
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 eea4f821
authored
Feb 27, 2022
by
xinla
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
--no commit message
1 parent
92f46928
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
42 deletions
linkwe-mobile/src/router/index.js
linkwe-mobile/src/views/Home.vue
linkwe-mobile/src/views/redPacket/index.vue
linkwe-mobile/src/views/redPacket/receive.vue
linkwe-mobile/src/router/index.js
View file @
eea4f82
...
...
@@ -133,17 +133,6 @@ const routes = [
noAuth
:
true
,
},
},
// 微信授权回调
{
path
:
'/authCallback'
,
name
:
'authCallback'
,
component
:
()
=>
import
(
'../views/authCallback'
),
meta
:
{
title
:
'微信授权回调'
,
noAuth
:
true
,
noGetUser
:
true
,
},
},
]
const
router
=
new
VueRouter
({
...
...
linkwe-mobile/src/views/Home.vue
View file @
eea4f82
<
template
>
<div
class=
"home"
>
<div
class=
"logo ac"
>
linkWeChat
</div>
<router-link
class=
"router-link"
v-for=
"(item, index) in $router.options.routes"
:to=
"item.path"
:key=
"index"
>
{{
item
.
meta
.
title
}}
</router-link
>
<template
v-if=
"isShow"
>
<router-link
class=
"router-link"
v-for=
"(item, index) in $router.options.routes"
:to=
"item.path"
:key=
"index"
>
{{
item
.
meta
.
title
}}
</router-link
>
</
template
>
<div
v-else
class=
"cc"
>
{{ tips }}
</div>
</div>
</template>
...
...
@@ -17,6 +22,18 @@
export
default
{
name
:
'Home'
,
components
:
{},
data
()
{
return
{
isShow
:
process
.
env
.
NODE_ENV
===
'development'
,
tips
:
''
,
}
},
created
()
{
if
(
location
.
hash
.
indexOf
(
'redPacketReceive'
)
&&
!
navigator
.
userAgent
.
indexOf
(
'Mobile'
))
{
this
.
tips
=
'请在手机端微信打开'
}
else
{
}
},
}
</
script
>
...
...
linkwe-mobile/src/views/redPacket/index.vue
View file @
eea4f82
...
...
@@ -15,7 +15,7 @@ export default {
loading
:
false
,
finished
:
false
,
loadFail
:
false
,
sceneType
:
1
,
// 1:客户 2:客群
sceneType
:
undefined
,
// 1:客户 2:客群
list
:
[],
visible
:
false
,
redPacketType
:
'personal'
,
// personal,enterprise
...
...
@@ -167,6 +167,7 @@ export default {
let
form
=
Object
.
assign
({},
this
.
form
)
// 单位换算 元转分
form
.
redEnvelopeAmount
*=
100
form
.
sendUserId
=
this
.
userId
request
(
form
).
then
(({
data
,
msg
})
=>
{
this
.
$toast
.
clear
()
this
.
send
(
form
,
data
||
msg
)
...
...
@@ -182,8 +183,7 @@ export default {
form
,
{
orderId
,
sendUserId
:
this
.
userId
,
sceneType
:
this
.
sceneType
,
sceneType
:
that
.
sceneType
,
},
query
,
hash
...
...
@@ -277,24 +277,12 @@ export default {
</
template
>
</van-field>
<!--
客户群
个人红包相关字段 -->
<!-- 个人红包相关字段 -->
<
template
v-if=
"redPacketType.includes('personal') && sceneType == 2"
>
<van-field
v-model=
"form.redEnvelopeAmount"
type=
"text"
:label=
"
{ 1: '单个红包金额(元)', 2: '红包总额(元)' }[form.redEnvelopesType]"
placeholder="请输入金额"
required
:rules="rules.redEnvelopeAmount"
/>
<div
class=
"sub-des"
>
精确到小数点后两位,可输入1~200
</div>
</
template
>
<!-- 客户个人红包相关 -->
<
template
v-else-if=
"redPacketType.includes('personal') && sceneType == 1"
>
<van-field
v-model=
"form.redEnvelopeAmount"
type=
"text"
label=
"红包金额"
:label=
"
{ 1: '红包金额(元)', 2: '红包总额(元)' }[sceneType]"
placeholder="请输入金额"
required
:rules="rules.redEnvelopeAmount"
...
...
linkwe-mobile/src/views/redPacket/receive.vue
View file @
eea4f82
...
...
@@ -82,15 +82,18 @@ export default {
orderNo
:
this
.
redPacket
.
orderId
,
// 订单id
openId
:
this
.
openId
,
// 客户公众号id
appId
:
window
.
CONFIG
.
appId
,
// 微信公众号id
chatId
:
this
.
redPacket
.
chatId
,
// 客户企微id
externalUserid
:
this
.
redPacket
.
externalUserid
,
// 客户企微id
}
receiveRedPacket
(
form
)
.
catch
(({
data
})
=>
{
this
.
errorMsg
=
data
.
msg
return
Promise
.
reject
()
})
.
then
(()
=>
{
return
getReceiveList
()
.
then
((
data
)
=>
{
if
(
data
.
code
===
200
)
{
return
getReceiveList
(
form
)
}
else
{
this
.
errorMsg
=
data
.
msg
this
.
$toast
.
clear
()
return
Promise
.
reject
()
}
})
.
then
(({
data
})
=>
{
data
.
currentAcceptMoney
/=
100
...
...
@@ -147,7 +150,7 @@ export default {
<
/div
>
<
div
class
=
"red-packet-name"
>
{{
redPacket
.
redEnvelopeName
}}
<
/div
>
<
div
class
=
"received-num-wrap"
>
<
span
class
=
"red-packet-received-num"
>
{{
redPacket
.
total
Money
}}
<
/spa
n
<
span
class
=
"red-packet-received-num"
>
{{
redPacket
.
currentAccept
Money
}}
<
/spa
n
>
元
<
/div
>
<
div
class
=
"red-packet-text"
>
已存入零钱,可直接使用
<
/div
>
...
...
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