2 lines
3.5 KiB
JavaScript
Executable File
2 lines
3.5 KiB
JavaScript
Executable File
import{e,x as s,f as a,o as l,c as t,w as r,b as c,h as u,k as i,q as n,j as f,t as o,F as p,aj as d,ak as _,al as v,am as x,an as y,r as m,a as h,i as k,p as g}from"./index-af8b4f0a.js";import{_ as w}from"./u-image.b6a3b610.js";import{_ as j}from"./_plugin-vue_export-helper.1b428a4d.js";import"./u-icon.7661429a.js";const b=j(e({__name:"customer_service",setup(e){const{getImageUrl:j}=s(),b=s(),C=a({business_time:"",enterprise_id:"",kefu_link:"",name:"",phone:"",qr_code:"",remarks:"",service_phone:"",way:""}),q=async()=>{x("长按图片保存")},I=()=>{C.value.service_phone?y({phoneNumber:C.value.service_phone,success(e){console.log(e)},fail(e){console.log(e)}}):x("请在后台配置客服电话号码")},F=()=>{C.value.kefu_link?window.open(C.value.kefu_link,"_self"):x("请在后台配置企业微信客服")};return(async()=>{const e=await d();C.value=e[_[v()]]})(),(e,s)=>{const a=m(h("u-image"),w),d=k,_=g;return l(),t(d,{class:"service pt-20"},{default:r((()=>[c(d,{class:"service-contain"},{default:r((()=>[c(d,{class:"header-image"},{default:r((()=>[c(a,{src:u(j)("/resource/image/shopapi/default/service.png"),width:"100rpx",height:"100rpx",shape:"circle",style:{"margin-top":"-50rpx"},class:"circle"},null,8,["src"])])),_:1}),i(" way==1 二维码客服 "),1==C.value.way?(l(),n(p,{key:0},[C.value.remarks?(l(),t(d,{key:0,class:"lg mt-[40rpx] flex justify-center"},{default:r((()=>[f(o(C.value.remarks),1)])),_:1})):i("v-if",!0),c(d,{class:"code flex justify-center"},{default:r((()=>[c(a,{src:C.value.qr_code,width:"320rpx",height:"320rpx","border-radius":"20"},null,8,["src"])])),_:1}),C.value.phone?(l(),t(d,{key:1,class:"mt-[20rpx] mb-[20rpx] xs muted flex justify-center"},{default:r((()=>[f(" 客服电话:"+o(C.value.phone),1)])),_:1})):i("v-if",!0),C.value.business_time?(l(),t(d,{key:2,class:"xs mt-[20rpx] muted mb-[20rpx] flex justify-center"},{default:r((()=>[f(" 服务时间: "+o(C.value.business_time),1)])),_:1})):i("v-if",!0)],64)):i("v-if",!0),i(" logo "),1!=C.value.way?(l(),n(p,{key:1},[c(d,{class:"flex lg justify-center mt-[40rpx]"},{default:r((()=>[f(o(u(b).config.shop_name),1)])),_:1}),c(d,{class:"code flex justify-center"},{default:r((()=>[c(a,{src:u(b).config.shop_logo,width:"320rpx",height:"320rpx","border-radius":"20"},null,8,["src"])])),_:1})],64)):i("v-if",!0),i(" way==2 电话客服 "),2==C.value.way?(l(),n(p,{key:2},[C.value.phone?(l(),t(d,{key:0,class:"mt-[40rpx] flex justify-center"},{default:r((()=>[c(d,{style:{"text-align":"center"}},{default:r((()=>[c(d,null,{default:r((()=>[f(" 拨打客服热线 ")])),_:1}),c(d,{style:{"text-decoration":"underline"},onClick:I},{default:r((()=>[f(o(C.value.service_phone),1)])),_:1})])),_:1})])),_:1})):i("v-if",!0)],64)):i("v-if",!0)])),_:1}),4==C.value.way?(l(),t(d,{key:0,class:"pt-[20rpx]"})):(l(),t(d,{key:1,class:"pt-[20rpx]"},{default:r((()=>[1==C.value.way?(l(),t(d,{key:0,class:"rounded-[20rpx] copy-btn flex justify-center items-center text-white lg",onClick:q},{default:r((()=>[c(_,{class:""},{default:r((()=>[f("保存二维码")])),_:1})])),_:1})):i("v-if",!0),2==C.value.way?(l(),t(d,{key:1,class:"rounded-[20rpx] copy-btn flex justify-center items-center text-white lg",onClick:I},{default:r((()=>[c(_,{class:""},{default:r((()=>[f("拨打电话")])),_:1})])),_:1})):i("v-if",!0),3==C.value.way?(l(),t(d,{key:2,class:"rounded-[20rpx] copy-btn flex justify-center items-center text-white lg",onClick:F},{default:r((()=>[c(_,{class:""},{default:r((()=>[f("联系企业微信客服")])),_:1})])),_:1})):i("v-if",!0)])),_:1}))])),_:1})}}}),[["__scopeId","data-v-59f52cc9"]]);export{b as default};
|