Ver Fonte

海报优化

shish há 2 meses atrás
pai
commit
f4c76a9829

+ 114 - 0
ghsApp/src/admin/item/components/item-poster-popup.vue

@@ -0,0 +1,114 @@
+<template>
+	<uni-popup ref="posterPopup" background-color="transparent" type="center" :animation="true" class="class-popup-style poster-popup-root">
+		<view class="poster-popup-wrap">
+			<view class="poster-popup-head">
+				<text class="poster-popup-title">{{ title }}</text>
+				<text class="poster-close" @click="onClose">×</text>
+			</view>
+			<view class="poster-img-wrap">
+				<image class="poster-img" :src="posterUrl" mode="widthFix" show-menu-by-longpress />
+			</view>
+			<text class="poster-tip">长按图片可保存,或点击下方按钮</text>
+			<view class="poster-save-wrap">
+				<button class="admin-button-com big blue poster-save-btn" @click="onSave">保存到相册</button>
+			</view>
+		</view>
+	</uni-popup>
+</template>
+
+<script>
+export default {
+	name: 'ItemPosterPopup',
+	props: {
+		posterUrl: {
+			type: String,
+			default: ''
+		},
+		title: {
+			type: String,
+			default: '分享海报'
+		}
+	},
+	methods: {
+		open() {
+			this.$refs.posterPopup.open('top')
+		},
+		close() {
+			this.$refs.posterPopup.close()
+		},
+		onClose() {
+			this.close()
+			this.$emit('close')
+		},
+		onSave() {
+			this.$emit('save')
+		}
+	}
+}
+</script>
+
+<style lang="scss" scoped>
+.poster-popup-wrap {
+	display: flex;
+	width: 86vw;
+	max-width: 640upx;
+	padding: 28upx 28upx 36upx;
+	flex-direction: column;
+	align-items: center;
+	max-height: 92vh;
+	overflow: auto;
+	background: #fff;
+	border-radius: 24upx;
+	box-shadow: 0 16upx 48upx rgba(0, 0, 0, 0.18);
+}
+
+.poster-popup-head {
+	width: 100%;
+	display: flex;
+	align-items: center;
+	justify-content: space-between;
+	margin-bottom: 8upx;
+}
+
+.poster-popup-title {
+	font-size: 32upx;
+	font-weight: 600;
+	color: #1a1a1a;
+}
+
+.poster-close {
+	font-size: 52upx;
+	line-height: 1;
+	color: #999;
+	padding: 0 8upx;
+}
+
+.poster-img-wrap {
+	width: 100%;
+	text-align: center;
+	margin-top: 16upx;
+}
+
+.poster-img {
+	width: 100%;
+	margin: 0 auto;
+	border-radius: 12upx;
+	box-shadow: 0 8upx 24upx rgba(0, 0, 0, 0.12);
+}
+
+.poster-tip {
+	margin-top: 20upx;
+	font-size: 24upx;
+	color: #999;
+}
+
+.poster-save-wrap {
+	width: 100%;
+	margin-top: 28upx;
+	text-align: center;
+}
+
+.poster-save-btn {
+	width: 320upx;
+}
+</style>

+ 14 - 57
ghsApp/src/admin/item/list2.vue

@@ -138,7 +138,7 @@
 					<button class="action-button" @click="shareItem()">分享商品</button>
 				</view>
 				<view class="action-button-item">
-					<button class="action-button" @click="getHdPosterFn()">生成海报</button>
+					<button class="action-button" @click="chooseItemPoster()">生成海报</button>
 				</view>
 				<view class="action-button-item">
 					<button class="action-button" @click="orderRecord()">下单记录</button>
@@ -176,17 +176,7 @@
 			</view>
 		</uni-popup>
 
-		<uni-popup ref="posterShow" background-color="#fff" type="center" :animation="true" class="class-popup-style">
-			<view style="display:flex;width:100vw;padding:20upx 20upx 40upx 20upx;height:auto;justify-content: space-between;align-items:center;flex-wrap:wrap;max-height:100vh;overflow:auto;">
-				<text style="position:absolute;right:50upx;top:10upx;font-size:70upx;" @click="closePoster()">×</text>
-				<view style="width:100%;text-align:center;margin-top:75upx;">
-					<image style="width:70%;margin:0 auto;border:1upx solid #CCCCCC;" :src="posterUrl" mode="widthFix"></image>
-				</view>
-				<view style="width:100%;margin-top:65upx;text-align:center;">
-					<button class="admin-button-com big blue" style="width:300upx;" @click="downloadImg">保存图片</button>
-				</view>
-			</view>
-		</uni-popup>
+		<item-poster-popup ref="itemPosterPopup" :poster-url="posterUrl" :title="posterPopupTitle" @close="closePoster" @save="downloadPosterImg" />
 
 		<modal-module :show="wasteShow" @click="wasteConfirm" :maskClosable="true" title="报损数量" padding="30rpx 30rpx" >
 		<template v-slot:content>
@@ -243,12 +233,14 @@
 import AppSearchModule from "@/components/module/app-search";
 import AppWrapperEmpty from "@/components/app-wrapper-empty";
 import ItemStock from "./components/item2";
+import ItemPosterPopup from "./components/item-poster-popup.vue";
+import itemPosterMixin from "./mixins/itemPosterMixin";
 import productMins from "@/mixins/product2";
 import { mapGetters } from "vuex";
 import { getWeixinId } from "@/api/invite";
 import { print,cancelDiscountPrice,cancelPreSell,delStatusUpdate,cancelFullOffFn } from '@/api/product';
 import { cancelLimitBuy } from '@/api/item';
-import { getHdPoster,getSkPoster,changeFrontHide,applyAuth,moveToLosing,updateItemRemark,clearItemRemark } from '@/api/item'
+import { changeFrontHide,applyAuth,moveToLosing,updateItemRemark,clearItemRemark } from '@/api/item'
 import uniPopup from '@/uni_modules/uni-popup/components/uni-popup/uni-popup.vue';
 import ModalModule from "@/components/plugin/modal"
 import { partItem } from "@/api/part"
@@ -259,10 +251,11 @@ export default {
 		AppSearchModule,
 		AppWrapperEmpty,
 		ItemStock,
+		ItemPosterPopup,
 		uniPopup,
 		ModalModule
 	},
-	mixins: [productMins],
+	mixins: [productMins, itemPosterMixin],
 	data() {
 		return {
 			autoLoad: false,
@@ -280,7 +273,6 @@ export default {
 			printFocus:false,
 			warning:0,
 			currentInfo:{},
-			posterUrl:'',
 			wasteNum:'',
 			wasteShow:false,
 			wasteFocus:false,
@@ -496,52 +488,17 @@ export default {
 				})
 			})
 		},
-		closePoster(){
-			this.$refs.posterShow.close()
-		},
-		getHdPosterFn(){
-			this.closeRightShow()
-			let that = this
-			uni.showLoading({mask:true})
-			getHdPoster({id:this.currentInfo.id}).then(res=>{
-				uni.hideLoading()
-				if(res.code == 1){
-					that.posterUrl = res.data.imgUrl
-					that.$refs.posterShow.open('top')
-				}
-			})
-		},
-		getSkPosterFn(){
-			this.closeRightShow()
-			let that = this
-			uni.showLoading({mask:true})
-			getSkPoster({id:this.currentInfo.id}).then(res=>{
-				uni.hideLoading()
-				if(res.code == 1){
-					that.posterUrl = res.data.imgUrl
-					that.$refs.posterShow.open('top')
-				}
-			})
-		},
 		sendStock(){
 			this.pageTo({url: '/admin/item/sendStock?id='+this.currentInfo.id+'&price='+this.currentInfo.price+'&stock='+this.currentInfo.stock+'&name='+this.currentInfo.name,type:2})
 		},
-		downloadImg(){
-			let that = this
-			uni.downloadFile({
-				url: this.posterUrl,
-				success: (res) => {
-					if (res.statusCode === 200) {
-						uni.saveImageToPhotosAlbum({
-						filePath: res.tempFilePath,
-						success: function (data) {
-							that.$refs.posterShow.close()
-							uni.showToast({title:'保存成功'})
-						}
-						});
-					}
+		chooseItemPoster() {
+			const that = this
+			uni.showActionSheet({
+				itemList: ['批发海报', '零售海报'],
+				success(res) {
+					that.fetchItemPoster(res.tapIndex === 0 ? 'hd' : 'sk')
 				}
-			});
+			})
 		},
 		selectFlowerNumFn(){
 			this.showClassImg = true

+ 70 - 0
ghsApp/src/admin/item/mixins/itemPosterMixin.js

@@ -0,0 +1,70 @@
+import { getSkPoster, getHdPoster } from '@/api/item'
+
+/**
+ * 使用 ItemStock(item2) 的花材列表页需混入:更多菜单中提供「生成海报」
+ * posterType: 'hd' 花店采购 | 'sk' 散客商城
+ */
+export default {
+	data() {
+		return {
+			posterUrl: '',
+			posterPopupTitle: '分享海报'
+		}
+	},
+	methods: {
+		closePoster() {
+			if (this.$refs.itemPosterPopup) {
+				this.$refs.itemPosterPopup.close()
+			}
+		},
+		fetchItemPoster(posterType) {
+			if (typeof this.closeRightShow === 'function') {
+				this.closeRightShow()
+			}
+			const id = this.currentInfo && this.currentInfo.id
+			if (!id) {
+				return
+			}
+			const isHd = posterType === 'hd'
+			const request = isHd ? getHdPoster : getSkPoster
+			this.posterPopupTitle = isHd ? '花店采购海报' : '散客分享海报'
+			const that = this
+			uni.showLoading({ mask: true })
+			request({ id, env_version: this.$util.getMiniEnvVersion() }).then(res => {
+				uni.hideLoading()
+				if (res.code == 1 && res.data && res.data.imgUrl) {
+					that.posterUrl = res.data.imgUrl
+					that.$refs.itemPosterPopup.open()
+				} else {
+					that.$msg(res.msg || '生成失败')
+				}
+			}).catch(() => {
+				uni.hideLoading()
+				that.$msg('生成失败')
+			})
+		},
+		getMyPoster() {
+			this.fetchItemPoster('sk')
+		},
+		downloadPosterImg() {
+			const that = this
+			if (!this.posterUrl) {
+				return
+			}
+			uni.downloadFile({
+				url: this.posterUrl,
+				success: (res) => {
+					if (res.statusCode === 200) {
+						uni.saveImageToPhotosAlbum({
+							filePath: res.tempFilePath,
+							success() {
+								that.closePoster()
+								uni.showToast({ title: '保存成功' })
+							}
+						})
+					}
+				}
+			})
+		}
+	}
+}

+ 7 - 59
ghsApp/src/admin/item/warning.vue

@@ -138,7 +138,7 @@
                       <button class="action-button" @click="shareItem()">分享商品</button>
                   </view>
                   <view class="action-button-item">
-                      <button class="action-button" @click="getHdPosterFn()">生成海报</button>
+                      <button class="action-button" @click="getMyPoster()">生成海报</button>
                   </view>
                   <view class="action-button-item">
                       <button class="action-button" @click="orderRecord()">下单记录</button>
@@ -176,17 +176,7 @@
               </view>
           </uni-popup>
   
-          <uni-popup ref="posterShow" background-color="#fff" type="center" :animation="true" class="class-popup-style">
-              <view style="display:flex;width:100vw;padding:20upx 20upx 40upx 20upx;height:auto;justify-content: space-between;align-items:center;flex-wrap:wrap;max-height:100vh;overflow:auto;">
-                  <text style="position:absolute;right:50upx;top:10upx;font-size:70upx;" @click="closePoster()">×</text>
-                  <view style="width:100%;text-align:center;margin-top:75upx;">
-                      <image style="width:70%;margin:0 auto;border:1upx solid #CCCCCC;" :src="posterUrl" mode="widthFix"></image>
-                  </view>
-                  <view style="width:100%;margin-top:65upx;text-align:center;">
-                      <button class="admin-button-com big blue" style="width:300upx;" @click="downloadImg">保存图片</button>
-                  </view>
-              </view>
-          </uni-popup>
+          <item-poster-popup ref="itemPosterPopup" :poster-url="posterUrl" :title="posterPopupTitle" @close="closePoster" @save="downloadPosterImg" />
   
           <modal-module :show="wasteShow" @click="wasteConfirm" :maskClosable="true" title="报损数量" padding="30rpx 30rpx" >
           <template v-slot:content>
@@ -243,12 +233,14 @@
   import AppSearchModule from "@/components/module/app-search";
   import AppWrapperEmpty from "@/components/app-wrapper-empty";
   import ItemStock from "./components/item2";
+  import ItemPosterPopup from "./components/item-poster-popup.vue";
+  import itemPosterMixin from "./mixins/itemPosterMixin";
   import productMins from "@/mixins/product2";
   import { mapGetters } from "vuex";
   import { getWeixinId } from "@/api/invite";
   import { print,cancelDiscountPrice,cancelPreSell,delStatusUpdate,cancelFullOffFn } from '@/api/product';
   import { cancelLimitBuy } from '@/api/item';
-  import { getHdPoster,getSkPoster,changeFrontHide,applyAuth,moveToLosing,updateItemRemark,clearItemRemark } from '@/api/item'
+  import { changeFrontHide,applyAuth,moveToLosing,updateItemRemark,clearItemRemark } from '@/api/item'
   import uniPopup from '@/uni_modules/uni-popup/components/uni-popup/uni-popup.vue';
   import ModalModule from "@/components/plugin/modal"
   import { partItem } from "@/api/part"
@@ -259,10 +251,11 @@
           AppSearchModule,
           AppWrapperEmpty,
           ItemStock,
+          ItemPosterPopup,
           uniPopup,
           ModalModule
       },
-      mixins: [productMins],
+      mixins: [productMins, itemPosterMixin],
       data() {
           return {
               autoLoad: false,
@@ -280,7 +273,6 @@
               printFocus:false,
               warning:0,
               currentInfo:{},
-              posterUrl:'',
               wasteNum:'',
               wasteShow:false,
               wasteFocus:false,
@@ -497,53 +489,9 @@
                   })
               })
           },
-          closePoster(){
-              this.$refs.posterShow.close()
-          },
-          getHdPosterFn(){
-              this.closeRightShow()
-              let that = this
-              uni.showLoading({mask:true})
-              getHdPoster({id:this.currentInfo.id}).then(res=>{
-                  uni.hideLoading()
-                  if(res.code == 1){
-                      that.posterUrl = res.data.imgUrl
-                      that.$refs.posterShow.open('top')
-                  }
-              })
-          },
-          getSkPosterFn(){
-              this.closeRightShow()
-              let that = this
-              uni.showLoading({mask:true})
-              getSkPoster({id:this.currentInfo.id}).then(res=>{
-                  uni.hideLoading()
-                  if(res.code == 1){
-                      that.posterUrl = res.data.imgUrl
-                      that.$refs.posterShow.open('top')
-                  }
-              })
-          },
           sendStock(){
               this.pageTo({url: '/admin/item/sendStock?id='+this.currentInfo.id+'&price='+this.currentInfo.price+'&stock='+this.currentInfo.stock+'&name='+this.currentInfo.name,type:2})
           },
-          downloadImg(){
-              let that = this
-              uni.downloadFile({
-                  url: this.posterUrl,
-                  success: (res) => {
-                      if (res.statusCode === 200) {
-                          uni.saveImageToPhotosAlbum({
-                          filePath: res.tempFilePath,
-                          success: function (data) {
-                              that.$refs.posterShow.close()
-                              uni.showToast({title:'保存成功'})
-                          }
-                          });
-                      }
-                  }
-              });
-          },
           selectFlowerNumFn(){
               this.showClassImg = true
               this.$refs.globalClassImgRef.open('top')

+ 7 - 1
ghsApp/src/utils/util.js

@@ -550,6 +550,11 @@ export const isScanEnv = () =>{
 	return isScanEnv
 }
 
+/** 海报/太阳码:开发构建用 develop,正式构建用 release */
+export const getMiniEnvVersion = () => {
+	return process.env.NODE_ENV === 'development' ? 'develop' : 'release'
+}
+
 export default {
 	isEmpty,
 	copyObject,
@@ -573,5 +578,6 @@ export default {
 	hitRemind,
 	confirmModal,
 	isScanEnv,
-	afterAppLoginSuccess
+	afterAppLoginSuccess,
+	getMiniEnvVersion
 };

+ 110 - 0
hdApp/src/admin/item/components/item-poster-popup.vue

@@ -0,0 +1,110 @@
+<template>
+	<uni-popup ref="posterPopup" background-color="transparent" type="center" :animation="true" class="class-popup-style poster-popup-root">
+		<view class="poster-popup-wrap">
+			<view class="poster-popup-head">
+				<text class="poster-popup-title">分享海报</text>
+				<text class="poster-close" @click="onClose">×</text>
+			</view>
+			<view class="poster-img-wrap">
+				<image class="poster-img" :src="posterUrl" mode="widthFix" show-menu-by-longpress />
+			</view>
+			<text class="poster-tip">长按图片可保存,或点击下方按钮</text>
+			<view class="poster-save-wrap">
+				<button class="admin-button-com big blue poster-save-btn" @click="onSave">保存到相册</button>
+			</view>
+		</view>
+	</uni-popup>
+</template>
+
+<script>
+export default {
+	name: 'ItemPosterPopup',
+	props: {
+		posterUrl: {
+			type: String,
+			default: ''
+		}
+	},
+	methods: {
+		open() {
+			this.$refs.posterPopup.open('top')
+		},
+		close() {
+			this.$refs.posterPopup.close()
+		},
+		onClose() {
+			this.close()
+			this.$emit('close')
+		},
+		onSave() {
+			this.$emit('save')
+		}
+	}
+}
+</script>
+
+<style lang="scss" scoped>
+.poster-popup-wrap {
+	display: flex;
+	width: 86vw;
+	max-width: 640upx;
+	padding: 28upx 28upx 36upx;
+	flex-direction: column;
+	align-items: center;
+	max-height: 92vh;
+	overflow: auto;
+	background: #fff;
+	border-radius: 24upx;
+	box-shadow: 0 16upx 48upx rgba(0, 0, 0, 0.18);
+}
+
+.poster-popup-head {
+	width: 100%;
+	display: flex;
+	align-items: center;
+	justify-content: space-between;
+	margin-bottom: 8upx;
+}
+
+.poster-popup-title {
+	font-size: 32upx;
+	font-weight: 600;
+	color: #1a1a1a;
+}
+
+.poster-close {
+	font-size: 52upx;
+	line-height: 1;
+	color: #999;
+	padding: 0 8upx;
+}
+
+.poster-img-wrap {
+	width: 100%;
+	text-align: center;
+	margin-top: 16upx;
+}
+
+.poster-img {
+	width: 100%;
+	margin: 0 auto;
+	border-radius: 12upx;
+	box-shadow: 0 8upx 24upx rgba(0, 0, 0, 0.12);
+}
+
+.poster-tip {
+	margin-top: 20upx;
+	font-size: 24upx;
+	color: #999;
+}
+
+.poster-save-wrap {
+	width: 100%;
+	margin-top: 28upx;
+	text-align: center;
+}
+
+.poster-save-btn {
+	width: 320upx;
+}
+</style>

+ 7 - 58
hdApp/src/admin/item/list2.vue

@@ -166,17 +166,7 @@
 			</view>
 		</uni-popup>
 
-		<uni-popup ref="posterShow" background-color="#fff" type="center" :animation="true" class="class-popup-style">
-			<view style="display:flex;width:100vw;padding:20upx 20upx 40upx 20upx;height:auto;justify-content: space-between;align-items:center;flex-wrap:wrap;max-height:100vh;overflow:auto;">
-				<text style="position:absolute;right:50upx;top:10upx;font-size:70upx;" @click="closePoster()">×</text>
-				<view style="width:100%;text-align:center;margin-top:75upx;">
-					<image style="width:70%;margin:0 auto;border:1upx solid #CCCCCC;" :src="posterUrl" mode="widthFix"></image>
-				</view>
-				<view style="width:100%;margin-top:65upx;text-align:center;">
-					<button class="admin-button-com big blue" style="width:300upx;" @click="downloadImg">保存图片</button>
-				</view>
-			</view>
-		</uni-popup>
+		<item-poster-popup ref="itemPosterPopup" :poster-url="posterUrl" @close="closePoster" @save="downloadPosterImg" />
 
 		<modal-module :show="wasteShow" @click="wasteConfirm" :maskClosable="true" title="报损数量" padding="30rpx 30rpx" >
 		<template v-slot:content>
@@ -220,11 +210,13 @@
 import AppSearchModule from "@/components/module/app-search";
 import AppWrapperEmpty from "@/components/app-wrapper-empty";
 import ItemStock from "./components/item2";
+import ItemPosterPopup from "./components/item-poster-popup.vue";
+import itemPosterMixin from "./mixins/itemPosterMixin";
 import productMins from "@/mixins/product2";
 import { mapGetters } from "vuex";
 import { getWeixinId } from "@/api/invite";
 import { print,cancelDiscountPrice,cancelPreSell,delStatusUpdate,cancelFullOffFn } from '@/api/product';
-import { getHdPoster,getPoster,breakItem,changeFrontHide,applyAuth,changeHalf,moveToLosing,updateItemRemark,clearItemRemark } from '@/api/item'
+import { breakItem,changeFrontHide,applyAuth,changeHalf,moveToLosing,updateItemRemark,clearItemRemark } from '@/api/item'
 import uniPopup from '@/uni_modules/uni-popup/components/uni-popup/uni-popup.vue';
 import ModalModule from "@/components/plugin/modal"
 import { partItem } from "@/api/part"
@@ -235,10 +227,11 @@ export default {
 		AppSearchModule,
 		AppWrapperEmpty,
 		ItemStock,
+		ItemPosterPopup,
 		uniPopup,
 		ModalModule
 	},
-	mixins: [productMins],
+	mixins: [productMins, itemPosterMixin],
 	data() {
 		return {
 			autoLoad: false,
@@ -256,7 +249,6 @@ export default {
 			printFocus:false,
 			warning:0,
 			currentInfo:{},
-			posterUrl:'',
 			wasteNum:'',
 			wasteShow:false,
 			wasteFocus:false,
@@ -431,53 +423,9 @@ export default {
 				})
 			})
 		},
-		closePoster(){
-			this.$refs.posterShow.close()
-		},
-		getMyPoster(){
-			this.closeRightShow()
-			let that = this
-			uni.showLoading({mask:true})
-			getPoster({ id: this.currentInfo.id, env_version: this.$util.getMiniEnvVersion() }).then(res=>{
-				uni.hideLoading()
-				if(res.code == 1){
-					that.posterUrl = res.data.imgUrl
-					that.$refs.posterShow.open('top')
-				}
-			})
-		},
-		getSkPosterFn(){
-			this.closeRightShow()
-			let that = this
-			uni.showLoading({mask:true})
-			getPoster({ id: this.currentInfo.id, env_version: this.$util.getMiniEnvVersion() }).then(res=>{
-				uni.hideLoading()
-				if(res.code == 1){
-					that.posterUrl = res.data.imgUrl
-					that.$refs.posterShow.open('top')
-				}
-			})
-		},
 		sendStock(){
 			this.pageTo({url: '/admin/item/sendStock?id='+this.currentInfo.id+'&price='+this.currentInfo.price+'&stock='+this.currentInfo.stock+'&name='+this.currentInfo.name,type:2})
 		},
-		downloadImg(){
-			let that = this
-			uni.downloadFile({
-				url: this.posterUrl,
-				success: (res) => {
-					if (res.statusCode === 200) {
-						uni.saveImageToPhotosAlbum({
-						filePath: res.tempFilePath,
-						success: function (data) {
-							that.$refs.posterShow.close()
-							uni.showToast({title:'保存成功'})
-						}
-						});
-					}
-				}
-			});
-		},
 		selectFlowerNumFn(){
 			this.$refs.globalClassImgRef.open('top')
 		},
@@ -934,4 +882,5 @@ export default {
 		}
 	}
 }
+
 </style>

+ 57 - 0
hdApp/src/admin/item/mixins/itemPosterMixin.js

@@ -0,0 +1,57 @@
+import { getPoster } from '@/api/item'
+
+/**
+ * 使用 ItemStock(item2) 的花材列表页需混入:更多菜单中提供「生成海报」并调用 getMyPoster
+ */
+export default {
+	data() {
+		return {
+			posterUrl: ''
+		}
+	},
+	methods: {
+		closePoster() {
+			if (this.$refs.itemPosterPopup) {
+				this.$refs.itemPosterPopup.close()
+			}
+		},
+		getMyPoster() {
+			if (typeof this.closeRightShow === 'function') {
+				this.closeRightShow()
+			}
+			const id = this.currentInfo && this.currentInfo.id
+			if (!id) {
+				return
+			}
+			const that = this
+			uni.showLoading({ mask: true })
+			getPoster({ id, env_version: this.$util.getMiniEnvVersion() }).then(res => {
+				uni.hideLoading()
+				if (res.code == 1) {
+					that.posterUrl = res.data.imgUrl
+					that.$refs.itemPosterPopup.open()
+				}
+			})
+		},
+		downloadPosterImg() {
+			const that = this
+			if (!this.posterUrl) {
+				return
+			}
+			uni.downloadFile({
+				url: this.posterUrl,
+				success: (res) => {
+					if (res.statusCode === 200) {
+						uni.saveImageToPhotosAlbum({
+							filePath: res.tempFilePath,
+							success() {
+								that.closePoster()
+								uni.showToast({ title: '保存成功' })
+							}
+						})
+					}
+				}
+			})
+		}
+	}
+}