Browse Source

隐藏海报生成

yuxingxing 2 years ago
parent
commit
243d8114c3
2 changed files with 17 additions and 10 deletions
  1. 5 1
      components/shareRedPackets/index.vue
  2. 12 9
      pages/goods_details/index.vue

+ 5 - 1
components/shareRedPackets/index.vue

@@ -7,7 +7,10 @@
 				<view>{{$t(`共富1580`)}}</view>
 				<view class='money'><text class='label'></text>{{sharePacket.priceName}}</view>
 				<view class='tip'>{{$t(`推广享红积分`)}}</view>
-				<view class='shareBut'>{{$t(`立即分享`)}}</view>
+				<!-- <view class='shareBut' open-type="share">{{$t(`立即分享`)}}</view> -->
+				<button open-type="share" shape="circle" :plain="true" :hairline="false" class='shareBut'>
+					{{$t(`立即分享`)}}
+				</button>
 			</view>
 		</view>
 	</view>
@@ -140,6 +143,7 @@
 	}
 
 	.sharing-packets .sharing-con .text .shareBut {
+		border: none !important;
 		font-size: 22rpx;
 		color: #fff;
 		margin-top: 14rpx;

+ 12 - 9
pages/goods_details/index.vue

@@ -533,6 +533,7 @@ export default {
 		},
 	},
 	onLoad(options) {
+		uni.hideShareMenu();
 		// 判断是否登录
 		if (!this.isLogin) {
 			if (options.inviteCode != "undefined") {
@@ -651,13 +652,14 @@ export default {
 	// #ifdef MP
 	onShareAppMessage: function () {
 		let that = this;
-		that.$set(that, "actionSheetHidden", !that.actionSheetHidden);
-		// userShare();
-		return {
-			title: that.storeInfo.goodsName || "",
-			imageUrl: that.storeInfo.image || "",
-			path: "/pages/goods_details/index?id=" + that.id + "&inviteCode=" + that.$Cache.get("USER_INFO", true).code,
-		};
+		// 校验是否可以分享(先购买产品)
+		postLinkedUrl().then(res =>{
+			return {
+				title: that.storeInfo.goodsName || "",
+				imageUrl: "http://wine.gzzzyd.com/test/static/img/bg.a82f9752.jpg" ||that.storeInfo.image,
+				path: "/pages/goods_details/index?id=" + that.id + "&inviteCode=" + that.$Cache.get("USER_INFO", true).code,
+			};
+		})
 	},
 
 	// #endif
@@ -950,6 +952,7 @@ export default {
 					that.storeInfo = res.data
 					// 处理分享
 					if (that.storeInfo.zoneType == 8) {
+						uni.showShareMenu();
 						that.sharePacket.isState = true
 					}
 					that.skuArr = storeInfo.goodsSpecList
@@ -1355,8 +1358,8 @@ export default {
 			} else {
 				// 校验是否可以分享(先购买产品)
 				postLinkedUrl().then(res =>{
-					this.downloadFilePromotionCode();
-					this.posters = true;
+					// this.downloadFilePromotionCode();
+					// this.posters = true;
 				})
 				// if (this.posterImage) {
 				// 	this.posters = true;