specs_1.vue 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359
  1. <template>
  2. <view class="specs">
  3. <!-- 规格 -->
  4. <view class="specs_1" v-if="popupShow=='1'">
  5. 111
  6. </view>
  7. <view class="specs_2" v-else-if="popupShow=='2'">
  8. 222
  9. </view>
  10. <view class="specs_3" v-else>
  11. 333
  12. </view>
  13. </view>
  14. <!-- <view class="info_3" v-else-if="popupShow=='2'">
  15. <scroll-view scroll-y="true" class="scroll-view">
  16. <view class="list" v-for="(item,index) in info.act" :key="index">
  17. <view class="list_1" @tap="toAct(item)">
  18. <view class="title_1">
  19. <view class="l">
  20. <text>{{item.tag||'暂无'}}</text>{{item.act_time.title}}
  21. </view>
  22. <view class="r">
  23. <text class="iconfont icon-jiantouyou"></text>
  24. </view>
  25. </view>
  26. <view class="title_2">
  27. <view class="text" v-if="item.type=='5'||item.type=='6'">{{item.text}}</view>
  28. <view class="time">{{item.config.time_start}}-{{item.config.time_end}}</view>
  29. </view>
  30. <view class="title_2" v-if="item.type=='2'">
  31. <view class="specList" v-for="(tag,indexx) in item.list" :key="indexx">
  32. <view class="name">规格:{{tag.spec_name}}</view>
  33. <view class="giftList" v-for="(tags,indexs) in tag.gift" :key="indexs"
  34. @tap.stop="tags.type=='0' && getDetail(tags)">
  35. <view class="left">
  36. <view class="goods">{{tags.goods_name}}{{tags.spec_name}}</view>
  37. <view class="goods">{{tags.desc}}</view>
  38. <view class="num">×{{tags.num}}</view>
  39. </view>
  40. <view class="right"><text class="iconfont icon-jiantouyou"></text>
  41. </view>
  42. </view>
  43. </view>
  44. </view>
  45. </view>
  46. </view>
  47. </scroll-view>
  48. </view>
  49. <view class="info_4" v-else>
  50. <view class="info_4">
  51. <scroll-view scroll-y="true" class="scroll-view">
  52. <view class="list-scroll-view">
  53. <view class="list" v-for="(item,index) in info.sets" :key="index">
  54. <view class="name"><text class="set">套装</text>{{item.name}}</view>
  55. <view class="set">
  56. <view class="set_1" v-for="(tag,indexx) in item.set" :key="indexx"
  57. @tap="toDeatil(tag)">
  58. <image class="image" :src="tag.file&&tag.file.length>0?tag.file[0].url:''"
  59. mode="aspectFit">
  60. </image>
  61. <view class="goods textOver">{{tag.goods_name}}</view>
  62. <view class="spec textOver">{{tag.spec_name}}</view>
  63. </view>
  64. </view>
  65. <view class="bottom">
  66. <view class="money">
  67. 共{{item.goods_total||0}}件,套装价:<text>¥{{item.sell_money||0}}</text>
  68. </view>
  69. <view class="add">
  70. <button size="mini" @tap="toSetMarket(item)">加入购物车</button>
  71. </view>
  72. </view>
  73. </view>
  74. </view>
  75. </scroll-view>
  76. </view>
  77. </view> -->
  78. <!-- <view class="dialog" v-if="dialog.show==true" @tap="dialogClose">
  79. <view class="dialog_1" v-if="dialog.type=='1'">
  80. <swiper class="swiper" circular @change="diaSpecs" :current="is_specs">
  81. <swiper-item class="list" v-for="(item,index) in info.specs" :key="index">
  82. <view class="list_1">
  83. <image class="image"
  84. :src="item.file&&item.file.length>0?item.file[0].url:info.goods.file[0].url"
  85. mode="aspectFit"></image>
  86. </view>
  87. <view class="name">
  88. <text>{{item.name}}</text>
  89. </view>
  90. </swiper-item>
  91. </swiper>
  92. </view>
  93. </view> -->
  94. </template>
  95. <script>
  96. export default {
  97. props: {
  98. goodsInfo: {
  99. type: Object,
  100. },
  101. specsInfo: {
  102. type: Object,
  103. },
  104. btn_type: {
  105. type: String
  106. },
  107. popupShow: {
  108. type: String
  109. },
  110. is_specs: {
  111. type: Number
  112. },
  113. },
  114. data() {
  115. return {
  116. // 商品图片
  117. goodsfileList: [],
  118. // 规格图片
  119. specfileList: [],
  120. };
  121. },
  122. methods: {
  123. diaView() {
  124. const that = this;
  125. that.$emit('diaView')
  126. },
  127. toSpecs(item) {
  128. const that = this;
  129. that.$emit('diaView', item)
  130. },
  131. toCount() {
  132. const that = this;
  133. that.$emit('toCount')
  134. },
  135. toMarket() {
  136. const that = this;
  137. that.$emit('toMarket')
  138. },
  139. toBuy() {
  140. const that = this;
  141. that.$emit('toBuy')
  142. },
  143. toGroup() {
  144. const that = this;
  145. that.$emit('toGroup')
  146. },
  147. toAct(item) {
  148. const that = this;
  149. that.$emit('toAct', item)
  150. },
  151. getDetail(item) {
  152. const that = this;
  153. that.$emit('getDetail', item)
  154. },
  155. toSetMarket(item) {
  156. const that = this;
  157. that.$emit('toSetMarket', item)
  158. },
  159. },
  160. watch: {
  161. specsInfo: {
  162. deep: true,
  163. immediate: true,
  164. handler(val) {
  165. if (val && val.file.length > 0) this.$set(this, `specfileList`, val.file)
  166. }
  167. },
  168. goodsInfo: {
  169. deep: true,
  170. immediate: true,
  171. handler(val) {
  172. if (val && val.file.length > 0) this.$set(this, `goodsfileList`, val.file)
  173. }
  174. }
  175. },
  176. }
  177. </script>
  178. <style lang="scss">
  179. .specs {
  180. .specs_1 {
  181. position: relative;
  182. display: flex;
  183. flex-direction: column;
  184. height: 54vh;
  185. .info_1 {
  186. position: relative;
  187. flex-grow: 1;
  188. .one {
  189. padding: 2vw;
  190. .one_1 {
  191. display: flex;
  192. margin: 0 0 2vw 0;
  193. padding: 0 0 2vw 0;
  194. border-bottom: 0.5vw solid var(--f9Color);
  195. .l {
  196. width: 25vw;
  197. height: 25vw;
  198. .image {
  199. width: 100%;
  200. height: 100%;
  201. border-radius: 5px;
  202. }
  203. }
  204. .r {
  205. width: 70vw;
  206. padding: 0 0 0 2vw;
  207. .money {
  208. margin: 0 0 2vw 0;
  209. .money_2 {
  210. color: #23B67A;
  211. font-size: 20px;
  212. padding: 0 1vw 0 0;
  213. font-weight: bold;
  214. text {
  215. font-size: 14px;
  216. }
  217. }
  218. .money_1 {
  219. font-size: 20px;
  220. color: #ff0000;
  221. padding: 0 2vw 0 0;
  222. text {
  223. font-size: 14px;
  224. }
  225. }
  226. .money_1:last-child {
  227. font-size: 16px;
  228. color: #858585;
  229. text-decoration: line-through;
  230. }
  231. }
  232. .other_1 {
  233. font-size: 15px;
  234. color: #858585;
  235. text:last-child {
  236. color: #000000;
  237. }
  238. }
  239. }
  240. }
  241. .one_2 {
  242. margin: 0 0 2vw 0;
  243. border-bottom: 0.5vw solid var(--f9Color);
  244. .one_2_1 {
  245. font-size: 14px;
  246. margin: 0 0 2vw 0;
  247. }
  248. .one_2_2 {
  249. display: flex;
  250. flex-wrap: wrap;
  251. .list {
  252. background-color: #F5F5F5;
  253. margin: 0 2vw 2vw 0;
  254. padding: 0.5vw 1vw;
  255. border-radius: 5px;
  256. text {
  257. font-size: 14px;
  258. color: #000;
  259. }
  260. }
  261. .huilist {
  262. background-color: #DCDCDC;
  263. text {
  264. color: #858585;
  265. }
  266. }
  267. .redlist {
  268. background-color: #ff0000;
  269. text {
  270. color: #ffffff;
  271. }
  272. }
  273. .huiilist {
  274. background-color: #808080;
  275. text {
  276. color: #cccccc;
  277. }
  278. }
  279. }
  280. }
  281. .one_3 {
  282. display: flex;
  283. .one_3_1 {
  284. margin: 0 2vw 0 0;
  285. text {
  286. font-size: 14px;
  287. color: #858585;
  288. }
  289. .limit {
  290. color: #ff0000;
  291. padding: 0 0 0 2vw;
  292. }
  293. }
  294. }
  295. }
  296. }
  297. .info_2 {
  298. display: flex;
  299. text-align: center;
  300. justify-content: space-between;
  301. .btns {
  302. width: 50vw;
  303. }
  304. .btn {
  305. width: 100vw;
  306. }
  307. button {
  308. width: 100%;
  309. border-radius: 0;
  310. background-color: var(--fFB1Color);
  311. color: #fff;
  312. border: 1px solid #f1f1f1;
  313. }
  314. .btncolor {
  315. background: #f1f1f1;
  316. color: #858585;
  317. }
  318. }
  319. }
  320. }
  321. </style>