This commit is contained in:
liushiwei
2023-09-27 09:00:28 +08:00
parent 0a33fe480f
commit 317a22179e
5 changed files with 47 additions and 32 deletions

View File

@@ -1,4 +1,4 @@
@each $c in (333, 666, 999, red) {
@each $c in (333, 666, 999, f00) {
@each $t, $v in (c:color, bg:background) {
.#{$t}-#{$c} {
#{$v}: #{'#'+$c};

View File

@@ -5,23 +5,33 @@
<el-tab-pane label="金币充值" name="1"/>
</el-tabs>
<div class="content">
<div class="payments mb-16">
<div class="card" v-for="pay in payments" :key="pay.id" :class="{active:pay.id==selected}"
@click="getQrcode(pay.id)">
<div v-if="search.module == '0' " style="grid-template-columns: 1fr 1fr" class="payments mb-16">
<div class="card" v-for="pay in payments" :key="pay.id" :class="{active:pay.id==selected.id}"
@click="getQrcode(pay)">
<div v-text="pay.title"/>
<div class="c-red mt-16" v-text="`¥${pay.price}`"/>
<div class="c-f00 mt-16" v-text="`¥${pay.price}`"/>
</div>
</div>
<div v-if="search.module == '1' " class="payments mb-16">
<div class="card" v-for="pay in payments" :key="pay.id" :class="{active:pay.id==selected.id}"
@click="getQrcode(pay)">
<div class="c-f00 mt-16" v-text="`¥${pay.price}`"/>
<div class="c-999 mt-16" v-text="`${pay.coin}金币`"/>
</div>
</div>
<el-row type="flex" align="middle">
<ul class="fill">
<li v-for="(desc,i) in descriptions" :key="i" v-text="desc"/>
<ul class="fill" v-if="search.module == '0'">
<li v-for="(desc,i) in descriptionsModule0" :key="i" v-text="desc"/>
</ul>
<ul class="fill" v-if="search.module == '1'">
<li v-for="(desc,i) in descriptionsModule1" :key="i" v-text="desc"/>
</ul>
<div class="fill flex-center">
<vue-qr v-if="qrcode" :text="qrcode" :size="120" :margin="8" :logoSrc="wechatLogo"/>
<div v-else class="qrcode c-666">请选择<br>支付方案</div>
<div v-else class="qrcode c-666">请选择<br>项目</div>
<div class="c-999 ml-16">
<div class="flex-center mb-16">
应付金额{{ amount }}
应付金额<div class="c-f00" style="font-size: 20px;">{{ selected.price }}</div>
</div>
<div class="wechat flex-center">
微信扫码支付
@@ -47,11 +57,12 @@ export default {
return {
search: {module: "0"},
show: true,
descriptions: ["抢仓发货", "数据下载", "复制商品", "会员服务"],
descriptionsModule0: ["抢仓发货", "数据下载", "复制商品", "会员服务"],
descriptionsModule1: ["智能复制"],
payments: [],
qrcode: "",
amount: 0,
selected: ""
selected: {}
}
},
computed: {
@@ -67,10 +78,11 @@ export default {
}
})
},
getQrcode(priceConfigId) {
this.selected = priceConfigId
getQrcode(item) {
this.selected = item
this.$http.post("/api/order/createOrder", null, {
params: {priceConfigId}
params: {priceConfigId: item.id}
}).then(res => {
if (res?.data?.id) {
return res.data.id

View File

@@ -88,8 +88,9 @@
title="用户激活"
:visible="$store.state.activeDlgShow"
:close-on-click-modal="false"
width="30%"
width="1200"
:before-close="handleClose">
<ai-payment/>
<span slot="footer" class="dialog-footer">
<el-button @click="setActiveDlgShow(false)"> </el-button>
<el-button type="primary" @click="active"> </el-button>

View File

@@ -32,7 +32,6 @@
</div>
</ai-card>
</div>
<ai-payment/>
<ai-card title="常用工具" v-if="false">
<div class="">
dsad
@@ -59,11 +58,9 @@
</template>
<script>
import AiPayment from "@/components/AiPayment.vue";
export default {
name: 'AdminHome',
components: {AiPayment},
data () {
return {
noticeList: [],

View File

@@ -60,9 +60,10 @@
<el-form-item label="商品来源:" v-show="false" style="width: 100%;" prop="type" :rules="[{ required: true, message: '请选择商品来源', trigger: 'blur' }]">
<el-radio-group v-model="form.type" size="medium">
<el-radio :label="1">TEMU</el-radio>
<el-radio :label="2">速卖通</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="TEMU商品地址:" style="width: 100%;" prop="url" :rules="[{ required: true, message: '请输入TEMU商品地址', trigger: 'blur' }]">
<el-form-item label="商品地址:" style="width: 100%;" prop="url" :rules="[{ required: true, message: '请输入商品地址', trigger: 'blur' }]">
<el-input type="textarea" v-model="form.url"></el-input>
</el-form-item>
<el-form-item label="店铺:" style="width: 100%;" prop="targetMallId" :rules="[{ required: true, message: '请选择店铺', trigger: 'blur' }]">
@@ -461,19 +462,7 @@ const ImageEditor = require('tui-image-editor')
}}).then((res) => {
if (res.errorCode == 1000000) {
Message.success("成功添加到草稿箱")
let mallInfo = this.$store.state.mallList.filter(item => {
return item.mallId == this.form.targetMallId
})
this.$http.post('/api/copyProduct/add', {
mallId: mallInfo[0].mallId,
mallName: mallInfo[0].mallName,
url: this.form.url,
type: this.form.type
}).then(res1 => {
if (res1.code == 0) {
this.getList()
}
})
this.saveInfo()
} else {
setTimeout(() => {
this.createProduct(content)
@@ -496,6 +485,22 @@ const ImageEditor = require('tui-image-editor')
this.getSpecId(data)
}
})
},
saveInfo() {
let mallInfo = this.$store.state.mallList.filter(item => {
return item.mallId == this.form.targetMallId
})
this.$http.post('/api/copyProduct/add', {
mallId: mallInfo[0].mallId,
mallName: mallInfo[0].mallName,
url: this.form.url,
type: this.form.type
}).then(res1 => {
if (res1.code == 0) {
this.$store.dispatch('getUserInfo')
this.getList()
}
})
}
}
}