Commit c5243f6b by xinla

服务包修改优化

1 parent 8de16a2c
<script setup>
import { reactive } from 'vue'
let $datas = reactive({
dialogVisible: true,
let $data = reactive({
dialogVisible: localStorage.serveDialogVisible !== 'false',
activeIndex: 0,
list: [
{
......@@ -10,21 +10,30 @@ let $datas = reactive({
priceNow: '299',
priceOrigin: '499',
desc: '专属团队 极速响应',
img: new URL('../asstes/vip.png', import.meta.url).href,
img: new URL('./vip.png', import.meta.url).href,
},
{
title: '开源尊享服务包',
priceNow: '899',
priceOrigin: '1299',
desc: '快速部署 服务升级',
img: new URL('../asstes/svip.png', import.meta.url).href,
img: new URL('./svip.png', import.meta.url).href,
},
],
})
function close() {
localStorage.serveDialogVisible = $data.dialogVisible = false
}
defineExpose({
$data,
})
</script>
<template>
<div class="mask" v-if="$datas.dialogVisible" @click.self="$datas.dialogVisible = false">
<transition name="el-fade-in-linear">
<div class="mask" v-show="$data.dialogVisible" @click.self="close">
<div class="serveDialog cc">
<div class="top">
<div class="top-desc">更轻便、更灵活、更专业</div>
......@@ -36,10 +45,10 @@ let $datas = reactive({
</div>
<div class="main">
<div
v-for="(item, index) in $datas.list"
v-for="(item, index) in $data.list"
:key="index"
:class="['card cp', index == 1 && 'svip', index == $datas.activeIndex && 'active']"
@click="$datas.activeIndex = index">
:class="['card cp', index == 1 && 'svip', index == $data.activeIndex && 'active']"
@click="$data.activeIndex = index">
<div class="cardTitle">{{ item.title }}</div>
<div class="cardPrice mt5">
<span class="priceUnit">¥</span>
......@@ -50,11 +59,11 @@ let $datas = reactive({
<div class="cardDesc mt5">{{ item.desc }}</div>
</div>
<template v-for="(item, index) in $datas.list" :key="index">
<img v-show="index == $datas.activeIndex" class="mainImg" :src="item.img" alt="" />
<template v-for="(item, index) in $data.list" :key="index">
<img v-show="index == $data.activeIndex" class="mainImg" :src="item.img" alt="" />
</template>
<div class="bottom" ref="bottom" :style="{ '--color': $datas.activeIndex == 0 ? '#07c160' : '#7e5d25' }">
<div class="bottom" ref="bottom" :style="{ '--color': $data.activeIndex == 0 ? '#07c160' : '#7e5d25' }">
<img class="qrcode" :src="lwConfig.QRCODE_CUSTOMER_SERVICE" alt="" />
<div>
<div>
......@@ -89,6 +98,7 @@ let $datas = reactive({
</div>
</div>
</div>
</transition>
</template>
<style lang="scss" scoped>
......@@ -98,7 +108,7 @@ let $datas = reactive({
.serveDialog {
width: 800px;
height: 668px;
background: url(../asstes/serveDialogBg.png) 100%;
background: url(./serveDialogBg.png) 100%;
.top {
width: 455px;
......
<!-- 服务包弹窗 -->
<template>
<div class="sidebar-container">
<el-scrollbar wrap-class="scrollbar-wrapper">
......@@ -16,6 +17,15 @@
</el-menu>
</el-scrollbar>
<div class="serve-card" @click="$refs.serveDialog.$data.dialogVisible = true">
LinkWeChat
<br />
官方服务包
<br />
正式上线啦!
</div>
<ServeDialog ref="serveDialog" />
<div class="card">
<el-tooltip content="文档手册" effect="dark" placement="top">
<div class="card-item">
......@@ -73,9 +83,10 @@ import { mapState } from 'pinia'
import stores from '@/stores'
import SidebarItem from './SidebarItem'
import ServeDialog from './ServeDialog'
export default {
components: { SidebarItem },
components: { SidebarItem, ServeDialog },
computed: {
// ...mapState(['settings']),
...mapState(stores, ['permission_routes', 'sidebarRouters', 'sidebar']),
......@@ -95,6 +106,11 @@ export default {
return false
},
},
// mounted() {
// this.$nextTick(() => {
// console.log(this.$refs.serveDialog)
// })
// },
methods: {
goto(url) {
window.open(url)
......@@ -250,6 +266,17 @@ export default {
}
}
.serve-card {
margin: 0 24px 24px;
padding: 15px;
cursor: pointer;
font-weight: 500;
line-height: 20px;
text-align: center;
color: var(--color);
background: var(--color-light-9);
border-radius: var(--border-radius);
}
.card {
// color: var(--font-white, #fff);
// padding: 20px;
......
......@@ -164,8 +164,6 @@
</div>
<Dynamics v-else />
</el-dialog>
<ServeDialog />
</div>
</template>
<script>
......@@ -174,14 +172,12 @@ import * as api from '@/api/index'
// import { getCustomerServiceQrUrl } from '@/api/login'
import { CountTo } from 'vue3-count-to'
import bgSvg from './asstes/bg.svg?raw'
import ServeDialog from './components/ServeDialog'
export default {
name: 'Index',
components: {
CountTo,
Dynamics: defineAsyncComponent(() => import('./components/dynamics')),
TabContent: defineAsyncComponent(() => import('./components/TabContent')),
ServeDialog,
},
data() {
return {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!