From 8f754aea83da918a1fd241217e384d5093601e33 Mon Sep 17 00:00:00 2001 From: zhangdongxue Date: Fri, 24 Nov 2023 16:53:50 +0800 Subject: [PATCH] =?UTF-8?q?=E9=95=9C=E5=AD=90=E5=8A=9F=E8=83=BD=E5=8F=91?= =?UTF-8?q?=E7=8E=B0=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/interfaces/user.js | 9 +- app.js | 2 + app.json | 16 +- pages/beautify/coach.js | 164 ++++++++----- pages/beautify/coach.wxml | 21 +- pages/beautify/coach.wxss | 6 +- pages/beautify2/.DS_Store | Bin 0 -> 6148 bytes pages/beautify2/coach.js | 401 ++++++++++++++++++++++++++++---- pages/beautify2/coach.json | 4 + pages/beautify2/coach.wxml | 51 +++- pages/beautify2/coach.wxss | 213 +++++++++++++++++ pages/found2/index.js | 161 +++++++++++++ pages/found2/index.json | 9 + pages/found2/index.wxml | 54 +++++ pages/found2/index.wxss | 122 ++++++++++ pages/found2/index2.js | 199 ++++++++++++++++ pages/found2/index2.json | 4 + pages/found2/index2.wxml | 46 ++++ pages/found2/index2.wxss | 154 ++++++++++++ pages/found2/swiper.js | 91 ++++++++ pages/found2/swiper.json | 4 + pages/found2/swiper.wxml | 14 ++ pages/found2/swiper.wxss | 5 + pages/found2/swiper2.js | 91 ++++++++ pages/found2/swiper2.json | 4 + pages/found2/swiper2.wxml | 15 ++ pages/found2/swiper2.wxss | 46 ++++ pages/mall/index.js | 2 +- pages/mall/index.wxml | 4 +- project.private.config.json | 14 ++ static/.DS_Store | Bin 0 -> 6148 bytes static/imgs/icon-zanting.png | Bin 0 -> 857 bytes static/imgs/icon_share@2x.png | Bin 717 -> 2410 bytes static/imgs/icon_un_shou@2x.png | Bin 1105 -> 3247 bytes static/imgs/icon_un_zan@2x.png | Bin 869 -> 2693 bytes 35 files changed, 1796 insertions(+), 130 deletions(-) create mode 100644 pages/beautify2/.DS_Store create mode 100644 pages/beautify2/coach.json create mode 100644 pages/beautify2/coach.wxss create mode 100644 pages/found2/index.js create mode 100644 pages/found2/index.json create mode 100644 pages/found2/index.wxml create mode 100644 pages/found2/index.wxss create mode 100644 pages/found2/index2.js create mode 100644 pages/found2/index2.json create mode 100644 pages/found2/index2.wxml create mode 100644 pages/found2/index2.wxss create mode 100644 pages/found2/swiper.js create mode 100644 pages/found2/swiper.json create mode 100644 pages/found2/swiper.wxml create mode 100644 pages/found2/swiper.wxss create mode 100644 pages/found2/swiper2.js create mode 100644 pages/found2/swiper2.json create mode 100644 pages/found2/swiper2.wxml create mode 100644 pages/found2/swiper2.wxss create mode 100644 static/.DS_Store create mode 100644 static/imgs/icon-zanting.png diff --git a/api/interfaces/user.js b/api/interfaces/user.js index 8ce6297..9d1120d 100644 --- a/api/interfaces/user.js +++ b/api/interfaces/user.js @@ -44,6 +44,13 @@ const poster = (data) => req({ url: "agent/poster", data: data }) + +// 获取视频教程 +const videos = () => req({ + url: "videos" +}) + + export default ({ userIndex, userSetup, @@ -51,5 +58,5 @@ export default ({ invitesCode, miniShare, helpsNav, - poster + poster,videos }) \ No newline at end of file diff --git a/app.js b/app.js index 5bd18d1..165969b 100644 --- a/app.js +++ b/app.js @@ -53,6 +53,7 @@ App({ wx.getSystemInfo({ success: res=>{ this.globalData.barHeight = res.statusBarHeight + this.globalData.safeArea = res.screenHeight - res.safeArea.bottom } }) @@ -75,6 +76,7 @@ App({ isUser : false, userInfo : null, barHeight : '', + safeArea : '', inviteText : '', // 邀请好友临时存储 isExperience: '', // 体验官身份 experienceAreaId: '', // 体验官区域 diff --git a/app.json b/app.json index 11e36c7..878dbc5 100644 --- a/app.json +++ b/app.json @@ -49,7 +49,12 @@ "pages/order/refundInfo/refundInfo", "pages/order/refundWrite/refundWrite", "pages/beautify/coach", - "pages/found/index" + "pages/beautify2/coach", + "pages/found/index", + "pages/found2/index", + "pages/found2/swiper", + "pages/found2/swiper2", + "pages/found2/index2" ], "window": { "backgroundTextStyle": "light", @@ -72,7 +77,7 @@ "selectedIconPath": "/static/tabBarIcon/tabBar_selected_01.png" }, { - "pagePath": "pages/found/index", + "pagePath": "pages/found2/index2", "text": "发现", "iconPath": "/static/tabBarIcon/tabBar_04.png", "selectedIconPath": "/static/tabBarIcon/tabBar_selected_04.png" @@ -95,5 +100,10 @@ "borderStyle": "white" }, "style": "v2", - "sitemapLocation": "sitemap.json" + "sitemapLocation": "sitemap.json", + "permission": { + "scope.camera": { + "desc": "你的摄像头将用于小程序拍照、录像、扫码等效果展示" + } + } } \ No newline at end of file diff --git a/pages/beautify/coach.js b/pages/beautify/coach.js index 0beff44..83e89c0 100644 --- a/pages/beautify/coach.js +++ b/pages/beautify/coach.js @@ -2,7 +2,7 @@ Page({ data: { videos: [{ - id: 1, + video_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: [{ @@ -99,62 +99,73 @@ Page({ } ], selectVideoItem: { - id: 0, // 默认id是否为0 + video_id: 0, // 默认id是否为0 playedState: false, // 当前是否是正在播放播放状态 muted: false, // 静音状态 stepsCount: 0, // 默认分几个步骤 currentSteps: 0, // 当前默认是第几步 currentTime: 0, // 当前总时长 remainingTime: '00', // 播放时间 + remainingTimeShow: '00:00' // 播放时间展示 }, videoContext: null, seeAllVideo: true, - openCamera:false, // 是否打开摄像头 - + openCamera: false, // 是否打开摄像头 + userData: {}, // 是否显示摄像头 isCamera: false }, - onShow(){ + onShow() { wx.getSetting({ - success:(res)=> { + success: (res) => { let authSetting = res.authSetting this.setData({ - isCamera: authSetting['scope.camera'] == true?true:false, - openCamera:authSetting['scope.camera'] == true?true:false + isCamera: authSetting['scope.camera'] == true ? true : false, + openCamera: authSetting['scope.camera'] == true ? true : false }) } }) + this.userInfo() + this.getVideos() }, - onReady(res) { this.videoContext = wx.createVideoContext('myVideo') }, + bindseekcomplete(e) { + console.log(e) + }, + videoPause(e){ + console.log('暂停了') + }, + // 视频更新事件 videoTimeupdated(e) { let selectVideoItem = this.data.selectVideoItem let currentTimeEnd = selectVideoItem.steps[selectVideoItem.currentSteps].endTime let { - currentTime,duration + currentTime, + duration } = e.detail if (currentTime > currentTimeEnd && selectVideoItem.currentSteps < selectVideoItem.stepsCount) { selectVideoItem.currentSteps++ - - this.videoContext.pause() + // this.videoContext.pause() // 倒计时且有提醒 - setTimeout(() => { - this.videoContext.play() - }, 3000); + // setTimeout(() => { + // this.videoContext.play() + // }, 3000); } - - let remainingTime = parseInt(duration - currentTime) >= 10 ? parseInt(duration - currentTime) : '0' + parseInt(duration - currentTime) - selectVideoItem.remainingTime = remainingTime + let remainingTime = parseInt(duration - currentTime) >= 10 ? parseInt(duration - currentTime) : '0' + parseInt(duration - currentTime) + let remainingTimeShow = parseInt(duration - currentTime) >= 60 ? '01:' + (parseInt(remainingTime - 60) >= 10 ? parseInt(remainingTime - 60) : '0' + parseInt(remainingTime - 60)) : '00:' + remainingTime + selectVideoItem.remainingTime = remainingTime + selectVideoItem.remainingTimeShow = remainingTimeShow this.setData({ selectVideoItem: selectVideoItem }) console.log('视频更新事件', selectVideoItem.currentSteps) }, + // 视频播放结束事件 videoEnded() { console.log('视频播放结束事件') @@ -162,17 +173,19 @@ Page({ this.setData({ selectVideoItem: { - id: 0 + video_id: 0 }, seeAllVideo: true, }) }, + // 点击全部视频 allVideoTab() { this.setData({ seeAllVideo: !this.data.seeAllVideo }) }, + // 点击暂停视频 videoPauseTab() { console.log('暂停') @@ -183,6 +196,7 @@ Page({ }) this.videoContext.pause() }, + // 点击播放视频 videoPlayTab() { console.log('播放') @@ -194,16 +208,17 @@ Page({ }) 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 - + console.log(this.data.selectVideoItem.video_id, item.video_id) + if (this.data.selectVideoItem.video_id == item.video_id) return item.playedState = false item.stepsCount = item.steps.length @@ -217,6 +232,7 @@ Page({ this.doPlay(0) }, 300); }, + // 播放视频 doPlay(position) { console.log(position) @@ -229,6 +245,7 @@ Page({ // 播放视频 this.videoContext.play() }, + // 静音非经营处理 mutedTab(e) { console.log(e) @@ -245,10 +262,12 @@ Page({ selectVideoItem: selectVideoItem }) }, + // 上一段,下一段切换 preTab(e) { let type = e.target.dataset.type let selectVideoItem = this.data.selectVideoItem + let stepsLength = this.data.selectVideoItem.steps.length if (type == 'prev') { if (selectVideoItem.currentSteps == 0) { wx.showToast({ @@ -267,12 +286,12 @@ Page({ this.videoContext.play() selectVideoItem.playedState = true this.setData({ - selectVideoItem:selectVideoItem + selectVideoItem: selectVideoItem }) } } else { - if (selectVideoItem.currentSteps == 3) { + if (selectVideoItem.currentSteps == stepsLength) { wx.showToast({ title: '已经是最后一步', icon: 'none', @@ -280,7 +299,7 @@ Page({ }) return } - if (selectVideoItem.currentSteps < 3) { + if (selectVideoItem.currentSteps < stepsLength) { selectVideoItem.currentSteps++ let startTime = selectVideoItem.steps[selectVideoItem.currentSteps].startTime this.videoContext.pause() @@ -288,24 +307,23 @@ Page({ this.videoContext.play() selectVideoItem.playedState = true this.setData({ - selectVideoItem:selectVideoItem + selectVideoItem: selectVideoItem }) } } }, - openMirror(){ - if(this.data.openCamera){ + openMirror() { + if (this.data.openCamera) { this.setData({ - openCamera:!this.data.openCamera + openCamera: !this.data.openCamera }) return } - console.log(11) wx.getSetting({ - success:(res)=> { + success: (res) => { let authSetting = res.authSetting console.log(res) - if(!authSetting['scope.camera'] || authSetting['scope.camera'] == undefined){ + if (!authSetting['scope.camera'] || authSetting['scope.camera'] == undefined) { wx.showModal({ title: '温馨提示', content: '若不授权使用摄像头,将无法使用镜子功能!', @@ -313,44 +331,66 @@ Page({ 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 + success: (res) => { + if (res.confirm) { //允许打开授权页面 + //调起客户端小程序设置界面,返回用户设置的操作结果 + console.log(JSON.stringify(authSetting['scope.camera']), authSetting['scope.camera'] == undefined) + console.log(authSetting['scope.camera']) + if (authSetting['scope.camera'] == undefined) { + wx.authorize({ + scope: 'scope.camera', + success: () => { + // 用户已经同意小程序使用摄像头 + this.setData({ + openCamera: true, + isCamera: true + }) + }, + fail: (err) => { + console.log('err',err) } - this.setData({ - openCamera:true - }) - }, + }) + } else { + wx.openSetting({ + success: (res) => { + console.log('res', res) + res.authSetting = { + "scope.camera": true + } + this.setData({ + openCamera: true + }) + }, + }) + } + } else if (res.cancel) { //拒绝打开授权页面 + this.setData({ + openCamera: false }) } - } else if (res.cancel) {//拒绝打开授权页面 - this.setData({ - openCamera:false - }) - } } }) - }else{ + } else { this.setData({ - openCamera:!this.data.openCamera + openCamera: !this.data.openCamera }) } } }) - } + }, + userInfo() { + wx.$api.user.userIndex().then(res => { + this.setData({ + userData: res.data, + }) + }).catch(err => {}) + }, + getVideos() { + wx.$api.user.videos().then(res => { + console.log(res) + this.setData({ + videos: res.data.data, + }) + }).catch(err => {}) + }, }) \ No newline at end of file diff --git a/pages/beautify/coach.wxml b/pages/beautify/coach.wxml index 5237786..4f6b754 100644 --- a/pages/beautify/coach.wxml +++ b/pages/beautify/coach.wxml @@ -8,32 +8,30 @@ - 张三一 + {{userData.nickname}} - - 请在下方选择视频 + + 请在下方选择视频 - - - 00:{{selectVideoItem.remainingTime}} + + + {{selectVideoItem.remainingTimeShow}} {{selectVideoItem.steps[selectVideoItem.currentSteps].title}} - - + - + - - + @@ -45,5 +43,4 @@ - \ No newline at end of file diff --git a/pages/beautify/coach.wxss b/pages/beautify/coach.wxss index cc26dbd..0ec247a 100644 --- a/pages/beautify/coach.wxss +++ b/pages/beautify/coach.wxss @@ -96,7 +96,7 @@ } .coach-top-video{ - width: 78vw; + width: 600rpx; height: 720rpx; display: flex; flex-direction: column; @@ -109,6 +109,7 @@ .coach-top-cover{ width: 100%; height: 100%; + padding-bottom:30rpx ; } .coach-top-text{ margin-top: 40rpx; @@ -138,7 +139,7 @@ } .coach-swiper-item-cover{ width: calc(100% - 20rpx); - height: 160rpx; + height: 170rpx; margin-right: 20rpx; border-radius: 20rpx; position: relative; @@ -199,7 +200,6 @@ /* 倒计时和分布展示 */ - .steps-cont{ font-size: 28rpx; color: #000; diff --git a/pages/beautify2/.DS_Store b/pages/beautify2/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..5008ddfcf53c02e82d7eee2e57c38e5672ef89f6 GIT binary patch literal 6148 zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0 { + let authSetting = res.authSetting + this.setData({ + isCamera: authSetting['scope.camera'] == true?true:false, + openCamera:authSetting['scope.camera'] == true?true:false + }) + } + }) + this.userInfo() + this.getVideos() + }, + onReady(res) { + this.videoContext = wx.createVideoContext('myVideo') }, - /** - * 生命周期函数--监听页面初次渲染完成 - */ - onReady() { + // 视频更新事件 + videoTimeupdated(e) { + let selectVideoItem = this.data.selectVideoItem + let currentTimeEnd = selectVideoItem.steps[selectVideoItem.currentSteps].endTime + let { + currentTime,duration + } = e.detail + if (currentTime > currentTimeEnd && selectVideoItem.currentSteps < selectVideoItem.stepsCount) { + selectVideoItem.currentSteps++ + this.videoContext.pause() + // 倒计时且有提醒 + setTimeout(() => { + this.videoContext.play() + }, 3000); + } + + let remainingTime = parseInt(duration - currentTime) >= 10 ? parseInt(duration - currentTime) : '0' + parseInt(duration - currentTime) + selectVideoItem.remainingTime = remainingTime + this.setData({ + selectVideoItem: selectVideoItem + }) + console.log('视频更新事件', selectVideoItem.currentSteps) }, - /** - * 生命周期函数--监听页面显示 - */ - onShow() { + // 视频播放结束事件 + videoEnded() { + console.log('视频播放结束事件') + // 完成弹窗 重置基础数据 + this.setData({ + selectVideoItem: { + id: 0 + }, + seeAllVideo: true, + }) }, - /** - * 生命周期函数--监听页面隐藏 - */ - onHide() { - + // 点击全部视频 + allVideoTab() { + this.setData({ + seeAllVideo: !this.data.seeAllVideo + }) }, - /** - * 生命周期函数--监听页面卸载 - */ - onUnload() { - + // 点击暂停视频 + videoPauseTab() { + console.log('暂停') + let selectVideoItem = this.data.selectVideoItem + selectVideoItem.playedState = false + this.setData({ + selectVideoItem: selectVideoItem + }) + this.videoContext.pause() }, - /** - * 页面相关事件处理函数--监听用户下拉动作 - */ - onPullDownRefresh() { - + // 点击播放视频 + videoPlayTab() { + console.log('播放') + let selectVideoItem = this.data.selectVideoItem + selectVideoItem.playedState = true + selectVideoItem.muted = false + this.setData({ + selectVideoItem: selectVideoItem + }) + this.videoContext.play() }, - /** - * 页面上拉触底事件的处理函数 - */ - onReachBottom() { - + // 轮播图切换 + swiperChange(e) { + console.log(e.detail) }, - /** - * 用户点击右上角分享 - */ - onShareAppMessage() { + // 选择视频教程-点击 + selectVideo(e) { + let item = e.currentTarget.dataset.item + console.log(this.data.selectVideoItem.video_id, item.video_id) + if (this.data.selectVideoItem.video_id == item.video_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 + } + 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 + }) + } + } + }) + }, + userInfo() { + wx.$api.user.userIndex().then(res => { + this.setData({ + userData : res.data, + }) + }).catch(err => {}) + }, + getVideos(){ + wx.$api.user.videos().then(res => { + console.log(res) + this.setData({ + videos : res.data.data, + }) + }).catch(err => {}) + }, }) \ No newline at end of file diff --git a/pages/beautify2/coach.json b/pages/beautify2/coach.json new file mode 100644 index 0000000..c4f4959 --- /dev/null +++ b/pages/beautify2/coach.json @@ -0,0 +1,4 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "美肤教程" +} \ No newline at end of file diff --git a/pages/beautify2/coach.wxml b/pages/beautify2/coach.wxml index ea1702d..d0c4dfa 100644 --- a/pages/beautify2/coach.wxml +++ b/pages/beautify2/coach.wxml @@ -1,2 +1,49 @@ - -pages/beautify2/coach.wxml \ No newline at end of file + + + + 镜子 + + + X + + + + {{userData.nickname}} + + + + + + 请在下方选择视频 + + + + + + 00:{{selectVideoItem.remainingTime}} + {{selectVideoItem.steps[selectVideoItem.currentSteps].title}} + + + + + + + + + + + + + + + + + + + + {{!seeAllVideo?'全部视频':'隐藏'}} + + + + + \ No newline at end of file diff --git a/pages/beautify2/coach.wxss b/pages/beautify2/coach.wxss new file mode 100644 index 0000000..c76c794 --- /dev/null +++ b/pages/beautify2/coach.wxss @@ -0,0 +1,213 @@ +/* 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: 600rpx; + 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%; + padding-bottom:30rpx ; +} +.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: 170rpx; + 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/found2/index.js b/pages/found2/index.js new file mode 100644 index 0000000..c6580f9 --- /dev/null +++ b/pages/found2/index.js @@ -0,0 +1,161 @@ +Page({ + data: { + page : 1, + has_more: true, + lists : [], + listsIndex : 0, + share_id : '', + loading : true, + swipers : [], + playId : '', + }, + + onLoad(e){ + this.setData({ + share_id : e.share_id || '' + }) + getApp().globalData.inviteText = e.invite || '' + this.getList() + }, + + onShow(){ + + }, + + onHide(){ + if(this.data.share_id){ + this.setData({ + share_id:'' + }) + } + }, + swiperChange(e){ + let { current } = e.detail + + console.log(current) + let swipers = this.data.swipers + let item = swipers[current] + let type = item.type + if(item.type == 'video'){ + + if(current == 0 || this.data.playId == '' || this.data.playId != item.id){ + let id = 'myVideo'+item.id + console.log(id) + let videoContext = wx.createVideoContext(`${id}`) + videoContext.play() + this.setData({ + playId:item.id + }) + } + // if() + + + } + }, + 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) + if(this.data.swipers.length == 0){ + this.setData({ + swipers:res.data.data.splice(0,3) + }) + } + 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 + }) + setTimeout(()=>{ + this.setData({ + loading:false + }) + },3000) + }) + }, + 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/found2/index.json b/pages/found2/index.json new file mode 100644 index 0000000..24cc987 --- /dev/null +++ b/pages/found2/index.json @@ -0,0 +1,9 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "发现", + "navigationBarTextStyle": "white", + "navigationBarBackgroundColor": "#5283ea", + "backgroundTextStyle": "dark", + "backgroundColor": "#eeeeee", + "navigationStyle": "custom" +} \ No newline at end of file diff --git a/pages/found2/index.wxml b/pages/found2/index.wxml new file mode 100644 index 0000000..d921a24 --- /dev/null +++ b/pages/found2/index.wxml @@ -0,0 +1,54 @@ + + + 疯狂加载中 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pages/found2/index.wxss b/pages/found2/index.wxss new file mode 100644 index 0000000..ce498af --- /dev/null +++ b/pages/found2/index.wxss @@ -0,0 +1,122 @@ +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{ + width: 100vw; + height: 100vh; +} +.cont-swiper{ + width: 100%; + height: 100%; +} +.cont-swiper-item{ + width: 100%; + height: 100%; +} +.cont-image-swiper{ + width: 100%; + height: 100%; + background-color: #000; +} +.cont-image-swiper-item{ + width: 100%; + height: 100%; + display: flex; + flex-direction: row; + align-items: center; + justify-content: center; + box-sizing: border-box; +} +.cont-image-swiper-item image{ + width: 100%; + height: 100%; +} +.cont-video{ + width: 100%; + height: 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/found2/index2.js b/pages/found2/index2.js new file mode 100644 index 0000000..b94a2d7 --- /dev/null +++ b/pages/found2/index2.js @@ -0,0 +1,199 @@ +// pages/found2/index2.js + +var startY, endY +Page({ + + /** + * 页面的初始数据 + */ + data: { + page : 1, + has_more: true, + lists : [], + share_id: '', + currentIndex : 0, + safeArea : getApp().globalData.safeArea, + playing : false + }, + + onLoad(e){ + this.setData({ + share_id : e.share_id || '' + }) + getApp().globalData.inviteText = e.invite || '' + this.getList() + this.videoContext = wx.createVideoContext('found-cont-video') + }, + + onHide(){ + if(this.data.share_id){ + this.setData({ + share_id:'' + }) + } + }, + + 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, + }) + if(this.data.currentIndex == 0){ + this.onVideoPlay() + } + }).catch(err=>{ + wx.showToast({ + title: err.message, + icon :'none', + mask :true, + duration:2000 + }) + setTimeout(()=>{ + this.setData({ + loading:false + }) + },3000) + }) + }, + + + onTouchStart(e) { + let { clientY } = e.changedTouches[0] + startY = clientY + }, + + onTouchEnd(e) { + let { clientY } = e.changedTouches[0] + endY = clientY + let clientXY = startY - clientY + console.log(clientXY) + if(clientXY>60){ + this.onIsDirection('next') + }else if(clientXY < -60){ + this.onIsDirection('prev') + } + }, + + onIsDirection(type){ + let {currentIndex,lists} = this.data + if(type == 'next'){ + console.log('获取下一个') + if(currentIndex!=lists.length-1){ + currentIndex ++ + this.setData({ + currentIndex:currentIndex + }) + this.onVideoPlay() + }else{ + if(this.data.has_more){ + this.setData({ + page:this.data.page+1 + }) + this.getList() + }else{ + wx.showToast({ + title: '没有更多了~', + icon:'none', + mask:true + }) + } + } + return + } + if(type == 'prev'){ + if(currentIndex>0){ + currentIndex -- + this.setData({ + currentIndex:currentIndex + }) + this.onVideoPlay() + }else{ + wx.showToast({ + title: '没有更多了~', + icon:'none', + mask:true + }) + } + return + } + }, + + onVideoPlay(){ + if(this.data.lists[this.data.currentIndex].type == 'video'){ + setTimeout(() => { + this.videoContext.seek(0) + this.videoContext.play() + this.setData({ + playing:true + }) + }, 200); + }else{ + this.videoContext.pause() + this.videoContext.seek(0) + this.setData({ + playing:false + }) + } + }, + onVideoPause(){ + if(this.data.playing){ + this.videoContext.pause() + this.setData({ + playing:false + }) + }else{ + this.videoContext.play() + this.setData({ + playing:true + }) + } + }, + // 预览图片 + 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/found2/index2.json b/pages/found2/index2.json new file mode 100644 index 0000000..7af8b0a --- /dev/null +++ b/pages/found2/index2.json @@ -0,0 +1,4 @@ +{ + "usingComponents": {}, + "navigationStyle": "custom" +} \ No newline at end of file diff --git a/pages/found2/index2.wxml b/pages/found2/index2.wxml new file mode 100644 index 0000000..bb65b84 --- /dev/null +++ b/pages/found2/index2.wxml @@ -0,0 +1,46 @@ + + + + + + + + + + {{lists[currentIndex].count.favorite}} + + + + + {{lists[currentIndex].count.subscribe}} + + + + + + @{{lists[currentIndex].user.name}} + {{lists[currentIndex].describe}} + + \ No newline at end of file diff --git a/pages/found2/index2.wxss b/pages/found2/index2.wxss new file mode 100644 index 0000000..c9e7959 --- /dev/null +++ b/pages/found2/index2.wxss @@ -0,0 +1,154 @@ +/* pages/found2/index2.wxss */ +.found{ + width: 100vw; + height: 100vh; + background-color: #000; + position: relative; + z-index: 1; + box-sizing: border-box; + display: flex; + flex-direction: row; + align-items: center; + justify-content: center; + box-sizing: border-box; +} +.found-cont{ + width: 100%; + height: 100%; + background-color: #000; +} +.zanting{ + width: 100vw; + height: 100vh; + position: absolute; + top: 0; + left: 0; + z-index: 10; + display: flex; + flex-direction: row; + align-items: center; + justify-content: center; + box-sizing: border-box; +} +.zanting image{ + width: 100rpx; + height: 100rpx; + opacity: 0.6; +} +#found-cont-video{ + position: relative; + width: 100%; + height: 100%; +} +.swiper{ + width: 100; + height: 100%; +} +.swiper-item{ + width: 100%; + height: 100%; + display: flex; + flex-direction: row; + align-items: center; + justify-content: center; + box-sizing: border-box; + color: white; +} +.swiper-item image{ + width: 100%; + height: 100vw; +} + +.right-cont{ + display: flex; + flex-direction: column; + align-items: flex-end; + justify-content: flex-end; + box-sizing: border-box; + padding: 20rpx 30rpx 20rpx 50rpx; + position: fixed; + z-index: 3; + right: 0; + height: 100vh; + background-image: linear-gradient(to left,rgba(0, 0, 0, 0.432),rgba(248, 247, 247, 0.025)); +} + +.right{ + font-size: 34rpx!important; + font-family: PingFang SC; + font-weight: bold!important; + color: #fff; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + box-sizing: border-box; + padding-bottom: 14vh; +} + +.right .avatar{ + width: 100rpx; + height: 100rpx; + border: solid 10rpx rgba(255, 255, 255, 0.2); + border-radius: 120rpx; + margin-bottom: 30rpx; +} + +.right-item{ + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + box-sizing: border-box; + padding: 20rpx 20rpx; + flex: 1; +} +.right-item image{ + width: 46rpx; + height: 46rpx; + margin-bottom: 14rpx; +} +.right button{ + font-size: 30rpx; + color: #fff; + font-weight: normal; + padding: 0 !important; + background:transparent!important; + width: 100rpx; + margin-top: 30rpx; +} + +.right button:after { + border: none; +} + + +.nickname{ + position: fixed; + z-index: 2; + width: 100%; + box-sizing: border-box; + padding: 30rpx 50rpx; + background-image: linear-gradient(to top,rgba(0, 0, 0, 0.432),rgba(248, 247, 247, 0.025)); + bottom: 0; +} +.nickname .name{ + font-size: 36rpx; + font-weight: bold; + color: white; + display: flex; + flex-direction: row; + align-items: center; + justify-content: flex-start; + flex-wrap: wrap; +} +.nickname .name span{ + font-size: 40rpx; +} + +.nickname .des{ + margin-top: 20rpx; + font-size: 32rpx; + color: rgba(255, 255, 255, 0.8); + word-break:break-all; +} \ No newline at end of file diff --git a/pages/found2/swiper.js b/pages/found2/swiper.js new file mode 100644 index 0000000..7590212 --- /dev/null +++ b/pages/found2/swiper.js @@ -0,0 +1,91 @@ +// pages/swiper.js +var startY, endY + +Page({ + + /** + * 页面的初始数据 + */ + data: { + isLoop : false, + swiperNumber : 0, + swiperArr : [], + dataArr : [ + { id: 0, type: "text", data: "0" }, + { id: 1, type: "text", data: "1" }, + { id: 2, type: "text", data: "2" }, + { id: 3, type: "text", data: "3" }, + { id: 4, type: "text", data: "4" }, + { id: 5, type: "text", data: "5" } + ] + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + let initData = this.data.dataArr.slice(0, 3) + this.setData({ + swiperArr: initData + }) + }, + // 触摸开始 + onStart(e){ + let { clientY } = e.changedTouches[0] + startY = clientY + }, + // 触摸结束 + onEnd(e){ + let { clientY } = e.changedTouches[0] + endY = clientY + if(startY-endY >50 || endY-startY>50){ + this.onIsDirection() + } + }, + // 计算前后滚动 + onIsDirection(){ + let { swiperArr, dataArr, swiperNumber } = this.data + if(startY > endY){ + this.setData({ + swiperNumber: swiperNumber += 1, + isLoop : true + }) + let newNumber = swiperNumber%3 >= 2 ? 0 : swiperNumber%3 + 1 + let nextNumber = swiperNumber + 1 + + if(nextNumber >= dataArr.length){ + this.setData({ + isLoop: false + }) + wx.showToast({ + title: '没有更多内容了~', + icon : 'none' + }) + return + } + swiperArr[newNumber] = dataArr[nextNumber] + }else{ + this.setData({ + swiperNumber: swiperNumber > 0 ? swiperNumber -= 1: 0, + isLoop : true + }) + let newNumber = swiperNumber%3 <= 0 ? 2 : swiperNumber%3 - 1 + let preNumber = swiperNumber >= 0 ? swiperNumber - 1 : 0 + + if(preNumber < 0){ + this.setData({ + isLoop: false + }) + wx.showToast({ + title: '没有更多内容了~', + icon : 'none' + }) + return + } + swiperArr[newNumber] = dataArr[preNumber] + } + this.setData({ + swiperArr + }) + } +}) \ No newline at end of file diff --git a/pages/found2/swiper.json b/pages/found2/swiper.json new file mode 100644 index 0000000..b276898 --- /dev/null +++ b/pages/found2/swiper.json @@ -0,0 +1,4 @@ +{ + "usingComponents": {}, + "disableScroll": true +} \ No newline at end of file diff --git a/pages/found2/swiper.wxml b/pages/found2/swiper.wxml new file mode 100644 index 0000000..beab990 --- /dev/null +++ b/pages/found2/swiper.wxml @@ -0,0 +1,14 @@ + + + + 轮播内容:{{item.data}} + + diff --git a/pages/found2/swiper.wxss b/pages/found2/swiper.wxss new file mode 100644 index 0000000..7e2872f --- /dev/null +++ b/pages/found2/swiper.wxss @@ -0,0 +1,5 @@ + + +.swiper{ width: 100vw; height: 100vh; background: #000011; } +.swiper-text{ color: white; width: 100vw; height: 100vh; display: flex; align-items: center; justify-content: center; } + diff --git a/pages/found2/swiper2.js b/pages/found2/swiper2.js new file mode 100644 index 0000000..b89b4de --- /dev/null +++ b/pages/found2/swiper2.js @@ -0,0 +1,91 @@ +// pages/index5/index5.js +Page({ + /** + * 页面的初始数据 + */ + data: { + viList: [{ + vio: 'https://assets.mixkit.co/videos/preview/mixkit-movement-in-a-large-avenue-at-night-in-timelapse-44688-large.mp4', + avatar: 'https://profile-avatar.csdnimg.cn/6ef2193c2e9649c88356336c626e5777_m0_64944135.jpg', + name: 'xiaoshen', + id:1, + }, + { + vio: 'https://sgy-test-cdn.oss-cn-hangzhou.aliyuncs.com/attachments/2023/11/17/de99704d307d216800e08584111ca61f.mp4', + avatar: ' https://profile.csdnimg.cn/7/A/9/1_2201_75886543', + name: 'kami', + id:2, + }, + { + vio: 'https://sgy-test-cdn.oss-cn-hangzhou.aliyuncs.com/attachments/2023/11/17/574217650a315865ce8833c31f8d9091.mp4', + avatar: ' https://profile.csdnimg.cn/7/A/9/1_2201_75886543', + name: 'kami', + id:3 + }, + { + vio: 'https://sgy-test-cdn.oss-cn-hangzhou.aliyuncs.com/attachments/2023/11/16/eb8debf3c9ef26eb6829a533709c08a1.mp4', + avatar: ' https://profile.csdnimg.cn/7/A/9/1_2201_75886543', + name: 'kami', + id:4 + }, + { + vio: 'https://sgy-test-cdn.oss-cn-hangzhou.aliyuncs.com/attachments/2023/11/17/ecb93a818d0e507b6d1a962ab83490c9.mp4', + avatar: ' https://profile.csdnimg.cn/7/A/9/1_2201_75886543', + name: 'kami', + id:5 + } + ], + stopIndex:0, + }, + + onLoad(options) { + // 调用播放视频方法 + this.startUp() + }, + + // 进页面时播放视频 + startUp() { + // 获取video节点 + let createVideoContext = wx.createVideoContext('video0') + // 播放视频 + createVideoContext.play() + }, + + // 切换视频的时候播放视频 + // 注:此方法视频如果过大可能会叠音,所以视频需要压缩,或者可以尝试循环节点关闭视频 + nextVideo(e) { + // 播放当前页面视频 + let index = 'video' + e.detail.current + this.setData({ + stopIndex:e.detail.current + }) + this.playVio(index) + // 暂停前一个页面视频 + if (e.detail.current - 1 >= 0) { + let index1 = 'video' + (e.detail.current - 1) + this.pauseVio(index1) + } + // 暂停后一个页面视频 + if (e.detail.current + 1 < this.data.viList.length) { + let index2 = 'video' + (e.detail.current + 1) + this.pauseVio(index2) + } + }, + + // 播放视频 + playVio(index) { + // 获取video节点 + let createVideoContext = wx.createVideoContext(index) + // 播放视频 + createVideoContext.play() + }, + + // 暂停视频 + pauseVio(index) { + // 获取video节点 + let createVideoContext = wx.createVideoContext(index) + // 暂停视频 + createVideoContext.seek(0) + createVideoContext.pause() + } +}) \ No newline at end of file diff --git a/pages/found2/swiper2.json b/pages/found2/swiper2.json new file mode 100644 index 0000000..b276898 --- /dev/null +++ b/pages/found2/swiper2.json @@ -0,0 +1,4 @@ +{ + "usingComponents": {}, + "disableScroll": true +} \ No newline at end of file diff --git a/pages/found2/swiper2.wxml b/pages/found2/swiper2.wxml new file mode 100644 index 0000000..24dd265 --- /dev/null +++ b/pages/found2/swiper2.wxml @@ -0,0 +1,15 @@ + + + + diff --git a/pages/found2/swiper2.wxss b/pages/found2/swiper2.wxss new file mode 100644 index 0000000..13deca3 --- /dev/null +++ b/pages/found2/swiper2.wxss @@ -0,0 +1,46 @@ +page{ + background-color: #000; + } + + swiper{ + height: 100vh; + width: 100vw; + } + + swiper video{ + height: 100vh; + width: 100%; + } + + .video-right{ + height: 38vh; + width: 80rpx; + position: fixed; + right: 15rpx; + top: 50vh; + color: #fff; + } + + .video-right-img{ + height: 80rpx; + width: 80rpx; + border-radius: 100rpx; + background-color: aquamarine; + background-repeat: no-repeat; + background-position: center; + background-size: cover; + } + + .video-btm{ + height: 180rpx; + width: 100vw; + position: fixed; + bottom: 0; + color:#fff; + } + + .video-btm-con{ + width: 90vw; + margin: 0 auto; + } + \ No newline at end of file diff --git a/pages/mall/index.js b/pages/mall/index.js index b42c480..850e570 100644 --- a/pages/mall/index.js +++ b/pages/mall/index.js @@ -28,5 +28,5 @@ Page({ goodsArr: res.data.goods }) }).catch(err => { }) - }, + } }) diff --git a/pages/mall/index.wxml b/pages/mall/index.wxml index aa06f46..8965ef4 100644 --- a/pages/mall/index.wxml +++ b/pages/mall/index.wxml @@ -17,9 +17,9 @@ - + diff --git a/project.private.config.json b/project.private.config.json index d2aff41..9759db4 100644 --- a/project.private.config.json +++ b/project.private.config.json @@ -8,6 +8,20 @@ "condition": { "miniprogram": { "list": [ + { + "name": "", + "pathName": "pages/beautify/coach", + "query": "", + "launchMode": "default", + "scene": null + }, + { + "name": "", + "pathName": "pages/found2/index2", + "query": "share_id=14&invite=1", + "launchMode": "default", + "scene": null + }, { "name": "", "pathName": "pages/report/detail/detail", diff --git a/static/.DS_Store b/static/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..5b4e514c4db902e867beb3cb4a7854c8bdcccd57 GIT binary patch literal 6148 zcmeHK%SyvQ6rE|KO({Ya3c4F`E7(@?ftwKP4;ayfN=-IN%$)n2$sEW$7-QUDJn7E&#O$=& z2L0e@K5yDvyZdLC{ikG<$`{Qj2f~$X7_8tGl+Oh{`;#=0=@5KXew9Z^3=jjv05Pz# z445OqZmlc>v~Xg882E_++#duqMAu-cQEeU2;q@8g79tAh_?AEv23>=tMu>oLT?(j6 zxp`u6T@HR>@?3+ZMqSRhnie_Vh{J(%-X6Yk; zv4kvQfEf5^3~;OG_dHmXIa|Li56@Zw?ExAJ=9Q>`fWB}E00Z}tZ57mUfjZ>521|`N T3i?$!AYB9$A=D8Azrer;ftpH` literal 0 HcmV?d00001 diff --git a/static/imgs/icon-zanting.png b/static/imgs/icon-zanting.png new file mode 100644 index 0000000000000000000000000000000000000000..3e247c548aaf0cb0a53b7ee61b37f2b22d64ef87 GIT binary patch literal 857 zcmeAS@N?(olHy`uVBq!ia0vp^4Is?H3?#oinD`S&Eeh}naRt)<2RC5RD{BI}(zGPV zFPP!X&n4ZV?rQIzUfaK?r79~%pY_FqZENRFN^r1{`*i#Ku}#zKi_($dlq22ZTTi)k6W9cZ?b!I`fX}*l|AIF*UNy0Dh-kff^@c+T@9Ooll+}K3_?qjIBL97TYr~t(vz~j* ztBoq_x^lDW+xZD*(IM*YmvRcL+dqgfy#D&Im2pwnt$o+})^A~Xpe@VB5uF*m=q|GY zkHEG|+hVRduzi>s##pm7l_5UU@IaqGgtm&6JP;nm`eEucpj0SO3W?jwP`C7Lv=+Nj z!}={;543fee|T{-{PDWIecS&9Oh3F%Gwi#R)bMo~RN9yMQP?e^tM9rP?zKrJ>;$0; zx5b!qRV;hE@^hMZ-#Uf0(z zV2Rnzpqjv>!FW|hs=r1RL=9+eR}ms8Av_ipTyvBq+906&4ccLd{;2a+-34Qa8_(e!(3|z z&K)~gS{fd)XezDOvwQTWgQbUmqSmK34<4WAlUq=`d-i|-dF&bYKd6I@IXmS@!!Z^` z(;b_e*K=4{Py2u2mPtx6{=BMQ>n338WAJqKb6Mw<&;$T^E87tO literal 0 HcmV?d00001 diff --git a/static/imgs/icon_share@2x.png b/static/imgs/icon_share@2x.png index a2d806ac641d56a811705fe81fa644f7839fb7bb..c9fc37115aa4d180f0edc1bb6f2d9ff0d64bd9a9 100644 GIT binary patch literal 2410 zcmbVO2~-p37ETpJ;NX(7iAC~8hzLwFlZ1qfra%ZniqWuClv9^UG9govOiV@yyjCBp zEH1BBL!|q>+*s>J3?+*|VtM_!*Q1BC zdf;(u$+fbTh?3B;P!*xTSZ1ApLepr=gUtq1nS_xH1(t~GMZn|wa{vQZiGcV(86-1= zVH!L#&4|UOt%_5oB`Jj}AozX8ax+2^=r9sxm~~pc2{DU+abAQPTc_CoV;n*ziGWb6 zLB?8{oDoJCF$SLnfl3JCG6X^v%;yDi1OW^V#DUl_bq9j50O188Tn=OM0w`-nl^ThW zteCV#eTe`KNg5C~J0&HBmBM8a#zZzO6bji8ht1)D6aqA*>PgfL>P?HM7$lfUX~YdA zPUsm{MpQv;Aw>Y?>4XHGVVYKNnhX;aFt!;ru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{ty=bw4NJFCN zESHIblU`iCVfX%ji?*5YamD1YGjUJ$CqJuMQNUc(xqhbk!s%YAdDGwD_4#O8@4d@T z@=Ea@gJy}zu}J}{zg9$~GhNBHcb#Z9h4tgQ1(hqFbInvU^3s#1X!kI#8`WSwGEiwnmE z)yW5UbM7Cxl6L8k! zfxHj*`?zwGE{$H*8+?q%`+M?|pJl3c|jQ1GlJq~V&cPZm~lGJyv`IY*CNS5aZio`0u zgge#?{YXD}BQoKRW8qrHX?sf8vQ9`yTNbf~#jMNh_G1W1STpCqzW?lRSUhxAoM+nI zBp2&=m_b)|!tW(>o?VY)_DXM9A-Tahdog3cJOKsAyDIkzJFkD47140bQq9Hq*ZCQ2 k317dxc2M0B_Pd@zSl;g8)90NVfeC}b)78&qol`;+0AZC*IRF3v diff --git a/static/imgs/icon_un_shou@2x.png b/static/imgs/icon_un_shou@2x.png index f3a0f26559988f7f1800cacd75a28ca07ff1cc7b..5dcec14526b1d2113db7b8b89a8d6669270e7390 100644 GIT binary patch literal 3247 zcmbVP2UHVT7Y?|9f`Ceg6+;jKLr9?}7?GX`p+=>Mm@+^lVL}qBfLNAdUqO(S(6EV1^5DZ@QgXsa1omB;G7KiB%A&dp+$jzO2FTH;F+n<@ zAI9NAXc%mdc^H?*2ml0dI^f3&BqF9NYY=c2lZZHEM8QzFR)9Z?6u|@BA{?oVhyVtj zi7?*_-xEfF6mS3m4Iai}2l5GFM8uk20yGycqY>~mh#-K7un-!AyHlLuRv-_68|!0G z3=GBqZi3gx8XFqnO!VM53=V_FLbnkLYeFzIB^cn~pDzStjmPvQxLVtOwgr6=5&i-J zmw-lxhKA~g8t8*OKQtDP$D=VgG!BP?5Ga0lpnw*J3gl~k(O?bm89WwOzybr|LX9*! z7%U(nAWuJ0;BeQ~2J%0L2?`iGjK)P{^)W(9Yd|Jr9mfskvDb_<8EAkFaDYGoAHrhS zv0Q&p0P_98f1`SR`%ea-&{8PtHvZBV4rkp2Utkjg(fAyYzeMw?;amXi3h=>T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