12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- const app = getApp()
- Page({
- data: {
- code: '',
- showContent1: true,
- showContent2: false,
- showContent3: false,
- videoSrc: app.globalData.videoUrl + '/study/step_1.mp4'
- },
-
- changeVideoSrc: function (newSrc) {
- this.setData({
- videoSrc: newSrc,
- });
- },
-
- showContent2: function () {
- this.setData({
- showContent1: false,
- showContent2: true,
- showContent3: false,
- });
- this.changeVideoSrc(app.globalData.videoUrl + '/study/step_2.mp4');
- },
-
- showContent3: function () {
- this.setData({
- showContent1: false,
- showContent2: false,
- showContent3: true
- });
- this.changeVideoSrc(app.globalData.videoUrl + '/study/step_3.mp4');
- },
-
- complateLearn() {
- my.reLaunch({
- url: '/pages/use_bike/use_bike?code=' + this.data.code,
- })
- my.setStorageSync({
- 'key': 'videoLearn',
- data: true
- });
- },
- onLoad(options) {
- this.setData({
- code: options.code
- })
- },
- })
|