getOrder.vue 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303
  1. <template>
  2. <view class="content">
  3. <view class="step">
  4. <uni-steps :options="[{title: '停车'}, {title: '检查'}, {title: '下单'}]" :active="stepIndex" active-color="rgb(255,0,0)"></uni-steps>
  5. </view>
  6. <view class="step-content">
  7. <!-- 停车 -->
  8. <view v-if="stepIndex===0" class="step-item step-one">
  9. <text>请确认车辆是否停到指定位置</text>
  10. <image src="../../static/img/step-one.png" mode="aspectFit"></image>
  11. </view>
  12. <!-- 检查 -->
  13. <view v-if="stepIndex===1" class="step-item step-two">
  14. <view class="item top">
  15. <text>-请完成以下操作-</text>
  16. <image src="../../static/img/cztis.png" mode="aspectFit"></image>
  17. <view class="care">
  18. 注意:洗车过程中禁止移动车辆和上下车
  19. </view>
  20. </view>
  21. <view class="item bottom">
  22. <text>超高加装件不能清洗</text>
  23. <image src="../../static/img/zyts.png" mode="aspectFit"></image>
  24. </view>
  25. </view>
  26. <!-- 下单 -->
  27. <view v-if="stepIndex===2" class="step-item step-three">
  28. <view class="choose">
  29. <view class="title">
  30. 请选择服务模式
  31. </view>
  32. <view class="list">
  33. <view :class="['item', serverIndex==index ?'avtive':'']" @click="chooseItem(index)" v-for="(item,index) in itemList" :key="index">
  34. <text>{{item.name}}</text>
  35. <text class="price">{{item.price}}</text>
  36. </view>
  37. </view>
  38. </view>
  39. <view class="choose-content">
  40. <view class="choose-item">
  41. <view class="item">
  42. <text>优惠卷</text>
  43. <view class="right">
  44. <u-icon name="gift" color="rgb(255,0,0)" size="32"></u-icon>
  45. <text class="coopon">9.8元洗车券(¥-9.8)</text>
  46. <u-icon name="arrow-right" color="rgb(255,0,0)" size="32"></u-icon>
  47. </view>
  48. </view>
  49. <view class="item phone">
  50. <text>手机号码</text>
  51. <view class="right">
  52. <text >18792703003</text>
  53. </view>
  54. </view>
  55. </view>
  56. <view class="read">
  57. <u-radio-group v-model="isRead">
  58. <u-radio shape="square" :disabled="isRead!='read'" name="read" active-color="red" icon-size="28" label-size="28">
  59. 点击阅读并同意
  60. <text>无人洗车</text>
  61. <text>《注意事项及服务协议》</text>
  62. </u-radio>
  63. </u-radio-group>
  64. </view>
  65. </view>
  66. </view>
  67. <view class="step-footer">
  68. <button @click="nextStep" v-if="stepIndex!=2" type="warn">下一步</button>
  69. <view v-else class="pay">
  70. <text>合计:</text>
  71. <text class="amount">¥10:00</text>
  72. <view class="">
  73. <button type="warn">去付款</button>
  74. </view>
  75. </view>
  76. </view>
  77. </view>
  78. </view>
  79. </template>
  80. <script>
  81. import uniSteps from '@/components/uni-steps/uni-steps.vue'
  82. export default {
  83. components: {
  84. uniSteps
  85. },
  86. data() {
  87. return {
  88. stepIndex: 0, // 当前步奏下标
  89. serverIndex: 0, // 选择服务下标
  90. itemList: [ // 服务列表
  91. {
  92. id: 1,
  93. name: '极速快洗',
  94. price: 10
  95. },
  96. {
  97. id: 12,
  98. name: '精致洗',
  99. price: 20
  100. },
  101. {
  102. id: 13,
  103. name: '打蜡洗',
  104. price: 30
  105. }
  106. ],
  107. isRead: '', // 是否同意协议
  108. }
  109. },
  110. onLoad(option) {
  111. },
  112. methods: {
  113. // 选择服务项目
  114. chooseItem(index) {
  115. this.serverIndex = index
  116. },
  117. // 下一步
  118. nextStep() {
  119. this.stepIndex = this.stepIndex===0 ? 1 : 2
  120. }
  121. }
  122. }
  123. </script>
  124. <style lang="scss" scoped>
  125. page{
  126. height: 100%;
  127. }
  128. .content{
  129. width: 100%;
  130. height: 100%;
  131. display: flex;
  132. flex-direction: column;
  133. .step{
  134. padding: 40rpx 0;
  135. }
  136. .step-content{
  137. flex: 1;
  138. width: 100%;
  139. display: flex;
  140. flex-direction: column;
  141. .step-item{
  142. width: 100%;
  143. display: flex;
  144. flex-direction: column;
  145. align-items: center;
  146. flex: 1;
  147. }
  148. .step-one{
  149. text{
  150. color: #999;
  151. margin-top: 40rpx;
  152. margin-bottom: 15%;
  153. }
  154. image{
  155. width: 40%;
  156. height: 60%;
  157. }
  158. }
  159. .step-two{
  160. background-color: #F8F8F8;
  161. .item{
  162. background-color: #fff;
  163. width: 80%;
  164. height: 40%;
  165. display: flex;
  166. flex-direction: column;
  167. align-items: center;
  168. margin-top: 20rpx;
  169. padding-top: 20rpx;
  170. image{
  171. width: 80%;
  172. flex: 1;
  173. }
  174. }
  175. .top{
  176. text{
  177. color: #df928e;
  178. font-size: 24rpx;
  179. margin-bottom: 20rpx;
  180. }
  181. .care{
  182. padding: 10rpx 20rpx;
  183. background-color: #ff805b;
  184. border-radius: 30rpx;
  185. color: #fff;
  186. font-size: 24rpx;
  187. margin-bottom: 10rpx;
  188. }
  189. }
  190. .bottom{
  191. text{
  192. font-size: 24rpx;
  193. color: #333;
  194. }
  195. }
  196. }
  197. .step-three{
  198. .choose{
  199. width: 100%;
  200. height: auto;
  201. padding-bottom: 80rpx;
  202. display: flex;
  203. flex-direction: column;
  204. align-items: center;
  205. border-bottom: 1px solid #eee;
  206. .title{
  207. color: #666;
  208. }
  209. .list{
  210. width: 100%;
  211. display: flex;
  212. justify-content: space-around;
  213. .item{
  214. width: 28%;
  215. height: 180rpx;
  216. display: flex;
  217. flex-direction: column;
  218. align-items: center;
  219. justify-content: center;
  220. border: 1px solid #eee;
  221. border-radius: 30rpx;
  222. margin-top: 30rpx;
  223. color: #999;
  224. }
  225. .avtive{
  226. color: #333;
  227. border-color: rgb(255,0,0);
  228. .price{
  229. color: rgb(255,0,0);
  230. }
  231. }
  232. }
  233. }
  234. .choose-content{
  235. flex: 1;
  236. width: 100%;
  237. .choose-item{
  238. padding-left: 20rpx;
  239. width: 100%;
  240. }
  241. .item{
  242. width: 100%;
  243. height: 100rpx;
  244. display: flex;
  245. align-items: center;
  246. justify-content: space-between;
  247. border-bottom: 1px solid #eee;
  248. .coopon{
  249. color: rgb(255,0,0);
  250. }
  251. }
  252. .phone{
  253. border-bottom: none;
  254. }
  255. .read{
  256. width: 100%;
  257. border-top: 1px solid #eee;
  258. padding-top: 40rpx;
  259. display: flex;
  260. justify-content: center;
  261. text{
  262. color: #999;
  263. }
  264. text:last-child{
  265. color: #ff9ba5;
  266. }
  267. }
  268. }
  269. }
  270. .step-footer{
  271. width: 100%;
  272. height: 100rpx;
  273. background-color: #fff;
  274. .pay{
  275. padding-top: 20rpx;
  276. width: 100%;
  277. height: 100%;
  278. border-top: 1px solid #eee;
  279. display: flex;
  280. align-items: center;
  281. justify-content: flex-end;
  282. .amount{
  283. color: rgb(255,0,0);
  284. font-size: 36rpx;
  285. margin-right: 40rpx;
  286. }
  287. button{
  288. width: 200rpx;
  289. }
  290. }
  291. }
  292. }
  293. }
  294. </style>