Commit eceb8747 by LJM

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

parents c30010ca be0d1b37
......@@ -130,7 +130,7 @@
}
}
.adbox{
navigator{
a{
width:343rpx;
height:120rpx;
image{
......
......@@ -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
}
});
}
......
......@@ -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_){
......
......@@ -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
}
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