master
wsq 2 years ago
parent 5853626dba
commit 1f7b8a7f3d

@ -0,0 +1,10 @@
简介:
项目于 2022 年 11月完成我们创建了一个虚拟衣橱您可以用它对衣服进行整理分类管理对所拥有的衣服进行重新搭配推荐还可以根据天气情况推荐出行搭配。
## 安装
若要运行此项目,需要在微信注册“百里挑衣”小程序。
##创建背景
随着现在购物软件的快速发展,大家会买很多衣服,有时可能会忘记自己有哪些衣服,导致同一款式的衣服会买很多件,很多衣服没有穿几次就过时了,所以可以做一款微信小程序来将大家的衣服进行整理分类,可借助于手机拍照、服装数据表、用户注册数据表、用户个人信息数据表和计算机软件,组成一个依托互联网的信息系统,构成系统的各个要素之间相互交互和协同,从而为用户提供更好的衣服管理、穿衣搭配解决方案。
##功能介绍
系统主要功能包括:录入用户个人身高体重维度信息,记录自己的身体特征;管理用户电子衣橱,通过拍照和填写服饰属性获取用户的服饰信息从而进行归类,实现用户衣橱数字化;用户可以随时查看自己衣橱中的服饰,可以自行删除服饰来更新衣橱;根据当前天气为用户推荐合适的服饰搭配,根据用户输入关键词推荐合适的服饰。
##配置环境:
微信小程序安卓版

Binary file not shown.

After

Width:  |  Height:  |  Size: 533 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 967 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 963 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 806 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 252 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 171 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 193 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 180 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 834 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 940 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 693 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 389 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 357 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 382 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 596 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 273 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 441 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

@ -0,0 +1,328 @@
// pages/index/index.js
Page({
data: {
ip:'82.157.11.188' ,
port:8080,
password:'',
islogin:1,
inputipone:'',//登录注册时时输入的手机号
compassiphone:'',//找回密码时输入的手机号
loginbtnstate:true,
strloginUser:'',//登录用户名
strloginpassword:'',//用户密码
switchChecked:'',//选中按钮
},
onLoad() {
var _this = this;
_this.setData({
strloginUser: wx.getStorageSync("iphone"),
strloginpassword: wx.getStorageSync("password"),
switchChecked:wx.getStorageSync('checkedValue'),
loginbtnstate:wx.getStorageSync('wxlogin'),
})
console.log(_this.data.strloginUser+_this.data.strloginpassword+_this.data.switchChecked)
},
//判断是否要记住密码
bindswitchchange: function (event) {
//得到值
var checkedValue = event.detail.value;
console.log("开关状态"+checkedValue);
var _this = this;
if (checkedValue == true){
_this.setData({
switchChecked:true,
})
// wx.setStorageSync("iphone",_this.data.strloginUser);
// wx.setStorageSync("password",_this.data.strloginpassword);
//wx.setStorageSync("checkedValue", _this.data.switchChecked);
console.log(checkedValue);
} else if (checkedValue == false) {
_this.setData({
switchChecked: false
})
// wx.setStorageSync("iphone","");
// wx.setStorageSync("password","");
}
},
//输入密码(登录界面判断有无)
password1:function(event){
var that = this
var m=event.detail.value
console.log(event.detail.value)
if(m!=''){
this.setData({
strloginpassword:m
})
if(this.data.strloginUser!=''&&(this.data.strloginUser.length==11))
{
this.setData({
loginbtnstate:false
})
}
else{
this.setData({
loginbtnstate:true,
})
}
}
else{
this.setData({
loginbtnstate:true,
password:''
})
}
},
//输入手机号(登录界面判断有无)
inputiphone1:function(event){
console.log(event.detail.value)
var m=event.detail.value
if(m!=''&&(m.length==11)){
this.setData({
strloginUser:m
})
if(this.data.strloginpassword!='')
{
this.setData({
loginbtnstate:false
})
}
else{
this.setData({
loginbtnstate:true,
})
}
}
else{
this.setData({
loginbtnstate:true,
})
}
},
//输入密码(注册界面判断有无)
password2:function(event){
console.log(event.detail.value)
var m=event.detail.value
if(m!=''){
this.setData({
password:m
})
if(this.data.inputipone!=''&&(this.data.inputipone.length==11))
{
this.setData({
loginbtnstate:false
})
}
else{
this.setData({
loginbtnstate:true,
})
}
}
else{
this.setData({
loginbtnstate:true,
password:''
})
}
},
//输入手机号(注册界面判断有无)
inputiphone2:function(event){
console.log(event.detail.value)
var m=event.detail.value
if(m!=''&&(m.length==11)){
this.setData({
inputipone:m
})
if(this.data.password!='')
{
this.setData({
loginbtnstate:false
})
}
else{
this.setData({
loginbtnstate:true,
})
}
}
else{
this.setData({
loginbtnstate:true,
inputipone:''
})
}
},
//找回密码输入框
compass:function(event){
console.log("找回密码"+event.detail.value)
var m=event.detail.value
if(m!=''&&(m.length==11)){
this.setData({
compassiphone:m,
loginbtnstate:false
})
}
else{
this.setData({
loginbtnstate:true,
inputipone:''
})
}
},
//登录
onlogin:function(e){
var that=this
//记住密码
var checkedValue = that.data.switchChecked;
console.log(checkedValue);
//如果记住密码则向微信缓存写入账号密码
//如果不记住密码则清空微信缓存存在的账号密码
if (checkedValue == true) {
wx.setStorageSync("iphone",that.data.strloginUser);
wx.setStorageSync("password",that.data.strloginpassword);
wx.setStorageSync("checkedValue", that.data.switchChecked);
wx.setStorageSync("wxlogin", false);
console.log(that.data.loginbtnstate)
} else if (checkedValue == false) {
wx.setStorageSync("iphone","");
wx.setStorageSync("password","");
wx.setStorageSync("checkedValue", false);
wx.setStorageSync("wxlogin", true);
}
//开始检查用户名和密码是否一致
var userinfos=wx.getStorageSync('userjobs') ||[];//找数组
if(userinfos.iphone==that.data.strloginUser){
if(userinfos.password==that.data.strloginpassword)
{
wx.showToast({
title: '登录成功',
duration:2000,
}),
wx.switchTab({
url: '../navigation/index/index'
})
}
else{
wx.showToast({
title: '密码错误',
duration:2000
})
}
}
else{
wx.showToast({
title: '用户名不存在',
duration:2000
})
}
},
//注册
formsubmit:function(e){
var that=this
console.log(e.detail.value)
var obj={}
obj.password=e.detail.value.inputpassword,
obj.iphone=e.detail.value.iphone,
console.log(obj)
//存入多个注册用户
//初始化云
wx.cloud.init({
env:'cloud1-5ggzbo3kcd4ea4e2'
});
//初始化数据库
const db=wx.cloud.database();
db.collection('user').add({
data: {
iphone:obj.iphone,
password:obj.password,
},
sucess:function(res){
console.log("添加成功",res);
},
fail:function(res){
console.log(res.errMsg,"添加失败")
}
})
//var arr=wx.getStorageSync('userjobs') ||[];
//arr.push(obj);
wx.setStorageSync('userjobs', obj);
wx.showToast({
title: '注册成功',
duration:1000,
success:function(){
that.setData({
islogin:1
})
}
})
},
//找回密码
comebackpassword:function(e){
var that =this
let wsy=wx.getStorageSync('userjobs') || [];//找数组
console.log("输入的手机号"+that.data.compassiphone)
console.log("本地缓存的手机号"+wsy.iphone)
if(wsy.iphone==that.data.compassiphone)
{
wx.setClipboardData({
data: wsy.password,
success (res) {
wx.getClipboardData({
success (res) {
console.log(res.data) // data
that.setData({
islogin:1
})
wx.showToast({
title: '密码已复制',
duration:2000
})
}
})
}
})
}
else
{
wx.showToast({
title: '该手机号码未注册',
duration:2000
})
}
},
//转到注册
register:function(event){
var that = this
that.setData({
islogin:3
})
},
//转到登录
denglu:function(event){
var that = this
that.setData({
islogin:1
})
},
//转到忘记密码
forget:function(event){
this.setData({
islogin:2
})
}
})

@ -0,0 +1,5 @@
{
"usingComponents": {},
"navigationBarTitleText":""
}

@ -0,0 +1,14 @@
<!--pages/navigation/index/add/camera/camera.wxml-->
<!--<text>pages/navigation/index/add/camera/camera.wxml<text>-->
<!--camera.wxml-->>
<camera device-postition="back" flash="off" binderror="error" style="width:100%;height:300px;"></camera>
<button type="primary" bindtap="takePhoto">拍照</button>
<view>预览</view>>
<image mode="widthFix" src="{{src}}" bindtap="see"></image>
<button type="primary" bindtap="upload">上传</button>
<button type="primary" bindtap="gotoPage">添加服饰信息</button>

@ -0,0 +1 @@
/* pages/navigation/index/add/camera/camera.wxss */

@ -0,0 +1,166 @@
// pages/navigation/index/index.js
import Toast from './@vant/weapp/toast/toast';
let app=getApp();
Page({
/**
* 页面的初始数据
*/
data: {
active: 0,
show_clothes:[],//显示衣服
},
//增加服饰
add()
{
console.log("增加服饰")
wx.navigateTo({
url: './add/camera/camera',
})
},
//删除服饰
delete()
{
console.log("删除服饰")
wx.navigateTo({
url: './delete/delete',
})
},
tabbar_change(event) {
// event.detail 的值为当前选中项的索引
console.log("跳转",event.detail);
this.setData({ active: event.detail });
},
//添加的
on_clear()
{
this.setData({ show_recommend:[],show_match_clothes:[]});
},
// 搜索
onChange(event) {
// event.detail 为当前输入的值
console.log(event.detail);
let s=26-event.detail,t=0;
let a=event.detail,r=0;
console.log("温度",s);
this.data.show_clothes=[];
for(let n in app.globalData.clothes)
{
if(app.globalData.clothes[n].T==s)
{
this.data.show_clothes[t]=app.globalData.clothes[n];
this.data.show_clothes[t].img="/pages/img/衣服/"+app.globalData.clothes[n].name+".jpg";
t++;
}
else if(app.globalData.clothes[n].kind==a||app.globalData.clothes[n].pattern==a||app.globalData.clothes[n].style==a||app.globalData.clothes[n].colour==a||app.globalData.clothes[n].thickness==a||app.globalData.clothes[n].season==a)
{
this.data.show_clothes[r]=app.globalData.clothes[n];
this.data.show_clothes[r].img="/pages/img/衣服/"+app.globalData.clothes[n].name+".jpg";
r++;
}
}
console.log("衣服",this.data.show_clothes);
let g_this=this;
if(this.data.show_clothes.length>0)
{
console.log("可以跳转")
wx.navigateTo({
url: './show_clothes/show_clothes',
events: {
// 为指定事件添加一个监听器,获取被打开页面传送到当前页面的数据
acceptDataFromOpenedPage: function(data) {
console.log(data)
},
someEvent: function(data) {
console.log(data)
}
},
success: function(res) {
// 通过 eventChannel 向被打开页面传送数据
res.eventChannel.emit('show_clothes', { data: g_this.data.show_clothes })
}
})
}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

@ -0,0 +1,4 @@
{
"usingComponents": {},
"navigationBarTitleText":""
}

@ -0,0 +1,22 @@
<!--pages/navigation/index/index.wxml-->
<van-toast id="van-toast" />
<view >
<image class="beijing2" src="../../img/背景.png"></image>
<view style="padding:40rpx;">
<view style=" display: -webkit-flex;display: flex;border-radius: 30rpx;background-color:white;">
<van-icon custom-style="margin-left:50rpx;"name="search" />
<van-field custom-style="min-width:500rpx;"clearable model:value="{{ user }}" placeholder="请输入关键字" border="{{ false }}" bind:change="onChange"/>
</view>
</view>
<navigator url="../index/recommand/recommand"><image class="tuijian" src="../../img/shishang.png"></image></navigator>
<view style=" display: -webkit-flex;display: flex;justify-content:space-around;" class="aaa">
<van-button plain hairline bindtap="add" type="primary" class="add">增加服饰</van-button>
<van-button plain hairline bindtap="delete" type="info" class="del">删除服饰</van-button>
</view>
</view>

@ -0,0 +1,20 @@
/* pages/navigation/index/index.wxss */
page{
background-color:#d7e9db;
}
.beijing2{
position: absolute;
width: 100%;
height: 100%;
z-index: -999;
}
.tuijian{
width:700rpx;
height:450rpx;
padding-left: 30rpx;
padding-top: 90rpx;
}
.aaa{
padding-top: 80rpx;
}

@ -0,0 +1,259 @@
// pages/navigation/index/recommand/recommand.js
import Toast from './@vant/weapp/toast/toast';
let app=getApp();
Page({
/**
* 页面的初始数据
*/
data: {
active: 0,
show_clothes:[],//显示衣服
show_recommend:[],//显示推荐
show_match_clothes:[],//显示搭配
recommend:{
//-10-5℃
a:{
recommend:['coat9','pants4'],//推荐
match_clothes:[]//搭配
},
//5-15℃
b:{
recommend:['hoodie3','pants5'],//推荐
match_clothes:['sweater8','pants7']//搭配
},
//5-15℃
c:{
recommend:['hoodie1','pants1'],//推荐
match_clothes:[]//搭配
},
//25-40℃
d:{
recommend:['skirt10'],//推荐
match_clothes:['t-shirt2','pants10']//搭配
}
},
},
on_clear()
{
this.setData({ show_recommend:[],show_match_clothes:[]});
},
onChange(event) {
// event.detail 为当前输入的值
let s=26-event.detail,t=0;
console.log("温度",s,event.detail.length);
if(event.detail==' '||event.detail.length==0)
{
event.detail="无"
}
this.setData({ show_recommend:[],show_match_clothes:[]});
if(event.detail<5&&event.detail>-10)
{
for(let n in this.data.recommend.a)
{
if(n=='recommend')
{
//推荐
for(let i in this.data.recommend.a[n])
{
this.data.show_recommend.push("/pages/img/衣服/"+this.data.recommend.a[n][i]+".jpg")
}
}else{
//搭配
for(let i in this.data.recommend.a[n])
{
this.data.show_match_clothes.push("/pages/img/衣服/"+this.data.recommend.a[n][i]+".jpg")
}
}
}
console.log("数据a")
this.setData({ show_recommend:this.data.show_recommend,show_match_clothes:this.data.show_match_clothes});
return 0;
}else if(event.detail<15&&event.detail>5)
{
console.log("数据b")
for(let n in this.data.recommend.b)
{
if(n=='recommend')
{
//推荐
for(let i in this.data.recommend.b[n])
{
this.data.show_recommend.push("/pages/img/衣服/"+this.data.recommend.b[n][i]+".jpg")
}
}else{
//搭配
for(let i in this.data.recommend.b[n])
{
this.data.show_match_clothes.push("/pages/img/衣服/"+this.data.recommend.b[n][i]+".jpg")
}
}
}
this.setData({ show_recommend:this.data.show_recommend,show_match_clothes:this.data.show_match_clothes});
return 0;
}else if(event.detail<25&&event.detail>15)
{
console.log("数据c")
for(let n in this.data.recommend.c)
{
if(n=='recommend')
{
//推荐
for(let i in this.data.recommend.c[n])
{
this.data.show_recommend.push("/pages/img/衣服/"+this.data.recommend.c[n][i]+".jpg")
}
}else{
//搭配
for(let i in this.data.recommend.c[n])
{
this.data.show_match_clothes.push("/pages/img/衣服/"+this.data.recommend.c[n][i]+".jpg")
}
}
}
this.setData({ show_recommend:this.data.show_recommend,show_match_clothes:this.data.show_match_clothes});
return 0;
}else if(event.detail<40&&event.detail>25)
{
for(let n in this.data.recommend.d)
{
if(n=='recommend')
{
//推荐
for(let i in this.data.recommend.d[n])
{
this.data.show_recommend.push("/pages/img/衣服/"+this.data.recommend.d[n][i]+".jpg")
}
}else{
//搭配
for(let i in this.data.recommend.d[n])
{
this.data.show_match_clothes.push("/pages/img/衣服/"+this.data.recommend.d[n][i]+".jpg")
}
}
}
this.setData({ show_recommend:this.data.show_recommend,show_match_clothes:this.data.show_match_clothes});
console.log("数据1111",this.data.show_recommend,this.data.show_match_clothes)
return 0;
}
this.data.show_clothes=[];
for(let n in app.globalData.clothes)
{
if(app.globalData.clothes[n].t==s)
{
this.data.show_clothes[t]=app.globalData.clothes[n];
this.data.show_clothes[t].img="/pages/img/衣服/"+app.globalData.clothes[n].name+".jpg";
t++;
}
}
console.log("衣服",this.data.show_clothes);
let g_this=this;
if(this.data.show_clothes.length>0)
{
console.log("可以跳转")
wx.navigateTo({
url: './show_clothes/show_clothes',
events: {
// 为指定事件添加一个监听器,获取被打开页面传送到当前页面的数据
acceptDataFromOpenedPage: function(data) {
console.log(data)
},
someEvent: function(data) {
console.log(data)
}
},
success: function(res) {
// 通过 eventChannel 向被打开页面传送数据
res.eventChannel.emit('show_clothes', { data: g_this.data.show_clothes })
}
})
}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

@ -0,0 +1,27 @@
<!--pages/navigation/index/recommand/recommand.wxml-->
<van-toast id="van-toast" />
<view >
<image class="beijing2" src="../../../img/背景.png"></image>
<view style="padding:40rpx;">
<view style=" display: -webkit-flex;display: flex;border-radius: 30rpx;background-color:white;">
<van-icon custom-style="margin-left:50rpx;"name="search" />
<van-field custom-style="min-width:500rpx;"clearable model:value="{{ user }}" placeholder="请输入关键字" border="{{ false }}" bind:change="onChange"/>
</view>
</view>
<view wx:if="{{show_recommend.length >=1}}">
<view style="margin-left:50rpx;color:green;font-size:40rpx;">推 荐</view>
<view style="display: flex;justify-content:center;flex-wrap:wrap;gap:20rpx;" >
<van-image round width="10rem" height="10rem" wx:for="{{show_recommend}}" wx:for-index="index" wx:for-item="item" wx:key="index" src="{{item}}" />
</view>
<view style="margin-left:50rpx;color:orange;font-size:40rpx;">搭 配</view>
<view style="display: flex;justify-content:center;flex-wrap:wrap;gap:20rpx;" >
<van-image round width="10rem" height="10rem" wx:for="{{show_match_clothes}}" wx:for-index="index" wx:for-item="item" wx:key="index" src="{{item}}" />
</view>
</view>
</view>

@ -0,0 +1,7 @@
/* pages/navigation/index/recommand/recommand.wxss */
.beijing2{
position: absolute;
width: 100%;
height: 100%;
z-index: -999;
}

@ -0,0 +1,82 @@
// pages/navigation/self/self.js
/**
* 页面的初始数据
*/
var app = getApp();
Page({
data: {
},
joinVip: function () {
wx.navigateTo({
url: '../../navigation/index/index',
})
},
exitlogin:function(){
wx.redirectTo({
url: '../../index/index',
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

@ -0,0 +1,38 @@
<!--pages/navigation/self/self.wxml-->
<image class="beijing1" src="../../img/背景.png"></image>
<view class="header">
<view class="user_box" bindtap='joinVip'>
<view class="logo">
<image src="../../img/person.png" ></image>
</view>
<text class='headname'>手机用户 </text>
</view>
<view class="nav">
<view class="item">
<view class='wallet'>
<text decode="{{true}}" space="{{true}}">&nbsp;&nbsp;</text>
<navigator url="../userinform/userinform">
<image src='../../img/fri.png' class='iimg'></image>用户信息
</navigator>
</view>
</view>
<view class="item">
<view class='wallet'>
<text decode="{{true}}" space="{{true}}">&nbsp;&nbsp;</text>
<navigator url="../safety/safety"><image src='../../img/safe.png' class='iimg'></image>账号安全</navigator>
</view>
</view>
<view class="item" >
<view class='wallet'>
<text decode="{{true}}" space="{{true}}">&nbsp;&nbsp;</text>
<navigator url="../shezhi/shezhi"><image src='../../img/设置.png' class='iimg'></image>设置</navigator>
</view>
</view>
</view>
</view>
<button class="exit" color="#3d7ef9" bindtap="exitlogin">退出登录</button>

@ -0,0 +1,98 @@
/* pages/navigation/self/self.wxss */
page {
padding-bottom: 50rpx;
background: -webkit-linear-gradient(top, #143307 0%,#CCCCCC 100%);
background: -o-linear-gradient(top, #256d17 0%,#CCCCCC 100%);
background: -ms-linear-gradient(top, #074414 0%,#beb7b7 100%);
background: linear-gradient(to bottom, #58b142 0%,#abce97 100%);
}
.beijing1{
position: absolute;
width: 100%;
height: 100%;
z-index: -999;
}
.header {
padding: 0 25rpx;
padding-top: 40rpx;
padding-bottom: 50rpx;
width: 100%;
}
.iimg{
width: 45rpx;
height: 45rpx;
margin-right: 10rpx;
top: 10rpx;
position: relative;
}
.user_box {
display: flex;
align-items: center;
width: 94%;
height: 115px;
background: rgba(255,255,255,0.7);
}
.logo {
margin-left: 20px;
margin-right: 20px;
width: 150rpx;
height: 150rpx;
border-radius: 50%;
background: #fff;
}
.logo image {
width: 100%;
height: 100%;
border-radius: 100%;
will-change: transform;
}
.user_name {
display: flex;
align-items: center;
font-size: 36rpx;
font-weight: bold;
color: #fff;
}
.user_name image {
margin-left: 16rpx;
width: 84rpx;
height: 31rpx;
}
.headname{
margin-left: 5px;
font-size: 20px;
}
.nav {
margin-top: 50px;
font-size: 34rpx;
background: rgba(255,255,255,0.7);
width: 94%;
}
.nav .item {
display: flex;
flex-direction: row;
justify-content: space-between;
border-bottom: 1px solid #e5e5e5;
padding: 30rpx 0;
}
.wallet{
display: flex;
flex-direction: row;
}
.exit{
border: solid 1rpx #73ccd8;
margin-top: 80rpx;
width: 70%;
background-color: #b6d6b2;
border-radius: 40rpx;
}

@ -0,0 +1,186 @@
// pages/navigation/userinform/userinform.js
Page({
/**
* 页面的初始数据
*/
data: {
ip:'82.157.11.188' ,
port:8080,
insshen:'',
intti:'',
inyyao:'',
inttui:'',
inxxiong:'',
inttun:''
},
saveinform:function(){
wx.switchTab({
url: '../self/self'
})
//初始化云
wx.cloud.init({
env:'cloud1-5ggzbo3kcd4ea4e2'
});
//初始化数据库
const db=wx.cloud.database();
db.collection('user').add({
data: {
iphone:obj.iphone,
password:obj.password,
insshen:this.data.insshen,
intti:this.data.intti,
inyyao:this.data.inyyao,
inttui:this.data.inttui,
inxxiong:this.data.inxxiong,
inttun:this.data.inttun
},
sucess:function(res){
console.log("添加成功",res);
},
fail:function(res){
console.log(res.errMsg,"添加失败")
}
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad:function (options){
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
const self = this
var userText1 = wx.getStorageSync('userText1')
var userText2 = wx.getStorageSync('userText2')
var userText3 = wx.getStorageSync('userText3')
var userText4 = wx.getStorageSync('userText4')
var userText5 = wx.getStorageSync('userText5')
var userText6 = wx.getStorageSync('userText6')
if (userText1) {
self.data.insshen = userText1;
self.setData(self.data);
} // page载入的时候先读取一次wx.getStorageSync('userText')里面有没有内容,有内容就填充,没有则什么也不做
if (userText2) {
self.data.intti = userText2;
self.setData(self.data)
}
if (userText3) {
self.data.inyyao = userText3
self.setData(self.data)
}
if (userText4) {
self.data.inxxiong = userText4
self.setData(self.data)
}
if (userText5) {
self.data.inttui = userText5
self.setData(self.data)
}
if (userText6) {
self.data.inttun = userText6
self.setData(self.data)
}
},
outsshen(e){
const self = this
const value = e.detail.value
if (value) {
wx.setStorageSync('userText1', value)
console.log(value)
} // 监听用户输入的信息一旦有内容输入进去就会使用wx.setStorageSync('userText', value)设置usertext这个key的值使用wx.getStorageSync('userText')可以得到usertext这个key的值
},
outtti(e){
const self = this
const value = e.detail.value
if (value) {
wx.setStorageSync('userText2', value)
}
console.log(value)
},
outyyao(e){
const self = this
const value = e.detail.value
if (value) {
wx.setStorageSync('userText3', value)
}
console.log(value)
},
outxxiong(e){
const self = this
const value = e.detail.value
if (value) {
wx.setStorageSync('userText4', value)
}
console.log(value)
},
outttui(e){
const self = this
const value = e.detail.value
if (value) {
wx.setStorageSync('userText5', value)
}
console.log(value)
},
outttun(e){
const self = this
const value = e.detail.value
if (value) {
wx.setStorageSync('userText6', value)
}
console.log(value)
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

@ -0,0 +1,29 @@
<!--pages/navigation/userinform/userinform.wxml-->
<image class="beijing" src="../../img/背景.png"></image>
<view class="user_box">
<view class="logo">
<image src="../../img/person.png" ></image>
</view>
<text class='headname'>手机用户 </text>
</view>
<view class="input">
<view class="s">身高<input type="text" class="shengao" value='{{insshen}}' bindinput="outsshen" placeholder="请输入身高"/></view>
<text decode="{{true}}" space="{{true}}">&nbsp;&nbsp;</text>
<view class="t">体重<input type="number" class="tizhong" value='{{intti}}' maxlength="3" bindinput="outtti" placeholder="请输入体重"/></view>
<text decode="{{true}}" space="{{true}}">&nbsp;&nbsp;</text>
<view class="y">腰围<input type="number" class="yaowei" value='{{inyyao}}' maxlength="3" bindinput="outyyao" placeholder="单位(厘米)"/></view>
<text decode="{{true}}" space="{{true}}">&nbsp;&nbsp;</text>
<view class="x">胸围<input type="number" class="xiongwei" value='{{inxxiong}}' maxlength="3" bindinput="outxxiong" placeholder="单位(厘米)"/></view>
<text decode="{{true}}" space="{{true}}">&nbsp;&nbsp;</text>
<view class="tui">腿围<input type="number" class="tuiwei" value='{{inttui}}' maxlength="3" bindinput="outttui" placeholder="单位(厘米)"/></view>
<text decode="{{true}}" space="{{true}}">&nbsp;&nbsp;</text>
<view class="tun">臀围<input type="number" class="tunwei" value='{{inttun}}' maxlength="3" bindinput="outttun" placeholder="单位(厘米)"/></view>
</view>
<button class="save" bindtap="saveinform" >保存</button>

@ -0,0 +1,53 @@
/* pages/navigation/userinform/userinform.wxss */
.beijing{
position: absolute;
width: 100%;
height: 100%;
z-index: -999;
}
.user_box {
display: flex;
align-items: center;
width: 94%;
height: 115px;
margin-left: 100rpx;
}
.logo {
margin-left: 20px;
margin-right: 20px;
width: 150rpx;
height: 150rpx;
border-radius: 50%;
background: rgba(255, 255, 255, 0.952);
}
.logo image {
width: 100%;
height: 100%;
border-radius: 100%;
will-change: transform;
}
.input{
margin-left: 30rpx;
margin-top: 10rpx;
margin-right: 30rpx;
background: rgba(255, 255, 255, 0.7);
display: flex;
flex-direction: column;
}
.s ,.t ,.y, .x ,.tui ,.tun{
display:flex;
flex-direction: row;
}
.shengao,.tizhong,.yaowei,.xiongwei,.tuiwei,.tunwei{
margin-left: 30rpx;
}
.save{
border: solid 1rpx #fafdfd;
margin-top: 80rpx;
width: 70%;
background-color: rgba(225, 230, 221, 0.7);
border-radius: 40rpx;
}
Loading…
Cancel
Save