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

425 lines
11 KiB

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
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 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 week ago
1 week ago
1 week ago
  1. <template>
  2. <view class="upgrade-page">
  3. <!-- 顶部导航栏 -->
  4. <view class="nav-bar" :style="{height: navBarTotalHeight + 'px', 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" />
  8. </view>
  9. <view class="nav-bar-title">回收侠·推客联盟</view>
  10. <view class="nav-bar-right">
  11. <uni-icons type="more-filled" size="22" color="#222" />
  12. </view>
  13. </view>
  14. </view>
  15. <!-- 打钩标签区 -->
  16. <view class="feature-tags" :style="{marginTop: navBarTotalHeight + 'px'}">
  17. <view class="tag" v-for="(t, i) in featureTags" :key="i">
  18. <text class="check"></text>
  19. <text class="text">{{t}}</text>
  20. </view>
  21. </view>
  22. <!-- 主内容区 -->
  23. <view class="main-content">
  24. <view class="upgrade-card">
  25. <view class="upgrade-title-row">
  26. <text class="upgrade-title">申请推广官</text>
  27. <view class="contact-service" @tap="contactService">
  28. <uni-icons type="headphones" size="22" color="#df8155" />
  29. <text class="contact-text">联系客服</text>
  30. </view>
  31. </view>
  32. <!-- 表单区 -->
  33. <view class="form-item">
  34. <text class="label">姓名</text>
  35. <input class="input" type="text" placeholder="请输入" v-model="formData.name" />
  36. </view>
  37. <view class="form-item">
  38. <text class="label">电话</text>
  39. <input class="input" type="number" placeholder="请输入" v-model="formData.phone" />
  40. </view>
  41. <view class="form-item" @tap="showPicker('promotionTime')">
  42. <text class="label">每日可花推广时间</text>
  43. <view class="picker-value">
  44. <text :class="{'placeholder': !formData.promotionTime}">{{formData.promotionTime || '请选择'}}</text>
  45. <uni-icons type="right" size="18" color="#bbb" />
  46. </view>
  47. </view>
  48. <view class="desc-text">
  49. "支付费用后,您将成为更高等级的推广官,享受更高额度的佣金及相关权益,包括但不限于优先推广资源、专属培训课程、一对一业务指导等"
  50. </view>
  51. </view>
  52. </view>
  53. <!-- 底部按钮区 -->
  54. <view class="bottom-btns">
  55. <button class="btn gray">升级推广官</button>
  56. <button class="btn green" @tap="submitForm">提交</button>
  57. </view>
  58. <!-- 选择器弹窗 -->
  59. <view class="picker-popup" v-if="showPickerPopup">
  60. <view class="popup-mask" @tap="hidePicker"></view>
  61. <view class="popup-content">
  62. <view class="popup-header">
  63. <text class="reset" @tap="resetPicker">重置</text>
  64. <text class="title">每日可花推广时间</text>
  65. </view>
  66. <picker-view class="picker-view" :value="[currentPickerIndex]" @change="onPickerChange" :indicator-style="indicatorStyle">
  67. <picker-view-column>
  68. <view class="picker-item" v-for="(item, index) in pickerOptions" :key="index" :class="{'selected-item': index === currentPickerIndex}">{{item}}</view>
  69. </picker-view-column>
  70. </picker-view>
  71. <button class="confirm-btn" @tap="confirmPicker">确认</button>
  72. </view>
  73. </view>
  74. </view>
  75. </template>
  76. <script>
  77. import pullRefreshMixin from '@/pages/mixins/pullRefreshMixin.js'
  78. export default {
  79. mixins: [pullRefreshMixin],
  80. data() {
  81. return {
  82. statusBarHeight: 0,
  83. navBarHeight: 44,
  84. navBarTotalHeight: 44,
  85. featureTags: ['收益高', '品类全', '到账快', '城市多'],
  86. formData: {
  87. name: '',
  88. phone: '',
  89. promotionTime: ''
  90. },
  91. showPickerPopup: false,
  92. currentPickerIndex: 0,
  93. indicatorStyle: 'height: 88rpx; border: none;',
  94. pickerOptions: ['2小时', '3小时', '4小时', '5小时', '6小时']
  95. }
  96. },
  97. onLoad() {
  98. const sysInfo = uni.getSystemInfoSync()
  99. this.statusBarHeight = sysInfo.statusBarHeight
  100. this.navBarHeight = 44
  101. this.navBarTotalHeight = this.statusBarHeight + this.navBarHeight
  102. },
  103. methods: {
  104. async onRefresh() {
  105. // 模拟刷新数据
  106. await new Promise(resolve => setTimeout(resolve, 1000))
  107. uni.stopPullRefresh()
  108. },
  109. navigateBack() {
  110. uni.navigateBack()
  111. },
  112. contactService() {
  113. uni.navigateTo({ url: '/pages/subcomponent/admin_faq' })
  114. },
  115. showPicker() {
  116. this.showPickerPopup = true
  117. },
  118. hidePicker() {
  119. this.showPickerPopup = false
  120. },
  121. onPickerChange(e) {
  122. const index = e.detail.value[0]
  123. this.currentPickerIndex = index
  124. },
  125. confirmPicker() {
  126. this.formData.promotionTime = this.pickerOptions[this.currentPickerIndex]
  127. this.hidePicker()
  128. },
  129. resetPicker() {
  130. this.currentPickerIndex = 0
  131. },
  132. submitForm() {
  133. uni.showToast({ title: '提交成功', icon: 'success' })
  134. }
  135. }
  136. }
  137. </script>
  138. <style lang="scss" scoped>
  139. .upgrade-page {
  140. min-height: 100vh;
  141. background: linear-gradient(180deg, #eaffe6 0%, #fff 30%);
  142. padding-bottom: calc(env(safe-area-inset-bottom) + 120rpx);
  143. }
  144. .nav-bar {
  145. position: fixed;
  146. top: 0;
  147. left: 0;
  148. right: 0;
  149. z-index: 1000;
  150. width: 100vw;
  151. background: linear-gradient(to right, #b2f08d 0%, #39e9d2 100%);
  152. box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.03);
  153. .nav-bar-inner {
  154. display: flex;
  155. align-items: center;
  156. height: 44px;
  157. width: 100vw;
  158. position: relative;
  159. }
  160. .back-icon, .nav-bar-right {
  161. width: 44px;
  162. height: 44px;
  163. display: flex;
  164. align-items: center;
  165. justify-content: center;
  166. position: absolute;
  167. top: 0;
  168. }
  169. .back-icon { left: 0; }
  170. .nav-bar-right { right: 0; }
  171. .nav-bar-title {
  172. flex: 1;
  173. text-align: center;
  174. font-size: 36rpx;
  175. font-weight: bold;
  176. color: #222;
  177. letter-spacing: 2rpx;
  178. line-height: 44px;
  179. }
  180. }
  181. .feature-tags {
  182. position: relative;
  183. z-index: 1;
  184. margin: 0 32rpx;
  185. margin-top: 0;
  186. margin-bottom: 0;
  187. background: linear-gradient(to right, #b2f08d 0%, #39e9d2 100%);
  188. border-radius: 32rpx;
  189. box-shadow: 0 4rpx 24rpx rgba(60, 167, 250, 0.08);
  190. padding: 0 24rpx;
  191. height: 80rpx;
  192. display: flex;
  193. justify-content: space-between;
  194. align-items: center;
  195. .tag {
  196. flex: 1;
  197. display: flex;
  198. align-items: center;
  199. justify-content: center;
  200. .check {
  201. width: 36rpx;
  202. height: 36rpx;
  203. background: #fff;
  204. border-radius: 50%;
  205. display: flex;
  206. align-items: center;
  207. justify-content: center;
  208. font-size: 28rpx;
  209. color: #13ac47;
  210. font-weight: bold;
  211. margin-right: 10rpx;
  212. box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.08);
  213. }
  214. .text {
  215. color: #fff;
  216. font-size: 28rpx;
  217. font-weight: bold;
  218. }
  219. }
  220. }
  221. .main-content {
  222. margin-top: -48rpx;
  223. padding-top: 88rpx;
  224. background: linear-gradient(180deg, #eaffe6 0%, #fff 30%);
  225. min-height: 100vh;
  226. width: 100vw;
  227. box-sizing: border-box;
  228. position: relative;
  229. z-index: 11;
  230. border-radius: 40rpx 40rpx 0 0;
  231. overflow: hidden;
  232. display: flex;
  233. flex-direction: column;
  234. align-items: center;
  235. }
  236. .upgrade-card {
  237. width: 92vw;
  238. max-width: 700rpx;
  239. margin: 40rpx auto 0 auto;
  240. background: #fff;
  241. border-radius: 32rpx;
  242. box-shadow: 0 8rpx 32rpx rgba(60, 167, 250, 0.08);
  243. padding: 40rpx 32rpx 32rpx 32rpx;
  244. display: flex;
  245. flex-direction: column;
  246. align-items: stretch;
  247. .upgrade-title-row {
  248. display: flex;
  249. justify-content: space-between;
  250. align-items: center;
  251. margin-bottom: 32rpx;
  252. .upgrade-title {
  253. font-size: 32rpx;
  254. font-weight: bold;
  255. color: #222;
  256. }
  257. .contact-service {
  258. display: flex;
  259. align-items: center;
  260. padding: 4rpx 12rpx;
  261. border-radius: 12rpx;
  262. border: 2rpx solid #df8155;
  263. background: #fff0d2;
  264. .contact-text {
  265. color: #df8155;
  266. font-size: 22rpx;
  267. margin-left: 4rpx;
  268. }
  269. uni-icons {
  270. font-size: 20rpx !important;
  271. }
  272. }
  273. }
  274. .form-item {
  275. margin-bottom: 32rpx;
  276. .label {
  277. font-size: 28rpx;
  278. color: #222;
  279. margin-bottom: 12rpx;
  280. display: block;
  281. }
  282. .input {
  283. width: 100%;
  284. height: 72rpx;
  285. background: transparent;
  286. padding: 0;
  287. font-size: 30rpx;
  288. border: none;
  289. border-bottom: 1rpx solid #eee;
  290. &::placeholder {
  291. color: #bbb;
  292. font-size: 30rpx;
  293. }
  294. }
  295. .picker-value {
  296. width: 100%;
  297. height: 72rpx;
  298. display: flex;
  299. align-items: center;
  300. justify-content: space-between;
  301. border-bottom: 1rpx solid #eee;
  302. .placeholder {
  303. color: #bbb;
  304. }
  305. text {
  306. font-size: 30rpx;
  307. color: #222;
  308. }
  309. }
  310. }
  311. .desc-text {
  312. font-size: 26rpx;
  313. color: #666;
  314. line-height: 1.6;
  315. margin-top: 32rpx;
  316. text-align: center;
  317. }
  318. }
  319. .bottom-btns {
  320. position: fixed;
  321. left: 0;
  322. right: 0;
  323. bottom: 0;
  324. display: flex;
  325. justify-content: space-between;
  326. padding: 24rpx 32rpx calc(env(safe-area-inset-bottom) + 24rpx) 32rpx;
  327. background: #fff;
  328. z-index: 100;
  329. .btn {
  330. flex: 1;
  331. height: 88rpx;
  332. border-radius: 44rpx;
  333. font-size: 32rpx;
  334. font-weight: bold;
  335. margin: 0 12rpx;
  336. border: none;
  337. box-shadow: none;
  338. &.gray {
  339. background: linear-gradient(180deg, #f8f8f8 0%, #f2f4f6 100%);
  340. color: #222;
  341. border: 2rpx solid #e5e5e5;
  342. }
  343. &.green {
  344. background: linear-gradient(90deg, #b2f08d, #39e9d2);
  345. color: #222;
  346. border: none;
  347. }
  348. }
  349. }
  350. .picker-popup {
  351. position: fixed;
  352. top: 0;
  353. left: 0;
  354. right: 0;
  355. bottom: 0;
  356. z-index: 999;
  357. .popup-mask {
  358. position: absolute;
  359. top: 0;
  360. left: 0;
  361. right: 0;
  362. bottom: 0;
  363. background: rgba(0, 0, 0, 0.6);
  364. }
  365. .popup-content {
  366. position: absolute;
  367. left: 0;
  368. right: 0;
  369. bottom: 0;
  370. background: #fff;
  371. border-radius: 24rpx 24rpx 0 0;
  372. padding-bottom: calc(env(safe-area-inset-bottom) + 40rpx);
  373. .popup-header {
  374. display: flex;
  375. align-items: center;
  376. padding: 30rpx;
  377. position: relative;
  378. justify-content: center;
  379. border-bottom: 1rpx solid #f5f5f5;
  380. .title {
  381. font-size: 32rpx;
  382. color: #333;
  383. font-weight: normal;
  384. }
  385. .reset {
  386. position: absolute;
  387. left: 30rpx;
  388. font-size: 28rpx;
  389. color: #666;
  390. }
  391. }
  392. .picker-view {
  393. width: 100%;
  394. height: 440rpx;
  395. background: #fff;
  396. .picker-item {
  397. height: 88rpx;
  398. line-height: 88rpx;
  399. text-align: center;
  400. font-size: 28rpx;
  401. color: #999;
  402. font-weight: normal;
  403. }
  404. }
  405. .confirm-btn {
  406. margin: 30rpx;
  407. height: 88rpx;
  408. line-height: 88rpx;
  409. background: linear-gradient(90deg, #91dba5, #7ed4a6);
  410. color: #fff;
  411. font-size: 32rpx;
  412. border-radius: 44rpx;
  413. border: none;
  414. }
  415. }
  416. }
  417. </style>