shish 3 lat temu
rodzic
commit
ff3dc2ef69
2 zmienionych plików z 22 dodań i 15 usunięć
  1. 11 12
      ghsApp/src/admin/item/list.vue
  2. 11 3
      hdApp/src/admin/ghsProduct/detail.vue

+ 11 - 12
ghsApp/src/admin/item/list.vue

@@ -125,7 +125,7 @@ import { breakItem,getHdPoster,getSkPoster } from '@/api/item'
 import uniPopup from '@/uni_modules/uni-popup/components/uni-popup/uni-popup.vue';
 import ModalModule from "@/components/plugin/modal"
 export default {
-	name: "item_list",
+	name: "list",
 	components: {
 		AppSearchModule,
 		AppWrapperEmpty,
@@ -190,7 +190,7 @@ export default {
 				uni.hideLoading()
 				if(res.code == 1){
 					that.posterUrl = res.data.imgUrl
-					this.$refs.posterShow.open('top')
+					that.$refs.posterShow.open('top')
 				}
 			})
 		},
@@ -202,7 +202,7 @@ export default {
 				uni.hideLoading()
 				if(res.code == 1){
 					that.posterUrl = res.data.imgUrl
-					this.$refs.posterShow.open('top')
+					that.$refs.posterShow.open('top')
 				}
 			})
 		},
@@ -211,16 +211,15 @@ export default {
 			uni.downloadFile({
 				url: this.posterUrl,
 				success: (res) => {
-				if (res.statusCode === 200) {
-					console.log(res)
-					uni.saveImageToPhotosAlbum({
-					filePath: res.tempFilePath,
-					success: function (data) {
-						that.$refs.posterShow.close()
-						uni.showToast({title:'保存成功'})
+					if (res.statusCode === 200) {
+						uni.saveImageToPhotosAlbum({
+						filePath: res.tempFilePath,
+						success: function (data) {
+							that.$refs.posterShow.close()
+							uni.showToast({title:'保存成功'})
+						}
+						});
 					}
-					});
-				}
 				}
 			});
 		},

+ 11 - 3
hdApp/src/admin/ghsProduct/detail.vue

@@ -79,8 +79,9 @@ export default {
       loginShow: false,
       showShare: false,
       isShare:true,
-		pageType: "cg",
-      notOpenShop:true
+      pageType: "cg",
+      notOpenShop:true,
+      currentId:0
     };
   },
   onLoad(option) {},
@@ -123,6 +124,7 @@ export default {
 				}
         let id = sceneArray.id ? sceneArray.id : 0
         let shopId = sceneArray.sId ? sceneArray.sId : 0
+        that.currentId = id
         if(Number(id)>0 && Number(shopId)>0){
           ghsInfo({shopId: shopId}).then(res => {
             let ghsId = res.data.id
@@ -133,6 +135,7 @@ export default {
           that.$msg('二维码有问题')
         }
 			}else{
+        that.currentId = this.option.id
         if(this.option.ghsId){
           this.isShare = false
           getGhsDataApi({id: this.option.ghsId}).then(res => {
@@ -164,8 +167,13 @@ export default {
       this.buyNum = e.value;
     },
     showPopup() {
+        let that = this
         if(this.notOpenShop == true){
-          this.$msg('你还没有注册哦')
+
+          that.$util.confirmModal({content:'请先注册登录哦',okText:'好的'},() => {
+            that.pageTo({url:'/admin/home/login',type:2})
+          })
+
           return false;
         }
         this.popupShow = true