wishList.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. <template>
  2. <view class="page">
  3. <view class="list_info">
  4. <view class="item" v-for="(item,index) in list">
  5. <view class="avator">
  6. <image class="icon" :src="item.image" mode="aspectFill" />
  7. </view>
  8. <view class="left">
  9. <view class="name">{{item.name}}</view>
  10. <view class="jindu">
  11. <view class="bord">
  12. <view class="active" :style="'width:' + item.num_bfb + '%;'"></view>
  13. </view>
  14. <text class="tips">{{item.num_bfb}}%</text>
  15. </view>
  16. </view>
  17. <text class="right">
  18. <block v-if="item.status == 1">
  19. <view class="btn_submit">邀请助力</view>
  20. </block>
  21. <block v-if="item.status == 2">
  22. <view class="state" @click="onLinqu">待发货</view>
  23. </block>
  24. <block v-if="item.status == 9">
  25. <view class="state">已发货</view>
  26. </block>
  27. </text>
  28. </view>
  29. <view class="blankHeight"></view>
  30. </view>
  31. <DialogBox ref="DialogBox"></DialogBox>
  32. </view>
  33. </template>
  34. <script>
  35. export default {
  36. components: {},
  37. data() {
  38. return {
  39. tab: 1,
  40. scrollTop: 0,
  41. old: {
  42. scrollTop: 0
  43. },
  44. list: []
  45. }
  46. },
  47. onLoad() {
  48. // setTimeout(function() {
  49. // uni.setNavigationBarColor({
  50. // frontColor: '#ffffff',
  51. // backgroundColor: '#00000000',
  52. // animation: {
  53. // duration: 400,
  54. // timingFunc: 'easeIn'
  55. // }
  56. // })
  57. // }, 200);
  58. },
  59. onShow() {
  60. this.loadData();
  61. },
  62. methods: {
  63. onBack() {},
  64. checkTab(tab) {
  65. this.tab = tab;
  66. // this.loadData();
  67. },
  68. onLinqu() {
  69. return;
  70. this.$refs['DialogBox'].confirm({
  71. title: '',
  72. content: '你还没有维护收货地址,请先维护收货地址!',
  73. DialogType: 'inquiry',
  74. btn1: '我知道了',
  75. btn2: '编辑地址',
  76. animation: 0
  77. }).then(() => {
  78. // getApp().globalData.skey = "";
  79. // uni.removeStorageSync("wapptoken")
  80. // uni.redirectTo({
  81. // url: '/pages/index/login',
  82. // })
  83. // uni.navigateBack();
  84. // uni.sendNativeEvent("logout","tt", function(e){
  85. // //关闭当前小程序
  86. // console.log("sendNativeEvent-----------回调"+JSON.stringify(e));
  87. // });
  88. })
  89. },
  90. scroll: function(e) {
  91. console.log(e)
  92. this.old.scrollTop = e.detail.scrollTop
  93. },
  94. loadData() {
  95. uni.request({
  96. url: this.$apiHost + '/Wish/getMyList',
  97. data: {
  98. uuid: getApp().globalData.uuid,
  99. },
  100. header: {
  101. 'content-type': 'application/json'
  102. },
  103. success: (res) => {
  104. console.log("res", res.data)
  105. this.list = res.data.list;
  106. }
  107. });
  108. },
  109. }
  110. }
  111. </script>
  112. <style scoped lang="scss">
  113. @import 'wishList.scss';
  114. </style>