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

327 lines
8.2 KiB

1 week ago
1 week ago
1 week ago
1 week ago
1 week ago
1 week ago
1 week ago
5 days ago
1 week ago
1 week ago
1 week ago
1 week ago
1 week ago
1 week ago
1 week ago
1 week ago
1 week ago
1 week ago
1 week ago
1 week ago
1 week ago
1 week ago
1 week ago
  1. <template>
  2. <view class="faq-page" :style="{paddingTop: navBarHeightRpx + 'rpx'}">
  3. <!-- 顶部导航栏 -->
  4. <view class="nav-bar" :style="{height: navBarHeightRpx + 'rpx', paddingTop: statusBarHeight + 'px'}">
  5. <view class="nav-bar-inner">
  6. <view class="back-icon" @tap="navigateBack">
  7. <uni-icons type="left" size="22" color="#222"></uni-icons>
  8. </view>
  9. <view class="title">联系客服</view>
  10. <view class="nav-bar-right"></view>
  11. </view>
  12. </view>
  13. <!-- 主要内容区域 -->
  14. <view class="content-card">
  15. <view class="qa-list">
  16. <view class="qa-item" v-for="(item, idx) in faqList" :key="idx">
  17. <view class="question-row">
  18. <text class="q-icon">Q</text>
  19. <text class="question">{{item.q}}</text>
  20. </view>
  21. <view class="answer">{{item.a}}</view>
  22. </view>
  23. </view>
  24. <view class="dashed-line"></view>
  25. <view class="bottom-tip">
  26. 如有任何问题或建议请随时与我们联系我们将竭诚为您服务
  27. </view>
  28. </view>
  29. <!-- 底部按钮 -->
  30. <view class="bottom-btns">
  31. <button class="btn-outline" @tap="callService">客服电话</button>
  32. <button class="btn-gradient" @tap="openEmailPopup">联系在线客服</button>
  33. </view>
  34. <email-popup
  35. :show="showEmailPopup"
  36. @close="handleCloseEmailPopup"
  37. />
  38. <!-- 客服电话底部弹窗 -->
  39. <view v-if="showPhonePopup" class="phone-popup">
  40. <view class="popup-mask" @tap="closePhonePopup"></view>
  41. <view class="popup-content">
  42. <view class="popup-header">
  43. <text class="close-btn" @tap="closePhonePopup">关闭</text>
  44. <text class="popup-title">客服电话</text>
  45. </view>
  46. <view class="popup-phone-row" @tap="makePhoneCall">
  47. <text class="popup-phone">0731-599327-8899</text>
  48. <view class="popup-phone-icon">
  49. <uni-icons type="phone-filled" size="28" color="#222" />
  50. </view>
  51. </view>
  52. </view>
  53. </view>
  54. </view>
  55. </template>
  56. <script>
  57. import pullRefreshMixin from '@/pages/mixins/pullRefreshMixin.js'
  58. import emailPopup from '@/wxcomponents/email-popup/email-popup.vue'
  59. export default {
  60. mixins: [pullRefreshMixin],
  61. components: { emailPopup },
  62. data() {
  63. return {
  64. statusBarHeight: 0,
  65. navBarHeight: 0, // px
  66. navBarHeightRpx: 0, // rpx
  67. showEmailPopup: false,
  68. showPhonePopup: false,
  69. faqList: [
  70. {q: '如何申请成为推广官?', a: '您好!如需帮助,请优先选择以下方式联系我们。'},
  71. {q: '推广官的佣金如何计算?', a: '您好!如需帮助,请优先选择以下方式联系我们。'},
  72. {q: '为什么我的订单显示"回收失败"?', a: '您好!如需帮助,请优先选择以下方式联系我们。'},
  73. {q: '如果我的订单出现问题怎么办?', a: '您好!如需帮助,请优先选择以下方式联系我们。'},
  74. {q: '回收的旧衣如何处理?', a: '您好!如需帮助,请优先选择以下方式联系我们。'},
  75. {q: '哪些衣物可以回收?', a: '您好!如需帮助,请优先选择以下方式联系我们。'},
  76. ]
  77. }
  78. },
  79. onLoad() {
  80. const sysInfo = uni.getSystemInfoSync()
  81. this.statusBarHeight = sysInfo.statusBarHeight
  82. let navBarHeight = 24
  83. try {
  84. const menuButtonInfo = uni.getMenuButtonBoundingClientRect()
  85. navBarHeight = menuButtonInfo.bottom + menuButtonInfo.top - sysInfo.statusBarHeight
  86. } catch (e) {}
  87. this.navBarHeight = navBarHeight
  88. // px转rpx(750设计稿)
  89. this.navBarHeightRpx = Math.round(navBarHeight * 750 / sysInfo.windowWidth)
  90. },
  91. methods: {
  92. async onRefresh() {
  93. // 模拟刷新数据
  94. await new Promise(resolve => setTimeout(resolve, 1000))
  95. uni.stopPullRefresh()
  96. },
  97. openEmailPopup() { this.showEmailPopup = true },
  98. handleCloseEmailPopup() { this.showEmailPopup = false },
  99. navigateBack() { uni.navigateBack() },
  100. callService() {
  101. // 打开客服电话弹窗
  102. this.showPhonePopup = true
  103. },
  104. closePhonePopup() {
  105. this.showPhonePopup = false
  106. },
  107. makePhoneCall() {
  108. uni.makePhoneCall({ phoneNumber: '0731-599327-8899' })
  109. }
  110. }
  111. }
  112. </script>
  113. <style lang="scss" scoped>
  114. .faq-page {
  115. min-height: 100vh;
  116. background: linear-gradient(180deg, #fff3db 0%, #ffffff 100%);
  117. padding-bottom: env(safe-area-inset-bottom);
  118. }
  119. .nav-bar {
  120. position: fixed;
  121. top: 0;
  122. left: 0;
  123. right: 0;
  124. z-index: 100;
  125. width: 100vw;
  126. background: #fef4df;
  127. box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.03);
  128. .nav-bar-inner {
  129. display: flex;
  130. align-items: center;
  131. height: 44px;
  132. width: 100vw;
  133. position: relative;
  134. }
  135. .back-icon {
  136. width: 44px;
  137. height: 44px;
  138. display: flex;
  139. align-items: center;
  140. justify-content: center;
  141. position: absolute;
  142. left: 0;
  143. top: 0;
  144. }
  145. .title {
  146. flex: 1;
  147. text-align: center;
  148. font-size: 18px;
  149. font-weight: bold;
  150. color: #222;
  151. letter-spacing: 0.5px;
  152. line-height: 44px;
  153. }
  154. .nav-bar-right {
  155. width: 44px;
  156. height: 44px;
  157. position: absolute;
  158. right: 0;
  159. top: 0;
  160. }
  161. }
  162. .content-card {
  163. margin: 88px 0 0 0;
  164. padding: 0 0 32rpx 0;
  165. width: 92vw;
  166. max-width: 700rpx;
  167. background: #fff;
  168. border-radius: 32rpx;
  169. box-shadow: 0 8rpx 32rpx rgba(60, 167, 250, 0.08);
  170. margin-left: auto;
  171. margin-right: auto;
  172. padding-top: 32rpx;
  173. padding-bottom: 0;
  174. }
  175. .qa-list {
  176. padding: 0 36rpx;
  177. }
  178. .qa-item {
  179. margin-bottom: 36rpx;
  180. }
  181. .question-row {
  182. display: flex;
  183. align-items: center;
  184. margin-bottom: 8rpx;
  185. }
  186. .q-icon {
  187. color: #ffb300;
  188. font-size: 32rpx;
  189. font-weight: bold;
  190. margin-right: 12rpx;
  191. }
  192. .question {
  193. font-size: 32rpx;
  194. font-weight: bold;
  195. color: #222;
  196. }
  197. .answer {
  198. font-size: 26rpx;
  199. color: #999;
  200. line-height: 1.7;
  201. padding-left: 44rpx;
  202. }
  203. .dashed-line {
  204. border-bottom: 2rpx dashed #e5e5e5;
  205. margin: 24rpx 36rpx 0 36rpx;
  206. }
  207. .bottom-tip {
  208. font-size: 24rpx;
  209. color: #999;
  210. text-align: left;
  211. line-height: 1.6;
  212. padding: 32rpx 36rpx 0 36rpx;
  213. }
  214. .bottom-btns {
  215. position: fixed;
  216. left: 0;
  217. right: 0;
  218. bottom: 0;
  219. z-index: 101;
  220. display: flex;
  221. justify-content: center;
  222. align-items: center;
  223. gap: 32rpx;
  224. padding: 24rpx 36rpx calc(24rpx + env(safe-area-inset-bottom)) 36rpx;
  225. background: #fff;
  226. box-shadow: 0 -2rpx 12rpx rgba(0,0,0,0.03);
  227. }
  228. .btn-outline {
  229. flex: 1;
  230. height: 88rpx;
  231. line-height: 88rpx;
  232. background: #fff;
  233. color: #ffb300;
  234. font-size: 32rpx;
  235. border-radius: 44rpx;
  236. border: 2rpx solid #ffb300;
  237. margin-right: 0;
  238. }
  239. .btn-gradient {
  240. flex: 1;
  241. height: 88rpx;
  242. line-height: 88rpx;
  243. background: linear-gradient(90deg, #ffdf8c 0%, #ffb300 100%);
  244. color: #fff;
  245. font-size: 32rpx;
  246. border-radius: 44rpx;
  247. border: none;
  248. margin-left: 0;
  249. }
  250. .phone-popup {
  251. position: fixed;
  252. left: 0; right: 0; bottom: 0; top: 0;
  253. z-index: 9999;
  254. display: flex;
  255. align-items: flex-end;
  256. justify-content: center;
  257. .popup-mask {
  258. position: absolute;
  259. left: 0; right: 0; top: 0; bottom: 0;
  260. background: rgba(0,0,0,0.7);
  261. z-index: 0;
  262. }
  263. .popup-content {
  264. position: relative;
  265. width: 100vw;
  266. background: #fff;
  267. border-radius: 24rpx 24rpx 0 0;
  268. box-shadow: 0 -4rpx 32rpx rgba(0,0,0,0.08);
  269. padding-bottom: env(safe-area-inset-bottom);
  270. animation: popupUp 0.2s;
  271. }
  272. @keyframes popupUp {
  273. from { transform: translateY(100%); }
  274. to { transform: translateY(0); }
  275. }
  276. .popup-header {
  277. display: flex;
  278. align-items: center;
  279. justify-content: center;
  280. height: 56px;
  281. border-bottom: 1px solid #f2f2f2;
  282. position: relative;
  283. .close-btn {
  284. position: absolute;
  285. left: 24px;
  286. font-size: 17px;
  287. color: #999;
  288. }
  289. .popup-title {
  290. font-size: 18px;
  291. color: #222;
  292. font-weight: 600;
  293. letter-spacing: 1px;
  294. }
  295. }
  296. .popup-phone-row {
  297. display: flex;
  298. align-items: center;
  299. justify-content: center;
  300. padding: 40px 0 32px 0;
  301. .popup-phone {
  302. font-size: 24px;
  303. color: #222;
  304. font-weight: 400;
  305. letter-spacing: 1px;
  306. margin-right: 18px;
  307. }
  308. .popup-phone-icon {
  309. width: 44px;
  310. height: 44px;
  311. background: #f5f5f5;
  312. border-radius: 50%;
  313. display: flex;
  314. align-items: center;
  315. justify-content: center;
  316. }
  317. }
  318. }
  319. </style>