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 1e65f58b
authored
Apr 08, 2024
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
添加:首页接口和付款弹窗
1 parent
ef82a71b
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
179 additions
and
51 deletions
api/module/common.js
env.js
pages.json
pages/detail/detail.vue
pages/home/home.vue
store/modules/user.js
api/module/common.js
View file @
1e65f58
...
@@ -8,10 +8,21 @@ module.exports = {
...
@@ -8,10 +8,21 @@ module.exports = {
...
data
,
...
data
,
});
});
},
},
findSoureList
(
data
)
{
// 查询接待素材
findSoureList
()
{
return
http
.
post
({
return
http
.
post
({
method
:
'dj.api.smartcarlife.recepiton.soure.findSoureList'
,
method
:
'dj.api.smartcarlife.recepiton.soure.findSoureList'
,
...
data
,
sessionId
:
"b5e0a471-a2cd-4020-a522-72bcd68d6da7"
,
projectName
:
"boutique"
,
})
},
// 查询门店支付配置
findPayInfo
(
data
)
{
return
http
.
post
({
method
:
'dj.api.smartcarlife.recepiton.pay.findPayInfoConfigListByMerchantId'
,
sessionId
:
"b5e0a471-a2cd-4020-a522-72bcd68d6da7"
,
projectName
:
"boutique"
,
...
data
})
})
},
},
getToken
(
data
)
{
getToken
(
data
)
{
...
...
env.js
View file @
1e65f58
const
target
=
[
"ip"
,
"dev"
,
"uat"
,
"prod"
,
"preRelease"
];
const
target
=
[
"ip"
,
"dev"
,
"uat"
,
"prod"
,
"preRelease"
];
const
index
=
2
;
const
index
=
1
;
/**
/**
*
*
0本地
0本地
...
...
pages.json
View file @
1e65f58
...
@@ -6,8 +6,7 @@
...
@@ -6,8 +6,7 @@
{
{
"path"
:
"pages/home/home"
,
"path"
:
"pages/home/home"
,
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
""
,
"navigationStyle"
:
"custom"
"enablePullDownRefresh"
:
false
}
}
},
},
{
{
...
...
pages/detail/detail.vue
View file @
1e65f58
...
@@ -3,41 +3,179 @@
...
@@ -3,41 +3,179 @@
* @Author: huyue
* @Author: huyue
* @Date: 2024-04-08 11:30:30
* @Date: 2024-04-08 11:30:30
* @LastEditors: huyue
* @LastEditors: huyue
* @LastEditTime: 2024-04-08 1
3:44:5
0
* @LastEditTime: 2024-04-08 1
6:23:3
0
-->
-->
<
template
>
<
template
>
<view>
<view>
详情页
详情页
<button
@
click=
"open"
>
打开弹窗
</button>
<button
@
click=
"open"
>
打开弹窗
</button>
<uni-popup
ref=
"popup"
type=
"bottom"
background-color=
"#fff"
border-radius=
"10px 10px 0 0"
<uni-popup
ref=
"popup"
type=
"bottom"
border-radius=
"16px 16px 0 0"
>
<view
class=
"popup-wrapper"
>
<view
class=
"popup-box"
>
<view
class=
"payment-title"
>
付款二维码
</view>
<view
class=
"popup-content"
>
<view
class=
"tab-list"
>
<view
:class=
"['tab-item',
{ active: payActive === item.type }]"
v-for="item in paymentType"
:key="item.type"
@click="handleSwitchTab(item)"
>
{{
item
.
name
}}
</view
>
>
<view>
<!--
<view
class=
"tab-item qr-code active"
>
扫码支付
</view>
<view
class=
""
>
付款二维码
</view>
<view
class=
"tab-item corporate"
>
对公账户
</view>
-->
</view>
<view
class=
"payment-content"
>
<view
v-show=
"payActive === 1"
class=
"qr-code-content"
>
<!--
<image
:src=
"payInfo.storePaymentQrcodeUrl"
mode=
"aspectFit"
/>
-->
<image
class=
"qr-code-img"
src=
"https://glsk-oss.oss-cn-shenzhen.aliyuncs.com/quality/11.png"
mode=
"scaleToFill"
/>
<view
class=
"qr-code-info"
>
扫码付款,支持多渠道付款
</view>
</view>
<view
v-show=
"payActive === 2"
>
DDDD
</view>
</view>
</view>
<view
class=
"payment-done"
>
已完成支付,去付款凭证
</view>
</view>
</view>
</
uni-popup
</
view>
>
</uni-popup
>
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
const
PAYMENT_TYPE
=
[
{
name
:
"扫码支付"
,
type
:
1
,
},
{
name
:
"对公账户"
,
type
:
2
,
},
];
export
default
{
export
default
{
data
()
{
data
()
{
return
{};
return
{
payInfo
:
{},
payActive
:
1
,
paymentType
:
PAYMENT_TYPE
,
};
},
},
onLoad
(
options
)
{
onLoad
(
options
)
{
console
.
log
(
options
,
"=="
);
console
.
log
(
uni
.
getDeviceInfo
()
,
"=="
);
// const text = options.text
// const text = options.text
// uni.setNavigationBarTitle({
// uni.setNavigationBarTitle({
// title: text
// title: text
// });
// });
},
},
methods
:
{
methods
:
{
// 切换tab
handleSwitchTab
(
item
)
{
this
.
payActive
=
item
.
type
;
},
// 查询门店支付配置
async
findPayInfo
()
{
this
.
payInfo
=
(
await
uni
.
$api
.
commonApi
.
findPayInfo
({
merchantId
:
44209880
,
})
).
find
((
item
)
=>
item
.
paymentType
==
1
);
},
open
()
{
open
()
{
// 通过组件定义的ref调用uni-popup方法 ,如果传入参数 ,type 属性将失效 ,仅支持 ['top','left','bottom','right','center']
// 通过组件定义的ref调用uni-popup方法 ,如果传入参数 ,type 属性将失效 ,仅支持 ['top','left','bottom','right','center']
this
.
$refs
.
popup
.
open
(
"top"
);
this
.
$refs
.
popup
.
open
(
"top"
);
this
.
findPayInfo
();
},
},
},
},
};
};
</
script
>
</
script
>
<
style
scoped
lang=
"scss"
>
<
style
scoped
lang=
"scss"
>
//
.popup-wrapper
{
//
position
:
relative
;
//
height
:
100vh
;
//
}
.popup-box
{
//
position
:
absolute
;
//
bottom
:
0
;
//
width
:
100%
;
//
display
:
flex
;
//
flex-direction
:
column
;
margin-top
:
286
rpx
;
background-color
:
#f8f9f9
;
min-height
:
1154
rpx
;
padding-bottom
:
30
rpx
;
.payment-title
{
width
:
100%
;
height
:
96
rpx
;
padding
:
24
rpx
0
26
rpx
;
text-align
:
center
;
border-bottom
:
1px
solid
#e8e8e8
;
}
}
.popup-content
{
.tab-list
{
display
:
flex
;
justify-content
:
center
;
margin-top
:
40
rpx
;
.tab-item
{
width
:
320
rpx
;
padding
:
24
rpx
0
28
rpx
;
text-align
:
center
;
background-color
:
#fff
;
color
:
#666
;
&.active
{
background-color
:
#2c66f7
;
color
:
#fff
;
}
&
:first-child
{
border-radius
:
200
rpx
0
0
200
rpx
;
}
&
:last-child
{
border-radius
:
0
48
rpx
48
rpx
0
;
}
}
}
.payment-content
{
width
:
100%
;
display
:
flex
;
justify-content
:
center
;
margin-top
:
40
rpx
;
.qr-code-content
{
width
:
538
rpx
;
background-color
:
#fff
;
border-radius
:
24
rpx
;
text-align
:
center
;
padding
:
59
rpx
0
67
rpx
;
.qr-code-img
{
width
:
420
rpx
;
height
:
420
rpx
;
}
.qr-code-info
{
margin-top
:
40
rpx
;
font-weight
:
500
;
font-size
:
32
rpx
;
color
:
#1a1a1a
;
}
}
}
}
.payment-done
{
width
:
calc
(
100%
-
240
rpx
);
height
:
80
rpx
;
font-weight
:
500
;
font-size
:
32
rpx
;
color
:
#ffffff
;
text-align
:
center
;
line-height
:
80
rpx
;
//
padding
:
18
rpx
0
;
margin
:
112
rpx
120
rpx
30
rpx
;
//
margin-top
:
auto
;
background-color
:
#2c66f7
;
border-radius
:
40
rpx
;
}
</
style
>
</
style
>
pages/home/home.vue
View file @
1e65f58
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
* @Author: huyue
* @Author: huyue
* @Date: 2024-04-07 14:39:40
* @Date: 2024-04-07 14:39:40
* @LastEditors: huyue
* @LastEditors: huyue
* @LastEditTime: 2024-04-08 1
1:44:51
* @LastEditTime: 2024-04-08 1
4:51:14
-->
-->
<
template
>
<
template
>
<view
class=
"container"
>
<view
class=
"container"
>
...
@@ -45,10 +45,10 @@
...
@@ -45,10 +45,10 @@
<view
class=
"module-item"
v-for=
"item in moduleList"
:key=
"item.id"
@
click=
"toDetail(item)"
>
<view
class=
"module-item"
v-for=
"item in moduleList"
:key=
"item.id"
@
click=
"toDetail(item)"
>
<image
<image
class=
"module-img"
class=
"module-img"
:src=
"item.
picUr
l"
:src=
"item.
thumbnai
l"
mode=
"scaleToFill"
mode=
"scaleToFill"
/>
/>
<view
class=
"module-name"
>
{{
item
.
nam
e
}}
</view>
<view
class=
"module-name"
>
{{
item
.
titl
e
}}
</view>
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -58,38 +58,7 @@
...
@@ -58,38 +58,7 @@
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
moduleList
:
[
moduleList
:
[]
{
id
:
1
,
name
:
'问界交车告知书'
,
picUrl
:
'../../static/logo.png'
},
{
id
:
2
,
name
:
'商城延保价格明细'
,
picUrl
:
'../../static/logo.png'
},
{
id
:
3
,
name
:
'保修升级告知书'
,
picUrl
:
'../../static/logo.png'
},
{
id
:
4
,
name
:
'问界三包政策'
,
picUrl
:
'../../static/logo.png'
},
{
id
:
5
,
name
:
'整车质保升级政策'
,
picUrl
:
'../../static/logo.png'
},
{
id
:
6
,
name
:
'历史成交客户'
,
picUrl
:
'../../static/logo.png'
}
]
};
};
},
},
onLoad
(
options
)
{
onLoad
(
options
)
{
...
@@ -97,8 +66,12 @@ export default {
...
@@ -97,8 +66,12 @@ export default {
uni
.
setNavigationBarTitle
({
uni
.
setNavigationBarTitle
({
title
:
text
,
title
:
text
,
});
});
this
.
getSoure
()
},
},
methods
:
{
methods
:
{
async
getSoure
()
{
this
.
moduleList
=
await
uni
.
$api
.
commonApi
.
findSoureList
()
},
toDetail
(
item
)
{
toDetail
(
item
)
{
// this.$Router.push({name:'detail'})
// this.$Router.push({name:'detail'})
uni
.
navigateTo
({
uni
.
navigateTo
({
...
...
store/modules/user.js
View file @
1e65f58
import
{
setToken
,
getToken
,
removeToken
}
from
'@/utils/token'
;;
/*
* @Description:
* @Author: huyue
* @Date: 2024-04-07 18:15:11
* @LastEditors: huyue
* @LastEditTime: 2024-04-08 14:11:38
*/
// import { setToken, getToken, removeToken } from '@/utils/token';;
export
default
{
export
default
{
namespaced
:
true
,
namespaced
:
true
,
state
()
{
state
()
{
return
{
return
{
userData
:
{},
userData
:
{},
token
:
getToken
(),
//
token: getToken(),
};
};
},
},
mutations
:
{
mutations
:
{
...
...
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