shish 5 лет назад
Родитель
Сommit
94b29b30fc

+ 24 - 28
ghsApp/src/admin/home/mall.vue

@@ -34,29 +34,22 @@ export default {
         this.getappIdList = res.data
       });
     },
-    downloadImg() {
+    downloadImg(){
       uni.downloadFile({
         url: this.imgUrl,
         success: (res) => {
-          console.log(res)
-          uni.saveImageToPhotosAlbum({
-            filePath: res.tempFilePath,
-            success: function() {
-              uni.showToast({
-                title: '保存成功',
-                icon: 'none'
-              });
-            },
-            fail: (res) => {
-              // this.$msg('保存失败')
-              uni.showToast({
-                title: '保存失败',
-                icon: 'none'
-              });
-            }
-          })
-        },
-      })
+          if (res.statusCode === 200) {
+            console.log(res)
+            uni.saveImageToPhotosAlbum({
+              filePath: res.tempFilePath,
+              success: function (data) {
+                console.log(data)
+                uni.showToast({title:'下载成功!'})
+              }
+            });
+          }
+        }
+      });
     },
     getImg() {
       mainGetMallPoster().then(res => {
@@ -66,15 +59,18 @@ export default {
     },
     goToMallPt (url) {
       let self = this
-      console.log(url + '?account=' + self.loginInfo.shopId)
+        console.log(url + '?account=' + self.loginInfo.shopId)
         uni.navigateToMiniProgram({
-          appId: this.getappIdList.mall.miniAppId,
-          path: url + '?account=' + self.loginInfo.shopId,
-          //develop 开发版 trial 体验版 release 正式版
-          envVersion: process.env.NODE_ENV === 'development' ? 'develop' : 'release',
-          extraData: {
-            'hdShopAdminId': self.loginInfo.shopAdminId
-          },
+					//姜枫-2021.04.13
+					appId: this.getappIdList.hd.miniAppId,
+					path: 'pagesPurchase/ghsProduct?shopId='+ this.loginInfo.shopId+'&id=0&ghsShopAdminId='+this.loginInfo.shopAdminId,
+					//develop 开发版 trial 体验版 release 正式版
+					envVersion: process.env.NODE_ENV === 'development' ? 'develop' : 'release',
+					extraData: {
+						'shopId': this.loginInfo.shopId,
+						'id': 0,
+						'name':'',
+					},
           success (res) {
           }
         })

+ 1 - 1
ghsApp/src/pagesStorehouse/inventory/list.vue

@@ -63,7 +63,7 @@ import { getCheckOrderListApi } from "@/api/inventory/index";
 
 import { list } from "@/mixins";
 export default {
-	name: "盘点",
+	name: "panDianList",
 	components: { Tabs, AppWrapperEmpty },
 	mixins: [list],
 	data() {

+ 13 - 21
hdApp/src/admin/home/mall.vue

@@ -34,30 +34,22 @@ export default {
         this.getappIdList = res.data
       });
     },
-    downloadImg() {
+    downloadImg(){
       uni.downloadFile({
         url: this.imgUrl,
         success: (res) => {
-          console.log(res)
-          uni.saveImageToPhotosAlbum({
-            filePath: res.tempFilePath,
-            success: function() {
-              // this.$msg('保存成功')
-              uni.showToast({
-                title: '保存成功',
-                icon: 'none'
-              });
-            },
-            fail: (res) => {
-              // this.$msg('保存失败')
-              uni.showToast({
-                title: '保存失败',
-                icon: 'none'
-              });
-            }
-          })
-        },
-      })
+          if (res.statusCode === 200) {
+            console.log(res)
+            uni.saveImageToPhotosAlbum({
+              filePath: res.tempFilePath,
+              success: function (data) {
+                console.log(data)
+                uni.showToast({title:'下载成功!'})
+              }
+            });
+          }
+        }
+      });
     },
     getImg() {
       mainGetMallPoster().then(res => {

+ 2 - 4
hdApp/src/admin/shop/downloadCode.vue

@@ -8,7 +8,6 @@
 			margin: 0 auto;
 			image{width: 100%;height: 100%}
 		}
-
 		.downloadCode-btn{
 			width: 60%;
 			height: 60rpx;
@@ -30,7 +29,6 @@
 </template>
 
 <script>
-	// api
 	import { getGatheringCodeUrl } from '@/api/shop'
 	export default {
 		name: 'shop-list',
@@ -47,12 +45,12 @@
 		methods: {
 			getGatheringCodeUrlFun(id){
 				getGatheringCodeUrl({id:id}).then(res => {
-					this.codeImg = res.data.url;
+					this.codeImg = res.data.url
 				})
 			},
 			downloadCodeFun(){
 				uni.showLoading({
-					title: '下载中..'
+					title: '下载中...'
 				});
 				uni.downloadFile({
 					url: this.codeImg,