Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
activities
/
web-lottery
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
1
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
d74819a3
authored
Nov 14, 2023
by
Lays-lzq
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: dms消息适配
parent
fc9e537e
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
33 additions
and
16 deletions
+33
-16
api/request.js
+1
-1
pages/index/index.vue
+13
-3
pages/list/index.vue
+1
-1
pages/message/index.vue
+4
-4
pages/mini/index/index.vue
+12
-3
pages/mini/list/index.vue
+1
-1
plugins/pvStatisticalService.js
+1
-3
No files found.
api/request.js
View file @
d74819a3
...
...
@@ -11,7 +11,7 @@ const axiosService = axios.create();
// 默认content-type
axiosService
.
defaults
.
headers
[
"Content-Type"
]
=
"application/x-www-form-urlencoded"
;
// 默认baseURL
axiosService
.
defaults
.
baseURL
=
`//
${
process
.
env
.
CUSTOMER_API_DOMAIN
}
/v1`
;
axiosService
.
defaults
.
baseURL
=
`
https:
//
${
process
.
env
.
CUSTOMER_API_DOMAIN
}
/v1`
;
// 默认请求超时时间
axiosService
.
defaults
.
timeout
=
3
*
1000
;
...
...
pages/index/index.vue
View file @
d74819a3
...
...
@@ -27,7 +27,8 @@ export default {
[
LOTTERY_TYPE
.
timing
]:
()
=>
import
(
'@/components/Lottery/Timing/Main'
)
},
id
:
this
.
$route
.
query
.
id
||
null
,
// 接收抽奖id
sessionId
:
this
.
$route
.
query
.
sessionId
||
null
// 接收抽奖场次id
sessionId
:
this
.
$route
.
query
.
sessionId
||
null
,
// 接收抽奖场次id
trueId
:
null
}
},
computed
:
{
...
...
@@ -37,6 +38,13 @@ export default {
lotteryInfo
:
'lottery/lotteryInfo'
})
},
watch
:
{
trueId
(
nVal
,
oVal
)
{
if
(
nVal
)
{
this
.
postInfo
(
nVal
)
}
}
},
created
()
{
this
.
dataInit
()
},
...
...
@@ -57,6 +65,8 @@ export default {
this
.
getLotteryDetail
({
id
,
playId
,
uin
})
.
then
(()
=>
{
this
.
isLoading
=
false
this
.
trueId
=
this
.
lotteryInfo
.
id
console
.
log
(
this
.
lotteryInfo
,
888888
);
// 微信分享
if
(
UserAgents
.
isWx
&&
process
.
client
)
{
const
{
lotteryInfo
}
=
this
...
...
@@ -84,7 +94,7 @@ export default {
Bus
.
$on
(
'LotteryInfoUpdate'
,
data
=>
{
const
{
id
}
=
data
const
{
uin
,
id
:
currentId
,
sessionId
:
currentPlayId
}
=
this
if
(
+
id
===
+
currentId
)
{
if
(
id
===
currentId
)
{
this
.
getLotteryDetail
({
id
,
playId
:
currentPlayId
,
uin
})
}
})
...
...
@@ -92,7 +102,7 @@ export default {
Bus
.
$on
(
'LotteryStateUpdate'
,
data
=>
{
const
{
id
,
playId
}
=
data
const
{
sessionId
:
currentPlayId
,
id
:
currentId
}
=
this
if
(
+
id
===
+
currentId
&&
+
playId
===
+
currentPlayId
)
{
if
(
id
===
currentId
&&
playId
===
currentPlayId
)
{
const
{
status
,
startTime
,
endTime
}
=
data
// 状态
this
.
updateInfo
({
...
...
pages/list/index.vue
View file @
d74819a3
...
...
@@ -106,7 +106,7 @@ export default {
Bus
.
$on
(
'LotteryInfoUpdate'
,
data
=>
{
const
{
id
}
=
data
const
{
uin
,
id
:
currentId
}
=
this
.
$route
.
query
if
(
+
id
===
+
currentId
)
{
if
(
id
===
currentId
)
{
this
.
getSessionList
({
id
,
uin
})
}
})
...
...
pages/message/index.vue
View file @
d74819a3
...
...
@@ -152,8 +152,8 @@ export default {
contactPhone: addressInfo?.mobile || '',
name: addressInfo?.name || ''
}
this.winInfo = { ...this.winInfo,
address: `
$
{
addressInfo
?.
province
||
''
}
-
$
{
addressInfo
?.
city
||
''
}
-
$
{
addressInfo
?.
area
||
''
}
-
$
{
addressInfo
?.
detail
}
`,
this.winInfo = { ...this.winInfo,
address: `
$
{
addressInfo
?.
province
||
''
}
-
$
{
addressInfo
?.
city
||
''
}
-
$
{
addressInfo
?.
area
||
''
}
-
$
{
addressInfo
?.
detail
}
`,
contactPhone: addressInfo?.mobile || '',
name: addressInfo?.name || ''
}
...
...
@@ -257,14 +257,14 @@ export default {
Bus.$on('LotteryInfoUpdate', data => {
const { id } = data
const { id: currentId } = this.$route.query
if (
+id === +
currentId) {
if (
id ===
currentId) {
this.loadData()
}
})
Bus.$on('LotteryStateUpdate', data => {
const { id } = data
const { id: currentId } = this.$route.query
if (
+id === +
currentId) {
if (
id ===
currentId) {
this.loadData()
}
})
...
...
pages/mini/index/index.vue
View file @
d74819a3
...
...
@@ -30,7 +30,8 @@ export default {
id
:
this
.
$route
.
query
.
id
||
null
,
// 接收抽奖id
sessionId
:
this
.
$route
.
query
.
sessionId
||
null
,
// 接收抽奖场次id
connection
:
null
,
timer
:
null
timer
:
null
,
trueId
:
null
}
},
computed
:
{
...
...
@@ -40,6 +41,13 @@ export default {
lotteryInfo
:
'lottery/lotteryInfo'
})
},
watch
:
{
trueId
(
nVal
,
oVal
)
{
if
(
nVal
)
{
this
.
postInfo
(
nVal
)
}
}
},
created
()
{
this
.
connectionInit
()
this
.
dataInit
()
...
...
@@ -79,6 +87,7 @@ export default {
this
.
getLotteryDetail
({
id
,
playId
,
uin
})
.
then
(()
=>
{
this
.
isLoading
=
false
this
.
trueId
=
this
.
lotteryInfo
.
id
// 微信分享
if
(
UserAgents
.
isWx
&&
process
.
client
)
{
const
{
lotteryInfo
}
=
this
...
...
@@ -106,7 +115,7 @@ export default {
Bus
.
$on
(
'LotteryInfoUpdate'
,
data
=>
{
const
{
id
}
=
data
const
{
uin
,
id
:
currentId
,
sessionId
:
currentPlayId
}
=
this
if
(
+
id
===
+
currentId
)
{
if
(
id
===
currentId
)
{
this
.
getLotteryDetail
({
id
,
playId
:
currentPlayId
,
uin
})
}
})
...
...
@@ -114,7 +123,7 @@ export default {
Bus
.
$on
(
'LotteryStateUpdate'
,
data
=>
{
const
{
id
,
playId
}
=
data
const
{
sessionId
:
currentPlayId
,
id
:
currentId
}
=
this
if
(
+
id
===
+
currentId
&&
+
playId
===
+
currentPlayId
)
{
if
(
id
===
currentId
&&
playId
===
currentPlayId
)
{
// eslint-disable-next-line no-unused-vars
const
{
status
,
startTime
,
endTime
,
userTimes
}
=
data
// 状态
...
...
pages/mini/list/index.vue
View file @
d74819a3
...
...
@@ -92,7 +92,7 @@ export default {
Bus
.
$on
(
'LotteryInfoUpdate'
,
data
=>
{
const
{
id
}
=
data
const
{
uin
,
id
:
currentId
}
=
this
.
$route
.
query
if
(
+
id
===
+
currentId
)
{
if
(
id
===
currentId
)
{
this
.
getSessionList
({
id
,
uin
})
}
})
...
...
plugins/pvStatisticalService.js
View file @
d74819a3
export
default
async
function
({
route
,
store
})
{
const
{
id
=
0
,
uin
=
0
}
=
route
.
query
const
{
uin
=
0
}
=
route
.
query
try
{
await
store
.
dispatch
(
'users/getUerInfo'
,
{
uin
})
// pv统计
await
store
.
dispatch
(
'users/postInfo'
,
id
)
}
catch
(
error
)
{
console
.
log
(
error
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment