YZM il y a 2 ans
Parent
commit
9907656146

+ 9 - 0
pages.json

@@ -163,6 +163,15 @@
 					"titleNView": false
 				}
 			}
+		},
+		{
+			"path": "pages/luru/index",
+			"style": {
+				"navigationBarTitleText": "我的",
+				"app-plus":{
+					"titleNView": false
+				}
+			}
 		}
 	],
 	"tabBar": { 

+ 1 - 1
pages/chuanghome/index.vue

@@ -109,7 +109,7 @@ export default {
 				{title:"模特",id:61},
 			],
 			shenxing:'',
-			active:2,
+			active:3,
 			name:'',
 			val_1:'',
 			chelianglis:[

+ 16 - 3
pages/index/index.vue

@@ -3,7 +3,7 @@
 		<!-- 首页 -->
 		<HomePage v-if="showpage==0"></HomePage>
 		<!-- 衣柜 -->
-		<MardPage v-if="showpage==1"></MardPage>
+		<MardPage v-if="showpage==1" @fatherMethod="initBtn"></MardPage>
 		<!-- 搭配 -->
 		<DapeiPage v-if="showpage==2"></DapeiPage>
 		<!-- 商城 -->
@@ -43,10 +43,23 @@ export default {
 			showpage:0
 		};
 	},
-	onLoad() {
-		this.$tm.theme.setBlack(true);
+	onLoad(index) {
+		if(index.index==1){
+			this.showpage=1;
+		}else{
+			this.showpage=0;
+		}
+		console.log(index)
+		
+	},
+	created() {
+		
+		console.log(222)
 	},
 	methods: {
+		initBtn(){
+			console.log(333)
+		},
 		changepage(info){
 			this.showpage=info.index
 		}

+ 248 - 0
pages/luru/index.vue

@@ -0,0 +1,248 @@
+<template>
+	<view :style="{ minHeight: sys.windowHeight + 'px' }"
+		:class="[$tm.vx.state().tmVuetify.black ? 'black' : ' ']">
+		<tm-menubars title="衣物录入" :shadow="0" :showback="true"></tm-menubars>
+		<div class="zhuti">
+			<tm-sheet class="kuang" style="padding-bottom: 70px !important;">
+				<image v-if="active==1" class="jindu" src="/static/img/49.png" mode="widthFix"></image>
+				<image v-if="active==2" class="jindu" src="/static/img/50.png" mode="widthFix"></image>
+				<image v-if="active==3" class="jindu" src="/static/img/51.png" mode="widthFix"></image>
+				<view class="wenzi flex-between flex-center" style="margin-top: 10px;">
+					<view>
+						<text class="text-white text-size-m">衣物拍照</text>
+					</view>
+					<view>
+						<text class="text-white text-size-m">确认衣物属性</text>
+					</view>
+					<view>
+						<text class="text-white text-size-m">入库成功</text>
+					</view>
+				</view>
+				<view v-if="active==1">
+					<view class="mt-20 ml-15">
+						<text class="text-white text-size-m">*衣物拍照实例图</text>
+					</view>
+					<image block class="zhanshi" mode="widthFix" src="/static/img/48.png"></image>
+					<tm-button :round="24" class="mb-40" @click="paizhao()" block>拍照录入</tm-button>
+				</view>
+				<view v-if="active==2">
+					<image block class="nicheng" mode="widthFix" :src="koutu"></image>
+					<view class="you black mt-30">
+						<tm-input title="衣长" v-model="reqData.username" align="right"></tm-input>
+						<tm-input title="上市年份" v-model="reqData.height" align="right"></tm-input>
+						<tm-input title="颜色" v-model="reqData.weight" align="right"></tm-input>
+						<tm-input title="尺码" v-model="reqData.username" align="right"></tm-input>
+						<tm-input title="品牌" v-model="reqData.height" align="right"></tm-input>
+						<tm-input title="主材含量" v-model="reqData.weight" align="right"></tm-input>
+						<tm-input title="适用对象" v-model="reqData.weight" align="right"></tm-input>
+					</view>
+					<tm-button :round="24" class="sao mb-40 mt-40" @click="chuangjianFun()" block>下一步</tm-button>
+				</view>
+				<view v-if="active==3">
+					<tm-translate ref="a_1" :auto="true" animation-name="zoomIn">
+						<image block class="nicheng" mode="widthFix" src="/static/img/52.png"></image>
+					</tm-translate>
+					<view class="text-align-center mt-20">
+						<text class="text-size-m text-white">衣物添加成功!</text>
+					</view>
+					<view class="text-align-center mb-40">
+						<text class="text-size-m">您可以在我的衣柜中添加或删除衣物</text>
+					</view>
+					<view class="px-24">
+						<tm-button  @click="jixu()" :round="24" block class="mt-50 logincla">继续添加衣物</tm-button>
+						<tm-button @click="quindex()" theme="primary" :round="24" block class="mt-30 quindex">进入衣柜</tm-button>
+					</view>
+				</view>
+			</tm-sheet>
+		</div>
+		<!-- 弹出层消息 -->
+		<tm-message ref="toast"></tm-message>
+	</view>
+</template>	
+<script>
+import{myRequest} from '@/api/request.js'
+import { pathToBase64, base64ToPath } from '@/js_sdk/mmmm-image-tools/index.js'
+export default {
+	data() {
+		return {
+			reqData:{
+				username:'1',
+				height:'1',
+				weight:'1',
+			},
+			koutu:'/static/img/53.png',
+			shencaiList:[
+				{title:"梨形",id:21},
+				{title:"标准",id:31},
+				{title:"胖子",id:41},
+				{title:"瘦子",id:51},
+				{title:"模特",id:61},
+			],
+			shenxing:'',
+			active:3,
+			name:'',
+			val_1:'',
+			chelianglis:[
+				{title:"标准",id:21},
+				{title:"偏瘦",id:31},
+				{title:"偏胖",id:41},
+				{title:"梨形",id:51},
+				{title:"S型",id:61},
+			],
+			reqData:{
+				username:'',
+				height:'',
+				weight:'',
+				shencai:[]
+			},
+			renList:[]
+		};
+	},
+	onLoad() {
+		
+	},
+	created() {
+		this.sys = uni.getSystemInfoSync();
+		this.add()
+	},
+	methods: {
+		jixu(){
+			this.active=1;
+		},
+		quindex(){
+			// uni.setStorageSync("index",1)
+			// this.$emit('fatherMethod', )
+			uni.navigateTo({
+				url: "/pages/index/index?index=1",
+			})
+		},
+		tijiao(){
+			// console.log(this.renList)
+			// for(let i=0;i<this.renList.length;i++){
+			// 	if(this.renList[i].){}
+			// }
+			// this.active=4;
+		},
+		add(){
+			var timestamp = Date.parse(new Date());
+			var obj={
+				username:'',
+				height:'',
+				weight:'',
+				shencai:[],
+				timestamp:timestamp
+			}
+			this.renList.push(obj)
+		},
+		shanchu(timestamp){
+			var index = this.renList.findIndex((item) => {
+			  return item.timestamp == timestamp;
+			});
+			this.renList.splice(index, 1);
+		},
+		obTstr2(o){
+			if(Array.isArray(o)){
+				if(o.length.length===0) return "";
+				return o[0]?.title??""
+			}
+			return ''
+		},
+		paizhao(){
+			var that=this;
+			uni.chooseImage({     //uni官方api,用于选取本地图片
+				count: 1, //默认9
+				sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
+				sourceType: ['album','camera'], //从相册选择
+				success: function (res) {
+					that.imgpath = res.tempFilePaths[0]   //先获得本地文件的路径列表,存储到数组
+					console.log(that.imgpath)          //注意该api会将路径转换为blob格式
+					that.getBase64Image(that.imgpath);
+				}
+			})
+		},
+		getBase64Image(path){
+			var that=this;
+			console.log(" 开始转换")
+			pathToBase64(path)
+			  .then(base64 => {
+			   that.shibie(base64)
+			  })
+			  .catch(error => {
+			    console.error(error)
+			  })
+		},
+		shibie(src){
+			var that=this;
+			// 抠图
+			uni.request({
+				url: 'https://objseg.market.alicloudapi.com/commonseg/rgba',
+				method : "post",
+				header: {
+					'Authorization':'APPCODE e4b9accfb1f246cb8c0766a54efe8730',
+					"Content-Type":"application/json;charset=UTF-8"
+				},
+				data:{
+					photo:src
+				},
+				success : function(data) {
+					console.log(data)
+					that.koutu=data.data.data.result
+					that.active=2;
+				},
+				error : function(e) {
+					alert("网络异常,请重试");
+				}
+			});
+		},
+		chuangjianFun(){
+			var that=this;
+			// if(that.name==""){
+			// 	that.$refs.toast.show({model:'warn',label:'请输入家庭名称'})
+			// 	return
+			// }
+			that.active=3;
+		}
+	},
+}
+</script>
+
+<style lang="scss">
+	.zhanshi{
+		width: 100%;
+		margin: 0 auto;
+		margin-top: 10px;
+		margin-bottom: 40px;
+	}
+	/deep/ .tm-menubars .body{
+		background-color: #1b1b1b !important;
+	}
+	/deep/ .kuang{margin:0 !important;padding: 14px !important;margin-bottom: 40px !important;}
+	// /deep/ .kuang uni-button{background-color: #303440 !important;}
+	.jindu{width: 90%;margin: 0 auto;display: block;}
+	.wenzi{width: 94%;margin: 0 auto;}
+	.nicheng{width: 60%;display: block;margin:0 auto;margin-top: 50px;}
+	/deep/ .shuru .grey-darken-5{
+		background-color: #0d0d0d!important;
+		padding: 0px !important;
+	}
+	.shuru{border:1px solid #303030;border-radius: 10px;}
+	/deep/ .shuru .text-primary.bk{color:#303030 !important;}
+	/deep/ .shuru .border-grey-darken-4-b-1{border-bottom:none !important;}
+	.zuo image{width:60px;display: block;}
+	.you{border:1px solid #303030;border-radius: 10px;padding:10px;}
+	/deep/ .you .grey-darken-5{
+		background-color: #0d0d0d!important;
+		padding: 0px !important;
+	}
+	/deep/ .you .text-red{color: white;}
+	/deep/ .tan .active{background-color: #AAAAAA !important;}
+	/deep/ .tan .tm-poups .grey-darken-5{background-color: gray !important;}
+	/deep/ .tan uni-input{text-align: right;}
+	/deep/ .you .border-grey-darken-4-b-1 {
+	    border-bottom: solid 1px #313131 !important;
+	}
+	/deep/ .tm--badges{position: absolute;top: 0px;right:6px}
+	.logincla{margin-top: 100px;}
+	/deep/ .logincla .primary{background-color: #303440 !important;}
+	/deep/ .quindex uni-button{background-color: #0A84FF !important;}
+</style>

+ 5 - 0
pages/user/index.vue

@@ -71,6 +71,7 @@ export default {
 			{title:'历史记录',type:'7'},
 			{title:'创建家庭',type:'8'},
 			{title:'内容推送',type:'9'},
+			{title:'衣服录入',type:'10'},
 			]
 		};
 	},
@@ -95,6 +96,10 @@ export default {
 				uni.navigateTo({
 					url: "/pages/xiaoxi/index",
 				})
+			}else if(type==10){
+				uni.navigateTo({
+					url: "/pages/luru/index",
+				})
 			}
 		},
 		queren(){

+ 93 - 26
pages/yifu/index.vue

@@ -2,14 +2,59 @@
 	<view :style="{ minHeight: sys.windowHeight + 'px' }"
 		:class="[$tm.vx.state().tmVuetify.black ? 'black' : ' ']">
 		<tm-menubars title="衣物信息" :shadow="0" :showback="true"></tm-menubars>
-		<div class="zhuti">
-			<tm-sheet class="kuang" style="padding-bottom: 70px !important;">
-				<view style="width: 98%;margin:0 auto;">
-					<tm-tabs align="left" class="qiehuan1" v-model="activeIndex" :list="list" range-key="title"></tm-tabs>
-					<image class="touxiang" src="/static/img/60.png" mode="widthFix"></image>
+		<view class="C1b1b1b">
+			<view style="width: 90%;margin:0 auto;">
+				<tm-tabs align="left" class="qiehuan1" v-model="activeIndex" :list="list" range-key="title"></tm-tabs>
+			</view>
+			<image class="touxiang" src="/static/img/63.png" mode="widthFix"></image>
+		</view>
+		<div class="zhuti" style="padding-bottom:60px !important;">
+			<view class="text-align-center text-size-lg">新款冬季羽绒服</view>
+			<view class="text-align-center text-size-s mt-10 text-gray">蓬松、轻盈、温暖</view>
+			<tm-sheet class="kuang" style="padding-bottom: 30px !important;">
+				<view style="width: 98%;margin:0 auto;margin-top:20px !important;position: relative;">
+					<view class="text-white text-align-center pt-20">衣物参数</view>
+					<view class="fr mr-20 xiugai" @click="xiugaiFun()">
+						<image src="/static/img/64.png" mode="widthFix"></image>
+						<text>修改</text>
+					</view>
+					<view class="you black mt-30">
+						<tm-input :disabled="xianshi" title="衣长" v-model="reqData.username" align="right"></tm-input>
+						<tm-input :disabled="xianshi" title="上市年份" v-model="reqData.height" align="right"></tm-input>
+						<tm-input :disabled="xianshi" title="颜色" v-model="reqData.weight" align="right"></tm-input>
+						<tm-input :disabled="xianshi" title="尺码" v-model="reqData.username" align="right"></tm-input>
+						<tm-input :disabled="xianshi" title="品牌" v-model="reqData.height" align="right"></tm-input>
+						<tm-input :disabled="xianshi" title="主材含量" v-model="reqData.weight" align="right"></tm-input>
+						<tm-input :disabled="xianshi" title="适用对象" v-model="reqData.weight" align="right"></tm-input>
+					</view>
 				</view>
 			</tm-sheet>
-			<tm-button :round="24" class="sao mb-40 mt-40" block>提交</tm-button>
+			<tm-sheet class="kuang">
+				<view style="width: 98%;margin:0 auto;margin-top:20px !important;">
+					<view class="text-white text-align-center pt-20">类似衣物</view>
+					<view class="yiguicla black pa-6 ma-4 fl mb-20" v-for="item in quanbuList" @click="yifu()">
+						<image :src="item.src" mode="widthFix"></image>
+						<view class="text-align-center text-size-m mt-8">{{item.text}}</view>
+						<view class="text-align-center text-size-m mt-6 mb-6">{{item.type}}</view>
+					</view>
+					<view style="clear: both;"></view>
+				</view>
+			</tm-sheet>
+			<tm-sheet class="kuang">
+				<view style="width: 98%;margin:0 auto;margin-top:20px !important;">
+					<view class="text-white text-align-center pt-20">品牌信息</view>
+					<tm-listitem
+						class="pb-20"
+						:left-icon-size="100"
+						value="100件商品"
+						title="巴黎世家"
+						label="只此一瞬,狂爱一生"
+						left-icon="../../static/img/65.png"
+						show-left-icon
+					></tm-listitem>
+				</view>
+			</tm-sheet>
+			<tm-button :round="24" class="sao mb-40" block>出库</tm-button>
 		</div>
 		<!-- 弹出层消息 -->
 		<tm-message ref="toast"></tm-message>
@@ -20,12 +65,27 @@ import{myRequest} from '@/api/request.js'
 export default {
 	data() {
 		return {
-			checked1:false,
-			checked2:false,
-			checked3:false,
-			beizu:'',
+			xianshi:true,
 			list:[ '商品介绍','搭配方案'],
 			activeIndex:0,
+			reqData:{
+				username:'1',
+				height:'1',
+				weight:'1',
+			},
+			quanbuList:[{
+				src:'/static/img/45.png',
+				text:'NEO CITY 涂鸦',
+				type:'手提包'
+			},{
+				src:'/static/img/46.png',
+				text:'满印迷你标识',
+				type:'围巾'
+			},{
+				src:'/static/img/47.png',
+				text:'大号版型夹克',
+				type:'新品'
+			}]
 		};
 	},
 	onLoad() {
@@ -35,21 +95,9 @@ export default {
 		this.sys = uni.getSystemInfoSync();
 	},
 	methods: {
-		aa(num){
-			if(num==1){
-				this.checked1=true;
-				this.checked2=false;
-				this.checked3=false;
-			}else if(num==2){
-				this.checked1=false;
-				this.checked2=true;
-				this.checked3=false;
-			}else if(num==3){
-				this.checked1=false;
-				this.checked2=false;
-				this.checked3=true;
-			}
-		},
+		xiugaiFun(){
+			this.xianshi=false;
+		}
 	},
 }
 </script>
@@ -61,5 +109,24 @@ export default {
 	/deep/ .zhuti{padding: 10px 10px;}
 	/deep/ .kuang{margin:0 !important;padding: 0px !important;}
 	/deep/ .qiehuan1 .text-primary{color: white !important;}
-	.touxiang{width: 100%;margin:0 auto;display: block;margin-top: 20px;}
+	.touxiang{width: 100%;display: block;margin-top: 10px;}
+	.xiugai image{width: 18px;vertical-align: middle;margin-right:5px;}
+	.xiugai text{vertical-align: middle;}
+	.xiugai{position: absolute;right:5px;top:10px;}
+	.you{border-radius: 10px;padding:10px;width: 88%;margin:0 auto;margin-top:20px;}
+	/deep/ .you .grey-darken-5{
+		background-color: #0d0d0d!important;
+		padding: 0px !important;
+	}
+	/deep/ .you .text-red{color: white;}
+	/deep/ .tan .active{background-color: #AAAAAA !important;}
+	/deep/ .tan .tm-poups .grey-darken-5{background-color: gray !important;}
+	/deep/ .tan uni-input{text-align: right;}
+	/deep/ .you .border-grey-darken-4-b-1 {
+	    border-bottom: solid 1px #313131 !important;
+	}
+	.yiguicla image{width: 95%;display: block;margin: 0 auto;margin-top: 5px;}
+	.yiguicla{width: 30%;border-radius: 10px;}
+	.sao{width: 88%;margin:0 auto;margin-top:40px;}
+	/deep/ .mx-32{margin:0px !important;margin-top:15px !important;}
 </style>

BIN
static/img/63.png


BIN
static/img/64.png


BIN
static/img/65.png


Fichier diff supprimé car celui-ci est trop grand
+ 1 - 2
unpackage/dist/dev/app-plus/app-config-service.js


Fichier diff supprimé car celui-ci est trop grand
+ 5 - 1
unpackage/dist/dev/app-plus/app-service.js


Fichier diff supprimé car celui-ci est trop grand
+ 13 - 11
unpackage/dist/dev/app-plus/app-view.js


BIN
unpackage/dist/dev/app-plus/static/img/63.png


BIN
unpackage/dist/dev/app-plus/static/img/64.png


BIN
unpackage/dist/dev/app-plus/static/img/65.png


Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff