-
+
-
小荣超市11111
-

+
{{ item.shopName }}
+
-
麒麟区南宁街道潇湘社区
-
-
-
-
小荣超市11111
-

-
-
麒麟区南宁街道潇湘社区
+
{{ item.address }}
+
@@ -24,14 +18,39 @@ export default {
appName: '我的门店',
data() {
return {
-
+ list: [],
+ current: 1,
+ pages: 2
}
},
+ onLoad() {
+ this.getShopList()
+ },
methods: {
- toStoreForm() {
- uni.navigateTo({url: './storeForm'})
+ getShopList() {
+ if(this.current > this.pages) return
+ this.$loading()
+ this.$instance.post(`/app/appshoparchives/list`, null, {
+ params: {
+ current: this.current,
+ size: 15,
+ }
+ }).then(res => {
+ if (res?.data) {
+ this.list = this.current == 1 ? list : [this.list, list].flat()
+ this.pages = res.data.total
+ }
+ }).finally(() => uni.hideLoading())
+ },
+ toStoreForm(id) {
+ uni.navigateTo({url: `./storeForm?shopId=${id}`})
}
},
+ onReachBottom() {
+ this.current ++
+ this.getShopList()
+ }
+
}
diff --git a/src/project/fengdu/AppMine/storeForm.vue b/src/project/fengdu/AppMine/storeForm.vue
index d6e24f8..6d03e0a 100644
--- a/src/project/fengdu/AppMine/storeForm.vue
+++ b/src/project/fengdu/AppMine/storeForm.vue
@@ -4,15 +4,15 @@
门店照
-
-

+
+
@@ -21,7 +21,7 @@
经营类型
- 111
+ {{ $dict.getLabel('operatorType', detailInfo.operatorType) }}
@@ -29,29 +29,44 @@
-
+
-
地址
+
门店住址
-
+
+ {{ detailInfo.areaName || '请选择'}}
+
+
+
+
+
+
-
@@ -64,45 +79,53 @@ export default {
return {
form: {
name : ''
- }
+ },
+
+ shopId: '',
+ detailInfo: {},
+ showOperatorType: false
}
},
+ onLoad(e) {
+ this.shopId = e.shopId
+ this.$dict.load(['operatorType']).then(() => {
+ // this.getDetail()
+ })
+ },
methods: {
- upload() {
- if (!this.token) {
- this.$refs.login.show()
-
- return false
- }
-
- this.imgList = []
- this.hideStatus = false
- uni.chooseImage({
- count: this.limit,
- sizeType: ['compressed'],
- sourceType: ['album', 'camera'],
+ getDetail() {
+ this.$instance.post(`/app/appshoparchives/queryDetailById?id=${this.shopId}`).then(res => {
+ if (res?.data) {
+ this.detailInfo = res.data
+ }
+ })
+ },
+ confirmOperatorType(e) {
+ this.detailInfo.operatorType = e[0].value
+ },
+ submit() {
+ this.$instance.post(`/app/appshoparchives/addOrUpdate?id=${this.shopId}`).then(res => {
+ if (res?.data) {
+ this.detailInfo = res.data
+ }
+ })
+ },
+ uploadImg() {
+ console.log(123)
+ uni.chooseMedia({
+ count: 1,
+ mediaType: ['image'],
success: (res) => {
- if (res.tempFilePaths.length > 9) {
- this.$toast(`图片不能超过9张`)
-
+ if (res.tempFilePaths.length > 1) {
+ this.$toast(`门店头像不能超过1张`)
return false
}
-
this.$loading('上传中')
- res.tempFilePaths.forEach((item, index) => {
- if (index === res.tempFilePaths.length - 1) {
- this.hideStatus = true
- }
-
- this.$nextTick(() => {
- this.uploadFile(item, res.tempFilePaths.length)
- })
- })
+ this.uploadFile(res.tempFilePaths[0])
},
})
},
-
- uploadFile(img, total) {
+ uploadFile(img) {
uni.uploadFile({
url: this.$instance.defaults.baseURL + '/admin/file/add',
filePath: img,
@@ -112,33 +135,8 @@ export default {
Authorization: uni.getStorageSync('token'),
},
success: (res) => {
- const data = JSON.parse(res.data)
-
- if (data.code === 0) {
- this.imgList.push(data.data[0].split(';')[0])
- } else {
- this.$toast(data.msg)
- }
- },
- complete: () => {
- this.$nextTick(() => {
- if (this.imgList.length === total && this.hideStatus) {
- this.$instance.post(`/app/appvillagepicturealbum/addPictures`, {
- areaName: uni.getStorageSync('areaName'),
- areaId: uni.getStorageSync('areaId'),
- type: this.type,
- urlList: this.imgList
- }).then(res => {
- if (res.code == 0) {
- this.getList(this.type)
- this.getTotalInfo(this.type)
- uni.$emit('update')
- }
- this.$hideLoading()
- this.hideStatus = false
- })
- }
- })
+ this.detailInfo.fileUrl = JSON.parse(res.data).data[0].split(';')[0]
+ this.$hideLoading()
}
})
},
@@ -225,5 +223,11 @@ export default {
u-icon {
margin-left: 16px;
}
+ .ai-area__wrapper {
+ span {
+ display: inline-block;
+ font-size: 28px;
+ }
+ }
}
\ No newline at end of file
diff --git a/src/project/fengdu/AppStore/AppStore.vue b/src/project/fengdu/AppStore/AppStore.vue
index d23b130..54a8acf 100644
--- a/src/project/fengdu/AppStore/AppStore.vue
+++ b/src/project/fengdu/AppStore/AppStore.vue
@@ -37,11 +37,11 @@ export default {
},
toEvaluateForm(e) {
console.log(e)
- uni.navigateTo({url: './EvaluateForm'})
+ uni.navigateTo({url: `./EvaluateForm?shopId=${e.shopId}`})
},
toStoreDetail(e) {
console.log(e)
- uni.navigateTo({url: './StoreDetail'})
+ uni.navigateTo({url: `./StoreDetail?shopId=${e.shopId}`})
},
},
diff --git a/src/project/fengdu/AppStore/EvaluateForm.vue b/src/project/fengdu/AppStore/EvaluateForm.vue
index 4359091..1b27ffe 100644
--- a/src/project/fengdu/AppStore/EvaluateForm.vue
+++ b/src/project/fengdu/AppStore/EvaluateForm.vue
@@ -1,23 +1,23 @@