first commit
This commit is contained in:
1
衣莎项目/源码/YiShaXiYi/user/wardrobe/.pydio
Normal file
1
衣莎项目/源码/YiShaXiYi/user/wardrobe/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
d466c566-9fbd-479a-87a9-4471df4d2180
|
||||
148
衣莎项目/源码/YiShaXiYi/user/wardrobe/wardrobe.js
Normal file
148
衣莎项目/源码/YiShaXiYi/user/wardrobe/wardrobe.js
Normal file
@@ -0,0 +1,148 @@
|
||||
// user/wardrobe/wardrobe.js
|
||||
const app = getApp();
|
||||
const regeneratorRuntime = app.loadAsync()
|
||||
const model = app.loadModel("index")
|
||||
const util = app.loadUtils("util")
|
||||
const http = app.loadHttp()
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
system: app.globalData.system, //设备相关信息
|
||||
pageTitle: "我家衣柜", //头部标题
|
||||
isBack: true,//显示返回
|
||||
isTips: false,//显示备注
|
||||
remarks: "",//备注
|
||||
num: 0,//数量
|
||||
},
|
||||
// 显示备注
|
||||
openTips() {
|
||||
this.setData({
|
||||
isTips: true
|
||||
})
|
||||
},
|
||||
// 关闭备注
|
||||
closeTips() {
|
||||
this.setData({
|
||||
isTips: false
|
||||
})
|
||||
},
|
||||
// 洗衣的数量
|
||||
numInput(e) {
|
||||
let val = e.detail.value
|
||||
this.setData({
|
||||
num: val
|
||||
})
|
||||
},
|
||||
// 备注
|
||||
remarksInput(e) {
|
||||
let val = e.detail.value
|
||||
this.setData({
|
||||
remarks: val
|
||||
})
|
||||
},
|
||||
// 打开衣柜
|
||||
async openWardrobe(e) {
|
||||
if (0 >= this.data.num) {
|
||||
wx.showToast({
|
||||
title: '请输入数量',
|
||||
icon: 'none',
|
||||
duration: 800
|
||||
})
|
||||
return
|
||||
}
|
||||
let data = {
|
||||
total_count: this.data.num,
|
||||
remark: this.data.remarks,
|
||||
template_id: e.detail.formId,
|
||||
lat: "",
|
||||
lng: ""
|
||||
}
|
||||
wx.showModal({
|
||||
title: '确认打开智能衣柜?',
|
||||
content: '为了避免衣物遗失,请在洗衣柜附近开柜!',
|
||||
cancelText: '取消',
|
||||
confirmText: '确定',
|
||||
success(res) {
|
||||
if (res.confirm) {
|
||||
wx.getLocation({
|
||||
type: 'gcj02',
|
||||
success(res) {
|
||||
wx.showLoading({
|
||||
title: '开柜中',
|
||||
})
|
||||
data.lat = res.latitude
|
||||
data.lng = res.longitude
|
||||
http.http.request2({ url: `${http.api.openCupboard}`, method: "POST", data: data })
|
||||
.then(res => {
|
||||
if (res.data.status == 1) {
|
||||
wx.hideLoading()
|
||||
wx.navigateTo({
|
||||
url: "/user/wardrobe/wardrobeInfo/wardrobeInfo"
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function () {
|
||||
|
||||
}
|
||||
})
|
||||
4
衣莎项目/源码/YiShaXiYi/user/wardrobe/wardrobe.json
Normal file
4
衣莎项目/源码/YiShaXiYi/user/wardrobe/wardrobe.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"usingComponents": {},
|
||||
"disableScroll": true
|
||||
}
|
||||
40
衣莎项目/源码/YiShaXiYi/user/wardrobe/wardrobe.wxml
Normal file
40
衣莎项目/源码/YiShaXiYi/user/wardrobe/wardrobe.wxml
Normal file
@@ -0,0 +1,40 @@
|
||||
<!-- 头部 -->
|
||||
<nav-bar isBack="{{isBack}}" pageTitle="{{pageTitle}}" system="{{system}}"></nav-bar>
|
||||
<!-- user/wardrobe/wardrobe.wxml -->
|
||||
<view class="wardrobe">
|
||||
<form report-submit bindsubmit="openWardrobe">
|
||||
<view class="wardrobe_bac flex-con3">
|
||||
<view class="flex-con4">
|
||||
<view class="wardrobe_title">请输入衣物数量</view>
|
||||
<input type="number" class="wardrobe_num" focus="{{true}}" bindinput="numInput" />
|
||||
<view class="wardrobe_rem" bind:tap="openTips">
|
||||
{{remarks || '添加备注:如洗护要求、衣物特殊污渍等'}}
|
||||
</view>
|
||||
<button form-type="submit" class="wardrobe_img">
|
||||
<image src="/static/img/ygs.png" />
|
||||
<span class="img_span"></span>
|
||||
</button>
|
||||
</view>
|
||||
</view>
|
||||
</form>
|
||||
</view>
|
||||
<!-- 弹出层填写备注 -->
|
||||
<view wx:if="{{isTips}}" class="tips flex-con3">
|
||||
<view>
|
||||
<view class="tips_cen">
|
||||
<view class="tips_cen_tit">洗护备注</view>
|
||||
<view class="flex-con3 mt30">
|
||||
<view class="tips_cen_text">
|
||||
<textarea maxlength="50" placeholder="添加备注:如洗护要求、衣物特殊污渍等" bindinput="remarksInput" value="{{remarks}}"></textarea>
|
||||
<span class="tips_text_span">{{remarks.length}}/50个字</span>
|
||||
</view>
|
||||
</view>
|
||||
<view class="tips_cen_sub" catchtap="closeTips">完成</view>
|
||||
</view>
|
||||
<view class="tips_img" catchtap="closeTips">
|
||||
<image src="/static/img/icon/colse_tips.png" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- toasta提示 -->
|
||||
<i-toast id="toast" />
|
||||
181
衣莎项目/源码/YiShaXiYi/user/wardrobe/wardrobe.wxss
Normal file
181
衣莎项目/源码/YiShaXiYi/user/wardrobe/wardrobe.wxss
Normal file
@@ -0,0 +1,181 @@
|
||||
/* user/wardrobe/wardrobe.wxss */
|
||||
page{
|
||||
height: 100%;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
.wardrobe{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: url("http://cdn.yishaxiyi.com/80e6a2e682edcf319e00ddfcdb48b0d8.png") top no-repeat;
|
||||
background-size: 100%;
|
||||
padding-top: 255rpx;
|
||||
}
|
||||
.wardrobe_bac{
|
||||
width: 646rpx;
|
||||
height: 703rpx;
|
||||
background-color: #ffffff;
|
||||
box-shadow: 0px 5rpx 30rpx 0rpx rgba(0, 0, 0, 0.1);
|
||||
border-radius: 20rpx;
|
||||
margin: 0 auto;
|
||||
text-align: center;
|
||||
}
|
||||
.wardrobe_title{
|
||||
font-family: PingFang-SC-Medium;
|
||||
font-size: 32rpx;
|
||||
color: #000000;
|
||||
font-weight: 400;
|
||||
}
|
||||
.wardrobe_num{
|
||||
width: 278rpx;
|
||||
font-family: PingFang-SC-Medium;
|
||||
font-size: 60rpx;
|
||||
height: 60rpx;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0px;
|
||||
color: #000000;
|
||||
border-bottom: 2rpx solid #cccccc;
|
||||
margin: 35rpx auto 0;
|
||||
}
|
||||
.wardrobe_rem{
|
||||
margin-top: 30rpx;
|
||||
width: 466rpx;
|
||||
font-family: PingFang-SC-Medium;
|
||||
font-size: 26rpx;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
line-height: 60rpx;
|
||||
}
|
||||
|
||||
/* 弹出层 */
|
||||
.tips{
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
z-index: 9999;
|
||||
}
|
||||
.tips_cen{
|
||||
width: 600rpx;
|
||||
height: 489rpx;
|
||||
background-color: #ffffff;
|
||||
border-radius: 10rpx;
|
||||
padding-top: 58rpx;
|
||||
}
|
||||
.tips_cen_tit{
|
||||
font-family: PingFang-SC-Bold;
|
||||
font-size: 36rpx;
|
||||
color: #000000;
|
||||
font-weight: 600;
|
||||
text-align: center;
|
||||
}
|
||||
.tips_cen_text{
|
||||
width: 520rpx;
|
||||
height: 200rpx;
|
||||
background-color: #f5f5f5;
|
||||
border-radius: 5rpx;
|
||||
position: relative;
|
||||
padding: 34rpx 25rpx;
|
||||
}
|
||||
.tips_cen_text textarea{
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
.tips_text_span{
|
||||
position: absolute;
|
||||
right: 16rpx;
|
||||
bottom: 13rpx;
|
||||
font-family: PingFang-SC-Medium;
|
||||
font-size: 20rpx;
|
||||
color: #999999;
|
||||
}
|
||||
.tips_cen_sub{
|
||||
margin: 45rpx auto 0;
|
||||
width: 550rpx;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
text-align: center;
|
||||
background-color: #36d96c;
|
||||
border-radius: 40rpx;
|
||||
font-family: PingFang-SC-Medium;
|
||||
font-size: 32rpx;
|
||||
color: #ffffff;
|
||||
}
|
||||
.tips_img{
|
||||
margin-top: 50rpx;
|
||||
text-align: center;
|
||||
}
|
||||
.tips_img image{
|
||||
width: 69rpx;
|
||||
height: 69rpx;
|
||||
}
|
||||
|
||||
/* 开锁 */
|
||||
.wardrobe_img{
|
||||
margin-top: 60rpx;
|
||||
width: 100%;
|
||||
height: 230rpx;
|
||||
position: relative;
|
||||
background:rgba(0, 0, 0, 0);
|
||||
border: 0;
|
||||
overflow: visible;
|
||||
}
|
||||
.wardrobe_img::after{
|
||||
width: 0;
|
||||
height: 0;
|
||||
}
|
||||
.wardrobe_img image{
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 50%;
|
||||
margin-left: -115rpx;
|
||||
width: 230rpx;
|
||||
height: 230rpx;
|
||||
z-index: 999;
|
||||
margin-top: 0;
|
||||
}
|
||||
.img_span::after{
|
||||
content: "";
|
||||
width: 230rpx;
|
||||
height: 230rpx;
|
||||
background: #21d85c;
|
||||
border-radius: 50%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 50%;
|
||||
margin-left: -115rpx;
|
||||
z-index: 1;
|
||||
animation:imgLiving 3s linear infinite;
|
||||
-webkit-animation: imgLiving 3s linear infinite;
|
||||
}
|
||||
.img_span::before{
|
||||
content: "";
|
||||
width: 230rpx;
|
||||
height: 230rpx;
|
||||
background: #21d85c;
|
||||
border-radius: 50%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 50%;
|
||||
margin-left: -115rpx;
|
||||
z-index: 1;
|
||||
animation:imgLiving 3s linear infinite;
|
||||
-webkit-animation: living 3s linear infinite;
|
||||
-webkit-animation-delay: 1.5s; /*第二个span动画延迟1.5秒*/
|
||||
}
|
||||
@keyframes imgLiving {
|
||||
0%{
|
||||
transform: scale(1);
|
||||
opacity: 0.5;
|
||||
}
|
||||
50%{
|
||||
transform: scale(1.5);
|
||||
opacity: 0; /*圆形放大的同时,透明度逐渐减小为0*/
|
||||
}
|
||||
100%{
|
||||
transform: scale(1);
|
||||
opacity: 0.5;
|
||||
}
|
||||
}
|
||||
1
衣莎项目/源码/YiShaXiYi/user/wardrobe/wardrobeInfo/.pydio
Normal file
1
衣莎项目/源码/YiShaXiYi/user/wardrobe/wardrobeInfo/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
2c638e3d-4c58-4d38-8258-85aa46c6d9f3
|
||||
75
衣莎项目/源码/YiShaXiYi/user/wardrobe/wardrobeInfo/wardrobeInfo.js
Normal file
75
衣莎项目/源码/YiShaXiYi/user/wardrobe/wardrobeInfo/wardrobeInfo.js
Normal file
@@ -0,0 +1,75 @@
|
||||
// user/wardrobe/wardrobeInfo/wardrobeInfo.js
|
||||
const app = getApp();
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
system: app.globalData.system, //设备相关信息
|
||||
pageTitle: "我家衣柜", //头部标题
|
||||
isBack: true,//显示返回
|
||||
},
|
||||
// 跳转
|
||||
goUrl(e) {
|
||||
let url = e.currentTarget.dataset.url
|
||||
wx.redirectTo({
|
||||
url: url
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function () {
|
||||
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
<!-- 头部 -->
|
||||
<nav-bar isBack="{{isBack}}" pageTitle="{{pageTitle}}" system="{{system}}"></nav-bar>
|
||||
<!--user/wardrobe/wardrobeInfo/wardrobeInfo.wxml-->
|
||||
<view class="wardrobeInfo">
|
||||
<view class="wardrobeInfo_suo">
|
||||
<image src="/static/img/ks.png" />
|
||||
</view>
|
||||
<view class="wardrobeInfo_tit">柜门已打开!</view>
|
||||
<view class="wardrobeInfo_tit1">请取走衣物,记得关好柜门哦~</view>
|
||||
<view class="wardrobeInfo_sub flex-con1">
|
||||
<view class="wardrobeInfo_sub_l" data-url="/pages/auth/auth?index=1" bind:tap="goUrl">返回首页</view>
|
||||
<view class="wardrobeInfo_sub_r" data-url="/user/order/order" bind:tap="goUrl">查看订单</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- toasta提示 -->
|
||||
<i-toast id="toast" />
|
||||
@@ -0,0 +1,49 @@
|
||||
/* user/wardrobe/wardrobeInfo/wardrobeInfo.wxss */
|
||||
page{
|
||||
background-color: #ffffff !important;
|
||||
height: 100%;
|
||||
}
|
||||
.wardrobeInfo{
|
||||
width: 660rpx;
|
||||
margin: 130rpx auto 0;
|
||||
}
|
||||
.wardrobeInfo_suo{
|
||||
display: block;
|
||||
text-align: center;
|
||||
}
|
||||
.wardrobeInfo_suo image{
|
||||
width: 231rpx;
|
||||
height: 231rpx;
|
||||
}
|
||||
.wardrobeInfo_tit{
|
||||
margin-top: 70rpx;
|
||||
font-family: PingFang-SC-Medium;
|
||||
font-size: 45rpx;
|
||||
color: #333333;
|
||||
font-weight: 400;
|
||||
text-align: center;
|
||||
}
|
||||
.wardrobeInfo_tit1{
|
||||
margin-top: 40rpx;
|
||||
font-family: PingFang-SC-Regular;
|
||||
font-size: 32rpx;
|
||||
text-align: center;
|
||||
color: #666666;
|
||||
}
|
||||
.wardrobeInfo_sub_l,.wardrobeInfo_sub_r{
|
||||
margin-top: 100rpx;
|
||||
width: 310rpx;
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
text-align: center;
|
||||
border-radius: 45rpx;
|
||||
border: solid 2rpx #1dbf53;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
.wardrobeInfo_sub_l{
|
||||
color: #1dbf53;
|
||||
}
|
||||
.wardrobeInfo_sub_r{
|
||||
background-color: #1dbf53;
|
||||
color: #ffffff;
|
||||
}
|
||||
Reference in New Issue
Block a user