Commit 94b7e40d authored by wildfirecode13's avatar wildfirecode13

1

parent d9e0469a
......@@ -11,12 +11,7 @@ export const homeInfo = {
"success": true
}
export const updateUinfo = {
"code": null,
"data": 1,
"message": 'dfs',
"success": false
}
export const updateUinfo = {"code":"10004","data":null,"message":"昵称包含敏感词","success":false}
export const doshare = {
"code": null,
"data": true,
......@@ -28,7 +23,7 @@ export const signInfo = {
"data": {
"todaySigned": 0,
"continuousDays": 6,
"needPopup": 0,
"needPopup": 1,
"signLists": [
{
"awardName": "欢趣豆",
......@@ -113,7 +108,7 @@ export const pagelist = list
// ]
export const dosign = {
"code": null,
"code": 10010,
"data": {
"result": true,
"type": "daPaiCoupons",
......@@ -121,7 +116,7 @@ export const dosign = {
"awardPic": "//yun.dui88.com/projectxh5/coupon-250-250.png"
},
"message": null,
"success": true
"success": false
}
// export const dosign ={
......
......@@ -11,10 +11,10 @@ export default {
[`/projectx/${projectId}/e-family/update.do`]: efamily.updateUinfo,
[`/projectx/${projectId}/e-family/share.do`]: efamily.doshare,
[`/projectx/${projectId}/e-family/signInfo.do`]: efamily.signInfo,
[`/projectx/${projectId}/e-family/sign.do`]: efamily.dosign,
[`/customActivity/icbcefamily/pageList`]: efamily.pagelist,
},
post: {
[`/projectx/${projectId}/e-family/sign.do`]: efamily.dosign,
[`/projectx/${projectId}/join.do`]: collect_0722.join
}
};
\ No newline at end of file
......@@ -7,7 +7,7 @@ const apiCfg = {
signInfo:`/projectx/${projectId}/e-family/signInfo.do`,
dosign:{
uri:`/projectx/${projectId}/e-family/sign.do`,
withToken:true
withToken:true,
},
pageList:`/customActivity/icbcefamily/pageList`,
}
......
......@@ -164,8 +164,20 @@ class Select extends Component {
dataCenter.setData(Store.needguide,true);
}else{
if(updateuinfo){
let msg = updateuinfo.message;
Toast(msg);
// let msg = updateuinfo.message;
// Toast(msg);
switch (updateuinfo.code) {
case 10004:
Toast('存在敏感词,请重新检查昵称')
break;
case 10005:
Toast('网络错误,发放欢趣豆失败')
break;
default:
Toast(updateuinfo.message || '网络异常,请稍后重试~')
}
}else{
Toast(netErrMsg)
}
......
......@@ -29,17 +29,26 @@ class Sign extends Component {
doSign = () => {
API.dosign().then((res) => {
const continuousDays = this.state.continuousDays + 1;
this.setState({ todaySigned: true, continuousDays: continuousDays });
getHomeInfo();
if (res && res.success) {
const continuousDays = this.state.continuousDays + 1;
this.setState({ todaySigned: true, continuousDays: continuousDays });
getHomeInfo();
if (res.data.type !== 'joyBean'){
Aup.show('PrizeRule', res.data, this);
}else{
this.props.onClose();
Toast(`恭喜你成功领取${res.data.awardName}`)
if (res.data.type !== 'joyBean') {
Aup.show('PrizeRule', res.data, this);
} else {
this.props.onClose();
Toast(`恭喜你成功领取${res.data.awardName}`)
}
} else {
switch (res.code) {
case 10010:
Toast('网络错误,请联系客服')
break;
default:
Toast(res.message || '网络异常,请稍后重试~')
}
}
});
};
......@@ -52,49 +61,49 @@ class Sign extends Component {
let lineList = [];
switch (continuousDays) {
case 0:
lineList=[]
lineList = []
break;
case 1:
if(todaySigned)
lineList=[]
else
lineList=[1]
if (todaySigned)
lineList = []
else
lineList = [1]
break;
case 2:
if(todaySigned)
lineList=[1]
else
lineList=[1,1]
if (todaySigned)
lineList = [1]
else
lineList = [1, 1]
break;
case 3:
if(todaySigned)
lineList=[1,1]
else
lineList=[1,1,1]
if (todaySigned)
lineList = [1, 1]
else
lineList = [1, 1, 1]
break;
case 4:
if(todaySigned)
lineList=[1,1,1]
else
lineList=[1,1,1,1]
if (todaySigned)
lineList = [1, 1, 1]
else
lineList = [1, 1, 1, 1]
break;
case 5:
if(todaySigned)
lineList=[1,1,1,1]
else
lineList=[1,1,1,1,1]
if (todaySigned)
lineList = [1, 1, 1, 1]
else
lineList = [1, 1, 1, 1, 1]
break;
case 6:
if(todaySigned)
lineList=[1,1,1,1,1]
else
lineList=[1,1,1,1,1,1]
if (todaySigned)
lineList = [1, 1, 1, 1, 1]
else
lineList = [1, 1, 1, 1, 1, 1]
break;
case 7:
if(todaySigned)
lineList=[1,1,1,1,1,1]
else
lineList=[1,1,1,1,1,1,1]
if (todaySigned)
lineList = [1, 1, 1, 1, 1, 1]
else
lineList = [1, 1, 1, 1, 1, 1, 1]
break;
}
......@@ -357,16 +366,16 @@ class Sign extends Component {
src={this.state.resList['534772d2-3e5a-487d-8236-8913de270cb0'].url}
/>
)}
<img
onClick={()=>{location.href='ff1c082c5.html'}}
className="sign_recordbtn "
src="//yun.duiba.com.cn/spark/assets/3d41e1c0c6efe7f06324dd82292b728242d3eef8.png"
/>
<img
onClick={() => { location.href = 'ff1c082c5.html' }}
className="sign_recordbtn "
src="//yun.duiba.com.cn/spark/assets/3d41e1c0c6efe7f06324dd82292b728242d3eef8.png"
/>
{!todaySigned && (
<img
onClick={debounce(this.doSign,2000,1)}
onClick={debounce(this.doSign, 2000, 1)}
className="sign_btn md11"
uuid="4dfe2b82-10bd-4442-a01e-65c18869a18e"
src={this.state.resList['13b618c4-cd2a-4037-9664-b77381fbfade'].url}
......
......@@ -23,8 +23,8 @@ class Userinfo extends Component {
}
var regEn = /[`~!@#$%^&*()_+<>?:"{},.\/;'[\]]/im,
regCn = /[·!#¥(——):;“”‘、,|《。》?、【】[\]]/im;
if(regEn.test(planame) || regCn.test(planame)) {
regCn = /[·!#¥(——):;“”‘、,|《。》?、【】[\]]/im;
if (regEn.test(planame) || regCn.test(planame)) {
Toast("昵称格式错误,只能使用6个字符以内的字母、数字、中文");
return false;
}
......@@ -35,7 +35,19 @@ class Userinfo extends Component {
getHomeInfo();
this.props.onClose();
} else {
Toast(res.message || '网络异常,请稍后重试~')
switch (res.code) {
case 10004:
Toast('存在敏感词,请重新检查昵称')
break;
case 10005:
Toast('网络错误,发放欢趣豆失败')
break;
case 10011:
Toast('今天不可修改昵称哦~请明天再试试')
break;
default:
Toast(res.message || '网络异常,请稍后重试~')
}
}
}).catch(e => {
console.log('err', e);
......
......@@ -11,6 +11,7 @@ import { getStepData, widgetConfig } from './widgetConfig';
import { GDispatcher } from "spark-wrapper-fyge"
import dataCenter, { Store } from '../../dataCenter';
import { getSVGA } from '../../svga';
import { Toast } from '@spark/ui';
let _widget;
class Main3 extends Component {
......@@ -34,6 +35,10 @@ class Main3 extends Component {
}
gotoURL=(type)=>{
if(type==='renwudating'){
Toast('暂未开放,敬请期待')
return;
}
const urlmap = {
ganji:'https://baidu.com?ganji',
equnongchang:'https://baidu.com?equnongchang',
......
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