Browse Source

继续学习调用查看已读接口

natasha 1 day ago
parent
commit
adb08a9f31

+ 1 - 1
src/components/common/BookCard.vue

@@ -184,7 +184,7 @@ export default {
     },
     },
     async handleLink() {
     async handleLink() {
       let url = this.LoginNavIndex + "&&&1&&&2&&&3&&&" + this.previousPage;
       let url = this.LoginNavIndex + "&&&1&&&2&&&3&&&" + this.previousPage;
-      if (this.LoginNavIndex === 1 && this.userMessage) {
+      if (this.LoginNavIndex === 0 && this.userMessage) {
         let MethodName = "/ShopServer/Client/BookshelfQuery/SetMyGoodsIsLooked";
         let MethodName = "/ShopServer/Client/BookshelfQuery/SetMyGoodsIsLooked";
         let data = {
         let data = {
           goods_id: this.item.id,
           goods_id: this.item.id,

+ 27 - 0
src/views/bookShelf/bookItem.vue

@@ -951,8 +951,18 @@ export default {
         this.headerBorder +
         this.headerBorder +
         "&&&" +
         "&&&" +
         this.headerBg;
         this.headerBg;
+      let MethodNames = "/ShopServer/Client/BookshelfQuery/SetMyGoodsIsLooked";
+      let datas = {
+        goods_id: this.$route.query.id,
+        goods_type: 0,
+      };
+
       if (this.bookType === "baozhi" || this.info.goods_type === 2) {
       if (this.bookType === "baozhi" || this.info.goods_type === 2) {
         let articleId = "";
         let articleId = "";
+        datas.goods_type = 2;
+        await getLogin(MethodNames, datas)
+          .then((res) => {})
+          .catch(() => {});
         if (this.info.last_read_art_id) {
         if (this.info.last_read_art_id) {
           articleId = this.info.last_read_art_id;
           articleId = this.info.last_read_art_id;
         } else {
         } else {
@@ -979,6 +989,7 @@ export default {
           art_id: articleId,
           art_id: articleId,
         };
         };
         await getLogin(MethodName, data).then((res) => {});
         await getLogin(MethodName, data).then((res) => {});
+
         this.$router.push({
         this.$router.push({
           path: "/articleDetail",
           path: "/articleDetail",
           query: {
           query: {
@@ -988,6 +999,10 @@ export default {
           },
           },
         });
         });
       } else if (this.bookType === "huakan" || this.info.goods_type === 4) {
       } else if (this.bookType === "huakan" || this.info.goods_type === 4) {
+        datas.goods_type = 4;
+        await getLogin(MethodNames, datas)
+          .then((res) => {})
+          .catch(() => {});
         this.$router.push({
         this.$router.push({
           path: "/magazineDetail",
           path: "/magazineDetail",
           query: {
           query: {
@@ -996,6 +1011,10 @@ export default {
           },
           },
         });
         });
       } else if (this.info.goods_type === 3) {
       } else if (this.info.goods_type === 3) {
+        datas.goods_type = 3;
+        await getLogin(MethodNames, datas)
+          .then((res) => {})
+          .catch(() => {});
         this.$router.push({
         this.$router.push({
           path: "/bookPeruseItem",
           path: "/bookPeruseItem",
           query: {
           query: {
@@ -1005,6 +1024,10 @@ export default {
           },
           },
         });
         });
       } else if (this.bookType === "huakan" || this.info.goods_type === 4) {
       } else if (this.bookType === "huakan" || this.info.goods_type === 4) {
+        datas.goods_type = 4;
+        await getLogin(MethodNames, datas)
+          .then((res) => {})
+          .catch(() => {});
         this.$router.push({
         this.$router.push({
           path: "/magazineDetail",
           path: "/magazineDetail",
           query: {
           query: {
@@ -1013,6 +1036,10 @@ export default {
           },
           },
         });
         });
       } else {
       } else {
+        datas.goods_type = 0;
+        await getLogin(MethodNames, datas)
+          .then((res) => {})
+          .catch(() => {});
         this.$router.push({
         this.$router.push({
           path: this.info.type === 1 ? "/courseDetail" : "/videoDetail",
           path: this.info.type === 1 ? "/courseDetail" : "/videoDetail",
           query: {
           query: {

+ 9 - 1
src/views/bookShelf/bookPeruseItem.vue

@@ -349,7 +349,7 @@ export default {
       // this.paymentShow = true;
       // this.paymentShow = true;
     },
     },
     // 跳转
     // 跳转
-    handleLink() {
+    async handleLink() {
       let url =
       let url =
         this.LoginNavIndex +
         this.LoginNavIndex +
         "&&&" +
         "&&&" +
@@ -358,6 +358,14 @@ export default {
         this.headerBorder +
         this.headerBorder +
         "&&&" +
         "&&&" +
         this.headerBg;
         this.headerBg;
+      let MethodNames = "/ShopServer/Client/BookshelfQuery/SetMyGoodsIsLooked";
+      let datas = {
+        goods_id: this.$route.query.id,
+        goods_type: 3,
+      };
+      await getLogin(MethodNames, datas)
+        .then((res) => {})
+        .catch(() => {});
       this.$router.push({
       this.$router.push({
         path: "/articlePeruseDetail",
         path: "/articlePeruseDetail",
         query: {
         query: {