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

438 lines
11 KiB

2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
1 month ago
2 months ago
2 months ago
2 months ago
1 month ago
2 months ago
2 months ago
1 month ago
2 months ago
2 months ago
2 months ago
2 months ago
1 month ago
2 months ago
2 months ago
1 month ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months 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('userTime')">
  42. <text class="label">每日可花推广时间</text>
  43. <view class="picker-value">
  44. <text :class="{'placeholder': !formData.userTime}">{{formData.userTime || '请选择'}}</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. userTime: ''
  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. this.getMyPromotionInfo()
  103. },
  104. methods: {
  105. async onRefresh() {
  106. // 模拟刷新数据
  107. await new Promise(resolve => setTimeout(resolve, 1000))
  108. uni.stopPullRefresh()
  109. },
  110. navigateBack() {
  111. uni.navigateBack()
  112. },
  113. contactService() {
  114. uni.navigateTo({ url: '/pages/subcomponent/admin_faq' })
  115. },
  116. showPicker() {
  117. this.showPickerPopup = true
  118. },
  119. hidePicker() {
  120. this.showPickerPopup = false
  121. },
  122. onPickerChange(e) {
  123. const index = e.detail.value[0]
  124. this.currentPickerIndex = index
  125. },
  126. confirmPicker() {
  127. this.formData.userTime = this.pickerOptions[this.currentPickerIndex]
  128. this.hidePicker()
  129. },
  130. resetPicker() {
  131. this.currentPickerIndex = 0
  132. },
  133. submitForm() {
  134. this.$api('apply', this.formData, (res) => {
  135. if (res && res.success) {
  136. uni.showToast({ title: '提交成功', icon: 'success' })
  137. uni.navigateBack()
  138. }
  139. })
  140. },
  141. getMyPromotionInfo(){
  142. this.$api('getMyPromotionInfo', {}, (res) => {
  143. if (res && res.success && res.result) {
  144. this.formData = res.result
  145. }
  146. })
  147. }
  148. }
  149. }
  150. </script>
  151. <style lang="scss" scoped>
  152. .upgrade-page {
  153. min-height: 100vh;
  154. background: linear-gradient(180deg, #eaffe6 0%, #fff 30%);
  155. padding-bottom: calc(env(safe-area-inset-bottom) + 120rpx);
  156. }
  157. .nav-bar {
  158. position: fixed;
  159. top: 0;
  160. left: 0;
  161. right: 0;
  162. z-index: 1000;
  163. width: 100vw;
  164. background: linear-gradient(to right, #b2f08d 0%, #39e9d2 100%);
  165. box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.03);
  166. .nav-bar-inner {
  167. display: flex;
  168. align-items: center;
  169. height: 44px;
  170. width: 100vw;
  171. position: relative;
  172. }
  173. .back-icon, .nav-bar-right {
  174. width: 44px;
  175. height: 44px;
  176. display: flex;
  177. align-items: center;
  178. justify-content: center;
  179. position: absolute;
  180. top: 0;
  181. }
  182. .back-icon { left: 0; }
  183. .nav-bar-right { right: 0; }
  184. .nav-bar-title {
  185. flex: 1;
  186. text-align: center;
  187. font-size: 36rpx;
  188. font-weight: bold;
  189. color: #222;
  190. letter-spacing: 2rpx;
  191. line-height: 44px;
  192. }
  193. }
  194. .feature-tags {
  195. position: relative;
  196. z-index: 1;
  197. margin: 0 32rpx;
  198. margin-top: 0;
  199. margin-bottom: 0;
  200. background: linear-gradient(to right, #b2f08d 0%, #39e9d2 100%);
  201. border-radius: 32rpx;
  202. box-shadow: 0 4rpx 24rpx rgba(60, 167, 250, 0.08);
  203. padding: 0 24rpx;
  204. height: 80rpx;
  205. display: flex;
  206. justify-content: space-between;
  207. align-items: center;
  208. .tag {
  209. flex: 1;
  210. display: flex;
  211. align-items: center;
  212. justify-content: center;
  213. .check {
  214. width: 36rpx;
  215. height: 36rpx;
  216. background: #fff;
  217. border-radius: 50%;
  218. display: flex;
  219. align-items: center;
  220. justify-content: center;
  221. font-size: 28rpx;
  222. color: #13ac47;
  223. font-weight: bold;
  224. margin-right: 10rpx;
  225. box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.08);
  226. }
  227. .text {
  228. color: #fff;
  229. font-size: 28rpx;
  230. font-weight: bold;
  231. }
  232. }
  233. }
  234. .main-content {
  235. margin-top: -48rpx;
  236. padding-top: 88rpx;
  237. background: linear-gradient(180deg, #eaffe6 0%, #fff 30%);
  238. min-height: 100vh;
  239. width: 100vw;
  240. box-sizing: border-box;
  241. position: relative;
  242. z-index: 11;
  243. border-radius: 40rpx 40rpx 0 0;
  244. overflow: hidden;
  245. display: flex;
  246. flex-direction: column;
  247. align-items: center;
  248. }
  249. .upgrade-card {
  250. width: 92vw;
  251. max-width: 700rpx;
  252. margin: 40rpx auto 0 auto;
  253. background: #fff;
  254. border-radius: 32rpx;
  255. box-shadow: 0 8rpx 32rpx rgba(60, 167, 250, 0.08);
  256. padding: 40rpx 32rpx 32rpx 32rpx;
  257. display: flex;
  258. flex-direction: column;
  259. align-items: stretch;
  260. .upgrade-title-row {
  261. display: flex;
  262. justify-content: space-between;
  263. align-items: center;
  264. margin-bottom: 32rpx;
  265. .upgrade-title {
  266. font-size: 32rpx;
  267. font-weight: bold;
  268. color: #222;
  269. }
  270. .contact-service {
  271. display: flex;
  272. align-items: center;
  273. padding: 4rpx 12rpx;
  274. border-radius: 12rpx;
  275. border: 2rpx solid #df8155;
  276. background: #fff0d2;
  277. .contact-text {
  278. color: #df8155;
  279. font-size: 22rpx;
  280. margin-left: 4rpx;
  281. }
  282. uni-icons {
  283. font-size: 20rpx !important;
  284. }
  285. }
  286. }
  287. .form-item {
  288. margin-bottom: 32rpx;
  289. .label {
  290. font-size: 28rpx;
  291. color: #222;
  292. margin-bottom: 12rpx;
  293. display: block;
  294. }
  295. .input {
  296. width: 100%;
  297. height: 72rpx;
  298. background: transparent;
  299. padding: 0;
  300. font-size: 30rpx;
  301. border: none;
  302. border-bottom: 1rpx solid #eee;
  303. &::placeholder {
  304. color: #bbb;
  305. font-size: 30rpx;
  306. }
  307. }
  308. .picker-value {
  309. width: 100%;
  310. height: 72rpx;
  311. display: flex;
  312. align-items: center;
  313. justify-content: space-between;
  314. border-bottom: 1rpx solid #eee;
  315. .placeholder {
  316. color: #bbb;
  317. }
  318. text {
  319. font-size: 30rpx;
  320. color: #222;
  321. }
  322. }
  323. }
  324. .desc-text {
  325. font-size: 26rpx;
  326. color: #666;
  327. line-height: 1.6;
  328. margin-top: 32rpx;
  329. text-align: center;
  330. }
  331. }
  332. .bottom-btns {
  333. position: fixed;
  334. left: 0;
  335. right: 0;
  336. bottom: 0;
  337. display: flex;
  338. justify-content: space-between;
  339. padding: 24rpx 32rpx calc(env(safe-area-inset-bottom) + 24rpx) 32rpx;
  340. background: #fff;
  341. z-index: 100;
  342. .btn {
  343. flex: 1;
  344. height: 88rpx;
  345. border-radius: 44rpx;
  346. font-size: 32rpx;
  347. font-weight: bold;
  348. margin: 0 12rpx;
  349. border: none;
  350. box-shadow: none;
  351. &.gray {
  352. background: linear-gradient(180deg, #f8f8f8 0%, #f2f4f6 100%);
  353. color: #222;
  354. border: 2rpx solid #e5e5e5;
  355. }
  356. &.green {
  357. background: linear-gradient(90deg, #b2f08d, #39e9d2);
  358. color: #222;
  359. border: none;
  360. }
  361. }
  362. }
  363. .picker-popup {
  364. position: fixed;
  365. top: 0;
  366. left: 0;
  367. right: 0;
  368. bottom: 0;
  369. z-index: 999;
  370. .popup-mask {
  371. position: absolute;
  372. top: 0;
  373. left: 0;
  374. right: 0;
  375. bottom: 0;
  376. background: rgba(0, 0, 0, 0.6);
  377. }
  378. .popup-content {
  379. position: absolute;
  380. left: 0;
  381. right: 0;
  382. bottom: 0;
  383. background: #fff;
  384. border-radius: 24rpx 24rpx 0 0;
  385. padding-bottom: calc(env(safe-area-inset-bottom) + 40rpx);
  386. .popup-header {
  387. display: flex;
  388. align-items: center;
  389. padding: 30rpx;
  390. position: relative;
  391. justify-content: center;
  392. border-bottom: 1rpx solid #f5f5f5;
  393. .title {
  394. font-size: 32rpx;
  395. color: #333;
  396. font-weight: normal;
  397. }
  398. .reset {
  399. position: absolute;
  400. left: 30rpx;
  401. font-size: 28rpx;
  402. color: #666;
  403. }
  404. }
  405. .picker-view {
  406. width: 100%;
  407. height: 440rpx;
  408. background: #fff;
  409. .picker-item {
  410. height: 88rpx;
  411. line-height: 88rpx;
  412. text-align: center;
  413. font-size: 28rpx;
  414. color: #999;
  415. font-weight: normal;
  416. }
  417. }
  418. .confirm-btn {
  419. margin: 30rpx;
  420. height: 88rpx;
  421. line-height: 88rpx;
  422. background: linear-gradient(90deg, #91dba5, #7ed4a6);
  423. color: #fff;
  424. font-size: 32rpx;
  425. border-radius: 44rpx;
  426. border: none;
  427. }
  428. }
  429. }
  430. </style>