litian
2024-04-07 9b95dadd2e9dc16c2f03468333d1a4df72740526
个人中心
6个文件已修改
114 ■■■■ 已修改文件
assets/js/config.js 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/detail/index.js 42 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packagePersonal/pages/userSetting/index.js 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packagePersonal/pages/userSetting/index.wxml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/home/home.js 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/home/home.wxml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
assets/js/config.js
@@ -1,9 +1,9 @@
export const requestCtx = "http://182.92.203.7:3001"; // 请求地址
export const appId = 27;
// 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 requestCtx = "http://182.92.203.7:3001"; // 请求地址
// export const appId = 27;
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 pdfUrl = "http://182.92.203.7:3007/pdfRead/"
export const requestTimeOut = 300000; // 请求超时时间
export const tokenKey = "jsek-token";
packageBookService/pages/bookServices/detail/index.js
@@ -954,8 +954,7 @@
        remarks: "电子书",
        requests: [{
          saleMethodId: this.data.bookItemDetail.defaultSaleMethodId ?
            this.data.bookItemDetail.defaultSaleMethodId :
            this.data.bookDetail.defaultSaleMethodId,
            this.data.bookItemDetail.defaultSaleMethodId : this.data.bookDetail.defaultSaleMethodId,
          count: 1,
        }, ],
      };
@@ -1848,14 +1847,7 @@
          });
          return false;
        }
        if (this.data.electronicBookList.length >= 2) {
          wx.showToast({
            title: "每次最多只可申请2本样书",
            icon: "none",
            duration: 1000,
          });
          return false;
        }
        let isHas = this.data.electronicBookList.find(
          (eitem) => eitem.id == this.data.bookDetail.id
        );
@@ -1873,6 +1865,14 @@
        if (isApply) {
          wx.showToast({
            title: "该书已申请!",
            icon: "none",
            duration: 1000,
          });
          return false;
        }
        if (this.data.electronicBookList.length >= 2) {
          wx.showToast({
            title: "每次最多只可申请2本样书",
            icon: "none",
            duration: 1000,
          });
@@ -1917,6 +1917,17 @@
          });
          return false;
        }
        let isApply = this.data.alreadyPaperBookList.find(
          (pitem) => pitem.id == this.data.bookDetail.id
        );
        if (isApply) {
          wx.showToast({
            title: "该书已申请!",
            icon: "none",
            duration: 1000,
          });
          return false;
        }
        if (this.data.paperBookList.length >= 2) {
          wx.showToast({
            title: "每次最多只可申请2本样书",
@@ -1931,17 +1942,6 @@
        if (isHas) {
          wx.showToast({
            title: "该书已在清单列表中",
            icon: "none",
            duration: 1000,
          });
          return false;
        }
        let isApply = this.data.alreadyPaperBookList.find(
          (pitem) => pitem.id == this.data.bookDetail.id
        );
        if (isApply) {
          wx.showToast({
            title: "该书已申请!",
            icon: "none",
            duration: 1000,
          });
packagePersonal/pages/userSetting/index.js
@@ -231,9 +231,11 @@
      if (emailError === isPhoneNumber) {
        this.setData({
          emailError: !isPhoneNumber,
          "userInfoForm.email": e.detail.value,
        });
      }
      this.setData({
        "userInfoForm.email": e.detail.value,
      });
    } else {
      this.setData({
        emailError: false,
@@ -331,8 +333,6 @@
              icon: 'none',
              duration: 1000
            })
            // 开启短信验证倒计时
            this.getSecond(60)
          } else {
            wx.showToast({
              title: '邮箱验证码发送失败',
@@ -353,6 +353,14 @@
  confirmInfo() {
    if (this.data.editType == 'nickName') {
      if (!this.data.userInfoForm.nickName) {
        wx.showToast({
          title: '请输入昵称',
          icon: 'none',
          duration: 1000
        })
        return false;
      }
      let userTypeInfo = {
        "requests": [{
          data: JSON.stringify({
@@ -378,6 +386,22 @@
      })
    } else if (this.data.editType == 'phone') {
      if (!this.data.userInfoForm.phone) {
        wx.showToast({
          title: '请输入手机号',
          icon: 'none',
          duration: 1000
        })
        return false;
      }
      if (!this.data.userInfoForm.code) {
        wx.showToast({
          title: '请输入验证码',
          icon: 'none',
          duration: 1000
        })
        return false;
      }
      let query = {
        phoneNumber: this.data.userInfoForm.phone,
        phoneCaptcha: this.data.userInfoForm.code
@@ -389,12 +413,18 @@
            icon: 'none',
            duration: 1000
          })
          this.setData({
            countDown: 0,
          });
        } else if (res == '此手机号码已被其它账号绑定') {
          wx.showToast({
            title: res + ',请更换其他手机号。',
            icon: 'none',
            duration: 1000
          })
          this.setData({
            countDown: 0,
          });
        } else {
          wx.showToast({
            title: res,
@@ -409,6 +439,22 @@
        }
      })
    } else if (this.data.editType == 'email') {
      if (!this.data.userInfoForm.email) {
        wx.showToast({
          title: '请输入邮箱',
          icon: 'none',
          duration: 1000
        })
        return false;
      }
      if (!this.data.userInfoForm.code) {
        wx.showToast({
          title: '请输入验证码',
          icon: 'none',
          duration: 1000
        })
        return false;
      }
      let query = {
        eMail: this.data.userInfoForm.email,
        captcha: this.data.userInfoForm.code
packagePersonal/pages/userSetting/index.wxml
@@ -69,7 +69,7 @@
              <t-input placeholder="输入短信验证码" borderless value="{{userInfoForm.code}}" type="number" bindchange="onCodeInput" />
            </view>
            <view class="code">
              <button class="btn" bindtap="getPhoneCode">{{countDown > 0 ? countDown : '获取短信验证码'}}</button>
              <button class="btn" bindtap="getPhoneCode">{{countDown > 0 ? '验证码(' + countDown + 's)' : '获取短信验证码'}}</button>
            </view>
          </view>
        </view>
pages/home/home.js
@@ -75,7 +75,9 @@
  onPullDownRefresh() {
    this.setData({
      'baseRefresh.value': true,
      isWhite: false
    })
    this.getBannerList();
    this.init();
  },
  init() {
@@ -567,11 +569,11 @@
  },
  onScrollToTop(e) {
    this.setData({
      isWhite: e.detail.scrollTop > 50 ? true : false
    })
  },
  onRetrievalPage() {
    // 首页测试登录功能,后续注释
pages/home/home.wxml
@@ -121,7 +121,7 @@
            <view wx:for="{{booksList}}" wx:for-item="item" wx:for-index="index" wx:key="index" class="booksListItemBox">
              <view class="listItem" bind:tap="goDetail" data-book="{{item}}">
                <view class="specialSubject-img">
                  <image src="{{item.icon}}" mode="aspectFit" class="img" />
                  <image src="{{item.icon ? item.icon : '/static/images/default-book-img.png'}}" mode="aspectFit" class="img" aria-label="{{item.name}}" />
                </view>
                <view class="body-info">
                  <view class="name">{{item.name}}</view>