createOrder_info.vue 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485
  1. <template>
  2. <view>
  3. <view class="yt-list">
  4. <view class="yt-list-cell b-b"
  5. v-if="isCoupon&&type!=4"
  6. @click="toggleMask('show')">
  7. <view class="cell-icon">
  8. </view>
  9. <text class="cell-tit clamp">优惠券</text>
  10. <text class="cell-tip active">
  11. {{discountPrice?'-¥':''}}{{discountPrice||'选择优惠券'}}
  12. </text>
  13. <text class="cell-more wanjia wanjia-gengduo-d"></text>
  14. </view>
  15. <!-- <view class="yt-list-cell b-b">
  16. <view class="cell-icon hb">
  17. </view>
  18. <text class="cell-tit clamp">商家促销</text>
  19. <text class="cell-tip disabled">暂无可用优惠</text>
  20. </view> -->
  21. </view>
  22. <!-- 金额明细 -->
  23. <view class="yt-list">
  24. <view class="yt-list-cell b-b">
  25. <text class="cell-tit clamp">商品金额</text>
  26. <text class="cell-tip" v-if="type*1!=4">¥{{productPrice}}</text>
  27. <text class="cell-tip" v-if="type*1==4">{{productPrice}}积分</text>
  28. </view>
  29. <view class="yt-list-cell b-b" v-if="type*1!=4">
  30. <text class="cell-tit clamp">优惠金额</text>
  31. <text class="cell-tip red">-¥{{discountPrice}}</text>
  32. </view>
  33. <view class="yt-list-cell b-b" v-if="type*1!=4">
  34. <text class="cell-tit clamp">运费</text>
  35. <text class="cell-tip">免运费</text>
  36. </view>
  37. <view class="yt-list-cell desc-cell">
  38. <text class="cell-tit clamp">备注</text>
  39. <input class="desc" type="text" v-model="desc"
  40. placeholder="请填写备注信息" placeholder-class="placeholder" />
  41. </view>
  42. </view>
  43. </view>
  44. </template>
  45. <script>
  46. export default{
  47. props:{
  48. productPrice:[String,Number],
  49. discountPrice:[String,Number],
  50. isCoupon:{
  51. type:Boolean,
  52. default:true
  53. },
  54. type:[String,Number]
  55. },
  56. data(){
  57. return{
  58. desc:"",
  59. }
  60. },
  61. methods:{
  62. toggleMask(){
  63. this.$emit("showCoupon","show")
  64. }
  65. }
  66. }
  67. </script>
  68. <style lang="scss">
  69. page {
  70. background: $page-color-base;
  71. padding-bottom: 100rpx;
  72. }
  73. .address-section {
  74. padding: 30rpx 0;
  75. background: #fff;
  76. position: relative;
  77. .order-content {
  78. display: flex;
  79. align-items: center;
  80. }
  81. .iconlocation {
  82. flex-shrink: 0;
  83. display: flex;
  84. align-items: center;
  85. justify-content: center;
  86. width: 90rpx;
  87. color: #888;
  88. font-size: 44rpx;
  89. }
  90. .cen {
  91. display: flex;
  92. flex-direction: column;
  93. flex: 1;
  94. font-size: 28rpx;
  95. color: $font-color-dark;
  96. }
  97. .name {
  98. font-size: 34rpx;
  99. margin-right: 24rpx;
  100. }
  101. .address {
  102. margin-top: 16rpx;
  103. margin-right: 20rpx;
  104. color: $font-color-light;
  105. }
  106. .icon-you {
  107. font-size: 32rpx;
  108. color: $font-color-light;
  109. margin-right: 30rpx;
  110. }
  111. .a-bg {
  112. position: absolute;
  113. left: 0;
  114. bottom: 0;
  115. display: block;
  116. width: 100%;
  117. height: 5rpx;
  118. }
  119. }
  120. .goods-section {
  121. margin-top: 16rpx;
  122. background: #fff;
  123. padding-bottom: 1px;
  124. .g-header {
  125. display: flex;
  126. align-items: center;
  127. height: 84rpx;
  128. padding: 0 30rpx;
  129. position: relative;
  130. }
  131. .logo {
  132. display: block;
  133. width: 50rpx;
  134. height: 50rpx;
  135. border-radius: 100px;
  136. }
  137. .name {
  138. font-size: 30rpx;
  139. color: $font-color-base;
  140. margin-left: 24rpx;
  141. }
  142. .g-item {
  143. display: flex;
  144. margin: 20rpx 30rpx;
  145. image {
  146. flex-shrink: 0;
  147. display: block;
  148. width: 140rpx;
  149. height: 140rpx;
  150. border-radius: 4rpx;
  151. }
  152. .right {
  153. flex: 1;
  154. padding-left: 24rpx;
  155. overflow: hidden;
  156. }
  157. .title {
  158. font-size: 30rpx;
  159. color: $font-color-dark;
  160. }
  161. .spec {
  162. font-size: 26rpx;
  163. color: $font-color-light;
  164. }
  165. .price-box {
  166. display: flex;
  167. align-items: center;
  168. font-size: 32rpx;
  169. color: $font-color-dark;
  170. padding-top: 10rpx;
  171. .price {
  172. margin-bottom: 4rpx;
  173. }
  174. .number{
  175. font-size: 26rpx;
  176. color: $font-color-base;
  177. margin-left: 20rpx;
  178. }
  179. }
  180. .step-box {
  181. position: relative;
  182. }
  183. }
  184. }
  185. .yt-list {
  186. margin-top: 16rpx;
  187. background: #fff;
  188. }
  189. .yt-list-cell {
  190. display: flex;
  191. align-items: center;
  192. padding: 10rpx 30rpx 10rpx 40rpx;
  193. line-height: 70rpx;
  194. position: relative;
  195. &.cell-hover {
  196. background: #fafafa;
  197. }
  198. &.b-b:after {
  199. left: 30rpx;
  200. }
  201. .cell-icon {
  202. height: 32rpx;
  203. width: 32rpx;
  204. font-size: 22rpx;
  205. color: #fff;
  206. text-align: center;
  207. line-height: 32rpx;
  208. background: #f85e52;
  209. border-radius: 4rpx;
  210. margin-right: 12rpx;
  211. &.hb {
  212. background: #ffaa0e;
  213. }
  214. &.lpk {
  215. background: #3ab54a;
  216. }
  217. }
  218. .cell-more {
  219. align-self: center;
  220. font-size: 24rpx;
  221. color: $font-color-light;
  222. margin-left: 8rpx;
  223. margin-right: -10rpx;
  224. }
  225. .cell-tit {
  226. flex: 1;
  227. font-size: 26rpx;
  228. color: $font-color-light;
  229. margin-right: 10rpx;
  230. }
  231. .cell-tip {
  232. font-size: 26rpx;
  233. color: $font-color-dark;
  234. &.disabled {
  235. color: $font-color-light;
  236. }
  237. &.active {
  238. color: $base-color;
  239. }
  240. &.red{
  241. color: $base-color;
  242. }
  243. }
  244. &.desc-cell {
  245. .cell-tit {
  246. max-width: 90rpx;
  247. }
  248. }
  249. .desc {
  250. flex: 1;
  251. font-size: $font-base;
  252. color: $font-color-dark;
  253. }
  254. }
  255. /* 支付列表 */
  256. .pay-list{
  257. padding-left: 40rpx;
  258. margin-top: 16rpx;
  259. background: #fff;
  260. .pay-item{
  261. display: flex;
  262. align-items: center;
  263. padding-right: 20rpx;
  264. line-height: 1;
  265. height: 110rpx;
  266. position: relative;
  267. }
  268. .icon-weixinzhifu{
  269. width: 80rpx;
  270. font-size: 40rpx;
  271. color: #6BCC03;
  272. }
  273. .icon-alipay{
  274. width: 80rpx;
  275. font-size: 40rpx;
  276. color: #06B4FD;
  277. }
  278. .icon-xuanzhong2{
  279. display: flex;
  280. align-items: center;
  281. justify-content: center;
  282. width: 60rpx;
  283. height: 60rpx;
  284. font-size: 40rpx;
  285. color: $base-color;
  286. }
  287. .tit{
  288. font-size: 32rpx;
  289. color: $font-color-dark;
  290. flex: 1;
  291. }
  292. }
  293. .footer{
  294. position: fixed;
  295. left: 0;
  296. bottom: 0;
  297. z-index: 995;
  298. display: flex;
  299. align-items: center;
  300. width: 100%;
  301. height: 90rpx;
  302. justify-content: space-between;
  303. font-size: 30rpx;
  304. background-color: #fff;
  305. z-index: 998;
  306. color: $font-color-base;
  307. box-shadow: 0 -1px 5px rgba(0,0,0,.1);
  308. .price-content{
  309. padding-left: 30rpx;
  310. }
  311. .price-tip{
  312. color: $base-color;
  313. margin-left: 8rpx;
  314. }
  315. .price{
  316. font-size: 36rpx;
  317. color: $base-color;
  318. }
  319. .submit{
  320. display:flex;
  321. align-items:center;
  322. justify-content: center;
  323. width: 280rpx;
  324. height: 100%;
  325. color: #fff;
  326. font-size: 32rpx;
  327. background-color: $base-color;
  328. }
  329. }
  330. /* 优惠券面板 */
  331. .mask{
  332. display: flex;
  333. align-items: flex-end;
  334. position: fixed;
  335. left: 0;
  336. top: var(--window-top);
  337. bottom: 0;
  338. width: 100%;
  339. background: rgba(0,0,0,0);
  340. z-index: 9995;
  341. transition: .3s;
  342. .mask-content{
  343. width: 100%;
  344. min-height: 30vh;
  345. max-height: 70vh;
  346. background: #f3f3f3;
  347. transform: translateY(100%);
  348. transition: .3s;
  349. overflow-y:scroll;
  350. }
  351. &.none{
  352. display: none;
  353. }
  354. &.show{
  355. background: rgba(0,0,0,.4);
  356. .mask-content{
  357. transform: translateY(0);
  358. }
  359. }
  360. }
  361. /* 优惠券列表 */
  362. .coupon-item{
  363. display: flex;
  364. flex-direction: column;
  365. margin: 20rpx 24rpx;
  366. background: #fff;
  367. .con{
  368. display: flex;
  369. align-items: center;
  370. position: relative;
  371. height: 120rpx;
  372. padding: 0 30rpx;
  373. &:after{
  374. position: absolute;
  375. left: 0;
  376. bottom: 0;
  377. content: '';
  378. width: 100%;
  379. height: 0;
  380. border-bottom: 1px dashed #f3f3f3;
  381. transform: scaleY(50%);
  382. }
  383. }
  384. .left{
  385. display: flex;
  386. flex-direction: column;
  387. justify-content: center;
  388. flex: 1;
  389. overflow: hidden;
  390. height: 100rpx;
  391. }
  392. .title{
  393. font-size: 32rpx;
  394. color: $font-color-dark;
  395. margin-bottom: 10rpx;
  396. }
  397. .time{
  398. font-size: 24rpx;
  399. color: $font-color-light;
  400. }
  401. .right{
  402. display: flex;
  403. flex-direction: column;
  404. justify-content: center;
  405. align-items: center;
  406. font-size: 26rpx;
  407. color: $font-color-base;
  408. height: 100rpx;
  409. }
  410. .price{
  411. font-size: 44rpx;
  412. color: $base-color;
  413. &:before{
  414. content: '¥';
  415. font-size: 34rpx;
  416. }
  417. }
  418. .tips{
  419. font-size: 24rpx;
  420. color: $font-color-light;
  421. line-height: 60rpx;
  422. padding-left: 30rpx;
  423. }
  424. .circle{
  425. position: absolute;
  426. left: -6rpx;
  427. bottom: -10rpx;
  428. z-index: 10;
  429. width: 20rpx;
  430. height: 20rpx;
  431. background: #f3f3f3;
  432. border-radius: 100px;
  433. &.r{
  434. left: auto;
  435. right: -6rpx;
  436. }
  437. }
  438. }
  439. </style>