wallet.vue 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357
  1. <template>
  2. <view class="container">
  3. <view class="tui-wallet__box">
  4. <view class="tui-content__box">
  5. <view class="tui-my__assets">
  6. <text>我的资产</text>
  7. <image @tap="toggle" mode="widthFix" :src="'/static/images/mall/wallet/'+(isShow?'img_show_3x.png':'img_hide_3x.png')"></image>
  8. </view>
  9. <view class="tui-assets__center">
  10. <view class="tui-item__box">
  11. <text>余额</text>
  12. <view v-if="isShow">¥<text class="tui-text__large">100</text>.00</view>
  13. <view v-else><text class="tui-text__large">****</text></view>
  14. </view>
  15. <view class="tui-item__box">
  16. <text>红包</text>
  17. <view v-if="isShow">¥<text class="tui-text__large">0</text>.00</view>
  18. <view v-else><text class="tui-text__large">****</text></view>
  19. </view>
  20. <view class="tui-item__box" @tap="bankCard">
  21. <text>银行卡</text>
  22. <view v-if="isShow"><text class="tui-text__large">6</text>张</view>
  23. <view v-else><text class="tui-text__large">****</text></view>
  24. </view>
  25. </view>
  26. <view class="tui-assets__bottom">
  27. <view class="tui-item__box" @tap="coupon">
  28. <text>优惠券</text>
  29. <view v-if="isShow"><text class="tui-text__large">2</text>张</view>
  30. <view v-else><text class="tui-text__large">****</text></view>
  31. </view>
  32. <view class="tui-item__box">
  33. <text>积分</text>
  34. <view v-if="isShow"><text class="tui-text__large">0</text></view>
  35. <view v-else><text class="tui-text__large">****</text></view>
  36. </view>
  37. <view class="tui-item__box">
  38. <text>代金券</text>
  39. <view v-if="isShow">¥<text class="tui-text__large">0</text>.00</view>
  40. <view v-else><text class="tui-text__large">****</text></view>
  41. </view>
  42. <view class="tui-item__box">
  43. <text>礼品卡</text>
  44. <view v-if="isShow"><text class="tui-text__large">0</text>张</view>
  45. <view v-else><text class="tui-text__large">****</text></view>
  46. </view>
  47. </view>
  48. <!-- #ifdef MP -->
  49. <view class="tui-tag__box" @tap="records">账单</view>
  50. <!-- #endif -->
  51. </view>
  52. <view class="tui-recharge__box">
  53. <view class="tui-title">余额充值</view>
  54. <view class="tui-list-cell">
  55. <view class="tui-amount__box">
  56. <view class="tui-amount__title">5000元</view>
  57. <tui-button type="danger" width="142rpx" height="50rpx" shape="circle" :size="24" @click="recharge">立即充值</tui-button>
  58. </view>
  59. <view class="tui-amount__box">
  60. <view class="tui-amount__desc">充5000送3000</view>
  61. <view class="tui-amount">¥5000</view>
  62. </view>
  63. <view class="tui-badge tui-bg__new">
  64. <view class="tui-scale__text">新用户专享</view>
  65. </view>
  66. </view>
  67. <view class="tui-list-cell">
  68. <view class="tui-amount__box">
  69. <view class="tui-amount__title">5000元</view>
  70. <tui-button type="danger" width="142rpx" height="50rpx" shape="circle" :size="24" @click="recharge">立即充值</tui-button>
  71. </view>
  72. <view class="tui-amount__box">
  73. <view class="tui-amount__desc">充5000送2000</view>
  74. <view class="tui-amount">¥5000</view>
  75. </view>
  76. <view class="tui-badge tui-bg__appoint">
  77. <view class="tui-scale__text">指定用户专享</view>
  78. </view>
  79. </view>
  80. <view class="tui-list-cell">
  81. <view class="tui-amount__box">
  82. <view class="tui-amount__title">3000元</view>
  83. <tui-button type="danger" width="142rpx" height="50rpx" shape="circle" :size="24" @click="recharge">立即充值</tui-button>
  84. </view>
  85. <view class="tui-amount__box">
  86. <view class="tui-amount__desc">充3000送1000</view>
  87. <view class="tui-amount">¥3000</view>
  88. </view>
  89. <view class="tui-badge tui-bg__old">
  90. <view class="tui-scale__text">老用户专享</view>
  91. </view>
  92. </view>
  93. <view class="tui-list-cell">
  94. <view class="tui-amount__box">
  95. <view class="tui-amount__title">2000元</view>
  96. <tui-button type="danger" width="142rpx" height="50rpx" shape="circle" :size="24" @click="recharge">立即充值</tui-button>
  97. </view>
  98. <view class="tui-amount__box">
  99. <view class="tui-amount__desc">充2000送100</view>
  100. <view class="tui-amount">¥2000</view>
  101. </view>
  102. </view>
  103. <view class="tui-list-cell">
  104. <view class="tui-amount__box">
  105. <view class="tui-amount__title">1000元</view>
  106. <tui-button type="danger" width="142rpx" height="50rpx" shape="circle" :size="24" @click="recharge">立即充值</tui-button>
  107. </view>
  108. <!-- <view class="tui-amount__box">
  109. <view class="tui-amount">¥1000</view>
  110. </view> -->
  111. </view>
  112. <view class="tui-list-cell">
  113. <view class="tui-amount__box">
  114. <view class="tui-amount__title">500元</view>
  115. <tui-button type="danger" width="142rpx" height="50rpx" shape="circle" :size="24" @click="recharge">立即充值</tui-button>
  116. </view>
  117. <!-- <view class="tui-amount__box">
  118. <view class="tui-amount">¥500</view>
  119. </view> -->
  120. </view>
  121. </view>
  122. </view>
  123. </view>
  124. </template>
  125. <script>
  126. export default {
  127. data() {
  128. return {
  129. isShow: true
  130. }
  131. },
  132. methods: {
  133. recharge() {
  134. this.tui.href('/pagesA/my/recharge/recharge')
  135. },
  136. toggle() {
  137. this.isShow = !this.isShow
  138. },
  139. records(){
  140. this.tui.href('/pagesA/my/records/records')
  141. },
  142. bankCard(){
  143. this.tui.href('/pagesA/my/bankCard/bankCard')
  144. },
  145. coupon(){
  146. this.tui.href('/pagesA/my/myCoupon/myCoupon')
  147. }
  148. },
  149. /**
  150. * 页面相关事件处理函数--监听用户下拉动作
  151. */
  152. onPullDownRefresh: function() {
  153. setTimeout(() => {
  154. uni.stopPullDownRefresh()
  155. }, 200);
  156. },
  157. onNavigationBarButtonTap(e) {
  158. this.tui.href('/pagesA/my/records/records')
  159. }
  160. }
  161. </script>
  162. <style>
  163. .container {
  164. padding-bottom: 48rpx;
  165. }
  166. .tui-wallet__box {
  167. width: 100%;
  168. padding: 0 30rpx;
  169. box-sizing: border-box;
  170. }
  171. .tui-content__box {
  172. width: 100%;
  173. height: 360rpx;
  174. border-radius: 24rpx;
  175. padding: 0 30rpx;
  176. box-sizing: border-box;
  177. background: linear-gradient(90deg, rgb(255, 89, 38), rgb(235, 9, 9));
  178. position: relative;
  179. box-shadow: 0 3rpx 20rpx rgba(235, 9, 9, 0.2);
  180. }
  181. .tui-my__assets {
  182. width: 100%;
  183. color: #fff;
  184. font-size: 32rpx;
  185. font-weight: bold;
  186. padding: 30rpx 0;
  187. box-sizing: border-box;
  188. display: flex;
  189. align-items: center;
  190. }
  191. .tui-my__assets image {
  192. width: 36rpx;
  193. height: 28rpx;
  194. margin-left: 16rpx;
  195. display: block;
  196. }
  197. .tui-assets__center,
  198. .tui-assets__bottom {
  199. width: 100%;
  200. padding: 0 30rpx;
  201. display: flex;
  202. align-items: center;
  203. justify-content: space-between;
  204. box-sizing: border-box;
  205. }
  206. .tui-item__box {
  207. width: 33.3333%;
  208. text-align: center;
  209. color: #fff;
  210. font-size: 26rpx;
  211. flex-shrink: 0;
  212. }
  213. .tui-text__large {
  214. font-size: 40rpx;
  215. font-weight: bold;
  216. }
  217. .tui-assets__bottom {
  218. position: absolute;
  219. left: 0;
  220. bottom: 0;
  221. padding-top: 16rpx;
  222. box-shadow: 0px -5px 10px -5px rgba(255, 255, 255, .3);
  223. }
  224. .tui-assets__bottom .tui-item__box {
  225. width: 25%;
  226. font-size: 24rpx;
  227. padding-bottom: 16rpx;
  228. opacity: 0.8;
  229. }
  230. .tui-assets__bottom .tui-text__large {
  231. font-size: 32rpx;
  232. }
  233. .tui-recharge__box {
  234. width: 100%;
  235. padding: 40rpx 30rpx;
  236. box-sizing: border-box;
  237. margin-top: 30rpx;
  238. border-radius: 24rpx;
  239. background-color: #fff;
  240. }
  241. .tui-title {
  242. font-size: 32rpx;
  243. font-weight: 600;
  244. color: #222222;
  245. padding-bottom: 20rpx;
  246. }
  247. .tui-list-cell {
  248. width: 100%;
  249. height: 160rpx;
  250. padding: 0 30rpx;
  251. box-sizing: border-box;
  252. background: #FFF0F1;
  253. border-radius: 10rpx;
  254. margin-top: 20rpx;
  255. display: flex;
  256. align-items: center;
  257. justify-content: center;
  258. flex-direction: column;
  259. position: relative;
  260. }
  261. .tui-amount__title {
  262. font-size: 36rpx;
  263. font-weight: bold;
  264. color: #333333;
  265. }
  266. .tui-amount__desc {
  267. font-size: 24rpx;
  268. font-weight: 400;
  269. color: #333333;
  270. }
  271. .tui-amount__box {
  272. width: 100%;
  273. display: flex;
  274. align-items: center;
  275. justify-content: space-between;
  276. }
  277. .tui-amount {
  278. font-size: 26rpx;
  279. font-weight: 500;
  280. color: #333333;
  281. text-align: center;
  282. min-width: 142rpx;
  283. margin-left: auto;
  284. }
  285. .tui-badge {
  286. height: 32rpx;
  287. border-radius: 10rpx 0;
  288. font-size: 25rpx;
  289. font-weight: 400;
  290. color: #FFFFFF;
  291. position: absolute;
  292. left: 0;
  293. top: 0;
  294. display: flex;
  295. align-items: center;
  296. justify-content: center;
  297. }
  298. .tui-bg__new {
  299. background-color: #1BABA1;
  300. }
  301. .tui-bg__appoint {
  302. background: #F51414;
  303. }
  304. .tui-bg__old {
  305. background: #FA5A0A;
  306. }
  307. .tui-scale__text {
  308. width: 100%;
  309. text-align: center;
  310. transform: scale(0.8);
  311. transform-origin: center center;
  312. }
  313. /* #ifdef MP */
  314. .tui-tag__box{
  315. position: absolute;
  316. right: 0;
  317. top: 30rpx;
  318. border: 1rpx solid #fff;
  319. border-right: 0 !important;
  320. color: #fff;
  321. font-size: 24rpx;
  322. border-radius: 100rpx 0 0 100rpx;
  323. padding: 4rpx 16rpx;
  324. text-align: center;
  325. }
  326. /* #endif */
  327. </style>