|
@@ -10,10 +10,12 @@
|
|
<tm-tabs @change="fenlei" v-if="yixuanor==1" class="C1b1b1b qiehuan" color="white" align="left" v-model="activeIndexfl" :list="listfl" range-key="title"></tm-tabs>
|
|
<tm-tabs @change="fenlei" v-if="yixuanor==1" class="C1b1b1b qiehuan" color="white" align="left" v-model="activeIndexfl" :list="listfl" range-key="title"></tm-tabs>
|
|
<view class="biaoti text-white mt-30 text-size-m"><view class="mr-10" v-if="yixuanor==0"></view>{{yixuanor==0?'场景':'请选择场景'}}</view>
|
|
<view class="biaoti text-white mt-30 text-size-m"><view class="mr-10" v-if="yixuanor==0"></view>{{yixuanor==0?'场景':'请选择场景'}}</view>
|
|
<tm-tabs @change="changjing" class="C1b1b1b qiehuan" color="white" align="left" v-model="activeIndexcj" :list="listcj" range-key="title"></tm-tabs>
|
|
<tm-tabs @change="changjing" class="C1b1b1b qiehuan" color="white" align="left" v-model="activeIndexcj" :list="listcj" range-key="title"></tm-tabs>
|
|
|
|
+ <!-- 可预约 -->
|
|
<view v-if="yixuanor==1" class="yiguicla black pa-6 ma-4 fl" @click="gaoliang(index,item)" :class="chooseindex==index?'C0178FD':''" v-for="(item,index) in quanbuList">
|
|
<view v-if="yixuanor==1" class="yiguicla black pa-6 ma-4 fl" @click="gaoliang(index,item)" :class="chooseindex==index?'C0178FD':''" v-for="(item,index) in quanbuList">
|
|
<image :src="item.image" mode="widthFix"></image>
|
|
<image :src="item.image" mode="widthFix"></image>
|
|
<view class="text-size-m mt-20 mb-20 ml-10">{{item.title}}</view>
|
|
<view class="text-size-m mt-20 mb-20 ml-10">{{item.title}}</view>
|
|
</view>
|
|
</view>
|
|
|
|
+ <!-- 已预约 -->
|
|
<view v-if="yixuanor==0" class="yiguicla black pa-6 ma-4 fl" @click="gaoliang(index,item)" :class="chooseindex==index?'C0178FD':''" v-for="(item,index) in yixuanList">
|
|
<view v-if="yixuanor==0" class="yiguicla black pa-6 ma-4 fl" @click="gaoliang(index,item)" :class="chooseindex==index?'C0178FD':''" v-for="(item,index) in yixuanList">
|
|
<image :src="item.image" mode="widthFix"></image>
|
|
<image :src="item.image" mode="widthFix"></image>
|
|
<view class="text-size-m mt-20 mb-20 ml-10">{{item.title}}</view>
|
|
<view class="text-size-m mt-20 mb-20 ml-10">{{item.title}}</view>
|
|
@@ -25,8 +27,8 @@
|
|
<text class="text-size-s">下拉加载更多~</text>
|
|
<text class="text-size-s">下拉加载更多~</text>
|
|
</view> -->
|
|
</view> -->
|
|
</tm-sheet>
|
|
</tm-sheet>
|
|
- <tm-button v-if="yixuanor==0 && yixuanList.length !=0" theme="gray" :round="24" class="sao mb-40" block>删除</tm-button>
|
|
|
|
- <tm-button v-if="yixuanor==1" :round="24" class="sao mb-40" block>保存</tm-button>
|
|
|
|
|
|
+ <tm-button @click="shanchu" v-if="yixuanor==0 && yixuanList.length !=0" theme="gray" :round="24" class="sao mb-40" block>取消删除</tm-button>
|
|
|
|
+ <tm-button @click="yuyue" v-if="yixuanor==1" :round="24" class="sao mb-40" block>预约</tm-button>
|
|
</div>
|
|
</div>
|
|
<!-- 弹出层消息 -->
|
|
<!-- 弹出层消息 -->
|
|
<tm-message ref="toast"></tm-message>
|
|
<tm-message ref="toast"></tm-message>
|
|
@@ -41,7 +43,7 @@ export default {
|
|
listcjall:[],
|
|
listcjall:[],
|
|
listfl:[],
|
|
listfl:[],
|
|
yixuanor:0,//0已选
|
|
yixuanor:0,//0已选
|
|
- list:['已选穿搭','可选穿搭'],
|
|
|
|
|
|
+ list:['已预约穿搭','可预约穿搭'],
|
|
listcj:[],
|
|
listcj:[],
|
|
active:0,
|
|
active:0,
|
|
activeIndexfl:0,
|
|
activeIndexfl:0,
|
|
@@ -60,6 +62,49 @@ export default {
|
|
this.getCj();
|
|
this.getCj();
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ shanchu(){
|
|
|
|
+ var that=this;
|
|
|
|
+ if(this.chooseindex==-1){
|
|
|
|
+ that.$refs.toast.show({model:'warn',label:'请选择要删除的衣物'})
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ var id=this.yixuanList[this.chooseindex].id;
|
|
|
|
+ myRequest({
|
|
|
|
+ url: "/api/Collocation/deleteTomorrowAppointment",
|
|
|
|
+ method:'post',
|
|
|
|
+ data:{id:id}
|
|
|
|
+ }).then(res => {
|
|
|
|
+ if (res.data.code == 200) {
|
|
|
|
+ that.$refs.toast.show({model:'success',label:res.data.msg})
|
|
|
|
+ that.chooseindex=-1;
|
|
|
|
+ that.getCj();
|
|
|
|
+ }else{
|
|
|
|
+ that.$refs.toast.show({model:'error',label:res.data.msg})
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ yuyue(){
|
|
|
|
+ var that=this;
|
|
|
|
+ var scene_id=this.listcjall[this.activeIndexcj].id;
|
|
|
|
+ if(this.chooseindex==-1){
|
|
|
|
+ that.$refs.toast.show({model:'warn',label:'请选择衣物'})
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ var id=this.quanbuList[this.chooseindex].id;
|
|
|
|
+ myRequest({
|
|
|
|
+ url: "/api/Collocation/makeAppointmentTomorrow",
|
|
|
|
+ method:'post',
|
|
|
|
+ data:{id:id,scene_id:scene_id}
|
|
|
|
+ }).then(res => {
|
|
|
|
+ if (res.data.code == 200) {
|
|
|
|
+ that.$refs.toast.show({model:'success',label:'预约成功'})
|
|
|
|
+ that.chooseindex=-1;
|
|
|
|
+ that.getFl();
|
|
|
|
+ }else{
|
|
|
|
+ that.$refs.toast.show({model:'error',label:res.data.msg})
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
fenlei(e){
|
|
fenlei(e){
|
|
var id=this.listflall[e].id;
|
|
var id=this.listflall[e].id;
|
|
this.getKxuan(id)
|
|
this.getKxuan(id)
|
|
@@ -75,10 +120,14 @@ export default {
|
|
if(e==0){
|
|
if(e==0){
|
|
var id=this.listcjall[0].id;
|
|
var id=this.listcjall[0].id;
|
|
this.getYxuan(id)
|
|
this.getYxuan(id)
|
|
|
|
+ }else{
|
|
|
|
+ var id=this.listflall[0].id;
|
|
|
|
+ this.getKxuan(id)
|
|
}
|
|
}
|
|
},
|
|
},
|
|
getYxuan(id){
|
|
getYxuan(id){
|
|
var that=this;
|
|
var that=this;
|
|
|
|
+ that.yixuanList=[];
|
|
myRequest({
|
|
myRequest({
|
|
url: "/api/Collocation/getAppointmentMatching",
|
|
url: "/api/Collocation/getAppointmentMatching",
|
|
method:'post',
|
|
method:'post',
|
|
@@ -86,10 +135,10 @@ export default {
|
|
}).then(res => {
|
|
}).then(res => {
|
|
if (res.data.code == 200) {
|
|
if (res.data.code == 200) {
|
|
if(res.data.data.length != 0){
|
|
if(res.data.data.length != 0){
|
|
- that.quanbuList=res.data.data;
|
|
|
|
|
|
+ that.yixuanList=res.data.data;
|
|
}
|
|
}
|
|
}else{
|
|
}else{
|
|
- that.quanbuList=[];
|
|
|
|
|
|
+ that.yixuanList=[];
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
@@ -103,6 +152,8 @@ export default {
|
|
if (res.data.code == 200) {
|
|
if (res.data.code == 200) {
|
|
if(res.data.data.length != 0){
|
|
if(res.data.data.length != 0){
|
|
that.quanbuList=res.data.data;
|
|
that.quanbuList=res.data.data;
|
|
|
|
+ }else{
|
|
|
|
+ that.quanbuList=[]
|
|
}
|
|
}
|
|
}else{
|
|
}else{
|
|
that.quanbuList=[];
|
|
that.quanbuList=[];
|
|
@@ -119,6 +170,7 @@ export default {
|
|
if (res.data.code == 200) {
|
|
if (res.data.code == 200) {
|
|
if(res.data.data.length != 0){
|
|
if(res.data.data.length != 0){
|
|
// that.listfl=['全部'];
|
|
// that.listfl=['全部'];
|
|
|
|
+ that.listcj=[];
|
|
for(let i=0;i<res.data.data.length;i++){
|
|
for(let i=0;i<res.data.data.length;i++){
|
|
that.listcj.push(res.data.data[i].scene_name)
|
|
that.listcj.push(res.data.data[i].scene_name)
|
|
}
|
|
}
|
|
@@ -140,6 +192,7 @@ export default {
|
|
if (res.data.code == 200) {
|
|
if (res.data.code == 200) {
|
|
if(res.data.data.length != 0){
|
|
if(res.data.data.length != 0){
|
|
// that.listfl=['全部'];
|
|
// that.listfl=['全部'];
|
|
|
|
+ that.listfl=[];
|
|
for(let i=0;i<res.data.data.length;i++){
|
|
for(let i=0;i<res.data.data.length;i++){
|
|
that.listfl.push(res.data.data[i].category_name)
|
|
that.listfl.push(res.data.data[i].category_name)
|
|
}
|
|
}
|
|
@@ -205,7 +258,7 @@ export default {
|
|
}
|
|
}
|
|
/deep/ .qiehuan .tm-tabs-con-item-border{display: none;}
|
|
/deep/ .qiehuan .tm-tabs-con-item-border{display: none;}
|
|
.yiguicla image{width: 95%;display: block;margin: 0 auto;margin-top: 5px;}
|
|
.yiguicla image{width: 95%;display: block;margin: 0 auto;margin-top: 5px;}
|
|
- .yiguicla{width: 47%;border-radius: 10px;}
|
|
|
|
|
|
+ .yiguicla{width: 47%;border-radius: 10px;height: 204px;}
|
|
.more{text-align: center;}
|
|
.more{text-align: center;}
|
|
.more image{margin-right: 10px;vertical-align: middle;width: 30px;}
|
|
.more image{margin-right: 10px;vertical-align: middle;width: 30px;}
|
|
.fudong{position:fixed;right:10px;bottom:150px;background: #303030;width: 130px;height: 60px;
|
|
.fudong{position:fixed;right:10px;bottom:150px;background: #303030;width: 130px;height: 60px;
|