Commit ba103189 authored by 张子雨's avatar 张子雨

Merge branch 'master' into feat/constructionOne

* master:
  feat: sentry添加sourcemap上报
  feat: 解决offsetTop问题
  feat: 调用仅退款(未发货)审核逻辑
  feat: 售后订单管理-仅退款(发货中)-添加审核按钮
  feat: 添加大额支付标签
  feat: 售后订单管理:添加仅退款(发货中)字段
  feat: 回归测试
  feat: 售后订单管理添加仅退款(发货中)字段
  feat: sentry
  feat: sentry测试
  feat: 测试
  feat: 测试
  feat:  测试sentry
  feat: sentry
  feat:新增大额支付标签
parents 0b20964f 3f7fa4ce
const pkgInfo = require('./package.json');
const project = pkgInfo.name;
module.exports = {
org: 'sentry',
project,
authToken: '3f1f6f3789594e3a81280c1cd8d4d1008037a7abad714698b60b6f358c3d7562',
url: 'http://newsentry.quantgroups.com',
release: `${project}@1.0.0`,
ignore: ['node_modules', 'tests'],
silent: true,
include: [
{
paths: ['./dist'],
},
],
};
......@@ -5,7 +5,8 @@
import ThemeColorReplacer from 'webpack-theme-color-replacer';
import generate from '@ant-design/colors/lib/generate';
import path from 'path';
const SentryPlugin = require('@qg/sentry-webpack-plugin');
const SentryConfig = require('../.sentryclirc');
function getModulePackageName(module) {
if (!module.context) return null;
const nodeModulesPath = path.join(__dirname, '../node_modules/');
......@@ -27,6 +28,9 @@ function getModulePackageName(module) {
}
export default config => {
if (process.env.NODE_ENV === 'production') {
config.plugin('sentry-webpack-plugin').use(SentryPlugin, [SentryConfig]);
}
// preview.pro.ant.design only do not use in your production;
if (
process.env.ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION === 'site' ||
......
This diff is collapsed.
/* eslint-disable no-console */
import * as Sentry from '@sentry/react';
import localStorage from '@/utils/localStorage';
// process.env.SENTRY_ENV !== 'test' 加上测试环境不会报错
if (process.env.NODE_ENV === 'production' && process.env.SENTRY_ENV !== 'test') {
try {
Sentry.init({
dsn: 'https://b3f60c62e1234e26a5b851b9f26fba07@sentry.q-gp.com/34',
release: 'merchant-manage-ui@1.0.0',
maxBreadcrumbs: 50,
tracesSampleRate: 1,
beforeSend: e => {
const err = e.exception?.values || [];
// XXX 不上报[object Object]此类基础库异常
if (err.some(item => item.value.indexOf('ResizeObserver') > -1)) {
return null;
}
return e;
},
});
Sentry.configureScope(scope => {
scope.setUser({
token: localStorage.get('token') || null,
});
});
} catch (e) {
console.log('Sentry无法加载', e);
}
}
export const dva = {
config: {
......
......@@ -257,6 +257,9 @@ export const getColumns = props => {
</span>
);
}
if (+serviceType === 4) {
return <span style={{ color: '#ff1616' }}> 仅退款(发货中)</span>;
}
return <span>退货退款</span>;
},
},
......@@ -268,6 +271,7 @@ export const getColumns = props => {
<div>
{r.timeout ? <Tag color="red">{serviceNo}</Tag> : serviceNo}
{<Badge count={r.reminderFlag ? '' : ''} size="default" />}
{<Badge count={+r.autoCancelTimeType === 1 ? '大额支付' : ''} size="default" />}
</div>
),
},
......@@ -512,8 +516,8 @@ export const getColumns = props => {
}
}
// 实物商品-仅退款未发货 serviceType = 0
if (serviceType === 0) {
// 实物商品-仅退款未发货 serviceType = 0, 仅退款(发货中) serviceType = 4
if (serviceType === 0 || serviceType === 4) {
// 待商户审核14 待审核0
if ([14, 0].includes(status)) {
return [cancelAuditBtn, cancelDetailBtn, viewLogBtn];
......
......@@ -300,7 +300,7 @@ const AfterSale = props => {
const clientInfo = getClientInfo();
const calculationLayoutHeight = e => {
const otherHeight = typeof e === 'number' ? e : 330;
const h = clientInfo.height - scrollYRef.current.offsetTop - otherHeight;
const h = clientInfo.height - (scrollYRef?.current?.offsetTop || 0) - otherHeight;
setTableScrollY(h < 500 ? '500px' : h);
};
......
......@@ -14,6 +14,7 @@ export const column = [
<div>
{r.auditTimeOut ? <Tag color="red">{orderId}</Tag> : orderId}
{<Badge count={r.reminderFlag ? '' : ''} size="small" />}
{<Badge count={+r.autoCancelTimeType === 1 ? '大额支付' : ''} size="default" />}
</div>
),
},
......
......@@ -100,9 +100,12 @@ class Socket extends EventEmitter {
};
onerror = e => {
console.log('ws: error', e);
try {
this.socket = null;
this.event.emit('error', e);
} catch {
console.log('ws: error', e);
}
};
sendMessage = value => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment