门店
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import {mapState} from 'vuex'
|
||||
export default {
|
||||
name: 'myStoreList',
|
||||
appName: '我的门店',
|
||||
@@ -23,7 +23,10 @@ export default {
|
||||
pages: 2
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
computed: {
|
||||
...mapState(['user'])
|
||||
},
|
||||
onShow() {
|
||||
this.getShopList()
|
||||
},
|
||||
methods: {
|
||||
@@ -34,10 +37,12 @@ export default {
|
||||
params: {
|
||||
current: this.current,
|
||||
size: 15,
|
||||
phone: 15527637203
|
||||
// phone: this.user.phone
|
||||
}
|
||||
}).then(res => {
|
||||
if (res?.data) {
|
||||
this.list = this.current == 1 ? list : [this.list, list].flat()
|
||||
this.list = this.current == 1 ? res.data.records : [this.list, res.data.records].flat()
|
||||
this.pages = res.data.total
|
||||
}
|
||||
}).finally(() => uni.hideLoading())
|
||||
|
||||
@@ -89,7 +89,7 @@ export default {
|
||||
onLoad(e) {
|
||||
this.shopId = e.shopId
|
||||
this.$dict.load(['operatorType']).then(() => {
|
||||
// this.getDetail()
|
||||
this.getDetail()
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
@@ -104,9 +104,14 @@ export default {
|
||||
this.detailInfo.operatorType = e[0].value
|
||||
},
|
||||
submit() {
|
||||
this.$instance.post(`/app/appshoparchives/addOrUpdate?id=${this.shopId}`).then(res => {
|
||||
this.$instance.post(`/app/appshoparchives/addOrUpdate`, {
|
||||
...this.detailInfo
|
||||
}).then(res => {
|
||||
if (res?.data) {
|
||||
this.detailInfo = res.data
|
||||
this.$toast('修改成功')
|
||||
setTimeout(() => {
|
||||
uni.navigateBack()
|
||||
}, 300);
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -116,12 +121,13 @@ export default {
|
||||
count: 1,
|
||||
mediaType: ['image'],
|
||||
success: (res) => {
|
||||
if (res.tempFilePaths.length > 1) {
|
||||
console.log(res)
|
||||
if (res.tempFiles.length > 1) {
|
||||
this.$toast(`门店头像不能超过1张`)
|
||||
return false
|
||||
}
|
||||
this.$loading('上传中')
|
||||
this.uploadFile(res.tempFilePaths[0])
|
||||
this.uploadFile(res.tempFiles[0].tempFilePath)
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user