integral_mall_goods_details.vue 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257
  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" @click="handleGoConfirm">立即兑换</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: 'integral-mall/integral_mall_car',
  104. })
  105. },
  106. handleGoConfirm: function(){
  107. uni.navigateTo({
  108. url: "/pages/home/integral-mall/integral_mall_confirmorder"
  109. })
  110. },
  111. }
  112. }
  113. </script>
  114. <style lang="scss" scoped>
  115. .demo-warter {
  116. border-radius: 8px;
  117. background-color: #ffffff;
  118. position: relative;
  119. }
  120. .demo-info {
  121. margin: 5px;
  122. padding: 8px;
  123. }
  124. .u-close {
  125. position: absolute;
  126. top: 32rpx;
  127. right: 32rpx;
  128. }
  129. .demo-image {
  130. width: 100%;
  131. border-radius: 4px;
  132. }
  133. .demo-title {
  134. font-size: 30rpx;
  135. margin-top: 5px;
  136. color: $u-main-color;
  137. }
  138. .demo-tag {
  139. display: flex;
  140. margin-top: 5px;
  141. }
  142. .demo-tag-owner {
  143. background-color: $u-type-error;
  144. color: #FFFFFF;
  145. display: flex;
  146. align-items: center;
  147. padding: 4rpx 14rpx;
  148. border-radius: 50rpx;
  149. font-size: 20rpx;
  150. line-height: 1;
  151. }
  152. .demo-tag-text {
  153. border: 1px solid $u-type-primary;
  154. color: $u-type-primary;
  155. margin-left: 10px;
  156. border-radius: 50rpx;
  157. line-height: 1;
  158. padding: 4rpx 14rpx;
  159. display: flex;
  160. align-items: center;
  161. border-radius: 50rpx;
  162. font-size: 20rpx;
  163. }
  164. .demo-price {
  165. font-size: 30rpx;
  166. color: $u-type-error;
  167. margin-top: 5px;
  168. }
  169. .demo-shop {
  170. font-size: 22rpx;
  171. color: $u-tips-color;
  172. margin-top: 5px;
  173. }
  174. .demo-count {
  175. display: flex;
  176. font-size: 22rpx;
  177. margin-top: 5px;
  178. justify-content: space-between;
  179. font-weight: 600;
  180. }
  181. .tabCustomStyle {
  182. border-top: 8rpx solid #EFEFEF;
  183. border-bottom: 8rpx solid #EFEFEF;
  184. }
  185. /* 底部提交栏目 */
  186. .navigation {
  187. display: flex;
  188. width: 100%;
  189. margin-top: 100rpx;
  190. border: solid 2rpx #f2f2f2;
  191. background-color: #ffffff;
  192. padding: 16rpx 26rpx;
  193. position: fixed;
  194. bottom: 0;
  195. z-index: 100;
  196. .left {
  197. display: flex;
  198. font-size: 20rpx;
  199. .item {
  200. margin: 0 30rpx;
  201. &.car {
  202. text-align: center;
  203. position: relative;
  204. .car-num {
  205. position: absolute;
  206. top: -10rpx;
  207. right: -10rpx;
  208. }
  209. }
  210. }
  211. }
  212. .right {
  213. display: flex;
  214. font-size: 28rpx;
  215. align-items: center;
  216. width: 100%;
  217. .btn {
  218. line-height: 66rpx;
  219. padding: 0 30rpx;
  220. border-radius: 36rpx;
  221. color: #ffffff;
  222. text-align: center;
  223. }
  224. .cart {
  225. background-color: #ed3f14;
  226. width: 50%;
  227. margin-right: 30rpx;
  228. }
  229. .buy {
  230. width: 50%;
  231. background-color: #ff7900;
  232. }
  233. }
  234. }
  235. </style>