Ver código fonte

fix(front): 交互调整

Go 5 anos atrás
pai
commit
27a3583da0

+ 10 - 1
front/project/admin/routes/setting/index/page.js

@@ -12,7 +12,16 @@ export default class extends Page {
   initData() {
     System.getIndex().then(result => {
       const { form } = this.props;
-      form.setFieldsValue(flattenObject(result, 'index'));
+      (result.course || []).forEach((row, index) => {
+        form.getFieldDecorator(`index.course.${index}.image`);
+      });
+      (result.activity || []).forEach((row, index) => {
+        form.getFieldDecorator(`index.activity.${index}.image`);
+      });
+      (result.course || []).forEach((row, index) => {
+        form.getFieldDecorator(`index.evaluation.${index}.avatar`);
+      });
+      form.setFieldsValue(flattenObject(result, 'index', true));
       this.setState({ load: true, indexInfo: result });
     });
     System.getBase().then(result => {

+ 5 - 0
front/project/h5/app.less

@@ -212,6 +212,11 @@ textarea::-webkit-input-placeholder {
   color: @holder_color;
 }
 
+input.empty::-webkit-input-placeholder,
+textarea.empty::-webkit-input-placeholder {
+  color: #f36565;
+}
+
 .d-i-b {
   display: inline-block;
   overflow: hidden;

+ 11 - 7
front/project/h5/components/Input/index.js

@@ -4,12 +4,16 @@ import Icon from '../Icon';
 
 export default class Input extends Component {
   render() {
-    const { className = '', onChange, placeholder, value, error, left, right } = this.props;
+    const { className = '', onChange, placeholder, value, error, left, right, empty } = this.props;
     return (
       <div className={`g-input-container ${className}`}>
         <div className={`g-input-wrapper ${error ? 'error' : ''}`}>
           {left && <div className="g-input-left">{left}</div>}
-          <input className="g-input" placeholder={placeholder} value={value} onChange={data => onChange && onChange(data)} />
+          <input
+            className={`g-input ${empty ? 'empty' : ''}`}
+            placeholder={placeholder}
+            value={value}
+            onChange={data => onChange && onChange(data)} />
           {right && <div className="g-input-right">{right}</div>}
         </div>
         <div hidden={!error} className="g-input-error">
@@ -28,7 +32,7 @@ export class SelectInput extends Component {
 
   render() {
     const { showSelect } = this.state;
-    const { className = '', onChange, placeholder, value, error, selectValue, select, onSelect } = this.props;
+    const { className = '', onChange, placeholder, value, error, selectValue, select, onSelect, empty } = this.props;
     return (
       <Input
         className={className}
@@ -48,6 +52,7 @@ export class SelectInput extends Component {
         placeholder={placeholder}
         onChange={data => onChange && onChange(data)}
         error={error}
+        empty={empty}
       />
     );
   }
@@ -84,7 +89,7 @@ export class VerificationInput extends Component {
 
   render() {
     const { loading } = this.state;
-    const { className = '', onChange, placeholder, value, error } = this.props;
+    const { className = '', onChange, placeholder, value, error, empty } = this.props;
     return (
       <Input
         className={className}
@@ -93,12 +98,11 @@ export class VerificationInput extends Component {
             <span className="g-input-right-verification" onClick={() => this.onSend()}>
               获取验证码
             </span>
-          ) : (
-            <span className="g-input-right-verification-loading">等待{loading}秒</span>
-          )
+          ) : (<span className="g-input-right-verification-loading">等待{loading}秒</span>)
         }
         value={value}
         error={error}
+        empty={empty}
         placeholder={placeholder}
         onChange={data => onChange && onChange(data)}
       />

+ 8 - 2
front/project/h5/routes/page/bind/page.js

@@ -21,10 +21,12 @@ export default class extends Page {
   }
 
   changeData(field, value) {
-    let { data } = this.state;
+    let { data, empty } = this.state;
     data = data || {};
+    empty = empty || {};
     data[field] = value;
-    this.setState({ data });
+    empty[field] = !value;
+    this.setState({ data, empty });
   }
 
   validMobile(login) {
@@ -125,6 +127,7 @@ export default class extends Page {
           select={MobileArea}
           value={this.state.data.mobile}
           error={this.state.mobileError}
+          empty={this.state.empty.mobile}
           onSelect={value => {
             this.changeData('area', value);
             this.validMobile();
@@ -138,17 +141,20 @@ export default class extends Page {
           placeholder="请输入验证码"
           value={this.state.data.mobileVerifyCode}
           error={this.state.validError}
+          empty={this.state.empty.mobileVerifyCode}
           onSend={() => {
             return this.sendValid();
           }}
           onChange={e => {
             this.changeData('mobileVerifyCode', e.target.value);
+            this.setState({ validError: '' });
           }}
         />
         {needEmail && (
           <Input
             placeholder="请输入邮箱"
             value={this.state.data.email}
+            empty={this.state.empty.email}
             onChange={e => {
               this.changeData('email', e.target.value);
             }}

+ 1 - 1
front/project/www/components/Header/index.js

@@ -19,7 +19,7 @@ function Header(props) {
     <div id="header">
       <div className="body">
         <div className="left">
-          <Assets name="logo" svg />
+          <Assets name="logo" className="c-p" svg onClick={() => linkTo('/')} />
         </div>
         <div className="center">
           <div className="tabs">

+ 8 - 6
front/project/www/components/Login/index.js

@@ -21,7 +21,7 @@ export default class Login extends Component {
   constructor(props) {
     super(props);
     this.validNumber = 0;
-    this.state = { type: LOGIN_WX, error: {}, data: { area: MobileArea[0].value } };
+    this.state = { type: LOGIN_WX, empty: {}, error: {}, data: { area: MobileArea[0].value } };
     this.validMobileNumber = 0;
     this.validEmailNumber = 0;
     window.addEventListener(
@@ -137,10 +137,12 @@ export default class Login extends Component {
   }
 
   changeData(field, value) {
-    let { data } = this.state;
+    let { data, empty } = this.state;
     data = data || {};
+    empty = empty || {};
     data[field] = value;
-    this.setState({ data });
+    empty[field] = !value;
+    this.setState({ data, empty });
   }
 
   validMobile(login) {
@@ -287,6 +289,7 @@ export default class Login extends Component {
           }}
           onChange={e => {
             this.changeData('mobileVerifyCode', e.target.value);
+            this.setState({ validError: '' });
           }}
         />
         {needEmail && (
@@ -401,6 +404,7 @@ export default class Login extends Component {
           }}
           onChange={e => {
             this.changeData('mobileVerifyCode', e.target.value);
+            this.setState({ validError: '' });
           }}
         />
         {needEmail && (
@@ -608,9 +612,7 @@ export class VerificationInput extends Component {
             <span className="g-input-right-verification" onClick={() => this.onSend()}>
               获取验证码
             </span>
-          ) : (
-            <span className="g-input-right-verification-loading">等待{loading}秒</span>
-          )
+          ) : (<span className="g-input-right-verification-loading">等待{loading}秒</span>)
         }
         value={value}
         error={error}

+ 2 - 2
front/project/www/components/Other/index.less

@@ -19,7 +19,7 @@
       .item-header {
         margin-bottom: 10px;
 
-        .avatar {
+        .assets {
           width: 40px;
           height: 40px;
         }
@@ -50,7 +50,7 @@
 
 .other-contact {
   >.body {
-    width: 1200px!important;
+    width: 1200px !important;
     margin: 0 auto;
 
     .m-title {

+ 35 - 14
front/project/www/components/OtherModal/index.js

@@ -24,7 +24,7 @@ export class BindPhone extends Component {
     super(props);
     this.validNumber = 0;
     this.props.data = this.props.data || {};
-    this.state = Object.assign({ step: 0, data: {} }, this.initState(this.props));
+    this.state = Object.assign({ step: 0, data: {}, empty: {} }, this.initState(this.props));
     this.stepProp = {
       0: {
         title: '绑定手机',
@@ -57,10 +57,12 @@ export class BindPhone extends Component {
   }
 
   changeData(field, value) {
-    let { data } = this.state;
+    let { data, empty } = this.state;
     data = data || {};
+    empty = empty || {};
     data[field] = value;
-    this.setState({ data, mobileError: null });
+    empty[field] = !value;
+    this.setState({ data, empty, mobileError: null });
   }
 
   validMobile() {
@@ -148,11 +150,13 @@ export class BindPhone extends Component {
         <div className="label">手机号</div>
         <div className="input-layout">
           <SelectInput
+            className="w-10"
             placeholder="请输入手机号"
             selectValue={this.state.data.area}
             select={MobileArea}
             value={this.state.data.mobile}
             error={this.state.mobileError}
+            empty={this.state.empty.mobile}
             onSelect={value => {
               this.changeData('area', value);
               this.validMobile();
@@ -163,14 +167,17 @@ export class BindPhone extends Component {
             }}
           />
           <VerificationInput
+            className="w-10"
             placeholder="请输入验证码"
             value={this.state.data.mobileVerifyCode}
             error={this.state.validError}
+            empty={this.state.empty.mobileVerifyCode}
             onSend={() => {
               return this.sendValid();
             }}
             onChange={e => {
               this.changeData('mobileVerifyCode', e.target.value);
+              this.setState({ validError: '' });
             }}
           />
         </div>
@@ -184,7 +191,7 @@ export class BindEmail extends Component {
     super(props);
     this.validNumber = 0;
     this.props.data = this.props.data || {};
-    this.state = Object.assign({ step: 0, data: {} }, this.initState(this.props));
+    this.state = Object.assign({ step: 0, data: {}, empty: {} }, this.initState(this.props));
     this.stepProp = {
       0: {
         title: '绑定邮箱',
@@ -215,10 +222,12 @@ export class BindEmail extends Component {
   }
 
   changeData(field, value) {
-    let { data } = this.state;
+    let { data, empty } = this.state;
     data = data || {};
+    empty = empty || {};
     data[field] = value;
-    this.setState({ data, error: null });
+    empty[field] = !value;
+    this.setState({ data, empty, error: null });
   }
 
   validEmail() {
@@ -283,9 +292,11 @@ export class BindEmail extends Component {
         <div className="label">邮箱地址</div>
         <div className="input-layout">
           <Input
+            className="w-10"
             placeholder="请输入邮箱"
             value={this.state.data.email}
             error={this.state.error}
+            empty={this.state.empty.email}
             onChange={e => {
               this.changeData('email', e.target.value);
               this.validEmail();
@@ -301,7 +312,7 @@ export class EditInfo extends Component {
   constructor(props) {
     super(props);
     this.props.data = this.props.data || {};
-    this.state = Object.assign({ data: {} }, this.initState(this.props));
+    this.state = Object.assign({ data: {}, empty: {} }, this.initState(this.props));
   }
 
   initState(props) {
@@ -329,24 +340,32 @@ export class EditInfo extends Component {
   }
 
   changeData(field, value) {
-    let { data } = this.state;
+    let { data, empty } = this.state;
     data = data || {};
+    empty = empty || {};
     data[field] = value;
-    this.setState({ data, error: null });
+    empty[field] = !value;
+    this.setState({ data, nicknameError: null, empty });
   }
 
   submit() {
-    const { data, error } = this.state;
-    if (!data.nickname || error) return;
+    const { data, nicknameError, empty } = this.state;
+    if (nicknameError) return;
+    if (!data.nickname) {
+      empty.nickname = true;
+      this.setState({ nicknameError: '用户名不能为空!', empty });
+      return;
+    }
     const { nickname, avatar } = data;
     My.editInfo({ nickname, avatar })
       .then(() => {
         asyncSMessage('操作成功');
         User.infoHandle(Object.assign(this.props.data, { nickname, avatar }));
         this.props.onConfirm();
+        this.setState({ nicknameError: '' });
       })
       .catch(e => {
-        this.setState({ error: e.message });
+        this.setState({ nicknameError: e.message });
       });
   }
 
@@ -366,12 +385,14 @@ export class EditInfo extends Component {
       >
         <div className="edit-info-modal-wrapper">
           <div className="edit-info-modal-block">
-            <div className="label">昵称</div>
+            <div className="label">用户名</div>
             <div className="input-layout">
               <Input
+                className="w-10"
                 placeholder="2-20位,不可使用特殊字符。"
                 value={this.state.data.nickname || ''}
-                error={this.state.error}
+                error={this.state.nicknameError}
+                empty={this.state.empty.nickname}
                 onChange={e => {
                   this.changeData('nickname', e.target.value);
                 }}

+ 1 - 0
front/project/www/components/OtherModal/index.less

@@ -20,6 +20,7 @@
 
     .input-layout {
       flex: 1;
+      display: block;
     }
   }
 }

+ 2 - 2
front/project/www/routes/my/main/page.js

@@ -476,7 +476,7 @@ export default class extends Page {
             </Tooltip>
           </div>
           <div className="right">
-            自 {total.createTIme && formatDate(total.createTime, 'YYYY-MM-DD')} ,您已在千行学习<b>{total.days}</b>
+            自 {total.createTime && formatDate(total.createTime, 'YYYY-MM-DD')} ,您已在千行学习<b>{total.days}</b>
             天,累计
             <span
               dangerouslySetInnerHTML={{
@@ -532,7 +532,7 @@ export default class extends Page {
                   this.setState({ showEdit: true });
                 }}
               >
-                {info.nickname}{' '}
+                {info.nickname || `qx${info.mobile}`}{' '}
               </div>
               <div className="id">ID: {info.id} </div>
             </div>

+ 5 - 3
front/project/www/routes/page/home/index.less

@@ -443,9 +443,7 @@
   }
 
   .block-4 {
-    height: 640px;
-    padding-left: 150px;
-    padding-top: 280px;
+    padding-top: 140px;
     background-repeat: no-repeat;
     background-position: center;
     background-color: linear-gradient(241deg, rgba(132, 93, 72, 0) 0%, rgba(88, 50, 29, 1) 100%);
@@ -462,6 +460,10 @@
       font-size: 48px;
       margin-bottom: 15px;
     }
+
+    .assets {
+      width: 100%;
+    }
   }
 
   .block-5 {

+ 19 - 17
front/project/www/routes/page/home/page.js

@@ -141,7 +141,7 @@ export default class extends Page {
                       <Assets name="expert" />
                       指导专业<span className="sub">We are Pro.</span>
                     </div>
-                    <div className="desc">专注GMAT备考8年 出分周期高于行业平均水平26% 学员均分高于行业18%</div>
+                    <div className="desc">专注GMAT备考8年<br />出分周期高于行业平均水平26%<br />学员均分高于行业18%</div>
                   </div>
                   <div className="item m-l-1-5">
                     <div className="title">
@@ -149,7 +149,7 @@ export default class extends Page {
                       ⼈⼈会⽤<span className="sub">User-frriendly</span>
                     </div>
                     <div className="desc">
-                      除提供有用的数据信息外,网站多处设置信息导,提供必要的解释和原理说明,从源头规避误区,协助考生做出更加明智的决策,提高备考效率。
+                      除提供有用的数据外,网站多处设有信息引导,提供必要的解释和原理说明,从源头规避误区,协助考生做出更加明智的决策,提高备考效率。
                     </div>
                   </div>
                 </div>
@@ -185,19 +185,21 @@ export default class extends Page {
                 </div>
                 <div className="box">
                   <div className="detail">
-                    {course[this.state.courseIndex] && (
-                      <a href={course[this.state.courseIndex].link} target="_blank">
-                        <Assets src={course[this.state.courseIndex].image} />
-                      </a>
-                    )}
+                    {course.map((row, index) => {
+                      return (
+                        <a hidden={index !== this.state.courseIndex} href={row.link} target="_blank">
+                          <Assets src={row.image} />
+                        </a>
+                      );
+                    })}
                   </div>
                   <div className="list">
                     {course.map((row, index) => {
-                      if (index >= 4) return null;
                       return (
                         <div
                           className={`tab ${this.state.courseIndex === index ? 'active' : ''}`}
                           onMouseEnter={() => this.setState({ courseIndex: index })}
+                          onClick={() => openLink(row.link)}
                         >
                           <Assets name={courseIconList[index]} />
                           {row.title}
@@ -216,14 +218,14 @@ export default class extends Page {
                 <div className="list">
                   <div className="item m-r-1-5" style={{ height: 210 }}>
                     <Assets className="sun" name="sun_blue" />
-                    <div className="title" style={{ color: '#4292F0' }}>
+                    <div className="title" style={{ color: '#4292F0' }} onClick={() => linkTo('/examination')}>
                       千⾏CAT模考<span className="sub">></span>
                     </div>
                     <div className="desc">采⽤CAT出题机制、排名制算分⽅法</div>
                     <div className="desc">独家题源,排除重题⼲扰</div>
                     <div className="desc">模考报告提供具体考点分析,明确提升 ⽅向</div>
                   </div>
-                  <div className="item m-r-1-5 m-l-1-5" style={{ height: 250 }}>
+                  <div className="item m-r-1-5 m-l-1-5" style={{ height: 250 }} onClick={() => linkTo('/textbook')}>
                     <Assets className="sun" name="sun_red" />
                     <div className="title" style={{ color: '#FFB676' }}>
                       机经服务<span className="sub">></span>
@@ -232,7 +234,7 @@ export default class extends Page {
                     <div className="desc">轻松获取:⾃动更新⾄邮箱代替⼿动 领取</div>
                     <div className="desc">随时查阅:⼿机查看、在线浏览、在 线做题</div>
                   </div>
-                  <div className="item m-l-1-5" style={{ height: 185 }}>
+                  <div className="item m-l-1-5" style={{ height: 185 }} onClick={() => User.needLogin().then(() => linkTo('/my'))}>
                     <Assets className="sun" name="sun_yello" />
                     <div className="title" style={{ color: '#F36565' }}>
                       VIP服务<span className="sub">></span>
@@ -250,12 +252,12 @@ export default class extends Page {
           {activity.map(row => {
             return (
               <div
-                className="block block-4"
-                style={{ backgroundImage: row.image }}
-                onClick={() => {
-                  this.location(row.link);
-                }}
-              />
+                className="block block-4 c-p"
+              >
+                <a href={row.link} target="_blank">
+                  <Assets src={row.image} />
+                </a>
+              </div>
             );
           })}
         </Carousel>

+ 8 - 1
front/src/services/Tools.js

@@ -337,7 +337,7 @@ export function formatTreeData(list, key = 'id', title = 'title', index = 'paren
   return result;
 }
 
-export function flattenObject(ob, prefix = '') {
+export function flattenObject(ob, prefix = '', force = false) {
   const toReturn = {};
   if (prefix) prefix = `${prefix}.`;
   Object.keys(ob).forEach(i => {
@@ -346,6 +346,13 @@ export function flattenObject(ob, prefix = '') {
       Object.keys(flatObject).forEach(x => {
         toReturn[`${prefix}${i}.${x}`] = flatObject[x];
       });
+    } else if (force && ob[i].length) {
+      ob[i].forEach((row, index) => {
+        const flatObject = flattenObject(row);
+        Object.keys(flatObject).forEach(x => {
+          toReturn[`${prefix}${i}.${index}.${x}`] = flatObject[x];
+        });
+      });
     } else {
       toReturn[`${prefix}${i}`] = ob[i];
     }

+ 1 - 0
server/data/src/main/resources/db/migration/V3__update_message.sql

@@ -0,0 +1 @@
+UPDATE message_template SET content = '<p>同学您好,<br  />\r\n您的“千行GMAT”账号已成功绑定当前邮箱。</p>\r\n<p></p>\r\n<p>Best<br />\r\n千行团队</p>' WHERE id = 16;

+ 7 - 5
server/gateway-api/src/main/java/com/qxgmat/controller/api/MyController.java

@@ -669,13 +669,15 @@ public class MyController {
         List<UserStudyStatRelation> exerciseList = userReportService.statGroupExerciseType(user.getId(), null, null);
         for(UserStudyStatRelation type:exerciseList){
             totalTime += type.getUserTime();
-            categoryMap.put(type.getModule(), type.getUserTime());
+            Integer time = categoryMap.getOrDefault(type.getModule(), 0);
+            categoryMap.put(type.getModule(), time + type.getUserTime());
         }
         // 按题型统计预习作业
         List<UserStudyStatRelation> previewList = userReportService.statGroupPreviewType(user.getId(), null, null);
         for(UserStudyStatRelation type:previewList){
             totalTime += type.getUserTime();
-            categoryMap.put(type.getModule(), type.getUserTime());
+            Integer time = categoryMap.getOrDefault(type.getModule(), 0);
+            categoryMap.put(type.getModule(), time + type.getUserTime());
         }
         // 按题型统计课程
         List<UserModuleRecordStatRelation> recordList = userCourseRecordService.statGroupType(user.getId(), null, null);
@@ -683,13 +685,13 @@ public class MyController {
             totalTime += record.getUserTime();
             // 累加同类型时间
             Integer time = categoryMap.getOrDefault(record.getModule(), 0);
-            categoryMap.put(record.getModule(), time);
+            categoryMap.put(record.getModule(), time + record.getUserTime());
         }
         // 获取长难句阅读统计
         UserRecordStatRelation sentenceStatRelation = userSentenceRecordService.stat(user.getId(), null, null);
         if (sentenceStatRelation != null){
+            totalTime += sentenceStatRelation.getUserTime();
             Integer sentenceTime = categoryMap.getOrDefault(PaperModule.SENTENCE.key, 0);
-            totalTime += sentenceTime + sentenceStatRelation.getUserTime();
             categoryMap.put(PaperModule.SENTENCE.key, sentenceTime + sentenceStatRelation.getUserTime());
         }
 
@@ -702,7 +704,7 @@ public class MyController {
 
         // 组装数据
         List<UserStudyExtendDto> categorys = new ArrayList<>();
-        if (categoryMap.containsKey(PaperModule.SENTENCE.key)) categorys.add(new UserStudyExtendDto(m.get(PaperModule.SENTENCE.key), categoryMap.get(PaperModule.SENTENCE.key)));
+        if (categoryMap.containsKey(QuestionType.SENTENCE.key)) categorys.add(new UserStudyExtendDto(m.get(QuestionType.SENTENCE.key), categoryMap.get(PaperModule.SENTENCE.key)));
         if (categoryMap.containsKey(QuestionType.SC.key)) categorys.add(new UserStudyExtendDto(m.get(QuestionType.SC.key), categoryMap.get(QuestionType.SC.key)));
         if (categoryMap.containsKey(QuestionType.RC.key)) categorys.add(new UserStudyExtendDto(m.get(QuestionType.RC.key), categoryMap.get(QuestionType.RC.key)));
         if (categoryMap.containsKey(QuestionType.CR.key)) categorys.add(new UserStudyExtendDto(m.get(QuestionType.CR.key), categoryMap.get(QuestionType.CR.key)));

+ 1 - 1
server/gateway-api/src/main/java/com/qxgmat/help/SmsHelp.java

@@ -85,7 +85,6 @@ public class SmsHelp {
             throw new ParameterException("验证码错误!");
         }
         JSONObject json = JSONObject.parseObject(dtoString);
-        session.removeAttribute(SessionKey.SMS_KEY);
         SmsSessionDto dto = Transform.convert(json, SmsSessionDto.class);
         String originCode = dto.getCode();
         String originMobile = dto.getMobile();
@@ -95,6 +94,7 @@ public class SmsHelp {
             if (new Date().getTime() > expireTime.getTime()) {
                 throw new ParameterException("验证码已过期!");
             }
+            session.removeAttribute(SessionKey.SMS_KEY);
             return true;
         }
         return false;

+ 6 - 4
server/gateway-api/src/main/java/com/qxgmat/service/extend/MessageExtendService.java

@@ -74,7 +74,6 @@ public class MessageExtendService {
         for(MessageTemplate template : templateList){
             MessageMethod messageMethod = MessageMethod.ValueOf(template.getMessageMethod());
             String title = replaceBody(template.getTitle(), params);
-            String content = replaceBody(template.getContent(), params);
             switch(messageMethod){
                 case EMAIL:
                     if(params.containsKey("link")){
@@ -88,10 +87,12 @@ public class MessageExtendService {
                     }else if(category.linkSecond != null){
                         params.put("linkSecondHtml", makeLink(category.linkSecond, category.linkSecondTitle, relationId));
                     }
-                    sendEmail(params.getOrDefault("emails", user.getEmail()), title, content, params.get("attachment"), params.get("attachments"));
+                    String emailContent = replaceBody(template.getContent(), params);
+                    sendEmail(params.getOrDefault("emails", user.getEmail()), title, emailContent, params.get("attachment"), params.get("attachments"));
                     break;
                 case INSIDE:
-                    sendInside(user.getId(), title, content, relationId, params.getOrDefault("link", template.getLink()), params.getOrDefault("linkTitle", null), category);
+                    String insideContent = replaceBody(template.getContent(), params);
+                    sendInside(user.getId(), title, insideContent, relationId, params.getOrDefault("link", template.getLink()), params.getOrDefault("linkTitle", null), category);
                     break;
                 case WECHAT:
                     sendWechat(user.getWechatOpenidWechat(), category, params);
@@ -225,7 +226,8 @@ public class MessageExtendService {
         map.put("emails", Strings.join(Arrays.stream(emails).collect(Collectors.toList()), ';'));
         map.put("code", code);
         map.put("nickname", user.getNickname());
-        map.put("url", pcUrl+"/id/"+code);
+        map.put("link", "/id/"+code);
+        map.put("content", "");
         send(user, MessageCategory.INVITED, map, user.getId());
     }