Merge remote-tracking branch 'origin/master'
| | |
| | | <script> |
| | | import { wxAuthorize } from '@/api' |
| | | export default { |
| | | onLaunch: function () { |
| | | var that = this |
| | |
| | | let code = '' |
| | | if (url.indexOf('code=') !== -1) { |
| | | const query = url.split('?') |
| | | |
| | | console.log('app-app', url); |
| | | for (const q of query) { |
| | | if (q.indexOf('code=') !== -1) { |
| | | code = q.substring(q.indexOf('code=') + 5, q.length) |
| | | } |
| | | } |
| | | that.$u.api.wxAuthorize({ |
| | | wxAuthorize({ |
| | | code: code |
| | | }).then(res => { |
| | | console.log('app_ress', res); |
| | | if (res.code === 200) { |
| | | that.$store.commit('setOpenId', res.data.openid) |
| | | if (res.data.member) { |
| | |
| | | data |
| | | }) |
| | | } |
| | | // ææ |
| | | export const wxAuthorize = (data) => { |
| | | return http({ |
| | | url: 'visitsAdmin/cloudService/web/visitor/wxAuthorize', |
| | | method: 'get', |
| | | data |
| | | }) |
| | | } |
| | |
| | | "minified" : true |
| | | }, |
| | | "usingComponents" : true, |
| | | "requiredPrivateInfos" : [ "getLocation", "chooseLocation" ], |
| | | "requiredPrivateInfos": [ |
| | | "getLocation", |
| | | "chooseLocation" |
| | | ], |
| | | "permission" : { |
| | | "scope.userLocation" : { |
| | | "desc" : "ç¨äºè·åå¨è¾¹æ¿æºä½ç½®" |
| | |
| | | }, |
| | | "devServer" : { |
| | | "port": 8090, |
| | | "historyApiFallback": true, |
| | | "disableHostCheck": true, |
| | | "proxy" : { |
| | | "/api" : { // è¿ä¸ªå段åéä¸ä½ é
ç½®çbasePrefixUrlä¸è´ï¼ç³»ç»è¯å«å°å¸¦æ/dev-api请æ±çå°åæ¶ï¼ä¼å¨å颿¼æ¥ä¸ä»£çæå¡å¨å°å |
| | | "target" : "http://192.168.0.106:10010", // 代çæå¡å¨ååæIPå°å |
| | | "target": "http://192.168.0.143:10010", // 代çæå¡å¨ååæIPå°å |
| | | "changeOrigin" : true, // å
许跨å |
| | | "pathRewrite" : { |
| | | "^/api" : "" // éåå°åï¼å¦æå®é
æ¥å£ä¸æ¯ä¸å¸¦/dev-apiï¼éè¦å°è¿ä¸ªåç¼ç½®ç©ºï¼å 为è¿ä¸ªåç¼åªæ¯ä¸ºäºè¯å«ç¨ï¼è¯å«å®ä¹å就没ç¨äº |
| | |
| | | }
|
| | |
|
| | | }
|
| | | ,{
|
| | | "path" : "pages/auth/auth",
|
| | | "style" : |
| | | { |
| | | "navigationBarTitleText": "微信ææ", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | |
| | | }
|
| | | ],
|
| | | "subPackages": [{
|
| | | "root": "n_pages",
|
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view> |
| | | |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | data() { |
| | | return { |
| | | |
| | | }; |
| | | }, |
| | | onLoad() { |
| | | const appID = 'wx4d7c10bdec51942b' |
| | | const AppSecret = '922c93596d134fedf5bd22a9354b3bfe' |
| | | // const scope = 'snsapi_userinfo' |
| | | let uri = encodeURIComponent('http://xiaopiqiu2.natapp1.cc') |
| | | let authURL = |
| | | `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appID}&redirect_uri=${uri}&response_type=code&scope=snsapi_userinfo&state=123#wechat_redirect` |
| | | window.location.href = authURL |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | |
| | | </style> |
| | |
| | | <view class="login_list"> |
| | | <view class="login_list_item"> |
| | | <image src="@/static/login_ic_phone@2x.png" mode="widthFix" /> |
| | | <input v-model="form.idCard" maxlength="18" type="number" placeholder="è´¦å·"> |
| | | <input |
| | | v-model="form.idCard" |
| | | maxlength="18" |
| | | type="number" |
| | | placeholder="è´¦å·" |
| | | /> |
| | | </view> |
| | | <view class="login_list_item"> |
| | | <image src="@/static/login_ic_password@2x.png" mode="widthFix" /> |
| | | <input v-model="form.password" type="password" placeholder="å¯ç "> |
| | | <input v-model="form.password" type="password" placeholder="å¯ç " /> |
| | | </view> |
| | | </view> |
| | | <view class="login_btn"> |
| | | <view class="login_btn_n">ç«å³ç»å½</view> |
| | | <view class="login_btn_n" @click="onLogin">ç«å³ç»å½</view> |
| | | <view class="for_psd">å¿è®°å¯ç </view> |
| | | </view> |
| | | |
| | |
| | | }, |
| | | |
| | | created () { |
| | | console.log('---'); |
| | | }, |
| | | |
| | | methods: { |
| | | dealChange(e) { |
| | | console.log(e); |
| | | console.log(e) |
| | | }, |
| | | onLogin() { |
| | | const appID = 'wx4d7c10bdec51942b' |
| | | const AppSecret = '922c93596d134fedf5bd22a9354b3bfe' |
| | | // const scope = 'snsapi_userinfo' |
| | | let uri = encodeURIComponent('http://xiaopiqiu2.natapp1.cc') |
| | | let authURL = |
| | | `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appID}&redirect_uri=${uri}&response_type=code&scope=snsapi_userinfo&state=123#wechat_redirect` |
| | | window.location.href = authURL |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | box-sizing: border-box; |
| | | align-items: center; |
| | | flex-direction: column; |
| | | background: linear-gradient( 180deg, rgba(39,155,170,0.2) 0%, rgba(39,155,170,0) 100%); |
| | | background: linear-gradient( |
| | | 180deg, |
| | | rgba(39, 155, 170, 0.2) 0%, |
| | | rgba(39, 155, 170, 0) 100% |
| | | ); |
| | | .login_logo { |
| | | width: 180rpx; |
| | | height: 180rpx; |
| | |
| | | height: 98rpx; |
| | | padding: 0 40rpx; |
| | | box-sizing: border-box; |
| | | background: #FFFFFF; |
| | | background: #ffffff; |
| | | margin-bottom: 40rpx; |
| | | display: flex; |
| | | align-items: center; |
| | |
| | | box-sizing: border-box; |
| | | margin-top: 80rpx; |
| | | .for_psd{ |
| | | color: #279BAA; |
| | | color: #279baa; |
| | | margin-top: 40rpx; |
| | | width: 140rpx; |
| | | text-align: center; |
| | |
| | | .login_btn_n { |
| | | width: 100%; |
| | | height: 98rpx; |
| | | background: #279BAA; |
| | | background: #279baa; |
| | | box-shadow: 0rpx 12rpx 24rpx 0rpx rgba(39,155,170,0.2); |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | font-weight: 500; |
| | | font-size: 32rpx; |
| | | color: #FFFFFF; |
| | | color: #ffffff; |
| | | border-radius: 50rpx; |
| | | } |
| | | } |
| | |
| | | text-align: center; |
| | | bottom: 108rpx; |
| | | .deal{ |
| | | color: #279BAA; |
| | | color: #279baa; |
| | | } |
| | | |
| | | } |
| | | } |
| | | </style> |
| | |
| | | } |
| | | }, |
| | | onLoad() { |
| | | this.getInfo() |
| | | // this.getInfo() |
| | | }, |
| | | methods: { |
| | | getInfo() { |
| | |
| | | if (options.data) { |
| | | this.form = JSON.parse(options.data) |
| | | } |
| | | console.log('this.form', this.form); |
| | | // this.getvisit() |
| | | // this.getVisit1() |
| | | // this.getUserValid() |