当前位置:网站首页>透过开发抽奖小程序,体会创新与迭代
透过开发抽奖小程序,体会创新与迭代
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技术,包括云函数,云数据库。




结尾


边栏推荐
猜你喜欢

Burndown chart of project management tools: Dynamic assessment of team work ability

可以用聚酯树脂将接线板密封接线盒吗?(接线盒灌封胶用哪种树脂)

学习笔记——七周成为数据分析师《第二周:业务》:业务分析框架

富文本编辑器Tinymce

Centos7 install mysql5.7

Emotional crisis, my friend's online dating girlfriend wants to break up with him, ask me what to do

darknet 训练分类网络

作为面试官,关于线程池的问题我一般这样套路...

【微信小程序开发】生命周期与生命周期函数

C#多态的实现
随机推荐
Kotlin—基本语法 (四)
学习笔记——七周成为数据分析师《第二周:业务》:业务分析框架
Progressive Web App(PWA)
如何优雅的停止一个线程?
js right dot single page scrolling introduction page
OpenGL es 导读篇
Add a shuffling effect to every pie
一些计时软件,生产力工具
cocoaPods管理之后工程结构变化
Burndown chart of project management tools: Dynamic assessment of team work ability
Build finished with errors/Executable Not Found
第六章
js滚动条滚动到指定元素
C#多态的实现
NowCoderTOP28-34 binary tree - continuous update ing
Redis集群-哨兵模式原理(Sentinel)
Web系统常见安全漏洞介绍及解决方案-CSRF攻击
Kotlin—基本语法(二)
ReentrantLock
PyQt5快速开发与实战 9.4 Matplotlib在PyQt中的应用