Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hls-xcmg-vue-app
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xugong
hls-xcmg-vue-app
Commits
b095695c
Commit
b095695c
authored
Oct 16, 2019
by
786817560
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
'查询接口调试'
parent
0d31dd96
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
299 additions
and
59 deletions
+299
-59
home-page.vue
src/pages/home/home-page.vue
+1
-1
product-detailed.vue
src/pages/productQuery/product-detailed.vue
+68
-15
product-list.vue
src/pages/productQuery/product-list.vue
+183
-0
query-home.vue
src/pages/productQuery/query-home.vue
+44
-42
index.js
src/router/index.js
+3
-1
No files found.
src/pages/home/home-page.vue
View file @
b095695c
...
...
@@ -2,7 +2,7 @@
* @Descrip: 主页
* @Author: your name
* @Date: 2019-10-10 14:25:15
* @LastEditTime: 2019-10-16 12:
35:28
* @LastEditTime: 2019-10-16 12:
42:19
* @LastEditors: Please set LastEditors
-->
<
template
>
...
...
src/pages/productQuery/product-detailed.vue
View file @
b095695c
...
...
@@ -2,7 +2,7 @@
* @Descrip: 产品明细
* @Author: your name
* @Date: 2019-10-15 14:30:00
* @LastEditTime: 2019-10-16 1
1:15:35
* @LastEditTime: 2019-10-16 1
7:03:14
* @LastEditors: Please set LastEditors
-->
<
template
>
...
...
@@ -18,49 +18,49 @@
<list-item
:item-height=
"44"
class=
"second-part"
>
<item>
<div
slot=
"name"
class=
"font-color"
>
经销商
</div>
<span
slot=
"content"
>
xxx经销商
</span>
<span
slot=
"content"
>
{{
baseInfo
.
agent_bp_name
}}
</span>
</item>
<item>
<div
slot=
"name"
class=
"font-color"
>
主机厂
</div>
<span
slot=
"content"
>
****主机厂
</span>
<span
slot=
"content"
>
{{
baseInfo
.
factory_bp_name
}}
</span>
</item>
</list-item>
<div
class=
"equipment-list"
>
经销商信息
</div>
<list-item
:item-height=
"44"
class=
"second-part"
>
<item>
<div
slot=
"name"
class=
"font-color"
>
经销商所在省份
</div>
<span
slot=
"content"
>
江苏徐州
</span>
<span
slot=
"content"
>
{{
baseInfo
.
registered_place
}}
</span>
</item>
<item>
<div
slot=
"name"
class=
"font-color"
>
经销商地址
</div>
<span
slot=
"content"
>
江苏省徐州市
</span>
<span
slot=
"content"
>
{{
baseInfo
.
business_address
}}
</span>
</item>
<item>
<div
slot=
"name"
class=
"font-color"
>
电话号码
</div>
<span
slot=
"content"
>
15768097665
</span>
<span
slot=
"content"
>
{{
baseInfo
.
phone
}}
</span>
</item>
</list-item>
<div
class=
"equipment-list"
>
产品信息
</div>
<list-item
:item-height=
"44"
class=
"second-part"
>
<item>
<div
slot=
"name"
class=
"font-color"
>
参数项
</div>
<span
slot=
"content"
>
GTZ226
</span>
<span
slot=
"content"
>
{{
baseInfo
.
product_code
}}
</span>
</item>
<item>
<div
slot=
"name"
class=
"font-color"
>
产品线
</div>
<span
slot=
"content"
>
塔式起重机
</span>
<span
slot=
"content"
>
{{
baseInfo
.
division_n
}}
</span>
</item>
<item>
<div
slot=
"name"
class=
"font-color"
>
产品名称
</div>
<span
slot=
"content"
>
GTZ389起重机
</span>
<span
slot=
"content"
>
{{
baseInfo
.
product_name
}}
</span>
</item>
<item>
<div
slot=
"name"
class=
"font-color"
>
产品参考价
</div>
<span
slot=
"content"
>
350,000.00
</span>
<span
slot=
"content"
>
{{
baseInfo
.
plan_price
}}
</span>
</item>
<item>
<div
slot=
"name"
class=
"font-color"
>
价格有效期
</div>
<span
slot=
"content"
>
2019-04-02
</span>
<span
slot=
"content"
>
{{
baseInfo
.
price_date_to
}}
</span>
</item>
</list-item>
</h-content>
...
...
@@ -68,11 +68,11 @@
<list-item
:item-height=
"44"
class=
"second-part"
>
<item>
<div
slot=
"name"
class=
"font-color"
>
经销商
</div>
<span
slot=
"content"
>
xxx经销商
</span>
<span
slot=
"content"
>
{{
detailInfo
.
agent_bp_name
}}
</span>
</item>
<item>
<div
slot=
"name"
class=
"font-color"
>
主机厂
</div>
<span
slot=
"content"
>
****主机厂
</span>
<span
slot=
"content"
>
{{
detailInfo
.
factory_bp_name
}}
</span>
</item>
</list-item>
</h-content>
...
...
@@ -80,11 +80,11 @@
<list-item
:item-height=
"44"
class=
"second-part"
>
<item>
<div
slot=
"name"
class=
"font-color"
>
经销商
</div>
<span
slot=
"content"
>
xxx经销商
</span>
<span
slot=
"content"
>
{{
confgInfo
.
agent_bp_name
}}
</span>
</item>
<item>
<div
slot=
"name"
class=
"font-color"
>
主机厂
</div>
<span
slot=
"content"
>
****主机厂
</span>
<span
slot=
"content"
>
{{
confgInfo
.
factory_bp_name
}}
</span>
</item>
</list-item>
</h-content>
...
...
@@ -109,6 +109,9 @@ export default {
data
()
{
return
{
tabNum
:
0
,
baseInfo
:
{},
detailInfo
:
{},
confgInfo
:
{},
bgc_flag
:
true
,
collect_flag
:
false
,
src
:
require
(
'@/assets/productQuery/collect.png'
),
...
...
@@ -116,6 +119,11 @@ export default {
},
computed
:
{},
watch
:
{},
created
()
{
this
.
baseMsg
()
this
.
detailMsg
()
this
.
confgMsg
()
},
methods
:
{
getTabNum
(
i
)
{
...
...
@@ -130,6 +138,51 @@ export default {
this
.
src
=
require
(
'@/assets/productQuery/coll-success.png'
)
},
1500
)
},
baseMsg
()
{
let
vm
=
this
let
url
=
$config
.
basePath
+
'prd_product_info'
let
param
=
{
product_id
:
vm
.
$route
.
params
.
product_id
,
}
vm
.
$post
(
url
,
param
).
then
(
function
(
res
)
{
console
.
log
(
'基本信息'
,
res
)
if
(
res
.
result
===
'S'
)
{
vm
.
baseInfo
=
res
.
info
}
else
{
hlsPopup
.
showLongCenter
(
res
.
message
)
}
})
},
detailMsg
()
{
let
vm
=
this
let
url
=
$config
.
basePath
+
'prd_product_detial'
let
param
=
{
product_id
:
vm
.
$route
.
params
.
product_id
,
}
vm
.
$post
(
url
,
param
).
then
(
function
(
res
)
{
console
.
log
(
'产品详情'
,
res
)
if
(
res
.
result
===
'S'
)
{
vm
.
detailInfo
=
res
.
info
}
else
{
hlsPopup
.
showLongCenter
(
res
.
message
)
}
})
},
confgMsg
()
{
let
vm
=
this
let
url
=
$config
.
basePath
+
'prd_product_conf'
let
param
=
{
product_id
:
vm
.
$route
.
params
.
product_id
,
}
vm
.
$post
(
url
,
param
).
then
(
function
(
res
)
{
console
.
log
(
'配置信息'
,
res
)
if
(
res
.
result
===
'S'
)
{
vm
.
confgInfo
=
res
.
info
}
else
{
hlsPopup
.
showLongCenter
(
res
.
message
)
}
})
},
},
}
</
script
>
...
...
src/pages/productQuery/product-list.vue
0 → 100644
View file @
b095695c
<!--
* @Description: 产品展示列表
* @Author: y/>e: 2019-10-16 14:39:07
* @LastEditors: Please set LastEditors
-->
<
template
>
<h-view
id=
"prolist"
class=
"public-style"
title=
"产品查询"
>
<h-header
:proportion=
"[5,1,1]"
class=
"bar-custom"
>
<div
slot=
"left"
class=
"h-header-btn"
>
<img
src=
"@/assets/userBind/arrow.png"
@
click=
"$routeGo()"
>
<span>
产品信息
</span>
</div>
</h-header>
<h-content>
<div
class=
"hinput"
>
<div
class=
"search-box"
>
<input
type=
"text"
placeholder=
"请输入经销商/产品名称/参数项"
>
<img
src=
"@/assets/distributorSign/search.png"
alt=
""
>
</div>
</div>
<list-item
v-for=
"item in lists"
:item-height=
"102"
:key=
"item.product_id"
>
<item>
<div
slot=
"name"
class=
"item-pic"
>
<img
src=
"@/assets/homePage/WechatIMG2 Copy@2x.png"
alt=
""
>
</div>
<div
slot=
"content"
class=
"item-content"
>
<div
class=
"center"
>
<span
class=
"firsts"
>
经销商
</span>
<span
class=
"seconds"
>
{{
item
.
bp_name
}}
</span></div>
<div
class=
"center"
>
<span
class=
"firsts"
>
参数项
</span>
<span
class=
"seconds"
>
{{
item
.
product_code
}}
</span></div>
<div
class=
"center"
>
<span
class=
"firsts"
>
产品名称
</span>
<span
class=
"seconds"
>
{{
item
.
product_name
}}
</span></div>
</div>
<div
slot=
"right-icon"
>
<img
class=
"arrow"
src=
"@/assets/productQuery/getIn.png"
alt=
""
@
click=
"goDetailed(item.product_id)"
>
</div>
</item>
</list-item>
</h-content>
</h-view>
</
template
>
<
script
>
export
default
{
name
:
'ProductList'
,
data
()
{
return
{
lists
:
[],
}
},
computed
:
{},
watch
:
{},
beforeRouteEnter
(
to
,
from
,
next
)
{
if
(
from
.
name
===
'QueryHome'
)
{
next
(
vm
=>
{
vm
.
proQuery
()
})
}
next
()
},
methods
:
{
proQuery
()
{
let
vm
=
this
let
url
=
$config
.
basePath
+
'prd_product_list'
let
param
=
{
division
:
vm
.
$route
.
params
.
division
,
}
vm
.
$post
(
url
,
param
).
then
(
function
(
res
)
{
console
.
log
(
res
)
if
(
res
.
result
===
'S'
)
{
vm
.
lists
=
res
.
lists
}
else
{
hlsPopup
.
showLongCenter
(
res
.
message
)
}
})
},
goDetailed
(
val
)
{
this
.
$router
.
push
({
name
:
'ProDetailed'
,
params
:
{
product_id
:
val
,
},
})
},
},
}
</
script
>
<
style
lang=
'less'
scoped
>
#prolist {
.h-header-btn {
img {
width: 16px;
height: 16px;
margin-left: 4px;
}
span {
font-family: PingFangSC-Semibold;
margin-left: 16px;
font-size: 17px;
letter-spacing: 0.61px;
line-height: 24px;
}
}
.hinput {
position: relative;
z-index: 50;
width: 100%;
height: 50px;
border-bottom: 1px solid #cccccc70;
display: flex;
justify-content: center;
align-items: center;
background: #fff;
.search-box {
width: 93.6%;
height: 36px;
font-size: 14px;
color: #B4B4B5;
letter-spacing: 0;
font-family: PingFangSC-Regular;
border: 1px solid rgba(56, 63, 69, 0.60);
border-radius: 4px;
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
input {
width: 90%;
height: 100%;
opacity: 0.4;
border: none;
line-height: 34px;
}
}
}
.arrow {
width: 16px;
height: 16px;
margin-left: 30px;
margin-top: 16px;
}
.item-pic {
width: 110px;
height: 110px;
img {
width: 100%;
height: 100%;
}
}
.item-content {
height: 102px;
// width: 100%;
.center:nth-of-type(1) {
margin-top: 16px;
}
.center:nth-of-type(2) {
margin-top: 10px;
}
.center:nth-of-type(3) {
margin-top: 10px;
}
.center {
// margin-top: 6px;
font-family: PingFangSC-Semibold;
font-size: 13px;
color: rgba(56,63,69,0.60);
letter-spacing: 0.5px;
.firsts {
display: inline-block;
width: 55px;
font-family: PingFangSC-Regular;
font-size: 13px;
color: rgba(56,63,69,0.60);
}
.seconds {
margin-left: 20px;
font-family: PingFangSC-Regular;
font-size: 13px;
color: #383F45;
}
}
}
}
</
style
>
src/pages/productQuery/query-home.vue
View file @
b095695c
...
...
@@ -2,7 +2,7 @@
* @Descrip: 查询首页
* @Author: your name
* @Date: 2019-10-15 14:30:00
* @LastEditTime: 2019-10-16
09:30:10
* @LastEditTime: 2019-10-16
15:55:05
* @LastEditors: Please set LastEditors
-->
<
template
>
...
...
@@ -20,46 +20,21 @@
<img
src=
"@/assets/distributorSign/search.png"
alt=
""
>
</div>
</div>
<div
class=
"box"
@
click=
"goDetailed"
>
<div
class=
"first"
>
<img
src=
"@/assets/productQuery/product-query.png"
alt=
""
>
<p
class=
"product-class"
>
产品类别
</p>
<p
class=
"product"
>
装载机械
</p>
</div>
<div
class=
"second"
>
<p
class=
"product-class"
>
产品线
</p>
<p
class=
"product"
>
轮式装载机
</p>
<img
src=
"@/assets/productQuery/pull.png"
alt=
""
>
</div>
<img
class=
"arrow"
src=
"@/assets/productQuery/getIn.png"
alt=
""
>
</div>
<div
v-for=
"item in prolists"
:key=
"item.factory_bp_id"
class=
"wrap"
>
<div
class=
"box
"
>
<div
class=
"box"
@
click=
"goLists(item.division)
"
>
<div
class=
"first"
>
<img
src=
"@/assets/productQuery/product-query.png"
alt=
""
>
<p
class=
"product-class"
>
产品类别
</p>
<p
class=
"product"
>
道路机械
</p>
<p
class=
"product"
>
{{
item
.
factory_bp_name
}}
</p>
</div>
<div
class=
"second"
>
<p
class=
"product-class"
>
产品线
</p>
<p
class=
"product"
>
压路机
</p>
<p
class=
"product"
>
{{
item
.
division_n
}}
</p>
<img
src=
"@/assets/productQuery/pull.png"
alt=
""
>
</div>
<img
class=
"arrow"
src=
"@/assets/productQuery/getIn.png"
alt=
""
>
</div>
<div
class=
"box"
>
<div
class=
"first"
>
<img
src=
"@/assets/productQuery/product-query.png"
alt=
""
>
<p
class=
"product-class"
>
产品类别
</p>
<p
class=
"product"
>
起重机械
</p>
</div>
<div
class=
"second"
>
<p
class=
"product-class"
>
产品线
</p>
<p
class=
"product"
>
塔式起重机
</p>
<img
src=
"@/assets/productQuery/pull.png"
alt=
""
>
</div>
<img
class=
"arrow"
src=
"@/assets/productQuery/getIn.png"
alt=
""
>
</div>
</h-content>
</h-view>
...
...
@@ -70,16 +45,43 @@ export default {
name
:
'QueryHome'
,
data
()
{
return
{
prolists
:
[],
}
},
computed
:
{},
watch
:
{},
beforeRouteEnter
(
to
,
from
,
next
)
{
// console.log('........from', from)
// console.log('........to', to)
// console.log('........next', next)
if
(
from
.
name
===
'HomePage'
)
{
next
(
vm
=>
{
vm
.
proQuery
()
})
}
next
()
},
methods
:
{
goDetailed
()
{
proQuery
()
{
let
vm
=
this
let
url
=
$config
.
basePath
+
'prd_product_type_list'
let
param
=
{
}
vm
.
$post
(
url
,
param
).
then
(
function
(
res
)
{
console
.
log
(
res
)
if
(
res
.
result
===
'S'
)
{
vm
.
prolists
=
res
.
lists
}
else
{
hlsPopup
.
showLongCenter
(
res
.
message
)
}
})
},
goLists
(
val
)
{
this
.
$router
.
push
({
name
:
'ProDetailed'
,
name
:
'ProductList'
,
params
:
{
division
:
val
,
},
})
},
},
...
...
src/router/index.js
View file @
b095695c
...
...
@@ -2,7 +2,7 @@
* @Description: In User Settings Edit
* @Author: your name
* @Date: 2019-09-24 12:34:06
* @LastEditTime: 2019-10-16 1
0:09:23
* @LastEditTime: 2019-10-16 1
7:24:51
* @LastEditors: Please set LastEditors
*/
import
Vue
from
'vue'
...
...
@@ -61,6 +61,7 @@ import MarginPayEntry from '../pages/pay/marginPay/pay-entry'
// 产品查询
import
QueryHome
from
'@/pages/productQuery/query-home'
import
ProDetailed
from
'@/pages/productQuery/product-detailed'
import
ProductList
from
'@/pages/productQuery/product-list'
Vue
.
use
(
Router
)
export
default
new
Router
({
...
...
@@ -170,6 +171,7 @@ export default new Router({
// 产品查询
{
path
:
'/query-home'
,
component
:
QueryHome
,
name
:
'QueryHome'
,
meta
:
{
keepAlive
:
true
}},
{
path
:
'/product-detailed'
,
component
:
ProDetailed
,
name
:
'ProDetailed'
,
meta
:
{
keepAlive
:
false
}},
{
path
:
'/product-list'
,
component
:
ProductList
,
name
:
'ProductList'
,
meta
:
{
keepAlive
:
true
}},
],
scrollBehavior
(
to
,
from
,
savedPosition
)
{
if
(
to
.
hash
)
{
...
...
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