YZM 1 jaar geleden
bovenliggende
commit
998c144276

+ 44 - 11
pages/baocun/index.vue

@@ -15,8 +15,8 @@
 					<view>
 						<view class="biaoti text-white mt-30 text-size-m"><view class="mr-10"></view>分类</view>
 						<tm-tabs @change="fenlei" class="C1b1b1b qiehuan" color="white"  align="left"  v-model="activeIndex" :list="listfl" range-key="title"></tm-tabs>
-						<!-- <view class="biaoti text-white mt-30 text-size-m"><view class="mr-10"></view>场景</view> -->
-						<!-- <tm-tabs class="C1b1b1b qiehuan" color="white"  align="left"  v-model="activeIndex1" :list="list1" range-key="title"></tm-tabs> -->
+						<view class="biaoti text-white mt-30 text-size-m"><view class="mr-10"></view>场景</view>
+						<tm-tabs class="C1b1b1b qiehuan" color="white"  align="left"  v-model="activeIndex1" :list="list1" range-key="title"></tm-tabs>
 					</view>
 					<!-- <view v-if="off==1" class="text-align-center mt-20 text-white">丝缎质感纹理风衣</view> -->
 					<!-- <view v-if="off==1" class="text-align-center mt-10 text-size-s">丝滑如肌肤</view> -->
@@ -28,7 +28,7 @@
 			<view class="pa-20"><tm-cartCellListFood  v-on:jiaruFun="jiarufuFun" v-for="item in test1" :typeclick="typeclick1" :mdata="item" :cart-num.sync="item.buy"></tm-cartCellListFood></view>
 		</view> -->
 		<tm-sheet :shadow="24" class="jiaoxi xiao">
-			<tm-tabs align="center" class="qiehuan1" v-model="activeIndex" :list="list5" range-key="title"></tm-tabs>
+			<tm-tabs align="center" class="qiehuan1" v-model="activeIndex5" :list="list5" range-key="title"></tm-tabs>
 		</tm-sheet>
 		<!-- 单品 -->
 		<view class="zhuti shangpin">
@@ -37,10 +37,13 @@
 			</tm-sheet>
 		</view>
 		<!-- <tm-button :round="24" class="sao mb-40 mt-40" block>保存</tm-button> -->
-		<view class="anniu">
-			<tm-button @click="shanchu()" v-if="off==2" :round="24" theme="gray" size="n">删除</tm-button>
+		<view class="anniu" v-if="off==2">
+			<tm-button @click="shanchu()" :round="24" theme="gray" size="n">删除</tm-button>
 			<tm-button @click="baocun()" :round="24" class="fr" theme="primary" size="n">保存</tm-button>
 		</view>
+		<view class="anniu" v-if="off==1">
+			<tm-button class="anniubaocun " @click="baocun()" :round="24" theme="primary" size="n">保存</tm-button>
+		</view>
 		<view style="clear: both;"></view>
 		<!-- 弹出层消息 -->
 		<tm-message ref="toast"></tm-message>
@@ -56,7 +59,9 @@ export default {
 			familyname:'',
 			off:1,
 			activeIndex:0,
-			list1:['开会','聚餐'],
+			activeIndex5:0,
+			list1:[],
+			list1all:[],
 			activeIndex1:0,
 			list5:[ '搭配内的购物清单'],
 			test: [],
@@ -85,9 +90,31 @@ export default {
 	created() {
 		this.sys = uni.getSystemInfoSync();
 		this.getFl();
+		this.getCj();
 		this.fenleichange();
 	},
 	methods: {
+		getCj(){
+			var that=this;
+			myRequest({
+				url: "/api/Scene/sceneList",
+				method:'post',
+				data:{}
+			}).then(res => {
+				if (res.data.code == 200) {
+					if(res.data.data.length != 0){
+						// that.listfl=['全部'];
+						that.list1=[];
+						for(let i=0;i<res.data.data.length;i++){
+							that.list1.push(res.data.data[i].scene_name)
+						}
+						that.list1all=res.data.data;
+					}
+				}else{
+					that.list1=[];
+				}
+			})
+		},
 		huancun(){
 			var ids=[];
 			console.log(11111111111)
@@ -112,7 +139,6 @@ export default {
 		},
 		genghuan(data){
 			var that=this;
-			console.log(data)
 			uni.navigateTo({
 				url: "/pages/genghuan/index?type=tihuan&id="+data.data.id,
 			})
@@ -222,7 +248,7 @@ export default {
 				category_id:that.listflall[that.activeIndex].id,
 				memberinfo_id:that.itemuser.id,
 				ids:this.ids,
-				scene_id:''
+				scene_id:that.list1all[that.activeIndex5].id
 			}
 			if(this.off==1){
 				// 保存
@@ -239,9 +265,14 @@ export default {
 				console.log(res.data)
 				if (res.data.code == 200) {
 					setTimeout(function(){
-						uni.navigateTo({
-							url: "/pages/index/index?index=2",
-						})
+						let pages = getCurrentPages(); // 当前页面
+						let beforePage = pages[pages.length - 2]; // 前一个页面
+						uni.navigateBack({
+							delta: 1,
+							success: function() {
+								beforePage.$vm.initshow()
+							}
+						});
 					},2000)
 					that.$refs.toast.show({model:'success',label:res.data.msg})
 				}else{
@@ -303,4 +334,6 @@ export default {
 	.sao{width: 88%;display: block;margin: 0 auto;padding-bottom: 60px;margin-top: 20px;}
 	.goumai{background: #1B1B1B;margin-bottom: 10px;}
 	.anniu{width: 70%;margin: 0 auto;margin-top: 20px;padding-bottom: 30px;}
+	/deep/ .anniubaocun{width: 100%;}
+	/deep/ .anniubaocun .flex-center{width: 100% !important;}
 </style>

+ 54 - 98
pages/bianjigh/index.vue

@@ -54,35 +54,15 @@ export default {
 		};
 	},
 	onLoad(e) {
-		this.type=e.type?e.type:1;
+		this.type=e.type?e.type:'';
+		this.id=e.id?e.id:'';
+		this.old=e.old?e.old:'';
 	},
 	created() {
 		this.sys = uni.getSystemInfoSync();
 		this.getFl();
-		this.getCj();
 	},
 	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;
 			if(this.chooseindex==-1){
@@ -90,65 +70,57 @@ export default {
 				return
 			}
 			var id=this.quanbuList[this.chooseindex].id;
-			myRequest({
-				url: "/api/Collocation/addStyle",
-				method:'post',
-				data:{id:id,type:that.type}
-			}).then(res => {
-				if (res.data.code == 200) {
-					// setTimeout(function(){
-					// 	let pages = getCurrentPages(); // 当前页面
-					// 	let beforePage = pages[pages.length - 2]; // 前一个页面
-					// 	uni.navigateBack({
-					// 		delta: 1,
-					// 		success: function() {
-					// 			beforePage.$vm.shuaxin()
-					// 		}
-					// 	});
-					// },2000)
-					that.$refs.toast.show({model:'success',label:res.data.msg})
-				}else{
-					that.$refs.toast.show({model:'error',label:res.data.msg})
-				}
-			})
+			if(this.old){
+				// 修改
+				myRequest({
+					url: "/api/Collocation/updateStyle",
+					method:'post',
+					data:{id:that.id,dp_id:id}
+				}).then(res => {
+					if (res.data.code == 200) {
+						setTimeout(function(){
+							let pages = getCurrentPages(); // 当前页面
+							let beforePage = pages[pages.length - 2]; // 前一个页面
+							uni.navigateBack({
+								delta: 1,
+								success: function() {
+									beforePage.$vm.initshow()
+								}
+							});
+						},2000)
+						that.$refs.toast.show({model:'success',label:res.data.msg})
+					}else{
+						that.$refs.toast.show({model:'error',label:res.data.msg})
+					}
+				})
+			}else{
+				myRequest({
+					url: "/api/Collocation/addStyle",
+					method:'post',
+					data:{id:id,type:that.type}
+				}).then(res => {
+					if (res.data.code == 200) {
+						setTimeout(function(){
+							let pages = getCurrentPages(); // 当前页面
+							let beforePage = pages[pages.length - 2]; // 前一个页面
+							uni.navigateBack({
+								delta: 1,
+								success: function() {
+									beforePage.$vm.initshow()
+								}
+							});
+						},2000)
+						that.$refs.toast.show({model:'success',label:res.data.msg})
+					}else{
+						that.$refs.toast.show({model:'error',label:res.data.msg})
+					}
+				})
+			}
 		},
 		fenlei(e){
 			var id=this.listflall[e].id;
 			this.getKxuan(id)
 		},
-		changjing(e){
-			var id=this.listcjall[e].id;
-			this.getYxuan(id)
-		},
-		shifouxuan(e){
-			this.activeIndexcj=0;
-			this.chooseindex=-1;
-			this.yixuanor=e;
-			if(e==0){
-				var id=this.listcjall[0].id;
-				this.getYxuan(id)
-			}else{
-				var id=this.listflall[0].id;
-				this.getKxuan(id)
-			}
-		},
-		getYxuan(id){
-			var that=this;
-			that.yixuanList=[];
-			myRequest({
-				url: "/api/Collocation/getAppointmentMatching",
-				method:'post',
-				data:{scene_id:id}
-			}).then(res => {
-				if (res.data.code == 200) {
-					if(res.data.data.length != 0){
-						that.yixuanList=res.data.data;
-					}
-				}else{
-					that.yixuanList=[];
-				}
-			})
-		},
 		getKxuan(id){
 			var that=this;
 			myRequest({
@@ -158,30 +130,14 @@ export default {
 			}).then(res => {
 				if (res.data.code == 200) {
 					that.quanbuList=res.data.data;
-				}else{
-					that.quanbuList=[];
-				}
-			})
-		},
-		getCj(){
-			var that=this;
-			myRequest({
-				url: "/api/Scene/sceneList",
-				method:'post',
-				data:{}
-			}).then(res => {
-				if (res.data.code == 200) {
-					if(res.data.data.length != 0){
-						// that.listfl=['全部'];
-						that.listcj=[];
-						for(let i=0;i<res.data.data.length;i++){
-							that.listcj.push(res.data.data[i].scene_name)
+					for(let i=0;i<that.quanbuList.length;i++){
+						if(that.quanbuList[i].id==this.old){
+							this.chooseindex=i;
 						}
-						that.listcjall=res.data.data;
-						that.getYxuan(that.listcjall[0].id)
 					}
+					
 				}else{
-					that.listcj=[];
+					that.quanbuList=[];
 				}
 			})
 		},

+ 1 - 1
pages/changan/index.vue

@@ -113,7 +113,7 @@ export default {
 				return
 			}
 			uni.setStorageSync("datalist",arr)
-			uni.navigateTo({
+			uni.redirectTo({
 				url: "/pages/baocun/index?type=1",
 			})
 		},

+ 37 - 26
pages/dapei/index.vue

@@ -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({

+ 3 - 3
pages/genghuan/index.vue

@@ -88,9 +88,9 @@ export default {
 		};
 	},
 	onLoad(e) {
-		this.goods_id=e.goods_id?e.goods_id:4;//是自己的
-		this.id=e.id?e.id:4;//是自己的
-		this.type=e.type?e.type:"tihuan";//是自己的
+		this.goods_id=e.goods_id?e.goods_id:'';//是自己的
+		this.id=e.id?e.id:'';//是自己的
+		this.type=e.type?e.type:"";//是自己的
 	},
 	created() {
 		this.sys = uni.getSystemInfoSync();

+ 1 - 0
pages/gouwuche/index.vue

@@ -79,6 +79,7 @@
 								model: 'success',
 								label: res.data.msg
 							})
+							this.getList()
 						} else {
 							that.$refs.toast.show({
 								model: 'error',

+ 4 - 3
pages/index/index.vue

@@ -45,12 +45,11 @@ export default {
 	},
 	onLoad(index) {
 		this.$tm.theme.setBlack(true);
-		console.log("111")
 		if(index.index==1){
 			this.showpage=1;
 			this.initBtn()
 		}else if(index.index==2){
-			console.log("111")
+			console.log(222)
 			this.showpage=2;
 			this.initshow()
 		}else{
@@ -58,7 +57,9 @@ export default {
 		}
 	},
 	created() {
-		
+		uni.onPushMessage((res) => {
+			console.log("收到推送消息:",res) //监听推送消息
+		})
 	},
 	methods: {
 		initBtn(){

+ 1 - 2
pages/qiehuan/index.vue

@@ -23,7 +23,7 @@
 						<text style="vertical-align: middle;" class="text-size-g text-white">{{item.username}}</text>
 					</view>
 					<view @click="qiehuanFun(item,index)">
-						<!-- <text class="text-size-g you" style="vertical-align: middle;">(家庭成员)</text> -->
+						<text v-if="item.checked==1" class="text-size-g you" style="vertical-align: middle;">(当前用户)</text>
 						<tm-checkbox class="you" v-model="item.checked" label=""></tm-checkbox>
 					</view>
 				</view>
@@ -112,7 +112,6 @@ export default {
 						data[0].checked=true;
 					}
 					that.userList=res.data.data;
-					console.log(that.userList)
 				}else{
 					that.userList=[];
 				}

+ 32 - 6
pages/shouye/index.vue

@@ -111,11 +111,11 @@
 							<view class="py-10 text-size-s dianz mingri">
 								<text class="text-white">亿万新品趋势洞察</text>
 							</view>
-							<view class="mt-10" v-for="item in list2" @click="xiangqing()">
-								<image class="chuandaimg fl" :src="item.img" mode="widthFix"></image>
+							<view class="mt-10" v-for="item in shopGoodsList" @click="xiangqing()">
+								<image class="chuandaimg fl" :src="item.image" mode="widthFix"></image>
 								<view class="chuandazi fr">
-									<view class="text-size-m text-weight-b text-overflow-2">{{item.title}}</view>
-									<view class="tm-cartCellListFood-label text-size-s text-grey py-8">{{item.text}}
+									<view class="text-size-m text-weight-b text-overflow-2">{{item.goods_name}}</view>
+									<view class="tm-cartCellListFood-label text-size-s text-grey py-8">{{item.goods_details}}
 									</view>
 									<image class="gengduo fr" src="/static/img/40.png" mode="widthFix"></image>
 								</view>
@@ -183,8 +183,9 @@
 				current: 0,
 				current1: 0,
 				listdata: [],
-				pagesize:10,
-				page:1
+				pagesize:2,
+				page:1,
+				shopGoodsList:[]
 			};
 		},
 		onLoad() {
@@ -206,8 +207,33 @@
 			this.getremmend();
 			this.getHot();
 			this.getPlan();
+			this.biaoshen();
 		},
 		methods: {
+			biaoshen(){
+				let that = this;
+				myRequest({
+					url: "/api/ShopGoods/shopGoodsList",
+					method: 'get',
+					data: {}
+				}).then(res => {
+					if (res.data.code == 200) {
+						that.shopGoodsList=res.data.data;
+						// res.data.data.forEach(item => {
+						// 	that.list3.push({
+						// 		icon: item.img,
+						// 		text: item.name,
+						// 		sort: item.sort
+						// 	})
+						// })
+					} else {
+						that.$refs.toast.show({
+							model: 'error',
+							label: res.data.msg
+						})
+					}
+				})
+			},
 			qiehuandizhi(e){
 				if(e[2]!=null){
 					this.offshow=false;

+ 3 - 3
pages/user/index.vue

@@ -65,12 +65,12 @@ export default {
 			on:true,
 			libiaoList:[
 			{title:'我的钱包',type:'1'},
-			{title:'我的评价',type:'2'},
+			// {title:'我的评价',type:'2'},
 			{title:'意见反馈',type:'3'},
 			{title:'我的消息',type:'4'},
 			{title:'我的关注',type:'5'},
-			{title:'系统通知',type:'6'},
-			{title:'历史记录',type:'7'},
+			// {title:'系统通知',type:'6'},
+			// {title:'历史记录',type:'7'},
 			{title:'内容推送',type:'9'},
 			]
 		};

+ 6 - 7
pages/wardrobe/index.vue

@@ -156,6 +156,7 @@ export default {
 	},
 	methods: {
 		qingkong(){
+			this.quanbuList=[];
 			this.fenleichange();
 			this.getfenltext();
 		},
@@ -212,13 +213,11 @@ export default {
 				data:{role_id:that.itemuser.id,id:that.activeIndex,page:that.page,pagesize:that.pagesize}
 			}).then(res => {
 				if (res.data.code == 200) {
-					if(res.data.data.length != 0){
-						that.quanbuchang=res.data.data.chang;
-						that.quanbuList=that.quanbuList.concat(res.data.data.data);
-						that.total=res.data.data.total;
-						that.count=res.data.data.count;
-						that.have=res.data.data.have;
-					}
+					that.quanbuchang=res.data.data.chang;
+					that.quanbuList=that.quanbuList.concat(res.data.data.data);
+					that.total=res.data.data.total;
+					that.count=res.data.data.count;
+					that.have=res.data.data.have;
 				}else{
 					that.quanbuList=[];
 				}