Commit 508a9ba24bf5dd0c6978c4371f469cdc230eac1c
1 parent
9b1c150c
1
Showing
5 changed files
with
48 additions
and
35 deletions
manifest.json
pages/home/home.vue
| 1 | <template> | 1 | <template> |
| 2 | <view class="page"> | 2 | <view class="page"> |
| 3 | + <view | ||
| 4 | + style="position: absolute; top: 0;text-align: center;width: 100%;padding-top: 5px;color: #000;z-index: 99;font-weight: bold;"> | ||
| 5 | + 德阳高新区企业服务中心</view> | ||
| 3 | <view style="position: absolute; top: 0; width: 100%;z-index: 0;"> | 6 | <view style="position: absolute; top: 0; width: 100%;z-index: 0;"> |
| 4 | <image src="../../static/bg.png" style="width: 100%; height: 450rpx;"></image> | 7 | <image src="../../static/bg.png" style="width: 100%; height: 450rpx;"></image> |
| 5 | </view> | 8 | </view> |
| @@ -14,7 +17,7 @@ | @@ -14,7 +17,7 @@ | ||
| 14 | <view class="search"> | 17 | <view class="search"> |
| 15 | <image src="../../static/fdj.png"></image> | 18 | <image src="../../static/fdj.png"></image> |
| 16 | <text></text> | 19 | <text></text> |
| 17 | - <input type="text" v-model="selectName" placeholder="搜索关键词" @input="getMoHuList()" /> | 20 | + <input type="text" v-model="selectName" placeholder="搜索关键词1" @input="getMoHuList()" /> |
| 18 | </view> | 21 | </view> |
| 19 | <view class="btn"> | 22 | <view class="btn"> |
| 20 | <text>搜索</text> | 23 | <text>搜索</text> |
| @@ -50,7 +53,7 @@ | @@ -50,7 +53,7 @@ | ||
| 50 | </view> | 53 | </view> |
| 51 | <view class="list" @click="Feedback"> | 54 | <view class="list" @click="Feedback"> |
| 52 | <image src="../../static/nav/nav_ico3.png"></image> | 55 | <image src="../../static/nav/nav_ico3.png"></image> |
| 53 | - <text>我要办事</text> | 56 | + <text>意见反馈</text> |
| 54 | </view> | 57 | </view> |
| 55 | <view class="list" @click="official"> | 58 | <view class="list" @click="official"> |
| 56 | <image src="../../static/nav/nav_ico4.png"></image> | 59 | <image src="../../static/nav/nav_ico4.png"></image> |
pages/login/index.vue
| 1 | <template> | 1 | <template> |
| 2 | 2 | ||
| 3 | <view class="logo-v"> | 3 | <view class="logo-v"> |
| 4 | + <view | ||
| 5 | + style="position: absolute; top: 0;text-align: center;width: 100%;padding-top: 5px;color: #000;z-index: 99;font-weight: bold;"> | ||
| 6 | + 德阳高新区企业服务中心</view> | ||
| 4 | <view class="t-login"> | 7 | <view class="t-login"> |
| 5 | <!-- 页面装饰图片 --> | 8 | <!-- 页面装饰图片 --> |
| 6 | <image class="img-a" src="@/static/2.png"></image> | 9 | <image class="img-a" src="@/static/2.png"></image> |
| @@ -22,7 +25,7 @@ | @@ -22,7 +25,7 @@ | ||
| 22 | <view class="one"> | 25 | <view class="one"> |
| 23 | <u-form :model="formData" :rules="rules" ref="dataForm" :errorType="['toast']" label-position="left" | 26 | <u-form :model="formData" :rules="rules" ref="dataForm" :errorType="['toast']" label-position="left" |
| 24 | label-width="150" label-align="left"> | 27 | label-width="150" label-align="left"> |
| 25 | - | 28 | + |
| 26 | <u-form-item prop="account"> | 29 | <u-form-item prop="account"> |
| 27 | <view class="t-a"> | 30 | <view class="t-a"> |
| 28 | <image src="@/static/sj.png"></image> | 31 | <image src="@/static/sj.png"></image> |
| @@ -38,6 +41,7 @@ | @@ -38,6 +41,7 @@ | ||
| 38 | </u-form> | 41 | </u-form> |
| 39 | <u-button @click="login" type="primary" :loading="loading">{{ loading ? "登录中...":"登录"}} | 42 | <u-button @click="login" type="primary" :loading="loading">{{ loading ? "登录中...":"登录"}} |
| 40 | </u-button> | 43 | </u-button> |
| 44 | + <view style="text-align: center;">投诉邮箱:263667024@qq.com</view> | ||
| 41 | </view> | 45 | </view> |
| 42 | <!-- <view class="two" v-if="show === 1"> | 46 | <!-- <view class="two" v-if="show === 1"> |
| 43 | <u-form :model="formData" :rules="rules" ref="dataForm" :errorType="['toast']" label-position="left" | 47 | <u-form :model="formData" :rules="rules" ref="dataForm" :errorType="['toast']" label-position="left" |
| @@ -87,7 +91,7 @@ | @@ -87,7 +91,7 @@ | ||
| 87 | data() { | 91 | data() { |
| 88 | return { | 92 | return { |
| 89 | loading: false, | 93 | loading: false, |
| 90 | - show:0, | 94 | + show: 0, |
| 91 | formData: { | 95 | formData: { |
| 92 | account: "", | 96 | account: "", |
| 93 | password: "", | 97 | password: "", |
| @@ -109,19 +113,19 @@ | @@ -109,19 +113,19 @@ | ||
| 109 | onReady() { | 113 | onReady() { |
| 110 | this.$refs.dataForm.setRules(this.rules); | 114 | this.$refs.dataForm.setRules(this.rules); |
| 111 | }, | 115 | }, |
| 112 | - onShow(){ | 116 | + onShow() { |
| 113 | plus.navigator.closeSplashscreen(); | 117 | plus.navigator.closeSplashscreen(); |
| 114 | }, | 118 | }, |
| 115 | onLoad() { | 119 | onLoad() { |
| 116 | this.formData.password = '' | 120 | this.formData.password = '' |
| 117 | }, | 121 | }, |
| 118 | methods: { | 122 | methods: { |
| 119 | - toSupply(){ | ||
| 120 | - this.show = 0 | 123 | + toSupply() { |
| 124 | + this.show = 0 | ||
| 121 | this.formData.account = '' | 125 | this.formData.account = '' |
| 122 | this.formData.password = '' | 126 | this.formData.password = '' |
| 123 | }, | 127 | }, |
| 124 | - toDemand(){ | 128 | + toDemand() { |
| 125 | this.show = 1 | 129 | this.show = 1 |
| 126 | this.formData.account = '' | 130 | this.formData.account = '' |
| 127 | this.formData.password = '' | 131 | this.formData.password = '' |
| @@ -133,7 +137,7 @@ | @@ -133,7 +137,7 @@ | ||
| 133 | if (valid) { | 137 | if (valid) { |
| 134 | this.loading = true | 138 | this.loading = true |
| 135 | let password = this.$md5(this.formData.password) | 139 | let password = this.$md5(this.formData.password) |
| 136 | - console.log('加密后',password) | 140 | + console.log('加密后', password) |
| 137 | let query = { | 141 | let query = { |
| 138 | account: this.formData.account, | 142 | account: this.formData.account, |
| 139 | password: password | 143 | password: password |
| @@ -199,9 +203,10 @@ | @@ -199,9 +203,10 @@ | ||
| 199 | // url:'/pages/tbDrugIftForm/index' | 203 | // url:'/pages/tbDrugIftForm/index' |
| 200 | // }) | 204 | // }) |
| 201 | }).catch((res) => { | 205 | }).catch((res) => { |
| 206 | + console.log(res); | ||
| 202 | uni.showToast({ | 207 | uni.showToast({ |
| 203 | - icon:'error', | ||
| 204 | - title:`${res}` | 208 | + icon: 'error', |
| 209 | + title: `${res}` | ||
| 205 | }) | 210 | }) |
| 206 | this.loading = false | 211 | this.loading = false |
| 207 | }) | 212 | }) |
| @@ -215,7 +220,7 @@ | @@ -215,7 +220,7 @@ | ||
| 215 | if (valid) { | 220 | if (valid) { |
| 216 | this.loading = true | 221 | this.loading = true |
| 217 | let password = this.$md5(this.formData.password) | 222 | let password = this.$md5(this.formData.password) |
| 218 | - console.log('加密后',password) | 223 | + console.log('加密后', password) |
| 219 | let login = { | 224 | let login = { |
| 220 | account: this.formData.account, | 225 | account: this.formData.account, |
| 221 | password: password | 226 | password: password |
| @@ -242,7 +247,7 @@ | @@ -242,7 +247,7 @@ | ||
| 242 | title: 'denglu', | 247 | title: 'denglu', |
| 243 | duration: '2000' | 248 | duration: '2000' |
| 244 | }) | 249 | }) |
| 245 | - | 250 | + |
| 246 | if (res.code === 200) { | 251 | if (res.code === 200) { |
| 247 | let token = res.data.token | 252 | let token = res.data.token |
| 248 | // let user = res.data.user | 253 | // let user = res.data.user |
| @@ -250,10 +255,10 @@ | @@ -250,10 +255,10 @@ | ||
| 250 | this.$store.commit('user/SET_TOKEN', token) | 255 | this.$store.commit('user/SET_TOKEN', token) |
| 251 | uni.setStorageSync('AuthToken_KEY', token) | 256 | uni.setStorageSync('AuthToken_KEY', token) |
| 252 | uni.setStorageSync('token', token) | 257 | uni.setStorageSync('token', token) |
| 253 | - | 258 | + |
| 254 | that.API.getUserInfo().then(res => { | 259 | that.API.getUserInfo().then(res => { |
| 255 | console.log(res) | 260 | console.log(res) |
| 256 | - | 261 | + |
| 257 | let user = res.data | 262 | let user = res.data |
| 258 | uni.setStorageSync('user', user) | 263 | uni.setStorageSync('user', user) |
| 259 | if (uni.getStorageSync('user')) { | 264 | if (uni.getStorageSync('user')) { |
| @@ -266,10 +271,10 @@ | @@ -266,10 +271,10 @@ | ||
| 266 | url: '/pages/home/home' | 271 | url: '/pages/home/home' |
| 267 | }); | 272 | }); |
| 268 | } | 273 | } |
| 269 | - | ||
| 270 | - | 274 | + |
| 275 | + | ||
| 271 | }) | 276 | }) |
| 272 | - | 277 | + |
| 273 | } else { | 278 | } else { |
| 274 | uni.showToast({ | 279 | uni.showToast({ |
| 275 | icon: "error", | 280 | icon: "error", |
| @@ -282,10 +287,10 @@ | @@ -282,10 +287,10 @@ | ||
| 282 | // }) | 287 | // }) |
| 283 | }).catch((res) => { | 288 | }).catch((res) => { |
| 284 | uni.showToast({ | 289 | uni.showToast({ |
| 285 | - icon:'error', | ||
| 286 | - title:`${res}` | 290 | + icon: 'error', |
| 291 | + title: `${res}` | ||
| 287 | }) | 292 | }) |
| 288 | - console.log('错处了',res) | 293 | + console.log('错处了', res) |
| 289 | this.loading = false | 294 | this.loading = false |
| 290 | }) | 295 | }) |
| 291 | } | 296 | } |
| @@ -427,8 +432,8 @@ | @@ -427,8 +432,8 @@ | ||
| 427 | height: 0; | 432 | height: 0; |
| 428 | content: '\20'; | 433 | content: '\20'; |
| 429 | } | 434 | } |
| 430 | - | ||
| 431 | - .top{ | 435 | + |
| 436 | + .top { | ||
| 432 | width: 100%; | 437 | width: 100%; |
| 433 | height: 100rpx; | 438 | height: 100rpx; |
| 434 | border-bottom: 1px solid gray; | 439 | border-bottom: 1px solid gray; |
| @@ -440,14 +445,17 @@ | @@ -440,14 +445,17 @@ | ||
| 440 | background-color: white; | 445 | background-color: white; |
| 441 | z-index: 2; | 446 | z-index: 2; |
| 442 | } | 447 | } |
| 443 | - .act{ | 448 | + |
| 449 | + .act { | ||
| 444 | font-weight: bold; | 450 | font-weight: bold; |
| 445 | color: #E60012; | 451 | color: #E60012; |
| 446 | } | 452 | } |
| 447 | - .supply{ | 453 | + |
| 454 | + .supply { | ||
| 448 | font-size: 35rpx; | 455 | font-size: 35rpx; |
| 449 | } | 456 | } |
| 450 | - .demand{ | 457 | + |
| 458 | + .demand { | ||
| 451 | font-size: 35rpx; | 459 | font-size: 35rpx; |
| 452 | } | 460 | } |
| 453 | </style> | 461 | </style> |
| 454 | \ No newline at end of file | 462 | \ No newline at end of file |
service/request.js
| @@ -21,10 +21,11 @@ const request = function(url, method, data, noApiBase) { | @@ -21,10 +21,11 @@ const request = function(url, method, data, noApiBase) { | ||
| 21 | url, | 21 | url, |
| 22 | data, | 22 | data, |
| 23 | method, | 23 | method, |
| 24 | + sslVerify: false, | ||
| 24 | header: { | 25 | header: { |
| 25 | 'Authorization': service.getToken(), | 26 | 'Authorization': service.getToken(), |
| 26 | // "Content-Type":"application/json" | 27 | // "Content-Type":"application/json" |
| 27 | - "Content-Type":"application/json;charset=UTF-8/x-www-form-urlencoded" | 28 | + "Content-Type": "application/json;charset=UTF-8/x-www-form-urlencoded" |
| 28 | }, | 29 | }, |
| 29 | success: (res) => { | 30 | success: (res) => { |
| 30 | // debugger | 31 | // debugger |
| @@ -33,12 +34,13 @@ const request = function(url, method, data, noApiBase) { | @@ -33,12 +34,13 @@ const request = function(url, method, data, noApiBase) { | ||
| 33 | uni.showToast({ | 34 | uni.showToast({ |
| 34 | icon: 'none', | 35 | icon: 'none', |
| 35 | title: res.data.message, | 36 | title: res.data.message, |
| 36 | - duration: 2000 | 37 | + duration: 2000 |
| 37 | }); | 38 | }); |
| 38 | } else { | 39 | } else { |
| 39 | resolve(res.data); | 40 | resolve(res.data); |
| 40 | } | 41 | } |
| 41 | - } else if (res.code === 403 || res.data.code === -999 || res.data.code === 500) { | 42 | + } else if (res.code === 403 || res.data.code === -999 || res.data.code === |
| 43 | + 500) { | ||
| 42 | // uni.removeStorage({ | 44 | // uni.removeStorage({ |
| 43 | // key:'token' | 45 | // key:'token' |
| 44 | // }) | 46 | // }) |
| @@ -59,7 +61,7 @@ const request = function(url, method, data, noApiBase) { | @@ -59,7 +61,7 @@ const request = function(url, method, data, noApiBase) { | ||
| 59 | // url: '/pages/login/index' | 61 | // url: '/pages/login/index' |
| 60 | // }) | 62 | // }) |
| 61 | // }) | 63 | // }) |
| 62 | - | 64 | + |
| 63 | } else { | 65 | } else { |
| 64 | uni.showToast({ | 66 | uni.showToast({ |
| 65 | icon: 'none', | 67 | icon: 'none', |
| @@ -67,11 +69,11 @@ const request = function(url, method, data, noApiBase) { | @@ -67,11 +69,11 @@ const request = function(url, method, data, noApiBase) { | ||
| 67 | duration: 2000 | 69 | duration: 2000 |
| 68 | }); | 70 | }); |
| 69 | resolve(res); | 71 | resolve(res); |
| 70 | - setTimeout(()=>{ | 72 | + setTimeout(() => { |
| 71 | uni.reLaunch({ | 73 | uni.reLaunch({ |
| 72 | url: '/pages/login/index' | 74 | url: '/pages/login/index' |
| 73 | }) | 75 | }) |
| 74 | - },1000) | 76 | + }, 1000) |
| 75 | } | 77 | } |
| 76 | 78 | ||
| 77 | }, | 79 | }, |
| @@ -85,4 +87,4 @@ export default { | @@ -85,4 +87,4 @@ export default { | ||
| 85 | del, | 87 | del, |
| 86 | put, | 88 | put, |
| 87 | request, | 89 | request, |
| 88 | -} | 90 | -} |
| 91 | +} | ||
| 89 | \ No newline at end of file | 92 | \ No newline at end of file |
utils/define.js
| @@ -11,7 +11,7 @@ const define = { | @@ -11,7 +11,7 @@ const define = { | ||
| 11 | // webSocketUrl: "ws://disk.banustar.com/api/message/websocket", | 11 | // webSocketUrl: "ws://disk.banustar.com/api/message/websocket", |
| 12 | // webSocketUrl: "ws://localhost:2011/api/message/websocket", | 12 | // webSocketUrl: "ws://localhost:2011/api/message/websocket", |
| 13 | // webSocketUrl: "ws://deyanggaoxin.fengshiyun.com/api/message/websocket", | 13 | // webSocketUrl: "ws://deyanggaoxin.fengshiyun.com/api/message/websocket", |
| 14 | - webSocketUrl: "ws://https://www.dygxq-es.cn/api/message/websocket", | 14 | + webSocketUrl: "ws://www.dygxq-es.cn/api/message/websocket", |
| 15 | comUploadUrl: baseURL + '/api/file/Uploader/', | 15 | comUploadUrl: baseURL + '/api/file/Uploader/', |
| 16 | timeout: process.env.NODE_ENV === 'production' ? 60000 : 10000, | 16 | timeout: process.env.NODE_ENV === 'production' ? 60000 : 10000, |
| 17 | version: "V3.2.5" | 17 | version: "V3.2.5" |