diff --git a/src/miniprogram-2/@pages/setting/setting.js b/src/miniprogram-2/@pages/setting/setting.js deleted file mode 100644 index ad98434..0000000 --- a/src/miniprogram-2/@pages/setting/setting.js +++ /dev/null @@ -1,66 +0,0 @@ -// @pages/setting/setting.js -Page({ - - /** - * 页面的初始数据 - */ - data: { - - }, - - /** - * 生命周期函数--监听页面加载 - */ - onLoad(options) { - - }, - - /** - * 生命周期函数--监听页面初次渲染完成 - */ - onReady() { - - }, - - /** - * 生命周期函数--监听页面显示 - */ - onShow() { - - }, - - /** - * 生命周期函数--监听页面隐藏 - */ - onHide() { - - }, - - /** - * 生命周期函数--监听页面卸载 - */ - onUnload() { - - }, - - /** - * 页面相关事件处理函数--监听用户下拉动作 - */ - onPullDownRefresh() { - - }, - - /** - * 页面上拉触底事件的处理函数 - */ - onReachBottom() { - - }, - - /** - * 用户点击右上角分享 - */ - onShareAppMessage() { - - } -}) \ No newline at end of file diff --git a/src/miniprogram-2/@pages/setting/setting.json b/src/miniprogram-2/@pages/setting/setting.json deleted file mode 100644 index 8835af0..0000000 --- a/src/miniprogram-2/@pages/setting/setting.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "usingComponents": {} -} \ No newline at end of file diff --git a/src/miniprogram-2/@pages/setting/setting.wxml b/src/miniprogram-2/@pages/setting/setting.wxml deleted file mode 100644 index cbef789..0000000 --- a/src/miniprogram-2/@pages/setting/setting.wxml +++ /dev/null @@ -1,2 +0,0 @@ - -@pages/setting/setting.wxml diff --git a/src/miniprogram-2/@pages/setting/setting.wxss b/src/miniprogram-2/@pages/setting/setting.wxss deleted file mode 100644 index bb59598..0000000 --- a/src/miniprogram-2/@pages/setting/setting.wxss +++ /dev/null @@ -1 +0,0 @@ -/* @pages/setting/setting.wxss */ \ No newline at end of file diff --git a/src/miniprogram-2/app.json b/src/miniprogram-2/app.json index dd98fdb..cfe9ed5 100644 --- a/src/miniprogram-2/app.json +++ b/src/miniprogram-2/app.json @@ -11,7 +11,8 @@ "pages/recommend/recommend", "pages/recommend/rec1", "pages/recommend/rec2", - "pages/recommend/rec3" + "pages/recommend/rec3", + "pages/match/photo" ], "window": { "backgroundTextStyle": "light", @@ -21,16 +22,33 @@ }, "style": "v2", "sitemapLocation": "sitemap.json", - "@list": [ - { - "pagePath": "pages/aa/aa", - "text": "aa" - }, - { - "pagePath": "pages/index/index", - "text": "我的", - "@iconPath": "./pages/images/me.png", - "@selectedIconPath": "./pages/images/me_select.png" - } - ] + "tabBar": { + "list": [ + { + "pagePath": "pages/main/main", + "text": "首页", + "iconPath": "pages/images/home.png", + "selectedIconPath": "pages/images/home_selected.png", + "color": "" + }, + { + "pagePath": "pages/match/match", + "text": "妆容", + "iconPath": "pages/images/match.png", + "selectedIconPath": "pages/images/match_selected.png" + }, + { + "pagePath": "pages/history/history", + "text": "历史", + "iconPath": "pages/images/history.png", + "selectedIconPath": "pages/images/history_selected.png" + }, + { + "pagePath": "pages/recommend/recommend", + "text": "教程", + "iconPath": "pages/images/learn.png", + "selectedIconPath": "pages/images/learn_selected.png" + } + ] + } } \ No newline at end of file diff --git a/src/miniprogram-2/pages/history/history.js b/src/miniprogram-2/pages/history/history.js index d716243..07294fd 100644 --- a/src/miniprogram-2/pages/history/history.js +++ b/src/miniprogram-2/pages/history/history.js @@ -75,22 +75,22 @@ Page({ }, bindmaiViewTap() { - wx.navigateTo({ + wx.redirectTo({ url: '../main/main' }) }, bindhisViewTap(){ - wx.navigateTo({ + wx.redirectTo({ url: '../history/history' }) }, bindrecViewTap(){ - wx.navigateTo({ + wx.redirectTo({ url: '../recommend/recommend' }) }, bindmacViewTap(){ - wx.navigateTo({ + wx.redirectTo({ url: '../match/match' }) }, diff --git a/src/miniprogram-2/pages/history/history.wxml b/src/miniprogram-2/pages/history/history.wxml index 6552085..6f3006b 100644 --- a/src/miniprogram-2/pages/history/history.wxml +++ b/src/miniprogram-2/pages/history/history.wxml @@ -3,7 +3,7 @@ - + pages/history/history.wxml \ No newline at end of file diff --git a/src/miniprogram-2/pages/index/index.js b/src/miniprogram-2/pages/index/index.js index e1832aa..83ee6da 100644 --- a/src/miniprogram-2/pages/index/index.js +++ b/src/miniprogram-2/pages/index/index.js @@ -4,12 +4,13 @@ const app = getApp() Page({ data: { - motto: 'Hello World', + motto: '欢迎进入', userInfo: {}, hasUserInfo: false, canIUse: wx.canIUse('button.open-type.getUserInfo'), canIUseGetUserProfile: false, - canIUseOpenData: wx.canIUse('open-data.type.userAvatarUrl') && wx.canIUse('open-data.type.userNickName') // 如需尝试获取用户信息可改为false + canIUseOpenData: wx.canIUse('open-data.type.userAvatarUrl') && wx.canIUse('open-data.type.userNickName'), // 如需尝试获取用户信息可改为false + isSelected:0 }, // 事件处理函数 bindViewTap() { @@ -18,22 +19,22 @@ Page({ }) }, bindmaiViewTap() { - wx.navigateTo({ + wx.switchTab({ url: '../main/main' }) }, bindhisViewTap(){ - wx.navigateTo({ + wx.redirectTo({ url: '../history/history' }) }, bindrecViewTap(){ - wx.navigateTo({ + wx.switchTab({ url: '../recommend/recommend' }) }, bindmacViewTap(){ - wx.navigateTo({ + wx.redirectTo({ url: '../match/match' }) }, @@ -65,28 +66,29 @@ Page({ hasUserInfo: true }) }, - handleImageTap: function(e) { - const index = e.currentTarget.dataset.index; // 获取当前点击的图片的位置 - const isSelected = this.data['isSelected' + index]; // 获取当前点击的图片的选中状态 - let newData = {}; // 定义一个新的数据对象 - if (isSelected) { - newData['isSelected' + index] = false; // 如果当前图片已经被选中,就将它的选中状态设置为 false - } else { - for (let i = 1; i <= 3; i++) { - if (i !== index && this.data['isSelected' + i]) { // 如果有其他图片被选中,则将它的选中状态还原 - newData['isSelected' + i] = false; - wx.navigateTo({ - url: '../match/match' - }) - } - } - newData['isSelected' + index] = true; // 将当前点击的图片的选中状态设置为 true - } - this.setData(newData); // 使用 setData 方法更新页面数据 - // wx.navigateTo({ - // url: '../match/match' - // }) - }, + // handleImageTap: function(e) { + // const index = e.currentTarget.dataset.index; // 获取当前点击的图片的位置 + // const isSelected = this.data['isSelected' + index]; // 获取当前点击的图片的选中状态 + // let newData = {}; // 定义一个新的数据对象 + // if (isSelected) { + // newData['isSelected' + index] = false; // 如果当前图片已经被选中,就将它的选中状态设置为 false + + // } else { + // for (let i = 1; i <= 3; i++) { + // if (i !== index && this.data['isSelected' + i]) { // 如果有其他图片被选中,则将它的选中状态还原 + // newData['isSelected' + i] = false; + // // wx.navigateTo({ + // // url: '../match/match' + // // }) + // } + // } + // newData['isSelected' + index] = true; // 将当前点击的图片的选中状态设置为 true + // } + // this.setData(newData); // 使用 setData 方法更新页面数据 + // // wx.navigateTo({ + // // url: '../match/match' + // // }) + // }, onLoad(options) { @@ -103,96 +105,3 @@ Page({ }) } }) - - - - -//也可以设置在onShow() - - - -// Page({ -// /** -// * 页面的初始数据 -// */ -// data: { -// avatarUrl:"", -// name: "", -// m:"0", -// mySet:[ -// { -// 'name':"我的预约", -// 'img':"../images/预约.png" -// }, -// { -// 'name':"我的收藏", -// 'img':"../images/收藏.png" -// }, -// { -// 'name':"个人设置", -// 'img':"../images/设置.png" -// }, -// ] -// }, -// /** -// * 生命周期函数--监听页面加载 -// */ -// onLoad: function (options) { -// }, -// /** -// * 用户信息获取权限 -// */ -// getUserProfile: function () { -// if(this.data.m==0){ -// wx.getUserProfile({ -// desc: '信息仅作为个人展示', -// success: (res) => { -// console.log('获取成功', res) -// wx.setStorage({ -// data: res.userInfo, -// key: 'userInfo', -// }); -// this.setData({ -// m:1 -// }) -// this.onShow(); -// }}) -// }else{ -// wx.showToast({ -// title: '您已登录啦', -// }) -// } -// }, -// /** -// * 点击我的预约等板块后进行页面跳转 -// */ -// onMySet:function(e){ -// if(e.currentTarget.dataset.type=="个人设置"){ -// wx.navigateTo({ -// url: '/pages/index/setting/setting', -// }) -// } -// else if(e.currentTarget.dataset.type=="我的预约"){ -// wx.navigateTo({ -// url: '/pages/index/want/want', -// }) -// } -// else (e.currentTarget.dataset.type=="我的收藏") -// { -// wx.navigateTo({ -// url: '/pages/index/like/like', -// }) -// } -// }, -// /** -// * 生命周期函数--监听页面显示 -// */ -// onShow: function () { -// var useInfo = wx.getStorageSync('userInfo') -// var that = this; -// that.setData({ -// avatarUrl:useInfo.avatarUrl, -// name:useInfo.nickName, -// }) -// } -// }) diff --git a/src/miniprogram-2/pages/index/index.wxml b/src/miniprogram-2/pages/index/index.wxml index 354e27d..3839001 100644 --- a/src/miniprogram-2/pages/index/index.wxml +++ b/src/miniprogram-2/pages/index/index.wxml @@ -18,11 +18,11 @@ - {{motto}} + {{motto}} - + - - - - - - - - - + + diff --git a/src/miniprogram-2/pages/index/index.wxss b/src/miniprogram-2/pages/index/index.wxss index ea0a169..8864a7c 100644 --- a/src/miniprogram-2/pages/index/index.wxss +++ b/src/miniprogram-2/pages/index/index.wxss @@ -19,119 +19,10 @@ } -/* pages/index/index.wxss */ - -.mz{ - - font-size:50rpx; - - line-height: 200rpx; - - margin-left: 20rpx; - - color: #FFFFFF; - -} - -.hr{ - - height:16rpx; - - background-color:rgb(202, 202, 202); - -} - -.vv_1{ - line-height: 100rpx; - background-color: #ffffff; - display: flex; -} -.vv{ - - background-color: #ebebeb; - - height: 950rpx; - -} - -.xx{ - - - - display: flex; - - flex-direction:row; - - background-color:#32667e; - - line-height: 400rpx; - -} - -.tx{ - - width: 150rpx; - - height: 150rpx; - - border-radius: 40%; - - margin-left:50rpx ; - -} - -.underline{ - - text-decoration:underline; - - font-size: 30rpx; - - color: white; - - text-align: center; - - line-height: 200rpx; - -} - -.hr2{ - - height: 2rpx; - - background-color: rgba(202, 202, 202, 0.856); - -} - -.icon{ - - margin-left:470rpx; - - color: rgba(202, 202, 202) ; - - - -} - -.image1{ - - padding-top:26rpx; - - padding-right:20rpx; - - padding-left: 30rpx; - - width: 70rpx; - - height: 50rpx; - -} - - - .menu{ width: 100%; height: 140rpx; - background-color: #e0a981; + background-color: #ddcfc3; border-top-left-radius: 70rpx; border-top-right-radius: 70rpx; box-shadow: 0px -2px 10px 4px rgba(0, 0, 0,0.05); @@ -153,8 +44,16 @@ .menu-item image{ -width: 50rpx; -height: 50rpx; +width: 90rpx; +height: 90rpx; margin-bottom: 10rpx; } + +/* .navi{ + display: flex; + bottom: 0; +} +.flex-wrp{ + flex-direction: row; +} */ \ No newline at end of file diff --git a/src/miniprogram-2/pages/logs/logs.wxml b/src/miniprogram-2/pages/logs/logs.wxml index 0b6b645..1e7c073 100644 --- a/src/miniprogram-2/pages/logs/logs.wxml +++ b/src/miniprogram-2/pages/logs/logs.wxml @@ -3,4 +3,5 @@ {{index + 1}}. {{log.date}} + {{index}} diff --git a/src/miniprogram-2/pages/main/main.js b/src/miniprogram-2/pages/main/main.js index e208063..5faf4d3 100644 --- a/src/miniprogram-2/pages/main/main.js +++ b/src/miniprogram-2/pages/main/main.js @@ -5,25 +5,40 @@ Page({ * 页面的初始数据 */ data: { - + nowData:"", + rm4:"../images/recom_1_1.jpg" + }, + date:function(){ + var now=new Date(); + var Y=now.getFullYear(); + var M=now.getMonth()+1; + var D=now.getDate(); + var nowDate= Date(Y+"//"+M+"//"+D+"//"); + console.log(nowDate); + return nowDate; + }, + bindrecViewTap(){ + wx.redirectTo({ + url:'../recommend/rec1' + }) }, bindmaiViewTap() { - wx.navigateTo({ + wx.redirectTo({ url: '../main/main' }) }, bindhisViewTap(){ - wx.navigateTo({ + wx.redirectTo({ url: '../history/history' }) }, bindrecViewTap(){ - wx.navigateTo({ + wx.redirectTo({ url: '../recommend/recommend' }) }, bindmacViewTap(){ - wx.navigateTo({ + wx.redirectTo({ url: '../match/match' }) }, @@ -31,7 +46,9 @@ Page({ * 生命周期函数--监听页面加载 */ onLoad(options) { - + this.setData({ + nowData:this.date() + }) }, /** @@ -45,7 +62,7 @@ Page({ * 生命周期函数--监听页面显示 */ onShow() { - + this.date(); }, /** diff --git a/src/miniprogram-2/pages/main/main.wxml b/src/miniprogram-2/pages/main/main.wxml index fe4f35a..e7154cd 100644 --- a/src/miniprogram-2/pages/main/main.wxml +++ b/src/miniprogram-2/pages/main/main.wxml @@ -1,21 +1,14 @@ - - 主界面 + + + {{filter.day(1621409888000)}} + + {{date()}} + 选择一个妆容开始美好的一天吧! - - - 首页 - - - 匹配 - - - 历史 - - - 推荐 - + + + - -pages/main/main.wxml \ No newline at end of file + \ No newline at end of file diff --git a/src/miniprogram-2/pages/main/main.wxss b/src/miniprogram-2/pages/main/main.wxss index ecc2274..052ece1 100644 --- a/src/miniprogram-2/pages/main/main.wxss +++ b/src/miniprogram-2/pages/main/main.wxss @@ -1 +1,4 @@ -/* pages/main/main.wxss */ \ No newline at end of file +/* pages/main/main.wxss */ +.home{ + +} \ 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 34b4542..36f2eba 100644 --- a/src/miniprogram-2/pages/match/match.js +++ b/src/miniprogram-2/pages/match/match.js @@ -5,9 +5,33 @@ Page({ * 页面的初始数据 */ data: { - + phopath:"../match/photo" + }, + bindphoViewTap(){ + wx.redirecTo({ + url:'../match/photo' + }) + }, + bindmaiViewTap() { + wx.redirectTo({ + url: '../main/main' + }) + }, + bindhisViewTap(){ + wx.redirectTo({ + url: '../history/history' + }) + }, + bindrecViewTap(){ + wx.redirectTo({ + url: '../recommend/recommend' + }) + }, + bindmacViewTap(){ + wx.redirectTo({ + url: '../match/match' + }) }, - /** * 生命周期函数--监听页面加载 */ diff --git a/src/miniprogram-2/pages/match/match.wxml b/src/miniprogram-2/pages/match/match.wxml index 0700633..7c5ea89 100644 --- a/src/miniprogram-2/pages/match/match.wxml +++ b/src/miniprogram-2/pages/match/match.wxml @@ -1,21 +1,24 @@ - + + 点击开始拍照 + + - + pages/match/match.wxml \ No newline at end of file diff --git a/src/miniprogram-2/pages/recommend/recommend.js b/src/miniprogram-2/pages/recommend/recommend.js index 5bdd72d..b778eb7 100644 --- a/src/miniprogram-2/pages/recommend/recommend.js +++ b/src/miniprogram-2/pages/recommend/recommend.js @@ -35,22 +35,22 @@ Page({ }) }, bindmaiViewTap() { - wx.navigateTo({ + wx.redirectTo({ url: '../main/main' }) }, bindhisViewTap(){ - wx.navigateTo({ + wx.redirectTo({ url: '../history/history' }) }, bindrecViewTap(){ - wx.navigateTo({ + wx.redirectTo({ url: '../recommend/recommend' }) }, bindmacViewTap(){ - wx.navigateTo({ + wx.redirectTo({ url: '../match/match' }) }, diff --git a/src/miniprogram-2/pages/recommend/recommend.wxml b/src/miniprogram-2/pages/recommend/recommend.wxml index c6e0d82..fe42dd1 100644 --- a/src/miniprogram-2/pages/recommend/recommend.wxml +++ b/src/miniprogram-2/pages/recommend/recommend.wxml @@ -21,18 +21,4 @@ - - - 首页 - - - 匹配 - - - 历史 - - - 推荐 - - \ No newline at end of file