mine.vue 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421
  1. <template>
  2. <view >
  3. <!-- 扫一扫错误回调 -->
  4. <u-modal title="扫描异常" confirm-color="#dc9b21" v-model="scanNotify.scan" :content="scanNotify.scanMessage"></u-modal>
  5. <view style="position: relative;">
  6. <image src="../../static/img/bg.png" class="bg-img"></image>
  7. <image src="../../static/img/bg-yin.png" class="shuiyin" mode=""></image>
  8. <view class="card">
  9. <view class="info">
  10. <image class="avatar" src="https://thirdwx.qlogo.cn/mmopen/vi_32/q6EwR5U6zFp8bYbUWb9HmFc5Q3R88x13Q0ZtOcVK5lO8AmtibQDRcuMA2Y7CmyuMCr6icceM3QibIKN2icAAxSvjpA/132"></image>
  11. <view class="nickname">
  12. <block style="display: flex;">
  13. <text >赖德福|德芙值得信赖</text>
  14. <view class="cu-tag bg-tag sm round margin-left-20">
  15. 代理商
  16. </view>
  17. </block>
  18. </view>
  19. </view>
  20. <view class="cu-list grid col-3 no-border" style="border-radius:20rpx ;">
  21. <view class="cu-item" @click="item.name=='扫一扫'? scanCode() :$jump(item.path)" v-for="(item,index) in menuList" :key="index">
  22. <view class="grid-icon" >
  23. <image style="width: 66rpx;height: 66rpx;" :src="item.icon"/>
  24. </view>
  25. <text style="color: #242424;font-size: 26rpx;" >{{item.name}}</text>
  26. <view class="cu-tag bg-red badge" v-if="item.count>0">{{item.count}}</view>
  27. </view>
  28. </view>
  29. </view>
  30. </view>
  31. <view class="navbar-top" :style="{ 'background': 'rgba(255, 139, 47,'+toumindu+')'}">
  32. <view class="text-center text-white title ">联兑通</view>
  33. </view>
  34. <view class="account">
  35. <text class="title">我的账户</text>
  36. <view class="menu">
  37. <view class="item" @click="$jump('/pages/mine/my-points/my-points')">
  38. <text>2000</text>
  39. 我的积分
  40. </view>
  41. <view class="item" @click="$jump('/pages/mine/my-balance/my-balance')">
  42. <text>2000</text>
  43. 余额
  44. </view>
  45. </view>
  46. </view>
  47. <view class="exchange">
  48. <view class="top" style="padding: 20rpx 30rpx 10rpx;">
  49. <text>积分通兑</text>
  50. <text @click="$jump('/pages/mine/my-points/exchange')">更多 ></text>
  51. </view>
  52. <view class="menu-list">
  53. <view class="item item1">
  54. <image src="@/static/icon/jiayou.png" mode=""></image>
  55. <text class="title" style="color: #F6532A;">积分加油站</text>
  56. <view class="cu-btn round sm" >
  57. 去充值
  58. </view>
  59. </view>
  60. <view class="item item2">
  61. <image src="@/static/icon/yidong.png" mode=""></image>
  62. <text class="title" style="color: #4AB0FF;">中国移动</text>
  63. <view class="cu-btn round sm" >
  64. 120:100兑入
  65. </view>
  66. </view>
  67. <view class="item item3">
  68. <image src="@/static/bank/zhongguo.png" mode=""></image>
  69. <text class="title" style="color: #CF4948;">中国银行</text>
  70. <view class="cu-btn round sm">
  71. 530:100兑入
  72. </view>
  73. </view>
  74. </view>
  75. </view>
  76. <view class="consume">
  77. <view class="top" style="padding: 20rpx 30rpx 10rpx;">
  78. <text>赚积分</text>
  79. <text>更多 ></text>
  80. </view>
  81. <view class="cu-list grid col-3 no-border" style="border-radius:20rpx ;">
  82. <view class="cu-item" @click="$jump(item.path)" v-for="(item,index) in gainList" :key="index">
  83. <view class="grid-icon" >
  84. <image style="width: 160rpx;height: 160rpx;border-radius: 16rpx;" :src="item.icon"/>
  85. </view>
  86. <text style="color: #222222;font-size: 26rpx;" >{{item.name}}</text>
  87. <view class="cu-tag bg-red badge" v-if="item.count>0">{{item.count}}</view>
  88. </view>
  89. </view>
  90. </view>
  91. <view class="consume">
  92. <view class="top" style="padding: 20rpx 30rpx 10rpx;">
  93. <text>花积分</text>
  94. <text>更多 ></text>
  95. </view>
  96. <view class="cu-list grid col-4 no-border" style="border-radius:20rpx ;">
  97. <view class="cu-item" @click="$jump(item.path)" v-for="(item,index) in pointsList" :key="index">
  98. <view class="grid-icon" >
  99. <image style="width: 88rpx;height: 88rpx;" :src="item.icon"/>
  100. </view>
  101. <text style="color: #222222;font-size: 26rpx;" >{{item.name}}</text>
  102. <view class="cu-tag bg-red badge" v-if="item.count>0">{{item.count}}</view>
  103. </view>
  104. </view>
  105. </view>
  106. </view>
  107. </template>
  108. <script>
  109. export default {
  110. data() {
  111. return {
  112. scanNotify:{scan: false,scanMessage:'扫描错误,请稍后重试!' },
  113. toumindu: 0.00,
  114. menuList:[
  115. {
  116. icon:'/static/icon/scan.png',
  117. name:'扫一扫',
  118. path:'/pages/checkstand/index'
  119. },
  120. {
  121. icon:'/static/icon/pay.png',
  122. name:'付款码',
  123. path:'/pages/checkstand/pay-qrcode'
  124. },
  125. {
  126. icon:'/static/icon/card.png',
  127. name:'卡包',
  128. path:'/pages/mine/card/card'
  129. }
  130. ],
  131. gainList:[
  132. {
  133. icon:'/static/icon/daili.png',
  134. name:'成为代理',
  135. path:'/pages/mine/card/card'
  136. },
  137. {
  138. icon:'/static/icon/xianfeng.png',
  139. name:'音乐先锋榜',
  140. path:'/pages/mine/card/card'
  141. },
  142. {
  143. icon:'/static/icon/xianfeng.png',
  144. name:'音乐先锋榜',
  145. path:'/pages/mine/card/card'
  146. },
  147. ],
  148. pointsList:[
  149. {
  150. icon:'/static/icon/life.png',
  151. name:'生活服务',
  152. path:''
  153. },
  154. {
  155. icon:'/static/icon/jiaotong.png',
  156. name:'交通出行',
  157. path:''
  158. },
  159. {
  160. icon:'/static/icon/shop.png',
  161. name:'购物',
  162. path:''
  163. },
  164. {
  165. icon:'/static/icon/yiyao.png',
  166. name:'医疗',
  167. path:''
  168. },
  169. ]
  170. }
  171. },
  172. onPageScroll(obj){
  173. this.toumindu = obj.scrollTop*0.006;
  174. },
  175. methods: {
  176. scanCode(){
  177. const _this = this;
  178. this.$jump('/pages/checkstand/index')
  179. // uni.scanCode({
  180. // success: function (res) {
  181. // _this.$jump('/pages/checkstand/index')
  182. // },
  183. // fail: (res) => {
  184. // if(res.errMsg!='scanCode:fail cancel'){
  185. // this.scanNotify = {scan: true,scanMessage: res.errMsg};
  186. // }
  187. // }
  188. // });
  189. },
  190. }
  191. }
  192. </script>
  193. <style lang="scss" scoped>
  194. .bg-tag{
  195. color: #FFFFFF;
  196. background-color: #EA3723;
  197. }
  198. .shuiyin{
  199. overflow: hidden;
  200. width: 260rpx;
  201. height: 280rpx;
  202. position: absolute;
  203. right: 10rpx;
  204. top: 30rpx;
  205. }
  206. .bg-img{
  207. width: 100vw;
  208. height: 420rpx;
  209. }
  210. .navbar-top{
  211. position: fixed;
  212. width: 100%;
  213. top: 0;
  214. z-index:99999;
  215. padding-top:var(--status-bar-height);
  216. transition: top .25s;
  217. .title{
  218. padding: 18.18rpx 0;
  219. }
  220. }
  221. .card{
  222. position: relative;
  223. margin: -240rpx 20rpx 0;
  224. border-radius: 20rpx;
  225. background-color: #FFFFFF;
  226. .info{
  227. padding: 20rpx 20rpx 0;
  228. display: flex;
  229. .avatar{
  230. width: 100rpx;
  231. height: 100rpx;
  232. border-radius: 50%;
  233. }
  234. .nickname{
  235. font-weight: 800;
  236. color: #222222;
  237. font-size: 30rpx;
  238. margin-left: 20rpx;
  239. display: flex;
  240. align-items: center;
  241. justify-content: center;
  242. }
  243. }
  244. }
  245. .account{
  246. padding: 20rpx;
  247. color: #222222;
  248. margin: 20rpx;
  249. border-radius: 20rpx;
  250. background-color: #FFFFFF;
  251. .title{
  252. padding-left: 30rpx;
  253. font-weight: 800;
  254. }
  255. .menu{
  256. display: flex;
  257. justify-content: space-around;
  258. view{
  259. padding-top: 20rpx;
  260. display: flex;
  261. flex-direction: column;
  262. justify-content: center;
  263. align-items: center;
  264. text:first-child{
  265. font-weight: 800;
  266. padding-bottom: 10rpx;
  267. font-size: 32rpx;
  268. color: #FF9447;
  269. }
  270. text:last-child{
  271. }
  272. }
  273. }
  274. }
  275. .exchange{
  276. border-radius: 20rpx;
  277. background-color: #FFFFFF;
  278. padding: 10rpx 10rpx 30rpx;
  279. margin: 20rpx;
  280. .top{
  281. text:first-child{
  282. font-size: 34rpx;
  283. font-weight: 800;
  284. color: #26272F;
  285. }
  286. text:last-child{
  287. padding-top: 10rpx;
  288. font-size: 26rpx;
  289. color: #999999;
  290. }
  291. }
  292. .menu-list{
  293. display: flex;
  294. justify-content: space-around;
  295. .item{
  296. margin-top: 20rpx;
  297. width: 31%;
  298. padding: 15rpx 0;
  299. border-radius: 16rpx;
  300. display: flex;
  301. justify-content: center;
  302. align-items: center;
  303. flex-direction: column;
  304. .title{
  305. font-weight: 800;
  306. margin-bottom: 10rpx;
  307. }
  308. image{
  309. margin-bottom: 10rpx;
  310. border-radius: 50%;
  311. padding: 15rpx;
  312. background-color: #FFFFFF;
  313. width: 70rpx;
  314. height: 70rpx;
  315. }
  316. }
  317. .item1{
  318. background-image: linear-gradient(to right,#F7F0E7,#E9CEB9);
  319. view{
  320. font-size: 26rpx;
  321. padding: 10rpx 50rpx;
  322. background-color: #FF9447;
  323. color: #FFFFFF;
  324. }
  325. }
  326. .item2{
  327. background-image: linear-gradient(to right,#E8F2FC,#C3D5ED);
  328. view{
  329. font-size: 26rpx;
  330. padding: 10rpx 20rpx;
  331. background-color: #4AB0FF;
  332. color: #FFFFFF;
  333. }
  334. }
  335. .item3{
  336. background-image: linear-gradient(to right,#F7E9E9,#EAC4C3);
  337. view{
  338. font-size: 26rpx;
  339. padding: 10rpx 20rpx;
  340. background-color: #CF4948;
  341. color: #FFFFFF;
  342. }
  343. }
  344. }
  345. }
  346. .consume{
  347. border-radius: 20rpx;
  348. background-color: #FFFFFF;
  349. padding: 10rpx 10rpx 30rpx;
  350. margin: 20rpx;
  351. .top{
  352. text:first-child{
  353. font-size: 34rpx;
  354. font-weight: 800;
  355. color: #26272F;
  356. }
  357. text:last-child{
  358. padding-top: 10rpx;
  359. font-size: 26rpx;
  360. color: #999999;
  361. }
  362. }
  363. }
  364. .top{
  365. display: flex;
  366. justify-content: space-between;
  367. }
  368. </style>