Browse Source

生产轮播图,首页限制,上传图片问题修改

master
aBin 4 years ago
parent
commit
713f4cce36
  1. 2
      pages/Athletes/AthAdd.vue
  2. 2
      pages/Coach/Coach.vue
  3. 2
      pages/First/Choose.vue
  4. 22
      pages/First/First.vue
  5. 2
      pages/Leader/Leader.vue
  6. 12
      pages/Login/Register.vue
  7. 12
      pages/Login/Retrieve.vue
  8. 2
      store/modules/project/mutations.js
  9. 6
      utils/user.js

2
pages/Athletes/AthAdd.vue

@ -305,7 +305,7 @@ import { mapState } from 'vuex'
// that.urlTobase64(res.tempFilePaths[0],type);
uni.uploadFile({
url: '//test.tall.wiki/gateway/mt/file/upload/photo',
url: '//www.tall.wiki/gateway/mt/file/upload/photo',
// url: '//www.tall.wiki/gateway/mt/file/upload/photo',
filePath: tempFilePaths,
header:{

2
pages/Coach/Coach.vue

@ -126,7 +126,7 @@
const tempFilePaths = res.tempFilePaths[0]
that[`${type}`] = tempFilePaths
uni.uploadFile({
url: '//test.tall.wiki/gateway/mt/file/upload/photo',
url: '//www.tall.wiki/gateway/mt/file/upload/photo',
// url: '//www.tall.wiki/gateway/mt/file/upload/photo',
filePath: tempFilePaths,
header:{

2
pages/First/Choose.vue

@ -40,7 +40,7 @@
jump(item) {
console.log(item.competeStatus)
if(item.competeStatus === 1) {
this.setCompanyId(item.id)
// this.setCompanyId(item.id)
this.setType(item.type)
uni.navigateTo({
url:`../First/First`

22
pages/First/First.vue

@ -10,7 +10,7 @@
<view class="item-num">{{ index + 1 }}</view>
<text class="item-content">{{ item.title }}</text>
<view v-show="item.complete + 1" class="item-infor">
<text v-if="!datalist.companyId">请填写</text>
<text v-if="companyId === 0">请填写</text>
<text v-else>已填写</text>
</view>
<view v-show="item.leader + 1" class="item-infor">
@ -27,7 +27,7 @@
</template>
<script>
import { mapState } from 'vuex';
import { mapState,mapMutations } from 'vuex';
import { competeTime } from 'api/competeTime'
import { overview } from 'api/overview'
export default {
@ -51,7 +51,6 @@ import { overview } from 'api/overview'
project: 0
}],
projectId: 0,
companyId: 0,
datalist: {
guideNum:0,
coachNum:0,
@ -84,8 +83,9 @@ import { overview } from 'api/overview'
that.query()
}
},
computed: mapState('project',['type']),
computed: mapState('project',['type','companyId']),
methods: {
...mapMutations('project',['setCompanyId']),
async query () {
const that = this
try{
@ -105,19 +105,15 @@ import { overview } from 'api/overview'
}
}
const datalist = await overview(params)
if (datalist.companyId) {
that.companyId = datalist.companyId
}
// console.log(datalist.companyId)
if (datalist && datalist.companyId) {
that.setCompanyId(datalist.companyId)
that.datalist = datalist
that.$store.state.project.companyId = datalist.companyId
// console.log(that.$store.state.project.companyId)
}
}
}catch(e){
//TODO handle the exception
if (e === 'error') {
uni.showToast({
title: '提交失败',
title: '查询单位信息失败,请重新登录',
icon: 'none',
duration: 1500
})
@ -132,7 +128,7 @@ import { overview } from 'api/overview'
},
jump (num) {
const that = this
if (that.$store.state.project.companyId) {
if (that.companyId) {
if (num === 0) {
uni.navigateTo({
url:`../Basics/Basics?id=${that.projectId}&companyId=${that.companyId}`

2
pages/Leader/Leader.vue

@ -256,7 +256,7 @@ import { coachInfo } from 'api/coachInfo'
const tempFilePaths = res.tempFilePaths[0]
that[`${type}`] = tempFilePaths
uni.uploadFile({
url: '//test.tall.wiki/gateway/mt/file/upload/photo',
url: '//www.tall.wiki/gateway/mt/file/upload/photo',
// url: '//www.tall.wiki/gateway/mt/file/upload/photo',
filePath: tempFilePaths,
header:{

12
pages/Login/Register.vue

@ -421,8 +421,12 @@ import { phone } from 'api/phone'
swiperList: [{
id: 0,
type: 'img',
url: 'static/title.png'
url: 'static/item00.png'
}, {
// id: 0,
// type: 'img',
// url: 'static/title.png'
// }, {
id: 1,
type: 'img',
url: 'static/item01.png',
@ -430,7 +434,11 @@ import { phone } from 'api/phone'
id: 2,
type: 'img',
url: 'static/item02.png'
}]
},{
id: 3,
type: 'img',
url: 'static/item04.jpg'
},]
}
},
methods: {

12
pages/Login/Retrieve.vue

@ -54,8 +54,12 @@ import { getcode } from 'api/getcode'
swiperList: [{
id: 0,
type: 'img',
url: 'static/title.png'
url: 'static/item00.png'
}, {
// id: 0,
// type: 'img',
// url: 'static/title.png'
// }, {
id: 1,
type: 'img',
url: 'static/item01.png',
@ -63,7 +67,11 @@ import { getcode } from 'api/getcode'
id: 2,
type: 'img',
url: 'static/item02.png'
}]
},{
id: 3,
type: 'img',
url: 'static/item04.jpg'
},]
}
},
methods: {

2
store/modules/project/mutations.js

@ -1,6 +1,6 @@
const mutations = {
/*
存取比赛的Id
存取单位的Id
*/
setCompanyId(state,data) {
state.companyId = data

6
utils/user.js

@ -54,7 +54,7 @@ export const wxLogin = () => {
client: SIGN_IN_CLIENTS['mp'],
type: SIGN_IN_TYPES['mp'],
data: { identifier: response.code, credential: 'health' },
// redirect: 'https://test.tall.wiki/gateway/health/initMsg',
// redirect: 'https://www.tall.wiki/gateway/health/initMsg',
redirect: 'https://www.tall.wiki/gateway/health/initMsg',
};
resolve(params);
@ -81,8 +81,8 @@ export const wxWorkLogin = () => {
client: SIGN_IN_CLIENTS['wx_work'],
type: SIGN_IN_TYPES['wx_work'],
data: { identifier: response.code, credential: 'health' },
// redirect: 'https://test.tall.wiki/gateway/health/initMsg',
redirect: 'https://www.tall.wiki/gateway/health/initMsg',
// redirect: 'https://www.tall.wiki/gateway/health/initMsg',
redirect: 'https://test.tall.wiki/gateway/health/initMsg',
};
resolve(params);
} else {

Loading…
Cancel
Save