shish 4 лет назад
Родитель
Сommit
c5c2c02e42
3 измененных файлов с 481 добавлено и 484 удалено
  1. 186 187
      ghsApp/src/admin/shop/add.vue
  2. 107 108
      ghsApp/src/admin/shop/list.vue
  3. 188 189
      hdApp/src/admin/shop/add.vue

+ 186 - 187
ghsApp/src/admin/shop/add.vue

@@ -95,202 +95,201 @@
 </template>
 
 <script>
-	import TuiListCell from '@/components/plugin/list-cell'
-	import AppAvatarModule from '@/components/module/app-avatar'
-	import SimpleAddress from '@/components/plugin/simple-address'
-	import AppAreaSel from '@/components/app-area-sel'
-	import AppUploader from "@/components/app-uploader";
-	const form = require('@/utils/formValidation.js')
-	import { updateShop as update, addShop as add } from '@/api/shop'
-	import {mapActions} from "vuex";
-	export default {
-		name: 'staff-add',
-		components: {
-			TuiListCell,
-			AppAvatarModule,
-			SimpleAddress,
-			AppAreaSel,
-			AppUploader
+import TuiListCell from '@/components/plugin/list-cell'
+import AppAvatarModule from '@/components/module/app-avatar'
+import SimpleAddress from '@/components/plugin/simple-address'
+import AppAreaSel from '@/components/app-area-sel'
+import AppUploader from "@/components/app-uploader";
+const form = require('@/utils/formValidation.js')
+import { updateShop as update, addShop as add } from '@/api/shop'
+import {mapActions} from "vuex";
+export default {
+	name: 'staff-add',
+	components: {
+		TuiListCell,
+		AppAvatarModule,
+		SimpleAddress,
+		AppAreaSel,
+		AppUploader
+	},
+	data() {
+		return {
+			visible: true,
+			openTimeVisible: false,
+			start_time: '00:00',
+			end_time: '00:00',
+			form: {
+				join:0,
+				shopName: '',
+				province: '',
+				city: '',
+				address: '',
+				floor: '',
+				open: 1,
+				openType: 0, // openType: 0. 表示 24小时营业 1. 表示 xx ~ xx
+				openStartTime: '',
+				openEndTime: '',
+				introduction: '',
+				mobile: '',
+				img: []
+			},
+			showRegion: false,
+			region: {
+				lat: 0,
+				long: 0
+			},
+			regionData: [],
+			cityPickerValueDefault: [0, 0]
+		}
+	},
+	onLoad() {
+	},
+	onShow() {
+		if (this.option.id) {
+			uni.setNavigationBarTitle({
+				title: `修改门店`
+			})
+		} else {
+			uni.setNavigationBarTitle({
+				title: `添加门店`
+			})
+		}
+	},
+	methods: {
+		...mapActions(['setUserShopAll']),
+		init() {
+	this._getDet()
 		},
-		data() {
-			return {
-				visible: true,
-				openTimeVisible: false,
-				start_time: '00:00',
-      			end_time: '00:00',
-				form: {
-					join:0,
-					shopName: '',
-					province: '',
-					city: '',
-					address: '',
-					floor: '',
-					open: 1,
-					openType: 0, // openType: 0. 表示 24小时营业 1. 表示 xx ~ xx
-					openStartTime: '',
-					openEndTime: '',
-					introduction: '',
-					mobile: '',
-					img: []
-				},
-				showRegion: false,
-				region: {
-					lat: 0,
-					long: 0
-				},
-				regionData: [],
-				cityPickerValueDefault: [0, 0]
+		_resultData(val) {
+			console.log(val)
+			this.form.img = val;
+		},
+		_getDet() {
+			let data = uni.getStorageSync('modifyShopB')
+			if (this.$util.isEmpty(data)) return
+			Object.keys(this.form).forEach((i, index) => {
+				this.form[i] = data[i]
+			})
+			this.region.lat = data.lat
+			this.region.long = data.long
+
+			this.visible = this.form.open == 1 ? true : false
+			this.openTimeVisible = true
+			this.form.openType = 1
+			this.start_time = this.form.openStartTime
+			this.end_time = this.form.openEndTime
+			if (data.openStartTime == '') {
+				this.openTimeVisible = false
+				this.form.openType = 0
+				this.start_time = '09:00'
+				this.form.openStartTime = this.start_time
+			}
+			if (data.openEndTime == '') {
+				this.end_time = '18:00'
+				this.form.openEndTime = this.end_time
+			}
+		},
+		openChange(e) {
+			this.visible = e.target.value ? true : false
+			this.form.open = e.target.value ? 1 : 0
+		},
+		startTimeChange: function(e) {
+			this.start_time = e.detail.value
+			this.form.openStartTime = e.detail.value
+		},
+		endTimeChange: function(e) {
+			this.end_time = e.detail.value
+			this.form.openEndTime = e.detail.value
+		},
+		joinChange(e){
+			this.form.join = e.detail.value
+		},
+		radioChange(e) {
+			this.openTimeVisible = e.detail.value == 0 ? false : true;
+			this.form.openType = e.detail.value == 0 ? 0 : 1; // openType: 0. 24小时 1. xx ~ xx
+			if (this.openTimeVisible) {
+				this.start_time = '09:00'
+				this.end_time = '18:00'
 			}
 		},
-		onLoad() {
+		// 选择地址
+		selectRegion() {
+			if (!this.form.city) {
+				this.$msg('请先选择城市!')
+				return false
+			}
+			this.showRegion = true
+		},
+		changeAreaFn(e) {
+			this.form.address = e.title
+			this.region.lat = e.location.lat
+			this.region.long = e.location.lng
+		},
+		// 省市联动
+		openAddres() {
+			this.$refs.simpleAddress.open()
 		},
-		onShow() {
+		onCityConfirm(e) {
+			this.form.province = e.provinceName
+			this.form.city = e.cityName
+			this.form.address = ''
+			this.region.lat = 0
+			this.region.long = 0
+		},
+		confirmFn() {
+			let hostFn = this.option.id ? update : add
 			if (this.option.id) {
-				uni.setNavigationBarTitle({
-					title: `修改门店`
-				})
-			} else {
-				uni.setNavigationBarTitle({
-					title: `添加门店`
-				})
+				this.form.id = this.option.id
 			}
+			this.form = {...this.form,...this.region}
+			uni.showLoading({mask:true})
+			hostFn(this.form).then(res => {
+				uni.hideLoading()
+				let promptText = this.option.id ? '修改成功!' : '添加成功!'
+				this.$msg(promptText)
+				uni.removeStorageSync('modifyShopB')
+				setTimeout(() => {
+					this.$util.pageTo(1)
+				}, 1000)
+			})
 		},
-		methods: {
-			...mapActions(['setUserShopAll']),
-			init() {
-      	this._getDet()
-			},
-			_resultData(val) {
-				console.log(val)
-				this.form.img = val;
-			},
-			_getDet() {
-				let data = uni.getStorageSync('modifyShopB')
-				if (this.$util.isEmpty(data)) return
-				Object.keys(this.form).forEach((i, index) => {
-					this.form[i] = data[i]
-				})
-				this.region.lat = data.lat
-				this.region.long = data.long
-
-				this.visible = this.form.open == 1 ? true : false
-				this.openTimeVisible = true
-				this.form.openType = 1
-				this.start_time = this.form.openStartTime
-				this.end_time = this.form.openEndTime
-				if (data.openStartTime == '') {
-					this.openTimeVisible = false
-					this.form.openType = 0
-					this.start_time = '09:00'
-					this.form.openStartTime = this.start_time
-				}
-				if (data.openEndTime == '') {
-					this.end_time = '18:00'
-					this.form.openEndTime = this.end_time
-				}
-			},
-			openChange(e) {
-				this.visible = e.target.value ? true : false
-				this.form.open = e.target.value ? 1 : 0
-			},
-			startTimeChange: function(e) {
-				this.start_time = e.detail.value
-        		this.form.openStartTime = e.detail.value
-			},
-			endTimeChange: function(e) {
-				this.end_time = e.detail.value
-				this.form.openEndTime = e.detail.value
-			},
-			joinChange(e){
-				this.form.join = e.detail.value
-			},
-			radioChange(e) {
-				this.openTimeVisible = e.detail.value == 0 ? false : true;
-				this.form.openType = e.detail.value == 0 ? 0 : 1; // openType: 0. 24小时 1. xx ~ xx
-				if (this.openTimeVisible) {
-					this.start_time = '09:00'
-					this.end_time = '18:00'
-				}
-			},
-			// 选择地址
-			selectRegion() {
-				if (!this.form.city) {
-					this.$msg('请先选择城市!')
-					return false
-				}
-				this.showRegion = true
-			},
-			changeAreaFn(e) {
-				this.form.address = e.title
-				this.region.lat = e.location.lat
-				this.region.long = e.location.lng
-			},
-			// 省市联动
-			openAddres() {
-				this.$refs.simpleAddress.open()
-			},
-			onCityConfirm(e) {
-				this.form.province = e.provinceName
-				this.form.city = e.cityName
-				this.form.address = ''
-				this.region.lat = 0
-				this.region.long = 0
-			},
-			confirmFn() {
-				let hostFn = this.option.id ? update : add
-				if (this.option.id) {
-					this.form.id = this.option.id
-				}
-				this.form = {...this.form,...this.region}
-				uni.showLoading({mask:true})
-				hostFn(this.form).then(res => {
-					uni.hideLoading()
-					this.setUserShopAll();
-					let promptText = this.option.id ? '修改成功!' : '添加成功!'
-					this.$msg(promptText)
-					uni.removeStorageSync('modifyShopB')
-					setTimeout(() => {
-						this.$util.pageTo(1)
-					}, 1000)
-				})
-			},
-			// 表单验证
-			formSubmit(e) {
-				// 表单规则
-				let rules = [
-					{
-						name: 'shopName',
-						rule: ['required'],
-						msg: ['请输入名称']
-					},
-					{
-						name: 'mobile',
-						rule: ['required'],
-						msg: ['请输入手机号']
-					},
-					{
-						name: 'province',
-						rule: ['required'],
-						msg: ['请选择地址']
-					},
-					{
-						name: 'address',
-						rule: ['required'],
-						msg: ['请填写详细地址']
-					}
-				]
-				// 进行npm表单检查
-				let formData = e.detail.value
-				let checkRes = form.validation(formData, rules)
-				// 验证通过!
-				if (!checkRes) {
-					this.confirmFn()
-				} else {
-					this.$msg(checkRes)
+		// 表单验证
+		formSubmit(e) {
+			// 表单规则
+			let rules = [
+				{
+					name: 'shopName',
+					rule: ['required'],
+					msg: ['请输入名称']
+				},
+				{
+					name: 'mobile',
+					rule: ['required'],
+					msg: ['请输入手机号']
+				},
+				{
+					name: 'province',
+					rule: ['required'],
+					msg: ['请选择地址']
+				},
+				{
+					name: 'address',
+					rule: ['required'],
+					msg: ['请填写详细地址']
 				}
-			},
-		}
+			]
+			// 进行npm表单检查
+			let formData = e.detail.value
+			let checkRes = form.validation(formData, rules)
+			// 验证通过!
+			if (!checkRes) {
+				this.confirmFn()
+			} else {
+				this.$msg(checkRes)
+			}
+		},
 	}
+}
 </script>
 
 <style lang="scss" scoped>

+ 107 - 108
ghsApp/src/admin/shop/list.vue

@@ -50,124 +50,123 @@
 </template>
 
 <script>
-	import AppAvatarModule from '@/components/module/app-avatar'
-	import AppWrapperEmpty from '@/components/app-wrapper-empty'
-	import ModalModule from '@/components/plugin/modal'
-	import { list } from '@/mixins'
-	// api
-	import { getList, downQrCode, downMemberCode, delShop } from '@/api/shop'
-	import {mapActions} from "vuex";
-	export default {
-		name: 'shop-list',
-		components: {
-			AppAvatarModule,
-			AppWrapperEmpty,
-			ModalModule
-		},
-		mixins: [list],
-		data() {
-			return {
-				// 删除弹窗操作
-				delModal: false,
-				delModalText: '确定删除该员工吗?',
-				operateData: {}
-			}
-		},
-		onPullDownRefresh() {
-			this.resetList()
+import AppAvatarModule from '@/components/module/app-avatar'
+import AppWrapperEmpty from '@/components/app-wrapper-empty'
+import ModalModule from '@/components/plugin/modal'
+import { list } from '@/mixins'
+import { getList, downQrCode, downMemberCode, delShop } from '@/api/shop'
+import {mapActions} from "vuex";
+export default {
+	name: 'shop-list',
+	components: {
+		AppAvatarModule,
+		AppWrapperEmpty,
+		ModalModule
+	},
+	mixins: [list],
+	data() {
+		return {
+			// 删除弹窗操作
+			delModal: false,
+			delModalText: '确定删除该员工吗?',
+			operateData: {}
+		}
+	},
+	onPullDownRefresh() {
+		this.resetList()
+		this._list().then(res => {
+			uni.stopPullDownRefresh()
+		})
+	},
+	onReachBottom() {
+		if (!this.list.finished) {
 			this._list().then(res => {
 				uni.stopPullDownRefresh()
 			})
+		} else {
+			uni.stopPullDownRefresh()
+		}
+	},
+	onShow: function() {
+		// this.setUserShopAll()
+		// this.init()
+	},
+	methods: {
+		...mapActions(['setUserShopAll']),
+		async init() {
+			this._list()
 		},
-		onReachBottom() {
-			if (!this.list.finished) {
-				this._list().then(res => {
-					uni.stopPullDownRefresh()
-				})
-			} else {
-				uni.stopPullDownRefresh()
-			}
+		_list() {
+			return getList().then(res => {
+				this.completes(res)
+			})
 		},
-		onShow: function() {
-			// this.setUserShopAll()
-			// this.init()
+		toModiyFn(item) {
+			uni.setStorageSync('modifyShopB', item)
+			this.pageTo({
+				url: '/admin/shop/add',
+				query: {
+					id: item.id
+				}
+			})
 		},
-		methods: {
-			...mapActions(['setUserShopAll']),
-			async init() {
-				this._list()
-			},
-			_list() {
-				return getList().then(res => {
-					this.completes(res)
-				})
-			},
-			toModiyFn(item) {
-				uni.setStorageSync('modifyShopB', item)
-				this.pageTo({
-					url: '/admin/shop/add',
-					query: {
-						id: item.id
-					}
-				})
-			},
-			// 收款码
-			downQrCodeFn(item, index) {
-				downQrCode({ id: item.id })
-				uni.previewImage({
-					urls: [this.$constant.formal + item.gatheringCode]
-				})
-			},
-			viewQrCodeFn(item) {
-				uni.previewImage({
-					urls: item.gatheringCode
-				})
-			},
-      // 添加门店
-      addModel() {
-        uni.removeStorageSync('modifyShopB')
-        this.pageTo({url:'/admin/shop/add'})
-      },
-			// 会员码
-			downMemberCodeFn(item, index) {
-				downMemberCode({ id: item.id })
-				uni.previewImage({
-					urls: [this.$constant.formal + item.applyMemberCode]
-				})
-			},
-			viewMemberCodeFn(item) {
-				uni.previewImage({
-					urls: item.applyMemberCode
-				})
-			},
-			// 关闭弹窗
-			modalCancel() {
-				this.delModal = false
-				this.roleModal = false
-			},
-			// 删除弹窗
-			delModalFn(item) {
-				this.delModalText = this.tabIndex == 0 ? '确定删除该吗?' : '确定删除该角色吗?'
-				this.operateData = item
-				this.delModal = true
-			},
-			delModalClick(e) {
-				let index = e.index
-				if (index === 0) {
+		// 收款码
+		downQrCodeFn(item, index) {
+			downQrCode({ id: item.id })
+			uni.previewImage({
+				urls: [this.$constant.formal + item.gatheringCode]
+			})
+		},
+		viewQrCodeFn(item) {
+			uni.previewImage({
+				urls: item.gatheringCode
+			})
+		},
+	// 添加门店
+	addModel() {
+	uni.removeStorageSync('modifyShopB')
+	this.pageTo({url:'/admin/shop/add'})
+	},
+		// 会员码
+		downMemberCodeFn(item, index) {
+			downMemberCode({ id: item.id })
+			uni.previewImage({
+				urls: [this.$constant.formal + item.applyMemberCode]
+			})
+		},
+		viewMemberCodeFn(item) {
+			uni.previewImage({
+				urls: item.applyMemberCode
+			})
+		},
+		// 关闭弹窗
+		modalCancel() {
+			this.delModal = false
+			this.roleModal = false
+		},
+		// 删除弹窗
+		delModalFn(item) {
+			this.delModalText = this.tabIndex == 0 ? '确定删除该吗?' : '确定删除该角色吗?'
+			this.operateData = item
+			this.delModal = true
+		},
+		delModalClick(e) {
+			let index = e.index
+			if (index === 0) {
+				this.modalCancel()
+			} else {
+				delShop({ id: this.operateData.id }).then(res => {
 					this.modalCancel()
-				} else {
-					delShop({ id: this.operateData.id }).then(res => {
-						this.modalCancel()
-						this.$msg('删除成功!')
-						setTimeout(() => {
-							this.resetList()
-							this._list()
-						}, 1000)
-					})
-				}
+					this.$msg('删除成功!')
+					setTimeout(() => {
+						this.resetList()
+						this._list()
+					}, 1000)
+				})
 			}
 		}
 	}
+}
 </script>
 
 <style lang="scss" scoped>

+ 188 - 189
hdApp/src/admin/shop/add.vue

@@ -95,206 +95,205 @@
 </template>
 
 <script>
-	import TuiListCell from '@/components/plugin/list-cell'
-	import AppAvatarModule from '@/components/module/app-avatar'
-	import AppUploader from "@/components/app-uploader";
-	import SimpleAddress from '@/components/plugin/simple-address'
-	import AppAreaSel from '@/components/app-area-sel'
-	const form = require('@/utils/formValidation.js')
-	import {mapActions} from "vuex";
-	import { updateShop as update, addShop as add } from '@/api/shop'
-	export default {
-		name: 'staff-add',
-		components: {
-			TuiListCell,
-			AppAvatarModule,
-			SimpleAddress,
-			AppAreaSel,
-			AppUploader
+import TuiListCell from '@/components/plugin/list-cell'
+import AppAvatarModule from '@/components/module/app-avatar'
+import AppUploader from "@/components/app-uploader";
+import SimpleAddress from '@/components/plugin/simple-address'
+import AppAreaSel from '@/components/app-area-sel'
+const form = require('@/utils/formValidation.js')
+import {mapActions} from "vuex";
+import { updateShop as update, addShop as add } from '@/api/shop'
+export default {
+	name: 'staff-add',
+	components: {
+		TuiListCell,
+		AppAvatarModule,
+		SimpleAddress,
+		AppAreaSel,
+		AppUploader
+	},
+	data() {
+		return {
+			visible: true,
+			openTimeVisible: false,
+			start_time: '00:00',
+			end_time: '00:00',
+			form: {
+				join:0,
+				shopName: '',
+				province: '',
+				city: '',
+				address: '',
+				floor: '',
+				open: 1,
+				openType: 0, // openType: 0. 表示 24小时营业 1. 表示 xx ~ xx
+				openStartTime: '',
+				openEndTime: '',
+				introduction: '',
+				mobile: '',
+				img: []
+			},
+			showRegion: false,
+			region: {
+				lat: 0,
+				long: 0
+			},
+			regionData: [],
+			cityPickerValueDefault: [0, 0],
+			img: []
+		}
+	},
+	onLoad() {
+	},
+	onShow() {
+		if (this.option.id) {
+			uni.setNavigationBarTitle({
+				title: `修改门店`
+			})
+		} else {
+			uni.setNavigationBarTitle({
+				title: `添加门店`
+			})
+		}
+	},
+	methods: {
+	...mapActions(['setUserShopAll']),
+		init() {
+			this._getDet()
 		},
-		data() {
-			return {
-				visible: true,
-				openTimeVisible: false,
-				start_time: '00:00',
-      			end_time: '00:00',
-				form: {
-					join:0,
-					shopName: '',
-					province: '',
-					city: '',
-					address: '',
-					floor: '',
-					open: 1,
-					openType: 0, // openType: 0. 表示 24小时营业 1. 表示 xx ~ xx
-					openStartTime: '',
-					openEndTime: '',
-					introduction: '',
-					mobile: '',
-					img: []
-				},
-				showRegion: false,
-				region: {
-					lat: 0,
-					long: 0
-				},
-		        regionData: [],
-				cityPickerValueDefault: [0, 0],
-		        img: []
+		_getDet() {
+			let data = uni.getStorageSync('modifyShopB')
+			if (this.$util.isEmpty(data)){
+				return
+			} 
+			Object.keys(this.form).forEach((i, index) => {
+				this.form[i] = data[i]
+			})
+			this.region.lat = data.lat
+			this.region.long = data.long
+
+			// 营业时间初始化
+			this.visible = this.form.open == 1 ? true : false
+			this.openTimeVisible = true
+			this.form.openType = 1
+			this.start_time = this.form.openStartTime
+			this.end_time = this.form.openEndTime
+			if (data.openStartTime == '') {
+				this.openTimeVisible = false
+				this.form.openType = 0
+				this.start_time = '09:00'
+				this.form.openStartTime = this.start_time
+			}
+			if (data.openEndTime == '') {
+				this.end_time = '18:00'
+				this.form.openEndTime = this.end_time
+			}
+		},
+		openChange(e) {
+			this.visible = e.target.value ? true : false
+			this.form.open = e.target.value ? 1 : 0
+		},
+		startTimeChange: function(e) {
+			this.start_time = e.detail.value
+			this.form.openStartTime = e.detail.value
+		},
+		joinChange(e){
+			this.form.join = e.detail.value
+		},
+		endTimeChange: function(e) {
+			this.end_time = e.detail.value
+			this.form.openEndTime = e.detail.value
+		},
+		radioChange(e) {
+			this.openTimeVisible = e.detail.value == 0 ? false : true;
+			this.form.openType = e.detail.value == 0 ? 0 : 1; // openType: 0. 24小时 1. xx ~ xx
+			if (this.openTimeVisible) {
+				this.start_time = '09:00'
+				this.end_time = '18:00'
 			}
 		},
-		onLoad() {
+		selectRegion() {
+			if (!this.form.city) {
+				this.$msg('请先选择城市!')
+				return false
+			}
+			this.showRegion = true
+		},
+		_resultData(val) {
+			console.log(val)
+			this.form.img = val;
+		},
+		changeAreaFn(e) {
+			console.log('changeAreaFn', e)
+			this.form.address = e.title
+			this.region.lat = e.location.lat
+			this.region.long = e.location.lng
 		},
-		onShow() {
+		// 省市联动
+		openAddres() {
+			this.$refs.simpleAddress.open()
+		},
+		onCityConfirm(e) {
+			this.form.province = e.provinceName
+			this.form.city = e.cityName
+			this.form.address = ''
+			this.region.lat = 0
+			this.region.long = 0
+		},
+		confirmFn() {
+			let hostFn = this.option.id ? update : add
 			if (this.option.id) {
-				uni.setNavigationBarTitle({
-					title: `修改门店`
-				})
-			} else {
-				uni.setNavigationBarTitle({
-					title: `添加门店`
-				})
+				this.form.id = this.option.id
 			}
+			this.form = {...this.form,...this.region}
+			uni.showLoading({mask:true})
+			hostFn(this.form).then(res => {
+				uni.hideLoading()
+				let promptText = this.option.id ? '修改成功!' : '添加成功!'
+				this.$msg(promptText)
+				uni.removeStorageSync('modifyShopB')
+				setTimeout(() => {
+					this.$util.pageTo(1)
+				}, 1000)
+			})
 		},
-		methods: {
-      ...mapActions(['setUserShopAll']),
-			init() {
-                this._getDet()
-			},
-			_getDet() {
-				let data = uni.getStorageSync('modifyShopB')
-				if (this.$util.isEmpty(data)){
-					return
-				} 
-				Object.keys(this.form).forEach((i, index) => {
-					this.form[i] = data[i]
-				})
-				this.region.lat = data.lat
-				this.region.long = data.long
-
-				// 营业时间初始化
-				this.visible = this.form.open == 1 ? true : false
-				this.openTimeVisible = true
-				this.form.openType = 1
-				this.start_time = this.form.openStartTime
-				this.end_time = this.form.openEndTime
-				if (data.openStartTime == '') {
-					this.openTimeVisible = false
-					this.form.openType = 0
-					this.start_time = '09:00'
-					this.form.openStartTime = this.start_time
-				}
-				if (data.openEndTime == '') {
-					this.end_time = '18:00'
-					this.form.openEndTime = this.end_time
-				}
-			},
-			openChange(e) {
-				this.visible = e.target.value ? true : false
-				this.form.open = e.target.value ? 1 : 0
-			},
-			startTimeChange: function(e) {
-				this.start_time = e.detail.value
-        		this.form.openStartTime = e.detail.value
-			},
-			joinChange(e){
-				this.form.join = e.detail.value
-			},
-			endTimeChange: function(e) {
-				this.end_time = e.detail.value
-				this.form.openEndTime = e.detail.value
-			},
-			radioChange(e) {
-				this.openTimeVisible = e.detail.value == 0 ? false : true;
-				this.form.openType = e.detail.value == 0 ? 0 : 1; // openType: 0. 24小时 1. xx ~ xx
-				if (this.openTimeVisible) {
-					this.start_time = '09:00'
-					this.end_time = '18:00'
-				}
-			},
-			selectRegion() {
-				if (!this.form.city) {
-					this.$msg('请先选择城市!')
-					return false
-				}
-				this.showRegion = true
-			},
-			_resultData(val) {
-				console.log(val)
-				this.form.img = val;
-			},
-			changeAreaFn(e) {
-				console.log('changeAreaFn', e)
-				this.form.address = e.title
-				this.region.lat = e.location.lat
-				this.region.long = e.location.lng
-			},
-			// 省市联动
-			openAddres() {
-				this.$refs.simpleAddress.open()
-			},
-			onCityConfirm(e) {
-				this.form.province = e.provinceName
-				this.form.city = e.cityName
-				this.form.address = ''
-				this.region.lat = 0
-				this.region.long = 0
-			},
-			confirmFn() {
-				let hostFn = this.option.id ? update : add
-				if (this.option.id) {
-					this.form.id = this.option.id
-				}
-				this.form = {...this.form,...this.region}
-				uni.showLoading({mask:true})
-				hostFn(this.form).then(res => {
-					uni.hideLoading()
-          			this.setUserShopAll();
-					let promptText = this.option.id ? '修改成功!' : '添加成功!'
-					this.$msg(promptText)
-					uni.removeStorageSync('modifyShopB')
-					setTimeout(() => {
-					    this.$util.pageTo(1)
-          			}, 1000)
-				})
-			},
-			// 表单验证
-			formSubmit(e) {
-				// 表单规则
-				let rules = [
-					{
-						name: 'shopName',
-						rule: ['required'],
-						msg: ['请输入名称']
-					},
-					{
-						name: 'mobile',
-						rule: ['required'],
-						msg: ['请输入手机号']
-					},
-					{
-						name: 'province',
-						rule: ['required'],
-						msg: ['请选择地址']
-					},
-					{
-						name: 'address',
-						rule: ['required'],
-						msg: ['请填写详细地址']
-					}
-				]
-				// 进行表单检查
-				let formData = e.detail.value
-				let checkRes = form.validation(formData, rules)
-				// 验证通过!
-				if (!checkRes) {
-					this.confirmFn()
-				} else {
-					this.$msg(checkRes)
+		// 表单验证
+		formSubmit(e) {
+			// 表单规则
+			let rules = [
+				{
+					name: 'shopName',
+					rule: ['required'],
+					msg: ['请输入名称']
+				},
+				{
+					name: 'mobile',
+					rule: ['required'],
+					msg: ['请输入手机号']
+				},
+				{
+					name: 'province',
+					rule: ['required'],
+					msg: ['请选择地址']
+				},
+				{
+					name: 'address',
+					rule: ['required'],
+					msg: ['请填写详细地址']
 				}
+			]
+			// 进行表单检查
+			let formData = e.detail.value
+			let checkRes = form.validation(formData, rules)
+			// 验证通过!
+			if (!checkRes) {
+				this.confirmFn()
+			} else {
+				this.$msg(checkRes)
 			}
 		}
 	}
+}
 </script>
 
 <style lang="scss" scoped>