diff --git a/.DS_Store b/.DS_Store
new file mode 100644
index 0000000..7de61fd
Binary files /dev/null and b/.DS_Store differ
diff --git a/api/index.js b/api/index.js
index 4fbfd4d..9f94ebb 100644
--- a/api/index.js
+++ b/api/index.js
@@ -30,6 +30,9 @@ import site from "./interfaces/site"
// 个人中心
import user from "./interfaces/user"
+// 发现
+import found from "./interfaces/found"
+
export default {
auth,
file,
@@ -39,5 +42,6 @@ export default {
order,
recruit,
site,
- user
+ user,
+ found
}
\ No newline at end of file
diff --git a/api/interfaces/found.js b/api/interfaces/found.js
new file mode 100644
index 0000000..dced56a
--- /dev/null
+++ b/api/interfaces/found.js
@@ -0,0 +1,23 @@
+ /*
+ * zdx
+ * 发现接口
+*/
+
+import { req } from "../request"
+
+// 产品首页
+const foundIndex = (data) => req({
+ url: "discover/lists",
+ data:data
+})
+
+// 收藏 subscribe favorite 点赞
+const foundSubscribeFavorite = (discover,type) => req({
+ url: `discover/${discover}/${type}`
+})
+
+
+export default ({
+ foundIndex,
+ foundSubscribeFavorite
+})
\ No newline at end of file
diff --git a/api/request.js b/api/request.js
index 72fcf21..950802d 100644
--- a/api/request.js
+++ b/api/request.js
@@ -12,8 +12,8 @@ import {updToken} from './updateToken'
// wx6bd4fcc040bfa025 水感应 正式appid
// wx9ae0c63d0c58caeb 测试appid 三猿
// wx3056ec23196eaf02 水感应 测试
-const api = "https://api.shui.shuiganying.com/api/" // 正式环境
-// const api = "https://shuitest.shuiganying.com/api/" // 测试环境
+// const api = "https://api.shui.shuiganying.com/api/" // 正式环境
+const api = "https://shuitest.shuiganying.com/api/" // 测试环境
const header = {
"Accept" : "application/json"
}
diff --git a/app.js b/app.js
index cd3cc3f..5bd18d1 100644
--- a/app.js
+++ b/app.js
@@ -17,7 +17,6 @@ App({
this.globalData.isOfficial = true
} else {
this.globalData.isOfficial = false
-
}
// 检查用户登录状态
diff --git a/app.json b/app.json
index 7e9858b..11e36c7 100644
--- a/app.json
+++ b/app.json
@@ -47,7 +47,9 @@
"pages/order/refund/refund",
"pages/order/refundForm/refundForm",
"pages/order/refundInfo/refundInfo",
- "pages/order/refundWrite/refundWrite"
+ "pages/order/refundWrite/refundWrite",
+ "pages/beautify/coach",
+ "pages/found/index"
],
"window": {
"backgroundTextStyle": "light",
@@ -70,8 +72,8 @@
"selectedIconPath": "/static/tabBarIcon/tabBar_selected_01.png"
},
{
- "pagePath": "pages/recruit/index",
- "text": "体验官",
+ "pagePath": "pages/found/index",
+ "text": "发现",
"iconPath": "/static/tabBarIcon/tabBar_04.png",
"selectedIconPath": "/static/tabBarIcon/tabBar_selected_04.png"
},
diff --git a/pages/.DS_Store b/pages/.DS_Store
new file mode 100644
index 0000000..22dbe5e
Binary files /dev/null and b/pages/.DS_Store differ
diff --git a/pages/beautify/.DS_Store b/pages/beautify/.DS_Store
new file mode 100644
index 0000000..5008ddf
Binary files /dev/null and b/pages/beautify/.DS_Store differ
diff --git a/pages/beautify/coach.js b/pages/beautify/coach.js
new file mode 100644
index 0000000..be1108b
--- /dev/null
+++ b/pages/beautify/coach.js
@@ -0,0 +1,357 @@
+// pages/beautify/coach.wxss.js
+Page({
+ data: {
+ videos: [{
+ id: 1,
+ cover: 'https://cdn.shuiganying.com/images/2023/11/14/236a3949c2c0794de850617d4204a159.png',
+ url: 'https://sns-video-bd.xhscdn.com/stream/110/258/01e524b445288836010370038b176a34a1_258.mp4',
+ steps: [{
+ title: '第一步:在右脸颊处缓慢向上打圈,反复两次',
+ startTime: 0, // 开始时间
+ startCountDown: 3, // 开始倒计时(暂时先可不给)
+ endTime: 7, // 自定义第一段截止到
+ },
+ {
+ title: '第二步:在右脸颊处缓慢向上打圈,反复3次',
+ startTime: 8,
+ startCountDown: 11, // 开始倒计时
+ endTime: 15, // 自定义 20s
+ },
+ {
+ title: '第三步:在右脸颊处缓慢向上打圈,反复4次',
+ startTime: 16,
+ startCountDown: 18, // 开始倒计时
+ endTime: 20, // 自定义 20s
+ }
+ ],
+ },
+ {
+ id: 2,
+ cover: 'https://cdn.shuiganying.com/images/2023/11/14/0835381c22b00f574afb34d319cce442.png',
+ url: 'https://sns-video-bd.xhscdn.com/stream/110/258/01e524b445288836010370038b176a34a1_258.mp4',
+ steps: [{
+ title: '第一步:在右脸颊处缓慢向上打圈,反复两次',
+ startTime: 0,
+ startCountDown: 3, // 开始倒计时
+ endTime: 7, // 自定义第一段截止到
+ },
+ {
+ title: '第二步:在右脸颊处缓慢向上打圈,反复3次',
+ startTime: 8,
+ startCountDown: 11, // 开始倒计时
+ endTime: 15, // 自定义 20s
+ },
+ {
+ title: '第三步:在右脸颊处缓慢向上打圈,反复4次',
+ startTime: 16,
+ startCountDown: 18, // 开始倒计时
+ endTime: 20, // 自定义 20s
+ }
+ ],
+ },
+ {
+ id: 3,
+ cover: 'https://cdn.shuiganying.com/images/2023/11/14/0835381c22b00f574afb34d319cce442.png',
+ url: 'https://sns-video-bd.xhscdn.com/stream/110/258/01e524b445288836010370038b176a34a1_258.mp4',
+ steps: [{
+ title: '第一步:在右脸颊处缓慢向上打圈,反复两次',
+ startTime: 0,
+ startCountDown: 3, // 开始倒计时
+ endTime: 7, // 自定义第一段截止到
+ },
+ {
+ title: '第二步:在右脸颊处缓慢向上打圈,反复3次',
+ startTime: 8,
+ startCountDown: 11, // 开始倒计时
+ endTime: 15, // 自定义 20s
+ },
+ {
+ title: '第三步:在右脸颊处缓慢向上打圈,反复4次',
+ startTime: 16,
+ startCountDown: 18, // 开始倒计时
+ endTime: 20, // 自定义 20s
+ }
+ ],
+ },
+ {
+ id: 4,
+ cover: 'https://cdn.shuiganying.com/images/2023/11/14/236a3949c2c0794de850617d4204a159.png',
+ url: 'https://sns-video-bd.xhscdn.com/stream/110/258/01e524b445288836010370038b176a34a1_258.mp4',
+ steps: [{
+ title: '第一步:在右脸颊处缓慢向上打圈,反复两次',
+ startTime: 0,
+ startCountDown: 3, // 开始倒计时
+ endTime: 7, // 自定义第一段截止到
+ },
+ {
+ title: '第二步:在右脸颊处缓慢向上打圈,反复3次',
+ startTime: 8,
+ startCountDown: 11, // 开始倒计时
+ endTime: 15, // 自定义 20s
+ },
+ {
+ title: '第三步:在右脸颊处缓慢向上打圈,反复4次',
+ startTime: 16,
+ startCountDown: 18, // 开始倒计时
+ endTime: 20, // 自定义 20s
+ }
+ ],
+ }
+ ],
+ selectVideoItem: {
+ id: 0, // 默认id是否为0
+ playedState: false, // 当前是否是正在播放播放状态
+ muted: false, // 静音状态
+ stepsCount: 0, // 默认分几个步骤
+ currentSteps: 0, // 当前默认是第几步
+ currentTime: 0, // 当前总时长
+ remainingTime: 0, // 播放时间
+ },
+ videoContext: null,
+ seeAllVideo: true,
+ openCamera:false, // 是否打开摄像头
+
+ // 是否显示摄像头
+ isCamera: false
+ },
+
+ onShow(){
+ wx.getSetting({
+ success:(res)=> {
+ let authSetting = res.authSetting
+ this.setData({
+ isCamera: authSetting['scope.camera'] == true?true:false,
+ openCamera:authSetting['scope.camera'] == true?true:false
+ })
+ }
+ })
+ },
+
+ onReady(res) {
+ this.videoContext = wx.createVideoContext('myVideo')
+ },
+ // 视频更新事件
+ videoTimeupdated(e) {
+ let selectVideoItem = this.data.selectVideoItem
+ let currentTimeEnd = selectVideoItem.steps[selectVideoItem.currentSteps].endTime
+ let {
+ currentTime
+ } = e.detail
+ if (currentTime > currentTimeEnd && selectVideoItem.currentSteps < selectVideoItem.stepsCount) {
+ selectVideoItem.currentSteps++
+ }
+ // 第一次初始化
+ // let startCountDown = selectVideoItem.steps[selectVideoItem.currentSteps].startCountDown
+ // if(!selectVideoItem.remainingTime &&selectVideoItem.currentSteps!=this.data.selectVideoItem.currentSteps){
+ // let remainingTime=parseInt(currentTimeEnd - startCountDown) >=10 ? parseInt(currentTimeEnd -startCountDown):'0' + parseInt(currentTimeEnd -startCountDown)
+ // selectVideoItem.remainingTime = remainingTime
+ // }
+ // 递减
+ // if (currentTime >= startCountDown) {
+ let remainingTime = parseInt(currentTimeEnd - currentTime) >= 10 ? parseInt(currentTimeEnd - currentTime) : '0' + parseInt(currentTimeEnd - currentTime)
+ selectVideoItem.remainingTime = remainingTime
+ // }
+ this.setData({
+ selectVideoItem: selectVideoItem
+ })
+ console.log('视频更新事件', selectVideoItem.currentSteps)
+ },
+ // 视频播放结束事件
+ videoEnded() {
+ console.log('视频播放结束事件')
+ // 完成弹窗 重置基础数据
+
+ this.setData({
+ selectVideoItem: {
+ id: 0
+ },
+ seeAllVideo: true,
+ })
+ },
+ // 点击全部视频
+ allVideoTab() {
+ this.setData({
+ seeAllVideo: !this.data.seeAllVideo
+ })
+ },
+ // 点击暂停视频
+ videoPauseTab() {
+ console.log('暂停')
+ let selectVideoItem = this.data.selectVideoItem
+ selectVideoItem.playedState = false
+ this.setData({
+ selectVideoItem: selectVideoItem
+ })
+ this.videoContext.pause()
+ },
+ // 点击播放视频
+ videoPlayTab() {
+ console.log('播放')
+ let selectVideoItem = this.data.selectVideoItem
+ selectVideoItem.playedState = true
+ selectVideoItem.muted = false
+ this.setData({
+ selectVideoItem: selectVideoItem
+ })
+ this.videoContext.play()
+ },
+ // 轮播图切换
+ swiperChange(e) {
+ console.log(e.detail)
+ },
+ // 选择视频教程-点击
+ selectVideo(e) {
+ let item = e.currentTarget.dataset.item
+ console.log(this.data.selectVideoItem.id, item.id)
+ if (this.data.selectVideoItem.id == item.id) return
+
+
+ item.playedState = false
+ item.stepsCount = item.steps.length
+ item.currentSteps = 0
+ this.setData({
+ selectVideoItem: item,
+ seeAllVideo: false,
+ })
+ // 处理弹窗,且最后在处理视频播放
+ setTimeout(() => {
+ this.doPlay(0)
+ }, 300);
+ },
+ // 播放视频
+ doPlay(position) {
+ console.log(position)
+ this.videoContext.seek(position)
+ let selectVideoItem = this.data.selectVideoItem
+ selectVideoItem.playedState = true
+ this.setData({
+ selectVideoItem: selectVideoItem
+ })
+ // 播放视频
+ this.videoContext.play()
+ },
+ // 静音非经营处理
+ mutedTab(e) {
+ console.log(e)
+ let type = e.target.dataset.type
+ console.log(type)
+ let selectVideoItem = this.data.selectVideoItem
+ if (type == 'open') {
+ selectVideoItem.muted = false
+
+ } else {
+ selectVideoItem.muted = true
+ }
+ this.setData({
+ selectVideoItem: selectVideoItem
+ })
+ },
+ // 上一段,下一段切换
+ preTab(e) {
+ let type = e.target.dataset.type
+ let selectVideoItem = this.data.selectVideoItem
+ if (type == 'prev') {
+ if (selectVideoItem.currentSteps == 0) {
+ wx.showToast({
+ title: '已经是第一步',
+ icon: 'none',
+ mask: true
+ })
+ return
+ }
+
+ if (selectVideoItem.currentSteps > 0) {
+ selectVideoItem.currentSteps--
+ let startTime = selectVideoItem.steps[selectVideoItem.currentSteps].startTime
+ this.videoContext.pause()
+ this.videoContext.seek(startTime)
+ this.videoContext.play()
+ selectVideoItem.playedState = true
+ this.setData({
+ selectVideoItem:selectVideoItem
+ })
+ }
+
+ } else {
+ if (selectVideoItem.currentSteps == 3) {
+ wx.showToast({
+ title: '已经是最后一步',
+ icon: 'none',
+ mask: true
+ })
+ return
+ }
+ if (selectVideoItem.currentSteps < 3) {
+ selectVideoItem.currentSteps++
+ let startTime = selectVideoItem.steps[selectVideoItem.currentSteps].startTime
+ this.videoContext.pause()
+ this.videoContext.seek(startTime)
+ this.videoContext.play()
+ selectVideoItem.playedState = true
+ this.setData({
+ selectVideoItem:selectVideoItem
+ })
+ }
+ }
+ },
+ openMirror(){
+ if(this.data.openCamera){
+ this.setData({
+ openCamera:!this.data.openCamera
+ })
+ return
+ }
+ console.log(11)
+ wx.getSetting({
+ success:(res)=> {
+ let authSetting = res.authSetting
+ console.log(res)
+ if(!authSetting['scope.camera'] || authSetting['scope.camera'] == undefined){
+ wx.showModal({
+ title: '温馨提示',
+ content: '若不授权使用摄像头,将无法使用镜子功能!',
+ cancelText: '不授权',
+ cancelColor: '#999',
+ confirmText: '授权',
+ confirmColor: '#1ba9ba',
+ success:(res)=> {
+ if (res.confirm) {//允许打开授权页面
+ //调起客户端小程序设置界面,返回用户设置的操作结果
+ if(authSetting['scope.camera'] == undefined){
+ wx.authorize({
+ scope: 'scope.camera',
+ success: () => {
+ // 用户已经同意小程序使用摄像头
+ this.setData({
+ openCamera:true
+ })
+ },
+ })
+ }else{
+ wx.openSetting({
+ success:(res)=> {
+ res.authSetting = {
+ "scope.camera": true
+ }
+ this.setData({
+ openCamera:true
+ })
+ },
+ })
+ }
+ } else if (res.cancel) {//拒绝打开授权页面
+ this.setData({
+ openCamera:false
+ })
+ }
+ }
+ })
+ }else{
+ this.setData({
+ openCamera:!this.data.openCamera
+ })
+ }
+ }
+ })
+ }
+})
\ No newline at end of file
diff --git a/pages/beautify/coach.json b/pages/beautify/coach.json
new file mode 100644
index 0000000..c4f4959
--- /dev/null
+++ b/pages/beautify/coach.json
@@ -0,0 +1,4 @@
+{
+ "usingComponents": {},
+ "navigationBarTitleText": "美肤教程"
+}
\ No newline at end of file
diff --git a/pages/beautify/coach.wxml b/pages/beautify/coach.wxml
new file mode 100644
index 0000000..5237786
--- /dev/null
+++ b/pages/beautify/coach.wxml
@@ -0,0 +1,49 @@
+
+
+
+ 镜子
+
+
+ X
+
+
+
+ 张三一
+
+
+
+
+
+ 请在下方选择视频
+
+
+
+
+
+ 00:{{selectVideoItem.remainingTime}}
+ {{selectVideoItem.steps[selectVideoItem.currentSteps].title}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{!seeAllVideo?'全部视频':'隐藏'}}
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/beautify/coach.wxss b/pages/beautify/coach.wxss
new file mode 100644
index 0000000..cc26dbd
--- /dev/null
+++ b/pages/beautify/coach.wxss
@@ -0,0 +1,212 @@
+/* pages/beautify/coach.wxss.wxss */
+.coach{
+ position: relative;
+ background-color: #f9f0ed;
+}
+.coach-top-covers{
+ width: 100%;
+ height: 100rpx;
+}
+/* 顶部图片展示 */
+.coach-top{
+ /* height: 100vh; */
+ width: 100vw;
+ background-color: #f9f0ed;
+ position: relative;
+ z-index: 0;
+ /* padding-bottom: 40vh; */
+ padding-top: 0rpx;
+ position: relative;
+ top: -30rpx;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ box-sizing: border-box;
+}
+.coach-avatar{
+ position: absolute;
+ left: 30rpx;
+ top: 70rpx;
+ z-index: 100;
+ border-radius: 30rpx;
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ justify-content: flex-start;
+ box-sizing: border-box;
+ color: #111;
+ font-size: 30rpx;
+ font-weight: bold;
+}
+.coach-avatar image{
+ width: 100rpx;
+ height: 100rpx;
+ border-radius: 100rpx;
+ margin-right: 20rpx;
+}
+.coach-camera{
+ position: absolute;
+ right: 20rpx;
+ top: 60rpx;
+ z-index: 100;
+ border-radius: 30rpx;
+ border: solid 10rpx #FF898F;
+}
+.coach .coach-close{
+ width: 50rpx;
+ height: 40rpx;
+ background-color: #FF898F;
+ text-align: center;
+ color: #FFF;
+ position: absolute;
+ right: 0;
+ top: 0;
+ z-index: 1;
+ border-radius: 0 20rpx 0 20rpx;
+}
+.coach-camera camera{
+ width: 220rpx;
+ height: 260rpx;
+ border-radius: 20rpx;
+ position: relative;
+ /* z-index: 99; */
+ transform: rotateY(360deg);
+}
+.coach-mirror{
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ justify-content: flex-end;
+ box-sizing: border-box;
+ position: absolute;
+ right: 30rpx;
+ top: 60rpx;
+ border:solid 1rpx #FF898F;
+ border-radius: 40rpx;
+ padding: 10rpx 30rpx;
+ font-size: 30rpx;
+ color: #111111;
+}
+.coach-mirror image{
+ width: 30rpx;
+ height: 30rpx;
+ /* transform: rotate(30deg); */
+ margin-right: 4rpx;
+}
+
+.coach-top-video{
+ width: 78vw;
+ height: 720rpx;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ box-sizing: border-box;
+ font-size: 30rpx;
+ color: #222;
+}
+.coach-top-cover{
+ width: 100%;
+ height: 100%;
+}
+.coach-top-text{
+ margin-top: 40rpx;
+ font-size: 32rpx;
+ color: #111;
+ font-weight: bold;
+}
+/* 底部视频列表 */
+
+.coach-bottom{
+ width: 100vw;
+ background-color: white;
+ /* position: fixed; */
+ /* bottom: 0; */
+ /* left: 0; */
+ z-index: 1;
+}
+.coach-swiper{
+ padding-top: 40rpx;
+ padding-left: 20rpx;
+ padding-bottom: 20rpx;
+ height: 200rpx;
+}
+
+.coach-swiper-item{
+ position: relative;
+}
+.coach-swiper-item-cover{
+ width: calc(100% - 20rpx);
+ height: 160rpx;
+ margin-right: 20rpx;
+ border-radius: 20rpx;
+ position: relative;
+}
+.coach-swiper-item-cover-active{
+ width: calc(100% - 20rpx);
+ height: 160rpx;
+ background-color: rgba(0, 0, 0, 0.1);
+ position: absolute;
+ top: 0;
+ left: 0;
+ z-index: 1;
+ border-radius: 20rpx;
+}
+
+/* 声音播放控制按钮 */
+.video-control{
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ justify-content: center;
+ box-sizing: border-box;
+ padding: 20rpx 0 60rpx 30rpx;
+ /* display: none; */
+}
+.video-control image{
+ width: 44rpx;
+ height: 44rpx;
+ padding: 10rpx;
+}
+.video-control .source-right{
+ flex:1;
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ justify-content: flex-end;
+ box-sizing: border-box;
+}
+.video-control .source-right .play{
+ width: 100rpx;
+ height: 100rpx;
+ padding: 0 40rpx;
+}
+.video-control .source-right .next{
+ transform: rotate(180deg);
+}
+.video-control .source-right .all-video{
+ min-width: 120rpx;
+ text-align:center;
+ margin-left: 40rpx;
+ margin-right: 30rpx;
+ border-radius: 40rpx;
+ border: solid 1rpx #FF898F;
+ color: #FF898F;
+ padding: 10rpx 20rpx;
+ font-size: 26rpx;
+}
+
+
+/* 倒计时和分布展示 */
+
+.steps-cont{
+ font-size: 28rpx;
+ color: #000;
+ padding: 30rpx;
+}
+.steps-time{
+ font-size: 70rpx;
+ font-weight: bold;
+ margin-bottom: 10rpx;
+}
\ No newline at end of file
diff --git a/pages/beautify2/coach.js b/pages/beautify2/coach.js
new file mode 100644
index 0000000..9bc8c88
--- /dev/null
+++ b/pages/beautify2/coach.js
@@ -0,0 +1,66 @@
+// pages/beautify2/coach.js
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/beautify2/coach.wxml b/pages/beautify2/coach.wxml
new file mode 100644
index 0000000..ea1702d
--- /dev/null
+++ b/pages/beautify2/coach.wxml
@@ -0,0 +1,2 @@
+
+pages/beautify2/coach.wxml
\ No newline at end of file
diff --git a/pages/found/index.js b/pages/found/index.js
new file mode 100644
index 0000000..217c6de
--- /dev/null
+++ b/pages/found/index.js
@@ -0,0 +1,132 @@
+Page({
+ data: {
+ page : 1,
+ has_more: true,
+ lists : [],
+ share_id: '',
+ loading : true,
+ },
+
+ onLoad(e){
+ this.setData({
+ share_id : e.share_id || ''
+ })
+ getApp().globalData.inviteText = e.invite || ''
+ this.getList()
+ },
+
+ onHide(){
+ if(this.data.share_id){
+ this.setData({
+ share_id:''
+ })
+ }
+ },
+ onShow(){
+ if( this.data.lists.length>0 && this.data.share_id){
+ this.setData({
+ page:1,
+ has_more:true,
+ lists:[]
+ })
+ this.getList()
+ }
+ },
+ getList(){
+ let params = {
+ page:this.data.page,
+ share_id:this.data.share_id
+ }
+ wx.$api.found.foundIndex(params).then(res => {
+ let lists = this.data.lists
+ if(this.data.page == 1){lists = []}
+ lists = this.data.lists.concat(res.data.data)
+
+ this.setData({
+ lists : lists,
+ has_more: res.data.page.has_more,
+ })
+
+ this.setData({
+ loading:false
+ })
+ setTimeout(()=>{
+ wx.hideLoading()
+ wx.stopPullDownRefresh()
+ },3000)
+ }).catch(err=>{
+ wx.showToast({
+ title: err.message,
+ icon :'none',
+ mask :true,
+ duration:2000
+ })
+ })
+ },
+ onPullDownRefresh(){
+ this.setData({
+ page:1,
+ has_more:true,
+ lists:[],
+ loading:true
+ })
+ this.getList()
+ },
+ onReachBottom(){
+ if(this.data.has_more){
+ this.setData({
+ page:this.data.page +1
+ })
+ this.getList()
+ wx.showLoading({
+ title: '疯狂加载中..',
+ })
+ }else{
+ wx.showToast({
+ title: '没有更多',
+ icon:'none',
+ mask:true,
+ duration:2000
+ })
+ }
+ },
+ // 预览图片
+ preImg(e){
+ let current = e.currentTarget.dataset.idx
+ console.log(current)
+ let urls = e.currentTarget.dataset.urls
+ wx.previewImage({
+ urls,
+ current:urls[current]
+ })
+ },
+ // 收藏
+ doSubscribeFavorite(e){
+ let index= e.currentTarget.dataset.index
+ let type = e.currentTarget.dataset.type
+ let item = this.data.lists[index]
+ let lists = this.data.lists
+ wx.$api.found.foundSubscribeFavorite(item.id,type).then(res => {
+ lists[index].is[`${type}`] = res.data.res
+ lists[index].count[`${type}`] = res.data.count
+ this.setData({
+ lists:lists
+ })
+ }).catch(err=>{
+ wx.showToast({
+ title: err.message,
+ icon :'none',
+ mask :true,
+ duration:2000
+ })
+ })
+ },
+ onShareAppMessage(e){
+ let {describe,id,share_cover}= e.target.dataset.obj
+ return {
+ title : describe,
+ imageUrl: share_cover,
+ path : "/pages/found/index?share_id=" + id + '&invite=' + wx.getStorageSync("invite")
+ }
+ },
+})
\ No newline at end of file
diff --git a/pages/found/index.json b/pages/found/index.json
new file mode 100644
index 0000000..3886b06
--- /dev/null
+++ b/pages/found/index.json
@@ -0,0 +1,9 @@
+{
+ "usingComponents": {},
+ "navigationBarTitleText": "发现",
+ "navigationBarTextStyle": "white",
+ "navigationBarBackgroundColor": "#5283ea",
+ "enablePullDownRefresh": true,
+ "backgroundTextStyle": "dark",
+ "backgroundColor": "#eeeeee"
+}
\ No newline at end of file
diff --git a/pages/found/index.wxml b/pages/found/index.wxml
new file mode 100644
index 0000000..f98a6fe
--- /dev/null
+++ b/pages/found/index.wxml
@@ -0,0 +1,60 @@
+
+
+ 疯狂加载中
+
+
+
+
+
+
+
+
+
+ {{item.user.name || '未知用户'}}
+
+ {{item.created_at}}
+
+
+
+ {{item.describe}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/found/index.wxss b/pages/found/index.wxss
new file mode 100644
index 0000000..df96940
--- /dev/null
+++ b/pages/found/index.wxss
@@ -0,0 +1,126 @@
+page {
+ background-color: #f9f9f9;
+ padding-bottom: 80rpx;
+}
+.found{
+ background-color: #fff;
+ width: 100vw;
+ border-radius: 10rpx;
+ box-sizing: border-box;
+ margin-bottom: 20rpx;
+}
+.avatar{
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ justify-content: space-between;
+ box-sizing: border-box;
+ font-size: 28rpx;
+ font-family: PingFang SC;
+ font-weight: 400;
+ color: #999999;
+ padding: 30rpx;
+}
+.avatar-left {
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ justify-content:flex-start;
+ box-sizing: border-box;
+ font-size: 36rpx;
+ font-weight: bold;
+ color: #111111;
+}
+.avatar-left .cover{
+ width: 80rpx;
+ height: 80rpx;
+ border-radius: 50%;
+ margin-right: 30rpx;
+ border: solid 10rpx rgba(224, 222, 222, 0.1);
+}
+
+.des{
+ font-size: 30rpx;
+ font-family: PingFang SC;
+ font-weight: 400;
+ color: #111111;
+ padding: 0 30rpx 30rpx 30rpx;
+}
+
+.cont{
+ padding:0 30rpx 10rpx 30rpx;
+}
+.cont-img-list{
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ justify-content: flex-start;
+ box-sizing: border-box;
+ flex-wrap: wrap;
+}
+.cont-img-list image{
+ margin-right: 20rpx;
+ margin-bottom: 20rpx;
+ border-radius: 10rpx;
+ width: calc(100vw/3 - 20px);
+ height: calc(100vw/3 - 20px);
+}
+
+.cont-img-list2{
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ justify-content: flex-start;
+ box-sizing: border-box;
+ flex-wrap: wrap;
+}
+.cont-img-list2 image{
+ margin-right: 20rpx;
+ margin-bottom: 20rpx;
+ border-radius: 10rpx;
+ width: calc(100vw/2.2 - 20px);
+ height: calc(100vw/2.2 - 20px);
+}
+
+.cont-video{
+ width: 100%;
+}
+
+.footer{
+ border-top: solid 1rpx #eee;
+ font-size: 28rpx!important;
+ font-family: PingFang SC;
+ font-weight: 400!important;
+ color: #666666;
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ justify-content: space-around;
+ box-sizing: border-box;
+ padding: 20rpx 30rpx;
+}
+
+.footer-item{
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ justify-content: center;
+ box-sizing: border-box;
+ padding: 20rpx 20rpx;
+ flex: 1;
+ background-color: #fff!important;
+}
+.footer-item image{
+ width: 32rpx;
+ height: 32rpx;
+ margin-right: 10rpx;
+}
+.footer button{
+ font-size: 28rpx;
+ color: #666666;
+ font-weight: normal;
+}
+
+.footer button:after {
+ border: none;
+}
\ No newline at end of file
diff --git a/pages/mall/index.wxml b/pages/mall/index.wxml
index 0d34e2e..aa06f46 100644
--- a/pages/mall/index.wxml
+++ b/pages/mall/index.wxml
@@ -16,6 +16,12 @@
+
+
+
+
@@ -35,6 +41,8 @@
+
+
必Buy推荐
diff --git a/pages/report/detail/detail.js b/pages/report/detail/detail.js
index 979b9c6..82b2c95 100644
--- a/pages/report/detail/detail.js
+++ b/pages/report/detail/detail.js
@@ -35,7 +35,8 @@ Page({
progress: 100, // 进度条的宽度,这里的单位是px,所以在wxml文件中要改为rpx
precent: 50, // 这个是百分比
- refertoStatus: false
+ refertoStatus: false,
+ suggest : {} // 推荐方案
},
onLoad(options) {
@@ -72,7 +73,9 @@ Page({
zoneArea : (res.data.skin_analyze.result.result.oily_intensity.t_zone.area * 100).toFixed(1),
leftcheekArea : (res.data.skin_analyze.result.result.oily_intensity.left_cheek.area * 100).toFixed(1),
rightcheekArea : (res.data.skin_analyze.result.result.oily_intensity.right_cheek.area * 100).toFixed(1),
+ suggest:res.data.suggest
})
+ console.log(res)
}).catch(err => { })
},
diff --git a/pages/report/detail/detail.wxml b/pages/report/detail/detail.wxml
index 8d1d08c..fc50451 100644
--- a/pages/report/detail/detail.wxml
+++ b/pages/report/detail/detail.wxml
@@ -18,7 +18,7 @@
-
+
皮肤概况
@@ -85,7 +85,7 @@
-
+
衰老分析
@@ -149,7 +149,7 @@
-
+
眼袋
@@ -169,7 +169,7 @@
-
+
黑眼圈
@@ -189,7 +189,7 @@
-
+
敏感度分析
@@ -279,7 +279,7 @@
-
+
黑头分析
@@ -315,8 +315,6 @@
-
-
色素性分析
@@ -376,6 +374,31 @@
+
+
+
+ 使用水感应喷雾最佳方案
+
+
+
+ {{suggest.title}}
+ {{suggest.description}}
+
+
+
+
+
+
+
+
+ {{suggest.goods.name}}
+ {{suggest.goods.description}}
+
+ ¥{{suggest.goods.price.price}}
+ BUY
+
+
+
@@ -385,7 +408,7 @@
diff --git a/pages/report/detail/detail.wxss b/pages/report/detail/detail.wxss
index 3257f19..bdfa315 100644
--- a/pages/report/detail/detail.wxss
+++ b/pages/report/detail/detail.wxss
@@ -251,6 +251,121 @@ page {
text-align: right;
}
+.addvice{
+ width: 100%;
+ background-color: white;
+ margin-top: 30rpx;
+ border-radius: 15rpx;
+ padding: 30rpx;
+ box-sizing: border-box;
+}
+
+.addvice-title{
+ font-size: 36rpx;
+ font-weight: bold;
+ color: #111111;
+ position: relative;
+ display: inline-block;
+ padding: 0 2rpx;
+}
+.addvice-title::before{
+ content: "";
+ position: absolute;
+ width: 100%;
+ height: 20rpx;
+ bottom: 0;
+ left: 0;
+ background-color: rgba(60, 125, 255, 0.2);
+}
+
+.addvice-item{
+ display: flex;
+ flex-direction: row;
+ align-items: flex-start;
+ justify-content: flex-start;
+ box-sizing: border-box;
+ font-size: 28rpx;
+ font-family: PingFang SC;
+ font-weight: 400;
+ color: #666666;
+ margin-top: 40rpx;
+}
+.addvice-item image{
+ width: 80rpx;
+ height: 80rpx;
+ margin-top: 20rpx;
+}
+.addvice-item .cont{
+ flex: 1;
+ margin-left: 40rpx;
+}
+
+.addvice-item .cont .tilte{
+ font-size: 32rpx;
+ font-family: PingFang SC;
+ font-weight: 400;
+ color: #111111;
+ margin-bottom: 12rpx;
+}
+
+.addvice-goods{
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ justify-content:flex-start;
+ box-sizing: border-box;
+ background-color: white;
+ margin-top: 30rpx;
+ border-radius: 15rpx;
+ padding: 30rpx;
+}
+.addvice-goods image{
+ width: 160rpx;
+ height: 160rpx;
+}
+
+.addvice-goods .cont{
+ flex: 1;
+ margin-left: 30rpx;
+ font-size: 32rpx;
+ font-weight: 500;
+ color: #000000;
+}
+.addvice-goods .des{
+ font-size: 28rpx;
+ font-weight: 400;
+ color: #999999;
+ margin-top: 15rpx;
+}
+.addvice-goods .price{
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ justify-content: space-between;
+ box-sizing: border-box;
+ font-size: 28rpx;
+ font-weight: bold;
+ color: #000000;
+ margin-top: 14rpx;
+}
+
+.addvice-goods .price .count span{
+ font-size: 40rpx;
+ font-weight: bold;
+}
+
+.addvice-goods .price .btn{
+ width: 120rpx;
+ height: 60rpx;
+ background: #3C7DFF;
+ border-radius: 30rpx;
+ font-size: 30rpx;
+ font-weight: bold;
+ color: #FFFFFF;
+ line-height: 60rpx;
+ text-align: center;
+}
+
/* 公共模块 */
.module {
background-color: #ffffff;
diff --git a/project.config.json b/project.config.json
index bfdbf9f..67c8bdf 100644
--- a/project.config.json
+++ b/project.config.json
@@ -1,9 +1,5 @@
{
"description": "项目配置文件,详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
- "packOptions": {
- "ignore": [],
- "include": []
- },
"setting": {
"bundle": false,
"userConfirmedBundleSwitch": false,
@@ -24,8 +20,6 @@
"nodeModules": false,
"enhance": true,
"useMultiFrameRuntime": true,
- "useApiHook": true,
- "useApiHostProcess": true,
"showShadowRootInWxmlPanel": true,
"packNpmManually": false,
"enableEngineNative": false,
@@ -41,15 +35,18 @@
"useStaticServer": true,
"checkInvalidKey": true,
"disableUseStrict": false,
- "useCompilerPlugins": false
+ "useCompilerPlugins": false,
+ "ignoreUploadUnusedFiles": true
},
"compileType": "miniprogram",
- "libVersion": "2.17.0",
- "appid": "wx6bd4fcc040bfa025",
- "projectname": "miniprogram-92",
"condition": {},
"editorSetting": {
"tabIndent": "insertSpaces",
"tabSize": 4
- }
+ },
+ "packOptions": {
+ "ignore": [],
+ "include": []
+ },
+ "appid": "wx9ae0c63d0c58caeb"
}
\ No newline at end of file
diff --git a/project.private.config.json b/project.private.config.json
index 6f35c59..d2aff41 100644
--- a/project.private.config.json
+++ b/project.private.config.json
@@ -1,6 +1,6 @@
{
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
- "projectname": "%E6%B0%B4%E6%84%9F%E5%BA%94",
+ "projectname": "%E6%B0%B4%E6%84%9F%E5%BA%94%E5%B0%8F%E7%A8%8B%E5%BA%8F%EF%BC%88%E7%94%A8%E6%88%B7%E7%AB%AF%EF%BC%89",
"setting": {
"compileHotReLoad": true,
"urlCheck": true
@@ -8,6 +8,41 @@
"condition": {
"miniprogram": {
"list": [
+ {
+ "name": "",
+ "pathName": "pages/report/detail/detail",
+ "query": "image_id=273",
+ "launchMode": "default",
+ "scene": null
+ },
+ {
+ "name": "",
+ "pathName": "pages/found/index",
+ "query": "share_id=1&invite=12",
+ "launchMode": "default",
+ "scene": null
+ },
+ {
+ "name": "",
+ "pathName": "pages/beautify2/coach",
+ "query": "",
+ "launchMode": "default",
+ "scene": null
+ },
+ {
+ "name": "",
+ "pathName": "pages/beautify/coach",
+ "query": "",
+ "launchMode": "default",
+ "scene": null
+ },
+ {
+ "name": "",
+ "pathName": "pages/mall/index",
+ "query": "",
+ "launchMode": "default",
+ "scene": null
+ },
{
"name": "",
"pathName": "pages/recruit/poster/poster",
diff --git a/static/imgs/icon_share@2x.png b/static/imgs/icon_share@2x.png
new file mode 100644
index 0000000..a2d806a
Binary files /dev/null and b/static/imgs/icon_share@2x.png differ
diff --git a/static/imgs/icon_shoued@2x.png b/static/imgs/icon_shoued@2x.png
new file mode 100644
index 0000000..78a6820
Binary files /dev/null and b/static/imgs/icon_shoued@2x.png differ
diff --git a/static/imgs/icon_un_shou@2x.png b/static/imgs/icon_un_shou@2x.png
new file mode 100644
index 0000000..f3a0f26
Binary files /dev/null and b/static/imgs/icon_un_shou@2x.png differ
diff --git a/static/imgs/icon_un_zan@2x.png b/static/imgs/icon_un_zan@2x.png
new file mode 100644
index 0000000..ebe58df
Binary files /dev/null and b/static/imgs/icon_un_zan@2x.png differ
diff --git a/static/imgs/icon_zaned@2x.png b/static/imgs/icon_zaned@2x.png
new file mode 100644
index 0000000..ea7e8e7
Binary files /dev/null and b/static/imgs/icon_zaned@2x.png differ