Pārlūkot izejas kodu

Signed-off-by: yukangzhe <382985154@qq.com>

yukangzhe 4 gadi atpakaļ
vecāks
revīzija
6f7d972312

+ 3 - 2
app.json

@@ -1,6 +1,9 @@
 {
   "plugins": {},
   "pages": [
+    "pages/login/login",
+    "pages/demo/demo",
+    "pages/taskDetail/taskDetail",
     "pages/index/index",
     "pages/student/student",
     "pages/myself/myself",
@@ -14,10 +17,8 @@
     "pages/leave/leave",
     "pages/doTask/doTask",
     "pages/task/task",
-    "pages/taskDetail/taskDetail",
     "pages/schedule/schedule",
     "pages/piano/piano",
-    "pages/login/login",
     "pages/makePiano/makePiano",
     "pages/lessons/lessons",
     "pages/lessonsDetail/lessonsDetail",

+ 1 - 0
pages/classOrder/classOrder.json

@@ -1,3 +1,4 @@
 {
+  "navigationBarTitleText": "课程订单",
   "usingComponents": {}
 }

+ 226 - 0
pages/demo/demo.js

@@ -0,0 +1,226 @@
+// pages/demo/demo.js
+import VODUpload from '../../utils/aliyun-upload-sdk-1.0.1.min'
+const app = getApp()
+const util = require("../../utils/util")
+const urlDef = require("../../utils/urls")
+
+const recordManager = wx.getRecorderManager()
+const audio = wx.createInnerAudioContext()
+
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    video: "",
+    poster: 'http://y.gtimg.cn/music/photo_new/T002R300x300M000003rsKF44GyaSk.jpg?max_age=2592000',
+    name: '此时此刻',
+    author: '许巍',
+    audiosrc: 'https://www.1ting.com/api/audio?/2020/05/18/18a_yx/01.mp3',
+  },
+
+  changeVideo:function(){
+    var that = this
+    var uploader = new VODUpload({
+      //阿里账号ID,必须有值
+      userId: "WaWQOn6gXod13WLEp8cr4ljUdvcbXJ",
+      //网络原因失败时,重新上传次数,默认为3
+      retryCount: 3,
+      //网络原因失败时,重新上传间隔时间,默认为2秒
+      retryDuration: 2,
+      //开始上传
+      'onUploadstarted': function (uploadInfo) {
+        console.log(uploadInfo)
+        // console.log("onUploadStarted:" + uploadInfo.file.name + ", endpoint:" + uploadInfo.endpoint + ", bucket:" + uploadInfo.bucket + ", object:" + uploadInfo.object)
+        //上传方式1,需要根据uploadInfo.videoId是否有值,调用点播的不同接口获取uploadauth和uploadAddress,如果videoId有值,调用刷新视频上传凭证接口,否则调用创建视频上传凭证接口
+        if (uploadInfo.videoId) {
+          console.log('true');
+          //如果uploadInfo.videoId存在,调用刷新视频上传凭证接口
+        } else {
+          console.log('false');
+          //如果uploadInfo.videoId不存在,调用获取视频上传地址和凭证接口
+        }
+        //从点播服务获取的uploadAuth、uploadAddress和videoId,设置SDK
+        uploader.setUploadAuthAndAddress(uploadInfo, that.data.uploadAuth, that.data.uploadAddress, that.data.videoId);
+      },
+      //文件上传成功
+      'onUploadSucceed': function (uploadInfo) {
+        console.log("上传成功:" + JSON.stringify(uploadInfo))
+        that.setData({
+          poster: uploadInfo.coverUrl,
+          src: uploadInfo.url
+        })
+        // console.log("onUploadSucceed: " + uploadInfo.file.name + ", endpoint:" + uploadInfo.endpoint + ", bucket:" + uploadInfo.bucket + ", object:" + uploadInfo.object);
+      },
+      //文件上传失败
+      'onUploadFailed': function (uploadInfo, code, message) {
+        console.log("onUploadFailed: file:" + uploadInfo.file.name + ",code:" + code + ", message:" + message);
+      },
+      //文件上传进度,单位:字节
+      'onUploadProgress': function (uploadInfo, totalSize, loadedPercent) {
+        // console.log("onUploadProgress:file:" + uploadInfo.file.name + ", fileSize:" + totalSize + ", percent:" + Math.ceil(loadedPercent * 100) + "%");
+      },
+      //上传凭证超时
+      'onUploadTokenExpired': function (uploadInfo) {
+        console.log("onUploadTokenExpired");
+        //实现时,根据uploadInfo.videoId调用刷新视频上传凭证接口重新获取UploadAuth
+        //从点播服务刷新的uploadAuth,设置到SDK里
+        uploader.resumeUploadWithAuth(uploadAuth);
+      },
+      //全部文件上传结束
+      'onUploadEnd': function (uploadInfo) {
+        console.log("onUploadEnd: uploaded all the files");
+      }
+    });
+
+    wx.chooseVideo({
+      camera: ['album'],
+      success(res){
+        var file = {url: res.tempFilePath, coverUrl: res.thumbTempFilePath};
+        var userData = '{"Vod":{}}';
+        const urls = urlDef.urls;
+        let createUrl = urls.video_create_upload + '?title=' + res.tempFilePath + '&fileName=' + res.tempFilePath;
+        util.apiPost(createUrl).then((rs) => {
+          
+          let d = JSON.parse(rs.data);
+          // console.log('createUploadVideo ' + JSON.stringify(d));
+          that.setData({
+             uploadAuth : d.UploadAuth,
+             uploadAddress : d.UploadAddress,
+             videoId : d.VideoId,
+          })
+          uploader.addFile(file, null, null, null, userData)
+          uploader.startUpload();
+          // uploader.setUploadAuthAndAddress(uploadInfo, uploadAuth, uploadAddress, videoId);
+        }, e => {
+          console.log('createUploadVideo error ' + JSON.stringify(e));
+        });
+      }
+    })
+  },
+
+  audioPlay: function () {
+    
+    // audio.src = 'https://webfs.yun.kugou.com/202102261333/6839aa7db664ae01c1f11d5185d92c13/G129/M08/1B/0B/IYcBAFxqmLKABFylADPZC9WDX8A077.mp3';
+    audio.src = this.data.audioSrc
+    audio.play()
+    // this.audioCtx.play()
+  },
+  audioPause: function () {
+    this.audioCtx.pause()
+  },
+  audio14: function () {
+    this.audioCtx.seek(14)
+  },
+  audioStart: function () {
+    this.audioCtx.seek(0)
+  },
+
+  startRecord:function(){
+    var that = this
+    wx.getSetting({
+      success(res) {
+        if (!res.authSetting['scope.record']) {
+          wx.authorize({
+            scope: 'scope.record',
+            success () {
+              // 用户已经同意小程序使用录音功能,后续调用 wx.startRecord 接口不会弹窗询问
+              that.getRecord()
+            }
+          })
+        } else {
+          that.getRecord()
+        }
+      }
+    })
+    
+
+    
+  },
+
+  getRecord: function () {
+    const options = {}
+    recordManager.start(options)
+  },
+
+  endRecord: function () {
+    recordManager.stop()
+    recordManager.onStop((res) => {  //监听录音停止的事件
+      console.log("监听录音停止事件",res)
+      if (res.duration < 1000) {
+        wx.showToast({
+          title: '录音时间太短'
+        })
+        return;
+      } else {
+       
+        var tempFilePath = res.tempFilePath; // 文件临时路径
+        console.log("文件临时路径", tempFilePath)
+        audio.src = tempFilePath
+        audio.play()
+      }
+    });
+  },
+
+  playAudio:function(){
+    this.audioContext.play()
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+    this.audioCtx = wx.createAudioContext('myAudio')
+   
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+    
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function () {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function () {
+
+  }
+})

+ 3 - 0
pages/demo/demo.json

@@ -0,0 +1,3 @@
+{
+  "usingComponents": {}
+}

+ 14 - 0
pages/demo/demo.wxml

@@ -0,0 +1,14 @@
+<view>
+  <view>
+    <view bindtap="changeVideo">上传视频</view>
+    <video poster="{{poster}}" src="{{src}}"></video>
+  </view>
+
+  <view>
+    <audio poster="{{poster}}" name="{{name}}" author="{{author}}" src="{{audiosrc}}" id="myAudio" controls></audio>
+    <button type="primary" bindtap="getRecord">录音</button>
+    <button type="primary" bindtap="endRecord">停止并播放</button>
+    <button type="primary" bindtap="audio14">设置当前播放时间为14秒</button>
+    <button type="primary" bindtap="audioStart">回到开头</button>
+  </view>
+</view>

+ 0 - 0
pages/demo/demo.wxss


+ 289 - 14
pages/doTask/doTask.js

@@ -1,47 +1,322 @@
 // pages/doTask/doTask.js
+import VODUpload from '../../utils/aliyun-upload-sdk-1.0.1.min'
+const app = getApp()
+const util = require("../../utils/util")
+const urlDef = require("../../utils/urls")
+
+const recordManager = wx.getRecorderManager() //录音对象
+const audioContext = wx.createInnerAudioContext() //音频播放对象
+
+var uploader = null //阿里云视频上传对象
+
 Page({
 
   /**
    * 页面的初始数据
    */
   data: {
-    talkFlag:false,
-    closeName: '开始录音'
+    talkFlag: false,
+    closeName: '开始录音',
+    videoList: [],
+    videoFlag: 0,
+    imgList: [],
+    audioList:[],
+    audioPause: false
   },
 
-  getRecord:function(){
-    console.log(this.data.talkFlag)
-    if(this.data.talkFlag){
-      this.setData({
+  getRecord: function () {
+    const that = this
+    if (that.data.talkFlag) {
+      recordManager.stop()
+      recordManager.onStop((res) => {  //监听录音停止的事件
+        console.log("监听录音停止事件",res)
+        if (res.duration < 1000) {
+          wx.showToast({
+            title: '录音时间太短',
+            icon: none
+          })
+          return;
+        } else {
+          var tempFilePath = res.tempFilePath; // 文件临时路径
+          console.log("文件临时路径", tempFilePath)
+          // audioContext.src = tempFilePath
+          // audioContext.play()
+          const list = [tempFilePath]
+          that.setData({
+            audioList:that.data.audioList.concat(list)
+          })
+        }
+      });
+      that.setData({
         talkFlag: false,
         closeName: '开始录音'
       })
     } else {
-      this.setData({
-        talkFlag: true,
-        closeName: '正在录音,再次点击结束录音'
+      wx.getSetting({
+        success(res) {
+          if (!res.authSetting['scope.record']) {
+            wx.authorize({
+              scope: 'scope.record',
+              success() {
+                // 用户已经同意小程序使用录音功能,后续调用 wx.startRecord 接口不会弹窗询问
+                const options = {}
+                recordManager.start(options)
+              },
+              fail(){
+                wx.openSetting({
+                  withSubscriptions: true,
+                })
+              }
+            })
+          } else {
+            that.setData({
+              talkFlag: true,
+              closeName: '正在录音,再次点击结束录音'
+            })
+            const options = {}
+            recordManager.start(options)
+          }
+        }
       })
+
     }
   },
 
-  uploadTap:function(){
+  showAudio:function(e){
+    const index = e.currentTarget.dataset.index
+    if(this.data.curAudioIndex != index){
+      this.setData({
+        curAudioIndex: index,
+      })
+      audioContext.src = this.data.audioList[index]
+      audioContext.play()
+      audioContext.onEnded((res)=>{
+        this.setData({
+          curAudioIndex: '-1',
+        })
+      })
+    }else{
+      if(this.data.audioPause){
+        audioContext.play()
+        this.setData({
+          audioPause: false
+        })
+      } else {
+        audioContext.pause()
+        this.setData({
+          audioPause: true
+        })
+      }
+    } 
+    
+  },
+
+  delAudio:function(e){
+    const index = e.currentTarget.dataset.index
+    this.data.audioList.splice(index,1);
+    this.setData({
+      audioList: this.data.audioList
+    })
+  },
+
+  uploadTap: function () {
+    const that = this
+    const urls = urlDef.urls;
     wx.chooseImage({
       count: 6,
       sourceType: ['album', 'camera'],
+      success(res) {
+        wx.showLoading({
+          title: '上传中...',
+        })
+        for (var i in res.tempFilePaths) {
+          wx.uploadFile({
+            filePath: res.tempFilePaths[i],
+            name: 'name',
+            url: urls.file_upload,
+            header: util.getHeaders(),
+            success(res) {
+              wx.showToast({
+                title: '上传成功',
+              })
+              const rs = JSON.parse(JSON.parse(JSON.stringify(res.data)))
+              const list = [rs.data[0].url]
+              that.setData({
+                imgList: that.data.imgList.concat(list)
+              })
+            },
+            fail(res) {
+              wx.showToast({
+                title: '上传失败',
+                icon: none
+              })
+            },
+            complete(res) {
+              wx.hideLoading({
+                success: (res) => {},
+              })
+            }
+          })
+        }
+      }
+    })
+  },
+
+  showImg: function (e) {
+    const index = e.currentTarget.dataset.index
+    wx.previewImage({
+      current: this.data.imgList[index],
+      urls: this.data.imgList,
+    })
+  },
+
+  delImg: function (e) {
+    const index = e.currentTarget.dataset.index
+    this.data.imgList.splice(index, 1);
+    this.setData({
+      imgList: this.data.imgList
     })
   },
 
-  upLoadVideo:function(){
+  upLoadVideo: function () {
+    const that = this
     wx.chooseVideo({
-      camera: ['album', 'camera'],
+      camera: ['album'],
+      success(res) {
+        var file = {
+          url: res.tempFilePath,
+          coverUrl: res.thumbTempFilePath
+        };
+        var userData = '{"Vod":{}}';
+        const urls = urlDef.urls;
+        let createUrl = urls.video_create_upload + '?title=' + res.tempFilePath + '&fileName=' + res.tempFilePath;
+        console.log('createUploadVideo ... ');
+        util.apiPost(createUrl).then((rs) => {
+
+          let d = JSON.parse(rs.data);
+          // console.log('createUploadVideo ' + JSON.stringify(d));
+          that.setData({
+            uploadAuth: d.UploadAuth,
+            uploadAddress: d.UploadAddress,
+            videoId: d.VideoId,
+          })
+          uploader.addFile(file, null, null, null, userData)
+          uploader.startUpload();
+          // uploader.setUploadAuthAndAddress(uploadInfo, uploadAuth, uploadAddress, videoId);
+        }, e => {
+          console.log('createUploadVideo error ' + JSON.stringify(e));
+        });
+      }
+    })
+  },
+
+  showVideo: function (e) {
+    const index = e.currentTarget.dataset.index
+    const curVideo = this.data.videoList[index].src
+    this.setData({
+      curVideo
     })
-  },  
+
+    this.videoContext.requestFullScreen({ // 设置全屏时视频的方向,不指定则根据宽高比自动判断。
+      direction: 90 // 屏幕逆时针90度
+    });
+  },
+
+  // 监听视频是否为全屏,否则直接关闭
+  bindfullscreenchange: function () {
+    if (this.data.videoFlag == 0) {
+      this.setData({
+        videoFlag: 1
+      })
+    } else {
+      this.setData({
+        videoFlag: 0,
+        curVideo: ""
+      })
+    }
+  },
+
+  delVideo: function (e) {
+    const index = e.currentTarget.dataset.index
+    this.data.videoList.splice(index, 1);
+    this.setData({
+      videoList: this.data.videoList
+    })
+  },
 
   /**
    * 生命周期函数--监听页面加载
    */
   onLoad: function (options) {
-
+    this.videoContext = wx.createVideoContext('play-video'); // 	创建 video 上下文 VideoContext 对象。
+    const that = this
+    const createUpLoad = new VODUpload({
+      //阿里账号ID,必须有值
+      userId: "WaWQOn6gXod13WLEp8cr4ljUdvcbXJ",
+      //网络原因失败时,重新上传次数,默认为3
+      retryCount: 3,
+      //网络原因失败时,重新上传间隔时间,默认为2秒
+      retryDuration: 2,
+      //开始上传
+      'onUploadstarted': function (uploadInfo) {
+        wx.showLoading({
+          title: '上传中...',
+          mask: true
+        })
+        // console.log("onUploadStarted:" + uploadInfo.file.name + ", endpoint:" + uploadInfo.endpoint + ", bucket:" + uploadInfo.bucket + ", object:" + uploadInfo.object)
+        //上传方式1,需要根据uploadInfo.videoId是否有值,调用点播的不同接口获取uploadauth和uploadAddress,如果videoId有值,调用刷新视频上传凭证接口,否则调用创建视频上传凭证接口
+        if (uploadInfo.videoId) {
+          //如果uploadInfo.videoId存在,调用刷新视频上传凭证接口
+        } else {
+          //如果uploadInfo.videoId不存在,调用获取视频上传地址和凭证接口
+        }
+        //从点播服务获取的uploadAuth、uploadAddress和videoId,设置SDK
+        console.log(that.data)
+        uploader.setUploadAuthAndAddress(uploadInfo, that.data.uploadAuth, that.data.uploadAddress, that.data.videoId);
+      },
+      //文件上传成功
+      'onUploadSucceed': function (uploadInfo) {
+        // console.log("上传成功:" + JSON.stringify(uploadInfo))
+        var json = {
+          src: uploadInfo.url,
+          img: uploadInfo.coverUrl
+        }
+        var list = [json]
+        that.setData({
+          videoList: that.data.videoList.concat(list)
+        })
+        wx.showToast({
+          title: '上传成功',
+        })
+        // console.log("onUploadSucceed: " + uploadInfo.file.name + ", endpoint:" + uploadInfo.endpoint + ", bucket:" + uploadInfo.bucket + ", object:" + uploadInfo.object);
+      },
+      //文件上传失败
+      'onUploadFailed': function (uploadInfo, code, message) {
+        // console.log("onUploadFailed: file:" + uploadInfo.file.name + ",code:" + code + ", message:" + message);
+        wx.showToast({
+          title: '上传失败',
+        })
+      },
+      //文件上传进度,单位:字节
+      'onUploadProgress': function (uploadInfo, totalSize, loadedPercent) {
+        // console.log("onUploadProgress:file:" + uploadInfo.file.name + ", fileSize:" + totalSize + ", percent:" + Math.ceil(loadedPercent * 100) + "%");
+      },
+      //上传凭证超时
+      'onUploadTokenExpired': function (uploadInfo) {
+        wx.showToast({
+          title: '上传超时',
+        })
+        console.log("onUploadTokenExpired");
+        //实现时,根据uploadInfo.videoId调用刷新视频上传凭证接口重新获取UploadAuth
+        //从点播服务刷新的uploadAuth,设置到SDK里
+        uploader.resumeUploadWithAuth(uploadAuth);
+      },
+      //全部文件上传结束
+      'onUploadEnd': function (uploadInfo) {
+        console.log("onUploadEnd: uploaded all the files");
+      }
+    });
+    uploader = createUpLoad
   },
 
   /**

+ 12 - 10
pages/doTask/doTask.wxml

@@ -17,11 +17,11 @@
 
     <view class="title">上传图片</view>
     <view class="uploadImg-task-view">
-      <view class="my-img-view" wx:for="{{1}}" wx:key="index">
+      <view class="my-img-view" wx:for="{{imgList}}" wx:key="index" data-index="{{index}}" catchtap="showImg">
         <view class="new-task-img">
-          <image src="/images/logo.png"></image>
+          <image src="{{item}}"></image>
         </view>
-        <view class="del-btn">X</view>
+        <view class="del-btn" data-index="{{index}}" catchtap="delImg">X</view>
       </view>
       <view class="upload-btn" bindtap="uploadTap">
         <view style="margin-top:30rpx">
@@ -31,15 +31,17 @@
       </view>
     </view>
 
+    <video id="play-video" bindfullscreenchange="bindfullscreenchange" wx:if="{{curVideo}}" autoplay="true"
+      src="{{curVideo}}" controls="true" downloadlist></video>
     <view class="title">上传视频</view>
     <view class="uploadImg-task-view">
-      <view class="my-img-view" wx:for="{{1}}" wx:key="index">
+      <view class="my-img-view" wx:for="{{videoList}}" wx:key="index" data-index="{{index}}" catchtap="showVideo">
         <view class="new-task-img">
-          <image src="/images/logo.png"></image>
+          <image src="{{item.img}}"></image>
         </view>
-        <view class="del-btn">X</view>
+        <view class="del-btn" data-index="{{index}}" catchtap="delVideo">X</view>
       </view>
-      <view class="upload-btn" bindtap="uploadTap">
+      <view class="upload-btn" bindtap="upLoadVideo">
         <view style="margin-top:30rpx">
           <image src="/images/addFile.png"></image>
           <view>添加视频</view>
@@ -50,11 +52,11 @@
     <audio id="audio-play" bindpause="bindpause" bindended="bindended" src="{{curAudio}}"></audio>
     <view class="title">上传录音</view>
     <view class="audio-list">
-      <view class="audio-box" wx:for="{{6}}" wx:key="index">
+      <view class="audio-box" wx:for="{{audioList}}" wx:key="index">
         <image bindtap="audioShow" src="{{index == curAudioIndex ? '/images/cur-audio.png' : '/images/audio.png'}}"
         class="{{index == curAudioIndex ? 'curAudioStyle' : ''}}" 
-        data-index="{{index}}" data-url="{{item}}"></image>
-        <view class="del-btn">X</view>
+        data-index="{{index}}"  catchtap="showAudio"></image>
+        <view class="del-btn" data-index="{{index}}"  catchtap="delAudio">X</view>
       </view>
     </view>
    

+ 4 - 1
pages/doTask/doTask.wxss

@@ -41,6 +41,9 @@
   height: 60rpx;
   line-height: 60rpx;
 }
+.textarea{
+  margin-top: 20rpx;
+}
 .textarea textarea{
   width: 650rpx;
   padding: 20rpx 25rpx;
@@ -107,7 +110,7 @@
     border: 1rpx dashed #ccc;
     text-align: center;
     background: #f8f8f8;
-    margin: 20rpx 0 0;
+    margin: 20rpx 0 20rpx;
     color: #999;
     font-size: 22rpx;
     line-height: 36rpx;

+ 16 - 1
pages/editMyself/editMyself.js

@@ -6,7 +6,22 @@ Page({
    */
   data: {
     index: 0,
-    array:['女','男']
+    array:['女','男'],
+    src:'/images/head.png'
+  },
+
+  changeHead:function(){
+    var that = this
+    wx.chooseImage({
+      count: 1,
+      sourceType:['album', 'camera'],
+      success(res){
+        console.log(JSON.stringify(res))
+        that.setData({
+          src: res.tempFilePaths[0]
+        })
+      }
+    })
   },
 
   /**

+ 2 - 2
pages/editMyself/editMyself.wxml

@@ -1,8 +1,8 @@
 <view class="container">
   <view class="edit-box">
     <view class="title">头像</view>
-    <view class="headImg">
-      <image src="/images/head.png"></image>
+    <view class="headImg" bindtap="changeHead">
+      <image src="{{src}}"></image>
     </view>
     <view class="title">姓名</view>
     <view class="input-name">

+ 0 - 1
pages/evaluationDetail/evaluationDetail.js

@@ -103,7 +103,6 @@ Page({
       this.setData({
         curAudioIndex: e.currentTarget.dataset.index,
         curAudio: e.currentTarget.dataset.url,
-       
       })
       this.audioContext.play()
       this.setData({

+ 7 - 3
pages/login/login.js

@@ -95,13 +95,17 @@ Page({
         wx.showToast({
           title: '登录成功',
         })
-        wx.switchTab({
-          url: '/pages/index/index'
+        // wx.switchTab({
+        //   url: '/pages/index/index'
+        // })
+        wx.navigateTo({
+          url: '/pages/doTask/doTask',
         })
       } else {
         wx.showToast({
           title: rs.errMsg,
-          icon: 'none'
+          icon: 'none',
+          duration: 3000
         })
       }
     })

+ 3 - 1
pages/piano/piano.wxss

@@ -1,7 +1,9 @@
 .piano-list {
   width: 750;
 }
-
+page{
+  background: #f1f1f1;
+}
 .piano-box {
   padding: 20rpx 0;
   display: flex;

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 16 - 0
utils/aliyun-upload-sdk-1.0.1.min.js


+ 2 - 2
utils/util.js

@@ -293,6 +293,6 @@ module.exports = {
   distance: distance,
   apiPost: apiPost,
   fun_date: fun_date,
-  fun_week: fun_week
-
+  fun_week: fun_week,
+  getHeaders:getHeaders
 }