vue2-client 1.2.82 → 1.2.83

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,7 +1,7 @@
1
1
  # Change Log
2
2
  > 所有关于本项目的变化都在该文档里。
3
3
 
4
- **1.2.81 - 1.2.82 -2022-07-21 @朱子峰**
4
+ **1.2.81 - 1.2.83 -2022-07-21 @朱子峰**
5
5
  - 功能新增:
6
6
  - 兼容V4登陆
7
7
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue2-client",
3
- "version": "1.2.82",
3
+ "version": "1.2.83",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -35,7 +35,7 @@
35
35
  <a-form-model-item
36
36
  v-if="item.formType ==='addressSearch'"
37
37
  label="坐标字段名">
38
- <a-input :value="`${item.key}_coords`" :disabled="true">
38
+ <a-input :value="`${item.key}_lng_lat`" :disabled="true">
39
39
  <a-popover slot="suffix" placement="bottom" title="坐标字段名">
40
40
  <template slot="content">
41
41
  <p>表单类型为地点搜索框时:</p>
@@ -35,7 +35,7 @@
35
35
  <a-form-model-item
36
36
  v-if="item.formType ==='addressSearch'"
37
37
  label="坐标字段名">
38
- <a-input :value="`${item.key}_coords`" :disabled="true">
38
+ <a-input :value="`${item.key}_lng_lat`" :disabled="true">
39
39
  <a-popover slot="suffix" placement="bottom" title="坐标字段名">
40
40
  <template slot="content">
41
41
  <p>表单类型为地点搜索框时:</p>
@@ -217,7 +217,7 @@
217
217
  v-model="searchResult"
218
218
  searchResultType="Object"
219
219
  @onSelect="form=Object.assign(form,JSON.parse(searchResult))"
220
- :resultKeys="{ address: attr.model, coords: `${attr.model}_coords` }"
220
+ :resultKeys="{ address: attr.model, coords: `${attr.model}_lng_lat` }"
221
221
  ></address-search-combobox>
222
222
  </a-form-model-item>
223
223
  </x-form-col>
@@ -1,6 +1,6 @@
1
1
  import { manageApi, post } from '@vue2-client/services/api'
2
2
  import { handleTree } from '@vue2-client/utils/util'
3
- const setting = require('../../config/default/setting.config')
3
+
4
4
  const GetAppDataService = {
5
5
  install (Vue) {
6
6
  // 给vue增添对话框显示方法
@@ -9,8 +9,10 @@ const GetAppDataService = {
9
9
  async load () {
10
10
  const params = {}
11
11
  await post(manageApi.getDictionaryValue, {}).then((res) => {
12
+ // 从本地缓存中读取compatible
13
+ const setting = localStorage.getItem('compatible')
12
14
  // 判断是否是V4环境
13
- if (setting.compatible === 'V4') {
15
+ if (setting === 'V4') {
14
16
  // 如果是V4,从返回值中,data取值
15
17
  Object.assign(params, res.data)
16
18
  } else {
@@ -31,6 +33,8 @@ const GetAppDataService = {
31
33
  // 追加参数
32
34
  localStorage.setItem(process.env.VUE_APP_DICTIONARY_KEY, JSON.stringify(params))
33
35
  localStorage.setItem(process.env.VUE_APP_BADGE_KEY, JSON.stringify(badgeItemArray))
36
+ // 清除compatible
37
+ localStorage.removeItem('compatible')
34
38
  })
35
39
  // 获取省市区数据
36
40
  await post(manageApi.getDivisionsOhChina, {}).then((res) => {
@@ -118,6 +118,8 @@ export default {
118
118
  const loginRes = res
119
119
  const V4Token = { token: res.data.access_token, expire: res.data.expires_in }
120
120
  this.setV4AccessToken(V4Token)
121
+ // 向本地缓存中临时存储compatible
122
+ localStorage.setItem('compatible', this.compatible)
121
123
  if (loginRes.code === 200) {
122
124
  const encrypt = new JSEncrypt()
123
125
  encrypt.setPublicKey('MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCqPvovSfXcwBbW8cKMCgwqNpsYuzF8RPAPFb7LGsnVo44JhM/xxzDyzoYtdfNmtbIuKVi9PzIsyp6rg+09gbuI6UGwBZ5DWBDBMqv5MPdOF5dCQkB2Bbr5yPfURPENypUz+pBFBg41d+BC+rwRiXELwKy7Y9caD/MtJyHydj8OUwIDAQAB')