修改:海报默认背景修改为远程读取,本地不在存储默认海报背景

This commit is contained in:
wuhui_zzw 2024-03-06 17:32:57 +08:00
parent e91e1b60f3
commit 4cc4ae1c35
8 changed files with 112 additions and 108 deletions

View File

@ -291,7 +291,7 @@
PromotionCode: '', // PromotionCode: '', //
canvasStatus: false, // canvasStatus: false, //
posterImage: '', // posterImage: '', //
posterbackgd: '/static/images/posterbackgd.png', posterbackgd: '',
isDown: true, isDown: true,
isCopy: false, isCopy: false,
copyUrl: '', copyUrl: '',
@ -384,6 +384,8 @@
//#endif //#endif
}, },
onReady: function() { onReady: function() {
this.posterbackgd = `${HTTP_REQUEST_URL}/static/images/mer/posterbackgd.png`;
// #ifdef H5 // #ifdef H5
this.$nextTick(function() { this.$nextTick(function() {
const clipboard = new ClipboardJS(".copy-data"); const clipboard = new ClipboardJS(".copy-data");
@ -429,11 +431,10 @@
mask: true mask: true
}); });
// #ifdef H5 // #ifdef H5
arr2 = [that.posterbackgd, await that.imgToBase(that.storeImage), await that.imgToBase(that.codeImg), await that.imgToBase(that.share_pic)]; arr2 = [await that.imgToBase(that.posterbackgd), await that.imgToBase(that.storeImage), await that.imgToBase(that.codeImg), await that.imgToBase(that.share_pic)];
// #endif // #endif
// #ifdef MP || APP-PLUS // #ifdef MP || APP-PLUS
arr2 = [that.posterbackgd, await that.fileStoreImage(that.storeImage), await that.fileStoreImage( arr2 = [await that.fileStoreImage(that.posterbackgd), await that.fileStoreImage(that.storeImage), await that.fileStoreImage(that.codeImg), await that.fileStoreImage(that.share_pic)];
that.codeImg), await that.fileStoreImage(that.share_pic)];
// #endif // #endif
that.$util.goodsPosterCanvas(arr2, that.bargainData.store_name, that.bargainPrice, that.site_name, that.old_price, function(tempFilePath) { that.$util.goodsPosterCanvas(arr2, that.bargainData.store_name, that.bargainPrice, that.site_name, that.old_price, function(tempFilePath) {
that.$set(that, 'posterImage', tempFilePath); that.$set(that, 'posterImage', tempFilePath);
@ -605,7 +606,7 @@
uni.hideLoading(); uni.hideLoading();
uni.navigateTo({ uni.navigateTo({
url: '/pages/activity/assist_detail/index?id=' + assist_id url: '/pages/activity/assist_detail/index?id=' + assist_id
}); });
}).catch((err) => { }).catch((err) => {
uni.hideLoading(); uni.hideLoading();
that.$util.Tips({ that.$util.Tips({
@ -778,7 +779,7 @@
transform: translateX(-50%); transform: translateX(-50%);
z-index: 1000; z-index: 1000;
top: 50%; top: 50%;
margin-top: -446rpx; margin-top: -446rpx;
} }
.poster-pop image { .poster-pop image {
width: 100%; width: 100%;

View File

@ -14,7 +14,7 @@
<text class="iconfont" :class="item.icon"></text> <text class="iconfont" :class="item.icon"></text>
<text class="pl-20">{{item.name}}</text> <text class="pl-20">{{item.name}}</text>
</view> </view>
</view> </view>
<view> <view>
<scroll-view :scroll-top="scrollTop" scroll-y='true' scroll-with-animation="true" :style='"height:"+height+"px;"' <scroll-view :scroll-top="scrollTop" scroll-y='true' scroll-with-animation="true" :style='"height:"+height+"px;"'
@scroll="scroll"> @scroll="scroll">
@ -429,7 +429,7 @@
PromotionCode: '', // PromotionCode: '', //
canvasStatus: false, // canvasStatus: false, //
posterImage: '', // posterImage: '', //
posterbackgd: '/static/images/posterbackgd.png', posterbackgd: '',
sharePacket: { sharePacket: {
isState: true, // isState: true, //
}, // }, //
@ -588,6 +588,7 @@
} }
}, },
onReady() { onReady() {
this.posterbackgd = `${HTTP_REQUEST_URL}/static/images/mer/posterbackgd.png`;
this.isNodes++; this.isNodes++;
this.$nextTick(function() { this.$nextTick(function() {
// #ifdef MP // #ifdef MP
@ -603,7 +604,7 @@
}); });
}, },
onShow() { onShow() {
}, },
/** /**
* 用户点击右上角分享 * 用户点击右上角分享
@ -911,7 +912,7 @@
that.$set(that, 'guaranteeValue', res.data.product.guarantee ? res.data.product.guarantee.template_name : ''); that.$set(that, 'guaranteeValue', res.data.product.guarantee ? res.data.product.guarantee.template_name : '');
that.$set(that, 'guarantee', res.data.product.guaranteeTemplate ? res.data.product.guaranteeTemplate : []); that.$set(that, 'guarantee', res.data.product.guaranteeTemplate ? res.data.product.guaranteeTemplate : []);
that.$set(that, 'shipping', res.data.product.temp ? res.data.product.temp.info : ''); that.$set(that, 'shipping', res.data.product.temp ? res.data.product.temp.info : '');
that.$set(that.specsInfo, 'params', res.data.product.params); that.$set(that.specsInfo, 'params', res.data.product.params);
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: storeInfo.store_name.substring(0, 7) + "..." title: storeInfo.store_name.substring(0, 7) + "..."
}) })
@ -921,7 +922,7 @@
that.getCartCount(); that.getCartCount();
that.ShareInfo(); that.ShareInfo();
that.downloadFilePromotionCode(); that.downloadFilePromotionCode();
}; };
// #endif // #endif
// #ifdef APP-PLUS || MP // #ifdef APP-PLUS || MP
@ -1298,11 +1299,10 @@
mask: true mask: true
}); });
// #ifdef MP || APP-PLUS // #ifdef MP || APP-PLUS
arr2 = [that.posterbackgd, await this.fileStoreImage(this.storeImage), await this.fileStoreImage( arr2 = [await this.fileStoreImage(that.posterbackgd), await this.fileStoreImage(this.storeImage), await this.fileStoreImage(this.codeImg), await that.fileStoreImage(that.share_pic)];
this.codeImg), await that.fileStoreImage(that.share_pic)];
// #endif // #endif
// #ifdef H5 // #ifdef H5
arr2 = [that.posterbackgd, await this.imgToBase(that.storeImage), await this.imgToBase(this.codeImg), await that.imgToBase(that.share_pic)]; arr2 = [await this.imgToBase(that.posterbackgd), await this.imgToBase(that.storeImage), await this.imgToBase(this.codeImg), await that.imgToBase(that.share_pic)];
// #endif // #endif
//广 //广
that.$util.goodsPosterCanvas(arr2, that.storeInfo.store_name, that.storeInfo.price, that.site_name, that.storeInfo.ot_price, function(tempFilePath) { that.$util.goodsPosterCanvas(arr2, that.storeInfo.store_name, that.storeInfo.price, that.site_name, that.storeInfo.ot_price, function(tempFilePath) {
@ -1823,7 +1823,7 @@
} }
.product-con .footer .bnt .buy[disabled] { .product-con .footer .bnt .buy[disabled] {
background: #bbb; background: #bbb;
} }
button { button {
padding: 0; padding: 0;
margin: 0; margin: 0;

View File

@ -14,7 +14,7 @@
<text class="iconfont" :class="item.icon"></text> <text class="iconfont" :class="item.icon"></text>
<text class="pl-20">{{item.name}}</text> <text class="pl-20">{{item.name}}</text>
</view> </view>
</view> </view>
<view> <view>
<scroll-view :scroll-top="scrollTop" scroll-y='true' scroll-with-animation="true" :style='"height:"+height+"px;"' <scroll-view :scroll-top="scrollTop" scroll-y='true' scroll-with-animation="true" :style='"height:"+height+"px;"'
@scroll="scroll"> @scroll="scroll">
@ -191,7 +191,7 @@
<view class="iconfont icon-kefu"></view> <view class="iconfont icon-kefu"></view>
<view>客服</view> <view>客服</view>
</view> </view>
</block> </block>
<view @click="setCollect" class='item skeleton-rect'> <view @click="setCollect" class='item skeleton-rect'>
<view class='iconfont icon-shoucang1' v-if="storeInfo.isRelation"></view> <view class='iconfont icon-shoucang1' v-if="storeInfo.isRelation"></view>
@ -355,7 +355,7 @@
PromotionCode: '', // PromotionCode: '', //
canvasStatus: false, // canvasStatus: false, //
posterImage: '', // posterImage: '', //
posterbackgd: '/static/images/posterbackgd.png', posterbackgd: '',
// uid: 0, //uid // uid: 0, //uid
circular: false, circular: false,
autoplay: false, autoplay: false,
@ -507,6 +507,7 @@
} }
}, },
onReady() { onReady() {
this.posterbackgd = `${HTTP_REQUEST_URL}/static/images/mer/posterbackgd.png`;
this.isNodes++; this.isNodes++;
this.$nextTick(function() { this.$nextTick(function() {
// #ifdef MP // #ifdef MP
@ -625,7 +626,7 @@
priceRuleApi(this.storeInfo.cate_id).then(res => { priceRuleApi(this.storeInfo.cate_id).then(res => {
this.priceRule = res.data this.priceRule = res.data
}).catch(err => { }).catch(err => {
}); });
}, },
goActivity: function(e) { goActivity: function(e) {
@ -812,7 +813,7 @@
// that.$set(that, 'shippingValue', res.data.temp ? res.data.temp.name : ''); // that.$set(that, 'shippingValue', res.data.temp ? res.data.temp.name : '');
that.$set(that, 'guarantee', res.data.guaranteeTemplate ? res.data.guaranteeTemplate : []); that.$set(that, 'guarantee', res.data.guaranteeTemplate ? res.data.guaranteeTemplate : []);
// that.$set(that, 'shipping', res.data.temp ? res.data.temp.info : ''); // that.$set(that, 'shipping', res.data.temp ? res.data.temp.info : '');
// that.$set(that.specsInfo, 'params', res.data.params); // that.$set(that.specsInfo, 'params', res.data.params);
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: storeInfo.store_name.substring(0, 7) + "..." title: storeInfo.store_name.substring(0, 7) + "..."
}) })
@ -830,12 +831,12 @@
); );
} }
that.$set(that, 'shippingValue', res.data.temp ? res.data.temp.name : ''); that.$set(that, 'shippingValue', res.data.temp ? res.data.temp.name : '');
that.$set(that.specsInfo, 'params', res.data.params); that.$set(that.specsInfo, 'params', res.data.params);
that.$set(that.storeInfo, 'merchant', res.data.merchant); that.$set(that.storeInfo, 'merchant', res.data.merchant);
that.$set(that.storeInfo, 'spu_id', res.data.spu_id); that.$set(that.storeInfo, 'spu_id', res.data.spu_id);
that.$set(that.storeInfo, 'community', res.data.community); that.$set(that.storeInfo, 'community', res.data.community);
that.$set(that.storeInfo, 'top_name', res.data.top_name); that.$set(that.storeInfo, 'top_name', res.data.top_name);
that.$set(that.storeInfo, 'atmosphere_pic', res.data.atmosphere_pic); that.$set(that.storeInfo, 'atmosphere_pic', res.data.atmosphere_pic);
}) })
// #ifdef H5 // #ifdef H5
if (that.isLogin) { if (that.isLogin) {
@ -1199,11 +1200,11 @@
mask: true mask: true
}); });
// #ifdef MP || APP-PLUS // #ifdef MP || APP-PLUS
arr2 = [that.posterbackgd, await that.fileStoreImage(that.storeImage), await that.fileStoreImage( arr2 = [await that.fileStoreImage(that.posterbackgd), await that.fileStoreImage(that.storeImage), await that.fileStoreImage(
that.codeImg), await that.fileStoreImage(that.share_pic)]; that.codeImg), await that.fileStoreImage(that.share_pic)];
// #endif // #endif
// #ifdef H5 // #ifdef H5
arr2 = [that.posterbackgd, await that.imgToBase(that.storeImage), await that.imgToBase(that.codeImg), await that.imgToBase(that.share_pic)]; arr2 = [await that.imgToBase(that.posterbackgd), await that.imgToBase(that.storeImage), await that.imgToBase(that.codeImg), await that.imgToBase(that.share_pic)];
// #endif // #endif
that.$util.goodsPosterCanvas(arr2, that.storeInfo.store_name, that.storeInfo.price, that.site_name, that.storeInfo.ot_price, function(tempFilePath) { that.$util.goodsPosterCanvas(arr2, that.storeInfo.store_name, that.storeInfo.price, that.site_name, that.storeInfo.ot_price, function(tempFilePath) {
that.$set(that, 'posterImage', tempFilePath); that.$set(that, 'posterImage', tempFilePath);

View File

@ -14,7 +14,7 @@
<text class="iconfont" :class="item.icon"></text> <text class="iconfont" :class="item.icon"></text>
<text class="pl-20">{{item.name}}</text> <text class="pl-20">{{item.name}}</text>
</view> </view>
</view> </view>
<view> <view>
<scroll-view :scroll-top="scrollTop" scroll-y='true' scroll-with-animation="true" :style='"height:"+height+"px;"' <scroll-view :scroll-top="scrollTop" scroll-y='true' scroll-with-animation="true" :style='"height:"+height+"px;"'
@scroll="scroll"> @scroll="scroll">
@ -422,7 +422,7 @@
PromotionCode: '', // PromotionCode: '', //
canvasStatus: false, // canvasStatus: false, //
posterImage: '', // posterImage: '', //
posterbackgd: '/static/images/posterbackgd.png', posterbackgd: '',
sharePacket: { sharePacket: {
isState: true, // isState: true, //
}, // }, //
@ -580,6 +580,7 @@
shareScence(that.currSpid, that.isLogin) shareScence(that.currSpid, that.isLogin)
}, },
onReady() { onReady() {
this.posterbackgd = `${HTTP_REQUEST_URL}/static/images/mer/posterbackgd.png`;
this.isNodes++; this.isNodes++;
this.$nextTick(function() { this.$nextTick(function() {
// #ifdef MP // #ifdef MP
@ -710,7 +711,7 @@
priceRuleApi(this.storeInfo.cate_id).then(res => { priceRuleApi(this.storeInfo.cate_id).then(res => {
this.priceRule = res.data this.priceRule = res.data
}).catch(err => { }).catch(err => {
}); });
}, },
goActivity: function(e) { goActivity: function(e) {
@ -1003,7 +1004,7 @@
that.$set(that, 'guaranteeValue', res.data.product.guarantee ? res.data.product.guarantee.template_name : ''); that.$set(that, 'guaranteeValue', res.data.product.guarantee ? res.data.product.guarantee.template_name : '');
that.$set(that, 'guarantee', res.data.product.guaranteeTemplate ? res.data.product.guaranteeTemplate : []); that.$set(that, 'guarantee', res.data.product.guaranteeTemplate ? res.data.product.guaranteeTemplate : []);
that.$set(that, 'shipping', res.data.product.temp ? res.data.product.temp.info : ''); that.$set(that, 'shipping', res.data.product.temp ? res.data.product.temp.info : '');
that.$set(that.specsInfo, 'params', res.data.product.params); that.$set(that.specsInfo, 'params', res.data.product.params);
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: storeInfo.store_name.substring(0, 7) + "..." title: storeInfo.store_name.substring(0, 7) + "..."
}) })
@ -1409,11 +1410,10 @@
mask: true mask: true
}); });
// #ifdef MP || APP-PLUS // #ifdef MP || APP-PLUS
arr2 = [that.posterbackgd, await that.fileStoreImage(that.storeImage), await that.fileStoreImage( arr2 = [await that.fileStoreImage(that.posterbackgd), await that.fileStoreImage(that.storeImage), await that.fileStoreImage(that.codeImg), await that.fileStoreImage(that.share_pic)];
that.codeImg), await that.fileStoreImage(that.share_pic)];
// #endif // #endif
// #ifdef H5 // #ifdef H5
arr2 = [that.posterbackgd, await this.imgToBase(that.storeImage), await this.imgToBase(this.codeImg), await that.imgToBase(that.share_pic)]; arr2 = [await that.imgToBase(that.posterbackgd), await this.imgToBase(that.storeImage), await this.imgToBase(this.codeImg), await that.imgToBase(that.share_pic)];
// #endif // #endif
that.$util.goodsPosterCanvas(arr2, that.storeInfo.store_name, that.storeInfo.price, that.site_name, that.storeInfo.ot_price, function(tempFilePath) { that.$util.goodsPosterCanvas(arr2, that.storeInfo.store_name, that.storeInfo.price, that.site_name, that.storeInfo.ot_price, function(tempFilePath) {
that.$set(that, 'posterImage', tempFilePath); that.$set(that, 'posterImage', tempFilePath);
@ -2407,14 +2407,14 @@
font-weight: 800; font-weight: 800;
font-size: 28rpx; font-size: 28rpx;
line-height: 100rpx; line-height: 100rpx;
color: #FFFFFF; color: #FFFFFF;
.num { .num {
font-size: 48rpx; font-size: 48rpx;
} }
} }
&.share { &.share {
align-items: flex-start; align-items: flex-start;
padding: 20rpx 0 0 !important; padding: 20rpx 0 0 !important;
.introduce { .introduce {
flex: 1; flex: 1;
margin-top: 0; margin-top: 0;

View File

@ -317,7 +317,7 @@
storeImage: '', // storeImage: '', //
canvasStatus: false, // canvasStatus: false, //
posterImage: '', // posterImage: '', //
posterbackgd: '/static/images/posterbackgd.png', posterbackgd: '',
source: '', source: '',
domain: HTTP_REQUEST_URL, domain: HTTP_REQUEST_URL,
sharePacket: { sharePacket: {
@ -403,7 +403,9 @@
}); });
this.getPreviewDetails() this.getPreviewDetails()
}, },
onReady() {}, onReady() {
this.posterbackgd = `${HTTP_REQUEST_URL}/static/images/mer/posterbackgd.png`;
},
onShow() { onShow() {
// this.getConfig() // this.getConfig()
}, },

View File

@ -14,7 +14,7 @@
<text class="iconfont" :class="item.icon"></text> <text class="iconfont" :class="item.icon"></text>
<text class="pl-20">{{item.name}}</text> <text class="pl-20">{{item.name}}</text>
</view> </view>
</view> </view>
<view v-if="storeInfo && storeInfo.merchant"> <view v-if="storeInfo && storeInfo.merchant">
<scroll-view :scroll-top="scrollTop" scroll-y='true' scroll-with-animation="true" :style='"height:"+height+"px;"' <scroll-view :scroll-top="scrollTop" scroll-y='true' scroll-with-animation="true" :style='"height:"+height+"px;"'
@scroll="scroll"> @scroll="scroll">
@ -43,7 +43,7 @@
<view class="fenxiang_btn" @click="listenerActionSheet"> <view class="fenxiang_btn" @click="listenerActionSheet">
<view class='iconfont icon-fenxiang'></view> <view class='iconfont icon-fenxiang'></view>
分享 分享
</view> </view>
</view> </view>
<view v-if="storeInfo.atmosphere_pic" class='integral_count skeleton-rect'> <view v-if="storeInfo.atmosphere_pic" class='integral_count skeleton-rect'>
<text v-if="storeInfo.max_integral > 0" class='integral'>积分最高可抵扣{{storeInfo.max_integral}}</text> <text v-if="storeInfo.max_integral > 0" class='integral'>积分最高可抵扣{{storeInfo.max_integral}}</text>
@ -64,12 +64,12 @@
分享 分享
</view> </view>
</view> </view>
<view <view
v-if="svipData && !svipData.is_svip && svipData.show_svip" v-if="svipData && !svipData.is_svip && svipData.show_svip"
class="svipCon acea-row row-between-wrapper skeleton-rect" style="margin-top: 20rpx;"> class="svipCon acea-row row-between-wrapper skeleton-rect" style="margin-top: 20rpx;">
<view class="acea-row row-between-wrapper"> <view class="acea-row row-between-wrapper">
<image src="/static/images/svip_user.png"></image> <image src="/static/images/svip_user.png"></image>
<view class="">开通 SVIP会员 <view class="">开通 SVIP会员
<block v-if="svipData.show_svip_price">立省<text>{{svipData.save_money}}</text></block> <block v-if="svipData.show_svip_price">立省<text>{{svipData.save_money}}</text></block>
<block v-else><text>省钱多多权益多多</text></block> <block v-else><text>省钱多多权益多多</text></block>
</view> </view>
@ -393,7 +393,6 @@
</template> </template>
<script> <script>
var sysHeight = uni.getSystemInfoSync().statusBarHeight; var sysHeight = uni.getSystemInfoSync().statusBarHeight;
// import { getconfig } from '@/api/public.js'; // import { getconfig } from '@/api/public.js';
import { arrivalSubscribe } from '@/utils/SubscribeMessage.js'; import { arrivalSubscribe } from '@/utils/SubscribeMessage.js';
@ -487,7 +486,7 @@
PromotionCode: '', // PromotionCode: '', //
canvasStatus: false, // canvasStatus: false, //
posterImage: '', // posterImage: '', //
posterbackgd: '/static/images/posterbackgd.png', posterbackgd: '',//
source: '', source: '',
sharePacket: { sharePacket: {
isState: true, // isState: true, //
@ -655,6 +654,8 @@
} }
}, },
onReady() { onReady() {
this.posterbackgd = `${HTTP_REQUEST_URL}/static/images/mer/posterbackgd.png`;
this.isNodes++; this.isNodes++;
this.$nextTick(function() { this.$nextTick(function() {
// #ifdef MP // #ifdef MP
@ -730,7 +731,7 @@
let self = this let self = this
// //
getconfig().then(res => { getconfig().then(res => {
}).catch(err => {}) }).catch(err => {})
}, },
/**到货通知*/ /**到货通知*/
@ -865,7 +866,7 @@
* 购物车手动填写 * 购物车手动填写
* *
*/ */
iptCartNum: function(e) { iptCartNum: function(e) {
this.$set(this.attr.productSelect, 'cart_num', e); this.$set(this.attr.productSelect, 'cart_num', e);
}, },
// 退 // 退
@ -1068,9 +1069,9 @@
that.$set(that, 'max_count', res.data.once_max_count); that.$set(that, 'max_count', res.data.once_max_count);
that.$set(that, 'pay_limit', res.data.pay_limit); that.$set(that, 'pay_limit', res.data.pay_limit);
that.$set(that, 'min_count', res.data.once_min_count); that.$set(that, 'min_count', res.data.once_min_count);
that.$set(that, 'svipData', res.data.show_svip_info || null); that.$set(that, 'svipData', res.data.show_svip_info || null);
that.$set(that, 'svipPrice', res.data.show_svip_info && res.data.show_svip_info.show_svip_price || false); that.$set(that, 'svipPrice', res.data.show_svip_info && res.data.show_svip_info.show_svip_price || false);
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: storeInfo.store_name.substring(0, 7) + "..." title: storeInfo.store_name.substring(0, 7) + "..."
}) })
@ -1089,12 +1090,12 @@
} }
that.$set(that, 'guarantee', res.data.guaranteeTemplate ? res.data.guaranteeTemplate : []); that.$set(that, 'guarantee', res.data.guaranteeTemplate ? res.data.guaranteeTemplate : []);
that.$set(that, 'shippingValue', res.data.temp ? res.data.temp.name : ''); that.$set(that, 'shippingValue', res.data.temp ? res.data.temp.name : '');
that.$set(that.specsInfo, 'params', res.data.params); that.$set(that.specsInfo, 'params', res.data.params);
that.$set(that.storeInfo, 'merchant', res.data.merchant); that.$set(that.storeInfo, 'merchant', res.data.merchant);
that.$set(that.storeInfo, 'spu_id', res.data.spu_id); that.$set(that.storeInfo, 'spu_id', res.data.spu_id);
that.$set(that.storeInfo, 'community', res.data.community); that.$set(that.storeInfo, 'community', res.data.community);
that.$set(that.storeInfo, 'top_name', res.data.top_name); that.$set(that.storeInfo, 'top_name', res.data.top_name);
that.$set(that.storeInfo, 'atmosphere_pic', res.data.atmosphere_pic); that.$set(that.storeInfo, 'atmosphere_pic', res.data.atmosphere_pic);
}) })
if (that.isLogin) { if (that.isLogin) {
that.downloadFilePromotionCode(); that.downloadFilePromotionCode();
@ -1409,7 +1410,7 @@
}, },
/**调用check接口判断是否超出限购数量*/ /**调用check接口判断是否超出限购数量*/
isExceedLimit(){ isExceedLimit(){
}, },
/** /**
* 获取购物车数量 * 获取购物车数量
@ -1527,11 +1528,10 @@
mask: true mask: true
}); });
// #ifdef MP || APP-PLUS // #ifdef MP || APP-PLUS
arr2 = [that.posterbackgd, await that.fileStoreImage(that.storeImage), await that.fileStoreImage( arr2 = [await that.fileStoreImage(that.posterbackgd), await that.fileStoreImage(that.storeImage), await that.fileStoreImage(that.codeImg), await that.fileStoreImage(that.share_pic)];
that.codeImg), await that.fileStoreImage(that.share_pic)];
// #endif // #endif
// #ifdef H5 // #ifdef H5
arr2 = [that.posterbackgd, await that.imgToBase(that.storeImage), await that.imgToBase(that.codeImg), await that.imgToBase(that.share_pic)]; arr2 = [await that.imgToBase(that.posterbackgd), await that.imgToBase(that.storeImage), await that.imgToBase(that.codeImg), await that.imgToBase(that.share_pic)];
// #endif // #endif
//广 //广
that.$util.goodsPosterCanvas(arr2, that.storeInfo.store_name, that.storeInfo.price, that.site_name, that.storeInfo.ot_price, function(tempFilePath) { that.$util.goodsPosterCanvas(arr2, that.storeInfo.store_name, that.storeInfo.price, that.site_name, that.storeInfo.ot_price, function(tempFilePath) {
@ -2056,7 +2056,7 @@
.svipCon { .svipCon {
height: 64rpx; height: 64rpx;
padding: 0 20rpx; padding: 0 20rpx;
margin: 8rpx 20rpx 0; margin: 8rpx 20rpx 0;
background: #FAE3BB; background: #FAE3BB;
font-size: 24rpx; font-size: 24rpx;
color: #B37400; color: #B37400;
@ -2322,7 +2322,7 @@
height: 218rpx; height: 218rpx;
border-radius: 16rpx; border-radius: 16rpx;
display: inline-block; display: inline-block;
} }
.txt { .txt {
.title { .title {
font-size: 28rpx; font-size: 28rpx;
@ -2338,7 +2338,7 @@
} }
} }
} }
} }
} }
.sys-head { .sys-head {

View File

@ -1,15 +1,15 @@
<template> <template>
<view class="shortVideo" @click="showManage = false"> <view class="shortVideo" @click="showManage = false">
<!-- <!--
注意:这是 H5、微信小程序界面请勿和 new_index.nvue、index.nvue 混用 注意:这是 H5、微信小程序界面请勿和 new_index.nvue、index.nvue 混用
1. new_index.nvue、index.nvue这两个是App页面 1. new_index.nvue、index.nvue这两个是App页面
2. 另外data.js 是上一版本留下的假数据,这一版改成了 URL 请求了(如不需要可以删除,也可作为后端请求参考) 2. 另外data.js 是上一版本留下的假数据,这一版改成了 URL 请求了(如不需要可以删除,也可作为后端请求参考)
3. 请各位大神多多留手,我已经把请求内存开到最大了 3. 请各位大神多多留手,我已经把请求内存开到最大了
4. 视频 id 切记是字符串类型 4. 视频 id 切记是字符串类型
--> -->
<!-- 头部导航 --> <!-- 头部导航 -->
<!-- 头部导航 --> <!-- 头部导航 -->
@ -30,7 +30,7 @@
<swiper-item v-for="(list,index) in dataList"> <swiper-item v-for="(list,index) in dataList">
<view v-if="max > index"> <view v-if="max > index">
<view> <view>
<!-- <!--
1.v-if用于控制视频在节点的渲染数 1.v-if用于控制视频在节点的渲染数
2.muted的默认值是 false代表默认是禁音视频的 2.muted的默认值是 false代表默认是禁音视频的
3.http-cache默认开启视频缓存 3.http-cache默认开启视频缓存
@ -117,8 +117,8 @@
<swiper <swiper
:autoplay="true" :autoplay="true"
:circular="circular" :circular="circular"
:interval="interval" :interval="interval"
:duration="duration" :duration="duration"
:loop="true" :loop="true"
next-margin="20rpx" next-margin="20rpx"
previous-margin="20rpx" previous-margin="20rpx"
@ -138,7 +138,7 @@
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</swiper-item> </swiper-item>
</block> </block>
</swiper> </swiper>
@ -179,7 +179,7 @@
<text class="dian"></text> <text class="dian"></text>
<text class="dian"></text> <text class="dian"></text>
</view> </view>
<view class="manage" v-show="showManage"> <view class="manage" v-show="showManage">
<navigator hover-class="none" :url="'/pages/plantGrass/plant_release/index?id='+list.community_id+'&type=2'" class="items"> <navigator hover-class="none" :url="'/pages/plantGrass/plant_release/index?id='+list.community_id+'&type=2'" class="items">
<image class="image" src="../static/img/index/video-edit.png"></image> <image class="image" src="../static/img/index/video-edit.png"></image>
@ -211,9 +211,9 @@
<comment <comment
ref="comments" ref="comments"
:bottom="0" :bottom="0"
:isShow="showComment" :isShow="showComment"
:userInfo="userInfo" :userInfo="userInfo"
@successFul="pinlunFun" @successFul="pinlunFun"
@close="closeScrollview" @close="closeScrollview"
></comment> ></comment>
<!-- 他提到的宝贝弹窗 --> <!-- 他提到的宝贝弹窗 -->
@ -321,7 +321,7 @@
PromotionCode: '', //二维码图片 PromotionCode: '', //二维码图片
canvasStatus: false, //海报绘图标签 canvasStatus: false, //海报绘图标签
posterImage: '', //海报路径 posterImage: '', //海报路径
posterbackgd: '../static/img/index/posterbackgd.png', posterbackgd: '',
avatar: '/static/images/f.png', avatar: '/static/images/f.png',
codeImg: "", codeImg: "",
autoplay: false, autoplay: false,
@ -371,7 +371,7 @@
this.isUser = options.user==1 ? true : false; this.isUser = options.user==1 ? true : false;
this.userUid = options.uid ? options.uid : 0; this.userUid = options.uid ? options.uid : 0;
this.isSatrt = options.tab == 1 ? 1 : 0; this.isSatrt = options.tab == 1 ? 1 : 0;
this.get() //刚进入页面加载数据 this.get() //刚进入页面加载数据
if(this.isLogin){ if(this.isLogin){
this.getUserInfo(); this.getUserInfo();
@ -387,6 +387,7 @@
uni.createVideoContext(this.dataList[this.k].community_id+''+this.k,this).pause();//暂停以后继续播放 uni.createVideoContext(this.dataList[this.k].community_id+''+this.k,this).pause();//暂停以后继续播放
}, },
onReady: function() { onReady: function() {
this.posterbackgd = `${HTTP_REQUEST_URL}/static/images/mer/posterbackgd.png`;
this.windowWidth = uni.getSystemInfoSync().windowWidth this.windowWidth = uni.getSystemInfoSync().windowWidth
this.windowHeight = uni.getSystemInfoSync().windowHeight this.windowHeight = uni.getSystemInfoSync().windowHeight
}, },
@ -497,7 +498,7 @@
} }
} }
}); });
}, },
// 授权回调 // 授权回调
onLoadFun() { onLoadFun() {
@ -576,9 +577,9 @@
uni.setStorageSync("user",this.peopleList[i]); uni.setStorageSync("user",this.peopleList[i]);
这个东西,用于存储当前用户信息。在 插件里面会使用到这个东西, 这个东西,用于存储当前用户信息。在 插件里面会使用到这个东西,
记得写一下。 记得写一下。
4打开评论 4打开评论
*/ */
this.showComment = true this.showComment = true
this.$refs.comments.getData(item,index); this.$refs.comments.getData(item,index);
}, },
@ -612,7 +613,7 @@
this.posterImage = false; this.posterImage = false;
if(this.isLogin && this.dataList[this.k]){ if(this.isLogin && this.dataList[this.k]){
this.downloadFilePromotionCode(this.dataList[this.k]['community_id']); this.downloadFilePromotionCode(this.dataList[this.k]['community_id']);
} }
}, },
animationfinish(event){ animationfinish(event){
// 1.这里进行判断,如果是最后一个视频就进入 get() 方法加载视频进入列表 // 1.这里进行判断,如果是最后一个视频就进入 get() 方法加载视频进入列表
@ -627,7 +628,7 @@
if(!that.loadVideo) return if(!that.loadVideo) return
if(that.loadend) return if(that.loadend) return
that.loadVideo = true that.loadVideo = true
that.isUser ? that.isUser ?
myVideoList(that.userUid,{ myVideoList(that.userUid,{
page: that.page, page: that.page,
limit: that.limit, limit: that.limit,
@ -663,7 +664,7 @@
get(){ get(){
let that = this let that = this
// 1.这里引入后端请求数据 // 1.这里引入后端请求数据
that.isUser ? that.isUser ?
myVideoList(that.userUid,{ myVideoList(that.userUid,{
page: that.page, page: that.page,
limit: that.limit, limit: that.limit,
@ -718,7 +719,7 @@
videoData(list){ videoData(list){
if(list.length == 0)return if(list.length == 0)return
let that = this; let that = this;
var msg = list var msg = list
// 2.这里把视频添加到视频列表 // 2.这里把视频添加到视频列表
for (let i = 0; i < msg.length; i++) { for (let i = 0; i < msg.length; i++) {
@ -857,7 +858,7 @@
*/ */
async goPoster() { async goPoster() {
if(!this.isLogin){ if(!this.isLogin){
} }
if (this.posterImage) { if (this.posterImage) {
this.posterImageStatus = true this.posterImageStatus = true
@ -874,18 +875,17 @@
}); });
// #ifdef MP || APP-PLUS // #ifdef MP || APP-PLUS
if(that.dataList[that.k].author.avatar){ if(that.dataList[that.k].author.avatar){
arr2 = [that.posterbackgd,await that.fileStoreImage(that.dataList[that.k].image[0]), await that.fileStoreImage( arr2 = [await that.fileStoreImage(that.posterbackgd),await that.fileStoreImage(that.dataList[that.k].image[0]), await that.fileStoreImage(that.codeImg), await that.fileStoreImage(that.dataList[that.k].author.avatar)];
that.codeImg), await that.fileStoreImage(that.dataList[that.k].author.avatar)];
}else{ }else{
arr2 = [that.posterbackgd,await that.fileStoreImage(that.dataList[that.k].image[0]), await that.fileStoreImage( arr2 = [await that.fileStoreImage(that.posterbackgd),await that.fileStoreImage(that.dataList[that.k].image[0]), await that.fileStoreImage(
that.codeImg), that.avatar]; that.codeImg), that.avatar];
} }
// #endif // #endif
// #ifdef H5 // #ifdef H5
if(that.dataList[that.k].author.avatar){ if(that.dataList[that.k].author.avatar){
arr2 = [that.posterbackgd,await that.imgToBase(that.dataList[that.k].image[0]), await that.imgToBase(that.codeImg), await that.imgToBase(that.dataList[that.k].author.avatar)]; arr2 = [await that.imgToBase(that.posterbackgd),await that.imgToBase(that.dataList[that.k].image[0]), await that.imgToBase(that.codeImg), await that.imgToBase(that.dataList[that.k].author.avatar)];
}else{ }else{
arr2 = [that.posterbackgd,await that.imgToBase(that.dataList[that.k].image[0]), await that.imgToBase(that.codeImg), that.avatar]; arr2 = [await that.imgToBase(that.posterbackgd),await that.imgToBase(that.dataList[that.k].image[0]), await that.imgToBase(that.codeImg), that.avatar];
} }
// #endif // #endif
//生成推广海报 //生成推广海报
@ -971,7 +971,7 @@
}) })
}, },
// #endif // #endif
async imgToBase(url) { async imgToBase(url) {
let res = await imgToBase({ let res = await imgToBase({
image: url image: url
}) })
@ -1000,7 +1000,7 @@
this.isAuto = true; this.isAuto = true;
this.isShowAuth = true; this.isShowAuth = true;
} }
}, },
/*查看提到的宝贝*/ /*查看提到的宝贝*/
openMore(item){ openMore(item){
@ -1023,7 +1023,7 @@
} else if (item.product_type === 0) { } else if (item.product_type === 0) {
uni.navigateTo({ uni.navigateTo({
url: `/pages/goods_details/index?id=${item.product_id}&spid=${this.uid}` url: `/pages/goods_details/index?id=${item.product_id}&spid=${this.uid}`
}) })
}else if (item.product_type === 4) { }else if (item.product_type === 4) {
uni.navigateTo({ uni.navigateTo({
url: `/pages/activity/combination_details/index?id=${item.activity_id}&spid=${this.uid}` url: `/pages/activity/combination_details/index?id=${item.activity_id}&spid=${this.uid}`
@ -1032,7 +1032,7 @@
uni.navigateTo({ uni.navigateTo({
url: `/pages/activity/combination_status/index?id=${item.activity_id}&spid=${this.uid}` url: `/pages/activity/combination_status/index?id=${item.activity_id}&spid=${this.uid}`
}) })
} }
} }
} }
} }
@ -1072,7 +1072,7 @@
font-size: 38rpx; font-size: 38rpx;
} }
} }
} }
} }
.shareImg{ .shareImg{
@ -1110,7 +1110,7 @@
margin: 15rpx 0 0 48rpx; margin: 15rpx 0 0 48rpx;
} }
.image{ .image{
width: 28rpx; width: 28rpx;
height: 28rpx; height: 28rpx;
} }
@ -1134,7 +1134,7 @@
right: 20rpx; right: 20rpx;
flex-direction: column; flex-direction: column;
text-align: center; text-align: center;
.pictrue{ .pictrue{
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
@ -1210,7 +1210,7 @@
.info-text{ .info-text{
margin-top: 10rpx; margin-top: 10rpx;
color: #ffffff; color: #ffffff;
} }
.userAvatar{ .userAvatar{
border-radius: 500%; border-radius: 500%;
@ -1330,14 +1330,14 @@
margin-top: -410rpx; margin-top: -410rpx;
border-radius: 30rpx; border-radius: 30rpx;
} }
.poster-pop .image { .poster-pop .image {
width: 100%; width: 100%;
height: 100%; height: 100%;
display: block; display: block;
border-radius: 16rpx; border-radius: 16rpx;
} }
.poster-pop .close { .poster-pop .close {
width: 46rpx; width: 46rpx;
height: 75rpx; height: 75rpx;
@ -1346,7 +1346,7 @@
top: -73rpx; top: -73rpx;
display: block; display: block;
} }
.poster-pop .keep { .poster-pop .keep {
text-align: center; text-align: center;
width: 600rpx; width: 600rpx;
@ -1418,7 +1418,7 @@
background: rgba(0,0,0,.55); background: rgba(0,0,0,.55);
border-radius: 12rpx; border-radius: 12rpx;
padding: 16rpx 15rpx; padding: 16rpx 15rpx;
margin-right: 30rpx; margin-right: 30rpx;
} }
/deep/uni-swiper,/deep/swiper{ /deep/uni-swiper,/deep/swiper{
display: block; display: block;
@ -1441,7 +1441,7 @@
width: 414rpx; width: 414rpx;
flex-direction: row; flex-direction: row;
justify-content: space-between; justify-content: space-between;
border-radius: 12rpx; border-radius: 12rpx;
.picture{ .picture{
width: 104rpx; width: 104rpx;
height: 104rpx; height: 104rpx;
@ -1450,7 +1450,7 @@
width: 104rpx; width: 104rpx;
height: 104rpx; height: 104rpx;
border-radius: 10rpx; border-radius: 10rpx;
} }
} }
.product-text{ .product-text{
width: 266rpx; width: 266rpx;
@ -1565,7 +1565,7 @@
z-index: 9; z-index: 9;
width: 750rpx; width: 750rpx;
flex-direction: row; flex-direction: row;
justify-content: center; justify-content: center;
.pictrue { .pictrue {
width: 414rpx; width: 414rpx;
height: 256rpx; height: 256rpx;
@ -1577,4 +1577,4 @@
color: #999; color: #999;
} }
} }
</style> </style>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB