Commit 7be25dbd by 怪兽?别跑

获客助手剩余用量调试

1 parent afcb7068
...@@ -87,3 +87,9 @@ export function getCustomerInLink(data) { ...@@ -87,3 +87,9 @@ export function getCustomerInLink(data) {
params: data params: data
}) })
} }
export function refresh() {
return request({
url: service + '/synchAcquisitionQuota'
})
}
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<div class="g-card"> <div class="g-card">
<div class="mid-action"> <div class="mid-action">
<div style="display: flex; align-items: end;"> <div style="display: flex; align-items: end;">
<template v-if="total < 3000"> <template v-if="customerLinkMargin">
<el-button type="primary" @click="$router.push('./add')">新建链接</el-button> <el-button type="primary" @click="$router.push('./add')">新建链接</el-button>
</template> </template>
<template v-else> <template v-else>
...@@ -26,7 +26,12 @@ ...@@ -26,7 +26,12 @@
</el-popover> </el-popover>
</template> </template>
<span style="margin-left: 10px; font-size: 12px;" <span style="margin-left: 10px; font-size: 12px;"
>剩余可用量 <span style="font-size: 20px;">{{ 3000 - total }}</span> >剩余可用量
<span style="font-size: 20px;"
>{{ customerLinkMargin }}
<span class="refresh" :class="{ rotate360: showAnimate }" @click="refreshFn">
<el-icon-Refresh class="el-icon-refresh"></el-icon-Refresh> </span
></span>
</span> </span>
</div> </div>
<el-button type="primary" plain :disabled="selected.length === 0" @click="handleRemove('mult')" <el-button type="primary" plain :disabled="selected.length === 0" @click="handleRemove('mult')"
...@@ -118,7 +123,8 @@ ...@@ -118,7 +123,8 @@
</template> </template>
<script> <script>
import { getList, remove } from './api.js' import { getDetail } from '@/api/enterpriseId'
import { getList, remove, refresh } from './api.js'
export default { export default {
components: {}, components: {},
data() { data() {
...@@ -131,7 +137,9 @@ ...@@ -131,7 +137,9 @@
selected: [], selected: [],
loading: false, loading: false,
list: [], list: [],
total: 0 // 总数据量 total: 0, // 总数据量
customerLinkMargin: 0,
showAnimate: false
} }
}, },
watch: {}, watch: {},
...@@ -143,9 +151,26 @@ ...@@ -143,9 +151,26 @@
<div>唯一可以从全域添加好友的官方链路</div> <div>唯一可以从全域添加好友的官方链路</div>
` `
) )
this.getData()
}, },
destroyed() {}, destroyed() {},
methods: { methods: {
getData() {
getDetail().then((res) => {
this.customerLinkMargin = res.data.customerLinkMargin
})
},
refreshFn() {
this.showAnimate = true
refresh().then((res) => {
if (res.code == 200) {
this.getData()
// this.$message({ message: '操作成功', type: 'success' })
this.msgSuccess('操作成功')
}
this.showAnimate = false
})
},
copyFn(text) { copyFn(text) {
const input = document.createElement('input') const input = document.createElement('input')
input.style.cssText = 'opacity: 0;' input.style.cssText = 'opacity: 0;'
...@@ -214,6 +239,24 @@ ...@@ -214,6 +239,24 @@
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.refresh {
color: var(--color);
font-size: 16px;
cursor: pointer;
:hover {
opacity: 0.7;
}
display: inline-block;
}
.rotate360 {
animation: rotate360 1s ease-out 0s;
}
@keyframes rotate360 {
100% {
transform: rotate(360deg);
}
}
.overflow-ellipsis { .overflow-ellipsis {
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!