推广海报.

This commit is contained in:
18631081161 2025-03-03 16:47:26 +08:00
parent 7c617eaba3
commit 4930acf7e5
11 changed files with 191 additions and 2617 deletions

Binary file not shown.

View File

@ -221,8 +221,11 @@ export default {
mask: false
})
}, 100)
return
return;
}
console.log("loadingloadingloadingloadingloading", loading);
loading = true;
console.log("loadingloadingloadingloadingloading", loading);
/* 如果定时器未结束 */
if (this.data.timer) {
@ -254,6 +257,36 @@ export default {
fun && fun(data && data)
},
noDouble1(fun, data) {
/**
* $common.noDouble(fun,data)
* fun 需要规避连点的方法
* data 该方法需要用到的参数
* loading 接口加载中状态
* 传入方法不要写括号
*/
/* 如果接口加载中,终止任何操作 */
if (this.data.loading) {
uni.showToast({
title: '请勿重复点击',
icon: 'none',
mask: false
})
console.log("防抖", this.data.loading);
return;
}
this.data.loading = true;
try {
fun && fun(data && data);
} catch (e) {
//TODO handle the exception
}
var that=this;
setTimeout(()=>{that.data.loading = false; console.log("方法执行结束", this.data.loading, this.data.loading);},1000)
},
/**
* @description: tost提示
* @return {*}

18
package-lock.json generated Normal file
View File

@ -0,0 +1,18 @@
{
"name": "flyx",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"dependencies": {
"uqrcodejs": "^4.0.7"
}
},
"node_modules/uqrcodejs": {
"version": "4.0.7",
"resolved": "https://registry.npmjs.org/uqrcodejs/-/uqrcodejs-4.0.7.tgz",
"integrity": "sha512-84+aZmD2godCVI+93lxE3YUAPNY8zAJvNA7xRS7R7U+q57KzMDepBSfNCwoRUhWOfR6eHFoAOcHRPwsP6ka1cA==",
"license": "Apache-2.0"
}
}
}

5
package.json Normal file
View File

@ -0,0 +1,5 @@
{
"dependencies": {
"uqrcodejs": "^4.0.7"
}
}

View File

@ -1,8 +1,9 @@
<template>
<view class="content">
<view class="page-hd common_bg relative" :style="{
<!-- <view class="page-hd common_bg relative" :style="{
backgroundImage: `url(${$img1('index/jifen.png')})`
}"></view>
}"></view> -->
<image :src="$img1('index/jifen.png')" style="width: 100%; margin-top: ;" mode=""></image>
<view class="list relative">
<view class="list-item" v-for="(item, i) in datas" :key="i" @click="items(item)">
@ -11,7 +12,8 @@
<view class="pic-type" :style="{background:'url('+ $img1('common/label1.png')+')'}">
<text>积分赏</text>
</view>
<image :src="$img1('common/new1.png')" class="pic-new" mode="widthFix" v-if="item.new_is==1"></image>
<image :src="$img1('common/new1.png')" class="pic-new" mode="widthFix" v-if="item.new_is==1">
</image>
</view>
<view class="title hang1">
{{ item.title }}
@ -332,12 +334,12 @@
.page-hd {
width: 100%;
height: 348rpx;
height: 430rpx;
z-index: 1;
}
.list {
margin-top: -50rpx;
margin-top: 20rpx;
padding: 1rpx 30rpx 30rpx;
display: flex;
flex-flow: row wrap;
@ -368,6 +370,7 @@
position: absolute;
top: 10rpx;
right: 10rpx;
>text {
font-size: 28rpx;
font-family: YouSheBiaoTiHei;
@ -376,7 +379,8 @@
text-shadow: 2rpx 2rpx #FFFFFF;
}
}
.pic-new{
.pic-new {
width: 80rpx;
position: absolute;
z-index: 10;

View File

@ -416,10 +416,13 @@
if (this.handelList.length <= 0) {
return 0
}
return this.handelList.reduce(
var total = this.handelList.reduce(
(pre, item) => pre + item.chooseNum * item.goodslist_money,
0
)
console.log("8888888" , total);
return total.toFixed(2);
},
/* 是否全选 */
isAll() {
@ -519,8 +522,8 @@
chooseAdd() {
this.canReload = false
var that=this;
var that = this;
// #ifdef H5
this.req({
url: 'getAccessTokenOffiaccountSign',
@ -571,7 +574,7 @@
}
});
});
wx.error(function(res) {
// configerrorconfigdebugresSPA

View File

@ -312,7 +312,7 @@
</view>
</view>
<view class="card-row" @click="$c.to({ url: '/pages/user/vip' })">
<!-- <view class="card-row" @click="$c.to({ url: '/pages/user/vip' })">
<view class="title">
{{
orderData.zhe
@ -328,7 +328,7 @@
<image :src="$img1('common/right1.png')" lazy-load></image>
</view>
</view>
</view>
</view> -->
</template>
</view>
@ -410,7 +410,7 @@
</text>
</view>
<view class="pay-btn" @click="$c.noDouble(confirmSubmit, [1, buyNum])">
<view class="pay-btn" @click="$c.noDouble1(confirmSubmit, [1, buyNum], choujiangloading)">
<text>确认支付</text>
<text>{{
pageData.goods.type == 5
@ -421,7 +421,7 @@
</view>
</uni-popup>
<buy-notice ref="buyNotice" @confirm="$c.noDouble(confirmSubmit, [1, buyNum, true])"></buy-notice>
<buy-notice ref="buyNotice" @confirm="$c.noDouble(confirmSubmit, [1, buyNum, true],choujiangloading)"></buy-notice>
<uni-popup ref="resPop" type="center" mask-background-color="rgba(0,0,0,0.8)">
<view v-if="prizeData" class="res-pop common_bg column center">
@ -437,13 +437,13 @@
<view class="title hang1">
{{ item.goodslist_title }}
</view>
<view class="exchange">
<!-- <view class="exchange">
{{
item.goodslist_money * 1 > 0
? `可兑换:${item.goodslist_money}`
: `不可兑换`
}}
</view>
</view> -->
</view>
</view>
</scroll-view>
@ -527,7 +527,8 @@
logList: [],
sendRuleData: '',
previewData: ''
previewData: '',
choujiangloading: false
}
},
computed: {
@ -760,6 +761,9 @@
}
}
})
if (type == 1) {
this.close('buyPop')
}
},
toggleCollect() {

File diff suppressed because it is too large Load Diff

View File

@ -203,7 +203,7 @@
</view>
<uni-popup ref="resPop" type="center" mask-background-color="rgba(0,0,0,0.8)">
<view class="res-pop common_bg column center" @click="close('resPop')">
<view class="res-pop common_bg column center" @click="close('resPop')">
<view class="res-pop-hd"></view>
<scroll-view class="res-pop-bd" scroll-y>
<view class="res-list">
@ -216,13 +216,13 @@
<view class="title hang1">
{{ item.goodslist_title }}
</view>
<view class="exchange">
<!-- <view class="exchange">
{{
item.goodslist_money * 1 > 0
? `可兑换:${item.goodslist_money}`
: `不可兑换`
}}
</view>
</view> -->
</view>
</view>
</scroll-view>
@ -237,19 +237,19 @@
<view class="ft-btn common_bg justify-center" :style="{
backgroundImage: `url(${$img1('common/jixuchou.png')})`
}" @click="confirmSubmit([0, buyNum])">
}" @click="confirmSubmit([0, buyNum])">
<text>继续抽</text>
</view>
</view>
<view class="r-draw common_bg justify-center" :style="{
<!-- <view class="r-draw common_bg justify-center" :style="{
backgroundImage: `url(${$img1('common/chongzhi.png')})`
}" @click="$c.noDouble(doReDraw)">
<text class="draw-num">
重置×{{ prizeData && prizeData.data.length }}
</text>
<text class="num">({{ prizeData.item_card_count }})</text>
</view>
</view> -->
</view>
</view>
</uni-popup>
@ -450,7 +450,7 @@
</view>
</view>
<view class="card-row" @click="$c.to({ url: '/pages/user/vip' })">
<!-- <view class="card-row" @click="$c.to({ url: '/pages/user/vip' })">
<view class="title align-center">
<text class="ml20">{{orderData.zhe ? `会员折扣 (${orderData.zhe}折)` : '暂无会员抵扣'}}</text>
</view>
@ -460,7 +460,7 @@
<image :src="$img1('common/right1.png')" lazy-load></image>
</view>
</view>
</view>
</view> -->
</view>
<view class="pay-title ziti">选择支付方式</view>
<view class="pay-type" @click="changePay('useIntegral')">
@ -508,7 +508,7 @@
</text>
</view>
<view class="pay-btn" @click="$c.noDouble(confirmSubmit, [1, buyNum])">
<view class="pay-btn" @click="$c.noDouble1(confirmSubmit, [1, buyNum])">
<text>确认支付</text>
<text>
{{
@ -587,7 +587,8 @@
bossList: [],
bossTotal: 0,
playRuleData: '',
logList: []
logList: [],
choujiangloading: false
}
},
@ -605,15 +606,15 @@
},
onShareAppMessage() {
if(this.$refs["couponPop"]!=null){
var co= this.$refs["couponPop"].getfengxiaodata();
if(co!=null){
if (this.$refs["couponPop"] != null) {
var co = this.$refs["couponPop"].getfengxiaodata();
if (co != null) {
console.log(co);
return co;
}
}
return {
title: `吧唧一番赏${this.pageData.goods.title}系列`,
imageUrl: this.pageData.goods.imgurl_detail,
@ -679,7 +680,7 @@
this.$refs.bossScroll.mescroll.resetUpScroll()
this.$refs.bossScroll.mescroll.scrollTo(0, 0)
},
previewDetail(item, a) {
const obj = {
imgurl: a.imgurl,
@ -810,6 +811,7 @@
},
confirmSubmit([type, num, fromNotice = false]) {
let url = 'infinite_ordermoney'
console.log(type);
if (type == 1) {
@ -823,7 +825,7 @@
this.buyNum = num
this.req({
this.req({
url,
data: {
goods_id: this.pageData.goods.id,
@ -871,6 +873,9 @@
}
}
})
if (type == 1) {
this.close('buyPop')
}
},
doRefresh() {

View File

@ -37,9 +37,9 @@
</view>
<text class="lv-box-detail" @click="$c.to({ url: '/package/mine/equity' })">查看详情</text>
</view>
<view class="rbtn flex" @click="$c.to({ url: '/pages/user/vip' })">
<!-- <view class="rbtn flex" @click="$c.to({ url: '/pages/user/vip' })">
<image class="img100" :src="$img1('my/huiyuan.png')"></image>
</view>
</view> -->
<view class="rbtn btn1 flex" @click="$c.to({ url: '/package/index/sign' })">
<image class="img100" :src="$img1('my/sign.png')"></image>
</view>

View File

@ -35,8 +35,14 @@
</view>
</view>
</view>
<button v-if="!ish5" open-type="share" class="invite-btn"></button>
<button v-if="ish5" class="invite-btn" @click="fenxiang()"></button>
<!-- // -->
<view class="" style="flex-direction: row; display: flex;">
<button v-if="!ish5" open-type="share" class="invite-btn"></button>
<button class="invite-btn2" style="margin-left: 20rpx;" @click="showPosterPopup"></button>
</view>
</view>
<view class="invite-log">
@ -67,10 +73,22 @@
</mescroll-body>
<rule-pop ref="rulePop"></rule-pop>
<uni-popup ref="posterPopup" type="center">
<canvas canvas-id="myPoster" style="width: 650rpx; height: 950rpx;">
<view class="view_poster">
<canvas id="qrcode" canvas-id="qrcode"
style="width: 150px;height: 150px; position: absolute; bottom: 180rpx; left: 200rpx;"></canvas>
</view>
</canvas>
</uni-popup>
</view>
</template>
<script>
import UQRCode from 'uqrcodejs'; // npm install uqrcodejs
export default {
data() {
var isH5 = false;
@ -98,6 +116,7 @@
},
onLoad() {
console.log(uni.getStorageSync('userinfo').ID)
onReady();
},
methods: {
/*下拉刷新的回调 */
@ -136,6 +155,53 @@
}
}
})
},
//
showPosterPopup() {
this.$refs.posterPopup.open();
this.drawAndExport();
},
onReady() {
// uQRCode
var qr = new UQRCode();
//
qr.data = "https://uqrcode.cn/doc";
// canvas
qr.size = 150;
//
qr.make();
// canvas
var canvasContext = uni.createCanvasContext('qrcode', this); // this
// uQRCodecanvas
qr.canvasContext = canvasContext;
// canvas
qr.drawCanvas();
},
drawAndExport() {
const ctx = uni.createCanvasContext('myPoster', this);
ctx.setFillStyle('red');
ctx.fillRect(10, 10, 150, 75);
ctx.setFontSize(18);
ctx.setFillStyle('black');
ctx.fillText('Hello, Canvas!', 50, 50);
ctx.draw(false, () => {
uni.canvasToTempFilePath({
canvasId: 'myPoster',
success: res => {
console.log('图片路径:', res.tempFilePath);
//
},
fail: err => {
console.error('生成图片失败:', err);
}
});
});
uni.showToast({
title: "图片保存成功"
})
}
}
}
@ -172,6 +238,13 @@
#090a15);
}
.view_poster {
width: 650rpx;
height: 950rpx;
background: url($imgurl+'my/img_poster.jpg') no-repeat 0 0 / 100% 100%;
}
.page-wrap {
width: 100vw;
min-height: 100vh;
@ -374,6 +447,13 @@
background: url($imgurl+'my/yqbtn.png') no-repeat 0 0 / 100% 100%;
}
.invite-btn2 {
margin: 30rpx auto 0;
width: 296rpx;
height: 86rpx;
background: url($imgurl+'my/promotion_poster.png') no-repeat 0 0 / 100% 100%;
}
.tips {
text-align: center;
font-size: 28rpx;