Merge branch 'master' of http://139.186.142.91:10010/r/productDev/zbomyoujia
| | |
| | | if(item.openType == 'link'){ |
| | | wx.navigateTo({ |
| | | url: '/pages/webView/index?link=' + item.openContent, |
| | | success: function(res) { |
| | | // 通过eventChannel向被打开页面传送数据 |
| | | res.eventChannel.emit('acceptDataFromOpenerPage', { link: item.openContent}) |
| | | } |
| | | }) |
| | | } |
| | | if(item.openType == 'page'){ |
| | |
| | | { |
| | | "name": "party", |
| | | "version": "1.0.0", |
| | | "lockfileVersion": 3, |
| | | "lockfileVersion": 1, |
| | | "requires": true, |
| | | "packages": { |
| | | "": { |
| | | "name": "party", |
| | | "version": "1.0.0", |
| | | "license": "ISC", |
| | | "dependencies": { |
| | | "@vant/area-data": "^1.1.3", |
| | | "@vant/weapp": "^1.11.6", |
| | | "hy-event-store": "^1.3.1", |
| | | "mp-html": "^2.5.0", |
| | | "vant-weapp": "^0.5.28" |
| | | } |
| | | }, |
| | | "node_modules/@vant/area-data": { |
| | | "@vant/area-data": { |
| | | "version": "1.5.1", |
| | | "resolved": "https://registry.npmjs.org/@vant/area-data/-/area-data-1.5.1.tgz", |
| | | "resolved": "https://registry.npmmirror.com/@vant/area-data/-/area-data-1.5.1.tgz", |
| | | "integrity": "sha512-gR5TPEzTbxN1cTK1aDhCoyikSCLX7DAacxyXoKyI4SAsYYTZrDl/nLgQFIm9vLsvWzlPIda8xV8/U3x7M9k6ww==" |
| | | }, |
| | | "node_modules/@vant/weapp": { |
| | | "@vant/weapp": { |
| | | "version": "1.11.6", |
| | | "resolved": "https://registry.npmjs.org/@vant/weapp/-/weapp-1.11.6.tgz", |
| | | "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.11.6.tgz", |
| | | "integrity": "sha512-a3heReWYT2gNdsyj6x1hBwsM8V8NrjcPAmle86NH2CD2V/i/h0le75piW6KntSfOPCwekVWMBKhysNrBpJeKdw==" |
| | | }, |
| | | "node_modules/hy-event-store": { |
| | | "hy-event-store": { |
| | | "version": "1.3.1", |
| | | "resolved": "https://registry.npmjs.org/hy-event-store/-/hy-event-store-1.3.1.tgz", |
| | | "resolved": "https://registry.npmmirror.com/hy-event-store/-/hy-event-store-1.3.1.tgz", |
| | | "integrity": "sha512-uD+14mz4ONiAs9cX/csjUJ2pHTPFciE3JvIbZ+lsbaXopZWbnETEjwJ0a4l5GqNGcltcW3gJjlnUXCJPBoABfg==" |
| | | }, |
| | | "node_modules/mp-html": { |
| | | "mp-html": { |
| | | "version": "2.5.0", |
| | | "resolved": "https://registry.npmjs.org/mp-html/-/mp-html-2.5.0.tgz", |
| | | "resolved": "https://registry.npmmirror.com/mp-html/-/mp-html-2.5.0.tgz", |
| | | "integrity": "sha512-uvBH5tIaDIlj8qaxsvNXU3RKX0jvXOo3J6FAi/notUv/ds6j79UUTE82aDkxxUk0eLUU0CiCqMrR7WWnytk30Q==" |
| | | }, |
| | | "node_modules/vant-weapp": { |
| | | "vant-weapp": { |
| | | "version": "0.5.29", |
| | | "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", |
| | | "resolved": "https://registry.npmmirror.com/vant-weapp/-/vant-weapp-0.5.29.tgz", |
| | | "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" |
| | | } |
| | | } |
| | |
| | | url: '/pages/webView/index', |
| | | success: function(res) { |
| | | console.log('发出事件'); |
| | | res.eventChannel.emit('data',{link:item.content} ); |
| | | res.eventChannel.emit('acceptDataFromOpenerPage',{link:item.content} ); |
| | | } |
| | | }) |
| | | } |
| | |
| | | background-color: #fff; |
| | | } |
| | | .home_tabs { |
| | | width: 100%; |
| | | height: 80rpx; |
| | | position: fixed; |
| | | background-color: #fff; |
| | |
| | | wx.navigateTo({ |
| | | url: '/pages/webView/index', |
| | | success: function (res) { |
| | | res.eventChannel.emit('data', { |
| | | res.eventChannel.emit('acceptDataFromOpenerPage', { |
| | | link: item.openContent || item.content |
| | | }); |
| | | } |
| | |
| | | let temp = ['mysub', 'collect', 'favorite','index'] |
| | | const index = e.currentTarget.dataset.index |
| | | if(index == '4'){ |
| | | |
| | | wx.navigateToMiniProgram({ |
| | | appId: 'wx9910433b937fff92', |
| | | path: '', |
| | | envVersion: 'trial', |
| | | extraData: { |
| | | origin: 'c' |
| | | } |
| | | }) |
| | | } |
| | | if(index == '5'){ |
| | | wx.navigateTo({ |
| | |
| | | * 页面的初始数据 |
| | | */ |
| | | data: { |
| | | videoContext:null, |
| | | category: [], |
| | | tagCodes: '', |
| | | videoUrl: '', |
| | | showVideo: false, |
| | | |
| | | isShow:false, |
| | | curVideoSrc:'', |
| | | dataList: [], |
| | | total: 0, |
| | | pageSize: 10, |
| | |
| | | }, |
| | | itemClick(e) { |
| | | const { videourl } = e.currentTarget.dataset |
| | | wx.previewMedia({ |
| | | sources: [{ url: videourl, type: 'video' }] |
| | | }) |
| | | this.startPlayVideo(videourl) |
| | | |
| | | // wx.previewMedia({ |
| | | // sources: [{ url: videourl, type: 'video' }] |
| | | // }) |
| | | }, |
| | | cateClick(e) { |
| | | const { code } = e.target.dataset |
| | |
| | | onLoad(options) { |
| | | this.getTagList() |
| | | this.getList() |
| | | this.videoContext = wx.createVideoContext('myVideo') |
| | | }, |
| | | |
| | | /** |
| | |
| | | */ |
| | | onShareAppMessage() { |
| | | |
| | | }, |
| | | startPlayVideo(videourl){ |
| | | this.setData({isShow:true, curVideoSrc:videourl}) |
| | | console.log(videourl) |
| | | this.videoContext.requestFullScreen({ |
| | | // direction: 0 |
| | | }); |
| | | }, |
| | | onClose(){ |
| | | this.setData({isShow:false}) |
| | | if(this.videoContext){ |
| | | this.videoContext.exitFullScreen() |
| | | } |
| | | } |
| | | }) |
| | |
| | | { |
| | | "usingComponents": { |
| | | "van-overlay": "@vant/weapp/overlay/index" |
| | | "van-overlay": "@vant/weapp/overlay/index" , |
| | | "van-popup": "@vant/weapp/popup/index" |
| | | }, |
| | | "navigationBarTitleText": "产品视频" |
| | | } |
| | |
| | | <view class="container"> |
| | | <!-- 分类 --> |
| | | <view> |
| | | <scroll-view scroll-x="true" style="weight: 710rpx;margin-bottom: 30rpx;"> |
| | | <scroll-view scroll-x="true" style="width: 710rpx;margin-bottom: 30rpx;" > |
| | | <view class="scroll_cate"> |
| | | <view bindtap="cateClick" data-code="{{item.labelCode}}" wx:for="{{ category }}" class="item {{ tagCodes == item.labelCode ? 'active': '' }}">{{ item.labelName }}</view> |
| | | </view> |
| | |
| | | <image class="default_empty" src="../../static/images/default_empty.png"></image> |
| | | </view> |
| | | </view> |
| | | <view wx:if="{{ isShow }}" bind:tap="onClose" class="video_content"> |
| | | <view class="video"> |
| | | <video id="myVideo" src="{{curVideoSrc}}" autoplay show-fullscreen-btn show-play-btn ></video> |
| | | </view> |
| | | </view > |
| | | |
| | | </view> |
| | |
| | | top: 50%; |
| | | transform: translate(0, -50%); |
| | | } |
| | | .video_content{ |
| | | position: absolute; |
| | | top: 10rpx; |
| | | left: 0; |
| | | width: 100%; |
| | | height: 100%; |
| | | background-color: rgba(0, 0, 0, 0.2); |
| | | z-index: 9999; |
| | | } |
| | | .video_content .video{ |
| | | position: fixed; |
| | | border-radius: 8rpx; |
| | | top: 50%; |
| | | left: 75rpx; |
| | | transform: translate(0, -50%); |
| | | width: 600rpx; |
| | | z-index: 10000; |
| | | } |
| | |
| | | onLoad: function (options) { |
| | | let that = this |
| | | const eventChannel = this.getOpenerEventChannel() |
| | | |
| | | eventChannel.on('acceptDataFromOpenerPage', function(data) { |
| | | console.log('参数', data) |
| | | if (data.title) wx.setNavigationBarTitle({ title: data.title }) |
| | |
| | | url: '/pages/kefu/select', |
| | | }) |
| | | }, |
| | | handleShare() { |
| | | const { enjoyList } = this.data |
| | | let info = {} |
| | | enjoyList.forEach(item => { |
| | | item.list.forEach(ite => { |
| | | if(ite.checked){ |
| | | info = ite |
| | | } |
| | | }) |
| | | }) |
| | | |
| | | let map = [ |
| | | '/pages/detailDis/product', |
| | | '/pages/detailDis/case', |
| | | '/pages/detailDis/realpic' |
| | | ] |
| | | console.log(info.id) |
| | | wx.navigateToMiniProgram({ |
| | | appId: 'wx208dd1edc0be24ee', |
| | | path: map[info.joinType], |
| | | envVersion: 'trial', |
| | | extraData: { |
| | | id: info.id, |
| | | origin: 'b' |
| | | } |
| | | }) |
| | | }, |
| | | handleDown() { |
| | | const { enjoyList } = this.data |
| | | let obj = {} |
| | |
| | | |
| | | }, |
| | | checkAll() { |
| | | this.setData({checkAll:!this.data.checkAll}) |
| | | let enjoyList = wx.getStorageSync('enjoyList') || [] |
| | | enjoyList.forEach(item => { |
| | | item.checked = !item.checked |
| | | item.checked = this.data.checkAll |
| | | }) |
| | | wx.setStorageSync('enjoyList', enjoyList) |
| | | |
| | |
| | | <!-- --> |
| | | <view wx:if="{{ showShare }}" class="shade_modal" style="padding-bottom: {{bottomLift}}px;"> |
| | | <view class="btns"> |
| | | <button open-type="share" class="item" bindtap="handleShare"> |
| | | <button class="item" bindtap="handleShare"> |
| | | <image src="../../static/icon/wechat.png"></image> |
| | | <view>小程序分享</view> |
| | | </button> |