<template>
	<view class="page">

		<view class="list_info">
			<view class="item" v-for="(item,index) in 3">
				<view class="left">
					<view class="name">探索奖励</view>
					<view class="desc">2023-10-10 15：00</view>
				</view>
				<text class="right">
					<view class="num">+100</view>
				</text>
			</view>

			<view class="blankHeight"></view>
		</view>

		<DialogBox ref="DialogBox"></DialogBox>
	</view>
</template>

<script>
	export default {
		components: {},
		data() {
			return {
				tab: 1,
				scrollTop: 0,
				old: {
					scrollTop: 0
				},
				list: [{
					name: '实名认证',
					'desc': '',
					'path': ''
				}]
			}
		},
		onLoad() {
			// setTimeout(function() {
			// 	uni.setNavigationBarColor({
			// 		frontColor: '#ffffff',
			// 		backgroundColor: '#00000000',
			// 		animation: {
			// 			duration: 400,
			// 			timingFunc: 'easeIn'
			// 		}
			// 	})
			// }, 200);
		},
		onShow() {
			this.loadData();
		},
		methods: {
			onBack() {},
			checkTab(tab) {
				this.tab = tab;
				// this.loadData();
			},
			onLinqu() {
				this.$refs['DialogBox'].confirm({
					title: '',
					content: '你还没有维护收货地址，请先维护收货地址！',
					DialogType: 'inquiry',
					btn1: '我知道了',
					btn2: '编辑地址',
					animation: 0
				}).then(() => {

					// getApp().globalData.skey = "";
					// uni.removeStorageSync("wapptoken")
					// uni.redirectTo({
					// 	url: '/pages/index/login',
					// })
					// uni.navigateBack();
					// uni.sendNativeEvent("logout","tt", function(e){
					// 	//关闭当前小程序
					// 	console.log("sendNativeEvent-----------回调"+JSON.stringify(e));
					// });
				})
			},
			scroll: function(e) {
				console.log(e)
				this.old.scrollTop = e.detail.scrollTop
			},
			loadData() {
				console.log("this.globalData", getApp().globalData);
				let obj2 = {
					is_first: 0
				}
				const postData = Object.assign({}, getApp().globalData.postHeader, obj2);

				console.log(postData);

				uni.request({
					url: this.$apiHost + '/Gushi/getmyinfo', //仅为示例，并非真实接口地址。
					data: postData,
					method: 'POST',
					header: {
						'content-type': 'application/json', //自定义请求头信息
						'Access-Control-Allow-Origin': '*'
					},
					success: (res) => {
						console.log('data:', res.data);
						this.myinfo = res.data;
					}
				});



			},
			
		}
	}
</script>

<style scoped lang="scss">
	@import 'miningRecord.scss';
</style>