|
@@ -109,27 +109,27 @@
|
|
|
</view>
|
|
|
<view class="from-content" style="padding: 30rpx;">
|
|
|
<view class="tenant-image">
|
|
|
- <view>
|
|
|
+ <view @click="idCardFront">
|
|
|
<image :src="list.idCardFront" mode=""></image>
|
|
|
<view>法人身份证国徽面</view>
|
|
|
</view>
|
|
|
- <view>
|
|
|
+ <view @click="idCardReverse">
|
|
|
<image :src="list.idCardReverse" mode=""></image>
|
|
|
<view>法人身份证人像面</view>
|
|
|
</view>
|
|
|
- <view>
|
|
|
+ <view @click="licensePic">
|
|
|
<image :src="list.licensePic" mode=""></image>
|
|
|
<view>营业执照</view>
|
|
|
</view>
|
|
|
- <view>
|
|
|
+ <view @click="usccl">
|
|
|
<image :src="list.usccl" mode=""></image>
|
|
|
<view>统一社会信息代码证</view>
|
|
|
</view>
|
|
|
- <view>
|
|
|
+ <view @click="shopSign">
|
|
|
<image :src="list.shopSign" mode=""></image>
|
|
|
<view>门头照</view>
|
|
|
</view>
|
|
|
- <view>
|
|
|
+ <view @click="shopImgs">
|
|
|
<image :src="list.shopImgs" mode=""></image>
|
|
|
<view>店铺照片</view>
|
|
|
</view>
|
|
@@ -161,7 +161,7 @@
|
|
|
</u-popup>
|
|
|
|
|
|
<view class="from-content">
|
|
|
- <button class="tenant-button">
|
|
|
+ <button class="tenant-button" @click="merchant">
|
|
|
立即保存
|
|
|
</button>
|
|
|
</view>
|
|
@@ -194,15 +194,27 @@
|
|
|
name: '硕士',
|
|
|
}
|
|
|
],
|
|
|
+ fishermanId: uni.getStorageSync('merchantId'),
|
|
|
+ list: {},
|
|
|
dto: {
|
|
|
- realName: '黄沙村渔家乐', //昵称
|
|
|
- modifyPhone: '18755113256', //手机号
|
|
|
- headUrl: '', // 头像
|
|
|
- idCode: '', // 证件号
|
|
|
+ name: '', //商户名称
|
|
|
+ busName: '', //企业名称
|
|
|
+ merchantType: 10, //商户类型
|
|
|
+ companyType: '', //企业类型
|
|
|
+ legalPerson: '', //企业法人
|
|
|
+ idCard: '', //法人身份证号码
|
|
|
+ creditCode: '', //统一社区信用代码
|
|
|
+ areaDetail: '', //企业地址
|
|
|
+ linkName: '', //联系人姓名
|
|
|
+ phone: '', //联系人号码
|
|
|
+ idCardFront: '', //法人身份证国徽面
|
|
|
+ idCardReverse: '', //法人身份证人像面
|
|
|
+ licensePic: '', //营业执照
|
|
|
+ usccl: '', //统一社会信息代码证
|
|
|
+ shopSign: '', //门头照
|
|
|
+ shopImgs: '', //店铺照片
|
|
|
id: ''
|
|
|
- },
|
|
|
- fishermanId: uni.getStorageSync('merchantId'),
|
|
|
- list: {}
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
onLoad() {
|
|
@@ -210,8 +222,38 @@
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
- // 上传头像
|
|
|
- upImage() {
|
|
|
+ getList() {
|
|
|
+ // this.$api.get('/merchant/merchantFisherman/home?id=' + this.homestayId).then(res => {
|
|
|
+ // console.log(res.data);
|
|
|
+ // })
|
|
|
+ let id = this.fishermanId
|
|
|
+ this.$api.get(`/merchant/merchantFisherman/home/${id}`).then(res => {
|
|
|
+ console.log(res.data);
|
|
|
+ this.list = res.data.data
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 立即保存
|
|
|
+ merchant() {
|
|
|
+ this.dto.name = this.list.name
|
|
|
+ this.dto.busName = this.list.busName
|
|
|
+ this.dto.merchantType = this.list.merchantType
|
|
|
+ this.dto.companyType = this.list.companyType
|
|
|
+ this.dto.legalPerson = this.list.legalPerson
|
|
|
+ this.dto.idCard = this.list.idCard
|
|
|
+ this.dto.creditCode = this.list.creditCode
|
|
|
+ this.dto.idCardReverse = this.list.idCardReverse
|
|
|
+ this.dto.licensePic = this.list.licensePic
|
|
|
+ this.dto.usccl = this.list.usccl
|
|
|
+ this.dto.shopSign = this.list.shopSign
|
|
|
+ this.dto.shopImgs = this.list.shopImgs
|
|
|
+ this.dto.id = uni.getStorageSync('merchantId')
|
|
|
+
|
|
|
+ this.$api.put('/merchant/merchantFisherman/home', this.dto).then(res => {
|
|
|
+ console.log(res);
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 上传头像法人身份证国徽面
|
|
|
+ idCardFront() {
|
|
|
uni.chooseImage({
|
|
|
sourceType: ['album'], //从相册选择
|
|
|
success: chooseImageRes => {
|
|
@@ -226,7 +268,8 @@
|
|
|
success: res => {
|
|
|
// uploadFile上传成功后,根据和后台的约定msgCode判断接口调用状态
|
|
|
let data = JSON.parse(res.data);
|
|
|
- this.dto.headUrl = data.data.url
|
|
|
+ this.dto.idCardFront = data.data.url
|
|
|
+ this.list.idCardFront = data.data.url
|
|
|
}
|
|
|
});
|
|
|
},
|
|
@@ -236,18 +279,137 @@
|
|
|
});
|
|
|
|
|
|
},
|
|
|
+ // 上传法人身份证人像面
|
|
|
+ idCardReverse() {
|
|
|
+ uni.chooseImage({
|
|
|
+ sourceType: ['album'], //从相册选择
|
|
|
+ success: chooseImageRes => {
|
|
|
+ const tempFilePaths = chooseImageRes.tempFilePaths;
|
|
|
+ uni.uploadFile({
|
|
|
+ url: 'https://i.ringzle.com/island-cloud-server/oss/file/upload', // 仅为示例,非真实的接口地址
|
|
|
+ filePath: tempFilePaths[0],
|
|
|
+ name: 'file',
|
|
|
+ header: {
|
|
|
+ token: wx.getStorageSync('access_token')
|
|
|
+ },
|
|
|
+ success: res => {
|
|
|
+ // uploadFile上传成功后,根据和后台的约定msgCode判断接口调用状态
|
|
|
+ let data = JSON.parse(res.data);
|
|
|
+ this.dto.idCardReverse = data.data.url
|
|
|
+ this.list.idCardReverse = data.data.url
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ fail: err => {
|
|
|
+ this.myToast('图片上传失败', 'none');
|
|
|
+ }
|
|
|
+ });
|
|
|
|
|
|
- getList() {
|
|
|
- // this.$api.get('/merchant/merchantFisherman/home?id=' + this.homestayId).then(res => {
|
|
|
- // console.log(res.data);
|
|
|
- // })
|
|
|
- let id = this.fishermanId
|
|
|
- this.$api.get(`/merchant/merchantFisherman/home/${id}`).then(res => {
|
|
|
- console.log(res.data);
|
|
|
- this.list = res.data.data
|
|
|
- })
|
|
|
- }
|
|
|
+ }, // 上传营业执照
|
|
|
+ licensePic() {
|
|
|
+ uni.chooseImage({
|
|
|
+ sourceType: ['album'], //从相册选择
|
|
|
+ success: chooseImageRes => {
|
|
|
+ const tempFilePaths = chooseImageRes.tempFilePaths;
|
|
|
+ uni.uploadFile({
|
|
|
+ url: 'https://i.ringzle.com/island-cloud-server/oss/file/upload', // 仅为示例,非真实的接口地址
|
|
|
+ filePath: tempFilePaths[0],
|
|
|
+ name: 'file',
|
|
|
+ header: {
|
|
|
+ token: wx.getStorageSync('access_token')
|
|
|
+ },
|
|
|
+ success: res => {
|
|
|
+ // uploadFile上传成功后,根据和后台的约定msgCode判断接口调用状态
|
|
|
+ let data = JSON.parse(res.data);
|
|
|
+ this.dto.licensePic = data.data.url
|
|
|
+ this.list.licensePic = data.data.url
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ fail: err => {
|
|
|
+ this.myToast('图片上传失败', 'none');
|
|
|
+ }
|
|
|
+ });
|
|
|
|
|
|
+ }, // 上传统一社会信息代码证
|
|
|
+ usccl() {
|
|
|
+ uni.chooseImage({
|
|
|
+ sourceType: ['album'], //从相册选择
|
|
|
+ success: chooseImageRes => {
|
|
|
+ const tempFilePaths = chooseImageRes.tempFilePaths;
|
|
|
+ uni.uploadFile({
|
|
|
+ url: 'https://i.ringzle.com/island-cloud-server/oss/file/upload', // 仅为示例,非真实的接口地址
|
|
|
+ filePath: tempFilePaths[0],
|
|
|
+ name: 'file',
|
|
|
+ header: {
|
|
|
+ token: wx.getStorageSync('access_token')
|
|
|
+ },
|
|
|
+ success: res => {
|
|
|
+ // uploadFile上传成功后,根据和后台的约定msgCode判断接口调用状态
|
|
|
+ let data = JSON.parse(res.data);
|
|
|
+ this.dto.usccl = data.data.url
|
|
|
+ this.list.usccl = data.data.url
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ fail: err => {
|
|
|
+ this.myToast('图片上传失败', 'none');
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ }, // 上传门头照
|
|
|
+ shopSign() {
|
|
|
+ uni.chooseImage({
|
|
|
+ sourceType: ['album'], //从相册选择
|
|
|
+ success: chooseImageRes => {
|
|
|
+ const tempFilePaths = chooseImageRes.tempFilePaths;
|
|
|
+ uni.uploadFile({
|
|
|
+ url: 'https://i.ringzle.com/island-cloud-server/oss/file/upload', // 仅为示例,非真实的接口地址
|
|
|
+ filePath: tempFilePaths[0],
|
|
|
+ name: 'file',
|
|
|
+ header: {
|
|
|
+ token: wx.getStorageSync('access_token')
|
|
|
+ },
|
|
|
+ success: res => {
|
|
|
+ // uploadFile上传成功后,根据和后台的约定msgCode判断接口调用状态
|
|
|
+ let data = JSON.parse(res.data);
|
|
|
+ this.dto.shopSign = data.data.url
|
|
|
+ this.list.shopSign = data.data.url
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ fail: err => {
|
|
|
+ this.myToast('图片上传失败', 'none');
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ }, // 上传店铺照片
|
|
|
+ shopImgs() {
|
|
|
+ uni.chooseImage({
|
|
|
+ sourceType: ['album'], //从相册选择
|
|
|
+ success: chooseImageRes => {
|
|
|
+ const tempFilePaths = chooseImageRes.tempFilePaths;
|
|
|
+ uni.uploadFile({
|
|
|
+ url: 'https://i.ringzle.com/island-cloud-server/oss/file/upload', // 仅为示例,非真实的接口地址
|
|
|
+ filePath: tempFilePaths[0],
|
|
|
+ name: 'file',
|
|
|
+ header: {
|
|
|
+ token: wx.getStorageSync('access_token')
|
|
|
+ },
|
|
|
+ success: res => {
|
|
|
+ // uploadFile上传成功后,根据和后台的约定msgCode判断接口调用状态
|
|
|
+ let data = JSON.parse(res.data);
|
|
|
+ this.dto.shopImgs = data.data.url
|
|
|
+ this.list.shopImgs = data.data.url
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ fail: err => {
|
|
|
+ this.myToast('图片上传失败', 'none');
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ },
|
|
|
}
|
|
|
|
|
|
|