cart.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. <template>
  2. <view style="height: 100vh;background-color: #F5F5F5;">
  3. <view style="height:50upx"></view>
  4. <uniNavBar
  5. left-icon="back" title="购物车"
  6. rightText="编辑"
  7. @clickLeft="goback"
  8. @clickRight = "deleteShop"
  9. />
  10. <view class="cart-list">
  11. <view style="display: flex;align-items: center;padding: 20upx 36upx;
  12. border-bottom: 1px solid #F5F5F5;
  13. ">
  14. <image src="" style="width: 50upx;height: 50upx;"></image>
  15. <span style="padding-left: 8upx;">华南酒店</span>
  16. </view>
  17. <view class="shoplist" style="background-color: #fff;">
  18. <view style="flex: 1;">
  19. <van-checkbox icon-size="16px" checked-color="#D9332E" shape="round" bind:change="onChange">
  20. </van-checkbox>
  21. </view>
  22. <view style="flex: 15;">
  23. <van-card
  24. title-class="changewidth"
  25. price-class ="priceClass"
  26. price="10.00"
  27. desc="描述信息"
  28. title="商品标题"
  29. thumb="https://gd3.alicdn.com/imgextra/i3/0/O1CN01IiyFQI1UGShoFKt1O_!!0-item_pic.jpg_400x400.jpg"
  30. >
  31. <!-- <view slot="thumb">
  32. <image style="width: 156upx;height:" src="https://gd3.alicdn.com/imgextra/i3/0/O1CN01IiyFQI1UGShoFKt1O_!!0-item_pic.jpg_400x400.jpg"></image>
  33. </view> -->
  34. <view slot="footer">
  35. <uninumberbox :min="1" @change="bindChange"/>
  36. </view>
  37. </van-card>
  38. </view>
  39. </view>
  40. </view>
  41. <view style="position: fixed;bottom: 0;">
  42. <van-submit-bar
  43. :price="3050"
  44. button-text="结算"
  45. bind:submit="onClickButton"
  46. :tip="true"
  47. >
  48. <van-checkbox checked-color="#D9332E" :value="checked" shape="round" bind:change="onChange">
  49. 全选
  50. </van-checkbox>
  51. </van-submit-bar>
  52. </view>
  53. </view>
  54. </template>
  55. <script>
  56. import uniNavBar from '@/component/uni-nav-bar/uni-nav-bar.vue'
  57. import uninumberbox from '@/component/uinNumber.vue'
  58. export default {
  59. components: {
  60. uniNavBar,
  61. uninumberbox
  62. },
  63. data() {
  64. return {
  65. checked: true,
  66. }
  67. },
  68. onReady:function(){
  69. uni.hideShareMenu({
  70. success(res) {
  71. console.log(res)
  72. console.log("kkkkkkkkkkkk")
  73. },
  74. fail(res){
  75. console.log(res)
  76. console.log("dddddd")
  77. }
  78. });
  79. },
  80. methods: {
  81. // 返回上层
  82. goback() {
  83. console.log("kkdkdk")
  84. uni.navigateBack();
  85. },
  86. // 编辑
  87. deleteShop() {
  88. },
  89. bindChange(e) {
  90. console.log(e)
  91. },
  92. }
  93. }
  94. </script>
  95. <style>
  96. /* .uni-navbar {
  97. height: var(--status-bar-height);
  98. } */
  99. .uniNavBar {
  100. height: 100%;
  101. }
  102. .cart-list {
  103. background-color: #fff;
  104. /* padding: 0 36upx; */
  105. }
  106. .changewidth {
  107. color: #303133;
  108. font-size: 32upx;
  109. font-weight: 100!important;
  110. }
  111. .priceClass {
  112. color:#303133!important;
  113. font-weight: 100!important;
  114. font-size: 36upx;
  115. }
  116. .van-card {
  117. background-color: #fff!important;
  118. }
  119. .shoplist {
  120. display: flex;
  121. padding: 0 35upx;
  122. justify-content: space-between;
  123. align-items: center;
  124. }
  125. </style>