|
|
@@ -25,6 +25,7 @@
|
|
|
<script>
|
|
|
import DropdownList from "@/components/plugin/dropdown-list";
|
|
|
import {mapGetters,mapState} from "vuex";
|
|
|
+import { shopAll } from '@/api/common'
|
|
|
export default {
|
|
|
name:'DorpdownSelect',
|
|
|
components:{
|
|
|
@@ -61,23 +62,21 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
computed:{
|
|
|
- ...mapGetters(["getMyShopInfo"]),
|
|
|
- ...mapState({
|
|
|
- userShopAll:state=>state.user.userShopAll
|
|
|
- }),
|
|
|
+ ...mapGetters(["getMyShopInfo"])
|
|
|
},
|
|
|
mounted(){
|
|
|
- this.shopList = this.userShopAll.map(i=>({...i,name:i.shopName}))
|
|
|
+ this.shopList = []
|
|
|
+ shopAll().then(res=>{
|
|
|
+ if(res.code == 1){
|
|
|
+ if (!this.$util.isEmpty(res.data)){
|
|
|
+ res.data.forEach((i) => {
|
|
|
+ this.shopList.push({id:i.id,name:i.shopName})
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
watch:{
|
|
|
- userShopAll (val) {
|
|
|
- if(!this.$util.isEmpty(val)) {
|
|
|
- this.shopList = val.map(i=>({
|
|
|
- ...i,
|
|
|
- name:i.shopName
|
|
|
- }));
|
|
|
- }
|
|
|
- }
|
|
|
},
|
|
|
methods:{
|
|
|
switchCut(){
|