After Width: | Height: | Size: 533 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 2.4 KiB |
After Width: | Height: | Size: 967 B |
After Width: | Height: | Size: 100 KiB |
After Width: | Height: | Size: 963 B |
After Width: | Height: | Size: 806 B |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 8.2 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 136 KiB |
After Width: | Height: | Size: 1.7 MiB |
After Width: | Height: | Size: 75 KiB |
After Width: | Height: | Size: 76 KiB |
After Width: | Height: | Size: 172 KiB |
After Width: | Height: | Size: 110 KiB |
After Width: | Height: | Size: 252 KiB |
After Width: | Height: | Size: 140 KiB |
After Width: | Height: | Size: 119 KiB |
After Width: | Height: | Size: 132 KiB |
After Width: | Height: | Size: 170 KiB |
After Width: | Height: | Size: 66 KiB |
After Width: | Height: | Size: 158 KiB |
After Width: | Height: | Size: 171 KiB |
After Width: | Height: | Size: 150 KiB |
After Width: | Height: | Size: 193 KiB |
After Width: | Height: | Size: 116 KiB |
After Width: | Height: | Size: 104 KiB |
After Width: | Height: | Size: 116 KiB |
After Width: | Height: | Size: 116 KiB |
After Width: | Height: | Size: 180 KiB |
After Width: | Height: | Size: 125 KiB |
After Width: | Height: | Size: 38 KiB |
After Width: | Height: | Size: 53 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 25 KiB |
After Width: | Height: | Size: 112 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 86 KiB |
After Width: | Height: | Size: 33 KiB |
After Width: | Height: | Size: 45 KiB |
After Width: | Height: | Size: 60 KiB |
After Width: | Height: | Size: 115 KiB |
After Width: | Height: | Size: 103 KiB |
After Width: | Height: | Size: 45 KiB |
After Width: | Height: | Size: 42 KiB |
After Width: | Height: | Size: 35 KiB |
After Width: | Height: | Size: 21 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 40 KiB |
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 76 KiB |
After Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 1.2 MiB |
After Width: | Height: | Size: 67 KiB |
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 48 KiB |
After Width: | Height: | Size: 29 KiB |
After Width: | Height: | Size: 834 KiB |
After Width: | Height: | Size: 940 KiB |
After Width: | Height: | Size: 2.4 MiB |
After Width: | Height: | Size: 693 KiB |
After Width: | Height: | Size: 389 KiB |
After Width: | Height: | Size: 67 KiB |
After Width: | Height: | Size: 357 KiB |
After Width: | Height: | Size: 382 KiB |
After Width: | Height: | Size: 118 KiB |
After Width: | Height: | Size: 596 KiB |
After Width: | Height: | Size: 273 KiB |
After Width: | Height: | Size: 68 KiB |
After Width: | Height: | Size: 441 KiB |
After Width: | Height: | Size: 102 KiB |
After Width: | Height: | Size: 1.2 KiB |
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,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
@ -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,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
@ -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,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
@ -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}}"> </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}}"> </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}}"> </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,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
@ -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}}"> </text>
|
||||
<view class="t">体重<input type="number" class="tizhong" value='{{intti}}' maxlength="3" bindinput="outtti" placeholder="请输入体重"/></view>
|
||||
|
||||
<text decode="{{true}}" space="{{true}}"> </text>
|
||||
<view class="y">腰围<input type="number" class="yaowei" value='{{inyyao}}' maxlength="3" bindinput="outyyao" placeholder="单位(厘米)"/></view>
|
||||
|
||||
<text decode="{{true}}" space="{{true}}"> </text>
|
||||
<view class="x">胸围<input type="number" class="xiongwei" value='{{inxxiong}}' maxlength="3" bindinput="outxxiong" placeholder="单位(厘米)"/></view>
|
||||
|
||||
<text decode="{{true}}" space="{{true}}"> </text>
|
||||
<view class="tui">腿围<input type="number" class="tuiwei" value='{{inttui}}' maxlength="3" bindinput="outttui" placeholder="单位(厘米)"/></view>
|
||||
|
||||
<text decode="{{true}}" space="{{true}}"> </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;
|
||||
}
|