|
|
@@ -7,16 +7,10 @@
|
|
|
<div>
|
|
|
<van-cell-group :border="false">
|
|
|
<van-cell title="LOGO" is-link @click="changeLogo" class="avatar">
|
|
|
- <van-image
|
|
|
- round
|
|
|
- width="36"
|
|
|
- height="36"
|
|
|
- :src="storeInfo ? storeInfo.logo : '/native/svgs/img_defaultphoto.svg'"
|
|
|
- fit="cover"
|
|
|
- />
|
|
|
+ <van-image round width="36" height="36" :src="storeLogo" fit="cover" />
|
|
|
</van-cell>
|
|
|
<van-cell title="店铺名称" @click="goChange" :value="storeInfo ? storeInfo.storeName : ''" is-link />
|
|
|
- <van-cell title="店铺地区" is-link :class="{ not: !city }" @click="$refs.area.init()">
|
|
|
+ <van-cell title="店铺地区" :border="false" is-link :class="{ not: !city }" @click="$refs.area.init()">
|
|
|
<span>{{ city || '未设置' }}</span>
|
|
|
</van-cell>
|
|
|
</van-cell-group>
|
|
|
@@ -28,28 +22,13 @@
|
|
|
<script>
|
|
|
import { mapState } from 'vuex';
|
|
|
import areaSelect from '../../components/areaSelect.vue';
|
|
|
+import store from '../../mixins/store';
|
|
|
export default {
|
|
|
components: { areaSelect },
|
|
|
+ mixins: [store],
|
|
|
name: 'Setting',
|
|
|
- data() {
|
|
|
- return {
|
|
|
- storeInfo: {}
|
|
|
- };
|
|
|
- },
|
|
|
computed: {
|
|
|
- ...mapState(['userStoreInfo']),
|
|
|
- city() {
|
|
|
- if (this.userStoreInfo) {
|
|
|
- if (/[\u4e00-\u9fa5]/.test(this.userStoreInfo.city)) {
|
|
|
- let province = this.userStoreInfo.province.replace(/省/, '');
|
|
|
- province = province.replace(/自治区/, '');
|
|
|
- let city = this.userStoreInfo.city.replace(/市/, '');
|
|
|
- return province + ' ' + city;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- return '';
|
|
|
- }
|
|
|
+ ...mapState(['userStoreInfo'])
|
|
|
},
|
|
|
watch: {
|
|
|
userStoreInfo() {
|