闫增涛
2024-02-29 0d1323fb39db5e8d3b124e61303bde1b1352b887
feat(daima代码合并): 和宁

asdas创建

BREAKING CHANGE: 代码sda
4个文件已删除
19个文件已修改
116个文件已添加
3591 ■■■■■ 已修改文件
app.js 补丁 | 查看 | 原始文档 | blame | 历史
app.json 45 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
assets/js/config.js 补丁 | 查看 | 原始文档 | blame | 历史
assets/js/middleGround/api/identity.js 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
assets/js/middleGround/api/store.js 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
assets/js/userAction.js 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
assets/request/index.js 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
custom-tab-bar/data.js 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
custom-tab-bar/index.json 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
custom-tab-bar/index.wxml 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
custom-tab-bar/index.wxss 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/bookExhibitionDetails/index.js 136 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/bookExhibitionDetails/index.json 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/bookExhibitionDetails/index.wxml 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/bookExhibitionDetails/index.wxss 86 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/bookExhibitionList/img/banner.png 补丁 | 查看 | 原始文档 | blame | 历史
pages/bookExhibitionList/index.js 308 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/bookExhibitionList/index.json 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/bookExhibitionList/index.wxml 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/bookExhibitionList/index.wxss 102 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/home/home.js 310 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/home/home.json 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/home/home.wxml 178 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/home/home.wxss 295 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/personalCenter/activateProduct/index.js 66 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/personalCenter/activateProduct/index.json 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/personalCenter/activateProduct/index.wxml 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/personalCenter/activateProduct/index.wxss 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/personalCenter/certificate/index.js 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/personalCenter/certificate/index.json 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/personalCenter/certificate/index.wxml 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/personalCenter/certificate/index.wxss 补丁 | 查看 | 原始文档 | blame | 历史
pages/personalCenter/components/user-center-card/index.js 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/personalCenter/components/user-center-card/index.json 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/personalCenter/components/user-center-card/index.wxml 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/personalCenter/components/user-center-card/index.wxss 60 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/personalCenter/downloads/index.js 66 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/personalCenter/downloads/index.json 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/personalCenter/downloads/index.wxml 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/personalCenter/downloads/index.wxss 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/personalCenter/feedBack/index.js 66 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/personalCenter/feedBack/index.json 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/personalCenter/feedBack/index.wxml 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/personalCenter/feedBack/index.wxss 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/personalCenter/feedBackSubmit/index.js 66 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/personalCenter/feedBackSubmit/index.json 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/personalCenter/feedBackSubmit/index.wxml 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/personalCenter/feedBackSubmit/index.wxss 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/personalCenter/index.js 209 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/personalCenter/index.json 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/personalCenter/index.wxml 70 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/personalCenter/index.wxss 138 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/personalCenter/myCollection/index.js 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/personalCenter/myCollection/index.json 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/personalCenter/myCollection/index.wxml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/personalCenter/myCollection/index.wxss 补丁 | 查看 | 原始文档 | blame | 历史
pages/personalCenter/myMassage/index.js 156 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/personalCenter/myMassage/index.json 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/personalCenter/myMassage/index.wxml 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/personalCenter/myMassage/index.wxss 60 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/personalCenter/myMassage/massageDetail/index.js 79 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/personalCenter/myMassage/massageDetail/index.json 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/personalCenter/myMassage/massageDetail/index.wxml 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/personalCenter/myMassage/massageDetail/index.wxss 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/personalCenter/myOrder/index.js 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/personalCenter/myOrder/index.json 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/personalCenter/myOrder/index.wxml 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/personalCenter/myOrder/index.wxss 补丁 | 查看 | 原始文档 | blame | 历史
pages/personalCenter/publishBooks/index.js 66 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/personalCenter/publishBooks/index.json 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/personalCenter/publishBooks/index.wxml 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/personalCenter/publishBooks/index.wxss 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/personalCenter/sampleBooks/index.js 66 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/personalCenter/sampleBooks/index.json 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/personalCenter/sampleBooks/index.wxml 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/personalCenter/sampleBooks/index.wxss 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/teacherCertification/index.js 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/teacherCertification/index.json 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/teacherCertification/index.wxml 68 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/teacherCertification/index.wxss 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/testLogin/index.js 132 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/testLogin/index.json 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/testLogin/index.wxml 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/testLogin/index.wxss 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/usercenter/index.wxss 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
project.config.json 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
services/home/home.js 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
static/images/bookExhibitionDetails/Parting.png 补丁 | 查看 | 原始文档 | blame | 历史
static/images/bookExhibitionDetails/shuzha.png 补丁 | 查看 | 原始文档 | blame | 历史
static/images/home/1.png 补丁 | 查看 | 原始文档 | blame | 历史
static/images/home/Home-click@2x.png 补丁 | 查看 | 原始文档 | blame | 历史
static/images/home/Home@2x.png 补丁 | 查看 | 原始文档 | blame | 历史
static/images/home/cart-click@2x.png 补丁 | 查看 | 原始文档 | blame | 历史
static/images/home/cart@2x.png 补丁 | 查看 | 原始文档 | blame | 历史
static/images/home/click-icon@2x.png 补丁 | 查看 | 原始文档 | blame | 历史
static/images/home/home-bg@2x.png 补丁 | 查看 | 原始文档 | blame | 历史
static/images/home/home-cart.png 补丁 | 查看 | 原始文档 | blame | 历史
static/images/home/jiaoshirenzheng@2x.png 补丁 | 查看 | 原始文档 | blame | 历史
static/images/home/jingxuankecheng.png 补丁 | 查看 | 原始文档 | blame | 历史
static/images/home/jingxuankecheng@2x.png 补丁 | 查看 | 原始文档 | blame | 历史
static/images/home/learn-click@2x.png 补丁 | 查看 | 原始文档 | blame | 历史
static/images/home/learn@2x.png 补丁 | 查看 | 原始文档 | blame | 历史
static/images/home/my-click@2x.png 补丁 | 查看 | 原始文档 | blame | 历史
static/images/home/my@2x.png 补丁 | 查看 | 原始文档 | blame | 历史
static/images/home/paihangbang@2x.png 补丁 | 查看 | 原始文档 | blame | 历史
static/images/home/service-click@2x.png 补丁 | 查看 | 原始文档 | blame | 历史
static/images/home/service@2x.png 补丁 | 查看 | 原始文档 | blame | 历史
static/images/home/shumuxiazai@2x.png 补丁 | 查看 | 原始文档 | blame | 历史
static/images/home/shuzijiaocai.png 补丁 | 查看 | 原始文档 | blame | 历史
static/images/home/shuzijiaocai1@2x.png 补丁 | 查看 | 原始文档 | blame | 历史
static/images/home/shuzijiaocai@2x.png 补丁 | 查看 | 原始文档 | blame | 历史
static/images/home/shuzikecheng@2x.png 补丁 | 查看 | 原始文档 | blame | 历史
static/images/home/shuziyuedu1@2x.png 补丁 | 查看 | 原始文档 | blame | 历史
static/images/home/shuziyuedu@2x.png 补丁 | 查看 | 原始文档 | blame | 历史
static/images/home/tushufuwu.png 补丁 | 查看 | 原始文档 | blame | 历史
static/images/home/tushufuwu@2x.png 补丁 | 查看 | 原始文档 | blame | 历史
static/images/home/xianshangshuzhan@2x.png 补丁 | 查看 | 原始文档 | blame | 历史
static/images/home/xueshuzhuzuo@2x.png 补丁 | 查看 | 原始文档 | blame | 历史
static/images/home/yangshushenqing@2x.png 补丁 | 查看 | 原始文档 | blame | 历史
static/images/home/zhuantitaolun.png 补丁 | 查看 | 原始文档 | blame | 历史
static/images/home/zhuantitaolun1@2x.png 补丁 | 查看 | 原始文档 | blame | 历史
static/images/home/zhuantitaolun@2x.png 补丁 | 查看 | 原始文档 | blame | 历史
static/images/home/zhutichuban@2x.png 补丁 | 查看 | 原始文档 | blame | 历史
static/images/home/zuoxia-p@2x.png 补丁 | 查看 | 原始文档 | blame | 历史
static/images/personal/about.png 补丁 | 查看 | 原始文档 | blame | 历史
static/images/personal/certificate.png 补丁 | 查看 | 原始文档 | blame | 历史
static/images/personal/chushu.png 补丁 | 查看 | 原始文档 | blame | 历史
static/images/personal/contact.png 补丁 | 查看 | 原始文档 | blame | 历史
static/images/personal/download.png 补丁 | 查看 | 原始文档 | blame | 历史
static/images/personal/feedback.png 补丁 | 查看 | 原始文档 | blame | 历史
static/images/personal/jihuo.png 补丁 | 查看 | 原始文档 | blame | 历史
static/images/personal/my-bg.png 补丁 | 查看 | 原始文档 | blame | 历史
static/images/personal/notification.png 补丁 | 查看 | 原始文档 | blame | 历史
static/images/personal/notification1.png 补丁 | 查看 | 原始文档 | blame | 历史
static/images/personal/order.png 补丁 | 查看 | 原始文档 | blame | 历史
static/images/personal/setting.png 补丁 | 查看 | 原始文档 | blame | 历史
static/images/personal/upload.png 补丁 | 查看 | 原始文档 | blame | 历史
static/images/personal/wodeshoucang.png 补丁 | 查看 | 原始文档 | blame | 历史
static/images/personal/yangshushenqing.png 补丁 | 查看 | 原始文档 | blame | 历史
app.js
app.json
@@ -3,6 +3,9 @@
    "pages/home/home",
    "pages/bookServices/assort/index",
    "pages/bookServices/detail/index",
    "pages/bookServices/list/index",
    "pages/bookExhibitionList/index",
    "pages/bookExhibitionDetails/index",
    "pages/usercenter/index",
    "pages/usercenter/person-info/index",
    "pages/usercenter/address/list/index",
@@ -30,7 +33,21 @@
    "pages/order/fill-tracking-no/index",
    "pages/order/delivery-detail/index",
    "pages/order/invoice/index",
    "pages/usercenter/name-edit/index"
    "pages/usercenter/name-edit/index",
    "pages/teacherCertification/index",
    "pages/personalCenter/index",
    "pages/personalCenter/myOrder/index",
    "pages/personalCenter/myCollection/index",
    "pages/personalCenter/myMassage/index",
    "pages/personalCenter/myMassage/massageDetail/index",
    "pages/personalCenter/feedBack/index",
    "pages/personalCenter/feedBackSubmit/index",
    "pages/personalCenter/certificate/index",
    "pages/personalCenter/publishBooks/index",
    "pages/personalCenter/sampleBooks/index",
    "pages/personalCenter/downloads/index",
    "pages/personalCenter/activateProduct/index",
    "pages/testLogin/index"
  ],
  "tabBar": {
    "custom": true,
@@ -41,27 +58,39 @@
    "list": [
      {
        "pagePath": "pages/home/home",
        "text": "首页"
        "text": "首页",
        "iconPath": "/static/images/home/Home@2x.png",
        "selectedIconPatn": "/static/images/home/Home-click@2x.png"
      },
      {
        "pagePath": "pages/bookServices/assort/index",
        "text": "图书服务"
        "text": "图书服务",
        "iconPath": "/static/images/home/service@2x.png",
        "selectedIconPatn": "/static/images/home/service-click@2x.png"
      },
      {
        "pagePath": "pages/goods/category/index",
        "text": "学习"
        "text": "学习",
        "iconPath": "/static/images/home/learn@2x.png",
        "selectedIconPatn": "/static/images/home/learn-click@2x.png"
      },
      {
        "pagePath": "pages/cart/index",
        "text": "购物车"
        "text": "购物车",
        "iconPath": "/static/images/home/cart@2x.png",
        "selectedIconPatn": "/static/images/home/cart-click@2x.png"
      },
      {
        "pagePath": "pages/usercenter/index",
        "text": "我的"
        "pagePath": "pages/personalCenter/index",
        "text": "我的",
        "iconPath": "/static/images/home/my@2x.png",
        "selectedIconPatn": "/static/images/home/my-click@2x.png"
      }
    ]
  },
  "requiredPrivateInfos": ["chooseAddress"],
  "requiredPrivateInfos": [
    "chooseAddress"
  ],
  "usingComponents": {},
  "window": {
    "backgroundTextStyle": "light",
assets/js/config.js
assets/js/middleGround/api/identity.js
@@ -123,6 +123,15 @@
    });
  },
  //检查微信小程序是否注册
  checkWeChatAppAccount(data) {
    return request({
      url: "/identity/api/CheckWeChatAppAccount",
      method: "post",
      data,
    });
  },
  // 通过手机号重置密码
  changePasswordByMobilePhone(data) {
@@ -159,6 +168,13 @@
      data,
    });
  },
  loginByWeChatAppCode(data) {
    return request({
      url: "/identity/api/LoginByWeChatAppCode",
      method: "post",
      data,
    });
  },
  // 获取邮箱验证码
  getEmailCode(data) {
assets/js/middleGround/api/store.js
@@ -301,7 +301,10 @@
        ]
      })
    }
    let token = wx.getStorageSync(tokenKey) ? wx.getStorageSync(tokenKey) : '';
    let url = token ? '/store/api/ApiQueryProductByAppUser' : '/store/api/ApiQueryProduct'
    return request({
      url: url,
assets/js/userAction.js
@@ -1,5 +1,4 @@
import config from "@/assets/js/config.js";
import config from "./config.js";
import jobApi from "./middleGround/api/job"; // newJobWithNewView // newSession,
export function setSessionGuid(type, id) {
@@ -34,7 +33,7 @@
  };
  jobApi.newSession(params).then(res => {
    storage.set("sessionGuid", res, 30);
    wx.setStorageSync("sessionGuid", res);
    setNewView(type, id);
  });
}
@@ -112,13 +111,12 @@
}
export function setNewView(type, id) {
  if (!sessionStorage.getItem("sessionGuid")) {
  if (!wx.getStorageSync("sessionGuid")) {
    setSessionGuid(type, id);
  }
  const sessionGuid = sessionStorage.getItem("sessionGuid");
  const fromPath = sessionStorage.getItem("fromPath");
  const toPath = sessionStorage.getItem("toPath");
  const sessionGuid = wx.getStorageSync("sessionGuid");
  const fromPath = wx.getStorageSync("fromPath");
  const toPath = wx.getStorageSync("toPath");
  if (sessionGuid) {
    let params = {
      sessionGuid: sessionGuid,
assets/request/index.js
@@ -1,6 +1,6 @@
import config from "../js/config"
let clearStorage = false;
let timer = null;
const request = (params) => {
  let fullUrl = `${config.requestCtx}${params.url}`
  let token = wx.getStorageSync(config.tokenKey) ? wx.getStorageSync(config.tokenKey) : ''
@@ -38,7 +38,7 @@
            }
            currentUrl = JSON.stringify(currentUrl)
            wx.reLaunch({
              url: urlargs ? '/pages/index/index?backUrl=' + encodeURIComponent(currentUrl) : '/pages/index/index'
              url: urlargs ? '/pages/home/home?backUrl=' + encodeURIComponent(currentUrl) : '/pages/home/home'
            })
          }
        } else {
custom-tab-bar/data.js
@@ -1,27 +1,33 @@
export default [
  {
    icon: 'home',
    text: '首页',
    url: 'pages/home/home',
    icon: '/static/images/home/Home@2x.png',
    activeIcon: '/static/images/home/Home-click@2x.png'
  },
  {
    icon: 'sort',
    text: '图书服务',
    url: 'pages/bookServices/assort/index',
    icon: '/static/images/home/service@2x.png',
    activeIcon: '/static/images/home/service-click@2x.png'
  },
  {
    icon: 'sort',
    text: '学习',
    url: 'pages/goods/category/index',
    icon: '/static/images/home/learn@2x.png',
    activeIcon: '/static/images/home/learn-click@2x.png'
  },
  {
    icon: 'cart',
    text: '购物车',
    url: 'pages/cart/index',
    icon: '/static/images/home/cart@2x.png',
    activeIcon: '/static/images/home/cart-click@2x.png'
  },
  {
    icon: 'person',
    text: '个人中心',
    url: 'pages/usercenter/index',
    url: 'pages/personalCenter/index',
    icon: '/static/images/home/my@2x.png',
    activeIcon: '/static/images/home/my-click@2x.png'
  },
];
custom-tab-bar/index.json
@@ -3,6 +3,7 @@
  "usingComponents": {
    "t-tab-bar": "tdesign-miniprogram/tab-bar/tab-bar",
    "t-tab-bar-item": "tdesign-miniprogram/tab-bar-item/tab-bar-item",
    "t-icon": "tdesign-miniprogram/icon/icon"
    "t-icon": "tdesign-miniprogram/icon/icon",
    "t-image": "tdesign-miniprogram/image/image"
  }
}
custom-tab-bar/index.wxml
@@ -1,18 +1,11 @@
<t-tab-bar
 value="{{active}}"
 bindchange="onChange"
 split="{{false}}"
>
    <t-tab-bar-item
     wx:for="{{list}}"
     wx:for-item="item"
     wx:for-index="index"
     wx:key="index"
    >
<t-tab-bar value="{{active}}" bindchange="onChange" split="{{false}}">
  <t-tab-bar-item wx:for="{{list}}" wx:for-item="item" wx:for-index="index" wx:key="index">
        <view class="custom-tab-bar-wrapper">
            <t-icon prefix="wr" name="{{item.icon}}" size="48rpx" />
      <!-- <t-icon prefix="wr" name="{{item.icon}}" size="48rpx" />
      <view class="text">{{ item.text }}</view> -->
      <t-image wx:if="{{active !== index}}" class="tabImg" src="{{item.icon}}" mode="heightFix" width="22" height="22" />
      <t-image wx:else class="tabImg" src="{{item.activeIcon}}" mode="heightFix" width="22" height="22" />
            <view class="text">{{ item.text }}</view>
        </view>
    </t-tab-bar-item>
</t-tab-bar>
custom-tab-bar/index.wxss
@@ -6,4 +6,5 @@
.custom-tab-bar-wrapper .text {
  font-size: 20rpx;
  margin-top: 10rpx;
}
pages/bookExhibitionDetails/index.js
New file
@@ -0,0 +1,136 @@
// pages/bookExhibitionDetails/index.js
const app = getApp()
Page({
  /**
   * 页面的初始数据
   */
  data: {
    bookName: null,
    bookBeginDate: null,
    bookCreator: null,
    bookContent: null,
    bookImage: null,
    bookExhibitionList: []
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {
    const passId = options.id
    this.bookExhibitionGet(passId)
    this.getBookExhibitionDetails(passId)
  },
  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady() {
  },
  /**
   * 生命周期函数--监听页面显示
   */
  onShow() {
  },
  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide() {
  },
  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload() {
  },
  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh() {
  },
  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom() {
  },
  /**
   * 用户点击右上角分享
   */
  onShareAppMessage() {
  },
  bookExhibitionGet(passId) {
    wx.showLoading({
      title: '加载中...',
    })
    console.log(passId, 8988989);
    app.MG.store.getProductDetail({
      storeInfo: 'jsek_bookFair', //商品库
      path: '*', //路径
      queryType: '*',
      productId: passId, //详情的id
      fields: {
        subtitle: [],
        content: [],
        isbn: [],
        introduction: [],
        Creator: []
      }
    }).then(res => {
      console.log(res.datas.datas.Creator.Name, 'res');
      this.setData({
        bookName: res.datas.name,
        bookBeginDate: res.datas.beginDate,
        bookCreator: res.datas.datas.Creator.Name,
        bookContent: res.datas.content,
        bookImage: res.datas.icon
      });
      wx.hideLoading()
    })
  },
  //书展详情接口
  getBookExhibitionDetails(passId) {
    app.MG.store.getProductList({
      path: '*',
      storeInfo: 'jsek_bookFair',
      mainProductId: passId,
      queryType: 'Related', // 查询类型: Related:查询关联商品;SubProduct: 查询子商品;
      fields: {
        author: [],
        publicationDate: [],
        isbn: [],
        content: [],
        Creator: []
      }
    }).then(res => {
      this.setData({
        bookExhibitionList: res.datas
      })
      console.log(this.data.bookExhibitionList, 88888);
    })
  },
  onBookDetails(event) {
    const item = event.currentTarget.dataset.item;
    console.log(item, 'item');
    // wx.navigateTo({
    //   url: '/pages/bookExhibitionDetails/index?id?name=' + item.id + item.name // 假设跳转到详情页面,并传递了id参数
    // });
  }
})
pages/bookExhibitionDetails/index.json
New file
@@ -0,0 +1,3 @@
{
  "usingComponents": {}
}
pages/bookExhibitionDetails/index.wxml
New file
@@ -0,0 +1,32 @@
<!--pages/bookExhibitionDetails/index.wxml-->
<view class="headBox">
  <text class="titleBox">{{bookName}}</text>
  <view class="informationBox">
    <text class="informationNameBox">发布人:{{bookCreator}}</text>
    <text class="informationTimeBox">发布日期:{{bookBeginDate}}</text>
  </view>
</view>
<image class="partingBox" src="/static/images/bookExhibitionDetails/Parting.png" mode="" />
<image class="bannerBox" src="{{bookImage}}" mode="" />
<view class="textContent">
  <rich-text nodes="{{bookContent}}"></rich-text>
  <!-- <text>{{bookContent}}</text> -->
</view>
<view class="outsideBooksBox">
  <view class="booksBox" wx:for="{{bookExhibitionList}}" wx:key="index" wx:for-item="item" wx:for-index="index" data-item="{{item}}" bind:tap="onBookDetails">
    <view class="outsideBooksImageBox">
      <image class="booksImageBox" src="{{item.icon}}" mode="" />
    </view>
    <view class="booksTextBox"> <text>{{item.name}}</text></view>
  </view>
</view>
pages/bookExhibitionDetails/index.wxss
New file
@@ -0,0 +1,86 @@
/* pages/bookExhibitionDetails/index.wxss */
.headBox {
  /* width: 750rpx; */
  text-align: center;
}
.titleBox {
  font-weight: 800;
  font-size: 45rpx;
}
.informationBox {
  margin-top: 30rpx;
  display: flex;
  justify-content: space-around;
  padding: 0 50rpx;
  font-size: 25rpx;
  color: #545C63;
  font-weight: 400;
}
.partingBox {
  width: 750rpx;
  height: 40rpx;
  margin: 30rpx 0;
}
.bannerBox {
  width: 690rpx;
  height: 270rpx;
  margin: 0 30rpx;
}
.textContent {
  width: 690rpx;
  /* height: 315rpx; */
  padding: 0 30rpx;
  font-size: 25rpx;
  color: #545C63;
  font-weight: 400;
  line-height: 50rpx;
  margin: 20rpx 2rpx;
}
.booksBox {
  width: 330rpx;
  /* height: 430rpx; */
  /* background-color: #8bc34a; */
  margin: 20rpx;
  background: #FFFFFF;
  box-shadow: 0rpx 0rpx 18rpx 2rpx rgba(0, 0, 0, 0.08);
}
.booksImageBox {
  width: 240rpx;
  height: 300rpx;
  margin: 30rpx;
}
.outsideBooksImageBox {
  background: #F5F5F5;
  width: 300rpx;
  margin: 0 auto;
  margin-top: 15rpx;
}
.booksTextBox {
  font-size: 25rpx;
  font-family: PingFang SC, PingFang SC;
  font-weight: bold;
  width: 280rpx;
  margin: 30rpx 25rpx;
  /* overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap; */
}
.outsideBooksBox {
  display: flex;
  flex-wrap: wrap;
}
pages/bookExhibitionList/img/banner.png
pages/bookExhibitionList/index.js
New file
@@ -0,0 +1,308 @@
// pages/bookExhibitionList/index.js
import Toast from 'tdesign-miniprogram/toast/index';
const app = getApp()
Page({
  /**
   * 页面的初始数据
   */
  data: {
    nameSort: null,
    total: null,
    page: {
      start: 0,
      size: 16
    },
    keynoteValue: null,
    filteredItems: [],
    newValue: null,
    value: '',
    bookExhibitionList: [],
    sorter: {
      value: 'default',
    },
    product: {
      value: '*',
      options: [
        {
          value: '*',
          label: '总分类',
        },
        {
          value: 'jsek_bFHigherEducation',
          //重点项目
          price: 'jsek_higherEducation',
          label: '高等教育',
        },
        {
          value: 'jsek_bFVocationalEducation',
          //重点项目
          price: 'jsek_vocationalEducation',
          label: '职业教育',
        },
        {
          value: 'jsek_bFTeacherEducation',
          //重点项目
          price: 'jsek_teacherEducation',
          label: '教师教育',
        },
      ],
    },
    multipleSelect: {
      value: [],
      options: [],
    },
  },
  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady() {
  },
  /**
   * 生命周期函数--监听页面显示
   */
  onShow() {
    this.bookExhibitionGet()
    this.keyProjectsGet()
  },
  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide() {
  },
  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload() {
  },
  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh() {
  },
  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom() {
    // console.log(this.data.page.size);
    // console.log(this.data.total);
    if (this.data.page.size >= this.data.total) {
      console.log('已加载完所有数据');
      Toast({
        context: this,
        selector: '#t-toast',
        message: '没有更多了',
        direction: 'column',
        duration: 1000,
        preventScrollThrough: true,
        icon: 'poweroff',
      });
    } else {
      // const currentPage = this.data.page.start + 1; // 获取当前页数并加1
      const newSize = this.data.page.size + 10; // 原来的基础上加10
      this.setData({
        // 'page.start': currentPage,
        'page.size': newSize
      });
      this.bookExhibitionGet(); // 调用方法加载更多数据
      console.log(1111);
    }
  },
  /**
   * 用户点击右上角分享
   */
  onShareAppMessage() {
  },
  // 图片数据的接口
  bookExhibitionGet(newValue) {
    wx.showLoading({
      title: '加载中...',
    })
    // console.log(this.data.keynoteValue);
    let sort = {
      Name: this.data.nameSort || 'Desc'
    }
    app.MG.store.getProductList({
      storeInfo: 'jsek_bookFair',
      path: newValue,
      queryType: '*',
      fields: {
        jsek_link: [],
        'bookClassification*': this.data.keynoteValue || []
      },
      paging: this.data.page,
      sort: sort,
      // coverSize: {
      //   width: 100
      // },
    }).then(res => {
      this.data.total = res.total
      //  list.push(res.datas)
      const list = [...res.datas]
      this.setData({
        bookExhibitionList: list
      })
      //取消
      wx.hideLoading()
      // console.log(this.data.bookExhibitionList, '数据');
    })
  },
  //重点项目接口
  keyProjectsGet(newPrice) {
    // console.log(newPrice, 'newPrice');
    let parms = {
      refCodes: ['bookClassification']
    }
    app.MG.store.getProductTypeField(parms).then(res => {
      const checkData = JSON.parse(res[0].config)
      checkData.option.forEach(item => {
        if (newPrice == item.value) {
          this.setData({
            filteredItems: item.child || [] // 如果存在子项则赋值,否则赋值为空数组
          });
          // console.log(this.data.filteredItems);
        }
      })
      this.onLoad();
    })
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {
    // console.log(this.data.filteredItems, 88888);
    // 单列选择器选项
    const singleSelectOptions = this.data.filteredItems.map(item => ({
      label: item.name,
      value: item.value,
      disabled: false,
    }))
    if (this.data.filteredItems = []) {
      console.log(11111);
      singleSelectOptions.push({
        label: '禁用选项',
        value: 'disabled',
        disabled: true,
      });
    }
    // singleSelectOptions.push({
    //   label: '禁用选项',
    //   value: 'disabled',
    //   disabled: true,
    // });
    // 更新数据
    this.setData({
      'multipleSelect.options': singleSelectOptions,
    });
  },
  // 总分类
  // 总分类
  onChange(e) {
    this.data.page.size = 16 //更改显示的值
    const newValue = e.detail.value;
    const selectedOption = this.data.product.options.find(option => option.value === newValue);
    const newPrice = selectedOption ? selectedOption.price : null;
    this.setData({
      'product.value': newValue,
      'product.price': newPrice, // 将选中的 price 值保存在数据中
    });
    this.bookExhibitionGet(newValue);
    this.keyProjectsGet(newPrice);
    // 调用更新页面数据的函数,传入新的 value 和 price 值
    if (this.data.keynoteValue) {
      //如果有数据就清空并刷新页面
      this.data.keynoteValue = []
      this.bookExhibitionGet(newValue)
      this.onLoad()
      console.log('true');
    } else {
      // this.bookExhibitionGet(newValue);
      // this.keyProjectsGet(newPrice);
      console.log('fals');
    }
  },
  // 重点项目
  handleMultipleSelect(e) {
    this.setData({
      'multipleSelect.value': e.detail.value,
    });
  },
  handleConfirm(event) {
    const { value } = event.detail;
    // 确认操作的处理逻辑
    console.log('确认操作,选中的值为:', value);
    this.data.keynoteValue = value
    this.bookExhibitionGet()
  },
  handleReset() {
    // 重置操作的处理逻辑
    this.data.keynoteValue = []
    console.log('重置操作');
    this.bookExhibitionGet()
  },
  onSwapRight() {
    // console.log('xxxxxx');
    this.data.nameSort = 'Asc'
    this.bookExhibitionGet()
  },
  onSwapLeft() {
    this.data.nameSort = 'Desc'
    // console.log('sssssss');
    this.bookExhibitionGet()
  },
  onBookExhibitionDetails: function (event) {
    const item = event.currentTarget.dataset.item;
    console.log(item);
    wx.navigateTo({
      url: '/pages/bookExhibitionDetails/index?id=' + item.id // 假设跳转到详情页面,并传递了id参数
    });
  }
})
pages/bookExhibitionList/index.json
New file
@@ -0,0 +1,12 @@
{
  "component": true,
  "usingComponents": {
    "t-button": "tdesign-miniprogram/button/button",
    "t-search": "tdesign-miniprogram/search/search",
    "t-dropdown-menu": "tdesign-miniprogram/dropdown-menu/dropdown-menu",
    "t-dropdown-item": "tdesign-miniprogram/dropdown-item/dropdown-item",
    "t-toast": "tdesign-miniprogram/toast/toast",
    "t-icon": "tdesign-miniprogram/icon/icon"
  },
  "onReachBottomDistance": 200
}
pages/bookExhibitionList/index.wxml
New file
@@ -0,0 +1,47 @@
<!--pages/bookExhibitionList/index.wxml-->
<!-- 弹出框 禁止 -->
<t-toast id="t-toast" />
<view class="example-search">
  <t-search model:value="{{value}}" placeholder="请输入关键词/书目/ISBN/作者" />
</view>
<view class="menuBox">
  <t-dropdown-menu class="classification">
    <t-dropdown-item options="{{product.options}}" value="{{product.value}}" bindchange="onChange" />
    <t-dropdown-item label="重点项目" options="{{multipleSelect.options}}" value="{{multipleSelect.value}}" bindchange="handleMultipleSelect" multiple bind:confirm="handleConfirm" bind:reset="handleReset" />
  </t-dropdown-menu>
  <view class="sortBox">
    <text>排序</text>
    <view class="iconBox">
      <t-icon class="swapRight" name="swap-right" size="48rpx" bind:click="onSwapRight" />
      <t-icon class="swapLeft" name="swap-right" size="48rpx" bind:click="onSwapLeft" />
    </view>
  </view>
</view>
<view class="titleBox">
  <view class="frameBox"></view> <text class="titleTextBox"> 线上书展</text>
</view>
<view class="outside">
  <view class="contentBox" wx:for="{{bookExhibitionList}}" wx:key="index" wx:for-item="item" wx:for-index="index" bindtap="onBookExhibitionDetails" data-item="{{item}}">
    <image wx:if="{{item.icon}}" src="{{item.icon}}" mode="" />
    <image wx:else="" src="./img/banner.png" mode="" />
    <view class="textBox"> <text>{{item.name}}</text></view>
  </view>
</view>
pages/bookExhibitionList/index.wxss
New file
@@ -0,0 +1,102 @@
/* pages/bookExhibitionList/index.wxss */
.outside {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin: 15px;
}
.contentBox {
  width: 330rpx;
  height: 130rpx;
  /* border: 1px #000 solid; */
  margin: 10px 0;
}
image {
  width: 100%;
  height: 85%;
}
.textBox {
  width: 320rpx;
  font-size: 20rpx;
  /* display: flex;
  justify-content: center; */
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  text-align: center;
}
.example-search {
  width: 300px;
  background-color: #fff;
  /* padding: 16rpx 32rpx; */
}
.iconBox {
  transform: rotate(90deg);
  /* margin: 10px;
  margin-right: 20px; */
  margin-left: 30rpx;
}
.swapRight {
  /* margin-right: 10px; */
}
.swapLeft {
  transform: rotate(180deg);
}
.sortBox {
  display: flex;
  border-bottom: 1px #ededed solid;
  align-items: center;
  height: 86rpx;
  width: 195rpx;
}
.titleBox {
  display: flex;
  margin: 10px;
  margin-left: 0;
}
.frameBox {
  width: 13rpx;
  height: 54rpx;
  background: #FF6C00;
  border-radius: 0rpx 9rpx 9rpx 0rpx;
}
.titleTextBox {
  font-size: 20px;
  font-weight: bolder;
  margin-left: 10px;
  font-family: JDLangZhengTi, JDLangZhengTi;
}
.classification {
  width: 550rpx;
}
.menuBox {
  display: flex;
}
pages/home/home.js
@@ -1,7 +1,12 @@
import { fetchHome } from '../../services/home/home';
import moment from 'moment'
import { setSessionGuid } from "../../assets/js/userAction"
const app = getApp()
Page({
  data: {
    isWhite: false,
    backUrl: null,
    userInfo: {},
    tabList: [], //目录
    pageLoading: false,
    current: 1,//轮播图参数
@@ -11,30 +16,39 @@
    navigation: { type: 'dots' },//轮播图参数
    bannerList: [], //轮播图列表
    specialSubjectList: [],//专题讨论
    activeItem: 0,//精选课程默认选中
    courseTypeList: [],//精选课程分类
    courseList: [],
    bookTypeList: [],//图书类型
    activeItem1: 0,
    booksList: [],
    textbookList: []
    readBookList: [], //数字阅读
    textbookList: [], //数字教材
    rankingList: []//排行榜
  },
  goodListPagination: {
    index: 0,
    num: 20,
  },
  privateData: {
    tabIndex: 0,
  },
  onShow() {
    this.getTabBar().init();
    this.loadHomePage();
    this.getBannerList()
  },
  onLoad() {
  onLoad(options) {
    if (options.backUrl) {
      let backUrl = JSON.parse(decodeURIComponent(options.backUrl));
      if (backUrl.options) {
        for (let key in backUrl.options) {
          const value = backUrl.options[key]
          backUrl.backUrl += `${key}=${value}&`
        }
      }
      this.setData({
        backUrl: backUrl.backUrl
      })
    }
    this.getTestLoginInfo()
    this.init();
  },
  onReachBottom() {
  },
  onPullDownRefresh() {
@@ -42,7 +56,92 @@
  },
  init() {
    this.getSubjectList();
    this.getCourseList();
    this.getCourseTypeListList();
    this.getBookTypeList();
    this.getReadBookList();
    this.getTextbookListList();
    this.getRankingList()
  },
  // 获取测试登录时的token
  getTestLoginInfo() {
    const token = wx.getStorageSync(app.config.tokenKey)
    if (!token) {
      wx.login({
        success: (res) => {
          wx.getUserInfo({
            success: (infoRes) => {
              app.MG.identity.checkWeChatAppAccount({
                code: res.code,
                appCode: app.config.appRefCode,
                encryptedData: infoRes.encryptedData,
                iv: infoRes.iv
              }).then(loginRes => {
                if (!loginRes) {
                  // wx.navigateTo({
                  //   url: "/pages/index/bindInfo/index?code=" + res.code,
                  // });
                } else {
                  wx.login({
                    success: (res) => {
                      app.MG.identity.loginByWeChatAppCode({
                        code: res.code,
                        appRefCode: app.config.appRefCode,
                        platform: "weChatApp",
                        encryptedData: infoRes.encryptedData,
                        iv: infoRes.iv
                      }).then(res => {
                        if (res && res.status == "Ok") {
                          wx.setStorageSync(app.config.tokenKey, res.token);
                          setSessionGuid()
                          this.getCurrentUserInfo()
                        }
                      })
                    },
                  })
                }
              })
            }
          })
        },
      })
    }
  },
  getCurrentUserInfo() {
    app.MG.identity.getCurrentAppUser().then(res => {
      console.log(res, "userInfo");
      // 用户信息优先级:教师认证 > 微信 > 学生(注册时默认)
      if (res) {
        let defaultUser = {};
        let WeChatInfo = res.infoList.find((item) => item.type === "WeChat");
        let phoneNumber = res.secretList.find(i => i.type == 'MobilePhone')
        if (WeChatInfo) {
          defaultUser = {
            nickName: WeChatInfo.name,
            avatarUrl: WeChatInfo.icon,
            weChatId: WeChatInfo.id
          }
        }
        if (phoneNumber) {
          defaultUser.phoneNumber = phoneNumber.credential
        }
        this.setData({
          userInfo: defaultUser,
        })
        wx.setStorageSync(app.config.userInfoKey, JSON.stringify(this.data.userInfo));
      }
      if (this.data.backUrl) {
        wx.navigateTo({
          url: this.data.backUrl,
        })
      } else {
        wx.switchTab({
          url: '/pages/home/home'
        })
      }
    });
  },
  getBannerList() {
    const list = []
@@ -64,20 +163,8 @@
    })
    console.log('轮播图', this.data.bannerList);
  },
  //搜索
  navToSearchPage() {
    wx.navigateTo({ url: '/pages/goods/search/index' });
  },
  //轮播图跳转
  navToActivityDetail({ detail }) {
    const data = this.data.bannerList[detail.index]
    console.log('跳转', data.link);
    // const { index: promotionID = 0 } = detail || {};
    // wx.navigateTo({
    //   url: `/pages/promotion-detail/index?promotion_id=${promotionID}`,
    // });
  },
  //获取目录
  loadHomePage() {
    wx.stopPullDownRefresh();
    this.setData({
@@ -115,7 +202,7 @@
      },
      paging: {
        start: 0,
        size: 3
        size: 4
      },
      fields: {
        liveTime: [],
@@ -125,16 +212,46 @@
      }
    }
    app.MG.store.getProductList(obj).then((res) => {
      res.datas.forEach((item) => {
        item.liveTime = item.liveTime ? moment(item.liveTime).format("MM-DD HH:mm:ss") : '';
        item.startTime = item.startTime ? moment(item.startTime).format("MM-DD HH:mm:ss") : '';
        item.price = item.price ? item.price.toFixed(2) : item.price;
      });
      this.setData({
        specialSubjectList: res.datas
      })
    })
  },
  //精选课程分类
  getCourseTypeListList() {
    const data = {
      path: 'jsek_homepageDigitalCourses',
      filterList: [],
      queryType: '\\',
      searchList: [],
      size: '20',
      start: '0',
      storeRefCode: app.config.digitalCourses,
      sort: { type: 'Asc', field: 'LinkOrder' }
    }
    app.MG.store.getStoreChannelList(data).then((res) => {
      if (res.datas && res.datas.length > 0) {
        let dataList = [];
        dataList.push(...res.datas)
        this.setData({
          courseTypeList: dataList,
          activeItem: 0
        })
        this.getCourseList(res.datas[0])
      }
    })
  },
  //精选课程列表
  getCourseList(item) {
    const obj = {
      storeInfo: "app.config.goodsStore",
      path: 'jsek_homepageDigitalTextbooks',
      path: item.pathList + '\\' + item.id,
      coverSize: {
        width: 260
      },
@@ -150,9 +267,142 @@
      }
    }
    app.MG.store.getProductList(obj).then((res) => {
      res.datas.forEach((item) => {
        item.price = item.price ? item.price.toFixed(2) : item.price;
      });
      this.setData({
        courseList: res.datas
      })
    })
  },
  tabChangeHandle(item) {
    let info = this.data.courseTypeList[item.detail.value]
    this.getCourseList(info)
  },
  //图书服务分类
  getBookTypeList() {
    const data = {
      path: 'jsek_homepageBookService',
      filterList: [],
      queryType: '\\',
      searchList: [],
      size: '20',
      start: '0',
      storeRefCode: app.config.goodsStore,
      sort: { type: 'Asc', field: 'LinkOrder' }
  }
    app.MG.store.getStoreChannelList(data).then((res) => {
      if (res.datas && res.datas.length > 0) {
        let dataList = [];
        dataList.push(...res.datas)
        this.setData({
          bookTypeList: dataList,
          activeItem1: 0
        })
        this.getBooksList(dataList[0])
      }
    })
  },
  //图书服务列表
  getBooksList(item) {
    const obj = {
      storeInfo: app.config.goodsStore,
      path: item.pathList + '\\' + item.id,
      queryType: '*',
      coverSize: {
        width: 150
      },
      paging: {
        start: 0,
        size: 6
      },
      fields: {
        author: []
      }
    }
    app.MG.store.getProductList(obj).then((res) => {
      this.setData({
        booksList: res.datas,
      })
    })
  },
  //图书服务
  tabBookClick(item) {
    let info = this.data.bookTypeList[item.detail.value]
    this.getBooksList(info)
  },
  //数字阅读
  getReadBookList() {
    const obj = {
      storeInfo: app.config.digitalTextbooks,
      path: 'jsek_homepageDigitalTextbooks',
      coverSize: {
        width: 150
      },
      paging: {
        start: 0,
        size: 3
      },
      fields: {
        author: []
      }
    }
    app.MG.store.getProductList(obj).then((res) => {
      this.setData({
        readBookList: res.datas
      })
    })
  },
  //数字教材
  getTextbookListList() {
    const obj = {
      storeInfo: app.config.digitalTextbooks,
      path: 'jsek_homepageDigitalTextbooks',
      coverSize: {
        width: 150
      },
      paging: {
        start: 0,
        size: 6
      },
      fields: {
        author: [],
      }
    }
    app.MG.store.getProductList(obj).then((res) => {
      this.setData({
        textbookList: res.datas
      })
    })
  },
  //获取排行榜
  getRankingList() {
    const obj = {
      storeInfo: app.config.digitalTextbooks,
      path: 'jsek_homepageDigitalTextbooks',
      coverSize: {
        width: 150
      },
      paging: {
        start: 0,
        size: 6
      },
      fields: {
        author: [],
      }
    }
    app.MG.store.getProductList(obj).then((res) => {
      this.setData({
        rankingList: res.datas
      })
    })
  },
  onPageScroll(e) {
    this.setData({
      isWhite: e.scrollTop > 50 ? true : false
    })
  }
});
pages/home/home.json
@@ -1,5 +1,5 @@
{
  "navigationBarTitleText": "首页",
  "navigationStyle": "custom",
  "onReachBottomDistance": 10,
  "backgroundTextStyle": "light",
  "enablePullDownRefresh": true,
@@ -16,6 +16,7 @@
    "goods-list": "/components/goods-list/index",
    "load-more": "/components/load-more/index",
    "t-grid": "tdesign-miniprogram/grid/grid",
    "t-grid-item": "tdesign-miniprogram/grid-item/grid-item"
    "t-grid-item": "tdesign-miniprogram/grid-item/grid-item",
    "t-empty": "tdesign-miniprogram/empty/empty"
  }
}
pages/home/home.wxml
@@ -1,7 +1,13 @@
<view style="text-align: center; color: #b9b9b9" wx:if="{{pageLoading}}">
  <t-loading theme="circular" size="40rpx" text="加载中..." inherit-color />
</view>
<view class="background {{ isWhite ? 'white':''}}">
  <text class="text">京师E课</text>
</view>
<view class="home-page-header">
  <view class="bg">
    <image src="/static/images/home/home-bg@2x.png" mode="heightFix" class="image" />
  </view>
  <view class="search">
    <t-search t-class-input="t-search__input" t-class-input-container="t-search__input-container" placeholder="请输入关键词/书名/ISBN/作者" leftIcon="">
      <t-icon slot="left-icon" prefix="wr" name="search" size="40rpx" color="#bbb" bind:tap="navToSearchPage" />
@@ -22,22 +28,180 @@
      <view class="icon">
        <t-image src="/static/images/home/zhuantitaolun.png" mode="heightFix" class="iconImage" />
      </view>
      <view bindtap="onMoreGuide">
      <view bindtap="onMoreGuide" class="flex">
        <text class="more">更多</text>
        <t-icon name="chevron-right" size="32rpx" color="#ff6d00" />
      </view>
    </view>
    <view>
      <view wx:for="{{specialSubjectList}}" wx:for-item="item" wx:for-index="index" wx:key="index" bindtap="toList" data-info="{{item}}">
    <view class="listBox">
      <view wx:for="{{specialSubjectList}}" wx:for-item="item" wx:for-index="index" wx:key="index" bindtap="toList" data-info="{{item}}" class="listItemBox">
        <view class="listItem">
        <view class="specialSubject-img">
          <t-image src="{{item.icon}}" mode="aspectFill" width="50" height="50" />
            <image src="{{item.icon}}" mode="aspectFill" class="img" />
        </view>
        <view class="body-info">
          <view>{{item.name}}</view>
            <view class="name">{{item.name}}</view>
            <view class="time" wx:if="{{item.liveTime}}">直播时间:<text>{{item.liveTime}}</text></view>
            <view class="time" wx:if="{{item.startTime}}">开播时间:<text>{{ item.startTime }}</text></view>
            <view class="time" wx:if="{{!item.liveTime && !item.startTime}}">开播时间:<text class="grey">待定</text></view>
            <view class="flex jc-sb">
              <text class="author">{{item.lecturer}}</text>
              <text class="price" wx:if="{{item.price == 0}}">免费</text>
              <text class="price" wx:if="{{item.price !== 0}}">¥{{item.price}}</text>
        </view>
      </view>
    </view>
      </view>
    </view>
    <view class="tabCardPublic">
      <view class="icon">
        <t-image src="/static/images/home/jingxuankecheng@2x.png" mode="heightFix" class="iconImage" />
      </view>
      <view bindtap="onMoreGuide" class="flex">
        <text class="more">更多</text>
        <t-icon name="chevron-right" size="32rpx" color="#ff6d00" />
      </view>
    </view>
    <view class="home-page-tabs">
      <t-tabs t-class="t-tabs" t-class-active="tabs-external__active" t-class-item="tabs-external__item" defaultValue="{{activeItem}}" space-evenly="{{false}}" bind:change="tabChangeHandle">
        <t-tab-panel wx:for="{{courseTypeList}}" wx:for-index="index" wx:key="index" label="{{item.name}}" value="{{index}}" />
      </t-tabs>
    </view>
    <view class="listBox1">
      <view wx:if="{{courseList.length>0}}">
        <view wx:for="{{courseList}}" wx:for-item="item" wx:for-index="index" wx:key="index" bindtap="toList" data-info="{{item}}" class="listItemBox">
          <view class="listItem flex">
            <view class="specialSubject-img">
              <image src="{{item.icon}}" mode="aspectFill" class="img" />
            </view>
            <view class="body-info">
              <view class="name">{{item.name}}</view>
              <view class="flex jc-sb">
                <text class="author">{{item.courseLeader}}</text>
                <text>{{item.classHours}}课时</text>
              </view>
              <view class="priceBox flex jc-sb">
                <text class="price" wx:if="{{item.price == 0}}">免费</text>
                <text class="price" wx:if="{{item.price !== 0}}">¥{{item.price}}</text>
                <image src="/static/images/home/home-cart.png" mode="aspectFill" class="addCartImg" />
              </view>
            </view>
          </view>
        </view>
      </view>
      <view class="empyt" wx:else>
        <t-empty icon="folder-open" description="暂无数据" font-size="80" />
      </view>
    </view>
    <view class="tabCardPublic">
      <view class="icon">
        <t-image src="/static/images/home/tushufuwu@2x.png" mode="heightFix" class="iconImage" />
      </view>
      <view bindtap="onMoreGuide" class="flex">
        <text class="more">更多</text>
        <t-icon name="chevron-right" size="32rpx" color="#ff6d00" />
      </view>
    </view>
    <view class="home-page-tabs">
      <t-tabs t-class="t-tabs" t-class-active="tabs-external__active" t-class-item="tabs-external__item" defaultValue="{{activeItem1}}" space-evenly="{{false}}" bind:change="tabBookClick">
        <t-tab-panel wx:for="{{bookTypeList}}" wx:for-index="index" wx:key="index" label="{{item.name}}" value="{{index}}" />
      </t-tabs>
    </view>
    <view class="listBox2">
      <view wx:if="{{booksList.length > 0}}" class="flex">
        <view wx:for="{{booksList}}" wx:for-item="item" wx:for-index="index" wx:key="index" bindtap="toList" data-info="{{item}}" class="booksListItemBox">
          <view class="listItem">
            <view class="specialSubject-img">
              <image src="{{item.icon}}" mode="aspectFill" class="img" />
            </view>
            <view class="body-info">
              <view class="name">{{item.name}}</view>
              <view class="author">{{item.author}}</view>
            </view>
          </view>
        </view>
      </view>
      <view class="empyt" wx:else>
        <t-empty icon="folder-open" description="暂无数据" font-size="80" />
      </view>
    </view>
    <view class="tabCardPublic">
      <view class="icon">
        <t-image src="/static/images/home/shuziyuedu1@2x.png" mode="heightFix" class="iconImage" />
      </view>
      <view bindtap="onMoreGuide" class="flex">
        <text class="more">更多</text>
        <t-icon name="chevron-right" size="32rpx" color="#ff6d00" />
      </view>
    </view>
    <view class="listBox2 flex">
      <view wx:for="{{readBookList}}" wx:for-item="item" wx:for-index="index" wx:key="index" bindtap="toList" data-info="{{item}}" class="booksListItemBox">
        <view class="listItem">
          <view class="specialSubject-img">
            <image src="{{item.icon}}" mode="aspectFill" class="img" />
          </view>
          <view class="body-info">
            <view class="name">{{item.name}}</view>
            <view class="author">{{item.author}}</view>
          </view>
        </view>
      </view>
    </view>
    <view class="tabCardPublic">
      <view class="icon">
        <t-image src="/static/images/home/shuzijiaocai1@2x.png" mode="heightFix" class="iconImage" />
      </view>
      <view bindtap="onMoreGuide" class="flex">
        <text class="more">更多</text>
        <t-icon name="chevron-right" size="32rpx" color="#ff6d00" />
      </view>
    </view>
    <view class="listBox3">
      <view wx:if="{{textbookList.length > 0}}" class="listBox3">
        <view wx:for="{{textbookList}}" wx:for-item="item" wx:for-index="index" wx:key="index" bindtap="toList" data-info="{{item}}" class="textbooksItemBox">
          <view class="listItem flex">
            <view class="specialSubject-img">
              <image src="{{item.icon}}" mode="aspectFill" class="img" />
            </view>
            <view class="body-info">
              <view class="name">{{item.name}}</view>
              <view class="introduction">{{item.description}}</view>
              <view class="author">{{item.author}}</view>
              <view class="priceBox flex jc-sb">
                <text class="price" wx:if="{{item.price == 0}}">免费</text>
                <text class="price" wx:if="{{item.price !== 0}}">¥{{item.price}}</text>
                <image src="/static/images/home/home-cart.png" mode="aspectFill" class="addCartImg" />
              </view>
            </view>
          </view>
        </view>
      </view>
      <view class="empyt" wx:else>
        <t-empty icon="folder-open" description="暂无数据" font-size="80" />
      </view>
    </view>
    <view class="tabCardPublic">
      <view class="icon">
        <t-image src="/static/images/home/paihangbang@2x.png" mode="heightFix" class="iconImage" />
      </view>
      <view bindtap="onMoreGuide" class="flex">
        <text class="more">更多</text>
        <t-icon name="chevron-right" size="32rpx" color="#ff6d00" />
      </view>
    </view>
    <view class="listBox2 rankingList flex">
      <view wx:for="{{rankingList}}" wx:for-item="item" wx:for-index="index" wx:key="index" bindtap="toList" data-info="{{item}}" class="booksListItemBox">
        <view class="listItem">
          <view class="specialSubject-img">
            <image src="{{item.icon}}" mode="aspectFill" class="img" />
          </view>
          <view class="body-info">
            <view class="name">{{item.name}}</view>
            <view class="author">{{item.author}}</view>
          </view>
        </view>
      </view>
    </view>
  </view>
  <load-more list-is-empty="{{!goodsList.length}}" status="{{goodsListLoadStatus}}" bind:retry="onReTry" />
  <t-toast id="t-toast" />
pages/home/home.wxss
@@ -3,22 +3,55 @@
  padding-bottom: calc(env(safe-area-inset-bottom) + 96rpx);
}
.home-page-header {
  position: relative;
}
.home-page-header .search {
  position: absolute;
  top: 20rpx;
  left: 0;
.background {
  width: 100%;
  z-index: 99;
  position: fixed;
  top: 0;
  left: 0;
  height: 80rpx;
  z-index: 3;
  text-align: center;
  padding-top: 110rpx;
  color: #fff;
  font-size: 36rpx;
}
.home-page-header .t-search__input-container {
  border-radius: 15rpx !important;
  margin: 0 24rpx;
  height: 64rpx !important;
.white {
  background: #fff;
  color: #333;
}
.background .text {
  height: 100%;
}
.home-page-header,
.home-page-menu,
.home-page-container {
  position: relative;
  padding: 0 24rpx;
}
.home-page-header {
  padding-top: 230rpx;
}
.home-page-header .bg {
  height: 680rpx;
  position: absolute;
  top: 0;
  left: 0;
  z-index: -1;
}
.home-page-header .bg .image {
  height: 100%;
}
.home-page-header .search .t-search__input-container {
  height: 96rpx;
  background: #fff !important;
  font-size: 28rpx !important;
}
.home-page-header .t-search__input {
@@ -26,16 +59,25 @@
  color: rgb(116, 116, 116) !important;
}
.home-page-header .swiper-wrap .t-swiper-host {
  border-radius: 0;
.home-page-header .swiper-wrap {
  margin-top: 30rpx;
  margin-bottom: 10rpx;
}
.home-page-header .t-image__swiper {
  width: 100%;
  height: 300rpx;
.home-page-menu .t-grid--card {
  margin: 0;
}
.flex {
  display: flex;
}
.jc-sb {
  justify-content: space-between
}
.home-page-container {
  margin-top: 20rpx;
  display: block;
  padding: 0 24rpx;
}
@@ -45,13 +87,14 @@
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20rpx 5rpx;
  margin: 20rpx 5rpx;
  box-sizing: border-box;
  border-bottom: 2rpx solid #fadfbc;
}
.tabCardPublic .icon {
  width: 246rpx;
  height: 72rpx;
  width: 156rpx;
  height: 48rpx;
}
.tabCardPublic .icon .t-image {
@@ -61,5 +104,213 @@
.tabCardPublic .more {
  font-size: 24rpx;
  color: #999;
  color: #ff6d00;
}
.listBox {
  padding: 20rpx 0;
  display: flex;
  flex-flow: row wrap;
  justify-content: space-between;
}
.listBox .listItemBox {
  width: 49%;
  margin-bottom: 30rpx;
}
.listItemBox .listItem {
  background: #fff;
  box-sizing: border-box;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0px 0px 20rpx 2px #f1f1f1;
}
.listBox .specialSubject-img {
  width: 100%;
  height: 120rpx;
}
.specialSubject-img image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.body-info {
  padding: 20rpx;
  font-size: 28rpx;
}
.body-info .name {
  font-size: 32rpx;
  height: 88rpx;
  color: #333333;
  font-weight: bold;
  line-height: 44rpx;
  display: -webkit-box;
  margin-bottom: 10rpx;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
}
.body-info .time {
  font-size: 26rpx;
  margin-bottom: 10rpx;
}
.body-info .author {
  font-size: 26rpx;
  display: flex;
  justify-content: space-between;
}
.body-info .price {
  font-size: 26rpx;
  color: #ff6d00;
}
.t-tabs .t-tabs__item--active {
  color: #ff6d00;
  font-size: 30rpx;
  /* background-image: url('/static/images/home/click-icon@2x.png'); */
  background-repeat: no-repeat;
  background-size: cover;
  /* 确保背景图像不会被拉伸 */
  /* background-position: right; */
}
.t-tabs .t-tabs__track {
  display: none;
}
.t-tabs .t-tabs--top .t-tabs__scroll {
  border-bottom: none !important;
}
.t-tabs .t-tabs-scroll {
  border: none !important;
}
.listBox1,
.listBox2 {
  padding: 50rpx 0;
}
.listBox1 .listItemBox {
  height: 220rpx;
  margin-bottom: 30rpx;
}
.listBox1 .specialSubject-img {
  width: 400rpx;
  height: 218rpx;
}
.listBox1 .addCartImg,
.listBox3 .addCartImg {
  width: 30rpx;
  height: 30rpx;
}
.listBox1 .priceBox {
  margin-top: 14rpx;
}
.listBox2 {
  flex-flow: row wrap;
}
.listBox2 .flex {
  flex-flow: row wrap;
}
.listBox2 .booksListItemBox {
  width: calc(100%/3 - 30rpx);
  margin-bottom: 30rpx;
  margin-right: 45rpx;
}
.listBox2 :nth-child(3),
.listBox2 :nth-child(6) {
  margin-right: 0;
}
.listBox2 .specialSubject-img {
  height: 300rpx;
  width: 100%;
  box-shadow: 0px 0px 20rpx 2px #f1f1f1;
}
.listBox2 .body-info {
  padding: 20rpx 0;
}
.listBox2 .author {
  height: 30rpx;
  color: #333333;
  font-weight: bold;
  line-height: 30rpx;
  display: -webkit-box;
  margin-bottom: 10rpx;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}
.listBox2 .empyt {
  padding: 20rpx;
  box-sizing: border-box;
}
.listBox3 .textbooksItemBox {
  margin-bottom: 30rpx;
}
.listBox3 .textbooksItemBox .specialSubject-img {
  width: 190rpx;
  height: 260rpx;
  box-shadow: 0px 0px 20rpx 2px #f1f1f1;
}
.listBox3 .body-info {
  width: calc(100% - 190rpx);
}
.listBox3 .name {
  font-size: 32rpx;
  height: 44rpx;
  color: #333333;
  font-weight: bold;
  line-height: 44rpx;
  display: -webkit-box;
  margin-bottom: 10rpx;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}
.listBox3 .introduction {
  color: #B4B6BD;
  line-height: 36rpx;
  display: -webkit-box;
  margin-bottom: 10rpx;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
}
.listBox3 .author {
  line-height: 40rpx;
  margin-bottom: 30rpx;
}
.readList {
  overflow: auto;
}
pages/personalCenter/activateProduct/index.js
New file
@@ -0,0 +1,66 @@
// pages/personalCenter/activateProduct/index.js
Page({
  /**
   * 页面的初始数据
   */
  data: {
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {
    console.log(options);
  },
  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady() {
  },
  /**
   * 生命周期函数--监听页面显示
   */
  onShow() {
  },
  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide() {
  },
  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload() {
  },
  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh() {
  },
  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom() {
  },
  /**
   * 用户点击右上角分享
   */
  onShareAppMessage() {
  }
})
pages/personalCenter/activateProduct/index.json
New file
@@ -0,0 +1,4 @@
{
  "navigationBarTitleText": "激活商品",
  "usingComponents": {}
}
pages/personalCenter/activateProduct/index.wxml
New file
@@ -0,0 +1,2 @@
<!--pages/personalCenter/activateProduct/index.wxml-->
<text>pages/personalCenter/activateProduct/index.wxml</text>
pages/personalCenter/activateProduct/index.wxss
New file
@@ -0,0 +1 @@
/* pages/personalCenter/activateProduct/index.wxss */
pages/personalCenter/certificate/index.js
New file
@@ -0,0 +1,65 @@
Page({
  /**
   * 页面的初始数据
   */
  data: {
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {
    console.log(options);
  },
  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady() {
  },
  /**
   * 生命周期函数--监听页面显示
   */
  onShow() {
  },
  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide() {
  },
  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload() {
  },
  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh() {
  },
  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom() {
  },
  /**
   * 用户点击右上角分享
   */
  onShareAppMessage() {
  }
})
pages/personalCenter/certificate/index.json
New file
@@ -0,0 +1,4 @@
{
  "navigationBarTitleText": "我的证书",
  "usingComponents": {}
}
pages/personalCenter/certificate/index.wxml
New file
@@ -0,0 +1,2 @@
<!--pages/personalCenter/certificate/index.wxml-->
<text>pages/personalCenter/certificate/index.wxml</text>
pages/personalCenter/certificate/index.wxss
pages/personalCenter/components/user-center-card/index.js
New file
@@ -0,0 +1,35 @@
const AuthStepType = {
  ONE: 1,
  TWO: 2,
  THREE: 3,
};
Component({
  options: {
    multipleSlots: true,
  },
  properties: {
    currAuthStep: {
      type: Number,
      value: AuthStepType.ONE,
    },
    userInfo: {
      type: Object,
      value: {},
    },
    isNeedGetUserInfo: {
      type: Boolean,
      value: false,
    },
  },
  data: {
    defaultAvatarUrl:
      'https://cdn-we-retail.ym.tencent.com/miniapp/usercenter/icon-user-center-avatar@2x.png',
    AuthStepType,
  },
  methods: {
    gotoUserEditPage() {
      this.triggerEvent('gotoUserEditPage');
    },
  },
});
pages/personalCenter/components/user-center-card/index.json
New file
@@ -0,0 +1,7 @@
{
  "component": true,
  "usingComponents": {
    "t-icon": "tdesign-miniprogram/icon/icon",
    "t-avatar": "tdesign-miniprogram/avatar/avatar"
  }
}
pages/personalCenter/components/user-center-card/index.wxml
New file
@@ -0,0 +1,33 @@
<view class="user-center-card">
  <!-- 未登录的情况 -->
  <block wx:if="{{currAuthStep === AuthStepType.ONE}}">
    <view class="user-center-card__header" bind:tap="gotoUserEditPage">
      <t-avatar image="{{userInfo.avatarUrl || defaultAvatarUrl}}" class="user-center-card__header__avatar" />
      <view class="user-center-card__header__name">{{'请登录'}}</view>
      <view class="setting">
        <image src="/static/images/personal/setting.png" mode="heightFix" class="img" />
        <text>设置</text>
      </view>
    </view>
  </block>
  <!-- 已登录但未授权用户信息情况 -->
  <block wx:if="{{currAuthStep === AuthStepType.TWO}}">
    <view class="user-center-card__header">
      <t-avatar image="{{userInfo.avatarUrl || defaultAvatarUrl}}" class="user-center-card__header__avatar" />
      <view class="user-center-card__header__name">{{userInfo.nickName || '微信用户'}}</view>
      <!-- 需要授权用户信息,通过slot添加弹窗 -->
      <view class="user-center-card__header__transparent" wx:if="{{isNeedGetUserInfo}}">
        <slot name="getUserInfo" />
      </view>
      <!-- 不需要授权用户信息,仍然触发gotoUserEditPage事件 -->
      <view class="user-center-card__header__transparent" bind:tap="gotoUserEditPage" wx:else></view>
    </view>
  </block>
  <!-- 已登录且已经授权用户信息的情况 -->
  <block wx:if="{{currAuthStep === AuthStepType.THREE}}">
    <view class="user-center-card__header" bind:tap="gotoUserEditPage">
      <t-avatar t-class="avatar" mode="aspectFill" class="user-center-card__header__avatar" image="{{userInfo.avatarUrl || defaultAvatarUrl}}" />
      <view class="user-center-card__header__name">{{userInfo.nickName || '微信用户'}}</view>
    </view>
  </block>
</view>
pages/personalCenter/components/user-center-card/index.wxss
New file
@@ -0,0 +1,60 @@
.user-center-card {
  /* background-image: url('https://cdn-we-retail.ym.tencent.com/miniapp/template/user-center-bg-v1.png'); */
  background-size: cover;
  background-repeat: no-repeat;
  padding: 0 24rpx;
}
.user-center-card__header {
  margin-top: 160rpx;
  margin-bottom: 30rpx;
  margin-left: 20rpx;
  height: 96rpx;
  line-height: 48rpx;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  color: #333;
  position: relative;
}
.user-center-card__header__avatar {
  width: 96rpx;
  height: 96rpx;
  border-radius: 48rpx;
  overflow: hidden;
}
.user-center-card__header__name {
  font-size: 36rpx;
  line-height: 48rpx;
  color: #333;
  font-weight: bold;
  margin-left: 24rpx;
  margin-right: 16rpx;
}
.user-center-card__header__transparent {
  position: absolute;
  left: 0;
  top: 0;
  background-color: transparent;
  height: 100%;
  width: 100%;
}
.user-center-card__icon {
  line-height: 96rpx;
}
.setting {
  margin-left: auto;
  display: flex;
  align-items: center;
}
.setting .img {
  height: 34rpx;
  width: 34rpx;
  margin-right: 10rpx;
}
pages/personalCenter/downloads/index.js
New file
@@ -0,0 +1,66 @@
// pages/personalCenter/downloads/index.js
Page({
  /**
   * 页面的初始数据
   */
  data: {
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {
    console.log(options);
  },
  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady() {
  },
  /**
   * 生命周期函数--监听页面显示
   */
  onShow() {
  },
  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide() {
  },
  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload() {
  },
  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh() {
  },
  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom() {
  },
  /**
   * 用户点击右上角分享
   */
  onShareAppMessage() {
  }
})
pages/personalCenter/downloads/index.json
New file
@@ -0,0 +1,4 @@
{
  "navigationBarTitleText": "我的下载",
  "usingComponents": {}
}
pages/personalCenter/downloads/index.wxml
New file
@@ -0,0 +1,2 @@
<!--pages/personalCenter/downloads/index.wxml-->
<text>pages/personalCenter/downloads/index.wxml</text>
pages/personalCenter/downloads/index.wxss
New file
@@ -0,0 +1 @@
/* pages/personalCenter/downloads/index.wxss */
pages/personalCenter/feedBack/index.js
New file
@@ -0,0 +1,66 @@
// pages/personalCenter/feedBack/index.js
Page({
  /**
   * 页面的初始数据
   */
  data: {
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {
    console.log(options);
  },
  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady() {
  },
  /**
   * 生命周期函数--监听页面显示
   */
  onShow() {
  },
  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide() {
  },
  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload() {
  },
  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh() {
  },
  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom() {
  },
  /**
   * 用户点击右上角分享
   */
  onShareAppMessage() {
  }
})
pages/personalCenter/feedBack/index.json
New file
@@ -0,0 +1,4 @@
{
  "navigationBarTitleText": "建议与反馈",
  "usingComponents": {}
}
pages/personalCenter/feedBack/index.wxml
New file
@@ -0,0 +1,2 @@
<!--pages/personalCenter/feedBack/index.wxml-->
<text>pages/personalCenter/feedBack/index.wxml</text>
pages/personalCenter/feedBack/index.wxss
New file
@@ -0,0 +1 @@
/* pages/personalCenter/feedBack/index.wxss */
pages/personalCenter/feedBackSubmit/index.js
New file
@@ -0,0 +1,66 @@
// pages/personalCenter/feedBackSubmit/index.js
Page({
  /**
   * 页面的初始数据
   */
  data: {
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {
    console.log(options);
  },
  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady() {
  },
  /**
   * 生命周期函数--监听页面显示
   */
  onShow() {
  },
  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide() {
  },
  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload() {
  },
  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh() {
  },
  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom() {
  },
  /**
   * 用户点击右上角分享
   */
  onShareAppMessage() {
  }
})
pages/personalCenter/feedBackSubmit/index.json
New file
@@ -0,0 +1,4 @@
{
  "navigationBarTitleText": "意见反馈",
  "usingComponents": {}
}
pages/personalCenter/feedBackSubmit/index.wxml
New file
@@ -0,0 +1,2 @@
<!--pages/personalCenter/feedBackSubmit/index.wxml-->
<text>pages/personalCenter/feedBackSubmit/index.wxml</text>
pages/personalCenter/feedBackSubmit/index.wxss
New file
@@ -0,0 +1 @@
/* pages/personalCenter/feedBackSubmit/index.wxss */
pages/personalCenter/index.js
New file
@@ -0,0 +1,209 @@
const app = getApp()
const menuData = [
  {
    title: '我的订单',
    icon: '/static/images/personal/order.png',
    url: '/pages/personalCenter/myOrder/index',
    type: 'order',
  },
  {
    title: '激活商品',
    icon: '/static/images/personal/jihuo.png',
    url: '/pages/personalCenter/activateProduct/index',
    type: 'activateProduct',
  },
  {
    title: '我的证书',
    icon: '/static/images/personal/certificate.png',
    url: '/pages/personalCenter/certificate/index',
    type: 'certificate',
  },
  {
    title: '我的收藏',
    icon: '/static/images/personal/wodeshoucang.png',
    url: '/pages/personalCenter/myCollection/index',
    type: 'collection',
  },
  {
    title: '我的下载',
    icon: '/static/images/personal/download.png',
    url: '/pages/personalCenter/downloads/index',
    type: 'download',
  },
  {
    title: '样书申请',
    icon: '/static/images/personal/yangshushenqing.png',
    url: '/pages/personalCenter/sampleBooks/index',
    type: 'sampleBook',
  },
  {
    title: '出书申请',
    icon: '/static/images/personal/chushu.png',
    url: '/pages/personalCenter/publishBooks/index',
    type: 'publishBooks',
  },
  {
    title: '我的上传',
    icon: '/static/images/personal/upload.png',
    url: '',
    type: 'upload',
  }
];
const moreMenu = [
  {
    title: '我的消息',
    icon: '/static/images/personal/notification.png',
    url: '/pages/personalCenter/myMassage/index',
    type: 'message',
  },
  {
    title: '建议与反馈',
    icon: '/static/images/personal/feedback.png',
    url: '/pages/personalCenter/feedback/index',
    type: 'feedback',
  }
];
const moreMenu1 = [
  {
    title: '关于我们',
    icon: '/static/images/personal/about.png',
    url: '',
    type: 'aboutUs',
  },
  {
    title: '联系我们',
    icon: '/static/images/personal/contact.png',
    url: '',
    type: 'contact',
  }
];
Page({
  /**
   * 页面的初始数据
   */
  data: {
    isWhite: false,
    show: false,
    userInfo: {
      avatarUrl:
        'https://we-retail-static-1300977798.cos.ap-guangzhou.myqcloud.com/retail-ui/components-exp/avatar/avatar-1.jpg',
      nickName: 'TDesign',
      phoneNumber: '13438358888',
    },
    currAuthStep: 1,
    teacherState: {
      state: '',
      reasonTxt: '',
    },
    integral: 0,
    menuData,
    moreMenu,
    moreMenu1
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {
    console.log(options);
  },
  /**
   * 生命周期函数--监听页面显示
   */
  onShow() {
    if (wx.getStorageSync(app.config.userInfoKey)) {
      this.setData({
        show: true,
        userInfo: JSON.parse(wx.getStorageSync(app.config.userInfoKey))
      })
      if (typeof this.getTabBar === 'function' && this.getTabBar()) {
        this.getTabBar().setData({
          selected: 4 //这个数字是当前页面在tabBar中list数组的索引
        })
      }
      this.getTeacherInfo()
    } else {
      wx.navigateTo({
        url: "/pages/testLogin/index",
      });
    }
  },
  /**
 * 生命周期函数--监听页面隐藏
 */
  onHide() {
    this.setData({
      show: false
    })
  },
  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh() {
    this.init();
  },
  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom() {
  },
  //教师信息
  getTeacherInfo() {
    const data = {
      start: 0,
      size: 10,
      topicIdOrRefCode: 'teacherRoleApproval',
      appRefCode: app.config.appRefCode,
      sort: {
        type: 'Desc',
        field: 'CreateDate'
      }
    }
    app.MG.ugc.getTopicMessageList(data).then((res) => {
      console.log(this.data.userInfo, "userInfo")
      const resData = res.datas.find((i) => i.appUserCreator.userId == this.data.userInfo.userId)
      if (resData) {
        this.setData({
          teacherState: {
            state: resData.state,
            reasonTxt: resData.feedBack != null ? JSON.parse(resData.feedBack).reason : ''
          }
        })
      }
    })
  },
  //点击目录
  toPages(item) {
    console.log(item)
    let info = item.target.dataset.info
    if (info.url) {
      wx.navigateTo({
        url: info.url
      })
    } else {
      wx.showToast({
        title: "建设中",
        icon: 'none',
        duration: 2000
      })
    }
  },
  /**
   * 用户点击右上角分享
   */
  onShareAppMessage() {
  },
  onPageScroll(e) {
    this.setData({
      isWhite: e.scrollTop > 50 ? true : false
    })
  }
})
pages/personalCenter/index.json
New file
@@ -0,0 +1,9 @@
{
  "navigationBarTitleText": "个人中心",
  "navigationStyle": "custom",
  "usingComponents": {
    "t-user-center-card": "./components/user-center-card/index",
    "t-image": "/components/webp-image/index"
  },
  "enablePullDownRefresh": true
}
pages/personalCenter/index.wxml
New file
@@ -0,0 +1,70 @@
<view class="background {{ isWhite ? 'white':''}}">
  <text class="text">个人中心</text>
</view>
<view class="home-page">
  <view class="bg">
    <image src="/static/images/personal/my-bg.png" mode="heightFix" class="image" />
  </view>
  <image class="background" src="/static/images/personal/my-bg.png" mode="heightFix" />
  <t-user-center-card userInfo="{{userInfo}}" isPhoneHide="{{true}}" name-class="custom-name-class" phone-class="custom-phone-class" avatar-class="customer-avatar-class" currAuthStep="{{currAuthStep}}" bind:gotoUserEditPage="gotoUserEditPage" />
  <view class="content-wrapper">
    <view class="topBox">
      <view class="teacherBox">
        <view>
          <view class="wait" wx:if="{{teacherState.state == 'WaitAudit'}}">等待审核</view>
          <view class="yes" wx:if="{{teacherState.state == 'Normal'}}">已认证</view>
          <view class="no" wx:if="{{teacherState.state == 'Reject'}}">已驳回</view>
          <view class="wait" wx:if="{{teacherState.state == ''}}">待认证</view>
          <view class="title"><text>教师认证</text>
            <text class="change-info" wx:if="{{teacherState.state == ''}}">认证</text>
            <text class="change-info" wx:if="{{teacherState.state == 'Normal' || teacherState.state == 'Reject'}}">修改</text>
          </view>
        </view>
        <view>
          <view>{{integral}}</view>
          <view class="title">积分</view>
        </view>
      </view>
    </view>
    <view class="domainBox">
      <view class="title">
        <text>常用功能</text>
      </view>
      <view class="domainList">
        <view wx:for="{{menuData}}" wx:for-item="item" wx:for-index="index" wx:key="index" bindtap="toPages" data-info="{{item}}" class="listItem">
          <view class="icon">
            <t-image src="{{item.icon}}" mode="heightFix" class="img" />
          </view>
          <view class="label">
            <text>{{item.title}}</text>
          </view>
        </view>
      </view>
    </view>
    <view class="domainBox">
      <view class="title">
        <text>更多功能</text>
      </view>
      <view class="domainList1">
        <view wx:for="{{moreMenu}}" wx:for-item="item" wx:for-index="index" wx:key="index" bindtap="toPages" data-info="{{item}}" class="listItem">
          <view class="icon">
            <t-image src="{{item.icon}}" mode="heightFix" class="img" />
          </view>
          <view class="label">
            <text>{{item.title}}</text>
          </view>
        </view>
      </view>
      <view class="domainList2">
        <view wx:for="{{moreMenu1}}" wx:for-item="item" wx:for-index="index" wx:key="index" bindtap="toPages" data-info="{{item}}" class="listItem">
          <view class="icon">
            <t-image src="{{item.icon}}" mode="heightFix" class="img" />
          </view>
          <view class="label">
            <text>{{item.title}}</text>
          </view>
        </view>
      </view>
    </view>
  </view>
</view>
pages/personalCenter/index.wxss
New file
@@ -0,0 +1,138 @@
page {
  background-color: #f0f2f5;
  box-sizing: border-box;
  padding-bottom: calc(env(safe-area-inset-bottom) + 96rpx);
}
.background {
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  height: 80rpx;
  z-index: 3;
  text-align: center;
  padding-top: 110rpx;
  font-size: 36rpx;
}
.white {
  background: #fff;
  color: #333;
}
.home-page .bg {
  height: 780rpx;
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: -1;
}
.home-page .bg .image {
  height: 100%;
}
.content-wrapper {
  position: relative;
  padding: 30rpx;
}
.topBox {
  width: 100%;
  background-color: #fff;
  border-radius: 20rpx;
  box-shadow: 0px 0px 20rpx 2px #f1f1f1;
}
.teacherBox {
  display: flex;
  padding: 40rpx 20rpx;
  justify-content: space-around;
  text-align: center;
  font-size: 28rpx;
}
.teacherBox .title {
  margin-top: 20rpx;
  line-height: 40rpx;
}
.teacherBox .change-info {
  color: #ff6d00;
  margin-left: 20rpx;
}
.wait {
  color: #ff6d00;
}
.no {
  color: #EE1818
}
.yes {
  color: #1FBC1F
}
.domainBox {
  width: 100%;
  margin: 20rpx auto;
  background-color: #fff;
  border-radius: 20rpx;
  box-shadow: 0px 0px 20rpx 2px #f1f1f1;
}
.domainBox .title {
  font-weight: bold;
  padding: 30rpx;
}
.domainList {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  padding-bottom: 30rpx;
}
.domainList1 {
  /* width: 100%; */
  display: flex;
  /* flex-wrap: wrap; */
  border-bottom: 2rpx solid #f1f1f1;
  margin: 0 30rpx;
}
.domainList2 {
  display: flex;
  margin: 0 30rpx;
}
.listItem {
  width: 160rpx;
  min-width: 160rpx;
  flex-shrink: 0;
  padding: 30rpx 0;
}
.listItem .icon {
  width: 46rpx;
  height: 46rpx;
  margin: 0 auto;
}
.listItem .icon .t-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.listItem .label {
  width: 100%;
  font-size: 28rpx;
  line-height: 40rpx;
  text-align: center;
  margin-top: 20rpx;
}
pages/personalCenter/myCollection/index.js
New file
@@ -0,0 +1,65 @@
Page({
  /**
   * 页面的初始数据
   */
  data: {
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {
    console.log(options);
  },
  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady() {
  },
  /**
   * 生命周期函数--监听页面显示
   */
  onShow() {
  },
  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide() {
  },
  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload() {
  },
  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh() {
  },
  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom() {
  },
  /**
   * 用户点击右上角分享
   */
  onShareAppMessage() {
  }
})
pages/personalCenter/myCollection/index.json
New file
@@ -0,0 +1,4 @@
{
  "navigationBarTitleText": "我的收藏",
  "usingComponents": {}
}
pages/personalCenter/myCollection/index.wxml
New file
@@ -0,0 +1 @@
<text>我的收藏</text>
pages/personalCenter/myCollection/index.wxss
pages/personalCenter/myMassage/index.js
New file
@@ -0,0 +1,156 @@
import moment from 'moment'
const app = getApp();
Page({
  /**
   * 页面的初始数据
   */
  data: {
    list: [],
    //分页
    page: 1,
    limit: 10,
    pageTotalCount: 0,
    bottomLoading: false,
    isMoreData: false,
    // 返回顶部
    isBackTop: false,
    setScrollValue: 0,
    skeletonLoding: true,
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {
    this.getDataList(false);
    console.log(options);
  },
  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"
      }
    })
      .then(res => {
        try {
          if (res.datas.length > 0) {
            res.datas.forEach((item) => {
              item.createDate = moment(item.createDate).format("YYYY-MM-DD HH:mm");
            });
            let dataList = res.datas;
            //触底加载新数据并保留老数据
            if (isReachBottom) {
              dataList = [...this.data.list, ...dataList] //将新数据加入老数据中
            }
            this.setData({
              list: dataList,
              pageTotalCount: res.total,
              bottomLoading: false,
              isMoreData: dataList.length > 0 ? false : true,
              skeletonLoding: false,
            })
          } else {
            this.setData({
              skeletonLoding: false,
            })
          }
        } catch (error) {
          console.log(error)
        }
      })
  },
  toList(itemData) {
    let info = itemData.currentTarget.dataset.info;
    wx.navigateTo({
      url: "/pages/personalCenter/myMassage/massageDetail/index?id=" + info.id,
    });
  },
  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady() {
  },
  /**
   * 生命周期函数--监听页面显示
   */
  onShow() {
  },
  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh() {
    if (this._freshing) return
    this.setData({
      page: 1,
      limit: 10,
      pageTotalCount: 0,
      bottomLoading: false,
      isMoreData: false
    })
    this._freshing = true;
    this.setData({
      triggered: false,
    })
    this.getDataList(false);
    this._freshing = false
  },
  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom() {
    this.setData({
      bottomLoading: true,
      isMoreData: false
    })
    let bool = false;
    if (this.data.pageTotalCount > this.data.list.length) {
      bool = true;
      this.setData({
        page: this.data.page + 1,
      })
    } else {
      setTimeout(() => {
        this.setData({
          bottomLoading: false,
          isMoreData: true
        })
      }, 100)
      return false;
    }
    this.getDataList(bool);
  },
  // 监听滚动距离
  onPageScroll(e) {
    if (e && e.scrollTop >= 1000) {
      this.setData({
        isBackTop: true
      })
    } else {
      this.setData({
        isBackTop: false
      })
    }
  },
  /**
   * 用户点击右上角分享
   */
  onShareAppMessage() {
  }
})
pages/personalCenter/myMassage/index.json
New file
@@ -0,0 +1,10 @@
{
  "navigationBarTitleText": "我的消息",
  "usingComponents": {
    "t-back-top": "tdesign-miniprogram/back-top/back-top",
    "t-image": "tdesign-miniprogram/image/image",
    "t-pull-down-refresh": "tdesign-miniprogram/pull-down-refresh/pull-down-refresh",
    "t-loading": "tdesign-miniprogram/loading/loading",
    "t-empty": "tdesign-miniprogram/empty/empty"
  }
}
pages/personalCenter/myMassage/index.wxml
New file
@@ -0,0 +1,35 @@
<view class="container" wx:if="{{!skeletonLoding}}">
  <scroll-view class="scroll content" bind:scroll="onPageScroll" model:scroll-top="{{setScrollValue}}" scroll-y refresher-enabled="{{true}}" lower-threshold="{{200}}" refresher-threshold="{{80}}" refresher-default-style="none" refresher-triggered="{{triggered}}" bindrefresherpulling="{{refresh.onPulling}}" bindrefresherrefresh="onPullDownRefresh" bindscrolltolower="onReachBottom">
    <view slot="refresher" class="refresh-container">
      <view class="loading">
        <t-loading theme="circular" size="40rpx" text="正在刷新..." class="wrapper" />
      </view>
    </view>
    <view class="pageInfo" wx:if="{{list.length > 0}}">
      <view class="content-item" wx:for="{{list}}" wx:for-item="item" wx:for-index="index" wx:key="index">
        <view class="icon">
          <t-image src="/static/images/personal/notification1.png" mode="heightFix" class="img" />
        </view>
        <view class="item-con" data-info="{{item}}" bindtap="toList">
          <view class="titleBox">
            <view class="item-title">{{item.name}}</view>
            <view class="createDate">{{item.createDate}}</view>
          </view>
          <view class="description">
            {{item.description}}
          </view>
        </view>
      </view>
    </view>
    <view wx:if="{{list.length == 0}}" class="empyt">
      <t-empty icon="folder-open" description="暂无数据" />
    </view>
    <view class="bottom-loading" wx:if="{{bottomLoading}}">
      <t-loading theme="circular" size="40rpx" text="加载中..." class="wrapper" />
    </view>
    <view class="bottom-loading" style="color: #ccc;font-size: 28rpx;" wx:if="{{isMoreData}}">
      <text>没有更多了</text>
    </view>
  </scroll-view>
  <t-back-top theme="round" wx:if="{{isBackTop}}" text="顶部" bind:to-top="onToTop"></t-back-top>
</view>
pages/personalCenter/myMassage/index.wxss
New file
@@ -0,0 +1,60 @@
.pageInfo {
  padding: 40rpx 20rpx;
}
.content-item {
  padding: 20rpx 0;
  border-bottom: 1px solid #EDEDED;
  display: flex;
}
.content-item .icon {
  width: 58rpx;
  height: 58rpx;
}
.content-item .icon .img {
  width: 100%;
  height: 100%;
}
.item-con {
  flex: 1;
  margin-left: 30rpx;
}
.titleBox {
  display: flex;
  justify-content: space-between
}
.titleBox .item-title {
  font-weight: bold;
}
.createDate {
  font-size: 24rpx;
  color: #949494;
}
.description {
  font-size: 24rpx;
  height: 88rpx;
  line-height: 40rpx;
  display: -webkit-box;
  margin-top: 20rpx;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
}
.refresh-container {
  margin: 0 auto;
}
.bottom-loading,
.loading {
  padding: 20rpx;
  text-align: center;
}
pages/personalCenter/myMassage/massageDetail/index.js
New file
@@ -0,0 +1,79 @@
const app = getApp();
import moment from 'moment'
Page({
  /**
   * 页面的初始数据
   */
  data: {
    dataInfo: {}
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {
    this.getDataInfo(options.id)
  },
  getDataInfo(id) {
    app.MG.app.getMessage({
      messageId: id
    })
      .then(res => {
        res.createDate = moment(res.createDate).format("YYYY-MM-DD HH:mm");
        this.setData({
          dataInfo: res,
        })
      })
  },
  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady() {
  },
  /**
   * 生命周期函数--监听页面显示
   */
  onShow() {
  },
  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide() {
  },
  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload() {
  },
  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh() {
  },
  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom() {
  },
  /**
   * 用户点击右上角分享
   */
  onShareAppMessage() {
  }
})
pages/personalCenter/myMassage/massageDetail/index.json
New file
@@ -0,0 +1,4 @@
{
  "navigationBarTitleText": "我的消息",
  "usingComponents": {}
}
pages/personalCenter/myMassage/massageDetail/index.wxml
New file
@@ -0,0 +1,8 @@
<view class="container">
  <view>
    <view class="name">{{dataInfo.name}}</view>
    <view class="createDate">{{dataInfo.createDate}}</view>
    <view class="description">{{dataInfo.description}}</view>
    <rich-text space="emsp" nodes="{{dataInfo.content}}" class="content" />
  </view>
</view>
pages/personalCenter/myMassage/massageDetail/index.wxss
New file
@@ -0,0 +1,28 @@
.container {
  padding: 20rpx;
}
.name {
  text-align: center;
  font-size: 32rpx;
  font-weight: bold;
}
.createDate {
  margin-top: 20rpx;
  color: #999;
  text-align: center;
  font-size: 28rpx;
}
.description {
  padding: 30rpx 0;
  color: #999;
  font-size: 28rpx;
  line-height: 40rpx;
}
.content {
  font-size: 28rpx;
  line-height: 40rpx;
}
pages/personalCenter/myOrder/index.js
New file
@@ -0,0 +1,65 @@
Page({
  /**
   * 页面的初始数据
   */
  data: {
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {
    console.log(options);
  },
  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady() {
  },
  /**
   * 生命周期函数--监听页面显示
   */
  onShow() {
  },
  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide() {
  },
  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload() {
  },
  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh() {
  },
  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom() {
  },
  /**
   * 用户点击右上角分享
   */
  onShareAppMessage() {
  }
})
pages/personalCenter/myOrder/index.json
New file
@@ -0,0 +1,4 @@
{
  "navigationBarTitleText": "我的订单",
  "usingComponents": {}
}
pages/personalCenter/myOrder/index.wxml
New file
@@ -0,0 +1,2 @@
<!--pages/personalCenter/myOrder/index.wxml-->
<text>pages/personalCenter/myOrder/index.wxml</text>
pages/personalCenter/myOrder/index.wxss
pages/personalCenter/publishBooks/index.js
New file
@@ -0,0 +1,66 @@
// pages/personalCenter/publishBooks/index.js
Page({
  /**
   * 页面的初始数据
   */
  data: {
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {
    console.log(options);
  },
  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady() {
  },
  /**
   * 生命周期函数--监听页面显示
   */
  onShow() {
  },
  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide() {
  },
  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload() {
  },
  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh() {
  },
  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom() {
  },
  /**
   * 用户点击右上角分享
   */
  onShareAppMessage() {
  }
})
pages/personalCenter/publishBooks/index.json
New file
@@ -0,0 +1,4 @@
{
  "navigationBarTitleText": "出书申请",
  "usingComponents": {}
}
pages/personalCenter/publishBooks/index.wxml
New file
@@ -0,0 +1,2 @@
<!--pages/personalCenter/publishBooks/index.wxml-->
<text>pages/personalCenter/publishBooks/index.wxml</text>
pages/personalCenter/publishBooks/index.wxss
New file
@@ -0,0 +1 @@
/* pages/personalCenter/publishBooks/index.wxss */
pages/personalCenter/sampleBooks/index.js
New file
@@ -0,0 +1,66 @@
// pages/personalCenter/sampleBooks/index.js
Page({
  /**
   * 页面的初始数据
   */
  data: {
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {
    console.log(options);
  },
  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady() {
  },
  /**
   * 生命周期函数--监听页面显示
   */
  onShow() {
  },
  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide() {
  },
  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload() {
  },
  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh() {
  },
  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom() {
  },
  /**
   * 用户点击右上角分享
   */
  onShareAppMessage() {
  }
})
pages/personalCenter/sampleBooks/index.json
New file
@@ -0,0 +1,4 @@
{
  "navigationBarTitleText": "样书申请",
  "usingComponents": {}
}
pages/personalCenter/sampleBooks/index.wxml
New file
@@ -0,0 +1,2 @@
<!--pages/personalCenter/sampleBooks/index.wxml-->
<text>pages/personalCenter/sampleBooks/index.wxml</text>
pages/personalCenter/sampleBooks/index.wxss
New file
@@ -0,0 +1 @@
/* pages/personalCenter/sampleBooks/index.wxss */
pages/teacherCertification/index.js
New file
@@ -0,0 +1,65 @@
Page({
  /**
   * 页面的初始数据
   */
  data: {
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {
    console.log(options);
  },
  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady() {
  },
  /**
   * 生命周期函数--监听页面显示
   */
  onShow() {
  },
  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide() {
  },
  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload() {
  },
  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh() {
  },
  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom() {
  },
  /**
   * 用户点击右上角分享
   */
  onShareAppMessage() {
  }
})
pages/teacherCertification/index.json
New file
@@ -0,0 +1,6 @@
{
  "navigationBarTitleText": "教师认证",
  "enablePullDownRefresh": true,
  "backgroundTextStyle": "light",
  "usingComponents": {}
}
pages/teacherCertification/index.wxml
New file
@@ -0,0 +1,68 @@
<view class="container">
  <view class="tips"> 仅限学校本课程任课教师申请;请上传有效在职教师工作证将有助于审核。 </view>
  <view class="page-body">
    <form catchsubmit="formSubmit" catchreset="formReset" class="formBox">
      <view class="from-item">
        <view class="label"> 当前状态: </view>
        <view class="item-content">
          <input class="weui-input" name="input" placeholder="" />
        </view>
      </view>
      <view class="from-item">
        <view class="label"> 学校: </view>
        <view class="item-content">
          <input class="weui-input" name="input" placeholder="请输入学校" />
        </view>
      </view>
      <view class="from-item">
        <view class="label"> 真实姓名: </view>
        <view class="item-content">
          <input class="weui-input" name="input" placeholder="请输入真实姓名" />
        </view>
      </view>
      <view class="from-item">
        <view class="label"> 职称: </view>
        <view class="item-content">
          <!-- <input class="weui-input" name="input" placeholder="请选择职称" /> -->
        </view>
      </view>
      <view class="from-item">
        <view class="label"> 任教课程: </view>
        <view class="item-content">
          <input class="weui-input" name="input" placeholder="请输入任教课程" />
        </view>
      </view>
      <view class="from-item">
        <view class="label"> 手机号: </view>
        <view class="item-content">
          <input class="weui-input" name="input" placeholder="请输入手机号" />
        </view>
      </view>
      <view class="from-item">
        <view class="label"> 座机: </view>
        <view class="item-content">
          <input class="weui-input" name="input" placeholder="请输入座机" />
        </view>
      </view>
      <view class="from-item">
        <view class="label"> 邮箱: </view>
        <view class="item-content">
          <input class="weui-input" name="input" placeholder="请输入邮箱" />
        </view>
      </view>
      <view class="from-item">
        <view class="label"> 详细地址: </view>
        <view class="item-content">
          <input class="weui-input" name="input" placeholder="请输入详细地址" />
        </view>
      </view>
      <view class="from-item">
        <view class="label"> 在职教师工作证: </view>
        <view class="item-content"> </view>
      </view>
      <view class="btn-area">
        <button class="submit" formType="submit">提交</button>
      </view>
    </form>
  </view>
</view>
pages/teacherCertification/index.wxss
New file
@@ -0,0 +1,36 @@
.tips {
  line-height: 24px;
  font-size: 28rpx;
  padding: 5px;
  background: rgba(255, 108, 0, 0.1);
  color: #ff6c00;
  text-align: center;
  margin: 0 auto 20px auto;
}
.page-body {
  padding: 20rpx;
  font-size: 28rpx;
}
.from-item {
  margin-bottom: 20rpx;
  display: flex;
}
.from-item .label {
  width: 240rpx;
  height: 68rpx;
  line-height: 68rpx;
}
.from-item .item-content {
  width: 56%;
  border: 2rpx solid #D9D9D9;
  padding: 10rpx;
}
.submit {
  background: #ff6c00;
  color: #fff;
}
pages/testLogin/index.js
New file
@@ -0,0 +1,132 @@
// pages/testLogin/index.js
const app = getApp();
Page({
  /**
   * 页面的初始数据
   */
  data: {
    textName: "18892081234",
    textPassword: "xA123456",
    loading: false,
    userInfo: {
      name: "",
      icon: ""
    }
  },
  // 登录
  onLogin() {
    this.setData({
      loading: true
    })
    const data = {
      loginName: this.data.textName,
      password: this.data.textPassword,
      appRefCode: app.config.appRefCode,
      platform: "Mobile",
    };
    app.MG.identity.loginByPassword(data).then(res => {
      if (res && res.status == "Ok") {
        this.setData({
          loginInfo: JSON.stringify(res)
        })
        wx.setStorageSync(app.config.tokenKey, res.token);
        this.getUserInfo()
      } else {
        wx.showToast({
          title: res.message || "手机号或密码错误",
          icon: "error",
          duration: 2000
        })
      }
    });
  },
  // 获取用户信息
  // 获取登录用户身份
  getUserInfo() {
    app.MG.identity.getCurrentAppUser().then(res => {
      // 用户信息优先级:教师认证 > 微信 > 学生(注册时默认)
      if (res) {
        console.log(res, "user");
        let defaultUser = {};
        let secretData = res.secretList.find(i => i.type == 'LoginNameAndPassword')
        let WeChatInfo = res.infoList.find((item) => item.type === "WeChat");
        if (WeChatInfo) {
          defaultUser = {
            nickName: WeChatInfo.name,
            avatarUrl: WeChatInfo.icon,
            userId: res.userId
          }
        }
        if (secretData) {
          defaultUser = {
            nickName: secretData.credential,
            avatarUrl: "../../static/images/index/tab.png",
            userId: res.userId
          }
        }
        this.setData({
          userInfo: defaultUser,
          loading: false
        })
        wx.setStorageSync(app.config.userInfoKey, JSON.stringify(this.data.userInfo));
      }
      wx.switchTab({
        url: '/pages/home/home'
      })
    });
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {
    console.log(options);
  },
  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady() {
  },
  /**
   * 生命周期函数--监听页面显示
   */
  onShow() {
  },
  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide() {
  },
  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload() {
  },
  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh() {
  },
  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom() {
  }
})
pages/testLogin/index.json
New file
@@ -0,0 +1,6 @@
{
  "usingComponents": {
    "t-input": "tdesign-miniprogram/input/input",
    "t-button": "tdesign-miniprogram/button/button"
  }
}
pages/testLogin/index.wxml
New file
@@ -0,0 +1,8 @@
<!--pages/testLogin/index.wxml-->
<view>
  <t-input label="用户账号" placeholder="请输入用户名" model:value="{{textName}}" suffixIcon="{{ { name: 'user-avatar', ariaLabel: '通讯录' } }}"></t-input>
  <t-input label="用户密码" placeholder="请输入密码" type="password" model:value="{{textPassword}}" clearable />
</view>
<view class="button-example">
  <t-button theme="primary" loading="{{loading}}"  bindtap="onLogin" size="large" block>立即登录</t-button>
</view>
pages/testLogin/index.wxss
New file
@@ -0,0 +1,4 @@
/* pages/testLogin/index.wxss */
.button-example {
  margin: 60rpx 32rpx;
}
pages/usercenter/index.wxss
@@ -25,9 +25,11 @@
  overflow: hidden;
  margin-bottom: 20rpx;
}
.icon-color {
  color: #aaa;
}
.cell-class {
  height: 100rpx;
  display: flex;
@@ -60,6 +62,7 @@
  -ms-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
}
.order-content-t {
  margin-top: 10rpx;
  font-size: 24rpx;
@@ -73,6 +76,7 @@
  margin-bottom: env(safe-area-inset-bottom);
  border-radius: 16rpx 16rpx 0 0;
}
.popup-content .popup-title {
  background: #fff;
  text-align: center;
@@ -101,6 +105,7 @@
  transform-origin: left top;
  border-bottom: 2rpx solid #e5e5e5;
}
.popup-content .popup-phone,
.popup-content .popup-close {
  background: #fff;
@@ -114,12 +119,15 @@
  font-weight: 400;
  color: #333;
}
.popup-content .popup-phone.online {
  margin-bottom: 20rpx;
}
.popup-content .popup-phone.online::after {
  content: none;
}
.popup-content .popup-close {
  color: #333;
  border: 0;
@@ -138,9 +146,11 @@
  font-size: 24rpx;
  line-height: 32rpx;
}
.cell-box .order-group__left {
  margin-right: 0;
}
.cell-box .t-cell-padding {
  padding: 24rpx 18rpx 24rpx 32rpx;
}
project.config.json
@@ -48,7 +48,7 @@
  },
  "compileType": "miniprogram",
  "libVersion": "2.23.1",
  "appid": "wx1432ecb6d1b86ade",
  "appid": "wx5461028c83fea0b3",
  "projectname": "tdesign-miniprogram-starter-retail",
  "simulatorType": "wechat",
  "simulatorPluginLibVersion": {},
services/home/home.js
@@ -8,61 +8,61 @@
        {
          text: '图书服务',
          key: 0,
          icon: '/static/images/home/1.png',
          url: '/pages/bookServices/assort/index',
          icon: '/static/images/home/zhutichuban@2x.png',
          url: '/pages/bookServices/assort/index.wxml',
        },
        {
          text: '数字阅读',
          key: 1,
          icon: '',
          icon: '/static/images/home/shuziyuedu@2x.png',
          url: '',
        },
        {
          text: '数字课程',
          key: 2,
          icon: '',
          icon: '/static/images/home/shuzikecheng@2x.png',
          url: '',
        },
        {
          text: '数字教材',
          key: 3,
          icon: '',
          icon: '/static/images/home/shuzijiaocai@2x.png',
          url: '',
        },
        {
          text: '专题讨论',
          key: 4,
          icon: '',
          icon: '/static/images/home/zhuantitaolun@2x.png',
          url: '',
        },
        {
          text: '线上书展',
          key: 5,
          icon: '',
          icon: '/static/images/home/xianshangshuzhan@2x.png',
          url: '',
        },
        {
          text: '书目下载',
          key: 6,
          icon: '',
          icon: '/static/images/home/shumuxiazai@2x.png',
          url: '',
        },
        {
          text: '教师认证',
          key: 7,
          icon: '',
          url: '',
          icon: '/static/images/home/jiaoshirenzheng@2x.png',
          url: '/pages/teacherCertification/index',
        },
        {
          text: '样书申请',
          key: 8,
          icon: '',
          icon: '/static/images/home/yangshushenqing@2x.png',
          url: '',
        },
        {
          text: '我要出书',
          key: 9,
          icon: '',
          icon: '/static/images/home/xueshuzhuzuo@2x.png',
          url: '',
        },
      ],
static/images/bookExhibitionDetails/Parting.png
static/images/bookExhibitionDetails/shuzha.png
static/images/home/1.png
Binary files differ
static/images/home/Home-click@2x.png
static/images/home/Home@2x.png
static/images/home/cart-click@2x.png
static/images/home/cart@2x.png
static/images/home/click-icon@2x.png
static/images/home/home-bg@2x.png
static/images/home/home-cart.png
static/images/home/jiaoshirenzheng@2x.png
static/images/home/jingxuankecheng.png
Binary files differ
static/images/home/jingxuankecheng@2x.png
static/images/home/learn-click@2x.png
static/images/home/learn@2x.png
static/images/home/my-click@2x.png
static/images/home/my@2x.png
static/images/home/paihangbang@2x.png
static/images/home/service-click@2x.png
static/images/home/service@2x.png
static/images/home/shumuxiazai@2x.png
static/images/home/shuzijiaocai.png
Binary files differ
static/images/home/shuzijiaocai1@2x.png
static/images/home/shuzijiaocai@2x.png
static/images/home/shuzikecheng@2x.png
static/images/home/shuziyuedu1@2x.png
static/images/home/shuziyuedu@2x.png
static/images/home/tushufuwu.png
Binary files differ
static/images/home/tushufuwu@2x.png
static/images/home/xianshangshuzhan@2x.png
static/images/home/xueshuzhuzuo@2x.png
static/images/home/yangshushenqing@2x.png
static/images/home/zhuantitaolun.png

static/images/home/zhuantitaolun1@2x.png
static/images/home/zhuantitaolun@2x.png
static/images/home/zhutichuban@2x.png
static/images/home/zuoxia-p@2x.png
static/images/personal/about.png
static/images/personal/certificate.png
static/images/personal/chushu.png
static/images/personal/contact.png
static/images/personal/download.png
static/images/personal/feedback.png
static/images/personal/jihuo.png
static/images/personal/my-bg.png
static/images/personal/notification.png
static/images/personal/notification1.png
static/images/personal/order.png
static/images/personal/setting.png
static/images/personal/upload.png
static/images/personal/wodeshoucang.png
static/images/personal/yangshushenqing.png