vue2-client 1.6.25 → 1.6.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,6 +1,9 @@
1
1
  # Change Log
2
2
  > 所有关于本项目的变化都在该文档里。
3
3
 
4
+ **1.6.26 - 1.6.27 -2023-04-16 @江超**
5
+ - 修复单页面iframe对http前缀的兼容处理
6
+
4
7
  **1.6.23 - 1.6.25 -2023-04-11 @江超**
5
8
  - `request.js`的响应拦截器增加了一种对非v4环境调用v4接口的兼容处理
6
9
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue2-client",
3
- "version": "1.6.25",
3
+ "version": "1.6.27",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -44,7 +44,7 @@ export default {
44
44
  },
45
45
  computed: {
46
46
  ...mapState('setting', ['animate', 'iframeSrc']),
47
- ...mapState('account', ['login'])
47
+ ...mapState('account', { login: 'login', currUser: 'user' })
48
48
  },
49
49
  created () {
50
50
  this.isLoaded = false
@@ -65,6 +65,11 @@ export default {
65
65
  console.warn(msg)
66
66
  this.$message.error(msg)
67
67
  })
68
+ } else if (this.singlePageUrl.indexOf('http') !== -1) {
69
+ if (this.singlePageUrl.indexOf('?goto=') !== -1) {
70
+ this.singlePageUrl = this.singlePageUrl + '&f_user_id=' + this.currUser.username + '&password=' + this.currUser.password
71
+ }
72
+ this.url = this.singlePageUrl
68
73
  } else {
69
74
  this.url = this.iframeSrc
70
75
  }
@@ -185,7 +185,9 @@ export default {
185
185
  },
186
186
  afterGeneral (result) {
187
187
  const user = Object.assign({
188
+ id: result.id,
188
189
  username: result.ename,
190
+ password: this.form.getFieldValue('password'),
189
191
  name: result.name,
190
192
  avatar: 'https://gw.alipayobjects.com/zos/rmsportal/jZUIxmJycoymBprLOUbT.png',
191
193
  address: '西安市',
@@ -1,37 +1,37 @@
1
- import AMapLoader from '@amap/amap-jsapi-loader'
2
- let Amap
3
- async function GetGDMap () {
4
- if (!Amap) {
5
- window._AMapSecurityConfig = {
6
- securityJsCode: '275e59edb26ab1f917cfe7f05bea7979'
7
- }
8
- Amap = await AMapLoader.load({
9
- key: '55a4807a6fc3adca5510f69578b1ae4a', // 申请好的Web端开发者Key,首次调用 load 时必填
10
- version: '2.0', // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
11
- plugins: ['AMap.IndexCluster','AMP.MarkerCluster', 'AMap.InfoWindow', 'AMap.HeatMap', 'AMap.HawkEye', 'AMap.DistrictSearch',
12
- 'AMap.ToolBar', 'AMap.Geolocation',
13
- 'AMap.Geocoder', 'AMap.MarkerClusterer', 'AMap.AutoComplete'], // 需要使用的的插件列表,如比例尺'AMap.Scale'等
14
- AMapUI: {
15
- version: '1.1', // AMapUI 缺省 1.1
16
- plugins: [] // 需要加载的 AMapUI ui插件
17
- }
18
- })
19
- }
20
- return Amap
21
- }
22
- async function GetLocation (address) {
23
- return new Promise(async (resolve, reject) => {
24
- new (await GetGDMap()).Geocoder({
25
- radius: 500 // 范围,默认:500
26
- }).getLocation(address, function (status, result) {
27
- console.log(result)
28
- if (status === 'complete' && result.geocodes.length) {
29
- resolve({ lng: result.geocodes[0].location.lng, lat: result.geocodes[0].location.lat })
30
- } else {
31
- // eslint-disable-next-line prefer-promise-reject-errors
32
- reject('根据经纬度查询地址失败')
33
- }
34
- })
35
- })
36
- }
37
- export { GetGDMap, GetLocation }
1
+ import AMapLoader from '@amap/amap-jsapi-loader'
2
+ let Amap
3
+ async function GetGDMap () {
4
+ if (!Amap) {
5
+ window._AMapSecurityConfig = {
6
+ securityJsCode: '275e59edb26ab1f917cfe7f05bea7979'
7
+ }
8
+ Amap = await AMapLoader.load({
9
+ key: '55a4807a6fc3adca5510f69578b1ae4a', // 申请好的Web端开发者Key,首次调用 load 时必填
10
+ version: '2.0', // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
11
+ plugins: ['AMap.IndexCluster', 'AMP.MarkerCluster', 'AMap.InfoWindow', 'AMap.HeatMap', 'AMap.HawkEye', 'AMap.DistrictSearch',
12
+ 'AMap.ToolBar', 'AMap.Geolocation',
13
+ 'AMap.Geocoder', 'AMap.MarkerClusterer', 'AMap.AutoComplete'], // 需要使用的的插件列表,如比例尺'AMap.Scale'等
14
+ AMapUI: {
15
+ version: '1.1', // AMapUI 缺省 1.1
16
+ plugins: [] // 需要加载的 AMapUI ui插件
17
+ }
18
+ })
19
+ }
20
+ return Amap
21
+ }
22
+ async function GetLocation (address) {
23
+ return new Promise(async (resolve, reject) => {
24
+ new (await GetGDMap()).Geocoder({
25
+ radius: 500 // 范围,默认:500
26
+ }).getLocation(address, function (status, result) {
27
+ console.log(result)
28
+ if (status === 'complete' && result.geocodes.length) {
29
+ resolve({ lng: result.geocodes[0].location.lng, lat: result.geocodes[0].location.lat })
30
+ } else {
31
+ // eslint-disable-next-line prefer-promise-reject-errors
32
+ reject('根据经纬度查询地址失败')
33
+ }
34
+ })
35
+ })
36
+ }
37
+ export { GetGDMap, GetLocation }