完善客服

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

View File

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

View File

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