金诚优选前端代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

113 lines
3.1 KiB

  1. <template>
  2. <!--打call-->
  3. <view class="seckill-box" :style="'margin-bottom: ' + meta.margin_bottom + 'px'">
  4. <view class="title " data-src="/pages/store/callList/callList" @tap="_jumpImg">
  5. <span>打Call免费领</span>
  6. <span>更多
  7. <text class="iconfont icon-gengduo"></text>
  8. </span>
  9. </view>
  10. <view v-for="(item, index) in callData" :key="index" >
  11. <view class="seckill-info" :data-goods="item.associate.goods.id" :data-id="item.associate_id" @tap="_jumpCall">
  12. <view class="left">
  13. <image :src="item.associate.img"></image>
  14. </view>
  15. <view class="right">
  16. <view class="goods-name">
  17. {{item.associate.label}}
  18. </view>
  19. <view class="price-box free-money">
  20. <view class="money">
  21. <text class="new">{{item.associate.goods.sell_price}}</text>
  22. <text class="old">{{item.associate.goods.market_price}}</text>
  23. </view>
  24. <view class="nun">
  25. 限量{{item.associate.limit}}
  26. </view>
  27. </view>
  28. <view class="seckill-time">
  29. <view v-if="item.associate.activity_status == 'NoBegin'">
  30. <seckill :end="item.associate.ends_at" typename="集call" :starts="item.associate.starts_at" :server="server" mold="index"></seckill>
  31. </view>
  32. <view class="free" v-else>
  33. 集满{{item.associate.per_count}}个Call即可免费领
  34. </view>
  35. <view :style="'background: ' + config.mainColor" class="buy">
  36. 去打Call
  37. </view>
  38. </view>
  39. </view>
  40. </view>
  41. </view>
  42. </view>
  43. </template>
  44. <script>
  45. import {pageLogin, getUrl,config} from '../../common/js/utils.js';
  46. import seckill from "../seckill/seckill";
  47. export default {
  48. data() {
  49. return {};
  50. },
  51. components: {
  52. seckill
  53. },
  54. props: {
  55. callData: {
  56. type: Array,
  57. value: ''
  58. },
  59. isLogin: {
  60. type: Boolean,
  61. value: ''
  62. },
  63. config: {
  64. type: Object,
  65. value: ''
  66. },
  67. server: {
  68. type: String,
  69. value: ''
  70. },
  71. meta: {
  72. type: Object,
  73. value: ""
  74. }
  75. },
  76. options: {
  77. addGlobalClass: true
  78. },
  79. //组件的方法
  80. methods: {
  81. _jumpImg(e) {
  82. var src = e.currentTarget.dataset.src;
  83. if (!src || src == 'uto_miniprogram') return;
  84. wx.navigateTo({
  85. url: src
  86. });
  87. },
  88. _jumpCall(e) {
  89. if (this.isLogin) {
  90. var id = e.currentTarget.dataset.id;
  91. wx.navigateTo({
  92. url: '/pages/store/call/call?id=' + id
  93. });
  94. } else {
  95. wx.showModal({
  96. content: '请先登录',
  97. success: res => {
  98. if (res.confirm || !res.cancel && !res.confirm) {
  99. pageLogin(getUrl());
  100. }
  101. }
  102. });
  103. }
  104. }
  105. },
  106. };
  107. </script>
  108. <style rel="stylesheet/less" lang="less">
  109. @import "index-call";
  110. </style>