YZM 2 years ago
parent
commit
ad2d2f60c0

+ 7 - 1
manifest.json

@@ -46,7 +46,13 @@
             },
             /* SDK配置 */
             "sdkConfigs" : {
-                "ad" : {}
+                "ad" : {},
+                "push" : {
+                    "unipush" : {
+                        "version" : "2",
+                        "offline" : true
+                    }
+                }
             }
         }
     },

+ 182 - 37
pages/baocun/index.vue

@@ -14,7 +14,7 @@
 					</view>
 					<view>
 						<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="activeIndex" :list="list" range-key="title"></tm-tabs>
+						<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>
@@ -33,14 +33,15 @@
 		<!-- 单品 -->
 		<view class="zhuti shangpin">
 			<tm-sheet :padding="[0, 0]" class="jiaoxi xiao">
-				<tm-cartCellListFood  v-on:jiaruFun="jiarufuFun" v-for="item in test" :typeclick="typeclick" :mdata="item" :cart-num.sync="item.buy"></tm-cartCellListFood>
+				<tm-cartCellListFood   v-on:genghuan="genghuan" v-for="item in test" :typeclick="typeclick" :mdata="item" :cart-num.sync="item.buy"></tm-cartCellListFood>
 			</tm-sheet>
 		</view>
 		<!-- <tm-button :round="24" class="sao mb-40 mt-40" block>保存</tm-button> -->
 		<view class="anniu">
-			<tm-button :round="24" theme="gray" size="n">删除</tm-button>
-			<tm-button :round="24" class="fr" theme="primary" size="n">保存</tm-button>
+			<tm-button @click="shanchu()" v-if="off==2" :round="24" theme="gray" size="n">删除</tm-button>
+			<tm-button @click="baocun()" :round="24" class="fr" theme="primary" size="n">保存</tm-button>
 		</view>
+		<view style="clear: both;"></view>
 		<!-- 弹出层消息 -->
 		<tm-message ref="toast"></tm-message>
 	</view>
@@ -50,39 +51,15 @@ import{myRequest} from '@/api/request.js'
 export default {
 	data() {
 		return {
+			listfl:[],
+			listflall:[],
 			familyname:'',
 			off:1,
-			list:['时尚','商务'],
 			activeIndex:0,
 			list1:['开会','聚餐'],
-			activeIndex:0,
 			activeIndex1:0,
 			list5:[ '搭配内的购物清单'],
-			test: [{
-				img: '../../static/img/83.png',
-				title: '丝缎质感纹理风衣',
-				label: '黑色 - 6518/320',
-				price: '1299',
-				id: 3,
-				buy: 0,
-				itemId: 0
-			},{
-				img: '../../static/img/84.png',
-				title: '产品3(任选)',
-				label: '这个产品是只有几个融会',
-				price: 36.2,
-				id: 3,
-				buy: 0,
-				itemId: 0
-			},{
-				img: '../../static/img/83.png',
-				title: '产品3(任选)',
-				label: '这个产品是只有几个融会',
-				price: 36.2,
-				id: 3,
-				buy: 0,
-				itemId: 0
-			}],
+			test: [],
 			test1: [{
 				img: '../../static/img/83.png',
 				title: '丝缎质感纹理风衣',
@@ -92,23 +69,191 @@ export default {
 				itemId: 0
 			}],
 			typeclick1:6,//1加入购物车,2购物车,3前往购买,4,5
-			typeclick:8,//1加入购物车,2购物车,3前往购买,4,5
-			
+			typeclick:7,//1加入购物车,2购物车,3前往购买,4,5
+			ids:[]
 		};
 	},
 	onLoad(e) {
-		if(e){
-			
+		this.off=e.type?e.type:1;//1保存2是修改
+		this.id=e.id?e.id:13;
+		if(this.off==1){
+			this.huancun();
+		}else{
+			this.getDate();
 		}
 	},
 	created() {
 		this.sys = uni.getSystemInfoSync();
+		this.getFl();
+		this.fenleichange();
 	},
 	methods: {
-		jiarufuFun(data){
+		huancun(){
+			var ids=[];
+			console.log(11111111111)
+			console.log(uni.getStorageSync("datalist"))
+			if(uni.getStorageSync("datalist")){
+				var datalist=uni.getStorageSync("datalist");
+				this.test=[];
+				for(let i=0;i<datalist.length;i++){
+					this.test.push({
+						img: datalist[i].image,
+						title: datalist[i].goods_name,
+						label: datalist[i].description,
+						price: '',
+						id: datalist[i].id,
+						buy: 0,
+						itemId: 0
+					})
+					ids.push(datalist[i].id)
+				}
+				this.ids=ids;
+			}
+		},
+		genghuan(data){
+			var that=this;
+			console.log(data)
 			uni.navigateTo({
-				url: "/pages/shopdetail/index",
+				url: "/pages/genghuan/index?type=tihuan&id="+data.data.id,
+			})
+		},
+		getDate(){
+			var that=this;
+			myRequest({
+				url: "/api/Collocation/matchingSchemeDetails",
+				method:'post',
+				data:{type:2,id:that.id}
+			}).then(res => {
+				if (res.data.code == 200) {
+					that.familyname=res.data.data.data.title;
+					var datalist=res.data.data.details,datalist1=[];
+					for(let i=0;i<datalist.length;i++){
+						datalist1.push(datalist[i].goods)
+					}
+					uni.setStorageSync("datalist",datalist1)
+					that.huancun();
+				}else{
+					
+				}
+			})
+		},
+		shanchu(){
+			var that=this;
+			myRequest({
+				url: "/api/Collocation/customizedDeleteCollocation",
+				method:'post',
+				data:{id:that.id}
+			}).then(res => {
+				console.log(res.data)
+				if (res.data.code == 200) {
+					let pages = getCurrentPages(); // 当前页面
+					let beforePage = pages[pages.length - 2]; // 前一个页面
+					uni.navigateBack({
+						delta: 1,
+						success: function() {
+							beforePage.$vm.initshow()
+						}
+					});
+					that.$refs.toast.show({model:'success',label:res.data.msg})
+				}else{
+					that.$refs.toast.show({model:'error',label:res.data.msg})
+				}
+			})
+		},
+		fenleichange(){
+			var that=this;
+			myRequest({
+				url: "/api/MemberInfo/getFamilyMember",
+				method:'post',
+				data:{family_id:uni.getStorageSync("family_id")}
+			}).then(res => {
+				if (res.data.code == 200) {
+					if(res.data.data.length != 0){
+						var wu=0;
+						for(let i=0;i<res.data.data.length;i++){
+							if(res.data.data[i].checked==1){
+								wu=1;
+								that.itemuser=res.data.data[i];
+							}
+						}
+						if(wu==0){
+							that.itemuser=res.data.data[0];
+						}
+					}else{
+						that.itemuser=0;
+					}
+				}else{
+					that.itemuser=0;
+				}
 			})
+		},
+		fenlei(e){
+			this.activeIndex=e;
+		},
+		getFl(){
+			var that=this;
+			myRequest({
+				url: "/api/Category/getCollocationClassList",
+				method:'post',
+				data:{}
+			}).then(res => {
+				if (res.data.code == 200) {
+					if(res.data.data.length != 0){
+						// that.listfl=['全部'];
+						that.listfl=[];
+						for(let i=0;i<res.data.data.length;i++){
+							that.listfl.push(res.data.data[i].category_name)
+						}
+						that.listflall=res.data.data;
+					}
+				}else{
+					that.listfl=[];
+				}
+			})
+		},
+		baocun(){
+			var that=this;
+			if(that.familyname==""){
+				that.$refs.toast.show({model:'error',label:'请输入搭配名称'})
+				return
+			}
+			var obj={
+				title:that.familyname,
+				category_id:that.listflall[that.activeIndex].id,
+				memberinfo_id:that.itemuser.id,
+				ids:this.ids,
+				scene_id:''
+			}
+			if(this.off==1){
+				// 保存
+				var url="/api/Collocation/customizedCollocation"
+			}else{
+				obj['id']=that.id;
+				var url="/api/Collocation/customizedUpdateCollocation"
+			}
+			myRequest({
+				url: url,
+				method:'post',
+				data:obj
+			}).then(res => {
+				console.log(res.data)
+				if (res.data.code == 200) {
+					setTimeout(function(){
+						uni.navigateTo({
+							url: "/pages/index/index?index=2",
+						})
+					},2000)
+					that.$refs.toast.show({model:'success',label:res.data.msg})
+				}else{
+					that.$refs.toast.show({model:'error',label:res.data.msg})
+				}
+			})
+			console.log(obj)
+		},
+		jiarufuFun(data){
+			// uni.navigateTo({
+			// 	url: "/pages/shopdetail/index",
+			// })
 			console.log(data)
 		},
 	},

+ 6 - 3
pages/bianji/index.vue

@@ -21,6 +21,7 @@
 					<view class="text-size-m mt-20 mb-20 ml-10">{{item.title}}</view>
 				</view>
 				<tm-empty v-if="yixuanor==0 && yixuanList.length ==0" label="暂无数据" color="white" icon="icon-paperplane-fill"></tm-empty>
+				<tm-empty v-if="yixuanor==1 && quanbuList.length ==0" label="暂无数据" color="white" icon="icon-paperplane-fill"></tm-empty>
 				<view style="clear: both;"></view>
 				<!-- <view style="clear: both;" class="more ma-30 pt-40" @click="gengmore()">
 					<image src="/static/img/30.png" mode="widthFix"></image>
@@ -50,11 +51,12 @@ export default {
 			activeIndexcj:0,
 			quanbuList:[],
 			yixuanList:[],
-			chooseindex:-1
+			chooseindex:-1,
+			type:1
 		};
 	},
-	onLoad() {
-		
+	onLoad(e) {
+		this.type=e.type?e.type:1;//1今天2明天
 	},
 	created() {
 		this.sys = uni.getSystemInfoSync();
@@ -117,6 +119,7 @@ export default {
 			this.activeIndexcj=0;
 			this.chooseindex=-1;
 			this.yixuanor=e;
+			this.activeIndexfl=0;
 			if(e==0){
 				var id=this.listcjall[0].id;
 				this.getYxuan(id)

+ 30 - 25
pages/bianjigh/index.vue

@@ -20,7 +20,7 @@
 					<image :src="item.image" mode="widthFix"></image>
 					<view class="text-size-m mt-20 mb-20 ml-10">{{item.title}}</view>
 				</view> -->
-				<!-- <tm-empty v-if="yixuanor==0 && yixuanList.length ==0" label="暂无数据" color="white" icon="icon-paperplane-fill"></tm-empty> -->
+				<tm-empty v-if="yixuanor==0 && quanbuList.length ==0" label="暂无数据" color="white" icon="icon-paperplane-fill"></tm-empty>
 				<view style="clear: both;"></view>
 				<!-- <view style="clear: both;" class="more ma-30 pt-40" @click="gengmore()">
 					<image src="/static/img/30.png" mode="widthFix"></image>
@@ -53,8 +53,8 @@ export default {
 			chooseindex:-1
 		};
 	},
-	onLoad() {
-		
+	onLoad(e) {
+		this.type=e.type?e.type:1;
 	},
 	created() {
 		this.sys = uni.getSystemInfoSync();
@@ -85,25 +85,32 @@ export default {
 		},
 		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})
-			// 	}
-			// })
+			if(this.chooseindex==-1){
+				that.$refs.toast.show({model:'warn',label:'请选择衣物'})
+				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})
+				}
+			})
 		},
 		fenlei(e){
 			var id=this.listflall[e].id;
@@ -150,9 +157,7 @@ export default {
 				data:{id:id}
 			}).then(res => {
 				if (res.data.code == 200) {
-					if(res.data.data.length != 0){
-						that.quanbuList=res.data.data;
-					}
+					that.quanbuList=res.data.data;
 				}else{
 					that.quanbuList=[];
 				}

+ 44 - 9
pages/changan/index.vue

@@ -98,15 +98,50 @@ export default {
 	},
 	methods: {
 		baocun(){
+			var that=this;
+			var arr=[],a=0;
+			for(let i=0;i<this.quanbuList.length;i++){
+				if(this.quanbuList[i].off){
+					a=a+1;
+					if(this.quanbuList[i].off){
+						arr.push(this.quanbuList[i])
+					}
+				}
+			}
+			if(arr.length==0){
+				that.$refs.toast.show({model:'error',label:'请选择在库衣物'})
+				return
+			}
+			uni.setStorageSync("datalist",arr)
 			uni.navigateTo({
-				url: "/pages/baocun/index",
+				url: "/pages/baocun/index?type=1",
 			})
 		},
 		shanchu(){
-			// for(let i=0;i<this.quanbuList.length;i++){
-			// 	this.quanbuList[i].off=false;
-			// 	this.$forceUpdate()
-			// }
+			var that=this,id=[];
+			for(let i=0;i<this.quanbuList.length;i++){
+				if(this.quanbuList[i].off){
+					id.push(this.quanbuList[i].id)
+				}
+			}
+			if(id.length==0){
+				that.$refs.toast.show({model:'error',label:'请选择衣物'})
+				return
+			}
+			myRequest({
+				url: "/api/Goods/deleteGoods",
+				method:'post',
+				data:{ids:id}
+			}).then(res => {
+				console.log(res.data)
+				if (res.data.code == 200) {
+					that.quanbuList=[];
+					this.fenleichange();
+					that.$refs.toast.show({model:'success',label:res.data.msg})
+				}else{
+					that.$refs.toast.show({model:'error',label:res.data.msg})
+				}
+			})
 		},
 		qiehuanLb(e){
 			var that=this;
@@ -142,10 +177,10 @@ export default {
 		chuku(){
 			var id=[],a=0;
 			var that=this;
-			if(this.quanbuList.length==0){
-				that.$refs.toast.show({model:'error',label:'请选择衣物'})
-				return
-			}
+			// if(this.quanbuList.length==0){
+			// 	that.$refs.toast.show({model:'error',label:'请选择衣物'})
+			// 	return
+			// }
 			for(let i=0;i<this.quanbuList.length;i++){
 				if(this.quanbuList[i].off){
 					a=a+1;

+ 104 - 26
pages/dapei/index.vue

@@ -1,35 +1,51 @@
 <template>
 	<view :style="{ minHeight: sys.windowHeight + 'px' }"
 		:class="[$tm.vx.state().tmVuetify.black ? 'black' : ' ']">
-		<tm-menubars title="搭配" :shadow="0" :showback="true"></tm-menubars>
+		<tm-menubars title="搭配" :shadow="0" :showback="false"></tm-menubars>
 		<view class="C1b1b1b pb-20">
 			<tm-tabs align="left" class="qiehuan1" v-model="activeIndex" :list="list" range-key="title"></tm-tabs>
 		</view>
 		<!-- 天气 -->
 		<scroll-view class="scroll-view_H" scroll-x="true">
-			<view class="scroll-view-item_H">
-				<image class="chuanda" src="/static/img/107.png"></image>
+			<view class="scroll-view-item_H" v-if="alltouList.length !=0">
+				<image v-if="alltouList.length>0" class="chuanda" :src="alltouList[0].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>
+					<view class="text-white text-size-lg mt-15">{{tianqiList.weather}}</view>
+					<view class="text-gray text-size-lg mt-10">最低{{tianqiList.templow}}°c 最高{{tianqiList.temphigh}}°c</view>
+				</view>
 				<view class="mt-20 text-align-center">
 					<image class="taiyang" src="/static/img/106.png" mode="widthFix"></image>
-					<text class="text-size-s ml-15">16°c~20°c</text>
-					<text class="text-size-s ml-15">星期一</text>
+					<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()">更换穿搭</view>
+				<view class="bianji" @click="bianji(1)">{{alltouList[0].image?'更换穿搭':'添加穿搭'}}</view>
 			</view>
-			<view class="scroll-view-item_H">
-				<view class="chuanda">
-					<view class="text-white text-size-lg">南京市</view>
-					<view class="text-size-lg mt-15 text-weight-b" style="color: #FFCC00;">8°C</view>
-					<view class="text-white text-size-lg mt-15">局部地区降雨</view>
-					<view class="text-gray text-size-lg mt-10">最低0°c 最高9°c</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>
+				<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>
+					<view class="text-white text-size-lg mt-15">{{tianqiList.daily[1].day.weather}}</view>
+					<view class="text-gray text-size-lg mt-10">{{tianqiList.daily[1].day.winddirect}} {{tianqiList.daily[1].day.windpower}}°c</view>
+				</view>
+				<view class="mt-20 text-align-center">
+					<image class="taiyang" src="/static/img/106.png" mode="widthFix"></image>
+					<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>
+			<!-- <view class="scroll-view-item_H">
+				
 				<view class="mt-20 text-align-center">
 					<image class="taiyang" src="/static/img/106.png" mode="widthFix"></image>
 					<text class="text-size-s ml-15">16°c~20°c</text>
 					<text class="text-size-s ml-15">星期一</text>
 				</view>
-				<view class="bianji" @click="bianji()">添加穿搭</view>
-			</view>
+				<view class="bianji" @click="bianji(2)">添加穿搭</view>
+			</view> -->
 			<!-- <view class="scroll-view-item_H">
 				<image class="chuanda" src="/static/img/107.png" mode="widthFix"></image>
 				<view class="mt-20 text-align-center">
@@ -44,7 +60,7 @@
 			<!-- 衣橱 -->
 			<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()">
+				<view class="yiguicla black pa-6 ma-4 fl" v-for="(item,index) in quanbuList" @click="zidingyibianji(item)">
 					<image :src="item.image" mode="widthFix"></image>
 					<view class="text-size-m mt-20 mb-20 ml-10">{{item.title}}</view>
 				</view>
@@ -72,23 +88,71 @@ export default {
 			quanbuList:[],
 			chooseindex:-1,
 			listfl:[],
-			listflall:[]
-			
+			listflall:[],
+			alltouList:[],
+			tianqiList:[]
 		};
 	},
-	onLoad() {
+	onLoad(e) {
 		
 	},
 	created() {
 		this.sys = uni.getSystemInfoSync();
 		this.gettianqi();
 		this.getFl();
+		this.touFun();
 	},
 	methods: {
+		shuaxin(){
+			this.getFl();
+			this.touFun();
+		},
 		fenlei(e){
 			var id=this.listflall[e].id;
 			this.getKxuan(id)
 		},
+		touFun(){
+			var that=this;
+			myRequest({
+				url: "/api/Collocation/selectStyle",
+				method:'post',
+				data:{}
+			}).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:[]}
+					}else if(dataList.length==1){
+						for(let i=0;i<dataList.length;i++){
+							if(dataList[i].type==1){
+								that.alltouList[0]=dataList[i].makeAppointmentCollocation
+							}else{
+								that.alltouList[0]={data:[]}
+							}
+							if(dataList[i].type==2){
+								that.alltouList[1]=dataList[i].makeAppointmentCollocation
+							}else{
+								that.alltouList[1]={data:[]}
+							}
+						}
+					}else{
+						for(let i=0;i<dataList.length;i++){
+							if(dataList[i].type==1){
+								that.alltouList[0]=dataList[i].makeAppointmentCollocation
+							}
+							if(dataList[i].type==2){
+								that.alltouList[1]=dataList[i].makeAppointmentCollocation
+							}
+						}
+					}
+					console.log(that.alltouList)
+				}else{
+					that.listtoubu=[];
+				}
+			})
+		},
 		getFl(){
 			var that=this;
 			myRequest({
@@ -147,7 +211,7 @@ export default {
 			// 	}
 			// });
 			uni.request({
-				url: "https://jisutqybmf.market.alicloudapi.com/weather/query",
+				url: "https://jisuqgtq.market.alicloudapi.com/weather/query",
 				method: "get",
 				header: {
 					'Authorization':'APPCODE e4b9accfb1f246cb8c0766a54efe8730'
@@ -157,22 +221,36 @@ export default {
 				},
 				dataType:'json',
 				success : function(data) {
-					
+					console.log(data.data.result)
+					that.tianqiList=data.data.result;
 				},
 				error : function(e) {
 					alert("网络异常,请重试");
 				}
 			});
 		},
-		bianji(){
+		bianji(type){
+			console.log(type)
 			uni.navigateTo({
-				url: "/pages/bianjigh/index",
+				url: "/pages/bianjigh/index?type="+type,
 			})
 		},
-		zidingyibianji(){
-			uni.navigateTo({
-				url: "/pages/zidingyi/index?type=1",
-			})
+		zidingyibianji(item){
+			console.log(item)
+			if(item.type==2){
+				// 衣橱
+				uni.navigateTo({
+					url: "/pages/baocun/index?id="+item.id+"&type=2",
+				})
+			}else{
+				// 大数据推荐1
+				uni.navigateTo({
+					url: "/pages/zidingyikan/index?id="+item.id+"&type=2",
+				})
+			}
+			// uni.navigateTo({
+			// 	url: "/pages/zidingyi/index?type=1",
+			// })
 		},
 		dapei(){
 			uni.navigateTo({

+ 23 - 4
pages/genghuan/index.vue

@@ -89,7 +89,8 @@ export default {
 	},
 	onLoad(e) {
 		this.goods_id=e.goods_id?e.goods_id:4;//是自己的
-		this.id=e.id?e.id:3;//是自己的
+		this.id=e.id?e.id:4;//是自己的
+		this.type=e.type?e.type:"tihuan";//是自己的
 	},
 	created() {
 		this.sys = uni.getSystemInfoSync();
@@ -104,9 +105,27 @@ export default {
 				return
 			}
 			var id=this.quanbuList[this.itemoff].id;
-			if(that.goods_id==id){
-				uni.navigateBack();
-				that.$refs.toast.show({model:'error',label:'修改成功'})
+			// if(that.id==id){
+			// 	uni.navigateBack();
+			// 	that.$refs.toast.show({model:'success',label:'修改成功'})
+			// 	return
+			// }
+			if(this.type=="tihuan"){
+				var datalist=uni.getStorageSync("datalist");
+				for(let i=0;i<datalist.length;i++){
+					if(datalist[i].id==this.id){
+						datalist[i]=this.quanbuList[this.itemoff];
+						uni.setStorageSync("datalist",datalist)
+						let pages = getCurrentPages(); // 当前页面
+						let beforePage = pages[pages.length - 2]; // 前一个页面
+						uni.navigateBack({
+							delta: 1,
+							success: function() {
+								beforePage.$vm.huancun()
+							}
+						});
+					}
+				}
 				return
 			}
 			myRequest({

+ 8 - 1
pages/index/index.vue

@@ -5,7 +5,7 @@
 		<!-- 衣柜 -->
 		<MardPage ref="yigui" v-if="showpage==1" @fatherMethod="initBtn"></MardPage>
 		<!-- 搭配 -->
-		<DapeiPage v-if="showpage==2"></DapeiPage>
+		<DapeiPage ref="chuanda" v-if="showpage==2" @fatherMethod="initshow"></DapeiPage>
 		<!-- 商城 -->
 		<ShopPage v-if="showpage==3"></ShopPage>
 		<!-- 我的 -->
@@ -49,6 +49,10 @@ export default {
 		if(index.index==1){
 			this.showpage=1;
 			this.initBtn()
+		}else if(index.index==2){
+			console.log("111")
+			this.showpage=2;
+			this.initshow()
 		}else{
 			this.showpage=0;
 		}
@@ -61,6 +65,9 @@ export default {
 			this.$refs.yigui.qingkong();
 			this.$refs.yigui.getQiu();
 		},
+		initshow(){
+			this.$refs.chuanda.shuaxin()
+		},
 		changepage(info){
 			this.showpage=info.index
 		}

+ 9 - 6
pages/shouye/index.vue

@@ -31,7 +31,7 @@
 							style="display: flex;align-items: center; justify-content: center;width: 46%;font-size: 16px;font-weight: bold;">
 							{{list[current].name}}
 						</view>
-						<view class="qiehuan">
+						<view class="qiehuan" v-if="list.length !=0">
 							<tm-translate class="fl a_1" :auto="true" ref="a_1" :duration="80" animation-name="zoomIn">
 								<image v-if="current==0" class="anniu mr-10" src="/static/img/14.png" mode="widthFix">
 								</image>
@@ -49,6 +49,7 @@
 							</tm-translate>
 						</view>
 					</view>
+					<tm-empty v-if="list.length ==0" label="暂无推荐" color="white" icon="icon-paperplane-fill"></tm-empty>
 				</view>
 			</tm-sheet>
 			<!-- 明日计划 -->
@@ -135,11 +136,11 @@
 							</view>
 						</view>
 					</view>
-
-					<view style="clear: both;" class="more ma-40 pt-40" @click="gengmore()">
+					<view style="clear: both;"></view>
+					<!-- <view style="clear: both;" class="more ma-40 pt-40" @click="gengmore()">
 						<image src="/static/img/30.png" mode="widthFix"></image>
 						<text class="text-size-s">下拉加载更多~</text>
-					</view>
+					</view> -->
 				</view>
 			</tm-sheet>
 		</view>
@@ -181,7 +182,9 @@
 				list1: [],
 				current: 0,
 				current1: 0,
-				listdata: []
+				listdata: [],
+				pagesize:10,
+				page:1
 			};
 		},
 		onLoad() {
@@ -293,7 +296,7 @@
 				myRequest({
 					url: "/api/ShopCollocation/hotList",
 					method: 'get',
-					data: that.reqData
+					data: {page:that.page,pagesize:that.pagesize}
 				}).then(res => {
 					if (res.data.code == 200) {
 						res.data.data.data.forEach(item => {

+ 1 - 0
pages/shouyedetail/index.vue

@@ -96,6 +96,7 @@ export default {
 							label: item.shopGoods.goods_details,
 							goods_id:item.shop_goods_id,
 							id: item.shopGoods.id,
+							price:item.shopGoods.sale_price
 						})
 					})
 				} else {

+ 13 - 13
pages/wardrobe/index.vue

@@ -18,32 +18,32 @@
 		<!-- 推荐 -->
 		<view class="zhuti">
 			<div>
-				<tm-sheet class="lunbo1 fl" @click="tiao">
+				<tm-sheet class="lunbo1 fl" v-for="item in quanbuchang">
 					<view class="flex-between flex-center">
 						<view class="tuijian">
-							<text class="text-white text-size-lg">校园穿搭</text>
+							<text class="text-white text-size-lg">{{item.title}}</text>
 						</view>
 						<!-- <view >
 							<text class="text-size-s C929297">详情</text>
 						</view> -->
 					</view>
 					<view class="flex-between flex-center mt-20 pa-8" style="border-radius: 4px;" :class="[$tm.vx.state().tmVuetify.black ? 'black' : ' ']">
-						<view class="tuijiantp">
-							<image style="vertical-align: middle;" src="/static/img/43.png" mode="widthFix"></image>
+						<view class="tuijiantp" v-for="item1 in item.info" @click="tiao(item1.id)">
+							<image style="vertical-align: middle;" :src="item1.image" mode="widthFix"></image>
 						</view>
-						<view class="tuijiantp">
+						<!-- <view class="tuijiantp">
 							<image class="fr" style="vertical-align: middle;" src="/static/img/44.png" mode="widthFix"></image>
-						</view>
+						</view> -->
 					</view>
 				</tm-sheet>
-				<tm-sheet class="lunbo1 fr">
+				<!-- <tm-sheet class="lunbo1 fr">
 					<view class="flex-between flex-center">
 						<view class="tuijian">
 							<text class="text-white text-size-lg">日常出勤</text>
 						</view>
-						<!-- <view >
+						<view >
 							<text class="text-size-s C929297">详情</text>
-						</view> -->
+						</view>
 					</view>
 					<view class="flex-between flex-center mt-20 pa-8" style="border-radius: 4px;" :class="[$tm.vx.state().tmVuetify.black ? 'black' : ' ']">
 						<view class="tuijiantp">
@@ -53,7 +53,7 @@
 							<image class="fr" style="vertical-align: middle;" src="/static/img/44.png" mode="widthFix"></image>
 						</view>
 					</view>
-				</tm-sheet>
+				</tm-sheet> -->
 				<view style="clear: both;"></view>
 			</div>
 			<!-- 衣橱 -->
@@ -255,9 +255,9 @@ export default {
 				url: "/pages/changan/index",
 			})
 		},
-		tiao(){
+		tiao(id){
 			uni.navigateTo({
-				url: "/pages/zidingyikan/index",
+				url: "/pages/zidingyikan/index?id="+id+"&type=1",
 			})
 		},
 		xiangqing(item){
@@ -378,7 +378,7 @@ export default {
 	.dingwei .touxiang{width: 50px;margin-right: 3px;	}
 	/deep/ .lunbo1{margin:0 !important;padding: 4px !important;margin-top: 5px !important;width: 46.6% !important;}
 	.tuijiantp{width: 100%;}
-	.tuijiantp image{width: 97% !important;}
+	.tuijiantp image{width: 76px !important;height: 76px !important;}
 	.yichu{margin:0 !important;padding: 4px !important;margin-top: 10px !important;}
 	/deep/ .qiehuan .text-white{
 		font-size: 14px;

+ 44 - 12
pages/zidingyikan/index.vue

@@ -18,25 +18,26 @@
 						<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">{{alldata.title}}</view>
+					<view class="text-align-center mt-20 text-white">{{alldata.title}}</view>
 					<!-- <view v-if="off==1" class="text-align-center mt-10 text-size-s">丝滑如肌肤</view> -->
 				</view>
 			</tm-sheet>
 		</div>
-		<view class="goumai shangpin" v-if="off!=1" >
-			<view class="pt-20"><text class="ml-20">衣物名</text><text class="fr mr-20 text-gray text-size-s">丝缎质感纹理风衣</text></view>
+		<view class="goumai shangpin" v-if="off==2">
+			<view class="pt-20"><text class="ml-20">套装名</text><text class="fr mr-20 text-gray text-size-s">{{alldata.title}}</text></view>
 			<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-sheet :shadow="24" class="jiaoxi xiao" v-if="off==1">
 			<tm-tabs align="center" class="qiehuan1" v-model="activeIndex" :list="list5" range-key="title"></tm-tabs>
 		</tm-sheet>
 		<!-- 单品 -->
-		<view class="zhuti shangpin">
+		<view class="zhuti shangpin" v-if="off==1">
 			<tm-sheet :padding="[0, 0]" class="jiaoxi xiao">
 				<tm-cartCellListFood  v-on:genghuan="genghuan" v-for="item in test" :typeclick="typeclick" :mdata="item" :cart-num.sync="item.buy"></tm-cartCellListFood>
+				<tm-empty v-if="test.length ==0" label="暂无数据" color="white" icon="icon-paperplane-fill"></tm-empty>
 			</tm-sheet>
 		</view>
-		<view class="anniu">
+		<view class="anniu" v-if="off==1">
 			<tm-menu direction="top" :list="listmingri" @change="yuyue">
 				<tm-button :round="24" theme="gray" size="n">预约明日</tm-button>
 			</tm-menu>
@@ -98,20 +99,52 @@ export default {
 		};
 	},
 	onLoad(e) {
-		this.off=e.type?e.type:1;//1是自己的
-		this.id=e.id?e.id:3;//1是自己的
+		this.off=e.type?e.type:2;//1是自己的
+		this.id=e.id?e.id:9;//1是自己的
 		if(this.off==1){
 			this.typeclick=6;
+			this.getDate();
+			this.getmingri();
 		}else{
-			
+			this.getShp()
 		}
 	},
 	created() {
 		this.sys = uni.getSystemInfoSync();
-		this.getDate();
-		this.getmingri();
+		
 	},
 	methods: {
+		jiarufuFun(data){
+			uni.navigateTo({
+				url: "/pages/shopdetail/index",
+			})
+		},
+		getShp(){
+			var that=this;
+			myRequest({
+				url: "/api/Collocation/matchingSchemeDetails",
+				method:'post',
+				data:{id:that.id,type:1}
+			}).then(res => {
+				if (res.data.code == 200) {
+					that.alldata=res.data.data.data;
+					that.test1=[];
+					res.data.data.details.forEach(item => {
+						that.test1.push({
+							img: item.shopGoods.image,
+							title: item.shopGoods.goods_name,
+							label: item.shopGoods.goods_details,
+							id: item.shopGoods.id,
+							buy: 0,
+							itemId: 0,
+							price:item.shopGoods.sale_price
+						})
+					})
+				}else{
+					
+				}
+			})
+		},
 		getmingri(){
 			var that=this;
 			myRequest({
@@ -180,7 +213,6 @@ export default {
 				method:'post',
 				data:{qiu_id:that.qiuid,id:that.chukudata[that.current].id}
 			}).then(res => {
-				console.log(res.data)
 				if (res.data.code == 200) {
 					that.show_1=false;
 					that.$refs.toast.show({model:'success',label:res.data.msg})

BIN
static/img/110.png


+ 2 - 2
tm-vuetify/components/tm-cartCellListFood/tm-cartCellListFood.vue

@@ -34,8 +34,8 @@
 				</view>
 				<view class="tm-cartCellListFood-price flex-between">
 					<view>
-						<text class="text-size-xs text-red" v-if="typeclick!=3 && typeclick!=6  && typeclick!=8">¥</text>
-						<text v-if="typeclick!=3 && typeclick!=6  && typeclick!=8"
+						<text class="text-size-xs text-red" v-if="typeclick!=7 && typeclick!=6  && typeclick!=8">¥</text>
+						<text v-if="typeclick!=7 && typeclick!=6  && typeclick!=8"
 							class="text-size-n text-red text-weight-b px-5">{{mdata[keyMap['price']]}}</text>
 						<text v-if="mdata[keyMap['unit']]"
 							class="text-size-xs text-grey pr-10">/{{mdata[keyMap['unit']]}}</text>

File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/app-plus/app-service.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/app-plus/app-view.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/app-plus/manifest.json


Some files were not shown because too many files changed in this diff