Просмотр исходного кода

Merge branch 'master' of http://git.huaml.com/zhh/front-end

jf 5 лет назад
Родитель
Сommit
b002853e23

+ 0 - 4
ghsApp/src/admin/home/workbench.vue

@@ -121,7 +121,6 @@ import FabModule from "@/components/plugin/fab";
 import AppAvatarModule from "@/components/module/app-avatar";
 import ModalModule from "@/components/plugin/modal";
 import { getDataTimestamp } from "@/utils/common";
-import { getWeixinId } from "@/api/invite/index";
 import { getUser } from "@/utils/auth";
 import { consoleIndex } from "@/api/workbench";
 import noneHd from "@/components/none-hd";
@@ -310,9 +309,6 @@ export default {
 	methods: {
 		init() {
 
-			getWeixinId().then(res => {
-				this.getappIdList = res.data
-			});
 			getUser().then(res => {
 				uni.setNavigationBarTitle({
 					title: res.name

+ 16 - 0
ghsApp/src/api/apply/index.js

@@ -0,0 +1,16 @@
+import https from "@/plugins/luch-request_0.0.7/request";
+
+/**
+ * 邀请花店(零售、供货商相同)  wangning  2021-6-13
+ * @param {*} name
+ */
+export const applyInviteHdPoster = name => {
+	return https.get("/apply/invite-hd-poster", { name });
+};
+/**
+ * 邀请供货商(零售、供货商相同)
+ * @param {*} name
+ */
+ export const applyInviteGhsPoster = name => {
+	return https.get("/apply/invite-ghs-poster", { name });
+};

+ 12 - 0
ghsApp/src/pages.json

@@ -691,6 +691,18 @@
 						"navigationBarTitleText": "邀请开店",
 						"enablePullDownRefresh": true
 					}
+				},
+        {
+					"path": "inviteShop",
+					"style": {
+						"navigationBarTitleText": ""
+					}
+				},
+        {
+					"path": "inviteGhsShop",
+					"style": {
+						"navigationBarTitleText": ""
+					}
 				}
 			]
 		},

+ 119 - 0
ghsApp/src/pagesInvite/inviteGhsShop.vue

@@ -0,0 +1,119 @@
+<template>
+  <view class="app-content">
+    <view class="img_box">
+      <image :src="imgUrl" class="img_url"></image>
+    </view>
+    <!-- 确认 -->
+      <div class="confirm-btn">
+        <button class="admin-button-com big blue" @click="downloadImg">保存图片分邀请</button>
+      </div>
+      <div class="confirm-btn1">
+        <button class="admin-button-com big blue" @click="goToMallPt()">直接打开分享</button>
+      </div>
+  </view>
+</template>
+
+<script>
+import { applyInviteGhsPoster } from '@/api/apply/index'
+import { getWeixinId } from "@/api/invite/index";
+import { mapGetters } from "vuex";
+export default {
+  data() {
+    return {
+      imgUrl: '',
+      getappIdList: {}
+    }
+  },
+  computed: {
+    ...mapGetters({ loginInfo: "getLoginInfo" })
+  },
+  methods: {
+    init() {
+      this.getImg()
+      getWeixinId().then(res => {
+        this.getappIdList = res.data
+      });
+    },
+    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'
+              });
+            }
+          })
+        },
+      })
+    },
+    getImg() {
+      applyInviteGhsPoster().then(res => {
+        console.log(res)
+        this.imgUrl = res.data.imgUrl
+      }).catch(err => {})
+    },
+    goToMallPt () {
+      //查看分享的路径,不要删除 shish 20210517
+			console.log('pagesClient/official/index?hdShopAdminId='+this.loginInfo.shopAdminId)
+
+			getWeixinId().then(res => {
+				uni.navigateToMiniProgram({
+					appId: res.data.ghs.miniAppId,
+					path: 'pagesClient/official/index?hdShopAdminId='+this.loginInfo.shopAdminId,
+					//develop 开发版 trial 体验版 release 正式版
+					envVersion: process.env.NODE_ENV === 'development' ? 'develop' : 'release',
+					extraData: {
+						//'hdShopAdminId': this.loginInfo.shopAdminId
+					},
+					success(res) {
+						// 打开成功
+					}
+				})
+			})
+    },
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.app-content{
+  overflow: hidden;
+}
+.img_box{
+  height: 450upx;
+  box-sizing: border-box;
+  &>.img_url{
+    height: 450upx;
+    width: 450upx;
+    margin: 100upx auto;
+  }
+}
+// 按钮
+.confirm-btn {
+  width: calc(100% - 60px);
+  margin: 100px 30px 20px;
+  .admin-button-com {
+    width: 100%;
+  }
+}
+// 按钮
+.confirm-btn1 {
+  width: calc(100% - 60px);
+  margin: 50px 30px 20px;
+  .admin-button-com {
+    width: 100%;
+  }
+}
+</style>

+ 119 - 0
ghsApp/src/pagesInvite/inviteShop.vue

@@ -0,0 +1,119 @@
+<template>
+  <view class="app-content">
+    <view class="img_box">
+      <image :src="imgUrl" class="img_url"></image>
+    </view>
+    <!-- 确认 -->
+      <div class="confirm-btn">
+        <button class="admin-button-com big blue" @click="downloadImg">保存图片邀请</button>
+      </div>
+      <div class="confirm-btn1">
+        <button class="admin-button-com big blue" @click="goToMallPt()">直接打开分享</button>
+      </div>
+  </view>
+</template>
+
+<script>
+import { applyInviteHdPoster } from '@/api/apply/index'
+import { getWeixinId } from "@/api/invite/index";
+import { mapGetters } from "vuex";
+export default {
+  data() {
+    return {
+      imgUrl: '',
+      getappIdList: {}
+    }
+  },
+  computed: {
+    ...mapGetters({ loginInfo: "getLoginInfo" })
+  },
+  methods: {
+    init() {
+      this.getImg()
+      getWeixinId().then(res => {
+        this.getappIdList = res.data
+      });
+    },
+    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'
+              });
+            }
+          })
+        },
+      })
+    },
+    getImg() {
+      applyInviteHdPoster().then(res => {
+        console.log(res)
+        this.imgUrl = res.data.imgUrl
+      }).catch(err => {})
+    },
+    goToMallPt () {
+      //查看分享的路径,不要删除 shish 20210517
+			console.log('pagesClient/official/index','ghsShopAdminId='+ this.loginInfo.shopAdminId)
+
+			getWeixinId().then(res => {
+				uni.navigateToMiniProgram({
+					appId: res.data.hd.miniAppId,
+					path: 'pagesClient/official/index?ghsShopAdminId='+this.loginInfo.shopAdminId,
+					//develop 开发板 trial 体验版 release 正式版
+					envVersion: process.env.NODE_ENV === 'development' ? 'develop' : 'release',
+					extraData: {
+						//'ghsShopAdminId': this.loginInfo.shopAdminId
+					},
+					success(res) {
+						// 打开成功
+					}
+				})
+			});
+    },
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.app-content{
+  overflow: hidden;
+}
+.img_box{
+  height: 450upx;
+  box-sizing: border-box;
+  &>.img_url{
+    height: 450upx;
+    width: 450upx;
+    margin: 100upx auto;
+  }
+}
+// 按钮
+.confirm-btn {
+  width: calc(100% - 60px);
+  margin: 100px 30px 20px;
+  .admin-button-com {
+    width: 100%;
+  }
+}
+// 按钮
+.confirm-btn1 {
+  width: calc(100% - 60px);
+  margin: 50px 30px 20px;
+  .admin-button-com {
+    width: 100%;
+  }
+}
+</style>

+ 19 - 17
ghsApp/src/pagesInvite/list.vue

@@ -10,7 +10,7 @@
 				<button class="user-wrap-right" @tap="inviteHd">
 					<img :src="`${constant.imgUrl}/retail/interest/invite-store.png`" alt mode="widthFix" />
 				</button>
-				<navigator class="user-wrap-right" :url="`/pagesClient/official/index?ghsShopAdminId=${loginInfo.shopAdminId}`">
+				<navigator class="user-wrap-right" :url="`/pagesInvite/inviteGhsShop`">
 					<img :src="`${constant.imgUrl}/ghs/me/yqghs.png`" alt mode="widthFix" />
 				</navigator>
 			</view>
@@ -123,24 +123,26 @@ export default {
 	},
 	methods: {
 		inviteHd(){
-			
+			this.pageTo({
+        url: '/pagesInvite/inviteShop'
+      })
 			//查看分享的路径,不要删除 shish 20210517
-			console.log('pagesClient/official/index','ghsShopAdminId='+ this.loginInfo.shopAdminId)
+			// console.log('pagesClient/official/index','ghsShopAdminId='+ this.loginInfo.shopAdminId)
 
-			getWeixinId().then(res => {
-				uni.navigateToMiniProgram({
-					appId: res.data.hd.miniAppId,
-					path: 'pagesClient/official/index?ghsShopAdminId='+this.loginInfo.shopAdminId,
-					//develop 开发板 trial 体验版 release 正式版
-					envVersion: process.env.NODE_ENV === 'development' ? 'develop' : 'release',
-					extraData: {
-						//'ghsShopAdminId': this.loginInfo.shopAdminId
-					},
-					success(res) {
-						// 打开成功
-					}
-				})
-			});
+			// getWeixinId().then(res => {
+			// 	uni.navigateToMiniProgram({
+			// 		appId: res.data.hd.miniAppId,
+			// 		path: 'pagesClient/official/index?ghsShopAdminId='+this.loginInfo.shopAdminId,
+			// 		//develop 开发板 trial 体验版 release 正式版
+			// 		envVersion: process.env.NODE_ENV === 'development' ? 'develop' : 'release',
+			// 		extraData: {
+			// 			//'ghsShopAdminId': this.loginInfo.shopAdminId
+			// 		},
+			// 		success(res) {
+			// 			// 打开成功
+			// 		}
+			// 	})
+			// });
 
 		},
 		async init() {

+ 0 - 4
hdApp/src/admin/home/workbench.vue

@@ -139,7 +139,6 @@ import FabModule from "@/components/plugin/fab";
 import AppAvatarModule from "@/components/module/app-avatar";
 import ModalModule from "@/components/plugin/modal";
 import { getDataTimestamp } from "@/utils/common";
-import { getWeixinId } from "@/api/invite/index";
 import { getUser } from "@/utils/auth";
 import { consoleIndex } from "@/api/workbench";
 import noneHd from "@/components/none-hd";
@@ -310,9 +309,6 @@ export default {
       this.$util.pageTo(item)
     },
     init () {
-					getWeixinId().then(res => {
-						this.getappIdList = res.data
-					});
 					getUser().then(res => {
 						uni.setNavigationBarTitle({
 							title: res.name

+ 16 - 0
hdApp/src/api/apply/index.js

@@ -0,0 +1,16 @@
+import https from "@/plugins/luch-request_0.0.7/request";
+
+/**
+ * 邀请供货商(零售、供货商相同)
+ * @param {*} name
+ */
+export const applyInviteGhsPoster = name => {
+	return https.get("/apply/invite-ghs-poster", { name });
+};
+/**
+ * 邀请花店(零售、供货商相同)  wangning  2021-6-13
+ * @param {*} name
+ */
+ export const applyInviteHdPoster = name => {
+	return https.get("/apply/invite-hd-poster", { name });
+};

+ 14 - 0
hdApp/src/pages.json

@@ -836,6 +836,20 @@
 						"navigationBarTitleText": "邀请开店",
 						"enablePullDownRefresh": true
 					}
+				},
+        {
+					"path": "inviteShop",
+					"style": {
+						"navigationBarTitleText": "",
+						"enablePullDownRefresh": true
+					}
+				},
+        {
+					"path": "inviteHdShop",
+					"style": {
+						"navigationBarTitleText": "",
+						"enablePullDownRefresh": true
+					}
 				}
 			]
 		},

+ 119 - 0
hdApp/src/pagesInvite/inviteHdShop.vue

@@ -0,0 +1,119 @@
+<template>
+  <view class="app-content">
+    <view class="img_box">
+      <image :src="imgUrl" class="img_url"></image>
+    </view>
+    <!-- 确认 -->
+      <div class="confirm-btn">
+        <button class="admin-button-com big blue" @click="downloadImg">保存图片邀请</button>
+      </div>
+      <div class="confirm-btn1">
+        <button class="admin-button-com big blue" @click="goToMallPt()">直接打开分享</button>
+      </div>
+  </view>
+</template>
+
+<script>
+import { applyInviteHdPoster } from '@/api/apply/index'
+import { getWeixinId } from "@/api/invite/index";
+import { mapGetters } from "vuex";
+export default {
+  data() {
+    return {
+      imgUrl: '',
+      getappIdList: {}
+    }
+  },  
+  computed: {
+    ...mapGetters({ loginInfo: "getLoginInfo" })
+  },
+  methods: {
+    init() {
+      this.getImg()
+      getWeixinId().then(res => {
+        this.getappIdList = res.data
+      });
+    },
+    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'
+              });
+            }
+          })
+        },
+      })
+    },
+    getImg() {
+      applyInviteHdPoster().then(res => {
+        console.log(res)
+        this.imgUrl = res.data.imgUrl
+      }).catch(err => {})
+    },
+    goToMallPt () {
+      //查看分享的路径,不要删除 shish 20210517
+			console.log('pagesClient/official/index','ghsShopAdminId='+ this.loginInfo.shopAdminId)
+
+			getWeixinId().then(res => {
+				uni.navigateToMiniProgram({
+					appId: res.data.hd.miniAppId,
+					path: 'pagesClient/official/index?ghsShopAdminId='+this.loginInfo.shopAdminId,
+					//develop 开发板 trial 体验版 release 正式版
+					envVersion: process.env.NODE_ENV === 'development' ? 'develop' : 'release',
+					extraData: {
+						//'ghsShopAdminId': this.loginInfo.shopAdminId
+					},
+					success(res) {
+						// 打开成功
+					}
+				})
+			});
+    },
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.app-content{
+  overflow: hidden;
+}
+.img_box{
+  height: 450upx;
+  box-sizing: border-box;
+  &>.img_url{
+    height: 450upx;
+    width: 450upx;
+    margin: 100upx auto;
+  }
+}
+// 按钮
+.confirm-btn {
+  width: calc(100% - 60px);
+  margin: 100px 30px 20px;
+  .admin-button-com {
+    width: 100%;
+  }
+}
+// 按钮
+.confirm-btn1 {
+  width: calc(100% - 60px);
+  margin: 50px 30px 20px;
+  .admin-button-com {
+    width: 100%;
+  }
+}
+</style>

+ 119 - 0
hdApp/src/pagesInvite/inviteShop.vue

@@ -0,0 +1,119 @@
+<template>
+  <view class="app-content">
+    <view class="img_box">
+      <image :src="imgUrl" class="img_url"></image>
+    </view>
+    <!-- 确认 -->
+      <div class="confirm-btn">
+        <button class="admin-button-com big blue" @click="downloadImg">保存图片分邀请</button>
+      </div>
+      <div class="confirm-btn1">
+        <button class="admin-button-com big blue" @click="goToMallPt()">直接打开分享</button>
+      </div>
+  </view>
+</template>
+
+<script>
+import { applyInviteGhsPoster } from '@/api/apply/index'
+import { getWeixinId } from "@/api/invite/index";
+import { mapGetters } from "vuex";
+export default {
+  data() {
+    return {
+      imgUrl: '',
+      getappIdList: {}
+    }
+  },
+  computed: {
+    ...mapGetters({ loginInfo: "getLoginInfo" })
+  },
+  methods: {
+    init() {
+      this.getImg()
+      getWeixinId().then(res => {
+        this.getappIdList = res.data
+      });
+    },
+    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'
+              });
+            }
+          })
+        },
+      })
+    },
+    getImg() {
+      applyInviteGhsPoster().then(res => {
+        console.log(res)
+        this.imgUrl = res.data.imgUrl
+      }).catch(err => {})
+    },
+    goToMallPt () {
+      //查看分享的路径,不要删除 shish 20210517
+			console.log('pagesClient/official/index?hdShopAdminId='+this.loginInfo.shopAdminId)
+
+			getWeixinId().then(res => {
+				uni.navigateToMiniProgram({
+					appId: res.data.ghs.miniAppId,
+					path: 'pagesClient/official/index?hdShopAdminId='+this.loginInfo.shopAdminId,
+					//develop 开发版 trial 体验版 release 正式版
+					envVersion: process.env.NODE_ENV === 'development' ? 'develop' : 'release',
+					extraData: {
+						//'hdShopAdminId': this.loginInfo.shopAdminId
+					},
+					success(res) {
+						// 打开成功
+					}
+				})
+			})
+    },
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.app-content{
+  overflow: hidden;
+}
+.img_box{
+  height: 450upx;
+  box-sizing: border-box;
+  &>.img_url{
+    height: 450upx;
+    width: 450upx;
+    margin: 100upx auto;
+  }
+}
+// 按钮
+.confirm-btn {
+  width: calc(100% - 60px);
+  margin: 100px 30px 20px;
+  .admin-button-com {
+    width: 100%;
+  }
+}
+// 按钮
+.confirm-btn1 {
+  width: calc(100% - 60px);
+  margin: 50px 30px 20px;
+  .admin-button-com {
+    width: 100%;
+  }
+}
+</style>

+ 20 - 18
hdApp/src/pagesInvite/list.vue

@@ -7,7 +7,7 @@
 					<view class="name"> {{ userInfo.name || "" }}</view>
 					<view class="mark"> 普通代理 </view>
 				</view>
-				<navigator class="user-wrap-right" :url="`/pagesClient/official/index?hdShopAdminId=${loginInfo.shopAdminId}`">
+				<navigator class="user-wrap-right" :url="`/pagesInvite/inviteHdShop`">
 					<img :src="`${constant.imgUrl}/retail/interest/invite-store.png`" alt mode="widthFix" />
 				</navigator>
 				<button class="user-wrap-right" @tap="inviteGhs">
@@ -123,24 +123,26 @@ export default {
 	},
 	methods: {
 		inviteGhs(){
+      this.pageTo({
+        url: '/pagesInvite/inviteGhsShop'
+      })
+        //查看分享的路径,不要删除 shish 20210517
+			// console.log('pagesClient/official/index?hdShopAdminId='+this.loginInfo.shopAdminId)
 
-			//查看分享的路径,不要删除 shish 20210517
-			console.log('pagesClient/official/index?hdShopAdminId='+this.loginInfo.shopAdminId)
-
-			getWeixinId().then(res => {
-				uni.navigateToMiniProgram({
-					appId: res.data.ghs.miniAppId,
-					path: 'pagesClient/official/index?hdShopAdminId='+this.loginInfo.shopAdminId,
-					//develop 开发版 trial 体验版 release 正式版
-					envVersion: process.env.NODE_ENV === 'development' ? 'develop' : 'release',
-					extraData: {
-						//'hdShopAdminId': this.loginInfo.shopAdminId
-					},
-					success(res) {
-						// 打开成功
-					}
-				})
-			})
+			// getWeixinId().then(res => {
+			// 	uni.navigateToMiniProgram({
+			// 		appId: res.data.ghs.miniAppId,
+			// 		path: 'pagesClient/official/index?hdShopAdminId='+this.loginInfo.shopAdminId,
+			// 		//develop 开发版 trial 体验版 release 正式版
+			// 		envVersion: process.env.NODE_ENV === 'development' ? 'develop' : 'release',
+			// 		extraData: {
+			// 			//'hdShopAdminId': this.loginInfo.shopAdminId
+			// 		},
+			// 		success(res) {
+			// 			// 打开成功
+			// 		}
+			// 	})
+			// })
 
 		},
 		async init() {

+ 2 - 2
hdApp/src/pagesPurchase/add.vue

@@ -90,7 +90,7 @@
 			:show="isModel"
 			@cancel="modalCancel"
 			@click="affirm"
-			title="花之物语 红色系"
+			title=""
 			color="#333"
 			:size="32"
 			padding="30rpx 30rpx"
@@ -108,7 +108,7 @@
 <!--								type="number"-->
 <!--								placeholder="请填写采购总价"-->
 <!--							/>元-->
-							<allSelectInput :isActive="isAloneAllActive" :isFocus="isAloneAllFocus" :value="customData.itemPrice" :placeholder="'请填写采购总价'"
+							<allSelectInput :isActive="isAloneAllActive" :isFocus="isAloneAllFocus" :value="customData.itemPrice" :placeholder="'采购总价'"
 																							@deleteInputVal="deleteAloneInputVal" @initAllInput="initAloneAllInput" @moveAllInput="moveAloneAllInput">
 							</allSelectInput>元
 						</view>