Compare commits

...

4 Commits

  1. 13
      CHANGELOG.md
  2. 4
      package-lock.json
  3. 2
      package.json
  4. 4
      public/static/qm/MainMap_QM.js
  5. 3
      src/components/Map/Map.vue
  6. 2
      src/composables/useInitConfigAndMallInfo.ts
  7. 43
      src/http/http.ts
  8. 1
      src/types/window.d.ts

13
CHANGELOG.md

@ -2,6 +2,19 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
## [1.1.0-B.20](https://git.1000my.com/project-shenyangk11/sy_k11_H_base_daoshi_vue_ts/compare/v1.1.0-B.19...v1.1.0-B.20) (2023-07-27)
### Features
* 🚀 修改弹框切割问题 ([8b774cb](https://git.1000my.com/project-shenyangk11/sy_k11_H_base_daoshi_vue_ts/commit/8b774cb3890456c316ada0d3dd018d95b8dad9f8))
### Bug Fixes
* 修改地图文件 ([5bc0c17](https://git.1000my.com/project-shenyangk11/sy_k11_H_base_daoshi_vue_ts/commit/5bc0c176e366ae72bb322630e8ee902fe770747f))
* 增加首页json读取不到则调用Android的方法重启 ([ecb6732](https://git.1000my.com/project-shenyangk11/sy_k11_H_base_daoshi_vue_ts/commit/ecb6732d4f70fec6960a174f67fb49c565ff69e8))
## [1.1.0-B.19](https://git.1000my.com/project-shenyangk11/sy_k11_H_base_daoshi_vue_ts/compare/v1.1.0-B.18...v1.1.0-B.19) (2023-07-24)

4
package-lock.json

@ -1,12 +1,12 @@
{
"name": "vue_cli_ts",
"version": "1.1.0-B.19",
"version": "1.1.0-B.20",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "vue_cli_ts",
"version": "1.1.0-B.19",
"version": "1.1.0-B.20",
"dependencies": {
"@better-scroll/core": "^2.5.0",
"@better-scroll/observe-image": "^2.5.0",

2
package.json

@ -1,6 +1,6 @@
{
"name": "vue_cli_ts",
"version": "1.1.0-B.19",
"version": "1.1.0-B.20",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",

4
public/static/qm/MainMap_QM.js

@ -3678,8 +3678,8 @@ MainMap_QM.prototype = {
}
if (item.hasOwnProperty("Facilities") && item.Facilities) { //设施
Map_QM.util.pathStateObj.forShopArr.wayList.push({
isAddPrefix: true, name: "乘坐 " + item.Facilities.userData.title +item.Facilities.userData.facCode=="dt"?"电梯":"" + "到 " + Map_QM.mapArr[Map_QM.util.selectBuild][parseInt(Map_QM.forShopArr[index + 1].floor)].floorName,
nameEn: "BY " + item.Facilities.userData.title+item.Facilities.userData.facCode=="dt"?"elevator ":"" + "TO " + Map_QM.mapArr[Map_QM.util.selectBuild][parseInt(Map_QM.forShopArr[index + 1].floor)].floorName, logoPath: item.Facilities.imgUrl, code: (((Math.random()) * 0x1234567) | 0).toString(16).substring(0), shopNum: item.Facilities.userData.facCode + item.Facilities.userData.no
isAddPrefix: true, name: "乘坐 " + item.Facilities.userData.title +(item.Facilities.userData.facCode=="dt"?"电梯":"") + "到 " + Map_QM.mapArr[Map_QM.util.selectBuild][parseInt(Map_QM.forShopArr[index + 1].floor)].floorName,
nameEn: "BY " + item.Facilities.userData.title+(item.Facilities.userData.facCode=="dt"?"elevator ":"") + "TO " + Map_QM.mapArr[Map_QM.util.selectBuild][parseInt(Map_QM.forShopArr[index + 1].floor)].floorName, logoPath: item.Facilities.imgUrl, code: (((Math.random()) * 0x1234567) | 0).toString(16).substring(0), shopNum: item.Facilities.userData.facCode + item.Facilities.userData.no
});
}
});

3
src/components/Map/Map.vue

@ -79,7 +79,7 @@ watch(shop, () => {
overflow: hidden;
width: 220px;
height: 60px;
padding: 25px 18px 0 36px;
padding: 20px 18px 0 36px;
font-size: 22px;
font-family: 'font_bold';
white-space: nowrap;
@ -88,6 +88,7 @@ watch(shop, () => {
.name {
display: inline-block;
line-height: inherit;
padding-top: 5px;
}
// @include no-wrap;

2
src/composables/useInitConfigAndMallInfo.ts

@ -53,7 +53,9 @@ export const useInitConfigAndMallInfo = async () => {
store.SET_MENU_LIST(_menuList.data)
store.SET_PICTURE_LIST(_pictureList.data)
} catch (error) {
console.log('开机读取JSON报错 :>> ', JSON.stringify(error))
Message({ text: '初始化数据失败', type: 'success' })
window.android.restartWebView()
}
}

43
src/http/http.ts

@ -54,19 +54,58 @@ class Request {
if (config.interceptors?.requestInterceptors) {
config = config.interceptors.requestInterceptors(config as any)
}
const checkJsonList = [
'getDevCoordinateByIP',
'getMapInfo',
'getFacilityList',
'GetWeather',
'getBrandShopListByFloor',
'getBrandShopListByIndustryId',
'getBrandShopList',
'getModuleList',
'getArtList'
]
this.instance
.request<any, T>(config)
.then(res => {
console.log('axios获取数据 :>> ', JSON.stringify(res))
if (
config.url &&
config.url?.search('getMap.json') <= 0 &&
config.url?.search('getMapInfo.json') <= 0 &&
config.url?.search('getBrandShopListByFloor.json') <= 0 &&
config.url?.search('getBrandShopListByIndustryId.json') <= 0
) {
console.log('axios获取数据 :>> ', JSON.stringify(res))
}
// 如果为单个响应设置拦截器,使用单个响应的拦截器
if (config.interceptors?.responseInterceptors) {
res = config.interceptors.responseInterceptors(res)
}
if (config.url && Object(res).code !== 200) {
for (let t = 0; t < checkJsonList.length; t++) {
const element = checkJsonList[t]
if (config.url.search(element) > 0) {
console.log('开机读取JSON报错 :>> ')
window?.android?.restartWebView()
break
}
}
}
resolve(res)
})
.catch((err: any) => {
console.log('axios获取数据失败 :==>> ', JSON.stringify(err))
if (config.url) {
for (let t = 0; t < checkJsonList.length; t++) {
const element = checkJsonList[t]
if (config.url.search(element) > 0) {
console.log('catch开机读取JSON报错 :>> ')
window.android.restartWebView()
break
}
}
}
reject(err)
})
})

1
src/types/window.d.ts

@ -4,6 +4,7 @@ leaveScreenSave() 离开屏保需要调用我这里的方法
*/
type Android = {
goScreenSave: () => void
restartWebView: () => void
}
declare interface Window {
android: Android

Loading…
Cancel
Save