|
|
@@ -174,6 +174,14 @@
|
|
|
|
|
|
<script>
|
|
|
import { upload } from '@/api/ask.js';
|
|
|
+ import {
|
|
|
+ saveUrl,
|
|
|
+ interceptor
|
|
|
+ } from '@/utils/loginUtils.js';
|
|
|
+ import {
|
|
|
+ mapState,
|
|
|
+ mapMutations
|
|
|
+ } from 'vuex';
|
|
|
import { getProjectInfo, createProject, getLogistics, getDonationInfo, createUser,getAllArea } from '../../api/money.js';
|
|
|
export default {
|
|
|
data() {
|
|
|
@@ -256,6 +264,33 @@
|
|
|
|
|
|
this.getLogistics()
|
|
|
},
|
|
|
+ onShow() {
|
|
|
+ if (!this.hasLogin) {
|
|
|
+ uni.showModal({
|
|
|
+ title: '登录',
|
|
|
+ content: '您未登录,是否马上登陆?',
|
|
|
+ success: e => {
|
|
|
+ if (e.confirm) {
|
|
|
+ saveUrl()
|
|
|
+ interceptor();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ fail: e => {
|
|
|
+ console.log(e);
|
|
|
+ uni.showModal({
|
|
|
+ title: 'cuowu',
|
|
|
+ content: JSON.stringify(e),
|
|
|
+ })
|
|
|
+ }
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ // this.loadData();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ ...mapState('user', ['userInfo', 'baseURL', 'hasLogin']),
|
|
|
+ ...mapState(['weichatObj']),
|
|
|
+ },
|
|
|
mounted() {
|
|
|
// this.$set(this,'wzList',[this.wz1,this.wz2])
|
|
|
},
|