Commit e7075c14 authored by wangxuelai's avatar wangxuelai

'评分功能上线'

parent 3de52264
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>轻校</title>
<link rel="shortcut icon" href="https://cdn.img.shangjiadao.cn/qingxiao/biz/image/qxlogo4.png">
<meta content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0;" name="viewport">
<meta http-equiv="X-UA-Compatible" content="IE=edge"><!-- Polyfills -->
<!--[if lt IE 10]>
<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><title>轻校</title><link rel="shortcut icon" href="https://cdn.img.shangjiadao.cn/qingxiao/biz/image/qxlogo4.png"><meta content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0;" name="viewport"><meta http-equiv="X-UA-Compatible" content="IE=edge"><!-- Polyfills --><!--[if lt IE 10]>
<script src="js/console-polyfill.js"></script>
<![endif]-->
<script charset="utf-8" src="https://map.qq.com/api/js?v=2.exp&key=XSZBZ-5LHCV-5I2P7-UQHPW-6456F-JBB3B"></script>
<link href="/dist/index.css?1571041131289" rel="stylesheet">
<script src="/lib/vendor.dll.js?20191012" charset="utf-8"></script>
<script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/console-polyfill.js?20191012" charset="utf-8"></script>
<script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es6-shim.min.js?20191012" charset="utf-8"></script>
<script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es5-shim.js?20191012" charset="utf-8"></script>
<script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es5-sham.min.js?20191012" charset="utf-8"></script>
<script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/json3.min.js?20191012" charset="utf-8"></script>
<script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/html5shiv.min.js?20191012" charset="utf-8"></script>
<script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/polyfill.js?20191012" charset="utf-8"></script>
</head>
<body>
<div id="root"></div>
<script src="/dist/index.js?1571041131290" charset="utf-8"></script>
</body>
</html>
\ No newline at end of file
<![endif]--><script charset="utf-8" src="https://map.qq.com/api/js?v=2.exp&key=XSZBZ-5LHCV-5I2P7-UQHPW-6456F-JBB3B"></script><link href="https://cdn.img.shangjiadao.cn/qingxiao/biz/dist/index.css?1571044591305" rel="stylesheet"><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/lib/vendor.dll.js?20191012" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/console-polyfill.js?20191012" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es6-shim.min.js?20191012" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es5-shim.js?20191012" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es5-sham.min.js?20191012" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/json3.min.js?20191012" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/html5shiv.min.js?20191012" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/polyfill.js?20191012" charset="utf-8"></script></head><body><div id="root"></div><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/dist/index.js?1571044591305" charset="utf-8"></script></body></html>
\ No newline at end of file
......@@ -4,10 +4,10 @@ const basepath = `${location.protocol}//${pathify(window.location.host)}/`;
let api = '';
let dakaapi = '';
if (ENVIRONMENT == 'pro') {
api = 'https://test.wp53.cn/v2/api/';
dakaapi = 'https:clock.wp53.cn/v3/';
// api = 'https://wx.m.shangjiadao.cn/v2/api/';
// dakaapi = 'https://qxapi.qingxiao.online/daka/v3/';
// api = 'https://test.wp53.cn/v2/api/';
// dakaapi = 'https:clock.wp53.cn/v3/';
api = 'https://wx.m.shangjiadao.cn/v2/api/';
dakaapi = 'https://qxapi.qingxiao.online/daka/v3/';
} else if (ENVIRONMENT == 'dev') {
// api = 'https://wx.m.shangjiadao.cn/v2/api/';
// dakaapi = 'https://qxapi.qingxiao.online/daka/v3/';
......
......@@ -1367,19 +1367,13 @@ export default {
},
});
quicktempScoreArr.forEach((ele) => {
totalScore += Number(ele.score);
});
const averageScore = totalScore / 4;
const leftScore = averageScore % 1;
let myScore = 0;
if (leftScore <= 0.5 && leftScore > 0) {
myScore = Math.floor(averageScore) + 0.5;
} else if (leftScore > 0.5) {
myScore = Math.ceil(averageScore);
} else {
myScore = averageScore;
}
quickCommentParams.common.score = myScore;
totalScore += Number(ele.score) * 10;
});
const averageScore = totalScore / 2 / 10;
const match = /^(\d+(\.\d)?)(\d*)$/;
const a = match.test(averageScore);
quickCommentParams.common.score = RegExp.$1 / 2;
// quickCommentParams.common.score = myScore;
yield put({
type: 'updateState',
payload: {
......@@ -1399,19 +1393,12 @@ export default {
},
});
tempScoreArr.forEach((ele) => {
totalScore += Number(ele.score);
});
const averageScore = totalScore / 4;
const leftScore = averageScore % 1;
let myScore = 0;
if (leftScore <= 0.5 && leftScore > 0) {
myScore = Math.floor(averageScore) + 0.5;
} else if (leftScore > 0.5) {
myScore = Math.ceil(averageScore);
} else {
myScore = averageScore;
}
batchCommentParams.common.score = myScore;
totalScore += Number(ele.score) * 10;
});
const averageScore = totalScore / 2 / 10;
const match = /^(\d+(\.\d)?)(\d*)$/;
const a = match.test(averageScore);
batchCommentParams.common.score = RegExp.$1 / 2;
yield put({
type: 'updateState',
payload: {
......
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