Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
gl_tape
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
3
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 685aeed2
authored
Apr 25, 2024
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
flx 修复BUG
1 parent
bba50b52
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
107 additions
and
66 deletions
api/module/userApi.js
env.js
pages/detail/components/ToolBox.vue
pages/detail/components/payPop.vue
pages/detail/detail.vue
pages/home/components/RecordList.vue
pages/home/components/SettingBox.vue
pages/home/home.vue
store/modules/user.js
api/module/userApi.js
View file @
685aeed
...
...
@@ -2,7 +2,7 @@ import http from "../request/http";
module
.
exports
=
{
/**获取短信 */
getSmsCode
(
data
=
{})
{
getSmsCode
(
data
=
{})
{
data
.
projectName
=
"boutique"
;
return
http
.
fetch
(
"dj.api.smartcarlife.sms.get.code"
,
data
);
},
...
...
@@ -14,12 +14,12 @@ module.exports = {
return
http
.
fetch
(
'dj.api.smartcarlife.sms.applogin'
,
data
)
},
/**免登 */
autoLogin
(
data
=
{})
{
autoLogin
(
data
=
{})
{
data
.
projectName
=
"boutique"
;
return
http
.
fetch
(
"dj.api.smartcarlife.sms.noSignIn.login"
,
data
);
},
// 获取园区店下的4s店
getSceneMerchantRefStoreList
(
data
)
{
getSceneMerchantRefStoreList
(
data
)
{
data
.
projectName
=
"boutique"
;
return
http
.
post
({
method
:
"dj.api.scenemerchantref.query4SRefByYqShopByLogin"
,
...
...
@@ -27,20 +27,20 @@ module.exports = {
});
},
/**获取帐号列表 */
getListSelectAccount
(
data
=
{})
{
getListSelectAccount
(
data
=
{})
{
data
.
projectName
=
"boutique"
;
return
http
.
fetch
(
"dj.api.smartcarlife.workWechat.listSelectAccount"
,
data
);
},
/**选择帐号登陆 */
selectAccountLogin
(
data
)
{
selectAccountLogin
(
data
)
{
data
.
projectName
=
"boutique"
;
return
http
.
fetch
(
"dj.api.smartcarlife.workWechat.selectAccountLogin"
,
data
);
},
// 选择4s店和场景
selectMerchantScene
(
data
)
{
// 选择4s店和场景
selectMerchantScene
(
data
)
{
data
.
projectName
=
"boutique"
;
return
http
.
fetch
(
"dj.api.smartcarlife.selectMerchantScene"
,
...
...
@@ -48,11 +48,16 @@ module.exports = {
);
},
// 获取园区店开通的场景入口
getYqMerchantSceneConfigAPI
(
data
)
{
getYqMerchantSceneConfigAPI
(
data
)
{
data
.
projectName
=
"boutique"
;
return
http
.
post
({
method
:
"dj.api.smartcarlife.select.openScene.info"
,
...
data
,
});
},
/**退出*/
logout
(
data
=
{})
{
data
.
projectName
=
'boutique'
return
http
.
fetch
(
'dj.api.smartcarlife.logout'
,
data
);
},
};
env.js
View file @
685aeed
const
target
=
[
"ip"
,
"dev"
,
"uat"
,
"prod"
,
"beta"
];
const
index
=
1
;
const
index
=
2
;
/**
*
0本地
...
...
pages/detail/components/ToolBox.vue
View file @
685aeed
...
...
@@ -60,7 +60,7 @@ export default {
type
:
String
,
data
:
Array
,
id
:
[
String
,
Number
],
showPayBtn
:
Object
showPayBtn
:
Boolean
},
data
()
{
return
{
...
...
pages/detail/components/payPop.vue
View file @
685aeed
...
...
@@ -107,40 +107,34 @@ const ACCOUT_LIST = [
export
default
{
name
:
"payPop"
,
props
:
{
payInfo
:
Object
,
// 支付信息
accountInfo
:
Object
// 对公账户信息
},
data
()
{
return
{
payActive
:
1
,
paymentType
:
[],
accountList
:
ACCOUT_LIST
,
title
:
''
title
:
''
,
accountInfo
:
{},
payInfo
:
{}
};
},
computed
:
{
watchPayInfo
()
{
return
this
.
$store
.
state
.
user
.
paymentType
},
},
watch
:
{
payInfo
(
n
)
{
if
(
n
)
{
let
item
=
{
name
:
"扫码支付"
,
type
:
1
,
title
:
'付款二维码'
watchPayInfo
:
{
immediate
:
true
,
handler
(
newval
)
{
this
.
paymentType
=
newval
if
(
newval
.
length
)
{
this
.
payInfo
=
newval
.
find
(
i
=>
i
.
paymentType
==
1
)
||
{}
this
.
accountInfo
=
newval
.
find
(
i
=>
i
.
paymentType
==
2
)
||
{}
this
.
handleSwitchTab
(
newval
[
0
])
}
this
.
paymentType
.
push
(
item
)
this
.
handleSwitchTab
(
item
)
}
},
accountInfo
(
n
)
{
if
(
n
)
{
let
item
=
{
name
:
"对公账户"
,
type
:
2
,
title
:
'付款方式'
}
this
.
paymentType
.
push
(
item
)
if
(
this
.
paymentType
.
length
==
1
)
this
.
handleSwitchTab
(
item
)
}
}
},
methods
:
{
// 切换tab
...
...
@@ -221,8 +215,8 @@ export default {
border-radius
:
0
48
rpx
48
rpx
0
;
}
}
.single
{
border-radius
:
48
rpx
!important
;
.single
{
border-radius
:
48
rpx
!important
;
}
}
.payment-content
{
...
...
pages/detail/detail.vue
View file @
685aeed
...
...
@@ -49,7 +49,7 @@
@
finish=
"open"
:id=
"id"
@
toPay=
"toPay"
:showPayBtn=
"
payInfo || accountInfo
"
:showPayBtn=
"
showPayBtn
"
/>
<view
class=
"pen-box"
...
...
@@ -60,8 +60,6 @@
</
template
>
<pay-pop
ref=
"pay"
:payInfo=
"payInfo"
:accountInfo=
"accountInfo"
></pay-pop>
<finish-step
ref=
"stepRef"
...
...
@@ -94,15 +92,13 @@ export default {
type
:
{
type
:
String
,
default
:
'preview'
},
payInfo
:
Object
,
// 支付信息
accountInfo
:
Object
// 对公账户信息
}
},
data
()
{
return
{
drawStatus
:
false
,
finishVisible
:
false
,
showPayBtn
:
false
};
},
computed
:
{
...
...
@@ -111,7 +107,10 @@ export default {
},
penSwitch
()
{
return
this
.
type
!=
'preview'
&&
this
.
drawStatus
}
},
watchPayInfo
()
{
return
this
.
$store
.
state
.
user
.
paymentType
},
},
watch
:
{
watchStatus
:
{
...
...
@@ -120,9 +119,15 @@ export default {
if
(
newval
)
this
.
drawStatus
=
false
}
},
watchPayInfo
:
{
immediate
:
true
,
handler
(
newval
)
{
this
.
showPayBtn
=
newval
.
length
?
true
:
false
}
}
},
mounted
()
{
},
methods
:
{
...
mapMutations
(
"audio"
,
[
"setReceptionStatus"
]),
...
...
pages/home/components/RecordList.vue
View file @
685aeed
...
...
@@ -212,8 +212,8 @@ export default {
}
}
,
formatTime
(
num
)
{
let
minutes
=
Math
.
floor
(
num
/
60
)
||
'0
0
'
,
seconds
=
num
%
60
||
'0
0
'
let
minutes
=
Math
.
floor
(
num
/
60
)
||
'0'
,
seconds
=
num
%
60
||
'0'
seconds
=
seconds
<
10
?
`0${seconds
}
`
:
seconds
minutes
=
minutes
<
10
?
`0${minutes
}
`
:
minutes
return
{
...
...
@@ -295,12 +295,12 @@ export default {
background
:
#
ffffff
;
border
-
radius
:
16
rpx
;
box
-
sizing
:
border
-
box
;
padding
:
16
rpx
32
rpx
;
padding
:
24
rpx
32
rpx
;
position
:
relative
;
.
status
{
position
:
absolute
;
top
:
2
2
rpx
;
right
:
24
rpx
;
top
:
2
4
rpx
;
right
:
32
rpx
;
width
:
88
rpx
;
height
:
44
rpx
;
background
:
#
fdece9
;
...
...
@@ -318,9 +318,10 @@ export default {
font
-
weight
:
500
;
font
-
size
:
32
rpx
;
color
:
#
292
d33
;
.
sprite
-
icon
{
margin
-
left
:
8
rpx
;
}
white
-
space
:
nowrap
;
overflow
:
hidden
;
text
-
overflow
:
ellipsis
;
width
:
70
%
;
}
.
goods
-
name
{
font
-
weight
:
500
;
...
...
pages/home/components/SettingBox.vue
View file @
685aeed
...
...
@@ -34,7 +34,10 @@
@
click=
"logout"
>
退出
</view>
</view>
<view
class=
"a"
@
click=
"jump('agreement')"
>
《用户隐私协议》
</view>
<view
class=
"a"
@
click=
"jump('agreement')"
>
《用户隐私协议》
</view>
<view
class=
"icp flex"
@
click=
"jump('icp')"
...
...
@@ -74,14 +77,33 @@ export default {
})
},
// 退出
logout
()
{
uni
.
$storage
.
rm
(
"userInfo"
);
uni
.
$storage
.
rm
(
"sessionId"
);
uni
.
$storage
.
rm
(
"noSignInUuid"
);
this
.
stopAudio
();
uni
.
reLaunch
({
url
:
"/pages/common/login"
,
});
async
logout
()
{
// this.stopAudio();
try
{
uni
.
showLoading
()
const
{
code
,
message
}
=
await
uni
.
$api
.
userApi
.
logout
()
console
.
log
(
code
)
if
(
code
==
0
)
{
uni
.
$storage
.
rm
(
"userInfo"
);
uni
.
$storage
.
rm
(
"sessionId"
);
uni
.
$storage
.
rm
(
"noSignInUuid"
);
setTimeout
(()
=>
{
uni
.
hideLoading
()
uni
.
reLaunch
({
url
:
"/pages/common/login"
,
});
},
500
)
}
else
throw
message
}
catch
(
error
)
{
console
.
log
(
error
)
uni
.
hideLoading
()
uni
.
showToast
({
title
:
error
,
icon
:
"none"
,
});
}
},
jump
(
type
)
{
let
url
=
type
==
'icp'
?
'https://beian.miit.gov.cn/'
:
'https://img01.glsx.com.cn/weapp/resource/saas/app/privacy.html'
...
...
pages/home/home.vue
View file @
685aeed
...
...
@@ -143,8 +143,6 @@
:id
.
sync=
"id"
:media=
"moduleList"
:type
.
sync=
"type"
:payInfo=
"payInfo"
:accountInfo=
"accountInfo"
@
back=
"back"
@
done=
"done"
ref=
"detail"
...
...
@@ -216,8 +214,6 @@ export default {
icon
:
'record'
}],
tabIndex
:
0
,
payInfo
:
null
,
accountInfo
:
null
,
dateKey
:
null
};
},
...
...
@@ -374,8 +370,22 @@ export default {
const
data
=
await
uni
.
$api
.
commonApi
.
findPayInfo
({
merchantId
:
shopMerchantId
,
});
this
.
payInfo
=
data
.
find
((
item
)
=>
item
.
paymentType
==
1
);
this
.
accountInfo
=
data
.
find
((
item
)
=>
item
.
paymentType
==
2
);
let
paymentType
=
[]
data
.
find
((
item
)
=>
{
if
(
item
.
paymentType
==
1
)
paymentType
.
push
({
name
:
"扫码支付"
,
type
:
1
,
title
:
'付款二维码'
,
...
item
})
if
(
item
.
paymentType
==
2
)
paymentType
.
push
(
{
name
:
"对公账户"
,
type
:
2
,
title
:
'付款方式'
,
...
item
})
})
this
.
$store
.
dispatch
(
"setPaymentType"
,
paymentType
)
},
changeIndex
(
index
)
{
this
.
tabIndex
=
index
...
...
store/modules/user.js
View file @
685aeed
...
...
@@ -21,6 +21,7 @@ export default {
historyStatus
:
Date
.
now
(),
carBrands
:
[],
employeeList
:
[],
paymentType
:
[]
};
},
mutations
:
{
...
...
@@ -54,6 +55,9 @@ export default {
clearHistory
({
state
})
{
state
.
historyStatus
=
Date
.
now
()
},
setPaymentType
({
state
},
value
)
{
state
.
paymentType
=
value
},
setCarBrandsList
({
state
},
value
)
{
state
.
carBrands
=
value
},
...
...
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