submitorder.vue 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222
  1. <template>
  2. <view class="">
  3. <u-navbar
  4. title="提交订单"
  5. @leftClick="leftClick"
  6. :autoBack="true"
  7. :safeAreaInsetTop="true"
  8. >
  9. </u-navbar>
  10. <view class="addr page-wrap u-flex u-row-between">
  11. <view class="left">
  12. <view class="top">
  13. <text class="label">默认</text>广东省广州市越秀区
  14. </view>
  15. <view class="center">顶峰路334号腾讯大厦32楼3002号</view>
  16. <view class="bottom">张小娴 185 4568 8877</view>
  17. </view>
  18. <u-icon name="arrow-right" color="#676767" size="20" @click="selectAddr"></u-icon>
  19. </view>
  20. <view class="payway page-wrap u-flex u-row-between">
  21. <view class="left">支付方式</view>
  22. <view class="u-flex">
  23. 微信支付
  24. <u-icon name="arrow-right" color="#676767" size="20"></u-icon>
  25. </view>
  26. </view>
  27. <view class="order-product page-wrap">
  28. </view>
  29. <view class="page-wrap order-reduced">
  30. <view class="reduced-item u-flex u-row-between u-border-bottom">
  31. <view class="left">
  32. <text>优惠券</text>
  33. <text class="label">已选一张</text>
  34. </view>
  35. <view class="right u-flex">
  36. <text class="price red">-¥ <text class="price-num">1000</text></text>
  37. <u-icon name="arrow-right" color="#676767" size="20"></u-icon>
  38. </view>
  39. </view>
  40. <view class="reduced-item integral u-flex u-row-between">
  41. <view class="left">
  42. <text>积分</text>
  43. <text class="num">3676</text>
  44. <text class="tip">满1000可用</text>
  45. </view>
  46. <view class="right u-flex">
  47. <text class="price red" v-if="useIntegral">-¥ <text class="price-num">1000</text></text>
  48. <u-checkbox-group @change="integralCheckboxChange">
  49. <u-checkbox shape="circle" activeColor="#02AB35" name="integral" ></u-checkbox>
  50. </u-checkbox-group>
  51. </view>
  52. </view>
  53. </view>
  54. <view class="page-wrap total">
  55. <view class="total-item u-flex u-row-between u-border-bottom">
  56. <view class="left">
  57. 商品金额
  58. </view>
  59. <view class="right">
  60. ¥2399.00
  61. </view>
  62. </view>
  63. <view class="total-item u-flex u-row-between">
  64. <view class="left">
  65. 运费
  66. <text class="gray">总重:40kg</text>
  67. </view>
  68. <view class="right">
  69. + ¥2399.00
  70. </view>
  71. </view>
  72. </view>
  73. <view class="cart-bottom">
  74. <view class="inner u-flex u-row-between">
  75. <view class="left u-flex">
  76. <view class="total-price">
  77. 待支付:¥4322.00
  78. </view>
  79. </view>
  80. <view class="btn">去结算</view>
  81. </view>
  82. </view>
  83. </view>
  84. </template>
  85. <script>
  86. export default {
  87. data() {
  88. return {
  89. useIntegral:false,
  90. }
  91. },
  92. onLoad(page) {
  93. console.log('page',page);
  94. },
  95. methods: {
  96. leftClick(e){
  97. console.log('leftClick',e);
  98. },
  99. integralCheckboxChange(e){
  100. this.useIntegral = e[0] && e[0] === 'integral' ? true : false;
  101. },
  102. selectAddr(){
  103. uni.$u.route('/pages/center/addrlist', {
  104. from: 'submitorder'
  105. });
  106. }
  107. }
  108. }
  109. </script>
  110. <style>
  111. page{
  112. background-color: #F5F5F5;
  113. /* padding-top: 50px; */
  114. }
  115. </style>
  116. <style lang="scss" scoped>
  117. .page-wrap{
  118. background-color: #fff;
  119. margin-bottom: 20rpx;
  120. }
  121. .addr{
  122. .top{
  123. margin-bottom: 16rpx;
  124. font-size: 26rpx;
  125. color: #999;
  126. .label{
  127. background-color: #FFEBEB;
  128. border: 1px solid #FF5F62;
  129. color: #FF5F62;
  130. padding: 5rpx 20rpx;
  131. border-radius: 30rpx;
  132. margin-right: 10rpx;
  133. }
  134. }
  135. .center{
  136. margin-bottom: 16rpx;
  137. font-size: 36rpx;
  138. color: #333;
  139. line-height: 50rpx;
  140. font-weight: 600;
  141. }
  142. .bottom{
  143. font-size: 30rpx;
  144. color: #666;
  145. }
  146. }
  147. .order-reduced{
  148. .reduced-item{
  149. padding-bottom: 30rpx;
  150. &:not(:last-child){
  151. margin-bottom: 30rpx;
  152. }
  153. .label{
  154. border-radius: 2px;
  155. border: 1px solid #FF3C3F;
  156. margin-left: 20rpx;
  157. font-size: 20rpx;
  158. color: #FF3C3F;
  159. padding: 0 10rpx;
  160. }
  161. }
  162. .integral{
  163. .num{
  164. font-size: 30rpx;
  165. color: #02AB35;
  166. font-weight: 600;
  167. margin-left: 30rpx;
  168. margin-right: 16rpx;
  169. }
  170. .tip{
  171. font-size: 24rpx;
  172. color: #999;
  173. }
  174. .price{
  175. margin-right: 10rpx;
  176. }
  177. }
  178. }
  179. .total{
  180. .total-item{
  181. padding-bottom: 30rpx;
  182. &:not(:last-child){
  183. margin-bottom: 30rpx;
  184. }
  185. .right{
  186. font-weight: 600;
  187. }
  188. }
  189. .gray{
  190. font-size: 24rpx;
  191. margin-left: 15rpx;
  192. }
  193. }
  194. .cart-bottom{
  195. height: 98rpx;
  196. .inner{
  197. position: fixed;
  198. background-color: #fff;
  199. height: 98rpx;
  200. left: 0;
  201. right: 0;
  202. bottom: 0;
  203. padding: 0 20rpx;
  204. .total-price{
  205. font-size: 30rpx;
  206. color: #333;
  207. font-weight: 600;
  208. margin-left: 30rpx;
  209. }
  210. .btn{
  211. height: 80rpx;
  212. line-height: 80rpx;
  213. border-radius: 50rpx;
  214. padding: 0 50rpx;
  215. background-color: #FF3C3F;
  216. color: #fff;
  217. text-align: center;
  218. }
  219. }
  220. }
  221. </style>