merge
This commit is contained in:
@@ -149,16 +149,16 @@
|
||||
<!-- 选择店铺 -->
|
||||
<uni-popup ref="storePopup">
|
||||
<view class="category-popup">
|
||||
<block v-if="storesArr.length <0">
|
||||
<block v-if="storesArr.length>0">
|
||||
<view class="header">
|
||||
<view class="title">选择店铺</view>
|
||||
</view>
|
||||
<view class="category-flex">
|
||||
<scroll-view class="category-flex" scroll-y="true">
|
||||
<view class="category-flex-item" :class="{'show' : item.check}" v-for="(item, index) in storesArr" :key="index" @click="item.check = !item.check">
|
||||
<view class="category-name">{{item.name}}</view>
|
||||
<view class="category-content">{{item.address}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="btns">
|
||||
<button type="default" size="default" @click="affirmCategory('stores', 'storePopup')">确定</button>
|
||||
</view>
|
||||
@@ -169,7 +169,7 @@
|
||||
<button type="default" size="default" @click="$Router.push({name:'shopCreate'})">新建店铺</button>
|
||||
</view>
|
||||
<view v-else>
|
||||
<view class="btns" v-if="storePer">
|
||||
<view class="btns">
|
||||
<button type="default" size="default">当前没有创建店铺的权限</button>
|
||||
</view>
|
||||
</view>
|
||||
@@ -237,7 +237,49 @@
|
||||
},
|
||||
onShow(){
|
||||
if(this.shopRefresh){
|
||||
// 刷新店铺
|
||||
// 编辑状态信息
|
||||
if(this.$Route.query.type && this.$Route.query.type === 'edit'){
|
||||
managesGoodsEdit(this.$Route.query.id).then(res => {
|
||||
let storesArr = res.stores.map(val => {
|
||||
let check = (res.data.stores.findIndex(obj => obj.store_id === val.store_id)) >= 0
|
||||
if(check){
|
||||
stores.push(val.store_id)
|
||||
}
|
||||
return {
|
||||
check,
|
||||
...val
|
||||
}
|
||||
})
|
||||
this.storesArr = storesArr
|
||||
this.stores = stores
|
||||
this.storePer = res.storePer
|
||||
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon : 'none'
|
||||
})
|
||||
})
|
||||
return
|
||||
}
|
||||
// 添加配置信息
|
||||
managesCreate({
|
||||
category_cid: this.$Route.query.cid
|
||||
}).then(res => {
|
||||
res.stores = res.stores.map(val => {
|
||||
return {
|
||||
check: false,
|
||||
...val
|
||||
}
|
||||
})
|
||||
this.storesArr = res.stores
|
||||
this.storePer = res.storePer
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon : 'none'
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
10
unpackage/dist/dev/app-plus/app-service.js
vendored
10
unpackage/dist/dev/app-plus/app-service.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user