<template>
		<view class="list-box">
		<view class="list-content" v-for="item in helpList" :key='item.id' @click="goHelpDetail(item.id)">
			<text class="margin-left5">{{item.title}}</text>
			<view class="apply-box">
				<text style="color: #999;visibility: hidden;">点击申请</text>
				<image src="/static/arrow-right2.png" mode=""></image>
			</view>
		</view>
		
		
	</view>
</template>

<script>
	    var md5 = require('../../../common/md5.js')
		export default {
		data() {
			return {
				helpList:[
					// {
					// 	id:1,
					// 	question:'如何分销?'
					// },
					// {
					// 	id:2,
					// 	question:'如何通过分销获得奖励?'
					// },
					// {
					// 	id:3,
					// 	question:'分销奖励能提现吗?'
					// },
					// {
					// 	id:4,
					// 	question:'如何提现?'
					// },
					// {
					// 	id:5,
					// 	question:'奖励什么时候到账?'
					// },
				]
			}
		},
		onLoad() {
	       this.getHelpList();
		},
		methods: {
	     goHelpDetail(id){
			 uni.navigateTo({
			 	url: '/pages/selfCenter/helpPage/helpDetail/index?qId='+id,
			 	success: res => {},
			 	fail: () => {},
			 	complete: () => {}
			 });
		 },
		 getHelpList(){
			  uni.showLoading({
			 	title: '加载中',
			 });
			 let  that = this;
			 uni.request({
			 	url: getApp().globalData.shareUrl, //需要设置为全局
			 	method: 'POST',
			 	header: {
			 		'content-type': 'application/x-www-form-urlencoded'
			 	},
			 	data: {
			 		method: 'getHelpList',
			 		timestamp: getApp().globalData.globalTimestamp, //Date.now()
			 		page: '',
			 		pageSize:'',
			 		sign: md5('getHelpList' + getApp().globalData.globalTimestamp)
			 	},
			 	success: res => {
			 		if (res.data.code === 200) {
			 			uni.hideLoading();
						that.helpList = res.data.msg
			 		}
			 	}
			 });
		 }
		}
	}
</script>

<style>
		.list-box {
		width: 100%;
		font-size: 30rpx;
	}
	
	.list-content {
		background: #fff;
		display: flex;
		justify-content: space-between;
		align-items: center;
		height: 100rpx;
		border-bottom: 1px solid #dbdbdb;
	}
	.apply-box {
		display: flex;
		align-items: center;
		width: 180rpx;
	}
	.apply-box image {
		width: 50rpx;
		height: 50rpx;
		margin-right: 5%;
	}
	.margin-left5 {
		margin-left: 5%;
	}
</style>
