四零语境前端代码仓库
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.

415 lines
10 KiB

1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
  1. <template>
  2. <view class="promote-page">
  3. <uv-status-bar></uv-status-bar>
  4. <!-- 主要内容区域 -->
  5. <view class="content">
  6. <!-- 推广官图片 -->
  7. <view class="promote-image-container">
  8. <uv-icon name="arrow-left" size="20" color="black" @click="goBack"></uv-icon>
  9. <view :style="{flex: 1, justifyContent: 'center', display: 'flex'}">
  10. <image
  11. class="promote-image"
  12. src="/static/推广官.png"
  13. mode="widthFix"
  14. ></image>
  15. </view>
  16. </view>
  17. <!-- 推广标语图片 -->
  18. <view class="slogan-container">
  19. <image
  20. class="slogan-image"
  21. src="/static/推广标语.png"
  22. mode="widthFix"
  23. ></image>
  24. </view>
  25. </view>
  26. <!-- 外部大容器 -->
  27. <view class="main-container">
  28. <!-- 个人信息容器 -->
  29. <view class="profile-container">
  30. <image class="profile-avatar" src="/static/待上传头像.png" mode="aspectFill"></image>
  31. <view class="profile-info">
  32. <text class="profile-name">战斗世界</text>
  33. <text class="profile-id">ID: 5625354</text>
  34. </view>
  35. <view class="profile-stats">
  36. <view class="stat-item">
  37. <text class="stat-number">888</text>
  38. <text class="stat-label">推广人数</text>
  39. </view>
  40. <view class="stat-item">
  41. <text class="stat-number">341</text>
  42. <text class="stat-label">总佣金</text>
  43. </view>
  44. </view>
  45. </view>
  46. <!-- 功能按钮区域 -->
  47. <view class="function-buttons">
  48. <view class="function-item" @click="goTeam">
  49. <image class="function-icon" src="/static/团队图标.png" mode="aspectFit"></image>
  50. <text class="function-text">我的团队</text>
  51. </view>
  52. <view class="function-item">
  53. <image class="function-icon" src="/static/二维码图标.png" mode="aspectFit"></image>
  54. <text class="function-text">我的二维码</text>
  55. </view>
  56. <view class="function-item" @click="goCash">
  57. <image class="function-icon" src="/static/提现图标.png" mode="aspectFit"></image>
  58. <text class="function-text">提现</text>
  59. </view>
  60. </view>
  61. <!-- 余额显示 -->
  62. <view class="balance-section">
  63. <text class="balance-label">余额</text>
  64. <text class="balance-amount">¥88.32</text>
  65. <uv-icon name="arrow-right" size="16" color="#999"></uv-icon>
  66. </view>
  67. <!-- 转账记录容器 -->
  68. <view class="record-container">
  69. <view class="record-list">
  70. <view class="record-item" v-for="(item, index) in list" :key="index">
  71. <view class="record-avatar">
  72. <image class="avatar" :src="item.userInfo.avatar" mode="aspectFill"></image>
  73. <text class="avatar-name">{{ item.user_dictText }}</text>
  74. </view>
  75. <view class="record-info">
  76. <text class="record-title">{{ item.title }}</text>
  77. <text class="record-date">{{ item.createTime }}</text>
  78. </view>
  79. <view class="record-amount">
  80. <text class="amount">+{{ item.money }}</text>
  81. <text class="status" :class="item.withdrawal.status === '1' && withdrawStatus === '0' ? 'status-available' : 'status-received'" v-if="item.withdrawal">{{ getText(item.withdrawal) }}</text>
  82. </view>
  83. </view>
  84. </view>
  85. </view>
  86. </view>
  87. <!-- 底部固定按钮 -->
  88. <view class="bottom-button-container">
  89. <uv-button :custom-style="{
  90. height: '82rpx',
  91. borderRadius: '198rpx',
  92. background: '#06DADC',
  93. border: '2rpx solid #06DADC',
  94. lineHeight: '82rpx',
  95. fontSize: '36rpx'
  96. }" type="primary">分享</uv-button>
  97. <uv-safe-bottom></uv-safe-bottom>
  98. </view>
  99. </view>
  100. </template>
  101. <script>
  102. import MixinList from '@/mixins/list'
  103. export default {
  104. mixins: [MixinList],
  105. data() {
  106. return {
  107. mixinListApi: 'promotion.water',
  108. }
  109. },
  110. methods: {
  111. goBack() {
  112. uni.navigateBack()
  113. },
  114. goTeam() {
  115. uni.navigateTo({
  116. url: '/subPages/user/team'
  117. })
  118. },
  119. goCash() {
  120. uni.navigateTo({
  121. url: '/subPages/user/cash'
  122. })
  123. },
  124. getText(widhdraw) {
  125. // 如果已经领取了
  126. if (widhdraw.withdrawStatus !== '0') {
  127. return '已领取,' + (widhdraw.method === '0' ? '微信打款' : '线下付款')
  128. }else if (widhdraw.status === '0') {
  129. return '提现待审核中'
  130. }else if(widhdraw.status === '2'){
  131. return '审核失败!'
  132. }
  133. }
  134. }
  135. }
  136. </script>
  137. <style lang="scss" scoped>
  138. .promote-page {
  139. min-height: 100vh;
  140. background: linear-gradient(124deg, #22F2EB 0%, #24B0F6 30%);
  141. // background: linear-gradient(124deg, #22F2EB 0%, #24B0F6 100%);
  142. }
  143. .content {
  144. padding: 0rpx 40rpx 0;
  145. .promote-image-container {
  146. display: flex;
  147. justify-content: center;
  148. margin-bottom: 30rpx;
  149. align-items: center;
  150. .promote-image {
  151. margin: 0 auto;
  152. width: 168rpx;
  153. }
  154. }
  155. .slogan-container {
  156. display: flex;
  157. justify-content: center;
  158. margin-bottom: 80rpx;
  159. .slogan-image {
  160. width: 670rpx;
  161. }
  162. }
  163. }
  164. // 外部大容器
  165. .main-container {
  166. width: 100%;
  167. border-radius: 48rpx;
  168. border: 2rpx solid #06DADC12;
  169. box-sizing: border-box;
  170. padding: 40rpx;
  171. padding-bottom: 200rpx;
  172. background: linear-gradient(180deg, #DEFFFF 0%, #FBFEFF 22.65%, #F0FBFF 100%);
  173. // 个人信息容器
  174. .profile-container {
  175. background: #fff;
  176. margin-bottom: 30rpx;
  177. display: flex;
  178. align-items: center;
  179. border-radius: 48rpx;
  180. border-width: 2rpx;
  181. justify-content: space-between;
  182. background: linear-gradient(180deg, #DEFFFF 0%, #FBFEFF 22.65%, #F0FBFF 100%);
  183. // background: red;
  184. border: 2rpx solid #06DADC12;
  185. // padding-top: 32rpx;
  186. padding-right: 40rpx;
  187. // padding-bottom: 32rpx;
  188. padding-left: 40rpx;
  189. height: 200rpx;
  190. .profile-avatar {
  191. width: 128rpx;
  192. height: 128rpx;
  193. border-radius: 50%;
  194. margin-right: 24rpx;
  195. }
  196. .profile-info {
  197. flex: 1;
  198. .profile-name {
  199. display: block;
  200. font-size: 32rpx;
  201. font-weight: 600;
  202. color: #333;
  203. margin-bottom: 8rpx;
  204. }
  205. .profile-id {
  206. font-size: 24rpx;
  207. color: #999;
  208. }
  209. }
  210. .profile-stats {
  211. display: flex;
  212. .stat-item {
  213. text-align: center;
  214. margin-left: 60rpx;
  215. .stat-number {
  216. display: block;
  217. font-size: 32rpx;
  218. font-weight: bold;
  219. color: #333;
  220. margin-bottom: 8rpx;
  221. }
  222. .stat-label {
  223. font-size: 24rpx;
  224. color: #999;
  225. }
  226. }
  227. }
  228. }
  229. // 功能按钮区域
  230. .function-buttons {
  231. display: flex;
  232. justify-content: space-around;
  233. align-items: center;
  234. margin-bottom: 48rpx;
  235. .function-item {
  236. display: flex;
  237. // flex-direction: column;
  238. align-items: center;
  239. gap: 16rpx;
  240. border-right: 1px solid #06DADC;
  241. padding-right: 30rpx;
  242. &:nth-child(3) {
  243. border-right: none;
  244. }
  245. .function-icon {
  246. width: 46rpx;
  247. height: 46rpx;
  248. // margin-bottom: 16rpx;
  249. }
  250. .function-text {
  251. font-size: 24rpx;
  252. color: #181818;
  253. }
  254. }
  255. }
  256. // 余额显示
  257. .balance-section {
  258. display: flex;
  259. align-items: center;
  260. justify-content: space-between;
  261. margin-bottom: 40rpx;
  262. .balance-label {
  263. font-size: 32rpx;
  264. color: #191919;
  265. font-weight: 500;
  266. }
  267. .balance-amount {
  268. font-size: 32rpx;
  269. font-weight: 500;
  270. color: #191919;
  271. flex: 1;
  272. margin-left: 20rpx;
  273. }
  274. }
  275. // 转账记录容器
  276. .record-container {
  277. .record-list {
  278. border: 1px solid #F0F0F0;
  279. border-radius: 24rpx;
  280. // background: red;
  281. .record-item {
  282. height: 116rpx;
  283. background: #fff;
  284. // border-radius: 16rpx;
  285. padding: 16rpx 32rpx;
  286. // margin-bottom: 20rpx;
  287. display: flex;
  288. align-items: center;
  289. border-bottom: 2rpx solid #F1F1F1 ;
  290. // margin-right: 24rpx;
  291. // box-sizing: border-box;
  292. .record-avatar{
  293. display: flex;
  294. align-items: center;
  295. flex-direction: column;
  296. gap: 12rpx;
  297. .avatar-name {
  298. font-size: 24rpx;
  299. color: #999;
  300. }
  301. .avatar {
  302. width: 50rpx;
  303. height: 50rpx;
  304. border-radius: 50%;
  305. // margin-right: 24rpx;
  306. }
  307. }
  308. .record-info {
  309. flex: 3;
  310. text-align: center;
  311. .record-title {
  312. display: block;
  313. font-size: 28rpx;
  314. color: #333;
  315. margin-bottom: 8rpx;
  316. }
  317. .record-date {
  318. font-size: 26rpx;
  319. color: #A3A3A3;
  320. }
  321. }
  322. .record-amount {
  323. flex: 2;
  324. text-align: center;
  325. .amount {
  326. display: block;
  327. font-size: 28rpx;
  328. font-weight: bold;
  329. color: #333;
  330. margin-bottom: 8rpx;
  331. }
  332. .status {
  333. font-size: 26rpx;
  334. // padding: 8rpx 16rpx;
  335. border-radius: 20rpx;
  336. &.status-received {
  337. // background: #f0f0f0;
  338. color: #A3A3A3;
  339. }
  340. &.status-available {
  341. // background: #22F2EB;
  342. padding: 3rpx 16rpx;
  343. color: $primary-color;
  344. border: 2rpx solid $primary-color;
  345. }
  346. }
  347. }
  348. }
  349. }
  350. }
  351. }
  352. // 底部固定按钮
  353. .bottom-button-container {
  354. position: fixed;
  355. bottom: 0;
  356. left: 0;
  357. right: 0;
  358. padding: 30rpx 40rpx;
  359. background: rgba(255, 255, 255, 0.95);
  360. border-top: 1px solid #F1F1F1;
  361. // height: 143rpx;
  362. // backdrop-filter: blur(10rpx);
  363. }
  364. </style>