index.vue 2.1 KB

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