diff --git a/src/miniprogram-2/app.json b/src/miniprogram-2/app.json index cfe9ed5..04755aa 100644 --- a/src/miniprogram-2/app.json +++ b/src/miniprogram-2/app.json @@ -50,5 +50,19 @@ "selectedIconPath": "pages/images/learn_selected.png" } ] + }, + "permission": { + "scope.userLocation": { + "desc": "你的位置信息将用于小程序位置接口的效果展示" + }, + "scope.userInfo": { + "desc": "你的个人信息将用于小程序个性化推荐" + }, + "scope.album": { + "desc": "你的相册将用于小程序图片上传" + }, + "scope.camera":{ + "desc":"你的相机将用于小程序拍照" + } } } \ No newline at end of file diff --git a/src/miniprogram-2/pages/images/history.png b/src/miniprogram-2/pages/images/history.png new file mode 100644 index 0000000..7d37a2b Binary files /dev/null and b/src/miniprogram-2/pages/images/history.png differ diff --git a/src/miniprogram-2/pages/images/history_selected.png b/src/miniprogram-2/pages/images/history_selected.png new file mode 100644 index 0000000..00d7a16 Binary files /dev/null and b/src/miniprogram-2/pages/images/history_selected.png differ diff --git a/src/miniprogram-2/pages/images/home.png b/src/miniprogram-2/pages/images/home.png new file mode 100644 index 0000000..4c1f9c7 Binary files /dev/null and b/src/miniprogram-2/pages/images/home.png differ diff --git a/src/miniprogram-2/pages/images/home_selected.png b/src/miniprogram-2/pages/images/home_selected.png new file mode 100644 index 0000000..8eea8b2 Binary files /dev/null and b/src/miniprogram-2/pages/images/home_selected.png differ diff --git a/src/miniprogram-2/pages/images/learn.png b/src/miniprogram-2/pages/images/learn.png new file mode 100644 index 0000000..0d4915b Binary files /dev/null and b/src/miniprogram-2/pages/images/learn.png differ diff --git a/src/miniprogram-2/pages/images/learn_selected.png b/src/miniprogram-2/pages/images/learn_selected.png new file mode 100644 index 0000000..9093e84 Binary files /dev/null and b/src/miniprogram-2/pages/images/learn_selected.png differ diff --git a/src/miniprogram-2/pages/images/match.png b/src/miniprogram-2/pages/images/match.png new file mode 100644 index 0000000..e3ecf25 Binary files /dev/null and b/src/miniprogram-2/pages/images/match.png differ diff --git a/src/miniprogram-2/pages/images/match_selected.png b/src/miniprogram-2/pages/images/match_selected.png new file mode 100644 index 0000000..01ebe96 Binary files /dev/null and b/src/miniprogram-2/pages/images/match_selected.png differ diff --git a/src/miniprogram-2/pages/images/rec_main_1.jpg b/src/miniprogram-2/pages/images/rec_main_1.jpg index 9a4f5f4..13b990b 100644 Binary files a/src/miniprogram-2/pages/images/rec_main_1.jpg and b/src/miniprogram-2/pages/images/rec_main_1.jpg differ diff --git a/src/miniprogram-2/pages/images/rec_main_2.jpg b/src/miniprogram-2/pages/images/rec_main_2.jpg index 64cccd3..74626a5 100644 Binary files a/src/miniprogram-2/pages/images/rec_main_2.jpg and b/src/miniprogram-2/pages/images/rec_main_2.jpg differ diff --git a/src/miniprogram-2/pages/images/rec_main_3.jpg b/src/miniprogram-2/pages/images/rec_main_3.jpg index f1163d9..36396f2 100644 Binary files a/src/miniprogram-2/pages/images/rec_main_3.jpg and b/src/miniprogram-2/pages/images/rec_main_3.jpg differ diff --git a/src/miniprogram-2/pages/images/rec_main_4.jpg b/src/miniprogram-2/pages/images/rec_main_4.jpg index 67422e7..2ef6201 100644 Binary files a/src/miniprogram-2/pages/images/rec_main_4.jpg and b/src/miniprogram-2/pages/images/rec_main_4.jpg differ diff --git a/src/miniprogram-2/pages/images/rec_main_5.jpg b/src/miniprogram-2/pages/images/rec_main_5.jpg index 617715b..89c24b8 100644 Binary files a/src/miniprogram-2/pages/images/rec_main_5.jpg and b/src/miniprogram-2/pages/images/rec_main_5.jpg differ diff --git a/src/miniprogram-2/pages/images/recom_1_1.jpg b/src/miniprogram-2/pages/images/recom_1_1.jpg index 0c701c5..d48824f 100644 Binary files a/src/miniprogram-2/pages/images/recom_1_1.jpg and b/src/miniprogram-2/pages/images/recom_1_1.jpg differ diff --git a/src/miniprogram-2/pages/images/recom_1_2.jpg b/src/miniprogram-2/pages/images/recom_1_2.jpg index 4e88632..e3a1278 100644 Binary files a/src/miniprogram-2/pages/images/recom_1_2.jpg and b/src/miniprogram-2/pages/images/recom_1_2.jpg differ diff --git a/src/miniprogram-2/pages/images/recom_1_3.jpg b/src/miniprogram-2/pages/images/recom_1_3.jpg index 6a28ff0..53f237c 100644 Binary files a/src/miniprogram-2/pages/images/recom_1_3.jpg and b/src/miniprogram-2/pages/images/recom_1_3.jpg differ diff --git a/src/miniprogram-2/pages/images/wxtp.jpg b/src/miniprogram-2/pages/images/wxtp.jpg new file mode 100644 index 0000000..7c9be36 Binary files /dev/null and b/src/miniprogram-2/pages/images/wxtp.jpg differ diff --git a/src/miniprogram-2/pages/images/微信图片_202310120951551.jpg b/src/miniprogram-2/pages/images/微信图片_202310120951551.jpg new file mode 100644 index 0000000..494848d Binary files /dev/null and b/src/miniprogram-2/pages/images/微信图片_202310120951551.jpg differ diff --git a/src/miniprogram-2/pages/images/微信图片_20231012095820.jpg b/src/miniprogram-2/pages/images/微信图片_20231012095820.jpg new file mode 100644 index 0000000..1cccab7 Binary files /dev/null and b/src/miniprogram-2/pages/images/微信图片_20231012095820.jpg differ diff --git a/src/miniprogram-2/pages/images/微信图片_20231012095821.jpg b/src/miniprogram-2/pages/images/微信图片_20231012095821.jpg new file mode 100644 index 0000000..ed0d51b Binary files /dev/null and b/src/miniprogram-2/pages/images/微信图片_20231012095821.jpg differ diff --git a/src/miniprogram-2/pages/images/微信图片_202310120958211.jpg b/src/miniprogram-2/pages/images/微信图片_202310120958211.jpg new file mode 100644 index 0000000..e2289e4 Binary files /dev/null and b/src/miniprogram-2/pages/images/微信图片_202310120958211.jpg differ diff --git a/src/miniprogram-2/pages/main/main.js b/src/miniprogram-2/pages/main/main.js index 5faf4d3..8b82de4 100644 --- a/src/miniprogram-2/pages/main/main.js +++ b/src/miniprogram-2/pages/main/main.js @@ -6,7 +6,7 @@ Page({ */ data: { nowData:"", - rm4:"../images/recom_1_1.jpg" + r11:"../images/recom_1_1.jpg" }, date:function(){ var now=new Date(); @@ -17,8 +17,8 @@ Page({ console.log(nowDate); return nowDate; }, - bindrecViewTap(){ - wx.redirectTo({ + bindrec1ViewTap(){ + wx.navigateTo({ url:'../recommend/rec1' }) }, diff --git a/src/miniprogram-2/pages/main/main.wxml b/src/miniprogram-2/pages/main/main.wxml index e7154cd..6a9df0d 100644 --- a/src/miniprogram-2/pages/main/main.wxml +++ b/src/miniprogram-2/pages/main/main.wxml @@ -8,7 +8,7 @@ 选择一个妆容开始美好的一天吧! - - + + \ No newline at end of file diff --git a/src/miniprogram-2/pages/match/match.js b/src/miniprogram-2/pages/match/match.js index 36f2eba..a056385 100644 --- a/src/miniprogram-2/pages/match/match.js +++ b/src/miniprogram-2/pages/match/match.js @@ -5,10 +5,13 @@ Page({ * 页面的初始数据 */ data: { - phopath:"../match/photo" + phopath:"../match/photo", + // imgList:"", + src:"" }, + //跳转photo bindphoViewTap(){ - wx.redirecTo({ + wx.navigateTo({ url:'../match/photo' }) }, @@ -32,6 +35,106 @@ Page({ url: '../match/match' }) }, + //选择图片获取方式 + tipwindow(){ + var _this=this; + wx.showActionSheet({ + itemList: ['从手机相册选择', '拍照'], + success: function(res) { + let sourceType=""; + if(res.tapIndex==0){ + sourceType="album"; + _this.img_w_show(sourceType); + } + else if(res.tapIndex==1){ + _this.sccamera(); + // _this.bindphoViewTap(); + // sourceType="camera"; + // _this.img_w_show(sourceType); + } + console.log(res.tapIndex) + }, + fail: function(res) { + console.log(res.errMsg) + } + }) + }, + //chooseMedia选图 + img_w_show(sourceType){ + var _this=this; + wx.chooseMedia({ + count: 1, // 默认9 + mediaType:['image'],//仅照片 + //sizeType: ['original', 'compressed'], // 指定原图or压缩图 + sourceType: [sourceType], // 来源是相册or相机 + //camera:['front'],//前置相机 + success: function (res) { + // 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片 + console.log(res); + var tempFilePaths = res.tempFiles['0']['tempFilePath']; + _this.setData({ + src: (tempFilePaths?tempFilePaths:"") + //无法赋值-路径获取问题 + }) + // console.log("src:"+_this.data.src); + wx.setStorageSync('imgFilePath', _this.data.src);//存入缓存,实现数据转移 + wx.pageScrollTo({//滚动到目标位置 + scrollTop: 1200, + duration:300 + }) + } + }) + }, + //权限、拍照 + sccamera(){ + wx.authorize({ + scope: 'scope.camera', + success () { + //用户允许授权,进行下一步操作 + const cameraContext = wx.createCameraContext();//获取相机上下文? + wx.pageScrollTo({//滚动到目标位置 + scrollTop: 700, + duration:300 + }) + + // cameraContext.takePhoto({//获取照片 + // quality: 'high', + // success: (res) => { + // // 将照片保存到本地 + // wx.saveImageToPhotosAlbum({ + // filePath: res.tempImagePath, + // success: (res) => { + // wx.showToast({ + // title: '保存成功' + // }); + // }, + // error(e){ + // console.log(e.detail); + // } + // }) + // } + + // }) + } + }) + }, + //相机组件camera拍照 + takePhoto() { + var _this=this; + const ctx = wx.createCameraContext() + ctx.takePhoto({ + quality: 'high', + success: (res) => { + this.setData({ + src: res.tempImagePath + }) + wx.setStorageSync('imgFilePath', _this.data.src); + } + }) + }, + error(e) { + console.log(e.detail) + }, /** * 生命周期函数--监听页面加载 */ diff --git a/src/miniprogram-2/pages/match/match.wxml b/src/miniprogram-2/pages/match/match.wxml index 7c5ea89..9b9706a 100644 --- a/src/miniprogram-2/pages/match/match.wxml +++ b/src/miniprogram-2/pages/match/match.wxml @@ -1,24 +1,17 @@ - - 点击开始拍照 - - - - + + + + + + 预览 + + - - 推荐 - - --> + -pages/match/match.wxml \ No newline at end of file diff --git a/src/miniprogram-2/pages/match/match.wxss b/src/miniprogram-2/pages/match/match.wxss index 1f12db5..4d081e6 100644 --- a/src/miniprogram-2/pages/match/match.wxss +++ b/src/miniprogram-2/pages/match/match.wxss @@ -1 +1,23 @@ -/* pages/match/match.wxss */ \ No newline at end of file +/* pages/match/match.wxss */ +.match_main{ + width:auto; + height: auto; + background-color: #ddcfc3; +} +.choose_way{ + width:100%; + height:400px; + background-color: #ddcfc3; + text-align: center; + padding-top: 200px; +} +.match_display{ + width:auto; + height:100px; + background-color: #ddcfc3; + text-align: center; + padding-top: 50px; +} +.match_sure{ + text-align: center; +} \ No newline at end of file diff --git a/src/miniprogram-2/pages/match/photo.js b/src/miniprogram-2/pages/match/photo.js new file mode 100644 index 0000000..41f53e5 --- /dev/null +++ b/src/miniprogram-2/pages/match/photo.js @@ -0,0 +1,75 @@ +// pages/match/photo.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + imgFilePath:"", + src:"" + }, + + /** + * 生命周期函数--监听页面加载 + * 获取match的照片缓存? + */ + onLoad(options) { + var img = wx.getStorageSync('imgFilePath'); + var that = this; + that.setData({ + imgFilePath: img + }) + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + * 获取日期给history? + */ + onShow() { + const history = wx.getStorageSync('history') || [] + history.unshift(Date.now()) + wx.setStorageSync('history', history) + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/src/miniprogram-2/pages/match/photo.json b/src/miniprogram-2/pages/match/photo.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/src/miniprogram-2/pages/match/photo.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/src/miniprogram-2/pages/match/photo.wxml b/src/miniprogram-2/pages/match/photo.wxml new file mode 100644 index 0000000..b1ee2ba --- /dev/null +++ b/src/miniprogram-2/pages/match/photo.wxml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/src/miniprogram-2/pages/match/photo.wxss b/src/miniprogram-2/pages/match/photo.wxss new file mode 100644 index 0000000..f361089 --- /dev/null +++ b/src/miniprogram-2/pages/match/photo.wxss @@ -0,0 +1 @@ +/* pages/match/photo.wxss */ \ No newline at end of file diff --git a/src/miniprogram-2/pages/recommend/rec1.wxml b/src/miniprogram-2/pages/recommend/rec1.wxml index 0f10a9d..64b9cfd 100644 --- a/src/miniprogram-2/pages/recommend/rec1.wxml +++ b/src/miniprogram-2/pages/recommend/rec1.wxml @@ -1,19 +1,17 @@ - - - 今天是一期早八通勤眼妆教程~ -3ce新品的这两盘好甜美夏日呀!!温柔低饱和的调调 -日常不出错的配色,新手友友也可以轻松驾驭 -樱花碎冰 -清冷低饱和嫩粉调~营造温柔粉调眼妆 -指腹蘸取里面的一颗粉棕色膏状眼影,涂抹眼窝 -眼妆就轻松搞定!早八人的福音呀 -西柚冰茶 -元气夏日果汁橘棕调,敲喜欢这个配色 -元气感拉满~轻松营造日常通勤眼妆 -日常又消肿 -快一起学起来叭! + + 黄黑皮低饱和清冷妆这么高级! + +    这种低饱和妆容真的很有感觉! + +🌟大面积的腮红是重点(灰粉色会更自然) + +眼妆往细长狐狸眼的方向靠 +卧蚕也要画细长 眼妆浅色大面积晕染出上扬的形状就OK +真的很有感觉!黄黑皮姐妹速速学起来! +#黄黑皮 #黄黑皮妆容 #妆容分享 #今日妆容 #清冷感妆容 + diff --git a/src/miniprogram-2/pages/recommend/rec1.wxss b/src/miniprogram-2/pages/recommend/rec1.wxss index 97ecb17..7f371d8 100644 --- a/src/miniprogram-2/pages/recommend/rec1.wxss +++ b/src/miniprogram-2/pages/recommend/rec1.wxss @@ -1 +1,46 @@ -/* pages/recommend/rec1.wxss */ \ No newline at end of file +/* pages/recommend/rec1.wxss */ +.container{ + +} +.rec1{ + +} + +.text { + /* 字体大小 */ + font-size: 20px; + /* 字体颜色 */ + color: black; + /* 字体风格-粗细 */ + font-weight: bold; + /*段落排版--首字缩进*/ +text-indent: 2em; +/*段落排版--行间距(行高)*/ +line-height: 1.5em; +/*段落排版--中文字间距*/ +letter-spacing: 1px; +/*字母间距*/ +word-spacing: 4px; +/*文字对齐 right 、left 、center */ +text-align: left; + +} +.text2 { + /* 字体大小 */ + font-size: 15px; + /* 字体颜色 */ + color: black; + /* 字体风格-粗细 */ + /*font-weight: bold;*/ + /*段落排版--首字缩进*/ + text-indent: 2em; + /*段落排版--行间距(行高)*/ + line-height: 1.5em; + /*段落排版--中文字间距*/ + letter-spacing: 1px; + /*字母间距*/ + word-spacing: 4px; + /*文字对齐 right 、left 、center */ + text-align: left; + +} \ No newline at end of file diff --git a/src/miniprogram-2/pages/recommend/rec2.wxml b/src/miniprogram-2/pages/recommend/rec2.wxml index d58bc7f..2feacaa 100644 --- a/src/miniprogram-2/pages/recommend/rec2.wxml +++ b/src/miniprogram-2/pages/recommend/rec2.wxml @@ -2,14 +2,21 @@ - - - 妆容小tips -1、眼妆部分整体是裸棕大地色系的,先用浅灰色0大地,上眼消肿。再用橘棕色贴着睫毛根加深上眼脸。 -2、用刀锋刷沾取眼影画眼线,降低眼线存在感同时修饰眼型。 -橘粉底色的珠光色,用手指沾取,点涂在上眼 -脸中间。 -3、腮红用点彩刷沾取第三排中间的颜色,点涂在面中,余粉带过皇头 -4、口红只涂在上下唇内侧,用晕染刷晕染边缘再加深一遍重复晕染,唇峰点上口红用手指晕开! + 美拉德是我的舒适区🍁 + + 秋日当然不能少了棕色系啦! + 美拉德火是有道理的~ + 真的太好出片了 + 妆容整体就是棕色调为主 + 口红选择了MAC新出的热吻棒 + 这三只颜色和秋冬适配度太高了 + #67狂野棕:冷冽裸茶棕 美区辣妹属性大开 + #69痴情咖:复古焦糖棕 爆浆太妃糖 内里都是惊喜 + #79任性莓:甜熟浆果迸发热辣莓色 灰调复古感 时髦爆棚 + 质地很特别 上嘴迅速成膜不拔干 + 很爱这种不显唇纹的哑光感吃饭也不用担心掉色严重 + 24小时在线 谁能不爱呢 + #MAC热吻棒 #笔记灵感 #美式复古 #热吻吧显眼包 #美拉德 + diff --git a/src/miniprogram-2/pages/recommend/rec2.wxss b/src/miniprogram-2/pages/recommend/rec2.wxss index 458837b..1689cf2 100644 --- a/src/miniprogram-2/pages/recommend/rec2.wxss +++ b/src/miniprogram-2/pages/recommend/rec2.wxss @@ -1 +1,45 @@ -/* pages/recommend/rec2.wxss */ \ No newline at end of file +/* pages/recommend/rec2.wxss */ +.container{ + +} +.rec2{ + +} +.text { + /* 字体大小 */ + font-size: 20px; + /* 字体颜色 */ + color: black; + /* 字体风格-粗细 */ + font-weight: bold; + /*段落排版--首字缩进*/ +text-indent: 2em; +/*段落排版--行间距(行高)*/ +line-height: 1.5em; +/*段落排版--中文字间距*/ +letter-spacing: 1px; +/*字母间距*/ +word-spacing: 4px; +/*文字对齐 right 、left 、center */ +text-align: left; + +} +.text2 { + /* 字体大小 */ + font-size: 15px; + /* 字体颜色 */ + color: black; + /* 字体风格-粗细 */ + /*font-weight: bold;*/ + /*段落排版--首字缩进*/ + text-indent: 2em; + /*段落排版--行间距(行高)*/ + line-height: 1.5em; + /*段落排版--中文字间距*/ + letter-spacing: 1px; + /*字母间距*/ + word-spacing: 4px; + /*文字对齐 right 、left 、center */ + text-align: left; + +} \ No newline at end of file diff --git a/src/miniprogram-2/pages/recommend/rec3.wxml b/src/miniprogram-2/pages/recommend/rec3.wxml index 4602ae6..265b089 100644 --- a/src/miniprogram-2/pages/recommend/rec3.wxml +++ b/src/miniprogram-2/pages/recommend/rec3.wxml @@ -1,9 +1,9 @@ - - - 妆容小tips + + 新中式|水是眼波横 + 1、唇妆涂的是TF黑金唇镜 22朝露,薄涂是很纯欲的樱花粉,厚涂是气质的玫瑰色。上嘴甜味氛围感拉满,很适合搭配白开水伪素颜淡妆。 2、妆容统一杏粉色调,眼妆用消肿色简单带过,点彩刷沾取暖调粉色腮红,在面中大面积铺色打造白里透红的妆效 diff --git a/src/miniprogram-2/pages/recommend/rec3.wxss b/src/miniprogram-2/pages/recommend/rec3.wxss index ea7ff9e..44be33d 100644 --- a/src/miniprogram-2/pages/recommend/rec3.wxss +++ b/src/miniprogram-2/pages/recommend/rec3.wxss @@ -1 +1,39 @@ -/* pages/recommend/rec3.wxss */ \ No newline at end of file +/* pages/recommend/rec3.wxss */ +.text { + /* 字体大小 */ + font-size: 20px; + /* 字体颜色 */ + color: black; + /* 字体风格-粗细 */ + font-weight: bold; + /*段落排版--首字缩进*/ +text-indent: 2em; +/*段落排版--行间距(行高)*/ +line-height: 1.5em; +/*段落排版--中文字间距*/ +letter-spacing: 1px; +/*字母间距*/ +word-spacing: 4px; +/*文字对齐 right 、left 、center */ +text-align: left; + +} +.text2 { + /* 字体大小 */ + font-size: 15px; + /* 字体颜色 */ + color: black; + /* 字体风格-粗细 */ + /*font-weight: bold;*/ + /*段落排版--首字缩进*/ + text-indent: 2em; + /*段落排版--行间距(行高)*/ + line-height: 1.5em; + /*段落排版--中文字间距*/ + letter-spacing: 1px; + /*字母间距*/ + word-spacing: 4px; + /*文字对齐 right 、left 、center */ + text-align: left; + +} \ No newline at end of file diff --git a/src/miniprogram-2/pages/recommend/recommend.wxml b/src/miniprogram-2/pages/recommend/recommend.wxml index fe42dd1..66f092c 100644 --- a/src/miniprogram-2/pages/recommend/recommend.wxml +++ b/src/miniprogram-2/pages/recommend/recommend.wxml @@ -5,7 +5,7 @@ autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}"> - + @@ -13,12 +13,12 @@ 推荐页面 - - + + - - + + \ No newline at end of file diff --git a/src/miniprogram-2/pages/recommend/recommend.wxss b/src/miniprogram-2/pages/recommend/recommend.wxss index d86d308..75c06fd 100644 --- a/src/miniprogram-2/pages/recommend/recommend.wxss +++ b/src/miniprogram-2/pages/recommend/recommend.wxss @@ -1,5 +1,7 @@ /* pages/recommend/recommend.wxss */ + swiper{ width: 100%; - height: calc(100vw*9/16); + /* height: calc(100vw*9/16); */ + height: 350px; }