Browse Source

测试

master
unknown 1 year ago
parent
commit
78c9bfbcd8
  1. 5
      pages/tabbar/index/index.vue
  2. 4
      store/index.js
  3. 0
      store/modules/school.js
  4. 1
      store/modules/user.js

5
pages/tabbar/index/index.vue

@ -16,7 +16,7 @@
</view> </view>
</view> </view>
</u-navbar> --> </u-navbar> -->
<button @click="refereshFn">刷新token</button>
<!-- <button @click="refereshFn">刷新token</button> -->
<view class="TopCon" :style="{ backgroundImage: `url(${imgUrl})`, backgroundSize: backgroundSize }"> <view class="TopCon" :style="{ backgroundImage: `url(${imgUrl})`, backgroundSize: backgroundSize }">
<view class="status_bar"></view> <view class="status_bar"></view>
<!-- 地址扫一扫 --> <!-- 地址扫一扫 -->
@ -277,7 +277,8 @@
}, },
async onLoad() { async onLoad() {
await this.$store.dispatch('getCity') await this.$store.dispatch('getCity')
// console.log(' ')
console.log('有 啦')
console.log(this.$store.state.user.vuex_cityInfo)
// console.log(this.$store.state.user.vuex_cityInfo) // console.log(this.$store.state.user.vuex_cityInfo)
}, },

4
store/index.js

@ -1,6 +1,6 @@
import Vue from 'vue'; import Vue from 'vue';
import Vuex from 'vuex'; import Vuex from 'vuex';
import add from './modules/add';
import school from './modules/school';
import user from './modules/user'; import user from './modules/user';
import getters from './getters'; import getters from './getters';
@ -26,7 +26,7 @@ const store = new Vuex.Store({
}, },
modules: { modules: {
add,
school,
user, user,
}, },
}); });

0
store/modules/add.js → store/modules/school.js

1
store/modules/user.js

@ -34,6 +34,7 @@ const user = {
getCity({commit}) { getCity({commit}) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
// #ifdef APP-PLUS||H5 // #ifdef APP-PLUS||H5
console.log('h5经纬度的代码')
getCityInfo(resolve, reject,commit) getCityInfo(resolve, reject,commit)
// #endif // #endif
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN

Loading…
Cancel
Save