Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
J
jd-vx-app
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
jd-vx-app
Commits
9f000176
Commit
9f000176
authored
May 31, 2022
by
lijiongliang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
搜索页面修改
parent
a5d8f3f5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
6 deletions
+34
-6
search.vue
pagesC/pages/shop/search.vue
+34
-6
No files found.
pagesC/pages/shop/search.vue
View file @
9f000176
...
...
@@ -9,7 +9,7 @@
<u-search
placeholder=
"请输入商品"
:showAction=
'false'
bgColor=
'#ffffff'
v-model=
"keyword"
@
search=
"searchCommodity"
></u-search>
</div>
<div
class=
"list"
>
<div
class=
"list__item"
v-for=
"(vo,inx) in items"
:key=
"inx"
@
click=
"goDetail(vo.id)"
>
<div
class=
"list__item"
v-for=
"(vo,inx) in items"
:key=
"inx"
@
click=
"goDetail(vo.id
,vo.link
)"
>
<div
class=
"list__img"
>
<!--
<image
:src=
"vo.img"
/>
-->
<image
:src=
"vo.mainImgUrl"
style=
"width: 160rpx;height: 160rpx;border-radius:10rpx;"
></image>
...
...
@@ -51,7 +51,7 @@ export default {
let
searchCondition
=
{
searchVal
:
this
.
keyword
}
console
.
log
(
searchCondition
)
console
.
log
(
searchCondition
,
222222222
)
let
opts
=
{
url
:
'/app/index/mall/list'
,
method
:
'get'
};
this
.
http
.
httpRequest
(
opts
,
searchCondition
).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
){
...
...
@@ -59,10 +59,38 @@ export default {
}
})
},
goDetail
(
id
)
{
uni
.
navigateTo
({
url
:
'/pagesC/pages/shop/detail?id='
+
id
})
goDetail
(
id
,
link
)
{
let
token
=
uni
.
getStorageSync
(
'userToken'
);
if
(
!
token
){
let
returnPage
=
'/pages/main'
;
let
pageType
=
"reLaunch"
uni
.
navigateTo
({
url
:
"/pages/login/index/index?returnPage="
+
returnPage
+
'&pageType='
+
pageType
})
return
;
}
if
(
link
){
// uni.navigateTo({
// url: '/pages/webview/webview?url=' + link
// })
uni
.
navigateToMiniProgram
({
appId
:
'wx91d27dbf599dff74'
,
// 跳转目标小程序的id
path
:
''
,
// 目标小程序的页面路径
extraData
:
{
// 需要携带的参数
},
success
(
res
)
{
// 打开成功
}
})
return
}
uni
.
showToast
({
title
:
"该商品再无链接!"
,
icon
:
'none'
,
duration
:
1500
,
});
// uni.navigateTo({
// url: '/pagesC/pages/shop/detail?id=' + id
// })
},
},
}
...
...
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