|
@@ -8,7 +8,7 @@
|
|
|
<!-- 天气 -->
|
|
|
<scroll-view class="scroll-view_H" scroll-x="true">
|
|
|
<view class="scroll-view-item_H" v-if="alltouList.length !=0">
|
|
|
- <image v-if="alltouList.length>0" class="chuanda" :src="alltouList[0].image"></image>
|
|
|
+ <image v-if="alltouList[0].data !=0" class="chuanda" :src="alltouList[0].data.makeAppointmentCollocation.image"></image>
|
|
|
<view v-else class="chuanda">
|
|
|
<view class="text-white text-size-lg">{{tianqiList.city}}市</view>
|
|
|
<view class="text-size-lg mt-15 text-weight-b" style="color: #FFCC00;">{{tianqiList.temp}}°C</view>
|
|
@@ -20,10 +20,10 @@
|
|
|
<text class="text-size-s ml-15">{{tianqiList.templow}}°c~{{tianqiList.temphigh}}°c</text>
|
|
|
<text class="text-size-s ml-15">{{tianqiList.week}}</text>
|
|
|
</view>
|
|
|
- <view class="bianji" @click="bianji(1)">{{alltouList[0].image?'更换穿搭':'添加穿搭'}}</view>
|
|
|
+ <view class="bianji" @click="bianji(1,alltouList[0].data)">{{alltouList[0].data !=0?'更换穿搭':'添加穿搭'}}</view>
|
|
|
</view>
|
|
|
<view class="scroll-view-item_H" v-if="alltouList.length !=0">
|
|
|
- <image v-if="alltouList.length>1" class="chuanda" :src="alltouList[0].image"></image>
|
|
|
+ <image v-if="alltouList[1].data !=0" class="chuanda" :src="alltouList[1].data.makeAppointmentCollocation.image"></image>
|
|
|
<view v-else class="chuanda">
|
|
|
<view class="text-white text-size-lg">{{tianqiList.city}}市</view>
|
|
|
<view class="text-size-lg mt-15 text-weight-b" style="color: #FFCC00;">{{tianqiList.daily[1].day.temphigh}}°C</view>
|
|
@@ -35,7 +35,7 @@
|
|
|
<text class="text-size-s ml-15">最高温度{{tianqiList.daily[1].day.temphigh}}°C</text>
|
|
|
<text class="text-size-s ml-15">{{tianqiList.daily[1].week}}</text>
|
|
|
</view>
|
|
|
- <view class="bianji" @click="bianji(2)">{{alltouList[1].image?'更换穿搭':'添加穿搭'}}</view>
|
|
|
+ <view class="bianji" @click="bianji(2,alltouList[1].data)">{{alltouList[1].data !=0?'更换穿搭':'添加穿搭'}}</view>
|
|
|
</view>
|
|
|
<!-- <view class="scroll-view-item_H">
|
|
|
|
|
@@ -57,7 +57,7 @@
|
|
|
</view> -->
|
|
|
</scroll-view>
|
|
|
<div class="zhuti">
|
|
|
- <!-- 衣橱 -->
|
|
|
+ <!-- 衣橱 1-->
|
|
|
<tm-sheet class="yichu" style="margin-bottom: 40px !important;">
|
|
|
<tm-tabs @change="fenlei" class="C1b1b1b qiehuan" color="white" align="left" v-model="activeIndex1" :list="listfl" range-key="title"></tm-tabs>
|
|
|
<view class="yiguicla black pa-6 ma-4 fl" v-for="(item,index) in quanbuList" @click="zidingyibianji(item)">
|
|
@@ -90,7 +90,10 @@ export default {
|
|
|
listfl:[],
|
|
|
listflall:[],
|
|
|
alltouList:[],
|
|
|
- tianqiList:[]
|
|
|
+ tianqiList:[],
|
|
|
+ page:1,
|
|
|
+ pageSize:3
|
|
|
+
|
|
|
};
|
|
|
},
|
|
|
onLoad(e) {
|
|
@@ -104,6 +107,8 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
shuaxin(){
|
|
|
+ this.activeIndex1=0;
|
|
|
+ this.page=1;
|
|
|
this.getFl();
|
|
|
this.touFun();
|
|
|
},
|
|
@@ -113,6 +118,7 @@ export default {
|
|
|
},
|
|
|
touFun(){
|
|
|
var that=this;
|
|
|
+ // 11
|
|
|
myRequest({
|
|
|
url: "/api/Collocation/selectStyle",
|
|
|
method:'post',
|
|
@@ -120,36 +126,36 @@ export default {
|
|
|
}).then(res => {
|
|
|
if (res.data.code == 200) {
|
|
|
var dataList=res.data.data;
|
|
|
- console.log(dataList.length)
|
|
|
if(dataList.length==0){
|
|
|
- that.alltouList[0]={data:[]}
|
|
|
- that.alltouList[1]={data:[]}
|
|
|
+ that.alltouList[0]={data:0}
|
|
|
+ that.alltouList[1]={data:0}
|
|
|
}else if(dataList.length==1){
|
|
|
for(let i=0;i<dataList.length;i++){
|
|
|
if(dataList[i].type==1){
|
|
|
- that.alltouList[0]=dataList[i].makeAppointmentCollocation
|
|
|
+ that.alltouList[0]={data:dataList[i]}
|
|
|
}else{
|
|
|
- that.alltouList[0]={data:[]}
|
|
|
+ that.alltouList[0]={data:0}
|
|
|
}
|
|
|
if(dataList[i].type==2){
|
|
|
- that.alltouList[1]=dataList[i].makeAppointmentCollocation
|
|
|
+ that.alltouList[1]={data:dataList[i]}
|
|
|
}else{
|
|
|
- that.alltouList[1]={data:[]}
|
|
|
+ that.alltouList[1]={data:0}
|
|
|
}
|
|
|
}
|
|
|
}else{
|
|
|
for(let i=0;i<dataList.length;i++){
|
|
|
if(dataList[i].type==1){
|
|
|
- that.alltouList[0]=dataList[i].makeAppointmentCollocation
|
|
|
+ that.alltouList[0]={data:dataList[i]}
|
|
|
}
|
|
|
if(dataList[i].type==2){
|
|
|
- that.alltouList[1]=dataList[i].makeAppointmentCollocation
|
|
|
+ that.alltouList[1]={data:dataList[i]}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
console.log(that.alltouList)
|
|
|
}else{
|
|
|
- that.listtoubu=[];
|
|
|
+ that.alltouList[0]={data:0}
|
|
|
+ that.alltouList[1]={data:0}
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -180,10 +186,9 @@ export default {
|
|
|
myRequest({
|
|
|
url: "/api/Collocation/getCollocationList",
|
|
|
method:'post',
|
|
|
- data:{category_id:id}
|
|
|
+ data:{category_id:id,page:that.page,pageSize:that.pageSize}
|
|
|
}).then(res => {
|
|
|
if (res.data.code == 200) {
|
|
|
-
|
|
|
if(res.data.data.length != 0){
|
|
|
that.quanbuList=res.data.data.data;
|
|
|
}else{
|
|
@@ -211,17 +216,16 @@ export default {
|
|
|
// }
|
|
|
// });
|
|
|
uni.request({
|
|
|
- url: "https://jisuqgtq.market.alicloudapi.com/weather/query",
|
|
|
+ url: "https://jisutqybmf.market.alicloudapi.com/weather/query",
|
|
|
method: "get",
|
|
|
header: {
|
|
|
- 'Authorization':'APPCODE e4b9accfb1f246cb8c0766a54efe8730'
|
|
|
+ 'Authorization':'APPCODE b838ad36bbd741ad97bbe22e50be1847'
|
|
|
},
|
|
|
data:{
|
|
|
city:'南京'
|
|
|
},
|
|
|
dataType:'json',
|
|
|
success : function(data) {
|
|
|
- console.log(data.data.result)
|
|
|
that.tianqiList=data.data.result;
|
|
|
},
|
|
|
error : function(e) {
|
|
@@ -229,14 +233,21 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
- bianji(type){
|
|
|
+ bianji(type,data){
|
|
|
console.log(type)
|
|
|
- uni.navigateTo({
|
|
|
- url: "/pages/bianjigh/index?type="+type,
|
|
|
- })
|
|
|
+ console.log(data)
|
|
|
+ if(data.makeAppointmentCollocation){
|
|
|
+ uni.navigateTo({
|
|
|
+ url: "/pages/bianjigh/index?type="+type+'&id='+data.id+"&old="+data.collocation_id,
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ uni.navigateTo({
|
|
|
+ url: "/pages/bianjigh/index?type="+type,
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
},
|
|
|
zidingyibianji(item){
|
|
|
- console.log(item)
|
|
|
if(item.type==2){
|
|
|
// 衣橱
|
|
|
uni.navigateTo({
|