Commit ac4b20bc by 张立顺

fix 控制台报错修复

1 parent 09043764
Showing 86 changed files with 508 additions and 156 deletions
...@@ -319,12 +319,19 @@ module.exports = { ...@@ -319,12 +319,19 @@ module.exports = {
/** /**
* 员工登录日志记录保存 * 员工登录日志记录保存
* @param {object} data
* @param {string} [name] 调用来源;`loading` 时静默失败,不弹 Toast
*/ */
loginRecordSave(data, name) { loginRecordSave(data, name) {
// console.log(name, 'loginRecordSave'); const failTips = name !== "loading";
// debugger return api.post(
return api.post("dj.api.smartcarlife.staff.login.record.save", data); "dj.api.smartcarlife.staff.login.record.save",
//selectMerchantScene data,
[],
undefined,
undefined,
failTips
);
}, },
// 获取侧边栏切换门店4s店列表 // 获取侧边栏切换门店4s店列表
getCurShopList(data) { getCurShopList(data) {
......
//app.js //app.js
// 初始化sentry // 初始化sentry
import sentryInit from "~/utils/sentryConfig/sentryInit"; import sentryInit from "~/utils/sentryConfig/sentryInit";
import { getSystemInfoSync } from "~/utils/systemInfo";
const sentry = sentryInit(); const sentry = sentryInit();
wx.$sendSentry = function (e) { wx.$sendSentry = function (e) {
sentry.captureException(e); sentry.captureException(e);
...@@ -63,9 +64,19 @@ const debouncedReNoSignIn = debounce(function (noSignInUuid, that) { ...@@ -63,9 +64,19 @@ const debouncedReNoSignIn = debounce(function (noSignInUuid, that) {
removeSystemStorage(); removeSystemStorage();
that.login(false); that.login(false);
} }
})
.catch((err) => {
const errMsg = err?.errMsg || String(err || "");
const isTimeout = /timeout/i.test(errMsg) || err?.errno === 5;
console.warn("[reNoSignIn fail]", { isTimeout, errMsg }, err);
// 网络超时等瞬时错误不强制登出,避免初始化阶段反复弹窗
if (!isTimeout) {
util.removeStorage();
removeSystemStorage();
that.login(false);
}
}); });
}, 0); // 设置防抖时间为 0 秒 }, 300);
// }, 0); // 设置防抖时间为 5 秒
// 定义一个防抖函数 // 定义一个防抖函数
function debounce(func, timeout) { function debounce(func, timeout) {
let timer; let timer;
...@@ -135,7 +146,7 @@ App({ ...@@ -135,7 +146,7 @@ App({
// } // }
// } // }
if (options) { if (options) {
console.log('options', options) // console.log('options', options)
let res = checkScene(options); let res = checkScene(options);
// console.log(res, 'res') // console.log(res, 'res')
...@@ -203,7 +214,7 @@ App({ ...@@ -203,7 +214,7 @@ App({
}, },
globalData: { globalData: {
statusBarHeight: wx.getSystemInfoSync()["statusBarHeight"], // 头部导航栏的高度 statusBarHeight: getSystemInfoSync().statusBarHeight, // 头部导航栏的高度
yqdInfo: {}, yqdInfo: {},
isYqdSuper: true, isYqdSuper: true,
isStaff: false, isStaff: false,
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
* @file 微信隐私授权弹窗(自 glsk-applet-component/GlsxPrivacy 内联,仅主包引用) * @file 微信隐私授权弹窗(自 glsk-applet-component/GlsxPrivacy 内联,仅主包引用)
* 监听 wx.onNeedPrivacyAuthorization,在当前页展示用户隐私保护指引同意/拒绝 UI。 * 监听 wx.onNeedPrivacyAuthorization,在当前页展示用户隐私保护指引同意/拒绝 UI。
*/ */
import { getSystemInfo } from '~/utils/systemInfo'
let privacyHandler let privacyHandler
const privacyResolves = new Set() const privacyResolves = new Set()
...@@ -53,7 +54,7 @@ Component({ ...@@ -53,7 +54,7 @@ Component({
} }
closeOtherPagePopUpHooks.add(closePopUp) closeOtherPagePopUpHooks.add(closePopUp)
this.closePopUp = closePopUp this.closePopUp = closePopUp
wx.getSystemInfo({ getSystemInfo({
success: res => { success: res => {
this.setData({ this.setData({
isIPad: res.screenWidth > 700 isIPad: res.screenWidth > 700
......
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
<scroll-view wx:if="{{copyStoreList.length && searchSelectIndex == 0}}" scroll-y style="height: calc(100vh - var(--fontSize264) - var(--fontSize88));" enhanced="{{true}}" show-scrollbar="{{false}}"> <scroll-view wx:if="{{copyStoreList.length && searchSelectIndex == 0}}" scroll-y style="height: calc(100vh - var(--fontSize264) - var(--fontSize88));" enhanced="{{true}}" show-scrollbar="{{false}}">
<block wx:for="{{copyStoreList}}" wx:key="index" wx:for-index="index"> <block wx:for="{{copyStoreList}}" wx:key="index" wx:for-index="index">
<view catch:tap="selectStore" data-item="{{item}}" data-selectindex="{{index}}" class="element {{item.actived ? 'active' : ''}}"> <view catch:tap="selectStore" data-item="{{item}}" data-selectindex="{{index}}" class="element {{item.actived ? 'active' : ''}}">
<view><image src="{{IMG_URL}}/store_icon_nobg.png"></image></view> <view><image class="element-icon" src="{{IMG_URL}}/store_icon_nobg.png"></image></view>
<view class="text_box"> <view class="text_box">
<view class="label">{{item.merchantName}}</view> <view class="label">{{item.merchantName}}</view>
<view class="scene_label" wx:if="{{item.sceneName}}">场景:{{item.sceneName}}</view> <view class="scene_label" wx:if="{{item.sceneName}}">场景:{{item.sceneName}}</view>
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
<scroll-view wx:if="{{customStoreList.length && searchSelectIndex == 1 && userInfo.sceneType == 1}}" scroll-y style="height: calc(100vh - var(--fontSize264) - var(--fontSize88));" enhanced="{{true}}" show-scrollbar="{{false}}" bindscrolltolower="scrollonReachBottom"> <scroll-view wx:if="{{customStoreList.length && searchSelectIndex == 1 && userInfo.sceneType == 1}}" scroll-y style="height: calc(100vh - var(--fontSize264) - var(--fontSize88));" enhanced="{{true}}" show-scrollbar="{{false}}" bindscrolltolower="scrollonReachBottom">
<block wx:for="{{customStoreList}}" wx:key="index" wx:for-index="index"> <block wx:for="{{customStoreList}}" wx:key="index" wx:for-index="index">
<view catch:tap="selectStore" data-item="{{item}}" data-selectindex="{{index}}" class="element custom_element {{item.actived ? 'active' : ''}}"> <view catch:tap="selectStore" data-item="{{item}}" data-selectindex="{{index}}" class="element custom_element {{item.actived ? 'active' : ''}}">
<view><image src="{{IMG_URL}}/user_avatar.png"></image></view> <view><image class="element-icon" src="{{IMG_URL}}/user_avatar.png"></image></view>
<view class="text_box"> <view class="text_box">
<view class="custom_text"> <view class="custom_text">
<view class="name_phone"> <view class="name_phone">
......
...@@ -198,7 +198,8 @@ ...@@ -198,7 +198,8 @@
font-size: var(--fontSize28); font-size: var(--fontSize28);
} }
.wrapper .search_box image{ .wrapper .search_box .icon,
.wrapper .search_box .clear_icon{
width: var(--fontSize32); width: var(--fontSize32);
height: var(--fontSize32); height: var(--fontSize32);
} }
...@@ -339,7 +340,7 @@ ...@@ -339,7 +340,7 @@
margin-top: 0; margin-top: 0;
} }
.wrapper .element image{ .wrapper .element .element-icon{
width: var(--fontSize96); width: var(--fontSize96);
height: var(--fontSize96); height: var(--fontSize96);
margin-right: var(--fontSize30); margin-right: var(--fontSize30);
...@@ -417,7 +418,7 @@ ...@@ -417,7 +418,7 @@
.wrapper .element{ .wrapper .element{
padding: var(--fontSize20); padding: var(--fontSize20);
} }
.wrapper .element image{ .wrapper .element .element-icon{
width: var(--fontSize70); width: var(--fontSize70);
height: var(--fontSize70); height: var(--fontSize70);
} }
......
// packageEquity/pages/carQuotation/components/skuGoods/Goods.js // packageEquity/pages/carQuotation/components/skuGoods/Goods.js
import { getSystemInfoSync } from '~/utils/systemInfo'
Component({ Component({
/** /**
* 组件的属性列表 * 组件的属性列表
...@@ -227,7 +228,7 @@ Component({ ...@@ -227,7 +228,7 @@ Component({
attached() { attached() {
console.log(77777) console.log(77777)
this.setData({ this.setData({
windowHight: wx.getSystemInfoSync().windowHeight windowHight: getSystemInfoSync().windowHeight
}) })
} }
} }
......
...@@ -58,13 +58,13 @@ ...@@ -58,13 +58,13 @@
</view> </view>
</view> </view>
<view class="logout-box"> <view class="logout-box">
<view class="logout text-center" bindtap="changeAccount">切换账号</view> <view class="logout logout-first text-center" bindtap="changeAccount">切换账号</view>
<view class="logout text-center" bindtap="logout">退出账号</view> <view class="logout text-center" bindtap="logout">退出账号</view>
<view class="message-box"> <view class="message-box">
<!-- <view class="message">为保障你的合法权益,请阅读并同意</view> --> <!-- <view class="message">为保障你的合法权益,请阅读并同意</view> -->
<text catchtap="jump" data-url="privacy">《隐私协议》</text> <text class="agreement-link" catchtap="jump" data-url="privacy">《隐私协议》</text>
和 和
<text catchtap="jump" data-url="agreement">《用户协议》</text> <text class="agreement-link" catchtap="jump" data-url="agreement">《用户协议》</text>
</view> </view>
</view> </view>
</view> </view>
......
/* tabComponents/pages/index/index.wxss */ /* tabComponents/pages/index/index.wxss */
page {
background: #F7F8FA;
}
.pagedetail { .pagedetail {
position: relative; position: relative;
...@@ -10,6 +7,7 @@ page { ...@@ -10,6 +7,7 @@ page {
.layout_box { .layout_box {
height: 100%; height: 100%;
overflow: scroll; overflow: scroll;
background: #F7F8FA;
} }
.main { .main {
...@@ -387,7 +385,7 @@ page { ...@@ -387,7 +385,7 @@ page {
font-size: var(--fontSize28); font-size: var(--fontSize28);
} }
.logout-box :first-child { .logout-box .logout-first {
border-bottom: 1rpx solid #E4E8EE; border-bottom: 1rpx solid #E4E8EE;
} }
...@@ -399,7 +397,7 @@ page { ...@@ -399,7 +397,7 @@ page {
transform: translateX(-50%); transform: translateX(-50%);
} }
.message-box text { .message-box .agreement-link {
color: #5092FF; color: #5092FF;
} }
.text-center { .text-center {
......
...@@ -98,7 +98,6 @@ Component({ ...@@ -98,7 +98,6 @@ Component({
_btnTextColor: ['#A2A2A8', '#333333', '#303030'], _btnTextColor: ['#A2A2A8', '#333333', '#303030'],
maskAnimate: [], maskAnimate: [],
frameAnimate: [], frameAnimate: [],
title: '', // 提示弹框
success: () => {}, // 成功 success: () => {}, // 成功
error: () => {} // 失败 error: () => {} // 失败
}, },
......
import { IMG_URL } from '../../utils/imageBase.js' import { IMG_URL } from '../../utils/imageBase.js'
// components/navigationBar/navigationBar.js // components/navigationBar/navigationBar.js
import util from '../../utils/util' import util from '../../utils/util'
import { getSystemInfo, getSystemInfoSync } from '~/utils/systemInfo'
const app = getApp() const app = getApp()
Component({ Component({
options: { options: {
...@@ -47,11 +48,11 @@ Component({ ...@@ -47,11 +48,11 @@ Component({
*/ */
let _this = this let _this = this
// 获取屏幕宽度和高度 // 获取屏幕宽度和高度
const { windowWidth, windowHeight } = wx.getSystemInfoSync() const { windowWidth, windowHeight } = getSystemInfoSync()
// 判断屏幕方向 // 判断屏幕方向
const isLandscape = windowWidth > windowHeight // '横屏' : '竖屏' const isLandscape = windowWidth > windowHeight // '横屏' : '竖屏'
wx.getSystemInfo({ getSystemInfo({
success(res) { success(res) {
let { let {
fontSizeSetting, fontSizeSetting,
...@@ -108,7 +109,7 @@ Component({ ...@@ -108,7 +109,7 @@ Component({
}) })
}, },
getFallbackNavBarRect() { getFallbackNavBarRect() {
const sys = wx.getSystemInfoSync() const sys = getSystemInfoSync()
const menu = wx.getMenuButtonBoundingClientRect() const menu = wx.getMenuButtonBoundingClientRect()
const statusBarHeight = const statusBarHeight =
sys.platform === 'ios' ? sys.safeArea?.top ?? sys.statusBarHeight : sys.statusBarHeight sys.platform === 'ios' ? sys.safeArea?.top ?? sys.statusBarHeight : sys.statusBarHeight
......
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
border-radius: 50%; border-radius: 50%;
border: var(--fontSize2) solid #E3E3E6; border: var(--fontSize2) solid #E3E3E6;
} }
image{ .radio-icon{
width: var(--fontSize32); width: var(--fontSize32);
height: var(--fontSize32); height: var(--fontSize32);
} }
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<view class="prompt_content"> <view class="prompt_content">
<view class="select_item"> <view class="select_item">
<block wx:if="{{infoData.payFlag == 1}}"> <block wx:if="{{infoData.payFlag == 1}}">
<image src="/components/images/radio.png" /> <image class="radio-icon" src="/components/images/radio.png" />
</block> </block>
<block wx:else> <block wx:else>
<view class="arc" bindtap="chooseParent" data-type="1" /> <view class="arc" bindtap="chooseParent" data-type="1" />
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
</view> </view>
<view class="select_item" style="border-bottom: 0rpx;"> <view class="select_item" style="border-bottom: 0rpx;">
<block wx:if="{{infoData.payFlag == 2}}"> <block wx:if="{{infoData.payFlag == 2}}">
<image src="/components/images/radio.png" /> <image class="radio-icon" src="/components/images/radio.png" />
</block> </block>
<block wx:else> <block wx:else>
<view class="arc" bindtap="chooseParent" data-type="2" /> <view class="arc" bindtap="chooseParent" data-type="2" />
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
<view class="child_select_content" wx:if="{{infoData.payFlag == 2}}"> <view class="child_select_content" wx:if="{{infoData.payFlag == 2}}">
<view wx:for="{{payTypeList}}" class="child_select_item" wx:key="index"> <view wx:for="{{payTypeList}}" class="child_select_item" wx:key="index">
<block wx:if="{{infoData.payType == item.value}}"> <block wx:if="{{infoData.payType == item.value}}">
<image src="/components/images/radio.png" /> <image class="radio-icon" src="/components/images/radio.png" />
</block> </block>
<block wx:else> <block wx:else>
<view class="arc" bindtap="chooseChild" data-type="{{item.value}}" /> <view class="arc" bindtap="chooseChild" data-type="{{item.value}}" />
......
...@@ -99,7 +99,7 @@ ...@@ -99,7 +99,7 @@
color: #6C6F75; color: #6C6F75;
font-size: var(--fontSize28); font-size: var(--fontSize28);
margin: var(--fontSize32) calc(-1 * var(--fontSize19)) 0 calc(-1 * var(--fontSize19)); margin: var(--fontSize32) calc(-1 * var(--fontSize19)) 0 calc(-1 * var(--fontSize19));
text{ .footer-highlight{
color: #347BFF; color: #347BFF;
} }
} }
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
</view> </view>
</view> </view>
<view class="custom-content-footer"> <view class="custom-content-footer">
请先完成<text>【{{customObj.title}}】</text>考试测评后会推荐适合您的课程 请先完成<text class="footer-highlight">【{{customObj.title}}】</text>考试测评后会推荐适合您的课程
</view> </view>
</block> </block>
</view> </view>
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
* 用来配置小程序项目的变量 * 用来配置小程序项目的变量
* 统一管理 * 统一管理
*/ */
import { getSystemInfoSync } from './utils/systemInfo.js'
// 配置预发布的小程序aapId // 配置预发布的小程序aapId
export const preReleaseAppId = "wx96c8f2a3e76907cb"; export const preReleaseAppId = "wx96c8f2a3e76907cb";
...@@ -20,7 +21,7 @@ export const appId = "wx570d9331f9ace0bd"; ...@@ -20,7 +21,7 @@ export const appId = "wx570d9331f9ace0bd";
*/ */
let index = 2; let index = 2;
const accountInfo = wx.getAccountInfoSync(); const accountInfo = wx.getAccountInfoSync();
const systemInfo = wx.getSystemInfoSync(); const systemInfo = getSystemInfoSync();
const envName = accountInfo.miniProgram.envVersion; const envName = accountInfo.miniProgram.envVersion;
//手动控制体验版环境的请求 true就依据下面index false就默认2 //手动控制体验版环境的请求 true就依据下面index false就默认2
const manual = false; const manual = false;
......
// packageCrowdFunding/pages/activityPay/activityPay.js // packageCrowdFunding/pages/activityPay/activityPay.js
import { getSystemInfoSync } from '~/utils/systemInfo'
// import { centsToyuan } from "~/utils/format"; // import { centsToyuan } from "~/utils/format";
import constantData from './constant/data' import constantData from './constant/data'
...@@ -99,7 +100,7 @@ Page({ ...@@ -99,7 +100,7 @@ Page({
// console.log(text) // console.log(text)
let size = 0 let size = 0
try { try {
const info = wx.getSystemInfoSync() const info = getSystemInfoSync()
let scale = info.windowWidth / 750 //不同屏幕下QRcode的适配比例;设计稿是750宽 let scale = info.windowWidth / 750 //不同屏幕下QRcode的适配比例;设计稿是750宽
let width = 300 * scale let width = 300 * scale
size = width size = width
......
// pages/equity/index.js // pages/equity/index.js
import { IMG_URL } from '~/utils/imageBase.js' import { IMG_URL } from '~/utils/imageBase.js'
import { getSystemInfoSync } from '~/utils/systemInfo'
import { get4SStoreList } from '~/store/index' import { get4SStoreList } from '~/store/index'
import { checkDailyReport } from '~/store/ModalToQueueControl' import { checkDailyReport } from '~/store/ModalToQueueControl'
import api from '~/api/api.js' import api from '~/api/api.js'
...@@ -83,7 +84,8 @@ Page({ ...@@ -83,7 +84,8 @@ Page({
isStaff: false, isStaff: false,
storeRange: [], storeRange: [],
showPage: false, showPage: false,
invoiceOrderInfo: {} invoiceOrderInfo: {},
serviceCenterUnreadNum: 0
// hasMode:true // hasMode:true
}, },
async navigator(e) { async navigator(e) {
...@@ -115,7 +117,7 @@ Page({ ...@@ -115,7 +117,7 @@ Page({
// 检测一下是否能微信端小程序登录 // 检测一下是否能微信端小程序登录
checkAgreeClient(loginUserObj) { checkAgreeClient(loginUserObj) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
let sysInfo = wx.getSystemInfoSync() let sysInfo = getSystemInfoSync()
// let { environment } = sysInfo // let { environment } = sysInfo
// 1企业微信 0微信 // 1企业微信 0微信
let envName = sysInfo.environment ? 1 : 0 let envName = sysInfo.environment ? 1 : 0
...@@ -673,7 +675,7 @@ Page({ ...@@ -673,7 +675,7 @@ Page({
}, },
async checkServiceNotice() { async checkServiceNotice() {
const unread = await fetchServiceCenterUnread() const unread = await fetchServiceCenterUnread()
this.setData({ serviceCenterUnreadNum: unread }) this.setData({ serviceCenterUnreadNum: Number(unread) || 0 })
const candidate = await resolveFirstUnreadNotice() const candidate = await resolveFirstUnreadNotice()
if (!candidate) return if (!candidate) return
......
import { getSystemInfoSync } from '~/utils/systemInfo'
const _ctx_ = Symbol('_ctx_') const _ctx_ = Symbol('_ctx_')
const _pixelRatio_ = Symbol('_pixelRatio_') const _pixelRatio_ = Symbol('_pixelRatio_')
const _canvas_ = Symbol('_canvas_') const _canvas_ = Symbol('_canvas_')
...@@ -18,7 +19,7 @@ class DrawLineChart { ...@@ -18,7 +19,7 @@ class DrawLineChart {
console.log(res) console.log(res)
const canvas = res[0].node, const canvas = res[0].node,
ctx = canvas.getContext('2d'), ctx = canvas.getContext('2d'),
dpr = wx.getSystemInfoSync().pixelRatio, dpr = getSystemInfoSync().pixelRatio,
width = res[0].width * dpr, width = res[0].width * dpr,
height = res[0].height * dpr height = res[0].height * dpr
canvas.width = width canvas.width = width
......
import { getSystemInfoSync } from '~/utils/systemInfo'
const _ctx_ = Symbol('_ctx_') const _ctx_ = Symbol('_ctx_')
const _pixelRatio_ = Symbol('_pixelRatio_') const _pixelRatio_ = Symbol('_pixelRatio_')
const _canvas_ = Symbol('_canvas_') const _canvas_ = Symbol('_canvas_')
...@@ -17,7 +18,7 @@ class DrawPieChart { ...@@ -17,7 +18,7 @@ class DrawPieChart {
}).exec((res) => { }).exec((res) => {
const canvas = res[0].node, const canvas = res[0].node,
ctx = canvas.getContext('2d'), ctx = canvas.getContext('2d'),
dpr = wx.getSystemInfoSync().pixelRatio, dpr = getSystemInfoSync().pixelRatio,
width = res[0].width * dpr, width = res[0].width * dpr,
height = res[0].height * dpr height = res[0].height * dpr
canvas.width = width canvas.width = width
......
// packageEquity/pages/aiCheck/result/result.js // packageEquity/pages/aiCheck/result/result.js
import { getSystemInfoSync } from '~/utils/systemInfo'
var wxCharts = require('./wxcharts') var wxCharts = require('./wxcharts')
import aiApi from '../../../aiApi' import aiApi from '../../../aiApi'
import carLifeApi from '../../../carEquityApi' import carLifeApi from '../../../carEquityApi'
...@@ -247,7 +248,7 @@ Page({ ...@@ -247,7 +248,7 @@ Page({
}, },
setDetail(reportItem) { setDetail(reportItem) {
let seriesData = [], let seriesData = [],
imageWidth = wx.getSystemInfoSync().windowWidth imageWidth = getSystemInfoSync().windowWidth
reportItem.map(e => { reportItem.map(e => {
seriesData.push(e.star) seriesData.push(e.star)
e.starList = this.getStar(e.star) e.starList = this.getStar(e.star)
......
import Dialog from "@vant/weapp/dialog/dialog"; import Dialog from "@vant/weapp/dialog/dialog";
import { getSystemInfoSync } from '~/utils/systemInfo'
import WebSocketUtil from "~/packageEquity/utils/aliyun/socket.js"; import WebSocketUtil from "~/packageEquity/utils/aliyun/socket.js";
import carLifeApi from "../../../carEquityApi"; import carLifeApi from "../../../carEquityApi";
const { scoket_url } = require("~/config"); const { scoket_url } = require("~/config");
...@@ -547,7 +548,7 @@ Page({ ...@@ -547,7 +548,7 @@ Page({
*/ */
getChatH() { getChatH() {
// 获取屏幕宽度和高度 // 获取屏幕宽度和高度
const { windowWidth, windowHeight } = wx.getSystemInfoSync(); const { windowWidth, windowHeight } = getSystemInfoSync();
// 判断屏幕方向 // 判断屏幕方向
const isLandscape = windowWidth > windowHeight; // '横屏' : '竖屏' const isLandscape = windowWidth > windowHeight; // '横屏' : '竖屏'
......
// packageEquity/pages/beforeCreate/beforeCreate.js // packageEquity/pages/beforeCreate/beforeCreate.js
import { getSystemInfo as fetchSystemInfo } from '~/utils/systemInfo'
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
...@@ -28,7 +29,7 @@ Page({ ...@@ -28,7 +29,7 @@ Page({
}); });
}, },
}); });
wx.getSystemInfo({ fetchSystemInfo({
success(res) { success(res) {
console.log(res); console.log(res);
const deviceOrientation = res.deviceOrientation; const deviceOrientation = res.deviceOrientation;
......
...@@ -191,7 +191,7 @@ ...@@ -191,7 +191,7 @@
color: #222222; color: #222222;
} }
.total-box text { .total-box .total-text {
margin-right: var(--fontSize24); margin-right: var(--fontSize24);
} }
...@@ -282,12 +282,12 @@ ...@@ -282,12 +282,12 @@
color: #999999; color: #999999;
} }
.list .item .name image { .list .item .name .name-icon {
width: var(--fontSize46); width: var(--fontSize46);
height: var(--fontSize46); height: var(--fontSize46);
} }
.list .item.gray .name image { .list .item.gray .name .name-icon {
filter: grayscale(100%); filter: grayscale(100%);
} }
...@@ -348,7 +348,7 @@ ...@@ -348,7 +348,7 @@
align-items: baseline; align-items: baseline;
} }
.list .item .goods-list .goods .goods-price text { .list .item .goods-list .goods .goods-price .goods-price-text {
font-size: var(--fontSize24); font-size: var(--fontSize24);
color: #2A2A2A; color: #2A2A2A;
} }
...@@ -361,13 +361,13 @@ ...@@ -361,13 +361,13 @@
align-items: center; align-items: center;
} }
.list .item .goods-more text { .list .item .goods-more .more-text {
font-size: var(--fontSize28); font-size: var(--fontSize28);
color: #347BFF; color: #347BFF;
margin-right: var(--fontSize20); margin-right: var(--fontSize20);
} }
.list .item.gray .goods-more text { .list .item.gray .goods-more .more-text {
color: #666; color: #666;
} }
......
// packageEquity/pages/carQuotation/CarQuotationPay/CarQuotationPay.js // packageEquity/pages/carQuotation/CarQuotationPay/CarQuotationPay.js
import { getSystemInfoSync } from '~/utils/systemInfo'
import { getOrderDetail, updateOrderStatus, getQuotationInfoById, createPayOrder } from '../../../api' import { getOrderDetail, updateOrderStatus, getQuotationInfoById, createPayOrder } from '../../../api'
import { createQrcodeImage } from '~/api/api' import { createQrcodeImage } from '~/api/api'
import qrcode from '~/utils/lib/wxqrcode' import qrcode from '~/utils/lib/wxqrcode'
...@@ -62,7 +63,7 @@ Page({ ...@@ -62,7 +63,7 @@ Page({
// console.log(text) // console.log(text)
let size = 0 let size = 0
try { try {
const info = wx.getSystemInfoSync() const info = getSystemInfoSync()
let scale = info.windowWidth / 750 //不同屏幕下QRcode的适配比例;设计稿是750宽 let scale = info.windowWidth / 750 //不同屏幕下QRcode的适配比例;设计稿是750宽
let width = 300 * scale let width = 300 * scale
size = width size = width
...@@ -104,7 +105,7 @@ Page({ ...@@ -104,7 +105,7 @@ Page({
console.log(text) console.log(text)
let size = 0 let size = 0
try { try {
const info = wx.getSystemInfoSync() const info = getSystemInfoSync()
let scale = info.windowWidth / 750 //不同屏幕下QRcode的适配比例;设计稿是750宽 let scale = info.windowWidth / 750 //不同屏幕下QRcode的适配比例;设计稿是750宽
let width = 300 * scale let width = 300 * scale
size = width size = width
......
// packageEquity/pages/carQuotation/components/zyPayPopup/zyPayPopup.js // packageEquity/pages/carQuotation/components/zyPayPopup/zyPayPopup.js
import { getSystemInfoSync } from '~/utils/systemInfo'
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/' const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
import api from '~/api/api.js' import api from '~/api/api.js'
Component({ Component({
...@@ -14,7 +15,7 @@ Component({ ...@@ -14,7 +15,7 @@ Component({
observer: function(n) { observer: function(n) {
if (n) { if (n) {
let { showZyTarget, updateZyFlag } = this.data let { showZyTarget, updateZyFlag } = this.data
let sysInfo = wx.getSystemInfoSync() let sysInfo = getSystemInfoSync()
// sysInfo.environment 1 企业微信打开 0微信打开 // sysInfo.environment 1 企业微信打开 0微信打开
// sysInfo.platform === 'windows' || sysInfo.platform === 'mac' || sysInfo.platform === 'linux' 是否pc端打开 // sysInfo.platform === 'windows' || sysInfo.platform === 'mac' || sysInfo.platform === 'linux' 是否pc端打开
this.setData({ this.setData({
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
padding: var(--fontSize40) 0 var(--fontSize32) 0; padding: var(--fontSize40) 0 var(--fontSize32) 0;
font-size: var(--fontSize28); font-size: var(--fontSize28);
color: #222222; color: #222222;
image{ .tips-icon{
flex-shrink: 0; flex-shrink: 0;
margin-top: var(--fontSize2); margin-top: var(--fontSize2);
width: var(--fontSize32); width: var(--fontSize32);
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
flex-flow: column; flex-flow: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
image{ .upload-icon{
width: var(--fontSize40); width: var(--fontSize40);
height: var(--fontSize40); height: var(--fontSize40);
} }
......
...@@ -11,9 +11,9 @@ ...@@ -11,9 +11,9 @@
height="auto"> height="auto">
<view class="content"> <view class="content">
<block wx:if="{{!fileList.length}}"> <block wx:if="{{!fileList.length}}">
<view class="tips-text"><image src="{{IMG_URL}}zy_tips_icon.png"></image>上传完毕计入有效成交,订单才可参与提成/清分/积分发放!</view> <view class="tips-text"><image class="tips-icon" src="{{IMG_URL}}zy_tips_icon.png"></image>上传完毕计入有效成交,订单才可参与提成/清分/积分发放!</view>
<view class="upload_content" bindtap="selectUplaodType"> <view class="upload_content" bindtap="selectUplaodType">
<image src="{{IMG_URL}}zy-upload_icon.png"></image> <image class="upload-icon" src="{{IMG_URL}}zy-upload_icon.png"></image>
<text class="text">图片或PDF</text> <text class="text">图片或PDF</text>
</view> </view>
</block> </block>
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<image class="del_icon" src="{{IMG_URL}}zy_del_icon.png" mode="" bindtap="deleteFile" data-index="{{index}}" /> <image class="del_icon" src="{{IMG_URL}}zy_del_icon.png" mode="" bindtap="deleteFile" data-index="{{index}}" />
</view> </view>
<view class="upload_content" bindtap="uploadImages" wx:if="{{fileList.length < 9}}"> <view class="upload_content" bindtap="uploadImages" wx:if="{{fileList.length < 9}}">
<image src="{{IMG_URL}}zy-upload_icon.png"></image> <image class="upload-icon" src="{{IMG_URL}}zy-upload_icon.png"></image>
<text class="text">最多9张</text> <text class="text">最多9张</text>
</view> </view>
</view> </view>
......
// packageEquity/pages/carEquity/serviceInfo/serviceInfo.js quotationGoods // packageEquity/pages/carEquity/serviceInfo/serviceInfo.js quotationGoods
import { getSystemInfoSync } from '~/utils/systemInfo'
import { import {
// quotationPicture, // quotationPicture,
quotationAdd, quotationAdd,
...@@ -2139,7 +2140,7 @@ Page({ ...@@ -2139,7 +2140,7 @@ Page({
onLoad(options) { onLoad(options) {
/*获取屏幕高度*/ /*获取屏幕高度*/
this.setData({ this.setData({
windowHeight: wx.getSystemInfoSync().windowHeight, windowHeight: getSystemInfoSync().windowHeight,
}); });
const that = this; const that = this;
......
// import { commonApi, equityApi } from '../../api/api' // import { commonApi, equityApi } from '../../api/api'
import { uploadImg } from '~/api/api' import { uploadImg } from '~/api/api'
import { getSystemInfoSync } from '~/utils/systemInfo'
import { quotationUpgrade, updateOrderStatus } from '../../../api' import { quotationUpgrade, updateOrderStatus } from '../../../api'
import { ImgUrl } from '~/config' import { ImgUrl } from '~/config'
const IMG_URL = ImgUrl + '/' const IMG_URL = ImgUrl + '/'
...@@ -35,7 +36,7 @@ Page({ ...@@ -35,7 +36,7 @@ Page({
}) })
}, },
onLoad(options) { onLoad(options) {
let { windowWidth, windowHeight } = wx.getSystemInfoSync() let { windowWidth, windowHeight } = getSystemInfoSync()
if (options.writeOffCode) { if (options.writeOffCode) {
this.writeOffCode = options.writeOffCode this.writeOffCode = options.writeOffCode
} }
......
...@@ -356,12 +356,12 @@ ...@@ -356,12 +356,12 @@
color: #999999; color: #999999;
} }
.list .item .name image { .list .item .name .name-icon {
width: var(--fontSize46); width: var(--fontSize46);
height: var(--fontSize46); height: var(--fontSize46);
} }
.list .item.gray .name image { .list .item.gray .name .name-icon {
filter: grayscale(100%); filter: grayscale(100%);
} }
...@@ -422,7 +422,7 @@ ...@@ -422,7 +422,7 @@
align-items: baseline; align-items: baseline;
} }
.list .item .goods-list .goods .goods-price text { .list .item .goods-list .goods .goods-price .goods-price-text {
font-size: var(--fontSize24); font-size: var(--fontSize24);
color: #2A2A2A; color: #2A2A2A;
} }
...@@ -435,13 +435,13 @@ ...@@ -435,13 +435,13 @@
align-items: center; align-items: center;
} }
.list .item .goods-more text { .list .item .goods-more .more-text {
font-size: var(--fontSize28); font-size: var(--fontSize28);
color: #347BFF; color: #347BFF;
margin-right: var(--fontSize20); margin-right: var(--fontSize20);
} }
.list .item.gray .goods-more text { .list .item.gray .goods-more .more-text {
color: #666; color: #666;
} }
...@@ -764,7 +764,7 @@ ...@@ -764,7 +764,7 @@
height: var(--fontSize136); height: var(--fontSize136);
} }
.fixed-btns .btn image { .fixed-btns .btn .btn-icon {
width: var(--fontSize60); width: var(--fontSize60);
height: var(--fontSize60); height: var(--fontSize60);
flex-shrink: 0; flex-shrink: 0;
...@@ -803,7 +803,7 @@ ...@@ -803,7 +803,7 @@
padding: var(--fontSize48); padding: var(--fontSize48);
} }
.modal text, .modal .modal-text,
.modal { .modal {
font-size: var(--fontSize28); font-size: var(--fontSize28);
color: #333333; color: #333333;
......
...@@ -376,7 +376,7 @@ ...@@ -376,7 +376,7 @@
<block wx:if="{{ !perm.hasPermission.isSuper(userInfo) && userInfo.userType == 2&&mode!=-1 && showIcon1 &&isOrder }}"> <block wx:if="{{ !perm.hasPermission.isSuper(userInfo) && userInfo.userType == 2&&mode!=-1 && showIcon1 &&isOrder }}">
<view class="fixed-btns"> <view class="fixed-btns">
<view class="btn text-center" bindtap="handleClickOrderBtn" data-name="createOrder"> <view class="btn text-center" bindtap="handleClickOrderBtn" data-name="createOrder">
<image src="{{ IMG_URL2 }}upgrade/scancode_verification02.png" /> <image class="btn-icon" src="{{ IMG_URL2 }}upgrade/scancode_verification02.png" />
新增提单 新增提单
</view> </view>
<!-- <view class="btn text-center" bindtap="scan"> <!-- <view class="btn text-center" bindtap="scan">
...@@ -405,12 +405,12 @@ ...@@ -405,12 +405,12 @@
<modal id="modal" class="modal" custom="true" btns="{{ ['返回','确定'] }}"> <modal id="modal" class="modal" custom="true" btns="{{ ['返回','确定'] }}">
<view class="modatcontent"> <view class="modatcontent">
<view class="orderCode"> <view class="orderCode">
<text class="code">订单编号:</text> <text class="modal-text code">订单编号:</text>
<text>{{showErrorId}}</text> <text class="modal-text">{{showErrorId}}</text>
</view> </view>
<view class="tips"> <view class="tips">
若工单信息有误,确认操作可标记为 若工单信息有误,确认操作可标记为
<text class="color">已失效</text> <text class="modal-text color">已失效</text>
,并补录新工单以提供线下核对。 ,并补录新工单以提供线下核对。
</view> </view>
</view> </view>
......
import { ImgUrl } from "~/config"; import { ImgUrl } from "~/config";
import { getSystemInfo as fetchSystemInfo } from '~/utils/systemInfo'
import { import {
quotationGoodsList, quotationGoodsList,
defeatOrderCreate, defeatOrderCreate,
...@@ -71,7 +72,7 @@ Page({ ...@@ -71,7 +72,7 @@ Page({
}); });
}, },
}); });
wx.getSystemInfo({ fetchSystemInfo({
success(res) { success(res) {
console.log(res); console.log(res);
const deviceOrientation = res.deviceOrientation; const deviceOrientation = res.deviceOrientation;
......
// packageEquity/pages/beforeCreate/beforeCreate.js // packageEquity/pages/beforeCreate/beforeCreate.js
import { getSystemInfo as fetchSystemInfo } from '~/utils/systemInfo'
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
...@@ -25,7 +26,7 @@ Page({ ...@@ -25,7 +26,7 @@ Page({
}); });
}, },
}); });
wx.getSystemInfo({ fetchSystemInfo({
success(res) { success(res) {
console.log(res); console.log(res);
const deviceOrientation = res.deviceOrientation; const deviceOrientation = res.deviceOrientation;
......
...@@ -13,8 +13,7 @@ Component({ ...@@ -13,8 +13,7 @@ Component({
userInfo: { type: Object, value: {} }, userInfo: { type: Object, value: {} },
showEmployeeName: { type: Boolean, value: false }, showEmployeeName: { type: Boolean, value: false },
isShowDefeatBtn: { type: Boolean, value: true }, isShowDefeatBtn: { type: Boolean, value: true },
recordTabList: { type: Array, value: [] }, recordTabList: { type: Array, value: [] }
IMG_URL: { type: String, value: '' }
}, },
methods: { methods: {
onFilterTap() { onFilterTap() {
......
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
<wxs src="../../../../../utils/permission.wxs" module="perm" /> <wxs src="../../../../../utils/permission.wxs" module="perm" />
<view class="receive-list"> <view class="receive-list">
<view class="screen-box {{ showScreen ? '' : 'sticky-screen' }} {{ isScrollTop ? 'bg-white' : '' }}"> <view class="screen-box {{ showScreen ? '' : 'sticky-screen' }} {{ isScrollTop ? 'bg-white' : '' }}">
<view> <view class="screen-box-row">
<text class="name text-hide">{{ searchForm.merchantNames.length > 1 ? "部分门店" : searchForm.merchantNames.length ? filter.filterMerchantName(searchForm.merchantNames) : !perm.hasPermission.canViewViolation(userInfo) ? userInfo.default4SStoreInfo.merchantName || "全部门店" : "全部门店" }}</text> <text class="name text-hide">{{ searchForm.merchantNames.length > 1 ? "部分门店" : searchForm.merchantNames.length ? filter.filterMerchantName(searchForm.merchantNames) : !perm.hasPermission.canViewViolation(userInfo) ? userInfo.default4SStoreInfo.merchantName || "全部门店" : "全部门店" }}</text>
</view> </view>
<view bindtap="onFilterTap"> <view class="screen-box-row" bindtap="onFilterTap">
<text class="text">筛选</text><gl-image webp src="/equity/screen-icon.png" /> <text class="text">筛选</text><gl-image class="screen-icon" webp src="/equity/screen-icon.png" />
</view> </view>
</view> </view>
<view class="tab-box"> <view class="tab-box">
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
.screen-box.bg-white { .screen-box.bg-white {
background: #ffffff; background: #ffffff;
} }
.screen-box view { .screen-box .screen-box-row {
display: flex; display: flex;
align-items: flex-end; align-items: flex-end;
} }
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
font-size: var(--fontSize24); font-size: var(--fontSize24);
color: #292d33; color: #292d33;
} }
.screen-box image { .screen-box .screen-icon {
width: var(--fontSize36); width: var(--fontSize36);
height: var(--fontSize36); height: var(--fontSize36);
} }
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
<view class="list-box"> <view class="list-box">
<view class="item flex-block"> <view class="item flex-block">
<image src="{{ IMG_URL }}images/search.png" class="icon"></image> <image src="{{ IMG_URL }}images/search.png" class="icon"></image>
<input placeholder="客户姓名/手机号" bindinput="input" value="{{customerName}}" type="text" /> <input class="search-input" placeholder="客户姓名/手机号" bindinput="input" value="{{customerName}}" type="text" />
</view> </view>
</view> </view>
</view> </view>
......
...@@ -152,7 +152,7 @@ ...@@ -152,7 +152,7 @@
padding: 0 var(--fontSize24); padding: 0 var(--fontSize24);
} }
.box .list-box .item input{ .box .list-box .item .search-input{
width: calc(100% - var(--fontSize50)); width: calc(100% - var(--fontSize50));
text-align: left; text-align: left;
} }
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<block wx:if="{{ !hideScore && itemInfo.checkHistoryFlag == 0 }}"> <block wx:if="{{ !hideScore && itemInfo.checkHistoryFlag == 0 }}">
<view class="record-header new-record"> <view class="record-header new-record">
<view class="base-message"> <view class="base-message">
<view> <view class="base-message-row">
<view class="record-name text-hide"> <view class="record-name text-hide">
<text class="value">{{ itemInfo.customerName }}</text> <text class="value">{{ itemInfo.customerName }}</text>
<text class="order-name" <text class="order-name"
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
</block> </block>
<view class="record-header"> <view class="record-header">
<view class="base-message"> <view class="base-message">
<view> <view class="base-message-row">
<view class="record-name text-hide"> <view class="record-name text-hide">
<text class="value">{{ filter.desensitizeName(itemInfo.customerName) }}</text> <text class="value">{{ filter.desensitizeName(itemInfo.customerName) }}</text>
<text class="order-name" <text class="order-name"
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
justify-content: space-between; justify-content: space-between;
margin-bottom: var(--fontSize12); margin-bottom: var(--fontSize12);
} }
.content .record-header .base-message view { .content .record-header .base-message .base-message-row {
display: flex; display: flex;
align-items: center; align-items: center;
} }
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<view class="text">服务中心</view> <view class="text">服务中心</view>
</view> </view>
</view> </view>
<swiper bindchange="onSwiperChange"> <swiper class="stats-swiper" bindchange="onSwiperChange">
<block wx:for="{{ 3 }}" wx:key="index"> <block wx:for="{{ 3 }}" wx:key="index">
<swiper-item> <swiper-item>
<view class="swiper-item"> <view class="swiper-item">
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
top: 2rpx; top: 2rpx;
right: -8rpx; right: -8rpx;
} }
.swiper-wrap swiper { .swiper-wrap .stats-swiper {
background: #ffffff; background: #ffffff;
box-shadow: 0 24rpx 24rpx -12rpx rgba(211, 217, 230, 0.5019607843); box-shadow: 0 24rpx 24rpx -12rpx rgba(211, 217, 230, 0.5019607843);
border-radius: var(--fontSize20); border-radius: var(--fontSize20);
......
...@@ -9,8 +9,7 @@ Component({ ...@@ -9,8 +9,7 @@ Component({
stodoList: { type: Array, value: [] }, stodoList: { type: Array, value: [] },
missingRecordTodoList: { type: Array, value: [] }, missingRecordTodoList: { type: Array, value: [] },
ispopUp: { type: Boolean, value: true }, ispopUp: { type: Boolean, value: true },
todos: { type: Object, value: {} }, todos: { type: Object, value: {} }
IMG_URL: { type: String, value: '' }
}, },
methods: { methods: {
onGoto(e) { onGoto(e) {
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
wx:for="{{ ispopUp ? todoList : stodoList }}" wx:for="{{ ispopUp ? todoList : stodoList }}"
wx:for-index="idx"> wx:for-index="idx">
<view class="todo-item-title"> <view class="todo-item-title">
<image src="{{ IMG_URL }}{{ item.taskType == '1' ? 'warn' : 'task' }}.png" /> <image class="todo-item-icon" src="{{ IMG_URL }}{{ item.taskType == '1' ? 'warn' : 'task' }}.png" />
<text>{{ todos[item.taskId] }}</text> <text>{{ todos[item.taskId] }}</text>
</view> </view>
<view class="todo-item-info">{{ item.content }}</view> <view class="todo-item-info">{{ item.content }}</view>
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
<block wx:if="{{ missingRecordTodoList.length }}"> <block wx:if="{{ missingRecordTodoList.length }}">
<view class="todo-item"> <view class="todo-item">
<view class="todo-item-title"> <view class="todo-item-title">
<image src="{{ IMG_URL }}warn.png" /><text>接待缺失报备</text> <image class="todo-item-icon" src="{{ IMG_URL }}warn.png" /><text>接待缺失报备</text>
</view> </view>
<view class="todo-item-info">请报备缺失接待客户的原因</view> <view class="todo-item-info">请报备缺失接待客户的原因</view>
<view class="todo-item-btn" bindtap="onMissing">去报备</view> <view class="todo-item-btn" bindtap="onMissing">去报备</view>
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
<view class="pack-up {{ !ispopUp ? 'pack-up-active' : '' }}" <view class="pack-up {{ !ispopUp ? 'pack-up-active' : '' }}"
wx:if="{{ missingRecordTodoList.length + todoList.length > 2 }}" wx:if="{{ missingRecordTodoList.length + todoList.length > 2 }}"
bindtap="onPackup"> bindtap="onPackup">
<image src="{{ IMG_URL }}pack-up.png" /> <image class="pack-up-icon" src="{{ IMG_URL }}pack-up.png" />
</view> </view>
</view> </view>
</block> </block>
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
font-size: var(--fontSize28); font-size: var(--fontSize28);
color: #1a1a1a; color: #1a1a1a;
} }
.todo-list .todo-items .todo-item .todo-item-title image { .todo-list .todo-items .todo-item .todo-item-title .todo-item-icon {
width: var(--fontSize32); width: var(--fontSize32);
height: var(--fontSize32); height: var(--fontSize32);
margin-right: var(--fontSize11); margin-right: var(--fontSize11);
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
left: 50%; left: 50%;
transform: translateX(-50%); transform: translateX(-50%);
} }
.todo-list .pack-up image { .todo-list .pack-up .pack-up-icon {
width: 100%; width: 100%;
} }
.todo-list .pack-up-active { .todo-list .pack-up-active {
......
// components/OcrPhoto.js // components/OcrPhoto.js
import api from '~/api/api.js' import api from '~/api/api.js'
import { getSystemInfoSync } from '~/utils/systemInfo'
const { ocrImageUrl } = require('../../config/imageCdn.js') const { ocrImageUrl } = require('../../config/imageCdn.js')
Page({ Page({
/** /**
...@@ -364,7 +365,7 @@ Page({ ...@@ -364,7 +365,7 @@ Page({
// // 在组件实例进入页面节点树时执行 // // 在组件实例进入页面节点树时执行
var that = this var that = this
that.ctx = wx.createCameraContext() that.ctx = wx.createCameraContext()
let { windowWidth, windowHeight } = wx.getSystemInfoSync() let { windowWidth, windowHeight } = getSystemInfoSync()
this.setData({ windowWidth, windowHeight }) this.setData({ windowWidth, windowHeight })
setTimeout(() => { setTimeout(() => {
that.initCanvas() that.initCanvas()
......
import { getSystemInfoSync } from '~/utils/systemInfo'
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/' const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
import { materialListApi, leavePageTrack } from "../../api/api" import { materialListApi, leavePageTrack } from "../../api/api"
import commonApi from "~/api/api"; import commonApi from "~/api/api";
...@@ -122,7 +123,7 @@ Component({ ...@@ -122,7 +123,7 @@ Component({
heightArr.push(s) heightArr.push(s)
}) })
const last = heightArr.pop() const last = heightArr.pop()
let systemInfo = wx.getSystemInfoSync() let systemInfo = getSystemInfoSync()
const scroll_height = systemInfo.safeArea.height - last - navBarHeight const scroll_height = systemInfo.safeArea.height - last - navBarHeight
this.setData({ this.setData({
scroll_height scroll_height
......
page { .materials-page {
background: #F7F8FA; background: #F7F8FA;
} }
.min-screen-close{ .min-screen-close{
......
<view class="pos-container .max-screen-close"> <view class="pos-container materials-page .max-screen-close">
<view class="bg scroll_height_d_part"></view> <view class="bg scroll_height_d_part"></view>
<view wx:if="{{showPage}}" class="main"> <view wx:if="{{showPage}}" class="main">
<view class="main-box"> <view class="main-box">
......
import { getSystemInfoSync } from '~/utils/systemInfo'
import { enterPageTrack, leavePageTrack, materialDetail } from "../../api/api" import { enterPageTrack, leavePageTrack, materialDetail } from "../../api/api"
Page({ Page({
data: { data: {
...@@ -15,7 +15,7 @@ Page({ ...@@ -15,7 +15,7 @@ Page({
getDetail(options) { getDetail(options) {
materialDetail({ id: options.id }).then((res) => { materialDetail({ id: options.id }).then((res) => {
console.log(res, 'result'); console.log(res, 'result');
const sys = wx.getSystemInfoSync() const sys = getSystemInfoSync()
const styleCss = `width:100%;height:100vh` const styleCss = `width:100%;height:100vh`
let { type, title, id } = options let { type, title, id } = options
let { materialDetailInfoList: _tempArr } = res.data let { materialDetailInfoList: _tempArr } = res.data
......
import { getSystemInfoSync } from '~/utils/systemInfo'
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/' const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
import { materialListApi, leavePageTrack } from "./api/api" import { materialListApi, leavePageTrack } from "./api/api"
let currentTabType = 'video' let currentTabType = 'video'
...@@ -64,7 +65,7 @@ Page({ ...@@ -64,7 +65,7 @@ Page({
heightArr.push(s) heightArr.push(s)
}) })
const last = heightArr.pop() const last = heightArr.pop()
let systemInfo = wx.getSystemInfoSync() let systemInfo = getSystemInfoSync()
const scroll_height = systemInfo.safeArea.height - last * 3 const scroll_height = systemInfo.safeArea.height - last * 3
this.setData({ this.setData({
scroll_height scroll_height
......
...@@ -4,7 +4,22 @@ ...@@ -4,7 +4,22 @@
export function setupWxMock(globalRef = globalThis) { export function setupWxMock(globalRef = globalThis) {
globalRef.wx = { globalRef.wx = {
getAccountInfoSync: () => ({ miniProgram: { envVersion: 'release' } }), getAccountInfoSync: () => ({ miniProgram: { envVersion: 'release' } }),
getSystemInfoSync: () => ({}), getDeviceInfo: () => ({ platform: 'devtools' }),
getWindowInfo: () => ({
windowWidth: 375,
windowHeight: 667,
statusBarHeight: 20,
pixelRatio: 2,
screenWidth: 375,
screenHeight: 667,
safeArea: { top: 20, bottom: 667, height: 647 },
}),
getAppBaseInfo: () => ({
SDKVersion: '3.0.0',
host: 'WeChat',
version: '8.0.0',
language: 'zh_CN',
}),
$hasPermission: { $hasPermission: {
isSuper: u => !!u?.isSuper, isSuper: u => !!u?.isSuper,
isNotMentor: u => u?.loginRole !== 6, isNotMentor: u => u?.loginRole !== 6,
......
// packageStudyCenter/pages/myTask/components/RadarChart/RadarChart.js // packageStudyCenter/pages/myTask/components/RadarChart/RadarChart.js
import { getSystemInfoSync } from '~/utils/systemInfo'
import uCharts from '~/packageStudyCenter/ucharts/index.js' import uCharts from '~/packageStudyCenter/ucharts/index.js'
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/' const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
Component({ Component({
...@@ -107,7 +108,7 @@ Component({ ...@@ -107,7 +108,7 @@ Component({
try { try {
const ctx = canvas.getContext('2d'); const ctx = canvas.getContext('2d');
const systemInfo = wx.getSystemInfoSync(); const systemInfo = getSystemInfoSync();
const pixelRatio = systemInfo.pixelRatio; const pixelRatio = systemInfo.pixelRatio;
const actualWidth = res[0].width * pixelRatio; const actualWidth = res[0].width * pixelRatio;
......
// packageStudyCenter/pages/myTask/components/Task/Task.js // packageStudyCenter/pages/myTask/components/Task/Task.js
import { getSystemInfoSync } from '~/utils/systemInfo'
import api from "../../../../api" import api from "../../../../api"
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/' const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
const dayjs = require('dayjs'); const dayjs = require('dayjs');
...@@ -68,7 +69,7 @@ Component({ ...@@ -68,7 +69,7 @@ Component({
methods: { methods: {
calculateScrollViewHeight() { calculateScrollViewHeight() {
const systemInfo = wx.getSystemInfoSync(); const systemInfo = getSystemInfoSync();
const { windowHeight, windowWidth } = systemInfo; const { windowHeight, windowWidth } = systemInfo;
// 根据设计稿比例计算滚动区域高度 // 根据设计稿比例计算滚动区域高度
const baseHeight = 1334; // 设计稿高度 const baseHeight = 1334; // 设计稿高度
......
// packageUsedCar/pages/deliveryNote/components/step2/step2.js // packageUsedCar/pages/deliveryNote/components/step2/step2.js
import { getSystemInfoSync } from '~/utils/systemInfo'
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/' const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
import newApi from '~/packageUsedCar/api' import newApi from '~/packageUsedCar/api'
import { uploadFile, getImageDisplayUrl } from "~/packageUsedCar/utils/oss/ossUpload.js"; import { uploadFile, getImageDisplayUrl } from "~/packageUsedCar/utils/oss/ossUpload.js";
...@@ -53,7 +54,7 @@ Component({ ...@@ -53,7 +54,7 @@ Component({
let _this = this let _this = this
const { imgList, MAX_IMG_COUNT, MAX_IMAGE_SIZE } = _this.data const { imgList, MAX_IMG_COUNT, MAX_IMAGE_SIZE } = _this.data
const count = MAX_IMG_COUNT - imgList.length const count = MAX_IMG_COUNT - imgList.length
let sysInfo = wx.getSystemInfoSync() let sysInfo = getSystemInfoSync()
if (count <= 0) { if (count <= 0) {
wx.showToast({ wx.showToast({
title: '最多只能上传10张图片', title: '最多只能上传10张图片',
......
import api from "~/api/api"; import api from "~/api/api";
import { getSystemInfoSync } from '~/utils/systemInfo'
import { uploadFile, getImageDisplayUrl } from "~/packageUsedCar/utils/oss/ossUpload.js"; import { uploadFile, getImageDisplayUrl } from "~/packageUsedCar/utils/oss/ossUpload.js";
const IMG_URL = const IMG_URL =
"https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/"; "https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/";
...@@ -383,7 +384,7 @@ Component({ ...@@ -383,7 +384,7 @@ Component({
}); });
} }
} }
let sysInfo = wx.getSystemInfoSync(); let sysInfo = getSystemInfoSync();
// 添加上传中的文件到列表 // 添加上传中的文件到列表
const uploadingFile = { const uploadingFile = {
...file, ...file,
...@@ -646,7 +647,7 @@ Component({ ...@@ -646,7 +647,7 @@ Component({
if (isVideo) { if (isVideo) {
// 视频预览:判断是否是企业微信环境 // 视频预览:判断是否是企业微信环境
const sysInfo = wx.getSystemInfoSync(); const sysInfo = getSystemInfoSync();
if (sysInfo.environment === "wxwork") { if (sysInfo.environment === "wxwork") {
// 企业微信环境,使用自定义弹窗播放视频 // 企业微信环境,使用自定义弹窗播放视频
this.setData({ this.setData({
...@@ -733,7 +734,7 @@ Component({ ...@@ -733,7 +734,7 @@ Component({
if (isVideo) { if (isVideo) {
// 判断是否是企业微信环境 // 判断是否是企业微信环境
const sysInfo = wx.getSystemInfoSync(); const sysInfo = getSystemInfoSync();
if (sysInfo.environment === "wxwork") { if (sysInfo.environment === "wxwork") {
// 企业微信环境,使用自定义弹窗播放视频 // 企业微信环境,使用自定义弹窗播放视频
const videoUrl = file.url || file.path || file.tempFilePath; const videoUrl = file.url || file.path || file.tempFilePath;
......
// packageUsedCar/pages/evaluationForm/confirmCar/confirmCar.js // packageUsedCar/pages/evaluationForm/confirmCar/confirmCar.js
import { getSystemInfoSync } from '~/utils/systemInfo'
const IMG_URL = "https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/" const IMG_URL = "https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/"
import dayjs from 'dayjs' import dayjs from 'dayjs'
import api from '~/api/api.js' import api from '~/api/api.js'
...@@ -376,7 +377,7 @@ Page({ ...@@ -376,7 +377,7 @@ Page({
let _this = this let _this = this
let count = field.maxCount - field?.uploadImages.length let count = field.maxCount - field?.uploadImages.length
const index = _this.data[type]?.findIndex(val => val.key == field.key ) const index = _this.data[type]?.findIndex(val => val.key == field.key )
let sysInfo = wx.getSystemInfoSync() let sysInfo = getSystemInfoSync()
if (sysInfo.environment) { // 企微打开 if (sysInfo.environment) { // 企微打开
if (field.video) { if (field.video) {
const obj = _this.data[type]?.find(val => val.key == field.key) const obj = _this.data[type]?.find(val => val.key == field.key)
...@@ -400,7 +401,7 @@ Page({ ...@@ -400,7 +401,7 @@ Page({
val.type = val.isVideo ? 'video': 'image', val.type = val.isVideo ? 'video': 'image',
val.poster = val.isVideo ? val.coverUrl : '' val.poster = val.isVideo ? val.coverUrl : ''
}) })
let sysInfo = wx.getSystemInfoSync() let sysInfo = getSystemInfoSync()
const hasVideo = media?.some(item => item.isVideo) const hasVideo = media?.some(item => item.isVideo)
if (sysInfo.environment) { // 企微打开 if (sysInfo.environment) { // 企微打开
if (hasVideo) { if (hasVideo) {
......
// packageUsedCar/pages/evaluationForm/evaluationFormDetails/evaluationFormDetails.js // packageUsedCar/pages/evaluationForm/evaluationFormDetails/evaluationFormDetails.js
import { getSystemInfoSync } from '~/utils/systemInfo'
import newApi from "~/packageUsedCar/api"; import newApi from "~/packageUsedCar/api";
import { import {
statusMap, statusMap,
...@@ -686,7 +687,7 @@ Page({ ...@@ -686,7 +687,7 @@ Page({
} else if (type === 2 || type === "2") { } else if (type === 2 || type === "2") {
// 视频预览 // 视频预览
// 判断是否是企业微信环境 // 判断是否是企业微信环境
const sysInfo = wx.getSystemInfoSync(); const sysInfo = getSystemInfoSync();
if (sysInfo.environment) { if (sysInfo.environment) {
// 企业微信环境,使用自定义弹窗播放 // 企业微信环境,使用自定义弹窗播放
this.setData({ this.setData({
...@@ -789,7 +790,7 @@ Page({ ...@@ -789,7 +790,7 @@ Page({
); );
// 计算是否需要两列布局(可根据实际需求调整逻辑) // 计算是否需要两列布局(可根据实际需求调整逻辑)
const systemInfo = wx.getSystemInfoSync(); const systemInfo = getSystemInfoSync();
const shouldShowTwoColumns = systemInfo.windowWidth > 750; const shouldShowTwoColumns = systemInfo.windowWidth > 750;
this.setData({ this.setData({
......
// packageUsedCar/pages/evaluationForm/signInfo/signInfo.js // packageUsedCar/pages/evaluationForm/signInfo/signInfo.js
import { getSystemInfoSync } from '~/utils/systemInfo'
const IMG_URL = "https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/" const IMG_URL = "https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/"
import dayjs from 'dayjs' import dayjs from 'dayjs'
import api from '~/api/api.js' import api from '~/api/api.js'
...@@ -252,7 +253,7 @@ Page({ ...@@ -252,7 +253,7 @@ Page({
'formData.evalPrice': options.evalPrice, 'formData.evalPrice': options.evalPrice,
'formData.handoverTime': dayjs().format('YYYY-MM-DD HH:mm:00'), 'formData.handoverTime': dayjs().format('YYYY-MM-DD HH:mm:00'),
currentDate: new Date().getTime(), currentDate: new Date().getTime(),
sysInfo: wx.getSystemInfoSync() sysInfo: getSystemInfoSync()
}, () => { }, () => {
this.getEvalOrderSimpleDetail() this.getEvalOrderSimpleDetail()
}) })
......
// components/OcrPhoto.js // components/OcrPhoto.js
import { getSystemInfoSync } from '~/utils/systemInfo'
import newApi from "~/packageUsedCar/api"; import newApi from "~/packageUsedCar/api";
import api from "~/api/api"; import api from "~/api/api";
Page({ Page({
...@@ -386,7 +387,7 @@ Page({ ...@@ -386,7 +387,7 @@ Page({
// // 在组件实例进入页面节点树时执行 // // 在组件实例进入页面节点树时执行
var that = this; var that = this;
that.ctx = wx.createCameraContext(); that.ctx = wx.createCameraContext();
let { windowWidth, windowHeight } = wx.getSystemInfoSync(); let { windowWidth, windowHeight } = getSystemInfoSync();
this.setData({ windowWidth, windowHeight }); this.setData({ windowWidth, windowHeight });
setTimeout(() => { setTimeout(() => {
that.initCanvas(); that.initCanvas();
......
import { IMG_URL } from '../../utils/imageBase.js' import { IMG_URL } from '../../utils/imageBase.js'
// pages/accountItems/accountItems.js // pages/accountItems/accountItems.js
import api from '~/api/api' import api from '~/api/api'
import { getSystemInfoSync } from '~/utils/systemInfo'
const app = getApp() const app = getApp()
import { getYQorderInfo, get4SStoreList } from '~/store/index' import { getYQorderInfo, get4SStoreList } from '~/store/index'
import { getShopSceneConfig } from '~/store/index' import { getShopSceneConfig } from '~/store/index'
...@@ -243,7 +244,7 @@ Page({ ...@@ -243,7 +244,7 @@ Page({
// 检测一下是否能微信端小程序登录 // 检测一下是否能微信端小程序登录
checkAgree() { checkAgree() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
let sysInfo = wx.getSystemInfoSync() let sysInfo = getSystemInfoSync()
// let { environment } = sysInfo // let { environment } = sysInfo
// 1企业微信 0微信 // 1企业微信 0微信
let envName = sysInfo.environment ? 1 : 0 let envName = sysInfo.environment ? 1 : 0
......
...@@ -53,14 +53,16 @@ Page({ ...@@ -53,14 +53,16 @@ Page({
}, '', 0) }, '', 0)
// 登录了更新用户权限 // 登录了更新用户权限
app.gobalCheckYqdSuper(userInfo) app.gobalCheckYqdSuper(userInfo)
/**scene有链接时跳转 */ /** 登录埋点:非关键路径,失败不阻断跳转 */
let now = new Date() const now = new Date()
api.loginRecordSave({ api.loginRecordSave({
staffUuid: userInfo.uuid, staffUuid: userInfo.uuid,
loginTime: now.format('yyyy-MM-dd hh:mm:ss'), loginTime: now.format('yyyy-MM-dd hh:mm:ss'),
merchantId: userInfo?.shopMerchantId, merchantId: userInfo?.shopMerchantId,
merchantName: userInfo?.shopMerchantName, merchantName: userInfo?.shopMerchantName,
}, 'loading') }, 'loading').catch((err) => {
console.warn('[loading] loginRecordSave fail', err)
})
if (navigateParams && navigateParams.url) { if (navigateParams && navigateParams.url) {
if (navigateParams.sceneType != null && navigateParams.shopMerchantId && (navigateParams.sceneType != userInfo.sceneType || navigateParams.shopMerchantId != userInfo.shopMerchantId)) { if (navigateParams.sceneType != null && navigateParams.shopMerchantId && (navigateParams.sceneType != userInfo.sceneType || navigateParams.shopMerchantId != userInfo.shopMerchantId)) {
return app.login(false, '请重新登录') return app.login(false, '请重新登录')
......
// tabComponents/pages/index/index.js // tabComponents/pages/index/index.js
import api from '../../api.js' import api from '../../api.js'
import { mergeWorkSettingFromApi } from '../../services/workSetting.helpers.js'
const app = getApp() const app = getApp()
import constantData from '~/pages/constant/data' import constantData from '~/pages/constant/data'
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/mine/' const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/mine/'
...@@ -315,13 +316,15 @@ Page({ ...@@ -315,13 +316,15 @@ Page({
} }
}) })
}, },
/**
* 拉取工位设置并合并到本地固定 5 时段模板(按时段匹配,避免接口条数越界)。
*/
getWorkSetting() { getWorkSetting() {
let { let {
workItem, workItem,
saturdayFlag, saturdayFlag,
sundayFlag sundayFlag
} = this.data } = this.data
let workCount = 0
api.getWorkSetting().then(res => { api.getWorkSetting().then(res => {
wx.hideLoading() wx.hideLoading()
let { let {
...@@ -329,14 +332,16 @@ Page({ ...@@ -329,14 +332,16 @@ Page({
data, data,
message message
} = res } = res
let workCount = 0
if (code == 0) { if (code == 0) {
if (data?.length > 0) { if (data?.length > 0) {
data.map((e, index) => { const merged = mergeWorkSettingFromApi(workItem, data, {
workItem[index].maxCount = e.maxCount saturdayFlag,
saturdayFlag = e.saturdayFlag == 'Y' sundayFlag
sundayFlag = e.sundayFlag == 'Y'
workCount += e.maxCount
}) })
saturdayFlag = merged.saturdayFlag
sundayFlag = merged.sundayFlag
workCount = merged.workCount
} }
} else { } else {
this.showToast(message) this.showToast(message)
......
/**
* @file 工位设置 API 数据与本地固定时段列表的合并逻辑(不调 setData、不请求接口)。
*/
/**
* 将接口工位设置合并到本地固定时段列表。
* 按 startTime/endTime 匹配而非数组下标,避免接口条数与本地 5 个固定时段不一致时越界。
* @param {Array<{startTime: string, endTime: string, maxCount?: number}>} workItem - 本地时段模板(原地更新 maxCount)
* @param {Array<{startTime: string, endTime: string, maxCount?: number, saturdayFlag?: string, sundayFlag?: string}>} apiList - 接口返回列表
* @param {{ saturdayFlag?: boolean, sundayFlag?: boolean }} [options] - 当前页面 flag 初始值
* @returns {{ workCount: number, saturdayFlag: boolean|undefined, sundayFlag: boolean|undefined }}
*/
export function mergeWorkSettingFromApi(workItem, apiList, options = {}) {
let saturdayFlag = options.saturdayFlag
let sundayFlag = options.sundayFlag
let workCount = 0
if (!Array.isArray(apiList) || apiList.length === 0) {
return { workCount, saturdayFlag, sundayFlag }
}
apiList.forEach((e) => {
if (e.saturdayFlag != null) saturdayFlag = e.saturdayFlag == 'Y'
if (e.sundayFlag != null) sundayFlag = e.sundayFlag == 'Y'
const item = workItem.find(
(w) => w.startTime === e.startTime && w.endTime === e.endTime
)
if (item) {
item.maxCount = e.maxCount
workCount += Number(e.maxCount) || 0
}
})
return { workCount, saturdayFlag, sundayFlag }
}
import { IMG_URL } from '../../utils/imageBase.js' import { IMG_URL } from '../../utils/imageBase.js'
// pages/wxLogin/wxLogin.js // pages/wxLogin/wxLogin.js
import api from '../../api/api.js' import api from '../../api/api.js'
import { getSystemInfoSync } from '~/utils/systemInfo'
import md5 from '~/utils/lib/md5.js' import md5 from '~/utils/lib/md5.js'
import { import {
setNoSignInUuid, setNoSignInUuid,
...@@ -412,7 +413,7 @@ Page({ ...@@ -412,7 +413,7 @@ Page({
// 检测一下是否能微信端小程序登录 // 检测一下是否能微信端小程序登录
checkAgreeClient(loginUserObj) { checkAgreeClient(loginUserObj) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
let sysInfo = wx.getSystemInfoSync() let sysInfo = getSystemInfoSync()
// let { environment } = sysInfo // let { environment } = sysInfo
// 1企业微信 0微信 // 1企业微信 0微信
let envName = sysInfo.environment ? 1 : 0 let envName = sysInfo.environment ? 1 : 0
......
{ {
"libVersion": "3.16.1", "libVersion": "3.14.3",
"projectname": "dj-car-boutique-work-wechat", "projectname": "dj-car-boutique-work-wechat",
"setting": { "setting": {
"urlCheck": false, "urlCheck": false,
......
...@@ -2,11 +2,12 @@ import api from '~/api/api.js' ...@@ -2,11 +2,12 @@ import api from '~/api/api.js'
import { envIndex } from '~/config' import { envIndex } from '~/config'
import { removeSystemStorage } from '~/utils/cache/storageApi' import { removeSystemStorage } from '~/utils/cache/storageApi'
import util from '~/utils/util.js' import util from '~/utils/util.js'
import { getSystemInfo } from '~/utils/systemInfo'
// console.log(wx)globalData // console.log(wx)globalData
/** 判断是不是超管角色 */ /** 判断是不是超管角色 */
export const checkYqdSuper = (userInfo, globalData) => { export const checkYqdSuper = (userInfo, globalData) => {
console.log(userInfo, 'checkYqdSuper') // console.log(userInfo, 'checkYqdSuper')
let merchantAccountType = userInfo.merchantAccountList.every(item => { let merchantAccountType = userInfo.merchantAccountList.every(item => {
return item == 6 || item == 8 return item == 6 || item == 8
}) })
...@@ -241,7 +242,7 @@ export const checkScene = options => { ...@@ -241,7 +242,7 @@ export const checkScene = options => {
} }
options.query = query options.query = query
} }
console.log(query, 'query') // console.log(query, 'query')
let userInfo = wx.$util.getStorageSync('dj_boutique_user_info') let userInfo = wx.$util.getStorageSync('dj_boutique_user_info')
// 交车目标/日报 // 交车目标/日报
if (query && query.reportDate && query.hasOwnProperty('approvedSource')) { if (query && query.reportDate && query.hasOwnProperty('approvedSource')) {
...@@ -515,7 +516,7 @@ export const getServiceFilmRollSetting = yqMerchantId => { ...@@ -515,7 +516,7 @@ export const getServiceFilmRollSetting = yqMerchantId => {
/** 添加登录日志记录 */ /** 添加登录日志记录 */
export const loginLogAdd = options => { export const loginLogAdd = options => {
wx.getSystemInfo({ getSystemInfo({
success(res) { success(res) {
let { let {
// fontSizeSetting, // fontSizeSetting,
......
// subvehicleConversion/pages/supplementaryOrderPay/supplementaryOrderPay.js // subvehicleConversion/pages/supplementaryOrderPay/supplementaryOrderPay.js
import { getSystemInfoSync } from '~/utils/systemInfo'
import { getOrderDetail, createPayOrder, updateOrderRemark } from '~/subvehicleConversion/api' import { getOrderDetail, createPayOrder, updateOrderRemark } from '~/subvehicleConversion/api'
import { createQrcodeImage } from '~/api/api' import { createQrcodeImage } from '~/api/api'
import qrcode from '~/utils/lib/wxqrcode' import qrcode from '~/utils/lib/wxqrcode'
...@@ -77,7 +78,7 @@ Page({ ...@@ -77,7 +78,7 @@ Page({
async posPay(outTradeNo) { async posPay(outTradeNo) {
let size = 0 let size = 0
try { try {
const info = wx.getSystemInfoSync() const info = getSystemInfoSync()
let scale = info.windowWidth / 750 //不同屏幕下QRcode的适配比例;设计稿是750宽 let scale = info.windowWidth / 750 //不同屏幕下QRcode的适配比例;设计稿是750宽
let width = 300 * scale let width = 300 * scale
size = width size = width
......
...@@ -186,7 +186,7 @@ ...@@ -186,7 +186,7 @@
justify-content: center; justify-content: center;
} }
.item .select_value image { .item .select_value .select-arrow {
width: var(--fontSize28); width: var(--fontSize28);
height: var(--fontSize28); height: var(--fontSize28);
} }
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
<view class="value price_value" wx:if="{{ subItem.type == 'price' }}">¥{{filter.priceFilter(item[subItem.prop])}}</view> <view class="value price_value" wx:if="{{ subItem.type == 'price' }}">¥{{filter.priceFilter(item[subItem.prop])}}</view>
<view class="select_value" wx:if="{{ subItem.type == 'select' }}" catch:tap="selectTap" data-index="{{ index }}"> <view class="select_value" wx:if="{{ subItem.type == 'select' }}" catch:tap="selectTap" data-index="{{ index }}">
<text class="text-hide">{{filmOrderData[item.filmOrder]}}</text> <text class="text-hide">{{filmOrderData[item.filmOrder]}}</text>
<image src="/components/images/arrow-x.png" mode="" /> <image class="select-arrow" src="/components/images/arrow-x.png" mode="" />
</view> </view>
<view class="value" wx:if="{{ subItem.type !== 'price' && subItem.type !== 'select' }}"> <view class="value" wx:if="{{ subItem.type !== 'price' && subItem.type !== 'select' }}">
{{item[subItem.prop]}} {{item[subItem.prop]}}
......
...@@ -65,7 +65,8 @@ Page({ ...@@ -65,7 +65,8 @@ Page({
shopSideSelectPopup: false, shopSideSelectPopup: false,
flag: true, flag: true,
dateObj: { dateObj: {
beginDateStr: '' beginDateStr: '',
today: ''
}, },
showPicker: false, showPicker: false,
// showPicker: true // showPicker: true
...@@ -95,7 +96,7 @@ Page({ ...@@ -95,7 +96,7 @@ Page({
showReportPopup: false, showReportPopup: false,
reportTemplateList: [], reportTemplateList: [],
currentReportItem: null, currentReportItem: null,
serviceCenterUnreadNum: 0, maxDate: '',
}, },
onReportPopupCancel() { onReportPopupCancel() {
this.setData({ this.setData({
...@@ -833,7 +834,8 @@ Page({ ...@@ -833,7 +834,8 @@ Page({
dataMonth, dataMonth,
pointUnit: 1, // 1日,2月,默认日 pointUnit: 1, // 1日,2月,默认日
type: 'month', type: 'month',
label: month + 1 + '月份' label: month + 1 + '月份',
today: data.format('yyyy-MM-dd')
} }
}) })
}, },
......
...@@ -226,7 +226,7 @@ ...@@ -226,7 +226,7 @@
calenderColor="#347BFF" calenderColor="#347BFF"
vertical vertical
minDate="2020-10-01" minDate="2020-10-01"
maxDate="{{ dateObj.today }}" maxDate="{{ dateObj.today || '' }}"
forceFullSucreen="{{ bottomLift>0?true:false }}" forceFullSucreen="{{ bottomLift>0?true:false }}"
isComponents isComponents
> >
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
*/ */
import api from '../api.js' import api from '../api.js'
import commonApi from '../../api/api.js' import commonApi from '../../api/api.js'
import { getSystemInfoSync } from '~/utils/systemInfo'
import { import {
shouldSkipOrderStaffPop, shouldSkipOrderStaffPop,
shouldSkipAbnormalOrderPop shouldSkipAbnormalOrderPop
...@@ -110,7 +111,7 @@ export function checkAbnormalOrderLocal(page) { ...@@ -110,7 +111,7 @@ export function checkAbnormalOrderLocal(page) {
/** 企微/微信登录环境校验 */ /** 企微/微信登录环境校验 */
export function checkAgreeClient(page, loginUserObj) { export function checkAgreeClient(page, loginUserObj) {
return new Promise(resolve => { return new Promise(resolve => {
const sysInfo = wx.getSystemInfoSync() const sysInfo = getSystemInfoSync()
const envName = sysInfo.environment ? 1 : 0 const envName = sysInfo.environment ? 1 : 0
const { merchantId: yqMerchantId } = loginUserObj const { merchantId: yqMerchantId } = loginUserObj
......
...@@ -4,7 +4,22 @@ ...@@ -4,7 +4,22 @@
export function setupWxMock(globalRef = globalThis) { export function setupWxMock(globalRef = globalThis) {
globalRef.wx = { globalRef.wx = {
getAccountInfoSync: () => ({ miniProgram: { envVersion: 'release' } }), getAccountInfoSync: () => ({ miniProgram: { envVersion: 'release' } }),
getSystemInfoSync: () => ({}), getDeviceInfo: () => ({ platform: 'devtools' }),
getWindowInfo: () => ({
windowWidth: 375,
windowHeight: 667,
statusBarHeight: 20,
pixelRatio: 2,
screenWidth: 375,
screenHeight: 667,
safeArea: { top: 20, bottom: 667, height: 647 },
}),
getAppBaseInfo: () => ({
SDKVersion: '3.0.0',
host: 'WeChat',
version: '8.0.0',
language: 'zh_CN',
}),
$hasPermission: { $hasPermission: {
isTechnician: u => u?.loginRole === 7, isTechnician: u => u?.loginRole === 7,
isSuper: u => !!u?.isSuper, isSuper: u => !!u?.isSuper,
......
...@@ -2,11 +2,12 @@ import { IMG_URL } from '../../../utils/imageBase.js' ...@@ -2,11 +2,12 @@ import { IMG_URL } from '../../../utils/imageBase.js'
// tabOperating/pages/operatingShow/operatingShow.js // tabOperating/pages/operatingShow/operatingShow.js
import api from '../../api.js' import api from '../../api.js'
import { getYQInfo } from '~/store/index' import { getYQInfo } from '~/store/index'
import { getSystemInfoSync } from '~/utils/systemInfo'
// import WXMLCanvas from '../../wxml-canvas/index' // import WXMLCanvas from '../../wxml-canvas/index'
//设计稿宽度,一般为750 //设计稿宽度,一般为750
const UI_Width = 750 const UI_Width = 750
//同步获取设备系统信息 //同步获取设备系统信息
const info = wx.getSystemInfoSync() const info = getSystemInfoSync()
//设备像素密度 //设备像素密度
const dpr = info.pixelRatio const dpr = info.pixelRatio
//计算比例 //计算比例
...@@ -304,7 +305,7 @@ Page({ ...@@ -304,7 +305,7 @@ Page({
this.setCanvasText(context, `数据统计日期:${dateObj.toadyforList}`, 280, 350, 10, '#666666', 'normal') this.setCanvasText(context, `数据统计日期:${dateObj.toadyforList}`, 280, 350, 10, '#666666', 'normal')
const dpr = wx.getSystemInfoSync().pixelRatio const dpr = getSystemInfoSync().pixelRatio
// context.width = 710 * dpr // context.width = 710 * dpr
// context.height = 700 * dpr // context.height = 700 * dpr
......
// tabOperating/pages/index.js // tabOperating/pages/index.js
import { getSystemInfoSync } from '~/utils/systemInfo'
const app = getApp() const app = getApp()
Page({ Page({
...@@ -59,7 +60,7 @@ Page({ ...@@ -59,7 +60,7 @@ Page({
let webUrl = this.data; let webUrl = this.data;
let index = 2; let index = 2;
let accountInfo = wx.getAccountInfoSync(); let accountInfo = wx.getAccountInfoSync();
let systemInfo = wx.getSystemInfoSync(); let systemInfo = getSystemInfoSync();
let envName = accountInfo.miniProgram.envVersion; let envName = accountInfo.miniProgram.envVersion;
let {type} = this.data; let {type} = this.data;
//手动控制体验版环境的请求 true就依据下面index false就默认2 //手动控制体验版环境的请求 true就依据下面index false就默认2
......
// components/OrderPopup/OrderPopup.js // components/OrderPopup/OrderPopup.js
import qrcode from '~/utils/lib/wxqrcode' import qrcode from '~/utils/lib/wxqrcode'
import api from '~/api/api.js' import api from '~/api/api.js'
import { getSystemInfoSync } from '~/utils/systemInfo'
Component({ Component({
/** /**
* 组件的属性列表 * 组件的属性列表
...@@ -124,7 +125,7 @@ Component({ ...@@ -124,7 +125,7 @@ Component({
console.log(text) console.log(text)
let size = 0 let size = 0
try { try {
const info = wx.getSystemInfoSync() const info = getSystemInfoSync()
let scale = info.windowWidth / 750 //不同屏幕下QRcode的适配比例;设计稿是750宽 let scale = info.windowWidth / 750 //不同屏幕下QRcode的适配比例;设计稿是750宽
let width = 300 * scale let width = 300 * scale
size = width size = width
......
// tabWorkOrder/pages/createOrder/createOrder.js // tabWorkOrder/pages/createOrder/createOrder.js
import { getSystemInfoSync } from '~/utils/systemInfo'
import { checkDailyReport, checkStudyTask } from '~/store/ModalToQueueControl' import { checkDailyReport, checkStudyTask } from '~/store/ModalToQueueControl'
import api from '../../api' import api from '../../api'
import { import {
...@@ -1753,7 +1754,7 @@ Page({ ...@@ -1753,7 +1754,7 @@ Page({
/*获取屏幕高度*/ /*获取屏幕高度*/
this.setData({ this.setData({
windowHeight: wx.getSystemInfoSync().windowHeight windowHeight: getSystemInfoSync().windowHeight
}) })
// console.log(app.globalData.YQorderSetting, 'app.globalData.YQorderSetting?.yqPhoneConfig') // console.log(app.globalData.YQorderSetting, 'app.globalData.YQorderSetting?.yqPhoneConfig')
......
// import { commonApi, equityApi } from '../../api/api' // import { commonApi, equityApi } from '../../api/api'
import { uploadImg } from '~/api/api' import { uploadImg } from '~/api/api'
import { getSystemInfoSync } from '~/utils/systemInfo'
// import { quotationUpgrade, updateOrderStatus } from '../../../api' // import { quotationUpgrade, updateOrderStatus } from '../../../api'
Page({ Page({
data: { data: {
...@@ -30,7 +31,7 @@ Page({ ...@@ -30,7 +31,7 @@ Page({
}) })
}, },
onLoad(options) { onLoad(options) {
let { windowWidth, windowHeight } = wx.getSystemInfoSync() let { windowWidth, windowHeight } = getSystemInfoSync()
if (options.writeOffCode) { if (options.writeOffCode) {
this.writeOffCode = options.writeOffCode this.writeOffCode = options.writeOffCode
} }
......
// components/OcrPhoto.js // components/OcrPhoto.js
import api from '~/api/api.js' import api from '~/api/api.js'
import { getSystemInfoSync } from '~/utils/systemInfo'
Page({ Page({
/** /**
* 组件的属性列表 * 组件的属性列表
...@@ -373,7 +374,7 @@ Page({ ...@@ -373,7 +374,7 @@ Page({
// // 在组件实例进入页面节点树时执行 // // 在组件实例进入页面节点树时执行
var that = this var that = this
that.ctx = wx.createCameraContext() that.ctx = wx.createCameraContext()
let { windowWidth, windowHeight } = wx.getSystemInfoSync() let { windowWidth, windowHeight } = getSystemInfoSync()
this.setData({ windowWidth, windowHeight }) this.setData({ windowWidth, windowHeight })
}, },
// 在页面首次渲染实现生命周期获取操作canvas的上下文对象 // 在页面首次渲染实现生命周期获取操作canvas的上下文对象
......
import { describe, it, beforeEach } from 'node:test'
import assert from 'node:assert/strict'
const deviceInfo = {
platform: 'ios',
brand: 'Apple',
model: 'iPhone',
system: 'iOS 16',
}
const windowInfo = {
windowWidth: 390,
windowHeight: 844,
statusBarHeight: 47,
pixelRatio: 3,
screenWidth: 390,
screenHeight: 844,
safeArea: { top: 47, bottom: 810, height: 763 },
deviceOrientation: 'portrait',
}
function setupWx(host = 'WeChat') {
globalThis.wx = {
getDeviceInfo: () => ({ ...deviceInfo }),
getWindowInfo: () => ({ ...windowInfo }),
getAppBaseInfo: () => ({
SDKVersion: '3.13.1',
host,
version: '8.0.0',
language: 'zh_CN',
fontSizeSetting: 16,
}),
}
}
describe('systemInfo', () => {
beforeEach(() => {
setupWx()
})
it('getSystemInfoSync merges device, window and app base info', async () => {
const { getSystemInfoSync } = await import('../utils/systemInfo.js')
const info = getSystemInfoSync()
assert.equal(info.platform, 'ios')
assert.equal(info.windowWidth, 390)
assert.equal(info.statusBarHeight, 47)
assert.equal(info.SDKVersion, '3.13.1')
assert.equal(info.fontSizeSetting, 16)
assert.equal(info.deviceOrientation, 'portrait')
})
it('maps wxwork host to environment wxwork', async () => {
setupWx('wxwork')
const { getSystemInfoSync } = await import('../utils/systemInfo.js')
const info = getSystemInfoSync()
assert.equal(info.environment, 'wxwork')
assert.equal(info.host, 'wxwork')
})
it('maps WeChat host to empty environment for legacy truthy checks', async () => {
setupWx('WeChat')
const { getSystemInfoSync } = await import('../utils/systemInfo.js')
const info = getSystemInfoSync()
assert.equal(info.environment, '')
})
it('getSystemInfo invokes success callback with merged info', async () => {
const { getSystemInfo } = await import('../utils/systemInfo.js')
let result = null
getSystemInfo({
success(res) {
result = res
},
})
assert.equal(result?.pixelRatio, 3)
assert.equal(result?.brand, 'Apple')
})
})
import { describe, it } from 'node:test'
import assert from 'node:assert/strict'
import { mergeWorkSettingFromApi } from '../pages/tabMine/services/workSetting.helpers.js'
function createWorkItem() {
return [
{ label: '上午 09:00-10:30', startTime: '09:00', endTime: '10:30', maxCount: 0 },
{ label: '上午 10:30-12:00', startTime: '10:30', endTime: '12:00', maxCount: 0 },
{ label: '下午 13:00-14:30', startTime: '13:00', endTime: '14:30', maxCount: 0 },
{ label: '下午 14:30-16:00', startTime: '14:30', endTime: '16:00', maxCount: 0 },
{ label: '下午 16:00-17:30', startTime: '16:00', endTime: '17:30', maxCount: 0 }
]
}
describe('mergeWorkSettingFromApi', () => {
it('merges 5 items in order', () => {
const workItem = createWorkItem()
const apiList = [
{ startTime: '09:00', endTime: '10:30', maxCount: 1, saturdayFlag: 'N', sundayFlag: 'N' },
{ startTime: '10:30', endTime: '12:00', maxCount: 2 },
{ startTime: '13:00', endTime: '14:30', maxCount: 3 },
{ startTime: '14:30', endTime: '16:00', maxCount: 4 },
{ startTime: '16:00', endTime: '17:30', maxCount: 5, saturdayFlag: 'Y', sundayFlag: 'Y' }
]
const result = mergeWorkSettingFromApi(workItem, apiList)
assert.deepEqual(workItem.map((item) => item.maxCount), [1, 2, 3, 4, 5])
assert.equal(result.workCount, 15)
assert.equal(result.saturdayFlag, true)
assert.equal(result.sundayFlag, true)
})
it('ignores extra api items beyond 5 slots without throwing', () => {
const workItem = createWorkItem()
const apiList = [
...createWorkItem().map((item, index) => ({
startTime: item.startTime,
endTime: item.endTime,
maxCount: index + 1
})),
{ startTime: '18:00', endTime: '19:30', maxCount: 99 },
{ startTime: '20:00', endTime: '21:30', maxCount: 88 }
]
const result = mergeWorkSettingFromApi(workItem, apiList)
assert.deepEqual(workItem.map((item) => item.maxCount), [1, 2, 3, 4, 5])
assert.equal(result.workCount, 15)
})
it('partially updates when api returns fewer than 5 items', () => {
const workItem = createWorkItem()
workItem[3].maxCount = 9
workItem[4].maxCount = 9
const result = mergeWorkSettingFromApi(workItem, [
{ startTime: '09:00', endTime: '10:30', maxCount: 2 },
{ startTime: '10:30', endTime: '12:00', maxCount: 3 }
])
assert.deepEqual(workItem.map((item) => item.maxCount), [2, 3, 0, 9, 9])
assert.equal(result.workCount, 5)
})
it('matches by time slot when api order is shuffled', () => {
const workItem = createWorkItem()
const apiList = [
{ startTime: '16:00', endTime: '17:30', maxCount: 5 },
{ startTime: '09:00', endTime: '10:30', maxCount: 1 },
{ startTime: '14:30', endTime: '16:00', maxCount: 4 },
{ startTime: '13:00', endTime: '14:30', maxCount: 3 },
{ startTime: '10:30', endTime: '12:00', maxCount: 2 }
]
const result = mergeWorkSettingFromApi(workItem, apiList)
assert.deepEqual(workItem.map((item) => item.maxCount), [1, 2, 3, 4, 5])
assert.equal(result.workCount, 15)
})
it('returns empty merge for empty api list', () => {
const workItem = createWorkItem()
const result = mergeWorkSettingFromApi(workItem, [], {
saturdayFlag: false,
sundayFlag: true
})
assert.equal(result.workCount, 0)
assert.equal(result.saturdayFlag, false)
assert.equal(result.sundayFlag, true)
})
})
// 实例化对象存储 // 实例化对象存储
import { Storage } from './storage' import { Storage } from './storage'
import { getSystemInfo } from '~/utils/systemInfo'
const $Storage = new Storage() const $Storage = new Storage()
// console.log($Storage) // console.log($Storage)
/** */ /** */
...@@ -53,7 +54,7 @@ export function setSystem_info() { ...@@ -53,7 +54,7 @@ export function setSystem_info() {
// console.log($Storage.get) // console.log($Storage.get)
// console.log(info, 'info') // console.log(info, 'info')
!info && !info &&
wx.getSystemInfo({ getSystemInfo({
success(res) { success(res) {
// console.log(res) // console.log(res)
$Storage.set('system_info', res) $Storage.set('system_info', res)
......
/**
* @file 系统信息兼容层:合并微信新 API,替代已废弃的 wx.getSystemInfoSync / wx.getSystemInfo。
* 纯函数模块,不调 setData、不访问页面实例。
*/
/**
* 将 getAppBaseInfo().host 映射为旧版 environment 字段(企微判断依赖此值)
* @param {string} [host]
* @returns {string}
*/
function mapEnvironment(host) {
return host === 'wxwork' ? 'wxwork' : ''
}
/**
* 同步获取与旧版 getSystemInfoSync 兼容的系统信息对象
* @returns {WechatMiniprogram.SystemInfo}
*/
export function getSystemInfoSync() {
const deviceInfo = wx.getDeviceInfo()
const windowInfo = wx.getWindowInfo()
const appBaseInfo = wx.getAppBaseInfo()
return {
...deviceInfo,
...windowInfo,
...appBaseInfo,
environment: mapEnvironment(appBaseInfo.host),
}
}
/**
* 异步获取系统信息,行为对齐旧版 wx.getSystemInfo
* @param {WechatMiniprogram.GetSystemInfoOption} [options]
*/
export function getSystemInfo(options = {}) {
try {
const res = getSystemInfoSync()
options.success?.(res)
} catch (err) {
options.fail?.(err)
} finally {
options.complete?.()
}
}
...@@ -186,12 +186,12 @@ class TRACK { ...@@ -186,12 +186,12 @@ class TRACK {
.then(({ code, data, message }) => { .then(({ code, data, message }) => {
if (code == 0 && data) { if (code == 0 && data) {
$Storage.set('recordList', []) $Storage.set('recordList', [])
console.log( // console.log(
'---------------- 埋点定时推送成功 ----------------', // '---------------- 埋点定时推送成功 ----------------',
new Date().format('yyyy-MM-dd hh:mm:ss'), // new Date().format('yyyy-MM-dd hh:mm:ss'),
':', // ':',
recordList // recordList
) // )
} else } else
console.log( console.log(
'---------------- 埋点定时推送失败 ----------------', '---------------- 埋点定时推送失败 ----------------',
......
import wxqrcode from '~/utils/lib/wxqrcode.js' import wxqrcode from '~/utils/lib/wxqrcode.js'
import { getSystemInfo, getSystemInfoSync } from '~/utils/systemInfo'
/** /**
* 微信校验通知类工具封装 * 微信校验通知类工具封装
*/ */
...@@ -174,7 +175,7 @@ const getViewInfo = (name, callBack, isComponents) => { ...@@ -174,7 +175,7 @@ const getViewInfo = (name, callBack, isComponents) => {
// 获取设备信息 // 获取设备信息
const getDeviceSize = () => { const getDeviceSize = () => {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
wx.getSystemInfo({ getSystemInfo({
success: function (res) { success: function (res) {
// console.log(res) // console.log(res)
const { screenHeight, safeArea } = res const { screenHeight, safeArea } = res
...@@ -194,7 +195,7 @@ const isFullSucreen = isComponents => { ...@@ -194,7 +195,7 @@ const isFullSucreen = isComponents => {
const routerList = wx.$router.getRouterList() const routerList = wx.$router.getRouterList()
const router = routerList.find(item => item.url === `/${thisPage.route}`) const router = routerList.find(item => item.url === `/${thisPage.route}`)
let val = false let val = false
wx.getSystemInfo({ getSystemInfo({
success(res) { success(res) {
let { statusBarHeight, screenHeight, windowHeight, safeArea } = res let { statusBarHeight, screenHeight, windowHeight, safeArea } = res
// console.log(statusBarHeight, screenHeight, windowHeight, safeArea) // console.log(statusBarHeight, screenHeight, windowHeight, safeArea)
...@@ -236,8 +237,8 @@ const isFullSucreen = isComponents => { ...@@ -236,8 +237,8 @@ const isFullSucreen = isComponents => {
// }) // })
// } // }
/**获取设备信息 */ /**获取设备信息 */
const getSystemInfo = callBack => { const getSystemInfoCallback = callBack => {
wx.getSystemInfo({ getSystemInfo({
success(res) { success(res) {
callBack(res) callBack(res)
}, },
...@@ -249,7 +250,7 @@ const getSystemInfo = callBack => { ...@@ -249,7 +250,7 @@ const getSystemInfo = callBack => {
const wxApi = { const wxApi = {
// getPhoneInfo, // getPhoneInfo,
previewImage, previewImage,
getSystemInfo, getSystemInfo: getSystemInfoCallback,
showLoading, showLoading,
hideLoading, hideLoading,
setCopyData, setCopyData,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!