Browse Source

反馈弹窗

zhaowenkang/feature-20251028181547-行情页面
maziyang 4 weeks ago
parent
commit
3f31c2e467
  1. 196
      components/FeedbackModal.vue
  2. 50
      pages/customerServicePlatform/csPlatformIndex.vue
  3. 15
      pages/customerServicePlatform/historyRecord.vue
  4. BIN
      static/customer-service-platform/a1.png
  5. BIN
      static/customer-service-platform/a2.jpg
  6. BIN
      static/customer-service-platform/fail-icon.png
  7. BIN
      static/customer-service-platform/success-icon.png

196
components/FeedbackModal.vue

@ -0,0 +1,196 @@
<template>
<view>
<view v-if="internalVisible" class="fm-overlay"></view>
<view v-if="internalVisible" class="fm-wrap">
<view class="fm-card" :style="{ width: _width }">
<text class="fm-title">{{ _title }}</text>
<view class="fm-icon-wrap">
<image :src="imgSrcComputed" mode="aspectFit" class="fm-icon-img" />
</view>
<text class="fm-sub">{{ _subtitle }}</text>
<view class="fm-btn-wrap">
<button class="fm-btn" @click="onConfirm">{{ _buttonText }}</button>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
name: 'FeedbackModal',
props: {
title: {
type: String,
default: '提交成功'
},
subtitle: {
type: String,
default: '— 感谢您的反馈 —'
},
buttonText: {
type: String,
default: '确定'
},
status: {
type: String,
default: 'success'
},
lockScroll: {
type: Boolean,
default: true
},
width: {
type: String,
default: '600rpx'
}
},
data() {
return {
internalVisible: false,
_title: this.title,
_subtitle: this.subtitle,
_buttonText: this.buttonText,
_status: this.status,
_width: this.width,
};
},
computed: {
imgSrcComputed() {
return this._status === 'fail' ?
'/static/customer-service-platform/fail-icon.png' :
'/static/customer-service-platform/success-icon.png';
}
},
methods: {
show(options = {}) {
if (options.title) this._title = options.title;
if (options.subtitle) this._subtitle = options.subtitle;
if (options.buttonText) this._buttonText = options.buttonText;
if (options.status) this._status = options.status;
if (options.width) this._width = options.width;
if (this.lockScroll) this._lockScroll();
this.internalVisible = true;
},
hide() {
this.internalVisible = false;
if (this.lockScroll) this._unlockScroll();
},
onConfirm() {
this.hide();
this.$nextTick(() => {
this.$emit('confirm', {
status: this._status
});
});
},
//
_lockScroll() {
try {
document.body.style.overflow = 'hidden';
} catch (e) {}
},
_unlockScroll() {
try {
document.body.style.overflow = '';
} catch (e) {}
}
},
beforeDestroy() {
if (this.lockScroll) this._unlockScroll();
}
};
</script>
<style scoped>
.fm-overlay {
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.35);
z-index: 999;
}
.fm-wrap {
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
display: flex;
align-items: center;
justify-content: center;
z-index: 1000;
padding: 40rpx;
box-sizing: border-box;
}
.fm-card {
background: #fff;
border-radius: 24rpx;
padding: 40rpx;
box-sizing: border-box;
text-align: center;
box-shadow: 0 6rpx 30rpx rgba(0, 0, 0, 0.12);
}
.fm-title {
display: block;
font-size: 48rpx;
font-weight: 700;
color: #333333;
margin-bottom: 40rpx;
}
.fm-icon-wrap {
width: 200rpx;
height: 200rpx;
margin: 0 auto 40rpx;
display: flex;
align-items: center;
justify-content: center;
}
.fm-icon-img {
width: 100%;
height: 100%;
}
.fm-sub {
display: block;
color: #666666;
font-size: 32rpx;
margin-bottom: 40rpx;
font-weight: 500;
}
.fm-btn-wrap {
display: flex;
justify-content: center;
}
.fm-btn {
width: 220rpx;
height: 60rpx;
border-radius: 32rpx;
background: #000;
color: #ffffff;
font-weight: 700;
font-size: 32rpx;
font-style: normal;
border: none;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 20rpx;
}
</style>

50
pages/customerServicePlatform/csPlatformIndex.vue

@ -5,7 +5,7 @@
<!-- 头部导航 --> <!-- 头部导航 -->
<view class="header"> <view class="header">
<view class="back-icon"> <view class="back-icon">
<image src="/static/customer-service-platform/cs-platform-back.png" class="header-icon-image"></image>
<image @click="onBack" src="/static/customer-service-platform/cs-platform-back.png" class="header-icon-image"></image>
</view> </view>
<view class="title">{{headerTitle}}</view> <view class="title">{{headerTitle}}</view>
<view class="notification-icon"> <view class="notification-icon">
@ -15,12 +15,14 @@
<!-- 内容区域 - 使用滚动视图 --> <!-- 内容区域 - 使用滚动视图 -->
<scroll-view scroll-y class="content-container"> <scroll-view scroll-y class="content-container">
<view class="content-header"> <view class="content-header">
<view class="logo">
<image mode="aspectFit" src="/static/customer-service-platform/ellipse-dc-img.png"></image>
</view>
<view class="greeting">
<text class="greet-title">我能为你做点什么</text>
<text class="greet-sub">DeepChart随时为您提供服务</text>
<view class="content-header-area">
<view class="logo">
<image mode="aspectFit" src="/static/customer-service-platform/ellipse-dc-img.png"></image>
</view>
<view class="greeting">
<text class="greet-title">我能为你做点什么</text>
<text class="greet-sub">DeepChart随时为您提供服务</text>
</view>
</view> </view>
</view> </view>
<!--猜你想问卡片部分--> <!--猜你想问卡片部分-->
@ -78,7 +80,8 @@
<text class="tip-text" v-if="images.length === 0">最多添加9张图片</text> <text class="tip-text" v-if="images.length === 0">最多添加9张图片</text>
</view> </view>
<button class="feedback-btn" @click="submit">提交</button>
<button class="feedback-btn" @click="onSumbitFeedback()">提交</button>
<feedback-modal ref="feedback" @confirm="onConfirm" />
</view> </view>
<!--历史反馈卡片部分--> <!--历史反馈卡片部分-->
<view class="card"> <view class="card">
@ -91,7 +94,9 @@
</template> </template>
<script> <script>
import FeedbackModal from '@/components/FeedbackModal.vue'
export default { export default {
components: { FeedbackModal },
data() { data() {
return { return {
headerTitle: '智能客服中台', headerTitle: '智能客服中台',
@ -139,8 +144,28 @@
this.shuffleQuestions(); this.shuffleQuestions();
}, },
methods: { methods: {
onSumbitFeedback(){
this.onSuccess();
},
onSuccess() {
this.$refs.feedback.show({
status: 'success',
title: '提交成功',
subtitle: '— 感谢您的反馈 —',
buttonText: '确定',
width:'80%',
});
},
onFail() {
this.$refs.feedback.show({
status: 'fail',
title: '提交失败',
subtitle: '— 请重新提交 —',
buttonText: '确定',
width:'80%',
});
},
onBack() { onBack() {
// uni.navigateBack
if (typeof uni !== 'undefined') uni.navigateBack(); if (typeof uni !== 'undefined') uni.navigateBack();
}, },
shuffleQuestions() { shuffleQuestions() {
@ -284,6 +309,7 @@
.content-header { .content-header {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center;
gap: 24rpx; gap: 24rpx;
padding: 0 60rpx; padding: 0 60rpx;
width: 100%; width: 100%;
@ -291,6 +317,11 @@
height: 188rpx; height: 188rpx;
} }
.content-header-area {
display: flex;
gap: 20rpx;
}
.logo { .logo {
width: 120rpx; width: 120rpx;
height: 120rpx; height: 120rpx;
@ -549,7 +580,6 @@
align-items: center; align-items: center;
justify-content: center; justify-content: center;
overflow: hidden; overflow: hidden;
box-shadow: 0 2rpx 6rpx rgba(0, 0, 0, 0.08);
transition: transform 0.2s ease; transition: transform 0.2s ease;
} }

15
pages/customerServicePlatform/historyRecord.vue

@ -67,14 +67,7 @@
status: '成功', // // status: '成功', // //
statusText: '反馈成功', statusText: '反馈成功',
content: '你是不是总是看着股票回调时心里发慌,不知道什么时候进场才是最安全的?追高买错被套牢,亏得眼泪直流aaa,回调时又不敢进,错过了反弹的机会?今天,我将带你掌握一套精准确认底部的三步法——通过超卖信号、关键K线和强势启动点,帮助你轻松识别市场底部,稳健进场,避开高位追涨,赚取大波利润!我们今天会结合特斯拉(TSLA)和阿里巴巴(BABA)的经aaa典案例,帮助你更好地理解这些技巧,赶快拿起纸笔,开始学', content: '你是不是总是看着股票回调时心里发慌,不知道什么时候进场才是最安全的?追高买错被套牢,亏得眼泪直流aaa,回调时又不敢进,错过了反弹的机会?今天,我将带你掌握一套精准确认底部的三步法——通过超卖信号、关键K线和强势启动点,帮助你轻松识别市场底部,稳健进场,避开高位追涨,赚取大波利润!我们今天会结合特斯拉(TSLA)和阿里巴巴(BABA)的经aaa典案例,帮助你更好地理解这些技巧,赶快拿起纸笔,开始学',
images: [
'/static/customer-service-platform/a2.jpg',
'/static/customer-service-platform/a1.png',
'/static/customer-service-platform/a2.jpg',
'/static/customer-service-platform/a1.png',
'/static/customer-service-platform/a2.jpg',
]
images: []
}, },
{ {
id: 2, id: 2,
@ -98,6 +91,9 @@
window.history.back(); window.history.back();
} }
}, },
loadHistoryList(){
},
previewImage(list, index) { previewImage(list, index) {
if (typeof uni !== 'undefined' && uni.previewImage) { if (typeof uni !== 'undefined' && uni.previewImage) {
uni.previewImage({ uni.previewImage({
@ -196,9 +192,6 @@
background: #FFF; background: #FFF;
} }
/* 每一条历史卡片 */ /* 每一条历史卡片 */
.history-item { .history-item {
border-radius: 10rpx; border-radius: 10rpx;

BIN
static/customer-service-platform/a1.png

Before

Width: 1920  |  Height: 1040  |  Size: 521 KiB

BIN
static/customer-service-platform/a2.jpg

Before

Width: 522  |  Height: 928  |  Size: 166 KiB

BIN
static/customer-service-platform/fail-icon.png

After

Width: 100  |  Height: 100  |  Size: 4.2 KiB

BIN
static/customer-service-platform/success-icon.png

After

Width: 100  |  Height: 100  |  Size: 4.2 KiB

Loading…
Cancel
Save