完善客服

This commit is contained in:
TOP糯米 2023-03-30 20:45:56 +08:00
parent 83e5f71419
commit e198a9be46
3 changed files with 25 additions and 5 deletions

View File

@ -2,7 +2,7 @@
<view class="components-service">
<widget-modal v-show="showService" @close="close" title="请选择客服">
<view class="service-list">
<button class="btn-item" @click="call">电话客服</button>
<button class="btn-item" @click="utils.callPhone(serviceMobile)">电话客服</button>
<button class="btn-item" open-type="contact">微信客服</button>
</view>
</widget-modal>
@ -11,10 +11,14 @@
<script>
import WidgetModal from "@/components/widgets/modal";
import { mapState } from "vuex";
export default {
name: "widget-service",
data() {
return {};
return {
utils: this.$utils,
serviceMobile: "",
};
},
props: {
showService: {
@ -25,8 +29,16 @@ export default {
components: {
WidgetModal,
},
computed: {
...mapState({
platformData: (state) => state.system.platformData,
}),
},
created() {},
mounted() {},
async mounted() {
await this.$store.dispatch("system/platformData");
this.serviceMobile = this.platformData.serviceMobile;
},
destroyed() {},
methods: {
close() {

View File

@ -111,7 +111,7 @@
</block>
</view>
<view class="common-bottom-components" :style="{ bottom: pageConfig.safeAreaInsets.bottom + 'px' }">
<view class="service" @click="utils.serviceActions()">
<view class="service" @click="showService = true">
<text class="iconfont icon-kefu"></text>
<text class="text">客服</text>
</view>
@ -124,6 +124,7 @@
</view>
</view>
<get-post-price v-show="showPriceModal" @close="showPriceModal = false" @post="rcvPostPrice" />
<widget-service :showService="showService" @close="showService = false" />
</app-layout>
</template>
@ -132,6 +133,7 @@ import AppLayout from "@/components/layout/layout";
import OrderAction from "@/components/order/action";
import GetAction from "@/components/get/action";
import GetPostPrice from "@/components/get/post-price";
import WidgetService from "@/components/widgets/service";
export default {
name: "order-detail",
data() {
@ -139,6 +141,7 @@ export default {
utils: this.$utils,
models: this.$models,
pageConfig: {},
showService: false,
showPriceModal: false,
showConfirmModal: false,
typeText: "",
@ -154,6 +157,7 @@ export default {
OrderAction,
GetAction,
GetPostPrice,
WidgetService,
},
onLoad(e) {
this.pageConfig = getApp().globalData.pageConfig;

View File

@ -44,7 +44,7 @@
<image class="icon" :src="require('@/static/temp/index/2.png')" mode="aspectFill" />
<text class="title">平台规则</text>
</view>
<view class="nav-item" @click="utils.serviceActions()">
<view class="nav-item" @click="showService = true">
<image class="icon" :src="require('@/static/temp/index/3.png')" mode="aspectFill" />
<text class="title">平台客服</text>
</view>
@ -79,12 +79,14 @@
<rich-text :nodes="notify.content"></rich-text>
</view>
</widget-modal>
<widget-service :showService="showService" @close="showService = false" />
</app-layout>
</template>
<script>
import AppLayout from "@/components/layout/layout";
import WidgetModal from "@/components/widgets/modal";
import WidgetService from "@/components/widgets/service";
export default {
name: "index",
data() {
@ -93,6 +95,7 @@ export default {
safePt: 0,
backgroundImage: require("@/static/temp/1.png"),
notifyList: [],
showService: false,
showNotifyModal: false,
notify: {
title: "",
@ -109,6 +112,7 @@ export default {
components: {
AppLayout,
WidgetModal,
WidgetService,
},
onLoad() {
this.$models.system.notifyList(1, 1).then((list) => {