diff --git a/src/mods/publicity/AppNotice/AppNotice.vue b/src/mods/publicity/AppNotice/AppNotice.vue index c66f173..60b8caf 100644 --- a/src/mods/publicity/AppNotice/AppNotice.vue +++ b/src/mods/publicity/AppNotice/AppNotice.vue @@ -13,6 +13,9 @@
+ @@ -27,6 +30,7 @@ export default { pageShow: false, detail: {}, images: [], + showStore: false } }, onLoad({id}) { @@ -52,6 +56,9 @@ export default { this.$hideLoading() }) + }, + toAppStore() { + uni.navigateTo({url: '/pages/AppStore/AppStore'}) } }, } @@ -106,5 +113,27 @@ export default { margin-top: 32px; } } + .footer { + position: fixed; + bottom: 0; + left: 0; + width: 100%; + padding: 20px 32px 88px 32px; + box-sizing: border-box; + background: #FFF; + z-index: 999; + .btn { + width: 100%; + height: 80px; + background: #2D7DFF; + border-radius: 40px; + font-family: PingFangSC-Medium; + font-weight: 500; + font-size: 34px; + color: #FFF; + text-align: center; + line-height: 80px; + } + } } diff --git a/src/project/fengdu/AppMine/myStoreList.vue b/src/project/fengdu/AppMine/myStoreList.vue index 3e30030..463ad6e 100644 --- a/src/project/fengdu/AppMine/myStoreList.vue +++ b/src/project/fengdu/AppMine/myStoreList.vue @@ -1,19 +1,13 @@ @@ -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 @@ @@ -75,14 +84,60 @@ export default { appName: '门店情况', data() { return { - + shopId: '', + detailInfo: {}, + assessList: [], + typeList: [ + {dictName: '全部', dictValue: '', num: '30'}, + {dictName: '111', dictValue: '', num: '30'}, + {dictName: '222', dictValue: '', num: '30'} + ], + typeIndex: 0, + current: 1, + pages: 2 } }, + onLoad(e) { + console.log(e) + this.shopId = e.shopId + this.$dict.load(['operatorType']).then(() => { + this.getDetail() + this.getAssessList() + }) + uni.$on('updateStore', () => { + this.getDetail() + this.getAssessList() + }) + }, methods: { + getDetail() { + this.$instance.post(`/app/appshoparchives/queryDetailById?id=${this.shopId}`).then(res => { + if (res?.data) { + this.detailInfo = res.data + } + }) + }, + getAssessList() { + if(this.current > this.pages) return + this.$loading() + this.$instance.post(`/app/appshopassess/list?shopId=${this.shopId}¤t=${this.current}`).then(res => { + if (res?.data) { + this.assessList = this.current == 1 ? res.data.records : [this.list, res.data.records].flat() + this.pages = res.data.total + } + }).finally(() => uni.hideLoading()) + }, + typeClick(e) { + this.typeIndex = e + }, toEvaluateForm() { - uni.navigateTo({url: './EvaluateForm'}) + uni.navigateTo({url: `./EvaluateForm?shopId=${this.shopId}`}) } }, + onReachBottom() { + this.current++ + this.getAssessList() + } } @@ -96,7 +151,7 @@ export default { padding: 40px 32px 32px 32px; box-sizing: border-box; background-image: url("https://cdn.cunwuyun.cn/wechat/fd-store/store-detail-headerBg.png"); - background-size: 100vw; + background-size: cover; background-repeat: no-repeat; .flex-top { display: flex; diff --git a/src/project/fengdu/AppStore/components/Evaluate.vue b/src/project/fengdu/AppStore/components/Evaluate.vue index 32b9e5a..048cea4 100644 --- a/src/project/fengdu/AppStore/components/Evaluate.vue +++ b/src/project/fengdu/AppStore/components/Evaluate.vue @@ -3,61 +3,71 @@