Merge pull request '代码' (#6) from zuodanni_branch into master

master
popix497f 1 year ago
commit 3af074affe

@ -55,14 +55,11 @@
"scope.userLocation": {
"desc": "你的位置信息将用于小程序位置接口的效果展示"
},
"scope.userInfo": {
"desc": "你的个人信息将用于小程序个性化推荐"
},
"scope.album": {
"desc": "你的相册将用于小程序图片上传"
},
"scope.camera":{
"desc":"你的相机将用于小程序拍照"
"scope.camera": {
"desc": "你的相机将用于小程序拍照"
}
}
}

@ -72,7 +72,7 @@ Page({
* 页面的初始数据
*/
data: {
history:[]
},
bindmaiViewTap() {
wx.redirectTo({
@ -98,7 +98,14 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.setData({
logs: (wx.getStorageSync('history') || []).map(log => {
return {
date: util.formatTime(new Date(log)),
history:this.data.history
}
})
})
},
/**

@ -7,8 +7,48 @@ Page({
data: {
phopath:"../match/photo",
// imgList:"",
src:""
src:"",
scene:""
},
showActionSheet(){
// _this=this;
wx.showActionSheet({
itemList: ['游玩娱乐','工作通勤','派对party','逛街购物','酒席宴会','其他场所'],
success: (res) => {
switch(res.tapIndex) {
case 0:
this.scene="游玩娱乐";
console.log(this.scene)
break;
case 1:
this.scene="工作通勤";
console.log('工作通勤')
break;
case 2:
this.scene="派对party";
console.log('派对party')
break;
case 3:
this.scene="逛街购物";
console.log('逛街购物')
break;
case 4:
this.scene="酒席宴会";
console.log('酒席宴会')
break;
case 5:
this.scene="其他场所";
console.log('其他场所')
break;
}
wx.setStorageSync('scene', this.data.scene);
},
fail (res) {
console.log('取消选项')
}
})
},
//跳转photo
bindphoViewTap(){
wx.navigateTo({
@ -146,7 +186,7 @@ Page({
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**

@ -1,6 +1,7 @@
<!--pages/match/match.wxml-->
<view class="container">
<view class="match_main">
<view class="choose_scene" bindtap="showActionSheet" >选择场景</view>
<view class="choose_way" bindtap="tipwindow" >点击开始拍照</view>
<!-- <text class="match_display">预览</text>
<image mode="widthFix" src="{{imgList}}"></image> -->

@ -4,12 +4,31 @@
height: auto;
background-color: #ddcfc3;
}
.choose_scene{
width:100%;
height:100px;
background-color: #ddcfc3;
text-align: center;
padding-top: 200px;
}
.choose_way{
width:100%;
height:400px;
height:100px;
background-color: #ddcfc3;
text-align: center;
padding-top: 200px;
padding-bottom: 200px;
}
.info-center{
position: fixed;
z-index: 999;
background-color: white;
display: flex;
align-items: center;
justify-content: center;
border-radius: 10rpx;
width: 90%;
margin-left: 5%;
margin-right: 5%;
}
.match_display{
width:auto;

@ -6,7 +6,13 @@ Page({
*/
data: {
imgFilePath:"",
src:""
src:"",
scene:""
},
return(){
wx.navigateBack({
delta: 1
})
},
/**
@ -15,9 +21,12 @@ Page({
*/
onLoad(options) {
var img = wx.getStorageSync('imgFilePath');
var sce = wx.getStorageSync('scene');
console.log(sce);
var that = this;
that.setData({
imgFilePath: img
imgFilePath: img,
scene:sce
})
},
@ -33,9 +42,10 @@ Page({
* 获取日期给history
*/
onShow() {
const history = wx.getStorageSync('history') || []
history.unshift(Date.now())
wx.setStorageSync('history', history)
const hisImg = wx.setStorageSync('hisImg',this.imgFilePath) ||[]
const hisSce = wx.setStorageSync('hisSce', this.scene)||[]
//history.unshift(Date.now())//?
// wx.setStorageSync('history', history)
},
/**

@ -1,7 +1,12 @@
<!--pages/match/photo.wxml-->
<view class='container'>
<view class='imgwindow'>
<view class='scewindow' src='{{scene}}'>
<text>场景:{{scene}}</text>
</view>
<image class='imgwindow' mode='widthFix' src='{{imgFilePath}}'/>
<!-- 图片预览 -->
<text bind:tap="return" type="primary">返回</text>
<text bind:tap="toMatch">设计妆容</text>
</view>
</view>

@ -16,7 +16,7 @@
质地很特别 上嘴迅速成膜不拔干
很爱这种不显唇纹的哑光感吃饭也不用担心掉色严重
24小时在线 谁能不爱呢
#MAC热吻棒 #笔记灵感 #美式复古 #热吻吧显眼包 #美拉德
#派对party #秋季 #冬季
</text>
</view>
</view>

@ -5,6 +5,7 @@
<text class = "text">新中式|水是眼波横</text>
<text class = "text2">
1、唇妆涂的是TF黑金唇镜 22朝露薄涂是很纯欲的樱花粉厚涂是气质的玫瑰色。上嘴甜味氛围感拉满很适合搭配白开水伪素颜淡妆。
2、妆容统一杏粉色调眼妆用消肿色简单带过点彩刷沾取暖调粉色腮红在面中大面积铺色打造白里透红的妆效</text>
2、妆容统一杏粉色调眼妆用消肿色简单带过点彩刷沾取暖调粉色腮红在面中大面积铺色打造白里透红的妆效
#工作通勤 #春季</text>
</view>
</view>

@ -15,9 +15,7 @@ Page({
'../images/rec_main_1.jpg',
'../images/rec_main_2.jpg',
'../images/rec_main_3.jpg'
]
],
},
bindrec1ViewTap(){
wx.navigateTo({
@ -65,7 +63,7 @@ Page({
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**

@ -10,15 +10,36 @@
</block>
</swiper>
<view>
<text>推荐页面</text>
<text>妆容区</text>
</view>
<view class="rec_main_4">
<image bindtap="bindrec2ViewTap" mode="widthFix" src="{{rm4}} "/>
<!-- <image src="" style="height:100%"mode="widthFix"></image> -->
</view>
<view class="rec_main_5">
<image bindtap="bindrec3ViewTap" mode="widthFix" src="{{rm5}}"/>
<!-- <image src="" style="height:100%"mode="widthFix"></image> -->
</view>
<!-- 瀑布流大概的思路就是直接定义两列等宽的view然后两列都加载相同的数据
wx:if="{{index%2==1}}" 这里用if来辨别是奇数还是偶数两边加载相反的 -->
<view class="content">
<view class="left">
<view class="block">
<view class="rec_main_4" bind:tap="bindrec2ViewTap">
<image class="pic" mode="widthFix" src="{{rm4}} "/>
<text class="title">美拉德是我的舒适区</text>
</view>
</view>
<view class="block">
</view>
</view>
<view class="right">
<view class="block">
<view class="rec_main_5" bindtap="bindrec3ViewTap">
<image class="pic" mode="widthFix" src="{{rm5}}"/>
<text class="title">新中式|水是眼波横</text>
</view>
</view>
<view class="block">
</view>
</view>
</view>
</view>
</view>

@ -1,7 +1,42 @@
/* pages/recommend/recommend.wxss */
page{
width: 100%;
margin: 0;
background: #F2F2F2;
}
swiper{
width: 100%;
/* height: calc(100vw*9/16); */
height: 350px;
}
.content{
display: flex;
flex-direction: row;
margin: 20rpx;
overflow: hidden;
}
.left{
width: 345rpx;
}
.right{
width: 345rpx;
margin-left: 20rpx;
}
.block{
background: #ffffff;
border-radius: 10rpx;
}
.pic{
border-radius: 10rpx 10rpx 0rpx 0rpx;
width: 345rpx;
}
.title{
padding: 5rpx 20rpx 0rpx 20rpx;
font-size: 30rpx;
font-weight: 600;
color: #333;
align-items: center;
display: flex;
}

Loading…
Cancel
Save