index.vue 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. <template>
  2. <view class="list-box">
  3. <view class="list-content" v-for="item in helpList" :key='item.id' @click="goHelpDetail(item.content)">
  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(content){
  46. uni.navigateTo({
  47. url: '/pages/selfCenter/helpPage/helpDetail/index?qId='+content,
  48. success: res => {},
  49. fail: () => {},
  50. complete: () => {}
  51. });
  52. },
  53. getHelpList(){
  54. let that = this;
  55. uni.request({
  56. url: getApp().globalData.shareUrl, //需要设置为全局
  57. method: 'POST',
  58. header: {
  59. 'content-type': 'application/x-www-form-urlencoded'
  60. },
  61. data: {
  62. method: 'getHelpList',
  63. timestamp: getApp().globalData.globalTimestamp, //Date.now()
  64. page: '',
  65. pageSize:'',
  66. sign: md5('getHelpList' + getApp().globalData.globalTimestamp)
  67. },
  68. success: res => {
  69. if (res.data.code === 200) {
  70. console.log(res.data.msg)
  71. that.helpList = res.data.msg
  72. }
  73. }
  74. });
  75. }
  76. }
  77. }
  78. </script>
  79. <style>
  80. .list-box {
  81. width: 100%;
  82. font-size: 30rpx;
  83. }
  84. .list-content {
  85. background: #fff;
  86. display: flex;
  87. justify-content: space-between;
  88. align-items: center;
  89. height: 100rpx;
  90. border-bottom: 1px solid #dbdbdb;
  91. }
  92. .apply-box {
  93. display: flex;
  94. align-items: center;
  95. width: 180rpx;
  96. }
  97. .apply-box image {
  98. width: 50rpx;
  99. height: 50rpx;
  100. margin-right: 5%;
  101. }
  102. .margin-left5 {
  103. margin-left: 5%;
  104. }
  105. </style>