index.wxml 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <view>
  2. <view class="top-bg" style="background-image:url({{appAssetsUrl}}/images/pointExchange/bg.png);padding-top:{{statusBarMH}}">
  3. <view class="title-box">
  4. <view class="left" bindtap="back">
  5. <image mode="widthFix" src="{{appAssetsUrl}}/images/left-arrow.png"></image>
  6. </view>
  7. <view class="right">
  8. 积分兑换
  9. </view>
  10. </view>
  11. <view class="point">{{totalScore}}</view>
  12. <view class="tip">剩余积分</view>
  13. <view class="content">
  14. <view class="tool-box">
  15. <view wx:for="{{tools}}" class="tool" bindtap="goTool" data-index="{{index}}">
  16. <image mode="widthFix" src="{{appAssetsUrl}}/images/pointExchange/tool{{index+1}}.png"></image>
  17. <view>{{item.text}}</view>
  18. </view>
  19. </view>
  20. <view class="namewrap">
  21. <scroll-view scroll-x scroll-with-animation scroll-left="{{navScrollWidth}}" class="item-box">
  22. <view class="nameitem {{typeListIndex == index ? 'nameactive' : ''}}" wx:for="{{typeList}}"
  23. bindtap="switchType" data-index="{{index}}">
  24. <image mode="widthFix" src="{{appAssetsUrl}}/images/active_line.png"
  25. style="width: 55rpx;position: absolute;top: 50rpx;left: calc(50% + 10rpx);transform: translateX(-50%);display: {{typeListIndex == index?'block':'none'}};">
  26. </image>
  27. {{item.typeName}}
  28. </view>
  29. </scroll-view>
  30. </view>
  31. <scroll-view scroll-y style="height: calc(100vh - 650rpx);" bindscrolltolower="bindscrolltolower">
  32. <view wx:for="{{listData}}" class="card" data-id="{{item.id}}" bindtap="toDatail">
  33. <image mode="aspectFill" src="{{item.homeUrl}}" class="head"></image>
  34. <view class="right">
  35. <view class="title">{{item.productName}}</view>
  36. <view class="tip">{{item.storeName}}</view>
  37. <view class="addr">
  38. <i class="iconfont icon-dizhi icon-home-dizhi"></i>
  39. <text class="area" style="margin-left:10rpx">{{item.addr}}</text>
  40. </view>
  41. <view class="sub">
  42. <text>积分:</text>
  43. <text class="red">{{item.needScore}}</text>
  44. </view>
  45. <button class="btn" catchtap="showPopup" data-name="popup" data-id="{{item.id}}" data-needScore="{{item.needScore}}">确认兑换</button>
  46. </view>
  47. </view>
  48. <block wx:if="{{listData.length<=0}}">
  49. <view class='tc h100'>
  50. <image src="{{nodata}}" class='nodata-img'></image>
  51. </view>
  52. </block>
  53. </scroll-view>
  54. </view>
  55. </view>
  56. </view>
  57. <popup2 id='popup' title='确认兑换' btn_no='取消兑换' btn_ok='确定兑换' bind:error="_error"
  58. bind:success="useCoupon" data-name="popup">
  59. <view slot="content" style="width: 70%;text-align: left;padding: 44rpx 0 38rpx 0;">
  60. <view>剩余总积分:{{totalScore}}</view>
  61. <view>兑换当前卡券所需积分:{{itemData.needScore}}</view>
  62. </view>
  63. </popup2>
  64. <popup2 id='popup2' title='兑换成功' btn_no='等会儿去' btn_ok='立即查看' bind:error="_error"
  65. bind:success="toPointExchangeByMe" data-name="popup2">
  66. <view slot="content" style="width: 85%;text-align: left;padding: 44rpx 0 38rpx 0;">
  67. <image mode="widthFix" src="{{appAssetsUrl}}/images/success-icon.png" class="success-icon"></image>
  68. <view class="top-tip">恭喜您兑换成功</view>
  69. <view class="bottom-tip">可以在我的兑换中查看已兑换的物品</view>
  70. </view>
  71. </popup2>
  72. <!-- <button class="custCare" open-type="contact" session-from="sessionFrom">
  73. <image mode="aspectFill" src="{{appAssetsUrl}}/images/custCare.png"></image>
  74. </button> -->