Model21.vue 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  1. <template>
  2. <view class="model-21">
  3. <view class="marketing-wrap marketing-wrap-two" :style="{backgroundColor:editablePageConfig.editable_page_config_content.back_color}">
  4. <view class="marketing-box">
  5. <view>
  6. <view class="title title-3" v-if="editablePageConfig.editable_page_config_content['if_show_title_icon']==1" @click="goPresale()">
  7. <view class="title-left">
  8. <image mode="aspectFit" class="img" :src="title_icon">
  9. <!---->
  10. </view>
  11. </view>
  12. </view>
  13. <view class="list-wrap">
  14. <view class="item" v-for="(goods,index) in editablePageConfig.editable_page_config_content.goods_list" :key="index" @click="productClick(goods.goods_id)">
  15. <view class="img-wrap">
  16. <image mode="aspectFit" class="img" :src="goods.goods_image">
  17. </view>
  18. <view class="content">
  19. <view class="content-desc">{{goods.goods_name}}</view>
  20. <view class="content-price">¥
  21. <text class="span">{{parseFloat(goods.goods_promotion_price)}}</text>
  22. </view>
  23. </view>
  24. </view>
  25. </view>
  26. </view>
  27. </view>
  28. </view>
  29. </template>
  30. <script>
  31. import { env } from '../../../../static/config'
  32. export default {
  33. name: 'Model21',
  34. data () {
  35. return {
  36. }
  37. },
  38. props: ['editablePageConfig','editablePage'],
  39. computed: {
  40. title_icon(){
  41. if(this.editablePageConfig.editable_page_config_content['title_icon']){
  42. return this.editablePageConfig.editable_page_config_content['title_icon']
  43. }else{
  44. return env.SITE_URL+'/static/home/images/editable_page/presale_style3_title.png'
  45. }
  46. }
  47. },
  48. methods: {
  49. productClick(goods_id) {
  50. uni.navigateTo({url: '/pages/home/goodsdetail/Goodsdetail?goods_id='+goods_id })
  51. },
  52. goPresale(){
  53. uni.navigateTo({url:'/pages/home/presell/PresellList'})
  54. }
  55. }
  56. }
  57. </script>
  58. <style lang="scss" scoped>
  59. .model-21 .list-wrap {
  60. display: flex;
  61. justify-content: space-between;
  62. margin-top: 15px;
  63. }
  64. .model-21 .list-wrap .item {
  65. display: inline-block;
  66. width: 100px;
  67. }
  68. .model-21 .list-wrap .item .img-wrap{
  69. width: 100px;
  70. height: 100px;
  71. border-radius: 5px;
  72. overflow: hidden;
  73. }
  74. .model-21 .list-wrap .item .img-wrap .img{
  75. max-width: 100%;
  76. max-height: 100%;
  77. }
  78. .model-21 .list-wrap .item .content{
  79. width: 100%;
  80. }
  81. .model-21 .list-wrap .item .content .content-desc {
  82. width: 100%;
  83. font-size: 14px;
  84. line-height: 14px;
  85. margin-top: 10px;
  86. white-space: nowrap;
  87. text-overflow: ellipsis;
  88. overflow: hidden;
  89. }
  90. .model-21 .list-wrap .item .content .content-price {
  91. font-size: 12px;
  92. color: #FF4544;
  93. margin-top: 10px;
  94. height: 16px;
  95. font-weight: 600;
  96. }
  97. .model-21 .list-wrap .item .content .content-price .span {
  98. font-size: 16px;
  99. line-height: 16px;
  100. }
  101. .model-21 .list-wrap .item .content .content-num {
  102. font-size: 12px;
  103. line-height: 12px;
  104. margin-top: 10px;
  105. color: #909399;
  106. }
  107. .model-21 .marketing-wrap-two {
  108. padding: 20px 15px;
  109. box-sizing: border-box;
  110. background-color: #FFFFFF;
  111. border-radius: 5px;
  112. position: relative;
  113. /* height: 255px;
  114. */
  115. }
  116. .model-21 .marketing-wrap-two .marketing-box {
  117. position: unset;
  118. padding: 0;
  119. }
  120. .model-21 .marketing-wrap-two .marketing-box .title {
  121. display: flex;
  122. justify-content: space-between;
  123. align-items: center;
  124. padding-bottom: 5px;
  125. }
  126. .model-21 .marketing-wrap-two .marketing-box .title .title-left {
  127. width: 109px;
  128. height: 37px;
  129. line-height: 37px;
  130. }
  131. .model-21 .marketing-wrap-two .marketing-box .title .title-left .img {
  132. /* width: auto;
  133. max-width: 100%;
  134. max-height: 100%;
  135. */
  136. width: 100%;
  137. height: 100%;
  138. }
  139. .model-21 .marketing-wrap-two .marketing-box .title-3 {
  140. justify-content: center;
  141. }
  142. .model-21 .marketing-wrap-two .marketing-box .title-3 .title-left {
  143. width: 174px;
  144. height: 37px;
  145. text-align: center;
  146. }
  147. .model-21 .marketing-wrap-two .marketing-box .title .title-right {
  148. font-size: 12px;
  149. color: #909399;
  150. }
  151. .model-21 .marketing-wrap-two .marketing-box .title .title-right .i {
  152. font-size: 12px;
  153. }
  154. .model-21 .marketing-wrap-two .list-wrap .item {
  155. width: 95px;
  156. }
  157. .model-21 .marketing-wrap-two .list-wrap .item .content {
  158. position: relative;
  159. }
  160. .model-21 .marketing-wrap-two .list-wrap .item .img-wrap {
  161. width: 95px;
  162. height: 95px;
  163. border-radius: 5px;
  164. overflow: hidden;
  165. position: relative;
  166. }
  167. .model-21 .marketing-wrap-two .list-wrap .item .img-wrap .bg {
  168. position: absolute;
  169. width: 95px;
  170. height: 30px;
  171. bottom: 0;
  172. }
  173. .model-21 .marketing-wrap-two .list-wrap .item .img-wrap .bg .img {
  174. width: 100%;
  175. }
  176. .model-21 .marketing-wrap-two .list-wrap .item .img-wrap .num {
  177. width: 95px;
  178. position: absolute;
  179. bottom: 5px;
  180. padding-left: 10px;
  181. font-size: 12px;
  182. line-height: 1;
  183. color: #FFFFFF;
  184. }
  185. .model-21 .marketing-wrap-two .list-wrap .item .original-price {
  186. font-size: 12px;
  187. color: #909399;
  188. line-height: 1;
  189. margin-top: 10px;
  190. text-decoration: line-through;
  191. }
  192. .model-21 .marketing-wrap-two .list-wrap .item .content-btn {
  193. position: absolute;
  194. right: 0;
  195. bottom: 0;
  196. display: inline-block;
  197. width: 22px;
  198. height: 22px;
  199. line-height: 22px;
  200. text-align: center;
  201. border-radius: 50%;
  202. background-color: #FF4544;
  203. }
  204. .model-21 .marketing-wrap-two .list-wrap .item .content-btn .i {
  205. color: #FFFFFF;
  206. font-size: 13px;
  207. }
  208. </style>