Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mayi-mp-shop
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
程默
mayi-mp-shop
Commits
120832d3
Commit
120832d3
authored
Nov 10, 2021
by
李嘉林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
接口对接
parent
3b758ca6
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
118 additions
and
26 deletions
+118
-26
src/api/index.js
+17
-0
src/pages/wo/reportTheLoss/index.vue
+39
-6
src/pages/wo/showPassCheck/index.vue
+58
-19
src/pages/wo/verification/index.vue
+4
-1
No files found.
src/api/index.js
View file @
120832d3
...
...
@@ -52,6 +52,22 @@ console.log(process.env,'-----------------config------')
`
${
process
.
env
.
OLSHOP_URL
}
/user/cancelNewCustomerGiftDialog/`
+
params
);
},
// 生成唯一码动态码
generatorUniqueCodeByDynamic
()
{
return
requestPOST
(
`
${
process
.
env
.
OLSHOP_URL
}
/user/generatorUniqueCodeByDynamic`
);
},
// 查询是否有需要挂失的卡
getStaticCode
()
{
return
requestPOST
(
`
${
process
.
env
.
OLSHOP_URL
}
/user/getStaticCode`
);
},
// 挂失卡
reportTheLoss
()
{
return
requestPOST
(
`
${
process
.
env
.
OLSHOP_URL
}
/user/reportTheLoss`
);
},
// 扫码核验历史记录
getHistoryByVerifier
(
data
)
{
return
requestPOST
(
`
${
process
.
env
.
OLSHOP_URL
}
/user/getHistoryByVerifier`
,
data
);
},
}
\ No newline at end of file
src/pages/wo/reportTheLoss/index.vue
View file @
120832d3
...
...
@@ -7,7 +7,7 @@
src=
"http://mayi-newshop.oss-cn-shanghai.aliyuncs.com/public/png/2102bb76-b84b-4165-926e-2f53ff4995fd.png"
></image>
</div>
<div
class=
"info"
>
<div
class=
"info"
v-if=
"loaded"
>
<div
class=
"title"
>
用户须知
</div>
<div
class=
"text"
v-if=
"!reported"
>
<p>
1.如果您的通行证实体卡遗失了,请尽快提交挂失;
</p>
...
...
@@ -30,12 +30,14 @@
</
template
>
<
script
type=
"text/ecmascript-6"
>
import
index
from
"@/api/index"
;
export
default
{
name
:
"reportTheLoss"
,
data
()
{
return
{
reported
:
false
,
// 已经挂失
confirmLoading
:
false
,
loaded
:
false
,
};
},
components
:
{},
...
...
@@ -49,23 +51,54 @@ export default {
},
onShow
()
{
console
.
log
(
"---onShow"
);
this
.
init
();
},
methods
:
{
init
()
{
index
.
getStaticCode
().
then
((
res
)
=>
{
this
.
loaded
=
true
;
if
(
res
.
data
.
ok
==
"true"
&&
res
.
data
.
data
==
"true"
)
{
this
.
reported
=
false
;
}
else
{
this
.
reported
=
true
;
}
});
},
confirm
()
{
this
.
confirmLoading
=
true
;
let
_this
=
this
;
wx
.
showModal
({
title
:
"提示"
,
content
:
"是否挂失"
,
confirmColor
:
"#229df1"
,
success
(
res
)
{
if
(
res
.
confirm
)
{
_this
.
confirmLoading
=
true
;
wx
.
showLoading
({
title
:
"挂失中..."
,
});
setTimeout
(()
=>
{
index
.
reportTheLoss
().
then
((
res
)
=>
{
if
(
res
.
data
.
ok
==
"true"
&&
res
.
data
.
data
==
"true"
)
{
wx
.
hideLoading
();
wx
.
showToast
({
title
:
"已挂失"
,
icon
:
"success"
,
duration
:
1000
,
});
this
.
reported
=
true
;
this
.
confirmLoading
=
false
;
},
1000
);
_this
.
reported
=
true
;
_this
.
confirmLoading
=
false
;
}
else
{
wx
.
showToast
({
title
:
"挂失失败"
,
icon
:
"error"
,
duration
:
1000
,
});
}
});
}
else
if
(
res
.
cancel
)
{
console
.
log
(
"用户点击取消"
);
}
},
});
},
},
};
...
...
src/pages/wo/showPassCheck/index.vue
View file @
120832d3
...
...
@@ -22,20 +22,20 @@
<div
class=
"userImg"
>
<image
mode=
"aspectFill"
src=
"https://img1.baidu.com/it/u=3755297117,609162545&fm=26&fmt=auto
"
:src=
"userInfo.headPortraitUrl
"
alt=
""
></image>
</div>
<div
class=
"userName"
>
张三
</div>
<div
class=
"userWork"
>
党委委员、驻局纪检组书记
</div>
<div
class=
"userName"
>
{{
userInfo
.
realname
}}
</div>
<div
class=
"userWork"
>
{{
userInfo
.
identity
}}
</div>
<div
class=
"qrCode"
>
<image
mode=
"aspectFill"
src=
"https://img1.baidu.com/it/u=3755297117,609162545&fm=26&fmt=auto
"
:src=
"qrCode
"
alt=
""
></image>
</div>
<div
class=
"time"
>
{{
updateTime
}}
</div>
<div
class=
"time"
v-if=
"updateTime"
>
{{
updateTime
}}
</div>
</div>
<div
class=
"explain"
>
相约北京系列冬季体育赛事张家口赛区组委会
</div>
</div>
...
...
@@ -43,13 +43,17 @@
</
template
>
<
script
type=
"text/ecmascript-6"
>
import
live
from
"@/api/live"
;
import
index
from
"@/api/index"
;
export
default
{
name
:
"showPassCheck"
,
data
()
{
return
{
// 十秒更新一次
updateTime
:
""
,
TimeOut
:
''
,
TimeOut
:
""
,
qrCode
:
''
,
userInfo
:
{},
};
},
components
:
{},
...
...
@@ -62,32 +66,67 @@ export default {
console
.
log
(
"---onLoad"
);
},
onShow
()
{
this
.
updateTime
=
this
.
getTim
e
();
this
.
getQrCod
e
();
this
.
TimeOut
=
null
;
this
.
TimeOut
=
setInterval
(()
=>
{
this
.
updateTime
=
this
.
getTim
e
();
},
1000
*
10
);
this
.
getQrCod
e
();
},
1000
*
10
);
console
.
log
(
"---onShow"
);
this
.
init
();
},
onHide
(){
onHide
()
{
clearInterval
(
this
.
TimeOut
);
},
onUnload
(){
onUnload
()
{
clearInterval
(
this
.
TimeOut
);
},
mounted
()
{},
methods
:
{
getTime
(){
init
()
{
// wx.showLoading({
// title: "加载中...",
// });
live
.
getUserInfo
().
then
((
res
)
=>
{
// wx.hideLoading();
if
(
res
.
data
.
ok
==
"true"
)
{
this
.
userInfo
=
res
.
data
.
data
;
}
});
},
getQrCode
()
{
index
.
generatorUniqueCodeByDynamic
().
then
(
res
=>
{
if
(
res
.
data
.
ok
==
'true'
){
this
.
qrCode
=
res
.
data
.
data
.
uniqueCodePhoto
;
this
.
updateTime
=
res
.
data
.
data
.
createDatetime
;
}
})
},
getTime
()
{
let
year
=
new
Date
().
getFullYear
();
let
month
=
(
new
Date
().
getMonth
()
+
1
)
<
10
?
'0'
+
(
new
Date
().
getMonth
()
+
1
):(
new
Date
().
getMonth
()
+
1
);
let
day
=
new
Date
().
getDate
()
<
10
?
'0'
+
new
Date
().
getDate
():
new
Date
().
getDate
();
let
hours
=
new
Date
().
getHours
()
<
10
?
'0'
+
new
Date
().
getHours
():
new
Date
().
getHours
();
let
minutes
=
new
Date
().
getMinutes
()
<
10
?
'0'
+
new
Date
().
getMinutes
():
new
Date
().
getMinutes
();
let
seconds
=
new
Date
().
getSeconds
()
<
10
?
'0'
+
new
Date
().
getSeconds
():
new
Date
().
getSeconds
();
let
month
=
new
Date
().
getMonth
()
+
1
<
10
?
"0"
+
(
new
Date
().
getMonth
()
+
1
)
:
new
Date
().
getMonth
()
+
1
;
let
day
=
new
Date
().
getDate
()
<
10
?
"0"
+
new
Date
().
getDate
()
:
new
Date
().
getDate
();
let
hours
=
new
Date
().
getHours
()
<
10
?
"0"
+
new
Date
().
getHours
()
:
new
Date
().
getHours
();
let
minutes
=
new
Date
().
getMinutes
()
<
10
?
"0"
+
new
Date
().
getMinutes
()
:
new
Date
().
getMinutes
();
let
seconds
=
new
Date
().
getSeconds
()
<
10
?
"0"
+
new
Date
().
getSeconds
()
:
new
Date
().
getSeconds
();
let
today
=
`
${
year
}
-
${
month
}
-
${
day
}
${
hours
}
:
${
minutes
}
:
${
seconds
}
`
;
console
.
log
(
today
);
return
today
;
}
}
,
},
};
</
script
>
...
...
@@ -99,7 +138,7 @@ export default {
top
:
0
;
left
:
0
;
width
:
100vw
;
img{
img
{
width
:
100%
;
}
}
...
...
src/pages/wo/verification/index.vue
View file @
120832d3
...
...
@@ -12,7 +12,7 @@
name=
""
value=
""
v-model=
"checkText"
placeholder=
"输入
人员
核验码"
placeholder=
"输入核验码"
/>
</div>
<div
class=
"checkBtn flex"
@
click=
"toCheck"
>
核验
</div>
...
...
@@ -77,6 +77,9 @@ export default {
onShow
()
{
console
.
log
(
"---onShow"
);
},
onUnload
(){
this
.
showInfo
=
false
;
},
methods
:
{
toCheck
()
{
wx
.
showLoading
({
...
...
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