旅游教育出版社-数字教材移动端
QYF-GitLab1
9 小时以前 8e3ee81b6ed824866734b7034604121f370f4201
登录、购书码、申请阅读
7个文件已修改
1个文件已删除
603 ■■■■■ 已修改文件
dist.rar 补丁 | 查看 | 原始文档 | blame | 历史
src/main.js 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/plugin/axios/index.js 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/bookList/bookDetail.vue 257 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/index/index.vue 121 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/index/manual.vue 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/personalCenter/teacherCertificate.vue 149 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/testLogin.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
dist.rar
Binary files differ
src/main.js
@@ -54,16 +54,16 @@
      if (bindingCode.code) {
        let query = {
          code: bindingCode.code,
          isSocial: true // 公众号和开放平台是不同的主体,公众号绑定微信使用isSocial=true,开放平台(扫码绑定)使用isSocial=false;
          isSocial: true, // 公众号和开放平台是不同的主体,公众号绑定微信使用isSocial=true,开放平台(扫码绑定)使用isSocial=false;
        };
        MG.identity
          .bindWeChat(query)
          .then(res => {
          .then((res) => {
            const url = window.location.href;
            const redirectUrl = url.split("?")[0];
            window.location.href = redirectUrl;
          })
          .catch(res => {
          .catch((res) => {
            console.log(res);
          });
      } else {
@@ -72,13 +72,12 @@
    } else {
      // 拦截如果是登录code
      let loginCode = WeChat.getUrlInfo("weChatLogin");
      console.log(loginCode, "loginCode");
      if (loginCode.code) {
        WeChat.login(loginCode.code, data => {
        WeChat.login(loginCode.code, (data) => {
          toolClass.setCookie(config.tokenKey, data);
          const url = window.location.href;
          const domian = url.split("?")[0];
          console.log(domian, 'domian');
          console.log(domian, "domian");
          const routeCode = url.split("#")[1];
          const redirectUrl = domian + "#" + routeCode;
          window.location.href = redirectUrl;
@@ -103,11 +102,11 @@
         */
        let query = {
          code: checkCode.code,
          appCode: config.appRefCode
          appCode: config.appRefCode,
        };
        MG.identity
          .chechWechatAccount(query)
          .then(res => {
          .then((res) => {
            if (res == true) {
              const url = window.location.href;
              const domian = url.split("?")[0];
@@ -127,7 +126,7 @@
              }
            }
          })
          .catch(res => {
          .catch((res) => {
            console.log(res);
          });
      } else {
@@ -138,7 +137,8 @@
        if (ua.match(/MicroMessenger/i) == "micromessenger") {
          toolClass.delCookie(config.tokenKey);
          localStorage.fullPath = to.fullPath;
          window.location.href = config.requestCtx + "/mobile/textbooks/#" + to.fullPath;
          window.location.href =
            config.requestCtx + "/mobile/textbooks/#" + to.fullPath;
          WeChat.getCode("checkWeChat");
        } else {
          WeChat.getCode("weChatLogin");
@@ -153,5 +153,5 @@
new Vue({
  router,
  store,
  render: h => h(App)
  render: (h) => h(App),
}).$mount("#app");
src/plugin/axios/index.js
@@ -9,12 +9,12 @@
// 创建 axios 实例
const service = axios.create({
  baseURL: myConfig.requestCtx,
  timeout: myConfig.requestTimeOut // 请求超时时间
  timeout: myConfig.requestTimeOut, // 请求超时时间
});
// 请求拦截器
service.interceptors.request.use(
  config => {
  (config) => {
    // 在请求发送之前做一些处理
    // if (config.url !== "/api/account/loginByPassword") {
    let token = toolClass.getCookie(myConfig.tokenKey);
@@ -32,7 +32,7 @@
    // }
    return config;
  },
  error => {
  (error) => {
    // 发送失败
    Promise.reject(error);
  }
@@ -40,18 +40,14 @@
// 响应拦截器
service.interceptors.response.use(
  response => {
  (response) => {
    // dataAxios 是 axios 返回数据中的 data
    const dataAxios = response.data;
    // 这个状态码是和后端约定的
    const {
      success
    } = dataAxios;
    const { success } = dataAxios;
    if (dataAxios.currentDate) {
      sessionStorage.currentDate = new Date(dataAxios.currentDate).getTime();
    }
    // 根据 code 进行判断
    if (success) {
      return dataAxios.data;
@@ -60,11 +56,11 @@
      console.error(dataAxios.msg);
    }
  },
  error => {
  (error) => {
    if ((error.message = "Network Error")) {
      let loginCode = WeChat.getUrlInfo("weChatLogin");
      if (loginCode.code) {
        WeChat.login(loginCode.code, data => {
        WeChat.login(loginCode.code, (data) => {
          toolClass.setCookie(myConfig.tokenKey, data);
          location.reload();
        });
src/views/bookList/bookDetail.vue
@@ -86,7 +86,7 @@
            class="detailBox"
            v-if="
              detailsInfo.tourism_catalog &&
                detailsInfo.tourism_catalog !== '<p></p>'
              detailsInfo.tourism_catalog !== '<p></p>'
            "
            v-html="detailsInfo.tourism_catalog"
          ></div>
@@ -99,7 +99,7 @@
            class="detailBox"
            v-if="
              detailsInfo.tourism_content &&
                detailsInfo.tourism_content !== '<p></p>'
              detailsInfo.tourism_content !== '<p></p>'
            "
            v-html="detailsInfo.tourism_content"
          ></div>
@@ -112,7 +112,7 @@
            class="detailBox"
            v-if="
              detailsInfo.tourism_authorBrief &&
                detailsInfo.tourism_authorBrief !== '<p></p>'
              detailsInfo.tourism_authorBrief !== '<p></p>'
            "
            v-html="detailsInfo.tourism_authorBrief"
          ></div>
@@ -132,9 +132,7 @@
                style="width: 100%; height: 300px"
              ></div>
            </div>
            <div class="title" v-if="resourceData.length > 0">
              资源明细
            </div>
            <div class="title" v-if="resourceData.length > 0">资源明细</div>
            <div class="resourceList" v-if="resourceData.length > 0">
              <div
                v-for="(item, index) in resourceData"
@@ -177,7 +175,11 @@
          <p v-else class="disable">申请试用</p>
        </li>
        <li class="btmBottom1">
          <img src="@/assets/images/textBook/shidu3.png" alt="" class="btnImg" />
          <img
            src="@/assets/images/textBook/shidu3.png"
            alt=""
            class="btnImg"
          />
          <p v-if="isBuy" @click="readBook()">阅读</p>
          <p v-if="!isBuy" @click="readBook()">试读</p>
        </li>
@@ -203,11 +205,7 @@
      show-cancel-button
      @confirm="onConfirm"
    >
      <van-field
        v-model="code"
        placeholder="请输入购书码"
        class="message"
      />
      <van-field v-model="code" placeholder="请输入购书码" class="message" />
    </van-dialog>
  </div>
</template>
@@ -218,6 +216,7 @@
import { mapState } from "vuex";
import toolClass from "@/assets/js/toolClass";
import myConfig from "@/assets/js/config";
import WeChat from "@/assets/js/weChat/weChat";
import axios from "axios";
var echarts = require("echarts");
// 全局注册
@@ -239,7 +238,7 @@
      // 收藏图片
      collectIcon: {
        star: require("@/assets/images/textBook/shoucang3.png"),
        selected_star: require("@/assets/images/tab_collection_pre.png")
        selected_star: require("@/assets/images/tab_collection_pre.png"),
      },
      isBuy: false,
      tabActive: 0,
@@ -258,11 +257,11 @@
      teacherState: "",
      shoppingCartGetId: [],
      dialogCode: false,
      code: ""
      code: "",
    };
  },
  computed: {
    ...mapState(["userInfo"])
    ...mapState(["userInfo"]),
  },
  created() {
    var that = this;
@@ -294,13 +293,13 @@
            tourism_teachingLevel: [],
            tourism_professionalCategory: [],
            tourism_zone: [],
            viewCount: []
            viewCount: [],
          },
          coverSize: {
            width: 880
          }
            width: 880,
          },
        })
        .then(res => {
        .then((res) => {
          console.log(res.datas);
          this.isBuy = res.datas.alreadyBuy;
          that.detailsInfo = res.datas;
@@ -312,15 +311,15 @@
                  requests: [
                    {
                      saleMethodId: this.detailsInfo.defaultSaleMethodId,
                      count: 1
                    }
                  ]
                      count: 1,
                    },
                  ],
                })
                .then(initRes => {
                .then((initRes) => {
                  if (initRes.orderNumber) {
                    this.MG.store
                      .confirmOrder({ orderNum: initRes.orderNumber })
                      .then(aRes => {
                      .then((aRes) => {
                        if (aRes) {
                          Toast.success("免费领取成功!");
                          this.getDetail(id);
@@ -334,6 +333,7 @@
          this.getBookResource();
        });
    },
    getProductType() {
      var that = this;
      this.MG.store
@@ -341,22 +341,22 @@
          refCodes: [
            "tourism_teachingLevel",
            "tourism_professionalCategory",
            "tourism_zone"
          ]
            "tourism_zone",
          ],
        })
        .then(res => {
        .then((res) => {
          if (res.length > 0) {
            res.forEach(element => {
            res.forEach((element) => {
              let optionList = JSON.parse(element.config).option;
              if (element.refCode == "tourism_teachingLevel") {
                optionList.forEach(item => {
                optionList.forEach((item) => {
                  if (that.detailsInfo.tourism_teachingLevel == item.value) {
                    that.teachingLevel = item.name;
                  }
                });
              }
              if (element.refCode == "tourism_professionalCategory") {
                optionList.forEach(item => {
                optionList.forEach((item) => {
                  if (
                    that.detailsInfo.tourism_professionalCategory == item.value
                  ) {
@@ -365,7 +365,7 @@
                });
              }
              if (element.refCode == "tourism_zone") {
                optionList.forEach(item => {
                optionList.forEach((item) => {
                  if (that.detailsInfo.tourism_zone == item.value) {
                    that.zone = item.name;
                  }
@@ -382,7 +382,7 @@
        this.MG.store
          .delProductLink({
            productIds: [this.detailsInfo.id],
            linkType: this.config.refCodes.LinkType.FavoriteTextBook
            linkType: this.config.refCodes.LinkType.FavoriteTextBook,
          })
          .then(() => {
            this.detailsInfo.isFavourite = false;
@@ -390,20 +390,20 @@
      } else {
        let params = {
          productIds: [this.detailsInfo.id],
          linkType: this.config.refCodes.LinkType.FavoriteTextBook
          linkType: this.config.refCodes.LinkType.FavoriteTextBook,
        };
        this.MG.store.addProductLink(params).then(res => {
        this.MG.store.addProductLink(params).then((res) => {
          this.detailsInfo.isFavourite = true;
        });
      }
    },
    //获取教材资源信息
    getBookResource() {
      console.log(
        this.config.textBookResourceUrl +
          this.detailsInfo.refCode +
          "/resource.json"
      );
      // console.log(
      //   this.config.textBookResourceUrl +
      //     this.detailsInfo.refCode +
      //     "/resource.json"
      // );
      try {
        axios
          .get(
@@ -411,9 +411,9 @@
              this.detailsInfo.refCode +
              "/resource.json"
          )
          .then(async res => {
          .then(async (res) => {
            if (res.data.length > 0) {
              res.data.forEach(item => {
              res.data.forEach((item) => {
                if (item.resourceTypeShow == "图片") {
                  item.icon = this.imgIcon;
                } else if (item.resourceTypeShow == "视频") {
@@ -445,12 +445,14 @@
            }
            if (this.resourceData.length > 0) {
              this.resourceHave = true;
              this.initChart(this.resourceData);
              if (this.$refs.resourcesChart) {
                this.initChart(this.resourceData);
              }
            } else {
              this.resourceHave = false;
            }
          })
          .catch(error => {
          .catch((error) => {
            console.log(error);
            this.resourceData = [];
            this.resourceHave = false;
@@ -460,13 +462,14 @@
        this.resourceHave = false;
      }
    },
    groupByResourceTypeShow(resources) {
      const grouped = resources.reduce((acc, item) => {
        const key = item.resourceTypeShow;
        if (!acc[key]) {
          acc[key] = {
            resourceTypeShow: key,
            list: []
            list: [],
          };
        }
        acc[key].list.push(item);
@@ -480,7 +483,7 @@
      // 基于准备好的dom,初始化echarts实例
      let dataList = [];
      let num = [];
      data.forEach(item => {
      data.forEach((item) => {
        dataList.push(item.resourceTypeShow);
        num.push(item.list.length);
      });
@@ -489,7 +492,7 @@
      myChart.setOption({
        tooltip: {},
        xAxis: {
          data: dataList
          data: dataList,
        },
        yAxis: {},
        series: [
@@ -498,7 +501,7 @@
            type: "bar",
            data: num,
            itemStyle: {
              color: function(params) {
              color: function (params) {
                // params.dataIndex是数据项的索引,你可以根据这个索引来设置不同的颜色
                const colors = [
                  "#5EA1FF",
@@ -510,15 +513,16 @@
                  "#3DB0BF",
                  "#FBBB3B",
                  "#3B5EFB",
                  "#B1FB3B"
                  "#B1FB3B",
                ];
                return colors[params.dataIndex % colors.length];
              }
            }
          }
        ]
              },
            },
          },
        ],
      });
    },
    tabChange(val) {
      console.log(val, 1);
      if (val == 3) {
@@ -529,9 +533,32 @@
    //使用购书码
    useBookCode() {
      this.code = "";
      this.dialogCode = true;
      if (this.token == "" || this.token == undefined || this.token == null) {
        Dialog.confirm({
          title: "温馨提示",
          message: "请您登录后使用购书码",
          showCancelButton: true,
          cancelButtonText: "取消",
          confirmButtonText: "确定",
          inputType: "text",
          inputPlaceholder: "请输入购书码",
        })
          .then((res) => {
            if (res == "confirm") {
              toolClass.delCookie(myConfig.tokenKey);
              WeChat.getCode("weChatLogin");
              return false;
            }
          })
          .catch((err) => {
            console.log(err);
          });
      } else {
        this.code = "";
        this.dialogCode = true;
      }
    },
    onConfirm() {
      var that = this;
      let lock = true;
@@ -542,9 +569,9 @@
          lock = false;
          that.MG.store
            .getActiveCode({
              code: that.code
              code: that.code,
            })
            .then(res => {
            .then((res) => {
              console.log(res);
              if (res && res.saleMethodList) {
                if (
@@ -553,9 +580,9 @@
                ) {
                  that.MG.store
                    .userActiveCode({
                      code: that.code
                      code: that.code,
                    })
                    .then(res => {
                    .then((res) => {
                      Toast.success(res == "激活成功" ? "够买成功" : res);
                      lock = true;
                      that.dialogCode = false;
@@ -571,6 +598,7 @@
        }
      }
    },
    //到购买页面
    payNow() {
      this.MG.store
@@ -578,17 +606,17 @@
          requests: [
            {
              saleMethodId: this.detailsInfo.defaultSaleMethodId,
              count: 1
            }
          ]
              count: 1,
            },
          ],
        })
        .then(res => {
        .then((res) => {
          this.$router.push({
            path: "/pay",
            query: {
              orderNum: res.orderNumber,
              shopId: this.id
            }
              shopId: this.id,
            },
          });
        });
    },
@@ -613,10 +641,10 @@
        start: 0,
        size: 999,
        filterList: [],
        searchList: []
        searchList: [],
      };
      const res = await this.MG.store.getShoppingCartProductList(query);
      res.datas.forEach(item => {
      res.datas.forEach((item) => {
        that.shoppingCartGetId.push(item.saleMethod.id);
      });
@@ -630,11 +658,11 @@
            {
              saleMethodId: this.detailsInfo.defaultSaleMethodId,
              storeEventId: null,
              agentCode: ""
            }
          ]
              agentCode: "",
            },
          ],
        };
        this.MG.store.addShoppingCart(data).then(res => {
        this.MG.store.addShoppingCart(data).then((res) => {
          if (res) {
            Toast.success("加入购物车成功");
          }
@@ -644,13 +672,50 @@
    //申请试用
    applyBook() {
      const role = this.userInfo.role;
      if (role == "Teacher") {
        this.getAlreadyBookList(this.detailsInfo);
      if (this.token == "" || this.token == undefined || this.token == null) {
        Dialog.confirm({
          title: "温馨提示",
          message: "请您登录后申请试用",
          showCancelButton: true,
          cancelButtonText: "关闭",
          confirmButtonText: "确定",
          inputType: "text",
        }).then((res) => {
          if (res == "confirm") {
            toolClass.delCookie(myConfig.tokenKey);
            WeChat.getCode("weChatLogin");
            return false;
          }
        });
      } else {
        Toast.fail("您还未通过教师审核");
        const role = this.userInfo.role;
        if (role == "Teacher") {
          this.getAlreadyBookList(this.detailsInfo);
        } else {
          Dialog.confirm({
            title: "温馨提示",
            message: "您不是教师用户,请进行教师认证后申请试用。",
            messageAlign: "left",
            showCancelButton: true,
            cancelButtonText: "关闭",
            confirmButtonText: "教师认证",
            inputType: "text",
          })
            .then((res) => {
              if (res == "confirm") {
                this.$router.replace({
                  path: "/teacherCertificate",
                  query: { from: "bookDetail", ...this.$route.query },
                });
              }
            })
            .catch((err) => {
              console.log(err);
            });
        }
      }
    },
    //获取已申请试用列表
    getAlreadyBookList(bookData) {
      const data = {
@@ -660,12 +725,12 @@
        appRefCode: this.config.appRefCode,
        sort: {
          type: "Desc",
          field: "CreateDate"
        }
          field: "CreateDate",
        },
      };
      this.MG.ugc.getTopicMessageList(data).then(res => {
      this.MG.ugc.getTopicMessageList(data).then((res) => {
        if (res.datas.length > 0) {
          res.datas.map(item => {
          res.datas.map((item) => {
            if (item.feedBack) {
              item.feedBack = JSON.parse(item.feedBack);
              if (item.feedBack.endDate) {
@@ -683,7 +748,7 @@
            }
          });
          let objVal = res.datas.find(
            i =>
            (i) =>
              i.productId == bookData.id &&
              i.state != "Reject" &&
              i.state == "WaitAudit"
@@ -693,39 +758,40 @@
              title: "提示",
              message: "您已申请试用该书,是否前往查看",
              confirmButtonText: "确定",
              cancelButtonText: "取消"
              cancelButtonText: "取消",
            }).then(() => {
              this.$router.push({
                name: "myApplyBook"
                name: "myApplyBook",
              });
            });
          } else {
            this.$router.push({
              name: "bookApply",
              query: {
                bookInfo: JSON.stringify(this.detailsInfo)
              }
                bookInfo: JSON.stringify(this.detailsInfo),
              },
            });
          }
        } else {
          this.$router.push({
            name: "bookApply",
            query: {
              bookInfo: JSON.stringify(this.detailsInfo)
            }
              bookInfo: JSON.stringify(this.detailsInfo),
            },
          });
        }
      });
    },
    contactUs() {
      this.$router.push({
        name: "aboutUs"
        name: "aboutUs",
      });
    },
    onClickLeft() {
      this.$router.go(-1);
    }
    },
  },
  mounted() {
    //挂载成功后给pop事件绑定一个方法
@@ -741,7 +807,7 @@
  //组件销毁后清除事件
  destroyed() {
    window.removeEventListener("popstate", this.onClickLeft, false); //false阻止默认事件
  }
  },
};
</script>
@@ -860,6 +926,11 @@
  overflow: auto;
}
.detailBox {
  font-size: none;
  font-family: none;
}
.noData {
  font-size: 16px;
  font-weight: bold;
@@ -887,9 +958,9 @@
  width: 60px;
  height: 60px;
}
.autoImg{
  width:40px;
  height:40px;
.autoImg {
  width: 40px;
  height: 40px;
}
.titleCount {
@@ -933,8 +1004,8 @@
}
.btnImg {
  margin-top: 5px;
  height:20px;
  width:20px;
  height: 20px;
  width: 20px;
}
.disable {
  color: #999;
src/views/index/index.vue
@@ -27,7 +27,7 @@
            >
              <div
                :style="{
                  background: 'url(' + item.icon + ') no-repeat 100%,center'
                  background: 'url(' + item.icon + ') no-repeat 100%,center',
                }"
                alt
                class="banner"
@@ -131,10 +131,7 @@
        <div class="more" @click="openBtn('true')" v-else>收起 -</div>
      </div>
      <div class="partnerList">
        <div
          :class="isOpen ? 'list' : 'list1'"
          v-if="!partnersLoading && partnersList.length > 0"
        >
        <div class="list" v-if="!partnersLoading && partnersList.length > 0">
          <div
            class="partnerItem"
            v-for="(item, index) in partnersList"
@@ -142,11 +139,6 @@
          >
            <div class="imgBox">
              <img class="autoImg" :src="item.icon" />
            </div>
            <div class="bookInfo">
              <div class="title" :title="item.name">
                {{ item.name }}
              </div>
            </div>
          </div>
        </div>
@@ -180,21 +172,21 @@
            img: require("@/assets/images/home/guanwang3.png"),
            circleName: "官网主页",
            url: "https://www.tepcb.com/mobile/website/",
            itemN: "circle-one"
            itemN: "circle-one",
          },
          {
            img: require("@/assets/images/home/shuzijiaocai3.png"),
            circleName: "数字教材",
            url: "/bookList",
            itemN: "circle-two"
            itemN: "circle-two",
          },
          {
            img: require("@/assets/images/home/jiaoshirenzheng3.png"),
            circleName: "教师认证",
            url: "/teacherCertificate",
            itemN: "circle-three"
          }
        ]
            itemN: "circle-three",
          },
        ],
      },
      bookRecommendList: [],
      bookRecommendLoading: true,
@@ -203,7 +195,7 @@
      partnersList: [],
      partnersLoading: false,
      isOpen: true,
      token: ""
      token: "",
    };
  },
  created() {
@@ -219,26 +211,26 @@
    that.getPartnersList();
  },
  computed: {
    ...mapState(["userInfo"])
    ...mapState(["userInfo"]),
  },
  methods: {
    getUserRoleMine() {
      let that = this;
      that.MG.identity.getCurrentAppUser().then(res => {
      that.MG.identity.getCurrentAppUser().then((res) => {
        if (res) {
          that.userId = res.userId;
          let teacherRole = res.roleLinks.find(
            item => item.role?.refCode == "teacher"
            (item) => item.role?.refCode == "teacher"
          );
          let teacherInfo = res.infoList.find(
            item => item.type == "teacherInfo"
            (item) => item.type == "teacherInfo"
          );
          let wechatInfo = res.infoList.find(item => item.type == "WeChat");
          let wechatInfo = res.infoList.find((item) => item.type == "WeChat");
          let studentInfo = res.infoList.find(
            item => item.type == "basicInfo" || item.type == "Default"
            (item) => item.type == "basicInfo" || item.type == "Default"
          );
          let phoneInfo = res.secretList.find(
            item => item.type == "MobilePhone"
            (item) => item.type == "MobilePhone"
          );
          if (teacherRole && teacherInfo) {
            this.$store.dispatch("setUserInfo", {
@@ -246,20 +238,20 @@
              phoneNumber: phoneInfo?.credential,
              icon: wechatInfo?.icon,
              role: "Teacher",
              roleId: teacherRole.role.id
              roleId: teacherRole.role.id,
            });
          } else if (wechatInfo) {
            this.$store.dispatch("setUserInfo", {
              ...wechatInfo,
              phoneNumber: phoneInfo?.credential,
              role: "Student"
              role: "Student",
            });
          } else if (studentInfo) {
            this.$store.dispatch("setUserInfo", {
              ...studentInfo,
              icon: wechatInfo?.icon,
              phoneNumber: phoneInfo?.credential,
              role: "Student"
              role: "Student",
            });
          }
        }
@@ -270,9 +262,9 @@
    getBanner() {
      this.MG.resource
        .getItem({
          path: "tourism_digitalTextbook\\tourism_digitalBannerMobile"
          path: "tourism_digitalTextbook\\tourism_digitalBannerMobile",
        })
        .then(res => {
        .then((res) => {
          this.educate.swipePic = res.datas;
          console.log(res.datas);
        });
@@ -282,8 +274,8 @@
      this.$router.push({
        path: "/bookList",
        query: {
          searchAllWords: this.searchAllWords
        }
          searchAllWords: this.searchAllWords,
        },
      });
    },
    //推荐教材
@@ -301,22 +293,22 @@
          queryType: "*",
          paging: {
            start: 0,
            size: 5
            size: 5,
          },
          fields: {
            tourism_author: [],
            tourism_publicationDate: [],
            viewCount: []
            viewCount: [],
          },
          sort: {
            type: "Desc",
            field: "CreateDate"
            field: "CreateDate",
          },
          coverSize: {
            height: 560
          }
            height: 560,
          },
        })
        .then(res => {
        .then((res) => {
          this.bookRecommendList = res.datas;
          this.bookRecommendLoading = false;
        });
@@ -327,8 +319,8 @@
      this.$router.push({
        path: "/bookDetail",
        query: {
          id: data.id
        }
          id: data.id,
        },
      });
    },
    // 轮播图下方 列表跳转页面
@@ -338,13 +330,13 @@
        window.open(url);
      } else {
        this.$router.push({
          path: url
          path: url,
        });
      }
    },
    showMore() {
      this.$router.push({
        path: "/bookList"
        path: "/bookList",
      });
    },
    //视频说明
@@ -354,12 +346,12 @@
          path: "tourism_digitalTextbook\\tourism_digitalRecommendedTextbooks",
          fields: {
            tourism_file: [],
            tourism_content: []
          }
            tourism_content: [],
          },
        })
        .then(res => {
        .then((res) => {
          if (res.datas.length > 0) {
            res.datas.forEach(element => {
            res.datas.forEach((element) => {
              if (
                element.refCode == "tourism_digitalRecommendedTextbooksMobile"
              ) {
@@ -382,7 +374,7 @@
    },
    getManual() {
      this.$router.push({
        path: "/manual"
        path: "/manual",
      });
    },
    //合作院校
@@ -391,10 +383,16 @@
      this.MG.resource
        .getItem({
          path: "tourism_digitalTextbook\\tourism_digitalPartners",
          fields: {}
          fields: {},
        })
        .then(res => {
          this.partnersList = res.datas;
        .then((res) => {
          const data = res.datas;
          if (this.isOpen) {
            this.partnersList = data.slice(0, 4);
          } else {
            this.partnersList = data;
          }
          this.partnersLoading = false;
        });
    },
@@ -404,11 +402,12 @@
      } else {
        this.isOpen = false;
      }
    }
      this.getPartnersList();
    },
  },
  components: {
    Footer
  }
    Footer,
  },
};
</script>
<style scoped>
@@ -612,8 +611,8 @@
}
.titleBox .operate img {
  margin-right: 6px;
  width:24px;
  height:24px;
  width: 24px;
  height: 24px;
}
.descriptionBox {
@@ -635,24 +634,28 @@
.partnerList {
  margin-top: 10px;
  overflow: hidden;
  min-height: 180px;
  min-height: 150px;
  flex-wrap: wrap;
}
.list {
  height: 160px;
  min-height: 110px;
  overflow: hidden;
}
.list1 {
/* .list1 {
  line-height: 1.5;
  min-height: 160px;
}
} */
.partnerItem {
  width: calc(100% / 4 - 10px);
  width: 25%;
  display: block;
  box-sizing: border-box;
  float: left;
  padding: 5px 20px;
}
.partnerItem .imgBox {
  position: relative;
  width: 100%;
  height: 100px;
  min-height: 60px;
}
.partnerItem .bookInfo {
  margin: 0;
src/views/index/manual.vue
@@ -1,12 +1,12 @@
<template>
 <div class="manualPage">
  <div class="manualPage">
    <van-nav-bar
      title="操作手册"
      left-text
      left-arrow
      @click-left="onClickLeft"
    />
    <div style="padding-top: 20px;" v-html="manualCon"></div>
    <div style="padding-top: 20px" v-html="manualCon"></div>
  </div>
</template>
@@ -16,14 +16,13 @@
  data() {
    return {
      manualCon: "",
    };
  },
  created() {
    this.getOperating()
    this.getOperating();
  },
  methods: {
     onClickLeft() {
    onClickLeft() {
      this.$router.go(-1);
    },
    //操作手册
@@ -37,22 +36,27 @@
        })
        .then((res) => {
          if (res.datas.length > 0) {
            res.datas.forEach((item) => {
              item.tourism_content = item.tourism_content.replace(
                /<img/g,
                '<img style="max-width:100%;height:auto"'
              );
              item.tourism_content = item.tourism_content.replace(
                /\..\/file/g,
                this.config.requestCtx + "/file"
              );
            });
            this.manualCon = res.datas[0].tourism_content;
          }
        });
    },
  }
  },
};
</script>
<style scoped>
.manualPage{
    width:100%;
    height:100%;
    padding: 15px;
.manualPage {
  width: 100%;
  height: 100%;
  padding: 15px;
}
</style>
src/views/personalCenter/teacherCertificate.vue
@@ -150,7 +150,7 @@
            label="联系电话"
            :rules="[
              { required: true, message: '请填写您的手机号码!' },
              { pattern: /^1[3456789]\d{9}$/, message: '手机号码格式错误!' }
              { pattern: /^1[3456789]\d{9}$/, message: '手机号码格式错误!' },
            ]"
            placeholder="请输入您的联系电话"
          />
@@ -216,7 +216,11 @@
          </div>
          <div
            v-if="!stateDisable"
            style="background-color: rgb(240, 240, 240); padding-top: 25px; height: 175px"
            style="
              background-color: rgb(240, 240, 240);
              padding-top: 25px;
              height: 175px;
            "
          >
            <van-checkbox
              v-model="approve.agree"
@@ -241,7 +245,7 @@
            </div>
          </div>
          <div v-if="stateDisable && approve.state != 'WaitAudit'">
            <div style="margin:40px;">
            <div style="margin: 40px">
              <van-button round block type="info" @click="stateDisable = false"
                >修 改</van-button
              >
@@ -294,7 +298,7 @@
      protocolTxt: "",
      refCode: "",
      headers: {
        Authorization: ""
        Authorization: "",
      },
      submitDisabled: true, // 提交按钮,默认禁选
      showPicker: false,
@@ -337,7 +341,7 @@
        //相关证件
        certificate: [],
        // 教师同意勾选框
        checked: false
        checked: false,
      },
      isUpdate: false,
@@ -358,7 +362,7 @@
        // description: "", //个人简介
        relevantCertificates: [], //相关证件
        state: "", //审核状态默认待审核
        agree: false
        agree: false,
      },
      //picker选择列表
      colunmsJob: [
@@ -370,7 +374,7 @@
        "系副主任",
        "专业负责人",
        "主任",
        "其他"
        "其他",
      ],
      colunmsTitle: ["正高级", "高级", "一级", "二级", "三级", "无"],
      colunmsEdu: ["大专", "本科", "硕士", "博士"],
@@ -379,14 +383,14 @@
      fileList: [],
      isWaitAudit: false,
      userId: "",
      isFree: false
      isFree: false,
    };
  },
  watch: {
    "approve.agree": {
      handler(val) {
        this.submitDisabled = !val;
      }
      },
    },
    $route(to, from) {
      if (
@@ -395,7 +399,7 @@
      ) {
        this.getProtocol();
      }
    }
    },
  },
  created() {
    var that = this;
@@ -432,7 +436,7 @@
    finishAddress({ selectedOptions }) {
      this.showPicker3 = false;
      this.approve.region = selectedOptions
        .map(option => option.text)
        .map((option) => option.text)
        .join("/");
    },
    deleteFile(file) {
@@ -444,33 +448,39 @@
    },
    getUserRole() {
      let that = this;
      that.MG.identity.getCurrentAppUser().then(res => {
      that.MG.identity.getCurrentAppUser().then((res) => {
        that.userId = res.userId;
        let teacherRole = res.roleLinks.find(item => item.role?.refCode == "teacher");
        let teacherInfo = res.infoList.find(item => item.type == "teacherInfo") ?? {};
        let wechatInfo = res.infoList.find(item => item.type == "WeChat") ?? {};
        let studentInfo = res.infoList.find(item => item.type == "Default");
        let phoneInfo = res.secretList.find(item => item.type == "MobilePhone");
        let teacherRole = res.roleLinks.find(
          (item) => item.role?.refCode == "teacher"
        );
        let teacherInfo =
          res.infoList.find((item) => item.type == "teacherInfo") ?? {};
        let wechatInfo =
          res.infoList.find((item) => item.type == "WeChat") ?? {};
        let studentInfo = res.infoList.find((item) => item.type == "Default");
        let phoneInfo = res.secretList.find(
          (item) => item.type == "MobilePhone"
        );
        if (teacherRole && teacherInfo) {
          this.$store.dispatch("setUserInfo", {
            ...teacherInfo,
            phoneNumber: phoneInfo?.credential,
            icon: wechatInfo?.icon,
            role: "Teacher",
            roleId: teacherRole.role.id
            roleId: teacherRole.role.id,
          });
        } else if (wechatInfo) {
          this.$store.dispatch("setUserInfo", {
            ...wechatInfo,
            phoneNumber: phoneInfo?.credential,
            role: "Student"
            role: "Student",
          });
        } else if (studentInfo) {
          this.$store.dispatch("setUserInfo", {
            ...studentInfo,
            icon: wechatInfo?.icon,
            phoneNumber: phoneInfo?.credential,
            role: "Student"
            role: "Student",
          });
        }
      });
@@ -478,9 +488,9 @@
    getType() {
      const data = {
        refCodes: ["tourism_teacherCertification"]
        refCodes: ["tourism_teacherCertification"],
      };
      this.MG.resource.getCmsTypeByRefCode(data).then(res => {
      this.MG.resource.getCmsTypeByRefCode(data).then((res) => {
        this.newGetTeacherInfo();
        this.worksInfo = res[0].cmsTypeLinks[0].children;
      });
@@ -496,15 +506,15 @@
        appRefCode: "tourismWebsite",
        sort: {
          type: "Desc",
          field: "CreateDate"
        }
          field: "CreateDate",
        },
      };
      that.MG.ugc.getTopicMessageList(data).then(res => {
      that.MG.ugc.getTopicMessageList(data).then((res) => {
        try {
          if (res.datas.length > 0) {
            that.fileList = [];
            const resData = res.datas.find(
              i => i.appUserCreator.userId == that.userId
              (i) => i.appUserCreator.userId == that.userId
            );
            that.approve = that.tool.resultsBytool(
              that.worksInfo,
@@ -528,7 +538,7 @@
            }
            if (that.approve.relevantCertificates.length > 0) {
              if (typeof that.approve.relevantCertificates == "object") {
                that.approve.relevantCertificates.forEach(ele => {
                that.approve.relevantCertificates.forEach((ele) => {
                  let imgObj = {
                    md5: ele.file.md5,
                    url:
@@ -537,7 +547,7 @@
                      ele.file.md5,
                    linkType: "LinkFile",
                    linkProtectType: "Public",
                    isImage: true
                    isImage: true,
                  };
                  that.fileList.push(imgObj);
                });
@@ -550,7 +560,7 @@
                  md5: that.approve.relevantCertificates,
                  linkType: "LinkFile",
                  linkProtectType: "Public",
                  isImage: true
                  isImage: true,
                };
                that.fileList.push(imgObj);
              }
@@ -570,13 +580,13 @@
        .getItem({
          path: "tourism_protocol",
          fields: {
            tourism_content: []
          }
            tourism_content: [],
          },
        })
        .then(res => {
        .then((res) => {
          try {
            const data = res.datas.find(
              e => e.refCode == "tourism_teacherCertificationAgreement"
              (e) => e.refCode == "tourism_teacherCertificationAgreement"
            );
            this.protocolTxt = data ? data.tourism_content : "暂无协议";
          } catch (error) {
@@ -609,7 +619,7 @@
              this.worksInfo,
              this.approve,
              this.fileList
            )
            ),
          };
          let basicInfo = JSON.parse(JSON.stringify(this.approve));
          delete basicInfo.agree;
@@ -620,16 +630,24 @@
              {
                data: JSON.stringify(basicInfo),
                name: basicInfo.fullName,
                type: "teacherInfo"
              }
            ]
                type: "teacherInfo",
              },
            ],
          };
          this.MG.identity.setAppUserInfo(userInfo).then(res => {
          this.MG.identity.setAppUserInfo(userInfo).then((res) => {
            this.MG.ugc.newTopicMessage(data).then(() => {
              console.log(res);
              this.subLoading = true;
              const fromRouter = this.$route.query;
              if (res !== false) {
                that.newGetTeacherInfo();
              }
              if (fromRouter.from && fromRouter.from == "bookDetail") {
                this.$router.replace({
                  name: "bookDetail",
                  query: {
                    id: this.$route.query.id,
                  },
                });
              }
            });
          });
@@ -665,8 +683,8 @@
        newDataRequests: fields.newData,
        updateDataRequests: fields.updateData,
        delDataRequest: {
          ids: []
        }
          ids: [],
        },
      };
      delete basicInfo.tourism_relevantCertificates;
      delete basicInfo.agree;
@@ -677,17 +695,26 @@
          {
            data: JSON.stringify(basicInfo),
            name: basicInfo.fullName,
            type: "newTeacherInfo"
          }
        ]
            type: "newTeacherInfo",
          },
        ],
      };
      this.MG.identity.setAppUserInfo(userInfo).then(res => {
      this.MG.identity.setAppUserInfo(userInfo).then((res) => {
        if (res) {
          this.MG.ugc.updateTopicMessage(data).then(res => {
          this.MG.ugc.updateTopicMessage(data).then((res) => {
            this.subLoading = false;
            const fromRouter = this.$route.query;
            if (res !== false) {
              this.getUserRole();
              this.newGetTeacherInfo();
            }
            if (fromRouter.from && fromRouter.from == "bookDetail") {
              this.$router.replace({
                name: "bookDetail",
                query: {
                  id: this.$route.query.id,
                },
              });
            }
          });
        }
@@ -737,7 +764,7 @@
      let size = 1024;
      that.tool
        .getFileMd5(file.file, size * 1024)
        .then(e => {
        .then((e) => {
          const imgData = new FormData();
          that.fileMd5 = e;
          imgData.append("Md5", e);
@@ -746,14 +773,14 @@
          imgData.append("FileType", FileType);
          imgData.append("MetaData", null);
          imgData.append("file", file.file);
          that.MG.file.upload(imgData).then(res => {
          that.MG.file.upload(imgData).then((res) => {
            if (res) {
              this.fileList.push({
                md5: e,
                url: this.config.requestCtx + `/file/GetPreViewImage?md5=` + e,
                linkType: "LinkFile",
                linkProtectType: "Public",
                isImage: true
                isImage: true,
              });
              this.approve.relevantCertificates = this.fileList;
              // this.fileList = this.approve.relevantCertificates
@@ -761,7 +788,7 @@
            }
          });
        })
        .catch(e => {
        .catch((e) => {
          that.isLoding = false;
          console.error(e);
        });
@@ -802,12 +829,12 @@
      }
      this.MG.store
        .getProductTypeField({
          refCodes: ["post"]
          refCodes: ["post"],
        })
        .then(res => {
        .then((res) => {
          if (res && res[0].config) {
            let list = JSON.parse(res[0].config).option;
            list.forEach(item => {
            list.forEach((item) => {
              item.text = item.name;
            });
            this.colunmsJob = list;
@@ -822,12 +849,12 @@
      }
      this.MG.store
        .getProductTypeField({
          refCodes: ["positionalTitle"]
          refCodes: ["positionalTitle"],
        })
        .then(res => {
        .then((res) => {
          if (res && res[0].config) {
            let list = JSON.parse(res[0].config).option;
            list.forEach(item => {
            list.forEach((item) => {
              item.text = item.name;
            });
            this.colunmsTitle = list;
@@ -841,12 +868,12 @@
      }
      this.MG.store
        .getProductTypeField({
          refCodes: ["education"]
          refCodes: ["education"],
        })
        .then(res => {
        .then((res) => {
          if (res && res[0].config) {
            let list = JSON.parse(res[0].config).option;
            list.forEach(item => {
            list.forEach((item) => {
              item.text = item.name;
            });
            this.colunmsEdu = list;
@@ -877,8 +904,8 @@
    onConfirm2(value) {
      this.approve.education = value.text;
      this.showPicker2 = false;
    }
  }
    },
  },
};
</script>
src/views/testLogin.vue
@@ -24,7 +24,7 @@
  name: "login",
  data() {
    return {
      username: "15200000002",
      username: "qiyunfeng",
      password: "xA123456"
      // username: "guest",
      // password: "guest"