litian
2024-04-02 6a734d758720185f538e672c879121adb6732274
代码合并,问题修改,学习
20个文件已修改
635 ■■■■■ 已修改文件
packageBookService/pages/bookServices/detail/components/suggest/suggest.wxml 53 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/detail/components/suggest/suggest.wxss 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/detail/index.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/examination/examination.js 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/components/webView/index.js 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageDomain/pages/resourceDetails/document/index.js 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageDomain/pages/resourceDetails/myAudio/index.js 43 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageDomain/pages/resourceDetails/myVideo/index.js 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageDomain/pages/sampleBookList/applicationForm/index.wxml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageDomain/pages/sampleBookList/applicationForm/index.wxss 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageDomain/pages/teacherCertification/index.wxml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageDomain/pages/teacherCertification/index.wxss 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packagePersonal/pages/myOrder/index.js 116 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packagePersonal/pages/userSetting/index.js 133 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packagePersonal/pages/userSetting/index.wxml 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packagePersonal/pages/userSetting/index.wxss 40 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/home/home.js 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/personalCenter/index.wxss 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/student/index.js 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/student/index.wxml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/detail/components/suggest/suggest.wxml
@@ -9,64 +9,25 @@
  </view>
</t-dialog> -->
<!-- <view class="suggest"> -->
<t-popup
  visible="{{showWithInput}}"
  bind:visible-change="onVisibleChange"
  placement="center"
>
<t-popup visible="{{showWithInput}}" bind:visible-change="onVisibleChange" placement="center">
  <view class="top-icon">
    <t-image src="/static/images/bookService/detail/feedback.png"></t-image>
  </view>
  <view slot="content" class="content">
    <view class="top-title">我要建议</view>
    <view class="demo-rate">
      <t-rate
        value="{{ratevalue}}"
        catch:change="onChangeRate"
        size="{{30}}"
        color="#FFB400"
      />
      <t-rate value="{{ratevalue}}" catch:change="onChangeRate" size="{{30}}" color="#FFB400" />
    </view>
    <view class="phone-input">
      <t-input
        value="{{inputvalue}}"
        slot="content"
        label=""
        placeholder="请输入联系方式"
        bind:change="inputChange"
        type="number"
        maxlength="{{11}}"
        class="phone"
        style="{{inputStyle}}"
        placeholder-class="t-input__placeholder input-placeholder"
      />
      <t-input clearable value="{{inputvalue}}" slot="content" label="" placeholder="请输入联系方式" bind:change="inputChange" type="number" maxlength="{{11}}" class="phone" style="{{inputStyle}}" />
    </view>
    <view style="width: 100%">
      <t-textarea
        value="{{textvalue}}"
        t-class="external-class"
        label=""
        placeholder="请输入反馈内容"
        maxcharacter="200"
        disableDefaultPadding="{{true}}"
        indicator
        bind:change="textareaChange"
        style="{{inputStyle}}"
        placeholder-style="{{placeholderstyle}}"
      />
      <t-textarea value="{{textvalue}}" t-class="external-class" label="" placeholder="请输入反馈内容" maxcharacter="200" disableDefaultPadding="{{true}}" indicator bind:change="textareaChange" style="{{inputStyle}}" placeholder-style="{{placeholderstyle}}" />
    </view>
  </view>
  <view class="submit-btn">
    <t-button theme="primary" size="large" block bind:tap="confirmSuggest"
      >提交</t-button
    >
    <t-button theme="primary" size="large" block bind:tap="confirmSuggest">提交</t-button>
  </view>
  <t-icon
    t-class="close-btn"
    name="close-circle"
    size="32"
    color="#fff"
    bind:tap="closeDialog"
  />
  <t-icon t-class="close-btn" name="close-circle" size="32" color="#fff" bind:tap="closeDialog" />
</t-popup>
<!-- </view> -->
<!-- </view> -->
packageBookService/pages/bookServices/detail/components/suggest/suggest.wxss
@@ -1,8 +1,5 @@
/* pages/bookServices/detail/components/suggest/suggest.wxss */
.t-input__wrap .t-input__content,
.t-input__control {
  font-size: 28rpx !important;
@@ -114,4 +111,9 @@
  color: #0F1214;
  font-size: 40rpx;
  font-weight: bold;
}
.phone-input .input-placeholder {
  font-size: 28rpx !important
}
packageBookService/pages/bookServices/detail/index.js
@@ -1537,7 +1537,7 @@
      return false;
    }
    wx.navigateTo({
      url: '/packageBookService/pages/components/webView/index?md5=' + this.data.fileInfo.md5 + '&fileName=' + this.data.fileInfo.bookName + '&fileType=' + this.data.fileInfo.fileType + '&freePage=' + this.data.fileInfo.freePage + '&bookBuy=' + this.data.bookBuy
      url: '/packageBookService/pages/components/webView/index?md5=' + this.data.fileInfo.md5 + '&fileName=' + this.data.fileInfo.bookName + '&fileType=' + this.data.fileInfo.fileType + '&freePage=' + this.data.fileInfo.freePage + '&bookBuy=' + this.data.bookBuy + '&bookId=' + this.data.bookDetail.id
    })
  },
packageBookService/pages/bookServices/examination/examination.js
@@ -45,6 +45,8 @@
    saveTime: 20,
    isNight: false,
    sliderValue: 0, // 字体滑块
    startTime: "", //进入页面当前时间
    pauseTime: 0 //暂停时间
  },
  /**
@@ -110,6 +112,9 @@
        }
      }, 1000)
    }
    this.setData({
      startTime: Date.now()
    })
  },
  /**
@@ -118,6 +123,13 @@
  onHide() {
    if (wx.timer) {
      clearInterval(wx.timer)
    }
    this.setData({
      pauseTime: Date.now()
    })
    if (wx.getStorageSync(app.config.tokenKey)) {
      let duration = this.data.pauseTime - this.data.startTime
      this.count(duration)
    }
  },
@@ -131,6 +143,32 @@
    if (this.data.countdownInterval !== null) {
      clearInterval(this.data.countdownInterval)
    }
    this.setData({
      pauseTime: Date.now()
    })
    if (wx.getStorageSync(app.config.tokenKey)) {
      let duration = this.data.pauseTime - this.data.startTime
      this.count(duration)
    }
  },
  count(timeStr) {
    const data = {
      appRefCode: app.config.appRefCode,
      type: 'LearningTime', //统计类型--阅读时长
      data: timeStr + '', //统计内容--时长毫秒
      event: 'LearningTime',
      sysType: 'App'
    }
    //阅读商品的id
    if (this.data.bookId) {
      data.productId = this.data.bookId
    }
    //阅读资源的id
    // if (product.cmsItemId) {
    //   data.cmsItemId = product.cmsItemId
    // }
    app.MG.job.newJobWithApiNewEvent(data).then((res) => {})
  },
  /**
packageBookService/pages/components/webView/index.js
@@ -12,6 +12,8 @@
    currentPage: '',
    pdfList: [],
    skeletonLoding: true,
    startTime: "", //进入页面当前时间
    pauseTime: 0 //暂停时间
  },
  /**
@@ -86,7 +88,6 @@
        md5: data.md5
      }).then((res) => {
        let pageCount = data.bookBuy ? res.totalPages : Number(data.freePage)
        if (pageCount) {
          let list = [];
@@ -179,21 +180,54 @@
   * 生命周期函数--监听页面显示
   */
  onShow() {
    this.setData({
      startTime: Date.now()
    })
  },
  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide() {
    this.setData({
      pauseTime: Date.now()
    })
    if (wx.getStorageSync(app.config.tokenKey) && epubObj.bookBuy) {
      let duration = this.data.pauseTime - this.data.startTime
      this.count(duration)
    }
  },
  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload() {
    this.setData({
      pauseTime: Date.now()
    })
    if (wx.getStorageSync(app.config.tokenKey) && epubObj.bookBuy) {
      let duration = this.data.pauseTime - this.data.startTime
      this.count(duration)
    }
  },
  count(timeStr) {
    const data = {
      appRefCode: app.config.appRefCode,
      type: 'LearningTime', //统计类型--阅读时长
      data: timeStr + '', //统计内容--时长毫秒
      event: 'LearningTime',
      sysType: 'App'
    }
    //阅读商品的id
    if (epubObj.bookId) {
      data.productId = epubObj.bookId
    }
    //阅读资源的id
    // if (product.cmsItemId) {
    //   data.cmsItemId = product.cmsItemId
    // }
    app.MG.job.newJobWithApiNewEvent(data).then((res) => {})
  },
  /**
packageDomain/pages/resourceDetails/document/index.js
@@ -23,6 +23,8 @@
    naturalResources: [],
    titleName: '',
    pdfDatA: [],
    startTime: "", //进入页面当前时间
    pauseTime: 0 //暂停时间
  },
  /**
   * 生命周期函数--监听页面加载
@@ -58,23 +60,56 @@
   * 生命周期函数--监听页面显示
   */
  onShow() {
    this.setData({
      startTime: Date.now()
    })
  },
  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide() {
    this.setData({
      pauseTime: Date.now()
    })
    if (wx.getStorageSync(app.config.tokenKey) && epubObj.bookBuy) {
      let duration = this.data.pauseTime - this.data.startTime
      this.count(duration)
    }
  },
  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload() {
    this.setData({
      pauseTime: Date.now()
    })
    if (wx.getStorageSync(app.config.tokenKey) && epubObj.bookBuy) {
      let duration = this.data.pauseTime - this.data.startTime
      this.count(duration)
    }
  },
  count(timeStr) {
    const data = {
      appRefCode: app.config.appRefCode,
      type: 'LearningTime', //统计类型--阅读时长
      data: timeStr + '', //统计内容--时长毫秒
      event: 'LearningTime',
      sysType: 'App'
    }
    //阅读商品的id
    if (this.data.bookId) {
      data.productId = this.data.bookId
    }
    //阅读资源的id
    if (this.data.cmsId) {
      data.cmsItemId = this.data.cmsId
    }
    app.MG.job.newJobWithApiNewEvent(data).then((res) => {})
  },
  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
@@ -235,7 +270,9 @@
    //文档等
    if (item.selectType == 'pdf' || item.selectType == 'document') {
      app.MG.file.getPdfInfo({ md5: item.file }).then((res) => {
      app.MG.file.getPdfInfo({
        md5: item.file
      }).then((res) => {
        if (res && res.totalPages) {
          for (let i = 0; i < res.totalPages; i++) {
            const src = app.config.requestCtx + '/file/GetPdfPageImage?md5=' + item.file + '&index=' + (i + 1) + '&dpi=300'
packageDomain/pages/resourceDetails/myAudio/index.js
@@ -42,7 +42,9 @@
    isplay: false, //是否默认播放,
    selectId: '',
    speed: 1.0,
    myAudioPos: ''
    myAudioPos: '',
    startTime: "", //进入页面当前时间
    pauseTime: 0 //暂停时间
  },
  // // 时间格式化
  // format(t) {
@@ -126,7 +128,9 @@
   * 生命周期函数--监听页面显示
   */
  onShow() {
    this.setData({
      startTime: Date.now()
    })
  },
@@ -134,16 +138,45 @@
   * 生命周期函数--监听页面隐藏
   */
  onHide() {
    this.setData({
      pauseTime: Date.now()
    })
    if (wx.getStorageSync(app.config.tokenKey)) {
      let duration = this.data.pauseTime - this.data.startTime
      this.count(duration)
    }
  },
  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload() {
    this.setData({
      pauseTime: Date.now()
    })
    if (wx.getStorageSync(app.config.tokenKey)) {
      let duration = this.data.pauseTime - this.data.startTime
      this.count(duration)
    }
  },
  count(timeStr) {
    const data = {
      appRefCode: app.config.appRefCode,
      type: 'LearningTime', //统计类型--阅读时长
      data: timeStr + '', //统计内容--时长毫秒
      event: 'LearningTime',
      sysType: 'App'
    }
    //阅读商品的id
    if (this.data.bookId) {
      data.productId = this.data.bookId
    }
    //阅读资源的id
    if (this.data.cmsId) {
      data.cmsItemId = this.data.cmsId
    }
    app.MG.job.newJobWithApiNewEvent(data).then((res) => {})
  },
  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
packageDomain/pages/resourceDetails/myVideo/index.js
@@ -35,7 +35,9 @@
    submitType: "new", //  新建 or 编辑
    noteId: '',
    videoChange: true
    videoChange: true,
    startTime: "", //进入页面当前时间
    pauseTime: 0 //暂停时间
  },
  // 格式化笔记时间
  convertTimestamp(timestamp) {
@@ -86,6 +88,9 @@
   * 生命周期函数--监听页面显示
   */
  onShow() {
    this.setData({
      startTime: Date.now()
    })
  },
@@ -93,16 +98,45 @@
   * 生命周期函数--监听页面隐藏
   */
  onHide() {
    this.setData({
      pauseTime: Date.now()
    })
    if (wx.getStorageSync(app.config.tokenKey)) {
      let duration = this.data.pauseTime - this.data.startTime
      this.count(duration)
    }
  },
  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload() {
    this.setData({
      pauseTime: Date.now()
    })
    if (wx.getStorageSync(app.config.tokenKey)) {
      let duration = this.data.pauseTime - this.data.startTime
      this.count(duration)
    }
  },
  count(timeStr) {
    const data = {
      appRefCode: app.config.appRefCode,
      type: 'LearningTime', //统计类型--阅读时长
      data: timeStr + '', //统计内容--时长毫秒
      event: 'LearningTime',
      sysType: 'App'
    }
    //阅读商品的id
    if (this.data.bookId) {
      data.productId = this.data.bookId
    }
    //阅读资源的id
    if (this.data.cmsId) {
      data.cmsItemId = this.data.cmsId
    }
    app.MG.job.newJobWithApiNewEvent(data).then((res) => {})
  },
  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
packageDomain/pages/sampleBookList/applicationForm/index.wxml
@@ -5,7 +5,7 @@
  </t-tabs>
  <view class="page-content">
    <view class="con-bg"></view>
    <view class="content">
    <scroll-view class="scroll content" scroll-y>
      <view class="bookListBox">
        <view class="tips">
          <rich-text space="emsp" nodes="{{description}}" class="content" />
@@ -78,6 +78,6 @@
      <view class="btn-area">
        <button class="submit" bindtap="submit">提交</button>
      </view>
    </view>
    </scroll-view>
  </view>
</view>
packageDomain/pages/sampleBookList/applicationForm/index.wxss
@@ -21,7 +21,6 @@
.content {
  box-sizing: border-box;
  height: calc(100vh - env(safe-area-inset-bottom) - 96rpx);
  overflow-y: auto;
}
.t-tabs__track {
packageDomain/pages/teacherCertification/index.wxml
@@ -1,5 +1,5 @@
<view class="container">
  <view class="content">
  <scroll-view class="scroll content" scroll-y>
    <view class="tips"> 仅限学校本课程任课教师申请;请上传有效在职教师工作证将有助于审核。 </view>
    <view class="body-loading" wx:if="{{skeletonLoding}}">
      <t-loading theme="circular" size="40rpx" class="wrapper" />
@@ -99,7 +99,7 @@
        <button class="submit" bindtap="submit">提交</button>
      </view>
    </view>
  </view>
  </scroll-view>
  <view class="popupBox">
    <t-popup visible="{{protocolShow}}" bind:visible-change="onVisibleChange" placement="center">
      <view class="block">
packageDomain/pages/teacherCertification/index.wxss
@@ -10,7 +10,6 @@
.content {
  height: calc(100vh - env(safe-area-inset-bottom));
  box-sizing: border-box;
  overflow-y: auto;
}
.tips {
@@ -174,7 +173,7 @@
.block {
  position: relative;
  width: 600rpx;
  height: 820rpx;
  height: 600rpx;
  padding: 20rpx 0;
  background: #fff;
  border-radius: 16rpx;
packagePersonal/pages/myOrder/index.js
@@ -263,91 +263,41 @@
      orderNum: orderNum,
    };
    app.MG.store.getOrderByOrderNum(data).then(res => {
      if (res && res.state != "WaitPay") {
        app.MG.store.confirmOrder(data).then(conRes => {
          if (conRes.orderNumber) {
            const resOrderNum = {
              orderNum: conRes.orderNumber,
            };
            if (conRes.payPrice != 0) {
              app.MG.store.makeWeChatPay(resOrderNum).then(payRes => {
                const payVal = JSON.parse(payRes);
                wx.requestPayment({
                  "appId": payVal.appId,
                  "timeStamp": payVal.timeStamp,
                  "nonceStr": payVal.nonceStr,
                  "package": payVal.package,
                  "signType": payVal.signType,
                  "paySign": payVal.paySign,
                  "success": function (res) {
                    if (res.errMsg == 'requestPayment:ok') {
                      that.setData({
                        isPaySuccess: true
                      })
                    }
                    console.log(res, "成功")
                  },
                  "fail": function (res) {
                    console.log(res, "失败")
                  },
                  "complete": function (res) {
                    if (res.errMsg == 'requestPayment:ok') {
                      that.getDataList(false)
                    }
                    if (that.data.isPaySuccess && that.data.isPayComplete) {
                      that.navToBack()
                    }
                  }
      app.MG.store.makeWeChatPay({
          orderNum: res.orderNumber,
          platform: "WeChatAppCustom"
        })
        .then(payRes => {
          const payVal = JSON.parse(payRes);
          wx.requestPayment({
            "appId": payVal.appId,
            "timeStamp": payVal.timeStamp,
            "nonceStr": payVal.nonceStr,
            "package": payVal.package,
            "signType": payVal.signType,
            "paySign": payVal.paySign,
            "success": function (res) {
              if (res.errMsg == 'requestPayment:ok') {
                that.setData({
                  isPaySuccess: true
                })
              });
            } else {
              wx.showToast({
                title: '领取成功',
              })
              // 可添加返回上级
              setTimeout(() => {
                that.navToBack()
              }, 2000);
            }
          }
        });
      } else {
        app.MG.store
          .makeWeChatPay({
            orderNum: orderNum
          })
          .then(payRes => {
            const payVal = JSON.parse(payRes);
            wx.requestPayment({
              "appId": payVal.appId,
              "timeStamp": payVal.timeStamp,
              "nonceStr": payVal.nonceStr,
              "package": payVal.package,
              "signType": payVal.signType,
              "paySign": payVal.paySign,
              "success": function (res) {
                if (res.errMsg == 'requestPayment:ok') {
                  that.setData({
                    isPaySuccess: true
                  })
                }
              },
              "fail": function (res) {
                console.log(res, "失败")
              },
              "complete": function (res) {
                if (res.errMsg == 'requestPayment:ok') {
                  that.setData({
                    isPayComplete: true
                  })
                }
                if (that.data.isPaySuccess && that.data.isPayComplete) {
                  that.navToBack()
                }
              }
            })
          });
      }
            },
            "fail": function (res) {
              console.log(res, "失败")
            },
            "complete": function (res) {
              if (res.errMsg == 'requestPayment:ok') {
                that.setData({
                  isPayComplete: true
                })
              }
              if (that.data.isPaySuccess && that.data.isPayComplete) {
                that.navToBack()
              }
            }
          })
        });
    });
  },
packagePersonal/pages/userSetting/index.js
@@ -1,4 +1,5 @@
const app = getApp()
import SparkMD5 from 'spark-md5'
import tool from "../../../assets/js/toolClass.js";
import FormData from '../../../utils/formdata/index.js';
Page({
@@ -64,7 +65,7 @@
          defaultUser = {
            ...teacherInfos,
            nickName: nickNameData ? JSON.parse(nickNameData.data).nickName : teacherInfos.name,
            icon: nickNameData ? JSON.parse(nickNameData.data).icon : WeChatInfo ? WeChatInfo.icon : '',
            icon: nickNameData ? JSON.parse(nickNameData.data).icon : WeChatInfo.icon,
            userId: res.userId,
            role: 'Teacher',
            roleId: teacherRole.role.id,
@@ -120,72 +121,78 @@
  editIconInfo(e) {
    var that = this;
    wx.chooseMedia({
      // count: 1, // 默认9
      count: 1, // 默认9
      sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
      sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
      success: function (res) {
        // 返回选定照片的本地文件路径列表,tempFilePath也可以作为img标签的src属性显示图片
        tool.getFileMd5(res.tempFiles[0]).then((e) => {
          let formData = new FormData();
          formData.append('Md5', e);
          formData.append('FileName', e);
          formData.append('FileType', res.tempFiles[0].fileType);
          formData.appendFile("file", res.tempFiles[0].tempFilePath);
          const data = formData.getData();
          let _token = wx.getStorageSync(app.config.tokenKey);
          let header = {};
          if (_token == null) {
            header["Authorization"] = `Basic ${Base64.encode(website.clientId + ":" + website.clientSecret)}`;
          } else {
            header["Authorization"] = `Bearer ` + _token;
          }
          new Promise((resolve, reject) => {
            wx.request({
              url: app.config.requestCtx + '/file/api/ApiUpload',
              method: 'POST',
              header: {
                'content-type': data.contentType,
                ...header
              },
              data: data.buffer,
              success(res) {
                if (res.statusCode == 200) {
                  resolve(res.data);
                  if (res.data) {
                    that.setData({
                      'userInfoForm.icon': app.config.requestCtx + `/file/GetPreViewImage?md5=` + e,
                    });
                    let userTypeInfo = {
                      "requests": [{
                        data: JSON.stringify({
                          nickName: that.data.userInfo.nickName,
                          icon: that.data.userInfoForm.icon
                        }),
                        name: '用户昵称头像',
                        type: 'nickName'
                      }]
                    }
                    app.MG.identity.setAppUserInfo(userTypeInfo).then((res) => {
                      if (res) {
                        wx.showToast({
                          title: "修改成功",
                          icon: 'success',
                          duration: 1000,
                        })
                        this.getUserInfo()
                        this.setData({
                          userInfoBox: false,
                        });
        wx.getFileSystemManager().readFile({
          filePath: res.tempFiles[0].tempFilePath, //选择图片返回的相对路径
          // encoding: 'binary', //编码格式
          success: ress => {
            //成功的回调
            let spark = new SparkMD5.ArrayBuffer();
            spark.append(ress.data);
            let md5 = spark.end(false);
            let formData = new FormData();
            formData.append('Md5', md5);
            formData.append('FileName', md5);
            formData.append('FileType', res.tempFiles[0].fileType);
            formData.appendFile("file", res.tempFiles[0].tempFilePath);
            const data = formData.getData();
            let _token = wx.getStorageSync(app.config.tokenKey);
            let header = {};
            if (_token == null) {
              header["Authorization"] = `Basic ${Base64.encode(website.clientId + ":" + website.clientSecret)}`;
            } else {
              header["Authorization"] = `Bearer ` + _token;
            }
            new Promise((resolve, reject) => {
              wx.request({
                url: app.config.requestCtx + '/file/api/ApiUpload',
                method: 'POST',
                header: {
                  'content-type': data.contentType,
                  ...header
                },
                data: data.buffer,
                success(res) {
                  if (res.statusCode == 200) {
                    resolve(res.data);
                    if (res.data) {
                      that.setData({
                        'userInfoForm.icon': app.config.requestCtx + `/file/GetPreViewImage?md5=` + md5,
                      });
                      let userTypeInfo = {
                        "requests": [{
                          data: JSON.stringify({
                            nickName: that.data.userInfo.nickName,
                            icon: that.data.userInfoForm.icon
                          }),
                          name: '用户昵称头像',
                          type: 'nickName'
                        }]
                      }
                    })
                      app.MG.identity.setAppUserInfo(userTypeInfo).then((res) => {
                        if (res) {
                          wx.showToast({
                            title: "修改成功",
                            icon: 'success',
                            duration: 1000,
                          })
                          that.getUserInfo()
                          that.setData({
                            userInfoBox: false,
                          });
                        }
                      })
                    }
                  } else {
                    reject('运行时错误,请稍后再试');
                  }
                } else {
                  reject('运行时错误,请稍后再试');
                }
              }
              })
            })
          })
          }
        })
      }
    });
@@ -430,6 +437,12 @@
    }
  },
  onCloseProtocol() {
    this.setData({
      userInfoBox: false,
    });
  },
  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
packagePersonal/pages/userSetting/index.wxml
@@ -16,21 +16,21 @@
  <view class="itemList">
    <view class="label">手机号码</view>
    <view class="content" data-info="{{'phone'}}" bindtap="editUserInfo">{{userInfo.phoneNumber || '未绑定手机号'}}</view>
    <t-icon name="chevron-right" size="40rpx" color="#C2C2C2" />
    <t-icon name="chevron-right" size="40rpx" color="#C2C2C2" data-info="{{'phone'}}" bindtap="editUserInfo" />
  </view>
  <view class="itemList">
    <view class="label">邮箱</view>
    <view class="content" data-info="{{'email'}}" bindtap="editUserInfo">{{userInfo.Email}}</view>
    <t-icon name="chevron-right" size="40rpx" color="#C2C2C2" />
    <t-icon name="chevron-right" size="40rpx" color="#C2C2C2" data-info="{{'email'}}" bindtap="editUserInfo" />
  </view>
  <t-popup visible="{{userInfoBox}}" bind:visible-change="onVisibleChange" placement="bottom">
  <t-popup visible="{{userInfoBox}}" bind:visible-change="onVisibleChange" placement="center">
    <view class="block">
      <view class="body">
        <view class="from-item" wx:if="{{editType == 'nickName'}}">
          <view class="label"> 昵称: </view>
          <view class="item-content">
            <view class="inputBox1">
              <t-input placeholder="输入用户名" borderless value="{{userInfoForm.nickName}}" bindchange="onNameInput" />
              <t-input placeholder="输入昵称" borderless value="{{userInfoForm.nickName}}" bindchange="onNameInput" />
            </view>
          </view>
        </view>
@@ -85,9 +85,10 @@
          </view>
        </view>
      </view>
    </view>
    <view class="footer">
      <button class="submit" bindtap="confirmInfo">确定</button>
      <view class="footer">
        <button class="submit" bindtap="confirmInfo">确定</button>
      </view>
      <t-icon t-class="close-btn" name="close-circle" size="32" color="#fff" bind:tap="onCloseProtocol" />
    </view>
  </t-popup>
</view>
packagePersonal/pages/userSetting/index.wxss
@@ -51,26 +51,21 @@
.block .body {
  padding: 40rpx;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}
.block .body .from-item {
  margin-bottom: 20rpx;
  display: flex;
  align-items: center;
}
.block .body .from-item .label {
  width: 200rpx;
  height: 72rpx;
  line-height: 72rpx;
  min-width: 100rpx;
  height: 60rpx;
  line-height: 60rpx;
  font-size: 32rpx;
}
.block .body .from-item .item-content {
  padding: 10rpx;
  flex: 1;
  display: flex;
}
@@ -82,17 +77,35 @@
}
.inputBox1 .t-input {
  width: 440rpx !important;
  width: 380rpx !important;
}
.block {
  position: relative;
  width: 600rpx;
  min-height: 500rpx;
  padding: 20rpx 0;
  background: #fff;
  border-radius: 16rpx;
}
.block .body {
  min-height: 280rpx;
}
.block .body .inputBox {
  width: 250rpx;
  width: 300rpx;
  height: 72rpx;
  border: 2rpx solid #D9D9D9;
}
.t-input {
  padding: 10rpx !important;
}
.t-input__placeholder {
  font-size: 28rpx !important;
}
.imgCode {
@@ -125,4 +138,11 @@
  background: #ff6c00;
  color: #fff;
  border-radius: 50rpx;
}
.close-btn {
  position: absolute;
  left: 50%;
  margin-left: -32rpx;
  bottom: calc(-1 * (48rpx + 64rpx));
}
pages/home/home.js
@@ -118,13 +118,15 @@
    })
  },
  navToActivityDetail(e) {
    console.log(item)
    let {
      info
    } = e.currentTarget.dataset
    wx.navigateTo({
      url: info.link,
    });
    console.log(info)
    if (info.link) {
      wx.navigateTo({
        url: info.link,
      });
    }
  },
  loadHomePage() {
@@ -247,6 +249,9 @@
  },
  tabChangeHandle(item) {
    let info = this.data.courseTypeList[item.detail.value]
    this.setData({
      courseList: []
    })
    this.getCourseList(info)
  },
  //图书服务分类
pages/personalCenter/index.wxss
@@ -149,6 +149,7 @@
  background: #fff;
  border-top-left-radius: 16rpx;
  border-top-right-radius: 16rpx;
  margin-bottom: 100rpx;
}
.block .header {
pages/student/index.js
@@ -31,6 +31,7 @@
   * 生命周期函数--监听页面加载
   */
  onLoad() {
    this.getStaticsSum();
    this.getDataList(false);
  },
@@ -50,6 +51,37 @@
        active: 2
      })
    }
  },
  getStaticsSum() {
    const data = {
      start: 0,
      size: 10,
      filterList: [{
        value: "LearningTime",
        field: "type",
      }],
    };
    app.MG.app.getStaticsSum(data).then((res) => {
      if (res) {
        let minutes = Number(res) / (1000 * 60)
        let hours = Number(res) / (1000 * 60 * 60)
        if (minutes > 0 && minutes < 60) {
          this.setData({
            learningDuration: Math.round(minutes) + "分钟"
          })
        } else if (minutes > 60) {
          this.setData({
            learningDuration: Math.round(hours) + "小时"
          })
        } else {
          this.setData({
            learningDuration: "0小时"
          })
        }
      }
    })
  },
  tabClick(item) {
pages/student/index.wxml
@@ -3,7 +3,7 @@
    <view class="boxStyle">
      <view class="box-item">
        <view>累计学习时长</view>
        <view class="result"><text class="num">{{learningDuration}}</text>小时</view>
        <view class="result"><text class="num">{{learningDuration}}</text></view>
      </view>
      <view class="box-item">
        <view>上一次登陆时间</view>