index.vue 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. <template>
  2. <view class="list-box">
  3. <view class="list-content" v-for="item in helpList" :key='item.id' @click="goHelpDetail(item.id)">
  4. <text class="margin-left5">{{item.title}}</text>
  5. <view class="apply-box">
  6. <text style="color: #999;visibility: hidden;">点击申请</text>
  7. <image src="/static/arrow-right2.png" mode=""></image>
  8. </view>
  9. </view>
  10. </view>
  11. </template>
  12. <script>
  13. var md5 = require('../../../common/md5.js')
  14. export default {
  15. data() {
  16. return {
  17. helpList:[
  18. // {
  19. // id:1,
  20. // question:'如何分销?'
  21. // },
  22. // {
  23. // id:2,
  24. // question:'如何通过分销获得奖励?'
  25. // },
  26. // {
  27. // id:3,
  28. // question:'分销奖励能提现吗?'
  29. // },
  30. // {
  31. // id:4,
  32. // question:'如何提现?'
  33. // },
  34. // {
  35. // id:5,
  36. // question:'奖励什么时候到账?'
  37. // },
  38. ]
  39. }
  40. },
  41. onLoad() {
  42. this.getHelpList();
  43. },
  44. methods: {
  45. goHelpDetail(id){
  46. uni.navigateTo({
  47. url: '/pages/selfCenter/helpPage/helpDetail/index?qId='+id,
  48. success: res => {},
  49. fail: () => {},
  50. complete: () => {}
  51. });
  52. },
  53. getHelpList(){
  54. uni.showLoading({
  55. title: '加载中',
  56. });
  57. let that = this;
  58. uni.request({
  59. url: getApp().globalData.shareUrl, //需要设置为全局
  60. method: 'POST',
  61. header: {
  62. 'content-type': 'application/x-www-form-urlencoded'
  63. },
  64. data: {
  65. method: 'getHelpList',
  66. timestamp: getApp().globalData.globalTimestamp, //Date.now()
  67. page: '',
  68. pageSize:'',
  69. sign: md5('getHelpList' + getApp().globalData.globalTimestamp)
  70. },
  71. success: res => {
  72. if (res.data.code === 200) {
  73. uni.hideLoading();
  74. that.helpList = res.data.msg
  75. }
  76. }
  77. });
  78. }
  79. }
  80. }
  81. </script>
  82. <style>
  83. .list-box {
  84. width: 100%;
  85. font-size: 30rpx;
  86. }
  87. .list-content {
  88. background: #fff;
  89. display: flex;
  90. justify-content: space-between;
  91. align-items: center;
  92. height: 100rpx;
  93. border-bottom: 1px solid #dbdbdb;
  94. }
  95. .apply-box {
  96. display: flex;
  97. align-items: center;
  98. width: 180rpx;
  99. }
  100. .apply-box image {
  101. width: 50rpx;
  102. height: 50rpx;
  103. margin-right: 5%;
  104. }
  105. .margin-left5 {
  106. margin-left: 5%;
  107. }
  108. </style>