Commit deadb831 authored by Edwise's avatar Edwise 🍷

爱德迭代,增加点亮接口,更换图片

parent 3ad3981a
No preview for this file type
......@@ -996,6 +996,23 @@ export class NetManager extends ABNetManager {
this.send(net);
}
/**兑吧任务点亮 */
public yyh_light(activityId,callback: Function): void {
const param: any = {
activityId
};
const net: INetData = {
name: 'yyh_light',
uri: '/projectx/'+window['projectID']+'/join_1/finish.do',
type: 'get',
dataType: 'json',
param: param,
callback: callback,
hideMsg:true
};
this.send(net);
}
public getProjectUserInfo(callback: Function): void {
const param: any = {
......
......@@ -24,8 +24,8 @@ class TuiaAutoUpload {
var _this = this;
this.client = new OSS({
region: 'oss-cn-hangzhou',
accessKeyId: 'LTAIqO2wblIxQvwc',
accessKeySecret: '4brsaSRbRpjxw3oDIxJi6bNMcndIR6',
accessKeyId: 'LTAI4Fw25WcfcGv7FvcHoiHK',
accessKeySecret: 'NZk1NtT9J5HFaAolNbtQdzTzLLvLYm',
bucket: _this.type === 'prod' ? 'duiba' : 'daily-duiba'
});
this.bar = new ProgressBar(chalk.yellow(` 文件上传中 [:bar] :current/${this.files().length} :percent :elapseds`), {
......
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"preload","version":5,"files":["../assets/start1/no_light_title_bg.png","../assets/start1/no_light_ya.png","../assets/task/success_btn.png"]}
\ No newline at end of file
......@@ -15,6 +15,10 @@
{
"keys": "toast_png,closeCommonBtn_png,alertbg_png,去查看_png,好 的_png",
"name": "common"
},
{
"name": "preload",
"keys": "no_light_title_bg_png,no_light_ya_png,success_btn_png"
}
],
"resources": [
......@@ -387,6 +391,21 @@
"url": "assets/start1/start1暂无活动22.png",
"type": "image",
"name": "start1暂无活动22_png"
},
{
"name": "no_light_title_bg_png",
"type": "image",
"url": "assets/start1/no_light_title_bg.png"
},
{
"name": "no_light_ya_png",
"type": "image",
"url": "assets/start1/no_light_ya.png"
},
{
"name": "success_btn_png",
"type": "image",
"url": "assets/task/success_btn.png"
}
]
}
\ No newline at end of file
......@@ -4,17 +4,22 @@
<w:Config id="16d391cc18c" />
<e:Image source="startscenebg_jpg" />
<e:Group y="233" x="103">
<e:Image id="notLightImg" source="start 未完成暗的状态_png" horizontalCenter="0" />
<e:Image id="lightImg" source="start完成活动点亮_png" horizontalCenter="0" visible="false" />
<e:Group id="noLightGroup" width="544" height="133" y="0" horizontalCenter="0">
<e:Image source="no_light_title_bg_png" horizontalCenter="0" verticalCenter="0"/>
<e:Image source="no_light_ya_png" x="384" verticalCenter="-1"/>
<e:Label text="完成任务即可点亮" x="76" anchorOffsetX="0" width="304" anchorOffsetY="0" height="52" verticalAlign="middle" verticalCenter="-2" textColor="0x5b5b5b" size="28" textAlign="center"/>
</e:Group>
<e:Image id="notLightImg" source="start 未完成暗的状态_png" horizontalCenter="0" visible="false"/>
<e:Image id="lightImg" source="start完成活动点亮_png" horizontalCenter="0" visible="false"/>
</e:Group>
<e:Group x="27" y="376">
<e:Group width="163" height="90">
<e:Label id="btn1" text="全部活动" textColor="0x000000" horizontalCenter="0" verticalCenter="0" bold="true" size="30" />
<e:Label id="btn1" text="全部活动" textColor="0x000000" horizontalCenter="0" verticalCenter="0" bold="true" size="30" width="163" height="90" textAlign="center" verticalAlign="middle"/>
<e:Image id="line1" source="start选中_png" y="72" x="60" />
</e:Group>
<e:Group width="163" height="90" x="163">
<e:Label id="btn2" text="我参与的" textColor="0x878787" verticalAlign="middle" textAlign="center" horizontalCenter="0"
verticalCenter="0" size="28" />
<e:Label id="btn2" text="我参与的" textColor="0x878787" verticalAlign="middle" textAlign="center"
size="28" anchorOffsetX="0" width="163" anchorOffsetY="0" height="90" x="0" y="0"/>
<e:Image id="line2" source="start选中_png" x="60" y="72" visible="false"/>
</e:Group>
</e:Group>
......
......@@ -13,7 +13,7 @@
<e:Button id="closeBtn1" label="" horizontalCenter="0" y="614">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="task按钮_png" source.down="task按钮_png" source.disabled="task按钮_png"/>
<e:Image width="100%" height="100%" source="success_btn_png" source.down="success_btn_png" source.disabled="success_btn_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
......
import { showToast } from "../../libs/new_wx/ctrls/toastCtrl";
import getSkinPath from "../../libs/new_wx/utils/getSkinPath";
import { DataManager } from "../../libs/tw/manager/DataManager";
import { NetManager } from "../../libs/tw/manager/NetManager";
export default class StartItem extends eui.ItemRenderer {
......@@ -9,29 +11,52 @@ export default class StartItem extends eui.ItemRenderer {
}
dataChanged() {
this.addEventListener(egret.TouchEvent.TOUCH_TAP,()=>{
const {data} =DataManager.ins.getData('getProjectUserInfo');
location.href = this.data.activityUrl + `&esports_uid=${data.partnerUserId}`;
},this);
this['img0'].visible=false;
this['img2'].visible=false;
this['img1'].visible=false;
this['status0'].visible=false;
this['status1'].visible=false;
this['status2'].visible=false;
this['status3'].visible=false;
if (!this.hasEventListener(egret.TouchEvent.TOUCH_TAP)) {
this.addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
if ((this.data.activityStatus == 0 || this.data.activityStatus == 2)&&this.data.userStatus!=3) return;
this.touchEnabled = false;
this.touchChildren = false;
setTimeout(() => {
if (this) {
this.touchEnabled = true;
this.touchChildren = true;
}
}, 2000)
const { data } = DataManager.ins.getData('getProjectUserInfo');
if (this.data.sourceType == 2) {
NetManager.ins.yyh_light(this.data.activityId, (s, r) => {
if (!s) {
if (r.code != '101001' && r.code != '101003' && r.code != '101004') {
showToast('网络异常\n请隔一段时间再尝试');
return;
}
}
console.log("跳转-->>", Date.now())
location.href = this.data.activityUrl;
})
} else {
location.href = this.data.activityUrl + `&esports_uid=${data.partnerUserId}`;
}
}, this);
}
this['img0'].visible = false;
this['img2'].visible = false;
this['img1'].visible = false;
this['status0'].visible = false;
this['status1'].visible = false;
this['status2'].visible = false;
this['status3'].visible = false;
this[`status${this.data.userStatus}`].visible=true;
this[`img${this.data.activityStatus}`].visible=true;
this[`status${this.data.userStatus}`].visible = true;
this[`img${this.data.activityStatus}`].visible = true;
if(this.data.userStatus==3) {
this[`img${this.data.activityStatus}`].visible=false;
if (this.data.userStatus == 3) {
this[`img${this.data.activityStatus}`].visible = false;
}
if(this.data.activityStatus == 2||this.data.activityStatus == 0) {
if(this.data.userStatus!=3)
this[`status${this.data.userStatus}`].visible=false;
if (this.data.activityStatus == 2 || this.data.activityStatus == 0) {
if (this.data.userStatus != 3)
this[`status${this.data.userStatus}`].visible = false;
}
}
}
\ No newline at end of file
......@@ -15,7 +15,9 @@ export default class Start1Scene extends Scene {
this.scroll.height = this.stage.stageHeight - this.scroll.y - 30;
const { data } = DataManager.ins.getData('yyh_index');
this['notLightImg'].visible = !data.lighten;
//2021-07-26 爱德迭代,这里废弃之前用图片表示的未点亮,该用group+label+img,灵活性更高
// this['notLightImg'].visible = !data.lighten;
this['noLightGroup'].visible = !data.lighten;
this['lightImg'].visible = data.lighten;
this['tips'].text = `我完成的活动${data.completeCount}个`;
this.list.itemRenderer = StartItem;
......@@ -50,8 +52,10 @@ export default class Start1Scene extends Scene {
if (newActs.length >= 4) newActs.length = 4;
// console.log(newActs);
if (!showSuccess)
PanelCtrl.instance.show('TaskPanel', newActs.join(''));
//2021-07-27 爱德迭代修改,不需要这个弹窗了
// if (!showSuccess)
// PanelCtrl.instance.show('TaskPanel', newActs.join(''));
localStorage.setItem('yyh2_task', JSON.stringify(currentTaskIds));
}
......
......@@ -9,6 +9,9 @@ const config = {
'/projectx/p32804e45/join_1/join.do': {
data: './esports/index.json'
},
'/projectx/p32804e45/join_1/finish.do': {
data: './esports/light.json'
},
'/customActivity/esports/recentlyGetJoinTimes': {
data: './esports/recentlyGetJoinTimes.json'
},
......
......@@ -7,7 +7,7 @@
"activityId": "124",
"activityUrl": "http://www.taobao.com",
"userStatus": 0,
"sourceType": 1,
"sourceType": 2,
"activityName": "活动2",
"activityStatus": 1,
"banner": "http://thirdwx.qlogo.cn/mmopen/13HuiaUpBYia5bLzmbjjdKn4WHbf63SJm2pzwDY73f2r33WbCXtBhwHLnF6iaGqdAk0eC8CbA8jQxZTYPp05iaDMTj5tDb7ibV3Rs/132",
......
{
"success": true,
"code": "101001",
"desc": "OK",
"timestamp": 1564553326224,
"data": null
}
\ No newline at end of file
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