From 0326f6a2d285d980607f6facecb97ac0840b0ca3 Mon Sep 17 00:00:00 2001 From: 陶杰 <1378534974@qq.com> Date: 星期二, 15 十月 2024 15:02:25 +0800 Subject: [PATCH] 1.小程序-花店端-客服中心 --- pages.json | 7 + pages/customer_service/customer_service.vue | 183 +++++++++++++++++++++++++++++++++++++++++++++ pages/user/supplier-user.vue | 14 ++ 3 files changed, 201 insertions(+), 3 deletions(-) diff --git a/pages.json b/pages.json index 30737c8..4fdd0cc 100644 --- a/pages.json +++ b/pages.json @@ -80,6 +80,13 @@ } }, { + "path": "pages/customer_service/customer_service", + "style": { + "navigationBarTitleText": "客服中心", + "enablePullDownRefresh": true + } + }, + { "path": "pages/user/user-pwd/user-pwd", "style": { "navigationBarTitleText": "修改密码", diff --git a/pages/customer_service/customer_service.vue b/pages/customer_service/customer_service.vue new file mode 100644 index 0000000..ea6e8ba --- /dev/null +++ b/pages/customer_service/customer_service.vue @@ -0,0 +1,183 @@ +<template> + <view class="main-container user-container"> + + <view class="user-utils m-20"> + + + <u-cell-group> + <u-cell + title="单元格" + value="内容" + label="标签" + center + > + <view slot="title" class="title" >我的客服</view> + <view slot="label"> + <button open-type="contact" class="component-button-contact" @handleContact="handleContact"> + 客服电话:<span class="topic-gray">{{ tel }}</span> + </button> + </view> + <view slot="value" > + <button open-type="contact" class="component-button-contact" @handleContact="handleContact"> + <image class="icon-clock m-r-6 m-t-2" src="../../static/common/icon-call.png"></image> + </button> + <button open-type="contact" class="component-button-contact" @handleContact="handleContact"> + 我的客服 + </button> + </view> + </u-cell> + </u-cell-group> + + <!-- <u-cell-group> + <u-cell + title="单元格" + value="内容" + label="怎么下单/几天到货/新手疑问" + center + > + <view slot="title" class="title" >新用户咨询</view> + <view slot="value"> + <image class="icon-clock m-r-6 m-t-2" src="../../static/common/icon-call.png"></image> + <view>新手咨询</view> + </view> + </u-cell> + </u-cell-group> + + <u-cell-group> + <u-cell + title="单元格" + value="内容" + label="怎么下单/几天到货/新手疑问" + center + > + <view slot="title" class="title" >订单客服(改单/补退/特殊需求)</view> + <view slot="value"> + <image class="icon-clock m-r-6 m-t-2" src="../../static/common/icon-call.png"></image> + <view>订单客服</view> + </view> + </u-cell> + </u-cell-group> + + <u-cell-group> + <u-cell + title="单元格" + value="内容" + label="货到哪了/怎么选物流/价格时效/提货转货" + center + > + <view slot="title" class="title" >物流客服</view> + <view slot="value"> + <image class="icon-clock m-r-6 m-t-2" src="../../static/common/icon-call.png"></image> + <view>物流客服</view> + </view> + </u-cell> + </u-cell-group> + + <u-cell-group> + <u-cell + title="单元格" + value="内容" + label="断枝损伤/质量投诉/缺货漏发" + center + > + <view slot="title" class="title" >售后客服</view> + <view slot="value"> + <image class="icon-clock m-r-6 m-t-2" src="../../static/common/icon-call.png"></image> + <view>售后客服</view> + </view> + </u-cell> + </u-cell-group> --> + + + </view> + + + + + </view> +</template> + +<script> + export default { + computed: { + + }, + data() { + return { + CustomBar: uni.getStorageSync('CustomBar'), + StatusBar: uni.getStorageSync('StatusBar'), + tcode: '', + inviterName: '', + // StatusBar:0, + tel: '15974805814', + tj: {}, + tj_order: {}, + cacheUserId: '', + signToday: false + // order_pendding_num: 0, + + }; + }, + onShow() { + this.cacheUserId = '' + }, + onLoad(options) { + // const url = options.q ? decodeURIComponent(options.q) : ''; + // const urlcode = options.url && decodeURIComponent(options.url) || '' + // #ifdef PUB_CUSTOMER + if (options.partnerUserId) { + this.bindPartnerUser(options.partnerUserId, options.partnerUserName) + } + // #endif + + + }, + created() { + + }, + + async onPullDownRefresh() { + await this.$store.dispatch('getCurrentInfo') + uni.stopPullDownRefresh() + }, + methods: { + async bindPartnerUser(userId, name) { + // await this.$message.confirm(`确定要绑定${name}合伙人吗?`) + //调用接口绑定 + this.$message.showLoading() + const { + code, + data + } = await this.$http.request('post', '/api/customer/bind/partner', { + data: { + partnerUserId: userId + } + }) + this.$message.hideLoading() + if (code == 0) { + this.$message.showToast(`绑定合伙人${name}成功`) + await this.$store.dispatch('getCurrentInfo') + } + }, + + + async callTel() { + await this.$message.confirm('是否拨打客服电话') + uni.makePhoneCall({ + phoneNumber: this.tel //仅为示例 + }); + }, + } + } +</script> + + +<style lang="scss" scoped> + .title{ + font-weight: 600; + font-size: 32rpx; + color: #000000; + line-height: 44rpx; + // margin-bottom: 20rpx; + } +</style> \ No newline at end of file diff --git a/pages/user/supplier-user.vue b/pages/user/supplier-user.vue index 9abb8a9..4acbf52 100644 --- a/pages/user/supplier-user.vue +++ b/pages/user/supplier-user.vue @@ -371,15 +371,23 @@ </view> </view> + <view class="user-util m-t-12 flex" + v-if="selftype==='supplier'||selftype==='customer' || !selftype" + @click="goto('/pages/customer_service/customer_service',false)"> + <view class="title">我的客服</view> + <view class="right-icon"> + <uni-icons type="right"></uni-icons> + </view> + </view> - <view class="user-util m-t-12 " v-if="selftype==='supplier'||selftype==='customer' || !selftype"> + <!-- <view class="user-util m-t-12 " v-if="selftype==='supplier'||selftype==='customer' || !selftype"> <view class="title">我的客服</view> <view class="flex flex-wrap-normal"> <image class="icon-clock m-r-6 m-t-2" src="../../static/common/icon-call.png"></image> - <!-- @click="callTel" --> + <button open-type="contact" class="component-button-contact" @handleContact="handleContact"> <view class="name"> 客服电话 : <span class="topic-gray">{{ tel }}</span> @@ -390,7 +398,7 @@ </button> </view> - </view> + </view> --> <!-- <view class="user-util m-t-12 " @click="callTel" v-if="selftype==='partner'"> <view class="name"> 账号: <span class="topic-gray">{{tel}}</span> -- Gitblit v1.9.3