更新首页接口

main
JING 9 months ago
parent 3ac7ee1737
commit 97c3cb6532
  1. 76
      pages/index/index.vue
  2. 13
      pages/user/account/index.vue

@ -4,7 +4,7 @@
<view class="bannerBox">
<u-swiper
:list="banner"
keyName="adImg"
keyName="image"
:showTitle="false"
:autoplay="true"
circular
@ -187,11 +187,12 @@
data() {
return {
banner: [
{
adImg:'/static/img/index/banner.png',
}
// {
// adImg:'/static/img/index/banner.png',
// }
],
notice:'',
sceneList:[], //
hotList:[],//
}
},
computed:{
@ -199,8 +200,12 @@
},
onLoad() {
var _this = this;
//
_this.getHomeInfo();
//banner
_this.getBannerList();
//
_this.getSceneMenu();
//
_this.getHotList();
//1
setTimeout(function(res){
_this.getUploadConfig();
@ -227,31 +232,58 @@
url: url,
});
},
//
getHomeInfo(){
//banner
getBannerList(){
var _this =this;
//post
/* _this.$api.post('ycl/home', {},function(res){
console.log(res);
var d = res;
var banner = d.adList
banner.forEach((item, index) => {
item.title = item.adName;
})
_this.banner = banner;
_this.notice = d.notice;
_this.$user.session('servicePhone',d.servicePhone);
}); */
_this.$api.get('api/home/banner/list', {},function(res){
console.log('banner原始',res);
var banner = res;
banner.forEach((item, index) => {
banner[index].image = _this.$api.ossurl(item.image);
});
console.log('banner修正',banner);
_this.banner = banner;
});
},
//
getUploadConfig(){
var _this = this;
var post = {};
_this.$api.get('/api/fileDeploy', post,function(res){
_this.$api.get('api/fileDeploy', post,function(res){
console.log(res);
_this.$user.session('app_config',res);
});
},
//
getSceneMenu(){
var _this =this;
_this.$api.get('api/photo/scene_list', {},function(res){
console.log('场景原始',res);
var sceneList = res;
sceneList.forEach((item, index) => {
sceneList[index].image = _this.$api.ossurl(item.image);
});
console.log('场景修正',sceneList);
_this.sceneList = sceneList;
});
},
//
getHotList(){
var _this =this;
_this.$api.get('api/photo/hot_list', {},function(res){
console.log('热门原始',res);
var hotList = res;
hotList.forEach((item, index) => {
hotList[index].image = _this.$api.ossurl(item.image);
});
console.log('热门修正',hotList);
_this.hotList = hotList;
});
},
//

@ -51,7 +51,6 @@
maxlength="10"
v-model="info.nick_name"
@focus="showEdit"
@change="nameChange"
></u--input>
</view>
<view class='i_box_5'>
@ -131,12 +130,17 @@
修改昵称
</view>
<view class="popupDesc1">
<u--input
placeholder="请输入昵称"
color="#999999"
maxlength="10"
v-model="info.nick_name"
></u--input>
</view>
<view class="popupBtn">
<view class="sbtnBox1 a1" @click="close1">取消</view>
<view class="sbtnBox1 a2" @click="yes">确认</view>
<view class="sbtnBox1 a2" @click="nameChange">确认</view>
</view>
</view>
</u-popup>
@ -239,6 +243,7 @@
{
console.log(e);
this.updateUserInfo();
this.name_show = false;
},
//
updateUserInfo()
@ -329,7 +334,7 @@ border-radius: 15rpx; margin: 0rpx auto; color:#3D3D3D;}
/*特殊的 改变部分*/
.i_box_3x{height: 100rpx;min-width: 65.7%; width: auto;font-size: 26rpx;}
::v-deep .u-input{ border:none !important; color:#3D3D3D !important; margin-top: 20rpx;}
::v-deep .i_box_3x .u-input{ border:none !important; color:#3D3D3D !important; margin-top: 20rpx;}
.up{ width: 100%; height: auto; display: flex; margin-top: 20rpx;}
.up .img{width:80%; overflow: hidden; }
.up .img .u-upload{ margin-left: 80rpx;}

Loading…
Cancel
Save