index.vue 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  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.question}}</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.request({
  55. url: getApp().globalData.shareUrl, //需要设置为全局
  56. method: 'POST',
  57. header: {
  58. 'content-type': 'application/x-www-form-urlencoded'
  59. },
  60. data: {
  61. method: 'getHelpList',
  62. timestamp: getApp().globalData.globalTimestamp, //Date.now()
  63. page: '',
  64. pageSize:'',
  65. sign: md5('getHelpList' + getApp().globalData.globalTimestamp)
  66. },
  67. success: res => {
  68. if (res.data.code === 200) {
  69. console.log(res.data.msg)
  70. }
  71. }
  72. });
  73. }
  74. }
  75. }
  76. </script>
  77. <style>
  78. .list-box {
  79. width: 100%;
  80. font-size: 30rpx;
  81. }
  82. .list-content {
  83. background: #fff;
  84. display: flex;
  85. justify-content: space-between;
  86. align-items: center;
  87. height: 100rpx;
  88. border-bottom: 1px solid #dbdbdb;
  89. }
  90. .apply-box {
  91. display: flex;
  92. align-items: center;
  93. width: 180rpx;
  94. }
  95. .apply-box image {
  96. width: 50rpx;
  97. height: 50rpx;
  98. margin-right: 5%;
  99. }
  100. .margin-left5 {
  101. margin-left: 5%;
  102. }
  103. </style>