添加:权重值中心 添加分享二维码

This commit is contained in:
wuhui_zzw 2023-10-23 10:19:02 +08:00
parent 075bb41933
commit 3c89ee040d
1 changed files with 79 additions and 5 deletions

View File

@ -61,10 +61,18 @@
</div> </div>
</div> </div>
</div> </div>
<!-- 海报部分 -->
<yz-goodsposter v-model="posterShow" :posterData="poster_Data" :defaultImg="poster" :width="`18.875rem`" v-on:finish="uploadImageM"></yz-goodsposter>
<!-- 海报部分 end -->
</div> </div>
</template> </template>
<script> <script>
import yzGoodsposter from "components/ui_components/yz_goodsPoster";
export default { export default {
components:{
yzGoodsposter,
},
data() { data() {
return { return {
page_title: '', page_title: '',
@ -80,9 +88,17 @@ export default {
{ title: '我的权重值', sub_title: '查看权重值', icon: '001.png', path_name: 'weight_value' }, { title: '我的权重值', sub_title: '查看权重值', icon: '001.png', path_name: 'weight_value' },
{ title: '我的典藏', sub_title: '我的画作', icon: '002.png', path_name: 'collection_room' }, { title: '我的典藏', sub_title: '我的画作', icon: '002.png', path_name: 'collection_room' },
{ title: '我的客户', sub_title: '团队客户明细', icon: '003.png', path_name: 'myRelationship' }, { title: '我的客户', sub_title: '团队客户明细', icon: '003.png', path_name: 'myRelationship' },
{ title: '分享二维码', sub_title: '生成分享码', icon: '004.png', path_name: '' }, { title: '分享二维码', sub_title: '生成分享码', icon: '004.png', path_name: 'qrcode' },
{ title: '团队业绩', sub_title: '团队累计业绩', icon: '005.png', path_name: 'incomedetails' }, { title: '团队业绩', sub_title: '团队累计业绩', icon: '005.png', path_name: 'incomedetails' },
], ],
//
posterShow: false,
poster: "",
poster_Data: {
poster_data: null,
background: {}
},
}; };
}, },
activated() { activated() {
@ -130,11 +146,69 @@ export default {
// //
toolGoToPage(pathName){ toolGoToPage(pathName){
if(pathName === 'weight_value') this.goToPage('weight_value',{},{ team_level_id: this.page_params.team_level_id}); if(pathName === 'weight_value') this.goToPage('weight_value',{},{ team_level_id: this.page_params.team_level_id});
else if(pathName === 'qrcode') this.getPoster();
else this.goToPage(pathName); else this.goToPage(pathName);
} },
//
getPoster(e) {
let _this = this;
$http.get("member.qrcode.get-poster", {}, {})
.then(res => {
if (parseInt(res.result) === 1) {
_this.isNewPosterPlugin = res.data.new || false;
let center_show = !isNaN(parseInt(res.data.center_show)) ? parseInt(res.data.center_show) : 0;
if (center_show === 0) {
//0
_this.poster = res.data.image_url;
_this.posterShow = true;
} else if (center_show === 1) {
//
_this.poster_Data.background.src = res.data.background_url || res.data.background;
_this.poster_Data.background.type = "background";
_this.poster_Data.poster_data = res.data.style_data;
_this.poster_id = res.data.id;
_this.posterShow = true;
} else if (center_show === 2) {
//
_this.toastPoster = _this.$toast({
duration: -1, // toast
message: "正在为您生成海报中"
});
_this.openQrCode_old(e);
}
}
})
.catch((error) => {});
},
openQrCode_old(e) {
if (!this.poster) {
if (!this.timer) {
this.getPoster_oldApi(e);
this.timer = setInterval(() => {
this.getPoster_oldApi(e);
}, 3000);
}
} else {
clearInterval(this.timer);
this.toastPoster.clear();
}
},
getPoster_oldApi(e) {
$http.get("member.poster").then(
response => {
if (response.result === 1) {
this.poster = response.data.image_url;
if (this.poster) this.clearPostetInterval();
} else {
this.$toast(response.msg);
this.clearPostetInterval();
}
},
response => {
this.clearPostetInterval();
}
);
},
} }
}; };