完成客服
This commit is contained in:
parent
a48a762ded
commit
a314424c25
|
@ -48,6 +48,14 @@ export default {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
|
@keyframes fadeIn {
|
||||||
|
0% {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
.component-widgets-modal {
|
.component-widgets-modal {
|
||||||
z-index: 25;
|
z-index: 25;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
|
@ -61,6 +69,7 @@ export default {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
animation: fadeIn 0.2s;
|
||||||
.modal-mask {
|
.modal-mask {
|
||||||
z-index: 0;
|
z-index: 0;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|
|
@ -0,0 +1,56 @@
|
||||||
|
<template>
|
||||||
|
<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" open-type="contact">微信客服</button>
|
||||||
|
</view>
|
||||||
|
</widget-modal>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import WidgetModal from "@/components/widgets/modal";
|
||||||
|
export default {
|
||||||
|
name: "widget-service",
|
||||||
|
data() {
|
||||||
|
return {};
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
showService: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
WidgetModal,
|
||||||
|
},
|
||||||
|
created() {},
|
||||||
|
mounted() {},
|
||||||
|
destroyed() {},
|
||||||
|
methods: {
|
||||||
|
close() {
|
||||||
|
this.$emit("close");
|
||||||
|
},
|
||||||
|
call() {},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped>
|
||||||
|
.components-service {
|
||||||
|
width: 100%;
|
||||||
|
.service-list {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.btn-item {
|
||||||
|
color: #666666;
|
||||||
|
font-size: 30rpx;
|
||||||
|
background-color: unset;
|
||||||
|
border-bottom: 2rpx solid #e0e0e0;
|
||||||
|
}
|
||||||
|
.btn-item::after {
|
||||||
|
border: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -215,18 +215,6 @@ function formatNumber(num, limit) {
|
||||||
return num > 0 ? num.toFixed(limit) : 0;
|
return num > 0 ? num.toFixed(limit) : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
function serviceActions() {
|
|
||||||
uni.showActionSheet({
|
|
||||||
itemList: ['电话客服', '微信客服'],
|
|
||||||
success(res) {
|
|
||||||
console.log('选中了第' + (res.tapIndex + 1) + '个按钮');
|
|
||||||
},
|
|
||||||
fail(res) {
|
|
||||||
console.log(res.errMsg);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function chooseImage(count) {
|
function chooseImage(count) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
let tempFiles = [];
|
let tempFiles = [];
|
||||||
|
@ -281,6 +269,5 @@ export default {
|
||||||
toPage,
|
toPage,
|
||||||
toast,
|
toast,
|
||||||
formatNumber,
|
formatNumber,
|
||||||
serviceActions,
|
|
||||||
chooseImage,
|
chooseImage,
|
||||||
}
|
}
|
||||||
|
|
|
@ -90,7 +90,7 @@
|
||||||
<text class="title limit-line clamp-1">我的评价</text>
|
<text class="title limit-line clamp-1">我的评价</text>
|
||||||
<text class="iconfont icon-jinru"></text>
|
<text class="iconfont icon-jinru"></text>
|
||||||
</view>
|
</view>
|
||||||
<view class="widget-item" @click="utils.serviceActions()">
|
<view class="widget-item" @click="showService = true">
|
||||||
<text class="title limit-line clamp-1">在线客服</text>
|
<text class="title limit-line clamp-1">在线客服</text>
|
||||||
<text class="iconfont icon-jinru"></text>
|
<text class="iconfont icon-jinru"></text>
|
||||||
</view>
|
</view>
|
||||||
|
@ -106,6 +106,7 @@
|
||||||
<rich-text :nodes="carefreeContent"></rich-text>
|
<rich-text :nodes="carefreeContent"></rich-text>
|
||||||
</view>
|
</view>
|
||||||
</widget-modal>
|
</widget-modal>
|
||||||
|
<widget-service :showService="showService" @close="showService = false" />
|
||||||
</app-layout>
|
</app-layout>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -113,6 +114,7 @@
|
||||||
import AppLayout from "@/components/layout/layout";
|
import AppLayout from "@/components/layout/layout";
|
||||||
import WidgetSwitch from "@/components/widgets/switch";
|
import WidgetSwitch from "@/components/widgets/switch";
|
||||||
import WidgetModal from "@/components/widgets/modal";
|
import WidgetModal from "@/components/widgets/modal";
|
||||||
|
import WidgetService from "@/components/widgets/service";
|
||||||
import { mapGetters, mapState } from "vuex";
|
import { mapGetters, mapState } from "vuex";
|
||||||
export default {
|
export default {
|
||||||
name: "member",
|
name: "member",
|
||||||
|
@ -126,6 +128,7 @@ export default {
|
||||||
acceptOrderState: false,
|
acceptOrderState: false,
|
||||||
typeText: "",
|
typeText: "",
|
||||||
typeTextColor: "",
|
typeTextColor: "",
|
||||||
|
showService: false,
|
||||||
showCarefreeModal: false,
|
showCarefreeModal: false,
|
||||||
carefreeContent: "",
|
carefreeContent: "",
|
||||||
serviceData: {
|
serviceData: {
|
||||||
|
@ -141,6 +144,7 @@ export default {
|
||||||
AppLayout,
|
AppLayout,
|
||||||
WidgetSwitch,
|
WidgetSwitch,
|
||||||
WidgetModal,
|
WidgetModal,
|
||||||
|
WidgetService,
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters({
|
...mapGetters({
|
||||||
|
|
|
@ -68,6 +68,7 @@ export default {
|
||||||
onLoad() {},
|
onLoad() {},
|
||||||
async onShow() {
|
async onShow() {
|
||||||
if (this.messageTabIndex != this.tabIndex) {
|
if (this.messageTabIndex != this.tabIndex) {
|
||||||
|
this.tabList = [];
|
||||||
await this.loadCate();
|
await this.loadCate();
|
||||||
this.switchTab(this.messageTabIndex);
|
this.switchTab(this.messageTabIndex);
|
||||||
}
|
}
|
||||||
|
@ -106,7 +107,6 @@ export default {
|
||||||
* 加载分类
|
* 加载分类
|
||||||
*/
|
*/
|
||||||
async loadCate() {
|
async loadCate() {
|
||||||
this.tabList = [];
|
|
||||||
await this.$models.system.notifyCate().then((cate) => {
|
await this.$models.system.notifyCate().then((cate) => {
|
||||||
cate.forEach((item) => {
|
cate.forEach((item) => {
|
||||||
this.tabList.push({
|
this.tabList.push({
|
||||||
|
|
|
@ -112,7 +112,7 @@
|
||||||
</view>
|
</view>
|
||||||
</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>
|
||||||
|
@ -121,6 +121,7 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<order-confirm-price v-show="showConfirmModal" @close="showConfirmModal = false" @confirm="finishOrder" />
|
<order-confirm-price v-show="showConfirmModal" @close="showConfirmModal = false" @confirm="finishOrder" />
|
||||||
|
<widget-service :showService="showService" @close="showService = false" />
|
||||||
</app-layout>
|
</app-layout>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -129,6 +130,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 OrderConfirmPrice from "@/components/order/confirm-price";
|
import OrderConfirmPrice from "@/components/order/confirm-price";
|
||||||
|
import WidgetService from "@/components/widgets/service";
|
||||||
export default {
|
export default {
|
||||||
name: "order-detail",
|
name: "order-detail",
|
||||||
data() {
|
data() {
|
||||||
|
@ -142,6 +144,7 @@ export default {
|
||||||
typeTextBg: "",
|
typeTextBg: "",
|
||||||
stateText: "",
|
stateText: "",
|
||||||
stateTextColor: "",
|
stateTextColor: "",
|
||||||
|
showService: false,
|
||||||
order: {
|
order: {
|
||||||
address: {},
|
address: {},
|
||||||
},
|
},
|
||||||
|
@ -152,6 +155,7 @@ export default {
|
||||||
OrderAction,
|
OrderAction,
|
||||||
GetAction,
|
GetAction,
|
||||||
OrderConfirmPrice,
|
OrderConfirmPrice,
|
||||||
|
WidgetService,
|
||||||
},
|
},
|
||||||
onLoad(e) {
|
onLoad(e) {
|
||||||
this.pageConfig = getApp().globalData.pageConfig;
|
this.pageConfig = getApp().globalData.pageConfig;
|
||||||
|
|
Loading…
Reference in New Issue