exchangeCoupon.vue 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. <template name="alert">
  2. <view class="alert spec" :class="specClass">
  3. <!-- 运费弹窗说明 -->
  4. <view class="coupon-popup">
  5. <view class="content">
  6. <view class="title">
  7. <text>兑换优惠券</text>
  8. <text class="iconfont icon-iconfontguanbi" @click.stop="hidePopup"></text>
  9. </view>
  10. <view class="text-content">
  11. <view class="coupon-input">
  12. <input class="input" type="text" v-model="params.couponCode" maxlength="16" placeholder="请输入16位兑换码"/>
  13. </view>
  14. <view class="coupon-main">
  15. <view class="coupon-button" @click="exchangeConfirm">立即兑换</view>
  16. <view class="coupon-text">
  17. <view class="coupon-h1">注意事项:</view>
  18. <view class="coupon-h2">1. 兑换码获取:可通过采美线下发放或者销售顾问</view>
  19. <view class="coupon-h2 indet">线上发放获得优惠券兑换码,兑换码由16位数字</view>
  20. <view class="coupon-h2 indet">和字母组成。</view>
  21. <view class="coupon-h2">2. 兑换码使用:在当前页面输入兑换码即可兑换相</view>
  22. <view class="coupon-h2 indet">应优惠券一个兑换码只能兑换一张优惠券,</view>
  23. <view class="coupon-h2 indet">不可重复使用。</view>
  24. <view class="coupon-h2">3. 输入兑换码时请区分字母大小写。</view>
  25. </view>
  26. </view>
  27. </view>
  28. </view>
  29. </view>
  30. </view>
  31. </template>
  32. <script>
  33. export default{
  34. name:'alert',
  35. props:{},
  36. data() {
  37. return{
  38. params:{
  39. couponCode:'',
  40. },
  41. }
  42. },
  43. created() {
  44. },
  45. onLoad(){
  46. },
  47. methods:{
  48. exchangeConfirm(){
  49. if( this.params.couponCode == ''){
  50. this.$util.msg('请输入位兑换码',2000)
  51. return
  52. }
  53. },
  54. hidePopup(){
  55. this.$parent.isExchangePopup = false
  56. },
  57. },
  58. onShow(){
  59. }
  60. }
  61. </script>
  62. <style lang="scss">
  63. /*弹窗*/
  64. .model-warp.none{
  65. display: none;
  66. }
  67. .model-warp.show{
  68. display: block;
  69. }
  70. .coupon-popup{
  71. width: 100%;
  72. height: 100%;
  73. background: rgba(0,0,0,.5);
  74. position: fixed;
  75. top: 0;
  76. left: 0;
  77. z-index: 8888;
  78. transition: all 0.4s;
  79. &.none{
  80. display: none;
  81. }
  82. &.show{
  83. display: block;
  84. }
  85. .content{
  86. width: 580rpx;
  87. height: 700rpx;
  88. position: absolute;
  89. background: $bg-color;
  90. left: 0;
  91. right: 0;
  92. bottom: 0;
  93. top: 0;
  94. margin: auto;
  95. padding: 20rpx 25rpx;
  96. border-radius: 12rpx;
  97. .title{
  98. width: 100%;
  99. height: 68rpx;
  100. line-height: 68rpx;
  101. font-size: $font-size-28;
  102. color: $text-color;
  103. text-align: center;
  104. margin-bottom: 32rpx;
  105. position: relative;
  106. font-weight: bold;
  107. .icon-iconfontguanbi{
  108. width: 68rpx;
  109. height: 68rpx;
  110. text-align: center;
  111. line-height: 68rpx;
  112. position: absolute;
  113. right: 0;
  114. top: 0;
  115. font-size: $font-size-36;
  116. color: #999999;
  117. }
  118. }
  119. .text-content{
  120. width: 100%;
  121. height: auto;
  122. .coupon-input{
  123. width: 100%;
  124. height: auto;
  125. margin-bottom: 48rpx;
  126. .input{
  127. width: 100%;
  128. height: 66rpx;
  129. box-sizing: border-box;
  130. border: 1px solid #e2e2e2;
  131. line-height: 66rpx;
  132. padding: 0 20rpx;
  133. font-size: $font-size-26;
  134. color: #b2b2b2;
  135. border-radius: 2rpx;
  136. }
  137. }
  138. .coupon-main{
  139. width: 100%;
  140. height: auto;
  141. box-sizing: border-box;
  142. .coupon-button{
  143. width: 520rpx;
  144. height: 84rpx;
  145. margin: 0 auto;
  146. border-radius: 50rpx;
  147. line-height: 84rpx;
  148. text-align: center;
  149. background: $btn-confirm;
  150. color: #FFFFFF;
  151. font-size: $font-size-30;
  152. }
  153. .coupon-text{
  154. width: 100%;
  155. box-sizing: border-box;
  156. padding: 0 20rpx;
  157. margin-top: 40rpx;
  158. line-height: 44rpx;
  159. text-align: justify;
  160. font-size: $font-size-24;
  161. .coupon-h1{
  162. color: #333333;
  163. }
  164. .coupon-h2{
  165. color: #999999;
  166. &.indet{
  167. text-indent: 28rpx;
  168. }
  169. }
  170. }
  171. }
  172. }
  173. .btn{
  174. width: 100%;
  175. height: 88rpx;
  176. float: left;
  177. background: $btn-confirm;
  178. line-height: 88rpx;
  179. font-size: $font-size-28;
  180. text-align: center;
  181. color: #FFFFFF;
  182. border-radius: 0;
  183. padding: 0;
  184. margin-top: 2rpx;
  185. }
  186. }
  187. }
  188. </style>