<template>
	<view class="content">
		<view class="list">
			<view class="item" @click="tell()">
				<view class="icon">
					<image src="./icon/fuwudianhua.png" mode=""></image>
				</view>
				<view class="name">服务电话</view>
			</view>
			<view class="item" @click="go_m_message_reminder()">
				<view class="icon">
					<image src="./icon/xiaoxi.png" mode=""></image>
				</view>
				<view class="name">消息提醒</view>
			</view>
			<view class="item" @click="go_business_audit()">
				<view class="icon">
					<image src="./icon/gongdanshenhe.png" mode=""></image>
				</view>
				<view class="name">工单审核</view>
			</view>
			<view class="item" @click="go_business_my()">
				<view class="icon">
					<image src="./icon/wodegongdan.png" mode=""></image>
				</view>
				<view class="name">我的工单</view>
			</view>
			<view class="item" @click="go_user_manual()">
				<view class="icon">
					<image src="./icon/shiyongshouce.png" mode=""></image>
				</view>
				<view class="name">使用手册</view>
			</view>
			<!-- <view class="item" @click="go_signature()">
				<view class="icon">
					<image src="./icon/jianyifankui.png" mode=""></image>
				</view>
				<view class="name">手写签名</view>
			</view> -->
			<view class="item" @click="go_feedback()">
				<view class="icon">
					<image src="./icon/jianyifankui.png" mode=""></image>
				</view>
				<view class="name">建议反馈</view>
			</view>
			<view class="item" @click="go_m_repassword()">
				<view class="icon">
					<image src="./icon/xiugaimima.png" mode=""></image>
				</view>
				<view class="name">修改密码</view>
			</view>
			<view class="item" @click="go_update_log()">
				<view class="icon">
					<image src="./icon/gengxin.png" mode=""></image>
				</view>
				<view class="name">更新日志</view>
			</view>
			<view class="item" @click="clear_cache()">
				<view class="icon">
					<image src="./icon/qingchu.png" mode=""></image>
				</view>
				<view class="name">清除缓存</view>
			</view>
			
		</view>
	</view>
</template>

<script>
	export default {
		name:"t-m-icon",
		props: [
			"mine_code"
		],
		data() {
			return {
				
			};
		},
		created() {
			console.log(this.mine_code)
		},
		methods:{
			// 拨打服务电话
			tell(){
				uni.makePhoneCall({
				    phoneNumber: '18152480670'
				});
			},
			// 修改密码
			go_m_repassword(){
				uni.navigateTo({
					url:"../../my/repassword/repassword"
				})
			},
			// 消息提醒
			go_m_message_reminder(){
				uni.navigateTo({
					url:"../../my/message-reminder/message-reminder"
				})
			},
			// 清除缓存
			clear_cache(){
				uni.showLoading()
				setTimeout(()=>{
					uni.hideLoading()
					uni.showToast({
						icon:"none",
						title:"清除完成"
					})
				},1500)
			},
			// 使用手册
			go_user_manual(){
				if(this.mine_code == 'zaoquan'){
					uni.navigateTo({
						url:"../../index/record/record?pageId=f73209f7e0a4425a94a32210cdfc311d&mine_code=" + this.mine_code,
					})
				}else{
					
				}
			},
			// 建议反馈
			go_feedback(){
				if(this.mine_code == 'zaoquan'){
					uni.navigateTo({
						url:"../../index/record/record?pageId=45c1a10e9da04670962ff67da80be5b1&mine_code=" + this.mine_code,
					})
				}else{
					
				}
			},
			// 更新日志
			go_update_log(){
				if(this.mine_code == 'zaoquan'){
					uni.navigateTo({
						url:"../../index/record/record?pageId=982d321d1fd64894a4a22c8f940ed7cc&mine_code=" + this.mine_code,
					})
				}else{
					
				}
			},
			// 工单审核
			go_business_audit(){
				uni.navigateTo({
					url:"../../my/business-audit/business-audit"
				})
			},
			// 我的工单
			go_business_my(){
				uni.navigateTo({
					url:"../../my/business-my/business-my"
				})
			},
			// 手写签名
			go_signature(){
				uni.navigateTo({
					url:"../../my/signature/signature"
				})
			}
			
		}
	}
</script>

<style lang="scss">
	.content{
		box-sizing: border-box;
		padding: 0 24rpx;
		
		margin-bottom: 30rpx;
	}
	.list{
		width: 700rpx;
		overflow: hidden;
		
		.item{
			float: left;
			
			width: 200rpx;
			text-align: center;
			margin-right: 50rpx;
			margin-top: 22px;
			.icon{
				position: relative;
				text-align: center;
				image{
					width: 45px;
					height: 45px;
				}
				.num{
					position: absolute;
					right: 14px;
					top: -4px;
					display: inline-block;
					width: 20px;
					line-height: 20px;
					font-size: 12px;
					color: #FFFFFF;
					background-color: red;
					border-radius: 50%;
				}
			}
			.name{
				font-size: 15px;
				font-weight: 500;
				color: #232627;
				line-height: 21px;
			}
		}
		.item:nth-child(3n){
			margin-right: 0;
		}
	}
</style>
