当前位置:网站首页>透过开发抽奖小程序,体会创新与迭代
透过开发抽奖小程序,体会创新与迭代
2022-07-31 10:09:00 【InfoQ】
为什么会开发这个小程序?

产品迭代中的创新
Logo的变化


历史踪迹













创新创意
- 黑科技的创新:2014年双11,我们创新研究出了加购抽奖的模式(现在淘宝已经禁止加购抽奖),一时间订购人数从1000人增长到7000人。风口上的创新让我们尝到了甜头,同时带来的访问压力也让我们苦不堪言。
- 加速过渡中的创新,在产品初期我们没有能力快速开发大转盘指针动态停靠的功能,于是我们把无指针的创意加入到产品中(无指针是通过弹层展示中奖信息),不仅让商家使用配置更方便,也加快了我们产品迭代的速度,做到了抢占用户的先机。
- 用户体验的创新:在淘宝商家工具中,可拖拽式布局的创新,也让商家一致好评,增加了用户的体验。用户可以轻松布局抽奖规则,奖品列表,抽奖区等等,当然现在这样的玩法已经随处可见,但在当时的淘宝服务市场,我们绝对属于先行者。
- 业务层面的创新,我们在抽奖规则和奖品规则中整合了多种玩法,自己创新了一些规则玩法,同时也借鉴了同行的玩法,然后我们整合起来,区分使用等级,不仅满足了更多维度的客户,也让我们的产品有足够的深度。






详解前端开发技术
技术演变


架构设计

前端技术




<view class="egg" style="position:absolute;width:{{width}}rpx;height:{{height}}rpx;top:{{top}}rpx;left:{{left}}rpx;z-index:{{zindex}};">
<view a:for="{{eggLuckyGame}}" a:for-index="idx" key="idx" a:for-item="item" style="position:relative;width:33%;height:100%;float:left;animation:{{item.eggShake}};" onTap="startGame" data-index="{{idx}}">
<image src="{{item.eggConfig.url}}" style="display:{{!item.showBrokenEgg?'block':'none'}};width:100%;height:100%;" ></image>
<image src="{{item.openConfig.url}}" style="display:{{item.showBrokenEgg?'block':'none'}};width:100%;height:100%;"></image>
<image a:if="{{item.hammerShake}}" src="{{item.hammerConfig.url}}" style="animation:{{item.hammerShake}};position:absolute;left:60%;top:-10%;width:50%;height:50%;"></image>
</view>
</view>


<view style="height:{{layoutHeight}}rpx;background-image:url({{bgImage}});background-size:100%;background-repeat:no-repeat;background-color:{{bgColor}}">
<!-- 组件遍历&渲染 -->
<view a:for="{{currentConfig}}" a:for-index="idx" key="idx" a:for-item="item">
<egg-bg a:if="{{item.name=='gameEggLuckyArea'}}" gameRunning="{{ gameRunning }}" onHandleRoundRun="setGameData" item="{{ item }}"></egg-bg>
</view>
<huodong-componsecommon awardImg="{{awardImg}}" awardRollInfo="{{awardRollInfo}}" currentConfig="{{ currentConfig }}"></huodong-componsecommon>
<!-- 公共组件 -->
<huodong-common actInfo="{{ actInfo }}" showLose="{{showLose}}" awardBackSrc="{{awardBackSrc}}" ruleAlertList="{{ruleAlertList}}"
showShadow="{{showShadow}}" showWin="{{showWin}}" expend="{{expend}}" luckyAward="{{luckyAward}}" drawNoLuckyMsg="{{drawNoLuckyMsg}}" onHandleRoundRun="setGameData">
</huodong-common>
</view>

getUserInfoSimple() {
return new Promise((resolve, reject) => {
if (Object.keys(this.userInfo).length > 0) {
resolve(this.userInfo);
} else {
my.authorize({
scopes: 'scope.userInfo',
success: authcode => {
my.getAuthUserInfo({
success: res => {
this.userInfo = res;
resolve(this.userInfo);
},
fail: (e) => {
this.funcExcept(e, false)
reject(e);
},
})
},
fail: (e) => {
this.funcExcept(e, false)
reject(e);
}
});
}
});
}
//云应用请求
async luckyHttp(pathurl, method = 'GET', data = {}, resolve) {
try {
const result = await cloud.application.httpRequest({
'path': `${this.fetchLuckyData}${pathurl}`,
'method': method,
'headers': {},
'params': data,
'body': data,
'exts': { "cloudAppId": this.cloudAppId, "timeout": this.timeout }
});
resolve(result);
} catch (e) {
});
}
}
async sendTBAward(awardCode) {
console.log('user', this.userInfo)
console.log('awardCode', awardCode)
try {
const issueResult = await cloud.topApi.invoke({
api: 'alibaba.latour.strategy.issue',
data: {
channel: 'lafite_mt_common_isv_draw',
strategy_code: 'xxx',
selected_benefit_code: awardCode,
},
authScope: 'scope.userInfo'
});
}
catch (e) {
console.log(e.message)
}
}





高并发解决
- 分表分库,优化Web Server。我们从早期SQL Server迁移到开源MySQL中。
- 增加ECS做负载均衡,加入Redis,加入队列等。
- 使用容器技术,包括轻容器Docker,到资源池,K8容器,SLB等云资源编排。
- 使用Serverless技术,包括云函数,云数据库。




结尾


边栏推荐
猜你喜欢
nodeJs--querystring模块
Burndown chart of project management tools: Dynamic assessment of team work ability
第二十四课、二十五课,高级光照(blinn),Gamma矫正
[NLP] Interpretation of Transformer Theory
Kotlin—基本语法(二)
Kotlin—基本语法 (五)
第六章
Come n times with the sword--05. Replace spaces
如何优雅的停止一个线程?
Data Middle Office Construction (6): Data System Construction
随机推荐
Solve rpc error: code = Unimplemented desc = method CheckLicense not implemented
学习笔记——七周成为数据分析师《第二周:业务》:业务分析框架
第七章
【LeetCode】387. 字符串中的第一个唯一字符
一些计时软件,生产力工具
Kotlin—基本语法 (四)
初识二叉搜索树
Qt 编译错误:C2228: “.key”的左边必须有类/结构/联合
如何将虚拟机上的文件复制到主机上
湖仓一体电商项目(二):项目使用技术及版本和基础环境准备
顺序表的删除
怎样使用浏览器静默打印网页
loadrunner脚本--添加集合点
【LeetCode】118.杨辉三角
迪拜的超市---线段树双重懒标记+二分
【LeetCode】36.有效的数独
乐观锁和悲观锁
ASP.NET 身份认证框架 Identity(一)
【LeetCode】Day108-和为 K 的子数组
The big-eyed Google Chrome has also betrayed, teach you a trick to quickly clear its own ads