爱简收旧衣按件回收前端代码仓库
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.

427 lines
9.3 KiB

1 week ago
5 days ago
1 week ago
1 week ago
1 week ago
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 pullRefreshMixin from '@/pages/mixins/pullRefreshMixin.js'
  88. import emailPopup from '@/wxcomponents/email-popup/email-popup.vue'
  89. export default {
  90. mixins: [pullRefreshMixin],
  91. components: {
  92. emailPopup
  93. },
  94. data() {
  95. return {
  96. greeting: '下午好',
  97. showPhonePopup: false,
  98. showEmailPopup:false
  99. }
  100. },
  101. created() {
  102. this.updateGreeting()
  103. },
  104. methods: {
  105. async onRefresh() {
  106. // 模拟刷新数据
  107. await new Promise(resolve => setTimeout(resolve, 1000))
  108. uni.stopPullRefresh()()()
  109. },
  110. // 显示弹窗
  111. openEmailPopup() {
  112. this.showEmailPopup = true
  113. },
  114. // 关闭弹窗
  115. handleCloseEmailPopup() {
  116. this.showEmailPopup = false
  117. },
  118. navigateBack() {
  119. uni.navigateBack()
  120. },
  121. updateGreeting() {
  122. const hour = new Date().getHours()
  123. if (hour < 12) {
  124. this.greeting = '上午好'
  125. } else if (hour < 18) {
  126. this.greeting = '下午好'
  127. } else {
  128. this.greeting = '晚上好'
  129. }
  130. },
  131. navigateToFAQ() {
  132. // 跳转到常见问题页面
  133. uni.navigateTo({
  134. url: '/pages/customer-service/faq'
  135. })
  136. },
  137. handleOnlineService() {
  138. // 处理在线客服逻辑
  139. console.log('打开在线客服')
  140. },
  141. handlePhoneService() {
  142. this.showPhonePopup = true
  143. },
  144. hidePhonePopup() {
  145. this.showPhonePopup = false
  146. },
  147. makePhoneCall() {
  148. uni.makePhoneCall({
  149. phoneNumber: '0731-599327-8899'
  150. })
  151. }
  152. }
  153. }
  154. </script>
  155. <style lang="scss" scoped>
  156. .customer-service {
  157. min-height: 100vh;
  158. background: linear-gradient(to bottom,#ebffe6,5%,#ffffff);
  159. padding-bottom: calc(env(safe-area-inset-bottom) + 120rpx);
  160. }
  161. .nav-bar {
  162. display: flex;
  163. align-items: center;
  164. // justify-content: space-between;
  165. height: 88rpx;
  166. padding-top: var(--status-bar-height);
  167. .title {
  168. font-family: PingFang SC;
  169. font-weight: 500;
  170. font-size: 16px;
  171. line-height: 140%;
  172. letter-spacing: 0%;
  173. text-align: center;
  174. vertical-align: middle;
  175. color: #333;
  176. // margin: 0 auto;
  177. margin-left: 30%;
  178. }
  179. .back-icon, .more-icon {
  180. width: 88rpx;
  181. height: 88rpx;
  182. display: flex;
  183. align-items: center;
  184. justify-content: center;
  185. .iconfont {
  186. font-size: 40rpx;
  187. color: #333;
  188. }
  189. }
  190. }
  191. .content {
  192. padding: 40rpx 30rpx;
  193. background: #fff;
  194. width: 80%;
  195. margin: 0 auto;
  196. .greeting {
  197. margin-bottom: 60rpx;
  198. .title {
  199. font-size: 48rpx;
  200. font-weight: bold;
  201. color: #333;
  202. display: block;
  203. margin-bottom: 20rpx;
  204. }
  205. .subtitle {
  206. font-size: 28rpx;
  207. color: #999;
  208. }
  209. }
  210. .contact-list {
  211. background: #fff;
  212. border-radius: 20rpx;
  213. margin-bottom: 40rpx;
  214. .contact-item {
  215. height: 110rpx;
  216. display: flex;
  217. align-items: center;
  218. justify-content: space-between;
  219. padding: 0 30rpx;
  220. border-bottom: 1rpx solid rgba(0, 0, 0, 0.05);
  221. &:last-child {
  222. border-bottom: none;
  223. }
  224. .label {
  225. font-size: 32rpx;
  226. color: #333;
  227. }
  228. .arrow {
  229. font-size: 24rpx;
  230. color: #999;
  231. opacity: 0.5;
  232. }
  233. }
  234. }
  235. .info-section {
  236. margin-bottom: 40rpx;
  237. padding: 0 20rpx;
  238. .info-item {
  239. margin-bottom: 30rpx;
  240. display: flex;
  241. align-items: flex-start;
  242. .label {
  243. font-size: 28rpx;
  244. color: #666;
  245. white-space: nowrap;
  246. }
  247. .value {
  248. font-size: 28rpx;
  249. color: #666;
  250. flex: 1;
  251. }
  252. }
  253. }
  254. .faq-section {
  255. background: #fff;
  256. border-radius: 20rpx;
  257. margin-bottom: 40rpx;
  258. .faq-entry {
  259. height: 110rpx;
  260. display: flex;
  261. align-items: center;
  262. justify-content: space-between;
  263. padding: 0 30rpx;
  264. .label {
  265. font-size: 32rpx;
  266. color: #333;
  267. }
  268. .arrow {
  269. font-size: 24rpx;
  270. color: #999;
  271. opacity: 0.5;
  272. }
  273. }
  274. .faq-tip {
  275. padding: 30rpx;
  276. font-size: 26rpx;
  277. color: #999;
  278. text-align: center;
  279. line-height: 1.6;
  280. border-top: 1rpx solid rgba(0, 0, 0, 0.05);
  281. }
  282. }
  283. }
  284. .bottom-btn {
  285. position: fixed;
  286. left: 0;
  287. right: 0;
  288. bottom: 0;
  289. padding: 20rpx 30rpx;
  290. padding-bottom: calc(20rpx + env(safe-area-inset-bottom));
  291. background: rgba(255, 255, 255, 0.9);
  292. backdrop-filter: blur(10px);
  293. .online-service-btn {
  294. width: 100%;
  295. height: 88rpx;
  296. line-height: 88rpx;
  297. background: linear-gradient(to right,#b9fdae,#09eadf);
  298. color: #fff;
  299. font-size: 32rpx;
  300. border-radius: 44rpx;
  301. border: none;
  302. }
  303. }
  304. .phone-popup {
  305. position: fixed;
  306. top: 0;
  307. left: 0;
  308. right: 0;
  309. bottom: 0;
  310. z-index: 999;
  311. // height: 30%;
  312. .popup-mask {
  313. position: absolute;
  314. top: 0;
  315. left: 0;
  316. right: 0;
  317. bottom: 0;
  318. background: rgba(0, 0, 0, 0.4);
  319. }
  320. .popup-content {
  321. position: absolute;
  322. left: 0;
  323. right: 0;
  324. bottom: 0;
  325. background: #fff;
  326. border-radius: 20rpx 20rpx 0 0;
  327. overflow: hidden;
  328. transform: translateY(0);
  329. transition: transform 0.3s ease-out;
  330. .popup-header {
  331. position: relative;
  332. height: 160rpx;
  333. display: flex;
  334. align-items: center;
  335. justify-content: center;
  336. border-bottom: 1rpx solid #f5f5f5;
  337. .title {
  338. font-size: 34rpx;
  339. color: #333;
  340. font-weight: 500;
  341. }
  342. .close {
  343. position: absolute;
  344. left: 30rpx;
  345. font-size: 32rpx;
  346. color: #333;
  347. }
  348. }
  349. .phone-number {
  350. height: 140rpx;
  351. display: flex;
  352. align-items: center;
  353. justify-content: center;
  354. padding: 0 40rpx;
  355. margin-bottom: env(safe-area-inset-bottom);
  356. text {
  357. font-size: 36rpx;
  358. color: #333;
  359. font-weight: 400;
  360. }
  361. .phone-icon {
  362. width: 44rpx;
  363. height: 44rpx;
  364. background: #f5f5f5;
  365. padding: 20rpx;
  366. border-radius: 50%;
  367. }
  368. }
  369. }
  370. &.popup-enter-active,
  371. &.popup-leave-active {
  372. transition: opacity 0.3s;
  373. .popup-content {
  374. transition: transform 0.3s ease-out;
  375. }
  376. }
  377. &.popup-enter,
  378. &.popup-leave-to {
  379. opacity: 0;
  380. .popup-content {
  381. transform: translateY(100%);
  382. }
  383. }
  384. }
  385. </style>