shish 2 месяцев назад
Родитель
Сommit
dbfbf211c5
2 измененных файлов с 6 добавлено и 14 удалено
  1. 4 10
      ghsApp/src/admin/item/list2.vue
  2. 2 4
      ghsApp/src/admin/item/mixins/itemPosterMixin.js

+ 4 - 10
ghsApp/src/admin/item/list2.vue

@@ -138,7 +138,10 @@
 					<button class="action-button" @click="shareItem()">分享商品</button>
 				</view>
 				<view class="action-button-item">
-					<button class="action-button" @click="chooseItemPoster()">生成海报</button>
+					<button class="action-button" @click="fetchItemPoster('hd')">批发海报</button>
+				</view>
+				<view class="action-button-item">
+					<button class="action-button" @click="fetchItemPoster('sk')">零售海报</button>
 				</view>
 				<view class="action-button-item">
 					<button class="action-button" @click="orderRecord()">下单记录</button>
@@ -491,15 +494,6 @@ export default {
 		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})
 		},
-		chooseItemPoster() {
-			const that = this
-			uni.showActionSheet({
-				itemList: ['批发海报', '零售海报'],
-				success(res) {
-					that.fetchItemPoster(res.tapIndex === 0 ? 'hd' : 'sk')
-				}
-			})
-		},
 		selectFlowerNumFn(){
 			this.showClassImg = true
 			this.$refs.globalClassImgRef.open('top')

+ 2 - 4
ghsApp/src/admin/item/mixins/itemPosterMixin.js

@@ -1,14 +1,13 @@
 import { getSkPoster, getHdPoster } from '@/api/item'
 
 /**
- * 使用 ItemStock(item2) 的花材列表页需混入:更多菜单中提供「生成海报」
+ * 使用 ItemStock(item2) 的花材列表页需混入:更多菜单中提供「批发海报」「零售海报」
  * posterType: 'hd' 批发 | 'sk' 零售
  */
 export default {
 	data() {
 		return {
-			posterUrl: '',
-			posterPopupTitle: '分享海报'
+			posterUrl: ''
 		}
 	},
 	methods: {
@@ -27,7 +26,6 @@ export default {
 			}
 			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 => {