爱简收旧衣按件回收前端代码仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

423 lines
9.1 KiB

1 week ago
  1. <template>
  2. <view class="customer-service">
  3. <!-- 顶部导航栏 -->
  4. <view class="nav-bar">
  5. <view class="back-icon" @tap="navigateBack">
  6. <uni-icons type="left" size="20"></uni-icons>
  7. </view>
  8. <view class="title">联系客服</view>
  9. </view>
  10. <!-- 主要内容区域 -->
  11. <view class="content">
  12. <!-- 问候语 -->
  13. <view class="greeting">
  14. <text class="title">Hi, {{greeting}}</text>
  15. <text class="subtitle">您好如需帮助请优先选择以下方式联系我们</text>
  16. </view>
  17. <!-- 联系方式列表 -->
  18. <view class="contact-list">
  19. <view class="contact-item" @tap="handleOnlineService">
  20. <text class="label">在线客服</text>
  21. <text class="iconfont arrow">></text>
  22. </view>
  23. <view class="contact-item" @tap="handlePhoneService">
  24. <text class="label">客服电话</text>
  25. <text class="iconfont arrow">></text>
  26. </view>
  27. <view class="contact-item">
  28. <text class="label">客服邮箱</text>
  29. <text class="iconfont arrow">></text>
  30. </view>
  31. </view>
  32. <!-- 详细信息 -->
  33. <view class="info-section">
  34. <view class="info-item">
  35. <text class="label">工作时间</text>
  36. <text class="value">周一至周日 09:00-18:00</text>
  37. </view>
  38. <view class="info-item">
  39. <text class="label">客服电话</text>
  40. <text class="value">0731-599327-8899</text>
  41. </view>
  42. <view class="info-item">
  43. <text class="label">在线客服</text>
  44. <text class="value">点击页面右下角"在线客服"我们将及时为您解答疑问</text>
  45. </view>
  46. <view class="info-item">
  47. <text class="label">客服邮箱</text>
  48. <text class="value">hanhaihuishouhf@hh.com</text>
  49. </view>
  50. </view>
  51. <!-- 常见问题 -->
  52. <view class="faq-section">
  53. <view class="faq-entry" @tap="navigateToFAQ">
  54. <text class="label">常见问题</text>
  55. <text class="iconfont arrow">></text>
  56. </view>
  57. <view class="faq-tip">
  58. <text>如有任何问题或建议请随时与我们联系我们将竭诚为您服务</text>
  59. </view>
  60. </view>
  61. </view>
  62. <!-- 底部按钮 -->
  63. <view class="bottom-btn">
  64. <button class="online-service-btn" @tap="handlePhoneService">联系在线客服</button>
  65. </view>
  66. <!-- 电话弹窗 -->
  67. <view class="phone-popup" v-if="showPhonePopup">
  68. <view class="popup-mask" @tap="hidePhonePopup"></view>
  69. <view class="popup-content">
  70. <view class="popup-header">
  71. <text class="close" @tap="hidePhonePopup">关闭</text>
  72. <text class="title">客服电话</text>
  73. </view>
  74. <view class="phone-number" @tap="makePhoneCall">
  75. <text>0731-599327-8899</text>
  76. <uni-icons type="phone-filled" size="23" class="phone-icon"></uni-icons>
  77. </view>
  78. </view>
  79. </view>
  80. <email-popup
  81. :show="showEmailPopup"
  82. @close="handleCloseEmailPopup"
  83. />
  84. </view>
  85. </template>
  86. <script>
  87. import emailPopup from '@/wxcomponents/email-popup/email-popup.vue'
  88. export default {
  89. components: {
  90. emailPopup
  91. },
  92. data() {
  93. return {
  94. greeting: '下午好',
  95. showPhonePopup: false,
  96. showEmailPopup:false
  97. }
  98. },
  99. created() {
  100. this.updateGreeting()
  101. },
  102. methods: {
  103. // 显示弹窗
  104. openEmailPopup() {
  105. this.showEmailPopup = true
  106. },
  107. // 关闭弹窗
  108. handleCloseEmailPopup() {
  109. this.showEmailPopup = false
  110. },
  111. navigateBack() {
  112. uni.navigateBack()
  113. },
  114. updateGreeting() {
  115. const hour = new Date().getHours()
  116. if (hour < 12) {
  117. this.greeting = '上午好'
  118. } else if (hour < 18) {
  119. this.greeting = '下午好'
  120. } else {
  121. this.greeting = '晚上好'
  122. }
  123. },
  124. navigateBack() {
  125. uni.navigateBack()
  126. },
  127. navigateToFAQ() {
  128. // 跳转到常见问题页面
  129. uni.navigateTo({
  130. url: '/pages/customer-service/faq'
  131. })
  132. },
  133. handleOnlineService() {
  134. // 处理在线客服逻辑
  135. console.log('打开在线客服')
  136. },
  137. handlePhoneService() {
  138. this.showPhonePopup = true
  139. },
  140. hidePhonePopup() {
  141. this.showPhonePopup = false
  142. },
  143. makePhoneCall() {
  144. uni.makePhoneCall({
  145. phoneNumber: '0731-599327-8899'
  146. })
  147. }
  148. }
  149. }
  150. </script>
  151. <style lang="scss" scoped>
  152. .customer-service {
  153. min-height: 100vh;
  154. background: linear-gradient(to bottom,#fff3da,5%,#ffffff);
  155. padding-bottom: calc(env(safe-area-inset-bottom) + 120rpx);
  156. }
  157. .nav-bar {
  158. display: flex;
  159. align-items: center;
  160. // justify-content: space-between;
  161. height: 88rpx;
  162. padding-top: var(--status-bar-height);
  163. .title {
  164. font-family: PingFang SC;
  165. font-weight: 500;
  166. font-size: 16px;
  167. line-height: 140%;
  168. letter-spacing: 0%;
  169. text-align: center;
  170. vertical-align: middle;
  171. color: #333;
  172. // margin: 0 auto;
  173. margin-left: 30%;
  174. }
  175. .back-icon, .more-icon {
  176. width: 88rpx;
  177. height: 88rpx;
  178. display: flex;
  179. align-items: center;
  180. justify-content: center;
  181. .iconfont {
  182. font-size: 40rpx;
  183. color: #333;
  184. }
  185. }
  186. }
  187. .content {
  188. padding: 40rpx 30rpx;
  189. background: #fff;
  190. width: 80%;
  191. margin: 0 auto;
  192. .greeting {
  193. margin-bottom: 60rpx;
  194. .title {
  195. font-size: 48rpx;
  196. font-weight: bold;
  197. color: #333;
  198. display: block;
  199. margin-bottom: 20rpx;
  200. }
  201. .subtitle {
  202. font-size: 28rpx;
  203. color: #999;
  204. }
  205. }
  206. .contact-list {
  207. background: #fff;
  208. border-radius: 20rpx;
  209. margin-bottom: 40rpx;
  210. .contact-item {
  211. height: 110rpx;
  212. display: flex;
  213. align-items: center;
  214. justify-content: space-between;
  215. padding: 0 30rpx;
  216. border-bottom: 1rpx solid rgba(0, 0, 0, 0.05);
  217. &:last-child {
  218. border-bottom: none;
  219. }
  220. .label {
  221. font-size: 32rpx;
  222. color: #333;
  223. }
  224. .arrow {
  225. font-size: 24rpx;
  226. color: #999;
  227. opacity: 0.5;
  228. }
  229. }
  230. }
  231. .info-section {
  232. margin-bottom: 40rpx;
  233. padding: 0 20rpx;
  234. .info-item {
  235. margin-bottom: 30rpx;
  236. display: flex;
  237. align-items: flex-start;
  238. .label {
  239. font-size: 28rpx;
  240. color: #666;
  241. white-space: nowrap;
  242. }
  243. .value {
  244. font-size: 28rpx;
  245. color: #666;
  246. flex: 1;
  247. }
  248. }
  249. }
  250. .faq-section {
  251. background: #fff;
  252. border-radius: 20rpx;
  253. margin-bottom: 40rpx;
  254. .faq-entry {
  255. height: 110rpx;
  256. display: flex;
  257. align-items: center;
  258. justify-content: space-between;
  259. padding: 0 30rpx;
  260. .label {
  261. font-size: 32rpx;
  262. color: #333;
  263. }
  264. .arrow {
  265. font-size: 24rpx;
  266. color: #999;
  267. opacity: 0.5;
  268. }
  269. }
  270. .faq-tip {
  271. padding: 30rpx;
  272. font-size: 26rpx;
  273. color: #999;
  274. text-align: center;
  275. line-height: 1.6;
  276. border-top: 1rpx solid rgba(0, 0, 0, 0.05);
  277. }
  278. }
  279. }
  280. .bottom-btn {
  281. position: fixed;
  282. left: 0;
  283. right: 0;
  284. bottom: 0;
  285. padding: 20rpx 30rpx;
  286. padding-bottom: calc(20rpx + env(safe-area-inset-bottom));
  287. background: rgba(255, 255, 255, 0.9);
  288. backdrop-filter: blur(10px);
  289. .online-service-btn {
  290. width: 100%;
  291. height: 88rpx;
  292. line-height: 88rpx;
  293. background: #FFA500;
  294. color: #fff;
  295. font-size: 32rpx;
  296. border-radius: 44rpx;
  297. border: none;
  298. }
  299. }
  300. .phone-popup {
  301. position: fixed;
  302. top: 0;
  303. left: 0;
  304. right: 0;
  305. bottom: 0;
  306. z-index: 999;
  307. // height: 30%;
  308. .popup-mask {
  309. position: absolute;
  310. top: 0;
  311. left: 0;
  312. right: 0;
  313. bottom: 0;
  314. background: rgba(0, 0, 0, 0.4);
  315. }
  316. .popup-content {
  317. position: absolute;
  318. left: 0;
  319. right: 0;
  320. bottom: 0;
  321. background: #fff;
  322. border-radius: 20rpx 20rpx 0 0;
  323. overflow: hidden;
  324. transform: translateY(0);
  325. transition: transform 0.3s ease-out;
  326. .popup-header {
  327. position: relative;
  328. height: 160rpx;
  329. display: flex;
  330. align-items: center;
  331. justify-content: center;
  332. border-bottom: 1rpx solid #f5f5f5;
  333. .title {
  334. font-size: 34rpx;
  335. color: #333;
  336. font-weight: 500;
  337. }
  338. .close {
  339. position: absolute;
  340. left: 30rpx;
  341. font-size: 32rpx;
  342. color: #333;
  343. }
  344. }
  345. .phone-number {
  346. height: 140rpx;
  347. display: flex;
  348. align-items: center;
  349. justify-content: center;
  350. padding: 0 40rpx;
  351. margin-bottom: env(safe-area-inset-bottom);
  352. text {
  353. font-size: 36rpx;
  354. color: #333;
  355. font-weight: 400;
  356. }
  357. .phone-icon {
  358. width: 44rpx;
  359. height: 44rpx;
  360. background: #f5f5f5;
  361. padding: 20rpx;
  362. border-radius: 50%;
  363. }
  364. }
  365. }
  366. &.popup-enter-active,
  367. &.popup-leave-active {
  368. transition: opacity 0.3s;
  369. .popup-content {
  370. transition: transform 0.3s ease-out;
  371. }
  372. }
  373. &.popup-enter,
  374. &.popup-leave-to {
  375. opacity: 0;
  376. .popup-content {
  377. transform: translateY(100%);
  378. }
  379. }
  380. }
  381. </style>