Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
肖康
/
H5_2.0
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
be0d1b37
authored
May 18, 2023
by
肖康
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
搜索域名修改
parent
5964ee37
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
28 deletions
assets/css/search/search.scss
pages/index/index.vue
pages/search/search.vue
util/api.js
assets/css/search/search.scss
View file @
be0d1b37
...
...
@@ -130,7 +130,7 @@
}
}
.adbox
{
navigator
{
a
{
width
:
343rpx
;
height
:
120rpx
;
image
{
...
...
pages/index/index.vue
View file @
be0d1b37
...
...
@@ -11,7 +11,7 @@
</navigator>
<view
class=
"newsbox"
>
<text
class=
"icon iconfont icon-news"
></text>
<text
class=
"counts"
>
11
</text>
<text
class=
"counts"
>
{{
newscount
}}
</text>
</view>
<view
class=
"cdbox"
>
<text
class=
"icon iconfont icon-candan"
></text>
...
...
@@ -155,14 +155,12 @@
</view>
</
template
>
<
script
>
import
{
Ichunt_Api
,
Api_Url
}
from
'@/util/api.js'
;
import
{
Ichunt_Api
,
Api_Url
}
from
'@/util/api.js'
;
import
bottomNavFixed
from
'@/components/bottom_nav.vue'
;
export
default
{
data
()
{
return
{
newscount
:
0
,
kfurl
:
""
,
autoplay
:
true
,
scrollTop
:
0
,
...
...
@@ -209,7 +207,6 @@
getData
()
{
this
.
request
(
Ichunt_Api
+
"/api/index/index"
,
'GET'
,
{},
).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
console
.
log
(
res
.
data
)
this
.
obj
=
res
.
data
;
if
(
this
.
obj
.
h5_home_notice
.
length
<=
1
){
return
...
...
@@ -221,14 +218,13 @@
});
this
.
request
(
Ichunt_Api
+
"/api/common/data"
,
'GET'
,
{},
).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
console
.
log
(
res
.
data
)
this
.
pbobj
=
res
.
data
;
this
.
kfurl
=
this
.
pbobj
.
kfqq_xk
.
data
}
});
this
.
request
(
Api_Url
+
"/msg/allnum"
,
'POST'
,
{},
).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
console
.
log
(
res
.
data
)
this
.
newscount
=
res
.
data
}
});
}
...
...
pages/search/search.vue
View file @
be0d1b37
...
...
@@ -26,27 +26,15 @@
<text
class=
"icon iconfont icon-hot"
></text>
</view>
<view
class=
"cons"
>
<view
class=
"hotitem row"
>
<text>
1.
</text>
<navigator
url=
"#"
>
asdasdasdasdasdasdas
</navigator>
</view>
<view
class=
"hotitem row"
>
<text>
2.
</text>
<navigator
url=
"#"
>
asdasdasdasdasdasdas
</navigator>
</view>
<view
class=
"hotitem row"
>
<text>
3.
</text>
<navigator
url=
"#"
>
asdasdasdasdasdasdas
</navigator>
</view>
<view
class=
"hotitem row"
>
<text>
4.
</text>
<navigator
url=
"#"
>
asdasdasdasdasdasdas
</navigator>
<view
class=
"hotitem row"
v-for=
"(item,index) in obj.h5_home_hot_search_goods"
:key=
"index"
>
<text>
{{
index
+
1
}}
.
</text>
<navigator
:url=
"'/s?k='+item.title"
>
{{
item
.
title
}}
</navigator>
</view>
</view>
</view>
<view
class=
"adbox row bothSide"
>
<
navigator
url=
"#"
><image
src=
"https://img.ichunt.com/images/cms/202303/29/ad25b7e925dd7bc4260eded534d7f960.jpg"
></image></navigator
>
<navigator
url=
"#"
><image
src=
"https://img.ichunt.com/images/cms/202303/29/ad25b7e925dd7bc4260eded534d7f960.jpg"
></image></navigator>
<
a
:href=
"item.url"
v-for=
"(item,index) in obj.h5_home_activity_recommend"
:key=
"index"
><image
:src=
"item.images"
></image></a
>
</view>
</view>
<view
class=
"lxbox"
v-show=
"searchVal"
>
...
...
@@ -67,12 +55,17 @@
</
template
>
<
script
>
import
{
Ichunt_Api
,
Api_Url
,
Api_Es
}
from
'@/util/api.js'
;
export
default
{
data
()
{
return
{
timeout
:
""
,
//请求延迟定时器
searchVal
:
""
,
//搜索值
searchHistory
:[]
searchHistory
:[],
obj
:{
h5_home_hot_search_goods
:[],
h5_home_activity_recommend
:[]
}
}
},
onLoad
:
function
(
option
)
{
...
...
@@ -83,8 +76,16 @@
//获取历史记录
console
.
log
(
this
.
searchVal
)
this
.
getsearchHistory
()
this
.
getData
()
},
methods
:
{
getData
(){
this
.
request
(
Ichunt_Api
+
"/api/common/data"
,
'GET'
,
{},
).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
this
.
obj
=
res
.
data
;
}
});
},
getsearchHistory
(){
let
listhis_
=
uni
.
getStorageSync
(
'historyItems'
);
if
(
listhis_
){
...
...
util/api.js
View file @
be0d1b37
...
...
@@ -2,19 +2,23 @@
let
Ichunt_Api
=
''
;
//3.0网站接口
let
Api_Url
=
''
;
//api项目url
let
Api_Es
=
''
;
//api项目url
switch
(
window
.
location
.
hostname
)
{
case
"m.ichunt.com"
:
Ichunt_Api
=
'https://www.ichunt.com/v3'
;
Api_Url
=
"https://api.ichunt.com"
Api_Es
=
"//so12.ichunt.com"
break
;
default
:
//本地proxy配置参考vue.config.js
Ichunt_Api
=
'/v3'
Api_Url
=
'/apis'
;
Api_Es
=
"//so12.ichunt.com"
}
module
.
exports
=
{
Ichunt_Api
,
Api_Url
Api_Url
,
Api_Es
}
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