金诚优选前端代码
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.

76 lines
1.9 KiB

  1. <template>
  2. <view class="module-box" :style="'margin-bottom: ' + meta.margin_bottom + 'px'" v-if="suitData && suitData.length">
  3. <view class="module-title" data-src="/pages/store/mealList/mealList" @tap="_jumpImg">
  4. <span>推荐套餐</span>
  5. <span>
  6. 更多
  7. <text class="iconfont icon-gengduo"></text>
  8. </span>
  9. </view>
  10. <view v-for="(items, idx) in suitData" :key="idx">
  11. <view class="module-content">
  12. <view class="meal_list">
  13. <view class="store_list" v-for="(item, index) in items.associate.items" :key="index" >
  14. <view @tap="jumpToDetail" :data-id="item.goods.id">
  15. <image class="slide-image" :src="item.goods.img"></image>
  16. <view class="description">{{item.goods.name}}</view>
  17. </view>
  18. </view>
  19. </view>
  20. </view>
  21. <view class="meal-price" :data-suitid="items.associate_id" @tap="_jumpMeal">
  22. 搭配套餐价=<text>{{items.associate.total}}</text>/<text>{{items.associate.origin_total}}</text>
  23. </view>
  24. </view>
  25. </view>
  26. </template>
  27. <script>
  28. export default {
  29. data() {
  30. return {};
  31. },
  32. options: {
  33. addGlobalClass: true
  34. },
  35. props: {
  36. suitData: {
  37. type: Array,
  38. value: ''
  39. },
  40. show: {
  41. type: Number,
  42. value: ''
  43. },
  44. meta: {
  45. type: Object,
  46. value: ""
  47. },
  48. },
  49. //组件的方法
  50. methods: {
  51. _jumpImg(e) {
  52. var src = e.currentTarget.dataset.src;
  53. if (!src || src == 'uto_miniprogram') return;
  54. wx.navigateTo({
  55. url: src
  56. });
  57. },
  58. _jumpMeal(e) {
  59. console.log(this.suitData);
  60. var id = e.currentTarget.dataset.suitid;
  61. wx.navigateTo({
  62. url: `/pages/store/meal/meal?id=${id}`
  63. });
  64. }
  65. },
  66. };
  67. </script>
  68. <style rel="stylesheet/less" lang="less">
  69. @import "index-suit";
  70. </style>