<template>
	<view class="content">
		<view class="item">
			<view class="item-tit">
				店铺名称
			</view>
			<input type="text" v-model="name"/>
		</view>
		<view class="item">
			<view class="item-tit">
				商家电话
			</view>
			<input type="number" v-model="phone"/>
		</view>
		<view class="item">
			<view class="item-tit">
				商家地址
			</view>
			<input type="text" v-model="address"/>
		</view>
		<view class="item">
			<view class="item-tit">
				营业时间
			</view>
			<input type="text" v-model="workTime"/>
		</view>
		<view class="item">
			<view class="item-tit">
				商户简介
			</view>
			<textarea v-model="info" placeholder="" />
		</view>
		<view class="item">
			<view class="item-tit">
				门户头像
			</view>
			<view class="up-wrapper">
				<image :src="logo" mode="" v-if="logo" @click.stop="upImg"></image>
				<image src="../../static/img/add.png" mode="" v-else  @click.stop="upImg"></image>
			</view>
		</view>
		<view class="sub" @click="sub">
			确认修改
		</view>
	</view>
</template>

<script>
	import {
			upload
		} from '@/api/user.js';
	export default {
		data() {
			return {
				name: '鑫旺零售台州店',
				phone: '12345678911',
				address: '台州市市府大道110号',
				info: '店铺简介店铺简介店铺简介店铺简介店铺简介店铺简介铺简介店铺简介店铺简介店铺简介店铺简介店铺简介店铺简介',
				workTime: '8:30-12:00,13:30-17:00',
				logo: ''
			}
		},
		methods:{
			// 修改logo
			upImg() {
				let obj = this
				upload({
					filename: ''
				}).then(res => {
					console.log(res[0].url)
					obj.logo = res[0].url
				});
			},
			//提交
			sub() {
				let obj = this
				
			}
			
		}
	}
</script>

<style lang="scss" scoped>
	page {
		height: 100%;
		background-color: #f8f6f6;
	}
	.item {
		background-color: #fff !important;
		min-height: 100rpx;
		display: flex;
		width: 750px;
		border: 1px  #F4F4F4 solid;
		.item-tit {
			height: 100rpx;
			line-height: 100rpx;
			padding-left: 30rpx;
			width: 200rpx;
			font-size: 30rpx;
			font-family: PingFang SC;
			font-weight: 500;
			color: #666666;
			flex-shrink: 0;
		}
		input {
			width: 550rpx;
			height: 100rpx;
			line-height: 100rpx;
			font-size: 30rpx;
			font-family: PingFang SC;
			font-weight: 500;
			color: #333333;
		}
		textarea {
			width: 550rpx;
			height: 257rpx;
			padding-top: 45rpx;
			padding-right: 30rpx;
			line-height: 50rpx;
			font-size: 30rpx;
			font-family: PingFang SC;
			font-weight: 500;
			color: #333333;
		}
		.up-wrapper {
			height: 352rpx;
			width: 550rpx;
			position: relative;
			image {
				position: absolute;
				height: 160rpx;
				width: 160rpx;
				top: 0;
				bottom: 0;
				left: 94rpx;
				margin: auto;
			}
		}
	}
	.sub {
		width: 674rpx;
		height: 88rpx;
		background: #FF4C4C;
		border-radius: 44rpx;
		line-height: 88rpx;
		text-align: center;
		font-size: 36rpx;
		font-family: PingFang SC;
		font-weight: 500;
		color: #FFFFFF;
		position: absolute;
		bottom: 35rpx;
		left: 0;
		right: 0;
		margin: auto;
	}
</style>
