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