Commit eceb8747 by LJM

Merge branch 'master' of http://git.ichunt.net/xiaokang/H5_2.0

parents c30010ca be0d1b37
...@@ -130,7 +130,7 @@ ...@@ -130,7 +130,7 @@
} }
} }
.adbox{ .adbox{
navigator{ a{
width:343rpx; width:343rpx;
height:120rpx; height:120rpx;
image{ image{
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
</navigator> </navigator>
<view class="newsbox"> <view class="newsbox">
<text class="icon iconfont icon-news"></text> <text class="icon iconfont icon-news"></text>
<text class="counts">11</text> <text class="counts">{{newscount}}</text>
</view> </view>
<view class="cdbox"> <view class="cdbox">
<text class="icon iconfont icon-candan"></text> <text class="icon iconfont icon-candan"></text>
...@@ -155,14 +155,12 @@ ...@@ -155,14 +155,12 @@
</view> </view>
</template> </template>
<script> <script>
import { import {Ichunt_Api,Api_Url} from '@/util/api.js';
Ichunt_Api,
Api_Url
} from '@/util/api.js';
import bottomNavFixed from '@/components/bottom_nav.vue'; import bottomNavFixed from '@/components/bottom_nav.vue';
export default { export default {
data() { data() {
return { return {
newscount:0,
kfurl:"", kfurl:"",
autoplay: true, autoplay: true,
scrollTop: 0, scrollTop: 0,
...@@ -209,7 +207,6 @@ ...@@ -209,7 +207,6 @@
getData() { getData() {
this.request(Ichunt_Api + "/api/index/index", 'GET', {}, ).then(res => { this.request(Ichunt_Api + "/api/index/index", 'GET', {}, ).then(res => {
if (res.err_code === 0) { if (res.err_code === 0) {
console.log(res.data)
this.obj = res.data; this.obj = res.data;
if(this.obj.h5_home_notice.length<=1){ if(this.obj.h5_home_notice.length<=1){
return return
...@@ -221,14 +218,13 @@ ...@@ -221,14 +218,13 @@
}); });
this.request(Ichunt_Api + "/api/common/data", 'GET', {}, ).then(res => { this.request(Ichunt_Api + "/api/common/data", 'GET', {}, ).then(res => {
if (res.err_code === 0) { if (res.err_code === 0) {
console.log(res.data)
this.pbobj = res.data; this.pbobj = res.data;
this.kfurl=this.pbobj.kfqq_xk.data this.kfurl=this.pbobj.kfqq_xk.data
} }
}); });
this.request(Api_Url + "/msg/allnum", 'POST', {}, ).then(res => { this.request(Api_Url + "/msg/allnum", 'POST', {}, ).then(res => {
if (res.err_code === 0) { if (res.err_code === 0) {
console.log(res.data) this.newscount=res.data
} }
}); });
} }
......
...@@ -26,27 +26,15 @@ ...@@ -26,27 +26,15 @@
<text class="icon iconfont icon-hot"></text> <text class="icon iconfont icon-hot"></text>
</view> </view>
<view class="cons"> <view class="cons">
<view class="hotitem row"> <view class="hotitem row" v-for="(item,index) in obj.h5_home_hot_search_goods" :key="index">
<text>1.</text> <text>{{index+1}}.</text>
<navigator url="#">asdasdasdasdasdasdas</navigator> <navigator :url="'/s?k='+item.title">{{item.title}}</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> </view>
</view> </view>
</view> </view>
<view class="adbox row bothSide"> <view class="adbox row bothSide">
<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>
<navigator url="#"><image src="https://img.ichunt.com/images/cms/202303/29/ad25b7e925dd7bc4260eded534d7f960.jpg"></image></navigator>
</view> </view>
</view> </view>
<view class="lxbox" v-show="searchVal"> <view class="lxbox" v-show="searchVal">
...@@ -67,12 +55,17 @@ ...@@ -67,12 +55,17 @@
</template> </template>
<script> <script>
import {Ichunt_Api,Api_Url,Api_Es} from '@/util/api.js';
export default { export default {
data() { data() {
return { return {
timeout:"",//请求延迟定时器 timeout:"",//请求延迟定时器
searchVal:"",//搜索值 searchVal:"",//搜索值
searchHistory:[] searchHistory:[],
obj:{
h5_home_hot_search_goods:[],
h5_home_activity_recommend:[]
}
} }
}, },
onLoad: function (option) { onLoad: function (option) {
...@@ -83,8 +76,16 @@ ...@@ -83,8 +76,16 @@
//获取历史记录 //获取历史记录
console.log(this.searchVal) console.log(this.searchVal)
this.getsearchHistory() this.getsearchHistory()
this.getData()
}, },
methods: { methods: {
getData(){
this.request(Ichunt_Api + "/api/common/data", 'GET', {}, ).then(res => {
if (res.err_code === 0) {
this.obj = res.data;
}
});
},
getsearchHistory(){ getsearchHistory(){
let listhis_=uni.getStorageSync('historyItems'); let listhis_=uni.getStorageSync('historyItems');
if(listhis_){ if(listhis_){
......
...@@ -2,19 +2,23 @@ ...@@ -2,19 +2,23 @@
let Ichunt_Api = ''; //3.0网站接口 let Ichunt_Api = ''; //3.0网站接口
let Api_Url = '';//api项目url let Api_Url = '';//api项目url
let Api_Es = '';//api项目url
switch (window.location.hostname) { switch (window.location.hostname) {
case "m.ichunt.com": case "m.ichunt.com":
Ichunt_Api = 'https://www.ichunt.com/v3'; Ichunt_Api = 'https://www.ichunt.com/v3';
Api_Url="https://api.ichunt.com" Api_Url="https://api.ichunt.com"
Api_Es="//so12.ichunt.com"
break; break;
default: default:
//本地proxy配置参考vue.config.js //本地proxy配置参考vue.config.js
Ichunt_Api = '/v3' Ichunt_Api = '/v3'
Api_Url= '/apis'; Api_Url= '/apis';
Api_Es="//so12.ichunt.com"
} }
module.exports = { module.exports = {
Ichunt_Api, Ichunt_Api,
Api_Url Api_Url,
Api_Es
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment