修复bug
This commit is contained in:
@@ -18,13 +18,13 @@
|
||||
<div class="left">
|
||||
<div class="tab">
|
||||
<div @click="tabIndex = 0" :class="[tabIndex === 0 ? 'active' : '']">
|
||||
<span>VIP</span>
|
||||
<span>金币充值</span>
|
||||
</div>
|
||||
<div @click="tabIndex = 1" :class="[tabIndex === 1 ? 'active' : '']">
|
||||
<span>SVIP</span>
|
||||
<span>基础功能</span>
|
||||
</div>
|
||||
<div @click="tabIndex = 2" :class="[tabIndex === 2 ? 'active' : '']">
|
||||
<span>超级VIP</span>
|
||||
<span>高级功能</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-content"
|
||||
@@ -34,17 +34,17 @@
|
||||
<div
|
||||
class="tab-content__item"
|
||||
:class="[currIndex === i ? 'active' : '']"
|
||||
v-for="(price, i) in 4"
|
||||
v-for="(price, i) in priceList"
|
||||
:key="i"
|
||||
@click="currIndex = i">
|
||||
<h3>12个月</h3>
|
||||
@click="currIndex = i, getQrcode(price)">
|
||||
<h3>{{ price.remark }}</h3>
|
||||
<div class="price">
|
||||
<i>¥</i>
|
||||
<span>88</span>
|
||||
<span>{{ price.price }}</span>
|
||||
</div>
|
||||
<div class="original-price">
|
||||
<i>¥</i>
|
||||
<span>88</span>
|
||||
<span>{{ price.originPrice }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -55,7 +55,8 @@
|
||||
<span class="price">88</span>
|
||||
</div>
|
||||
<div class="code">
|
||||
<img src="../assets/code.png" />
|
||||
<!-- <img src="../assets/code.png" /> -->
|
||||
<vue-qr v-if="qrcode" :text="qrcode" :size="120" :margin="8" :logoSrc="wechatLogo"/>
|
||||
</div>
|
||||
<div class="paytype">
|
||||
<svg width="13" height="13" viewBox="0 0 13 13" xmlns="http://www.w3.org/2000/svg">
|
||||
@@ -80,11 +81,40 @@
|
||||
return {
|
||||
isShow: false,
|
||||
tabIndex: 0,
|
||||
currIndex: 0
|
||||
currIndex: 0,
|
||||
qrcode: '',
|
||||
priceList: []
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.getPriceList()
|
||||
},
|
||||
|
||||
methods: {
|
||||
getPriceList() {
|
||||
this.$http.post(`/api/priceConfig/page?module=2`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.priceList = res.data.records
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
getQrcode(item) {
|
||||
this.$http.post(`/api/order/createOrder`, null, {
|
||||
params: {
|
||||
priceConfigId: item.id
|
||||
}
|
||||
}).then(res => {
|
||||
if (res?.data?.id) {
|
||||
return res.data.id
|
||||
}
|
||||
}).then(id => this.$http.post(`/api/order/createPrepayOrder?id=${id}`)).then(res => {
|
||||
if (res?.data) {
|
||||
this.qrcode = res.data.codeUrl
|
||||
}
|
||||
})
|
||||
},
|
||||
show () {
|
||||
this.isShow = true
|
||||
},
|
||||
@@ -120,8 +150,9 @@
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
z-index: 11;
|
||||
width: 900px;
|
||||
padding: 40px 40px;
|
||||
width: 1100px;
|
||||
height: 560px;
|
||||
padding: 40px 60px;
|
||||
transform: translate(-50%, -50%);
|
||||
border-radius: 12px;
|
||||
overflow: hidden;
|
||||
@@ -130,7 +161,7 @@
|
||||
.top {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 30px;
|
||||
margin-bottom: 60px;
|
||||
|
||||
img {
|
||||
width: 40px;
|
||||
@@ -180,6 +211,7 @@
|
||||
|
||||
.middle {
|
||||
display: flex;
|
||||
height: 380px;
|
||||
|
||||
.left {
|
||||
flex: 1;
|
||||
@@ -295,6 +327,7 @@
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-left: 40px;
|
||||
padding: 20px 0 20px 0;
|
||||
|
||||
@@ -330,7 +363,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
.code img {
|
||||
.code {
|
||||
width: 150px;
|
||||
height: 150px;
|
||||
margin: 14px 0;
|
||||
|
||||
@@ -196,7 +196,7 @@
|
||||
<template v-slot="{ row }">
|
||||
<div class="table-options">
|
||||
<el-button type="text" @click="showTemplate(row)">模板预览</el-button>
|
||||
<el-button type="text" @click="updateTempate(row), isShowTemplate = false">使用</el-button>
|
||||
<el-button type="text" @click="updateTempate(row)">使用</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -396,6 +396,7 @@
|
||||
addField() {
|
||||
const num = this.dynamicFromList.length > 9 ? this.dynamicFromList.length + 1 : `0${this.dynamicFromList.length + 1}`
|
||||
|
||||
// eslint-disable-next-line no-empty
|
||||
if (this.dynamicFromList.length && !this.dynamicFromList.at(-1)[`field_${num}`]) {
|
||||
} else {
|
||||
this.$set(this.dynamicFrom, `field_${num}`, '')
|
||||
@@ -415,6 +416,9 @@
|
||||
const config = JSON.parse(res.data.content)
|
||||
this.hiprintTemplate.update(config)
|
||||
this.hiprintTemplate.setPaper(config.panels[0].width, config.panels[0].height)
|
||||
|
||||
this.dynamicFromList = JSON.parse(res.data.params)
|
||||
this.isShowTemplate = false
|
||||
}
|
||||
|
||||
this.templateLoading = false
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
/* eslint-disable no-undef */
|
||||
import { hiprint } from 'vue-plugin-hiprint'
|
||||
export const customProvider = function (options) {
|
||||
|
||||
export const customProvider = function () {
|
||||
const addElementTypes = function (context) {
|
||||
context.removePrintElementTypes('customProvider')
|
||||
context.addPrintElementTypes('customProvider', [
|
||||
@@ -24,11 +26,9 @@ export const customProvider = function (options) {
|
||||
printData = sukData
|
||||
}
|
||||
|
||||
// eslint-disable-next-line no-undef
|
||||
$('body').append(`<div id="codewrapper-${elId}" style="width: ${codeWidth}pt">
|
||||
<svg id="${elId}" width="100%" display="block" height="100%" class="hibarcode_imgcode" preserveAspectRatio="none slice"></svg>
|
||||
</div>`)
|
||||
// eslint-disable-next-line no-undef
|
||||
JsBarcode('#' + elId, printData.labelCode, {
|
||||
format: 'CODE128B',
|
||||
width: 2,
|
||||
@@ -37,13 +37,11 @@ export const customProvider = function (options) {
|
||||
displayValue: false
|
||||
})
|
||||
|
||||
// eslint-disable-next-line no-undef
|
||||
const codeHtml = $(`#codewrapper-${elId}`).html()
|
||||
// eslint-disable-next-line no-undef
|
||||
$(`body>#codewrapper-${elId}`).remove()
|
||||
// eslint-disable-next-line no-undef
|
||||
|
||||
const resizeObserver = new ResizeObserver(() => {
|
||||
JsBarcode('#' + elId, printData.labelCode, {
|
||||
JsBarcode('#' + elId, printData.labelCode, {
|
||||
format: "CODE128B",
|
||||
width: 2,
|
||||
height: parseInt(hinnn.pt.toPx(options.height - 22).toString()) * 0.6,
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
</ai-title>
|
||||
</template>
|
||||
<template #content>
|
||||
<ai-card title="标签模板" class="card" :hideTitle="true">
|
||||
<ai-card title="标签模板" class="card" :hideTitle="true" v-loading="isLoading">
|
||||
<template #content>
|
||||
<div class="add-label__wrapper">
|
||||
<Print
|
||||
@@ -35,7 +35,6 @@
|
||||
|
||||
<script>
|
||||
import Print from '@/components/print/Print'
|
||||
import template from '@/components/print/template'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@@ -91,7 +90,8 @@
|
||||
this.$router.go(-1)
|
||||
},
|
||||
|
||||
getInfo () {
|
||||
getInfo() {
|
||||
this.isLoading = true
|
||||
this.$http.post(`/api/template/detail?id=${this.$route.query.id}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.info = res.data
|
||||
@@ -102,6 +102,8 @@
|
||||
this.template = JSON.parse(res.data.content)
|
||||
})
|
||||
}
|
||||
|
||||
this.isLoading = false
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
@@ -344,7 +344,6 @@
|
||||
this.isLoading = false
|
||||
|
||||
this.lableList = list
|
||||
console.log(list)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user