foot_goods_coupon.vue 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303
  1. <template>
  2. <FootDialog title="领取优惠券" titleClass="title-center" :isRadius="true" :isCloseBtn="true" :visible.sync="dialogShow" :zIndex="300">
  3. <scroll-view scroll-y slot="main" class="choose-list-wrap">
  4. <block v-for="(item,index) in dataList" :key="index">
  5. <view class="choose-item">
  6. <view class="dt-voucher">
  7. <!-- <block v-if="!isEnable">
  8. <image v-if="item.status==1" class="outdate" src="http://139.9.103.171:1888/img/image/voucher_outdate.png" mode="widthFix"></image>
  9. <image v-if="item.status==2" class="used" src="http://139.9.103.171:1888/img/image/voucher_used.png" mode="widthFix"></image>
  10. </block>
  11. <block v-else> -->
  12. <!-- receive -->
  13. <image v-if="!item.isReceive" class="unreceive" src="http://139.9.103.171:1888/img/image/idthFix"></image>
  14. <!-- </block> -->
  15. <!-- border -->
  16. <image class="bg-top-border" :src="borderSrc" mode="widthFix"></image>
  17. <view class="mn-wrap">
  18. <view class="left">
  19. <block v-if="item.voucher_type == 1">
  20. <view class="worth">6.8<text class="suffix">折</text></view>
  21. <view class="type-name">折扣券</view>
  22. </block>
  23. <block v-else>
  24. <view class="worth"><text class="prefix">¥</text>{{item.amt}}</view>
  25. <view class="type-name">抵价券</view>
  26. </block>
  27. </view>
  28. <view class="mid">
  29. <view class="apply-to-name fn-text-row-two">{{item.name}}</view>
  30. <view v-if="item.minimumPrice>0" class="apply-condition">满 {{item.minimumPrice}} 元可使用</view>
  31. </view>
  32. <view class="right">
  33. <button v-if="item.isReceive" class="dt-btn-submit get-btn disabled-btn">已领取</button>
  34. <button v-else class="dt-btn-submit get-btn" @tap="onRecieve(item)">立即领取</button>
  35. </view>
  36. </view>
  37. <view class="ft-wrap">
  38. <view class="ft" @tap="onVisible($event,index)">
  39. <view class="des">
  40. <text>详细信息</text>
  41. <image class="arrow-up" :class="{ 'active':!item.isShowDetail }" src="http://139.9.103.171:1888/img/image/arrow_up.png" mode="widthFix"></image>
  42. </view>
  43. <view class="date">{{ item.beginDate| dateFormat('yyyy-MM-dd') }} 至 {{ item.endDate| dateFormat('yyyy-MM-dd') }}</view>
  44. </view>
  45. </view>
  46. <view v-if="item.isShowDetail" class="ext-wrap"><text v-if="item.minimumPrice>0">满{{item.minimumPrice}}元可使用;</text>不可叠加使用</view>
  47. </view>
  48. </view>
  49. </block>
  50. <view class="coupon_height"></view>
  51. </scroll-view>
  52. </FootDialog>
  53. </template>
  54. <script>
  55. import FootDialog from "./foot_dialog.vue";
  56. export default {
  57. components: {
  58. FootDialog
  59. },
  60. props: {
  61. dataList: {
  62. type: Array,
  63. default: () => {
  64. return [] // [{label:'选项',value:1}]
  65. }
  66. },
  67. type: {
  68. type: Number,
  69. default: -1,
  70. }
  71. },
  72. data() {
  73. return {
  74. dialogShow: false
  75. };
  76. },
  77. methods: {
  78. show() {
  79. this.dialogShow = true;
  80. },
  81. hide() {
  82. this.dialogShow = false;
  83. },
  84. //查看详情
  85. onVisible(ev, idx) {
  86. this.$emit('visible', ev, idx)
  87. },
  88. // 领取优惠券
  89. onRecieve(item) {
  90. this.$emit('receive', item)
  91. },
  92. },
  93. };
  94. </script>
  95. <style lang="scss">
  96. .choose-list-wrap {
  97. display: flex;
  98. flex-direction: column;
  99. align-items: center;
  100. justify-content: center;
  101. height: 740upx;
  102. border-top: 2upx solid #f2f2f2;
  103. background-color: #f2f2f2;
  104. .choose-item {
  105. width: 690upx;
  106. margin: 20upx auto 0;
  107. }
  108. .coupon_height {
  109. height: 20upx;
  110. }
  111. .fn-text-row-two {
  112. display: -webkit-box !important;
  113. -webkit-box-orient: vertical !important;
  114. -webkit-line-clamp: 2 !important;
  115. overflow: hidden !important;
  116. text-overflow: ellipsis !important;
  117. }
  118. .dt-voucher {
  119. position: relative;
  120. display: flex;
  121. flex-wrap: wrap;
  122. width: 690upx;
  123. // min-height:220upx;
  124. box-sizing: border-box;
  125. border-radius: 10upx;
  126. font-size: 28upx;
  127. background-color: #fff;
  128. .dis-able {
  129. color: #999 !important;
  130. }
  131. .unreceive {
  132. position: absolute;
  133. top: 0;
  134. left: 0;
  135. width: 90upx;
  136. height: 90upx;
  137. }
  138. .outdate,
  139. .used {
  140. position: absolute;
  141. top: 0;
  142. right: 0;
  143. width: 165upx;
  144. height: 86upx;
  145. }
  146. .bg-top-border {
  147. width: 100%;
  148. height: 15upx;
  149. }
  150. .mn-wrap {
  151. display: flex;
  152. width: 100%;
  153. height: 154upx;
  154. margin: 0 30upx;
  155. .left {
  156. display: flex;
  157. flex-direction: column;
  158. justify-content: center;
  159. align-items: center;
  160. min-width: 136upx;
  161. font-size: 22upx;
  162. color: #ff7171;
  163. .worth {
  164. font-size: 60upx;
  165. line-height: 1;
  166. .prefix {
  167. font-size: 30upx;
  168. }
  169. .suffix {
  170. font-size: 24upx;
  171. }
  172. }
  173. .type-name {
  174. text-align: center;
  175. }
  176. }
  177. .mid {
  178. flex: 1;
  179. display: flex;
  180. flex-direction: column;
  181. justify-content: center;
  182. margin: 0 30upx;
  183. .apply-to-name {
  184. max-height: 61upx;
  185. font-size: 26upx;
  186. line-height: 1.2;
  187. color: #333;
  188. }
  189. .apply-condition {
  190. padding-top: 20upx;
  191. color: #666666;
  192. font-size: 22upx;
  193. }
  194. }
  195. .get-btn {
  196. margin: 47upx 0;
  197. width: 160upx;
  198. height: 60upx;
  199. line-height: 60upx;
  200. border-radius: 6upx;
  201. font-size: 28upx;
  202. font-weight: 400;
  203. padding: 0;
  204. background-color: #ff7171;
  205. color: #fff;
  206. }
  207. .disabled-btn{
  208. background-color:#ccc;
  209. }
  210. }
  211. .ft-wrap {
  212. position: relative;
  213. display: flex;
  214. flex-wrap: wrap;
  215. width: 100%;
  216. margin: 0 30upx;
  217. color: #666;
  218. .ft {
  219. position: relative;
  220. display: flex;
  221. justify-content: space-between;
  222. width: 100%;
  223. height: 50upx;
  224. line-height: 50upx;
  225. font-size: 20upx;
  226. .des {
  227. .arrow-up {
  228. margin-left: 10upx;
  229. width: 18upx;
  230. height: 9upx;
  231. }
  232. .arrow-up.active {
  233. transform: rotate(180deg);
  234. }
  235. }
  236. }
  237. .ft:before {
  238. position: absolute;
  239. top: 0;
  240. left: 0;
  241. width: 100%;
  242. height: 1upx;
  243. border-top: 1upx dashed #cccccc;
  244. content: "";
  245. }
  246. }
  247. .ft-wrap:before,
  248. .ft-wrap:after {
  249. position: absolute;
  250. top: -14upx;
  251. width: 28upx;
  252. height: 28upx;
  253. border-radius: 50%;
  254. background-color: #f2f2f2;
  255. content: "";
  256. }
  257. .ft-wrap:before {
  258. left: -44upx;
  259. }
  260. .ft-wrap:after {
  261. right: -44upx;
  262. }
  263. .ext-wrap {
  264. padding: 0 30upx 20upx;
  265. width: 100%;
  266. color: #999;
  267. font-size: 20upx;
  268. }
  269. }
  270. }
  271. </style>