inline_shop_details.vue 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251
  1. <template>
  2. <view>
  3. <!-- 线上订货详情页 -->
  4. <view class="demo-warter">
  5. <u-swiper height="750" :list="goodsDetails.imageList" image="image"></u-swiper>
  6. <view class="demo-info">
  7. <view class="demo-title">
  8. {{goodsDetails.title}}
  9. </view>
  10. <!-- <view class="demo-price">
  11. {{goodsDetails.price}}元
  12. </view> -->
  13. <!-- <view class="demo-tag">
  14. <view class="demo-tag-owner">
  15. 自营
  16. </view>
  17. <view class="demo-tag-text">
  18. 放心购
  19. </view>
  20. </view> -->
  21. <view class="demo-shop">
  22. 库存:{{goodsDetails.count}}
  23. </view>
  24. <view class="demo-count">
  25. <view class="demo-count-seleced">
  26. 已选:{{selectedCount}}
  27. </view>
  28. <view class="demo-count-box">
  29. <u-number-box v-model="selectedCount" :min="1" @change="selectedCountChange"></u-number-box>
  30. </view>
  31. </view>
  32. </view>
  33. </view>
  34. <u-sticky :enable="tabEnable" :offset-top="tabOffset">
  35. <u-tabs class="tabCustomStyle" :list="tabList" :is-scroll="false" :current="tabCurrent" @change="tabChange"
  36. :bg-color="tabBg"></u-tabs>
  37. </u-sticky>
  38. <!-- 这里装商品和详情的内容 -->
  39. <view style="height: 750px;"></view>
  40. <view class="navigation">
  41. <!-- <view class="left">
  42. <view class="item">
  43. <u-icon name="server-fill" :size="40" :color="$u.color['contentColor']"></u-icon>
  44. <view class="text u-line-1">客服</view>
  45. </view>
  46. <view class="item">
  47. <u-icon name="home" :size="40" :color="$u.color['contentColor']"></u-icon>
  48. <view class="text u-line-1">店铺</view>
  49. </view>
  50. <view class="item car">
  51. <u-badge class="car-num" :count="9" type="error" :offset="[-3, -6]"></u-badge>
  52. <u-icon name="shopping-cart" :size="40" :color="$u.color['contentColor']"></u-icon>
  53. <view class="text u-line-1">购物车</view>
  54. </view>
  55. </view> -->
  56. <view class="right">
  57. <view class="cart btn u-line-1" @click="inShopcar">加入购物车</view>
  58. <view class="buy btn u-line-1">立即购买</view>
  59. </view>
  60. </view>
  61. </view>
  62. </template>
  63. <script>
  64. export default {
  65. data() {
  66. return {
  67. goodsDetails: {
  68. price: 35,
  69. title: '175/70R14 88T XL SH08 BGSL',
  70. count: '100',
  71. image: 'https://img12.360buyimg.com/n7/jfs/t16642/126/2693663818/450163/6879e8ce/5b06d93bN6305bd94.png',
  72. imageList: [{
  73. price: 35,
  74. title: '175/70R14 88T XL SH08 BGSL',
  75. count: '100',
  76. image: 'https://img12.360buyimg.com/n7/jfs/t16642/126/2693663818/450163/6879e8ce/5b06d93bN6305bd94.png',
  77. }, {
  78. price: 35,
  79. title: '175/70R14 88T XL SH08 BGSL',
  80. count: '100',
  81. image: 'https://img12.360buyimg.com/n7/jfs/t1/47645/22/6120/140457/5d3d17deEec9f8e8d/3687ff03ca89b48c.jpg',
  82. }],
  83. },
  84. selectedCount: 0, //选中的商品数量
  85. tabList: [{
  86. name: '商品'
  87. }, {
  88. name: '详情'
  89. }],
  90. tabCurrent: 0,
  91. tabBg: "#ffffff",
  92. tabEnable: false,
  93. tabOffset: 0
  94. }
  95. },
  96. methods: {
  97. selectedCountChange: function() {},
  98. tabChange: function(params) {
  99. this.tabCurrent = params
  100. },
  101. inShopcar(){
  102. this.$u.route({
  103. url: 'pages/home/shopping/shopping_car',
  104. })
  105. }
  106. }
  107. }
  108. </script>
  109. <style lang="scss" scoped>
  110. .demo-warter {
  111. border-radius: 8px;
  112. background-color: #ffffff;
  113. position: relative;
  114. }
  115. .demo-info {
  116. margin: 5px;
  117. padding: 8px;
  118. }
  119. .u-close {
  120. position: absolute;
  121. top: 32rpx;
  122. right: 32rpx;
  123. }
  124. .demo-image {
  125. width: 100%;
  126. border-radius: 4px;
  127. }
  128. .demo-title {
  129. font-size: 30rpx;
  130. margin-top: 5px;
  131. color: $u-main-color;
  132. }
  133. .demo-tag {
  134. display: flex;
  135. margin-top: 5px;
  136. }
  137. .demo-tag-owner {
  138. background-color: $u-type-error;
  139. color: #FFFFFF;
  140. display: flex;
  141. align-items: center;
  142. padding: 4rpx 14rpx;
  143. border-radius: 50rpx;
  144. font-size: 20rpx;
  145. line-height: 1;
  146. }
  147. .demo-tag-text {
  148. border: 1px solid $u-type-primary;
  149. color: $u-type-primary;
  150. margin-left: 10px;
  151. border-radius: 50rpx;
  152. line-height: 1;
  153. padding: 4rpx 14rpx;
  154. display: flex;
  155. align-items: center;
  156. border-radius: 50rpx;
  157. font-size: 20rpx;
  158. }
  159. .demo-price {
  160. font-size: 30rpx;
  161. color: $u-type-error;
  162. margin-top: 5px;
  163. }
  164. .demo-shop {
  165. font-size: 22rpx;
  166. color: $u-tips-color;
  167. margin-top: 5px;
  168. }
  169. .demo-count {
  170. display: flex;
  171. font-size: 22rpx;
  172. margin-top: 5px;
  173. justify-content: space-between;
  174. font-weight: 600;
  175. }
  176. .tabCustomStyle {
  177. border-top: 8rpx solid #EFEFEF;
  178. border-bottom: 8rpx solid #EFEFEF;
  179. }
  180. /* 底部提交栏目 */
  181. .navigation {
  182. display: flex;
  183. width: 100%;
  184. margin-top: 100rpx;
  185. border: solid 2rpx #f2f2f2;
  186. background-color: #ffffff;
  187. padding: 16rpx 26rpx;
  188. position: fixed;
  189. bottom: 0;
  190. z-index: 100;
  191. .left {
  192. display: flex;
  193. font-size: 20rpx;
  194. .item {
  195. margin: 0 30rpx;
  196. &.car {
  197. text-align: center;
  198. position: relative;
  199. .car-num {
  200. position: absolute;
  201. top: -10rpx;
  202. right: -10rpx;
  203. }
  204. }
  205. }
  206. }
  207. .right {
  208. display: flex;
  209. font-size: 28rpx;
  210. align-items: center;
  211. width: 100%;
  212. .btn {
  213. line-height: 66rpx;
  214. padding: 0 30rpx;
  215. border-radius: 36rpx;
  216. color: #ffffff;
  217. text-align: center;
  218. }
  219. .cart {
  220. background-color: #ed3f14;
  221. width: 50%;
  222. margin-right: 30rpx;
  223. }
  224. .buy {
  225. width: 50%;
  226. background-color: #ff7900;
  227. }
  228. }
  229. }
  230. </style>