litian
2024-04-08 e6a156a6a8bb6f1d3a17e9310269f53c56e10b42
问题修改
11个文件已修改
146 ■■■■ 已修改文件
assets/js/config.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/detail/index.js 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageDomain/pages/sampleBookList/applicationForm/index.js 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageDomain/pages/sampleBookList/index.js 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageDomain/pages/sampleBookList/index.json 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packagePersonal/pages/downloads/index.js 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packagePersonal/pages/feedBack/index.js 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packagePersonal/pages/feedBack/index.wxml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
packagePersonal/pages/myMassage/index.js 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packagePersonal/pages/sampleBooks/index.js 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/personalCenter/feedBackSubmit/index.js 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
assets/js/config.js
@@ -3,7 +3,7 @@
export const requestCtx = "https://jsek.bnuic.com" // 请求地址
export const appId = 3;
// export const epubUrl = "http://182.92.203.7:3007/epubReadMobile/";
export const epubUrl = "http://jsysf.bnuic.com/epubReadMobile/#/";
export const epubUrl = "https://jsek.bnuic.com/epubReadMobile/#/";
export const pdfUrl = "http://182.92.203.7:3007/pdfRead/"
export const requestTimeOut = 300000; // 请求超时时间
export const tokenKey = "jsek-token";
packageBookService/pages/bookServices/detail/index.js
@@ -1928,14 +1928,7 @@
          });
          return false;
        }
        if (this.data.paperBookList.length >= 2) {
          wx.showToast({
            title: "每次最多只可申请2本样书",
            icon: "none",
            duration: 1000,
          });
          return false;
        }
        let isHas = this.data.paperBookList.find(
          (pitem) => pitem.id == this.data.bookDetail.id
        );
@@ -1947,6 +1940,14 @@
          });
          return false;
        }
        if (this.data.paperBookList.length >= 2) {
          wx.showToast({
            title: "每次最多只可申请2本样书",
            icon: "none",
            duration: 1000,
          });
          return false;
        }
        this.addBookFun(this.data.bookDetail, "pBook");
      } else {
        wx.showModal({
packageDomain/pages/sampleBookList/applicationForm/index.js
@@ -46,6 +46,18 @@
          'contactInfo.phone': JSON.parse(this.data.userInfo.data).phone,
          'contactInfo.detailedAddress': JSON.parse(this.data.userInfo.data).detailedAddress,
        })
      } else {
        wx.showModal({
          title: '尊敬的用户,您好!', //提示的标题
          content: '请先进行教师认证?', //提示的内容
          success: function (res) {
            if (res.confirm) {
              wx.navigateTo({
                url: "/packageDomain/pages/teacherCertification/index",
              });
            }
          }
        })
      }
      if (wx.getStorageSync("paperBookList")) {
        this.setData({
packageDomain/pages/sampleBookList/index.js
@@ -420,6 +420,8 @@
        author: [],
        isbn: [],
        publicationDate: [],
        pdf: [],
        protectedEpub: [],
        isApplyBook: [],
        'isApplyBook>': ['1'],
        ...searchObj,
@@ -495,6 +497,9 @@
          })
        } else {
          that.setData({
            bookList: [],
            pageTotalCount: 0,
            bottomLoading: false,
            skeletonLoding: false,
            loading: false
          })
@@ -807,14 +812,55 @@
  },
  //选择电子样书
  onChangeElectron(e) {
  async onChangeElectron(e) {
    const item = e.currentTarget.dataset.book;
    console.log(item)
    const index = this.data.bookList.findIndex(citem => citem.id == item.id)
    let role = this.data.userInfo != null ? this.data.userInfo.role : null
    if (role && role == 'Teacher') {
      // 是教师
      if (e.detail.checked) {
        // 点击选中
        //商品有无电子书
        const obj = {
          path: '*',
          queryType: 'SubProduct',
          sort: {
            type: 'Desc',
            field: 'CreateDate'
          },
          paging: {
            start: 0,
            size: 1
          },
          mainProductId: item.id,
          fields: {
            bookshelf_pdf: [],
            bookshelf_protectedEpub: [],
          }
        }
        const res = await app.MG.store.getProductList(obj)
        if (res.datas.length > 0) {
          if (!res.datas[0].bookshelf_pdf && !res.datas[0].bookshelf_protectedEpub) {
            wx.showToast({
              title: "暂无电子书文件,请联系管理员!",
              icon: 'none',
              duration: 1000,
            })
            return false;
          }
        } else {
          if (!item.pdf && !item.protectedEpub) {
            wx.showToast({
              title: "暂无电子书文件,请联系管理员!",
              icon: 'none',
              duration: 1000,
            })
            return false;
          }
        }
        //申请次数
        if (this.data.ebookCount == 0) {
          wx.showToast({
            title: "您的电子样书申请次数已用尽,若要继续,请联系管理员!",
packageDomain/pages/sampleBookList/index.json
@@ -11,6 +11,7 @@
    "t-search": "tdesign-miniprogram/search/search",
    "t-checkbox": "tdesign-miniprogram/checkbox/checkbox",
    "t-loading": "tdesign-miniprogram/loading/loading",
    "t-pull-down-refresh": "tdesign-miniprogram/pull-down-refresh/pull-down-refresh"
    "t-pull-down-refresh": "tdesign-miniprogram/pull-down-refresh/pull-down-refresh",
    "t-empty": "tdesign-miniprogram/empty/empty"
  }
}
packagePersonal/pages/downloads/index.js
@@ -67,6 +67,8 @@
            })
          } else {
            this.setData({
              list: [],
              pageTotalCount: 0,
              skeletonLoding: false,
            })
          }
packagePersonal/pages/feedBack/index.js
@@ -9,8 +9,7 @@
  data: {
    active: 0,
    activeName: "bookOpinion",
    tabList: [
      {
    tabList: [{
        label: '图书建议',
        key: 0,
        value: 'bookOpinion'
@@ -80,15 +79,15 @@
  getDataList(isReachBottom) {
    app.MG.ugc.getTopicMessageList({
      appRefCode: app.config.appRefCode,
      topicIdOrRefCode: this.data.topicIdOrRefCode,
      start: this.data.page * this.data.limit - this.data.limit,
      size: this.data.limit,
      sort: {
        type: "Desc",
        field: "CreateDate"
      }
    })
        appRefCode: app.config.appRefCode,
        topicIdOrRefCode: this.data.topicIdOrRefCode,
        start: this.data.page * this.data.limit - this.data.limit,
        size: this.data.limit,
        sort: {
          type: "Desc",
          field: "CreateDate"
        }
      })
      .then(res => {
        try {
          if (res.datas.length > 0) {
@@ -112,6 +111,8 @@
            })
          } else {
            this.setData({
              list: [],
              pageTotalCount: 0,
              skeletonLoding: false,
            })
          }
packagePersonal/pages/feedBack/index.wxml
@@ -17,7 +17,7 @@
        <view wx:if="{{activeName == 'bookOpinion'}}" class="listBox">
          <view class="content-item" wx:for="{{list}}" wx:for-item="item" wx:for-index="index" wx:key="index">
            <view class="icon">
              <t-image src="{{item.content.icon}}" mode="aspectFill" class="img" />
              <t-image src="{{item.content.icon ? item.content.icon : '/static/images/default-book-img.png'}}" mode="aspectFill" class="img" />
            </view>
            <view class="item-con">
              <view class="titleBox">
packagePersonal/pages/myMassage/index.js
@@ -29,14 +29,14 @@
  getDataList(isReachBottom) {
    app.MG.app.getAppMessageList({
      appRefCode: app.config.appRefCode,
      start: this.data.page * this.data.limit - this.data.limit,
      size: this.data.limit,
      sort: {
        type: "Desc",
        field: "CreateDate"
      }
    })
        appRefCode: app.config.appRefCode,
        start: this.data.page * this.data.limit - this.data.limit,
        size: this.data.limit,
        sort: {
          type: "Desc",
          field: "CreateDate"
        }
      })
      .then(res => {
        try {
          if (res.datas.length > 0) {
@@ -59,6 +59,8 @@
            })
          } else {
            this.setData({
              list: [],
              pageTotalCount: 0,
              skeletonLoding: false,
            })
          }
packagePersonal/pages/sampleBooks/index.js
@@ -143,6 +143,8 @@
          })
        } else {
          this.setData({
            list: [],
            pageTotalCount: 0,
            skeletonLoding: false,
            loading: false
          })
pages/personalCenter/feedBackSubmit/index.js
@@ -68,11 +68,18 @@
    const {
      phoneError
    } = this.data;
    const isPhoneNumber = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/.test(e.detail.value);
    if (phoneError === isPhoneNumber) {
    if (e.detail.value) {
      const isPhoneNumber = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/.test(e.detail.value);
      if (phoneError === isPhoneNumber) {
        this.setData({
          phoneError: !isPhoneNumber,
          mannder: e.detail.value,
        });
      }
    } else {
      this.setData({
        phoneError: !isPhoneNumber,
        mannder: e.detail.value,
        phoneError: false,
        mannder: ''
      });
    }
  },
@@ -97,7 +104,7 @@
      if (this.data.mannder.replace(/^\s*|\s*$/g, "") == '') {
        this.data.lock = true;
        wx.showToast({
          title: "反馈内容不能为空",
          title: "联系方式不能为空",
          icon: 'none',
          duration: 1000
        })