Commit f7f6de72 by lixinming

no message

parent b49f4ea7
......@@ -279,9 +279,15 @@ export async function getSheng ({userId}) {
certificate = true;
}
if (certificate) {
let addresStr = "";
if (getCityNameByCode(userInfo.sheng) == getCityNameByCode(userInfo.shi)) {
addresStr = `${getCityNameByCode(userInfo.shi)}${getCityNameByCode(userInfo.qu)}${userInfo.addres}`;
} else {
addresStr = `${getCityNameByCode(userInfo.sheng)}${getCityNameByCode(userInfo.shi)}${getCityNameByCode(userInfo.qu)}${userInfo.addres}`;
}
cefaInfo = {
unitName:userInfo.unitName,
addres:`${getCityNameByCode(userInfo.sheng)}${getCityNameByCode(userInfo.shi)}${getCityNameByCode(userInfo.qu)}${userInfo.addres}`,
addres:addresStr,
memberNum:userInfo.memberNum,
session:getEdition(Math.floor(userInfo.session/100), userInfo.session%100 ),
lifespanTime:`${moment(userInfo.lifespanStartTime).format("YYYY年MM月DD日")}${moment(userInfo.lifespanEndTime).format("YYYY年MM月DD日")}`
......
......@@ -106,8 +106,8 @@ export function getEdition(year, month) {
let jie = Math.ceil(Num);
let ci = Math.ceil(((Num*100) - ((jie - 1)*100))/10);
if (month <= 6) ci = ci - 1;
return `第${jie}届,第${ci}次`;
return `第${chuangeStr(jie)}届,第${chuangeStr(ci)}次`;
// const startYear = 1993;
// let jie = Math.ceil(((year-startYear)+1)/5);
// let ci = ((((year-startYear)+1)/5) - (jie - 1)) * 10;
......@@ -127,6 +127,34 @@ export function getEdition(year, month) {
// return `第${times}届,第${sessionNumber}次`;
}
function chuangeStr(count) {
let map = {
"0":"十",
"1":"一",
"2":"二",
"3":"三",
"4":"四",
"5":"五",
"6":"六",
"7":"七",
"8":"八",
"9":"九"
};
let jieStr = "";
let shiWei = Math.floor(count/10);
let geWei = count%10;
if ( !shiWei ) {
jieStr = map[geWei];
} else if (shiWei == 1) {
jieStr = `十`;
if (geWei) jieStr += map[geWei];
}else {
jieStr = `${ map[shiWei] }${map[geWei]}`;
}
return jieStr;
}
export function changeArticleName(idList) {
......
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