createOrder_product.vue 7.7 KB

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