You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by ji...@apache.org on 2017/01/24 08:18:48 UTC
[33/50] [abbrv] incubator-weex git commit: * [ios] add bundle js
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/f4fd0820/ios/playground/bundlejs/showcase/calculator.js
----------------------------------------------------------------------
diff --git a/ios/playground/bundlejs/showcase/calculator.js b/ios/playground/bundlejs/showcase/calculator.js
new file mode 100644
index 0000000..d87e4dd
--- /dev/null
+++ b/ios/playground/bundlejs/showcase/calculator.js
@@ -0,0 +1,1485 @@
+/******/ (function(modules) { // webpackBootstrap
+/******/ // The module cache
+/******/ var installedModules = {};
+
+/******/ // The require function
+/******/ function __webpack_require__(moduleId) {
+
+/******/ // Check if module is in cache
+/******/ if(installedModules[moduleId])
+/******/ return installedModules[moduleId].exports;
+
+/******/ // Create a new module (and put it into the cache)
+/******/ var module = installedModules[moduleId] = {
+/******/ exports: {},
+/******/ id: moduleId,
+/******/ loaded: false
+/******/ };
+
+/******/ // Execute the module function
+/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
+
+/******/ // Flag the module as loaded
+/******/ module.loaded = true;
+
+/******/ // Return the exports of the module
+/******/ return module.exports;
+/******/ }
+
+
+/******/ // expose the modules object (__webpack_modules__)
+/******/ __webpack_require__.m = modules;
+
+/******/ // expose the module cache
+/******/ __webpack_require__.c = installedModules;
+
+/******/ // __webpack_public_path__
+/******/ __webpack_require__.p = "";
+
+/******/ // Load entry module and return exports
+/******/ return __webpack_require__(0);
+/******/ })
+/************************************************************************/
+/******/ ([
+/* 0 */
+/***/ function(module, exports, __webpack_require__) {
+
+ ;__weex_define__("@weex-component/70765ef005f962901c201ee23e67ecca", [], function(__weex_require__, __weex_exports__, __weex_module__){
+
+ ;
+ __webpack_require__(1);
+ var OP = ['+', '-', '*', '/'];
+ var inputs = [];
+ __weex_module__.exports = {
+ data: function () {return {
+ result: ''
+ }},
+ methods: {
+ input: function(e) {
+ var value = e.target.attr['value'];
+ var lastOne = inputs.length ? inputs[inputs.length - 1] : '';
+ if (OP.indexOf(lastOne) > -1 && OP.indexOf(value) > -1) {
+ return;
+ }
+
+ inputs.push(value);
+ var buf = [], char;
+ for (var i = 0; i < inputs.length; i++) {
+ char = inputs[i];
+ if (OP.indexOf(char) > -1) {
+ char = ' ' + char + ' ';
+ }
+ buf.push(char);
+ }
+ this.result = buf.join('');
+ },
+ calculate: function() {
+ var result = eval(this.result);
+ inputs = [result];
+ this.result = result;
+ },
+ clear: function() {
+ inputs = [];
+ this.result = '';
+ }
+ }
+ }
+
+ ;__weex_module__.exports.template={
+ "type": "div",
+ "style": {
+ "padding": 5
+ },
+ "children": [
+ {
+ "type": "text",
+ "classList": [
+ "result"
+ ],
+ "attr": {
+ "value": function () {return this.result}
+ }
+ },
+ {
+ "type": "div",
+ "classList": [
+ "row"
+ ],
+ "children": [
+ {
+ "type": "text",
+ "classList": [
+ "btn"
+ ],
+ "events": {
+ "click": "input"
+ },
+ "attr": {
+ "value": "1"
+ }
+ },
+ {
+ "type": "text",
+ "classList": [
+ "btn"
+ ],
+ "events": {
+ "click": "input"
+ },
+ "attr": {
+ "value": "2"
+ }
+ },
+ {
+ "type": "text",
+ "classList": [
+ "btn"
+ ],
+ "events": {
+ "click": "input"
+ },
+ "attr": {
+ "value": "3"
+ }
+ },
+ {
+ "type": "text",
+ "classList": [
+ "btn",
+ "btn-operator"
+ ],
+ "events": {
+ "click": "input"
+ },
+ "attr": {
+ "value": "+"
+ }
+ }
+ ]
+ },
+ {
+ "type": "div",
+ "classList": [
+ "row"
+ ],
+ "children": [
+ {
+ "type": "text",
+ "classList": [
+ "btn"
+ ],
+ "events": {
+ "click": "input"
+ },
+ "attr": {
+ "value": "4"
+ }
+ },
+ {
+ "type": "text",
+ "classList": [
+ "btn"
+ ],
+ "events": {
+ "click": "input"
+ },
+ "attr": {
+ "value": "5"
+ }
+ },
+ {
+ "type": "text",
+ "classList": [
+ "btn"
+ ],
+ "events": {
+ "click": "input"
+ },
+ "attr": {
+ "value": "6"
+ }
+ },
+ {
+ "type": "text",
+ "classList": [
+ "btn",
+ "btn-operator"
+ ],
+ "events": {
+ "click": "input"
+ },
+ "attr": {
+ "value": "-"
+ }
+ }
+ ]
+ },
+ {
+ "type": "div",
+ "classList": [
+ "row"
+ ],
+ "children": [
+ {
+ "type": "text",
+ "classList": [
+ "btn"
+ ],
+ "events": {
+ "click": "input"
+ },
+ "attr": {
+ "value": "7"
+ }
+ },
+ {
+ "type": "text",
+ "classList": [
+ "btn"
+ ],
+ "events": {
+ "click": "input"
+ },
+ "attr": {
+ "value": "8"
+ }
+ },
+ {
+ "type": "text",
+ "classList": [
+ "btn"
+ ],
+ "events": {
+ "click": "input"
+ },
+ "attr": {
+ "value": "9"
+ }
+ },
+ {
+ "type": "text",
+ "classList": [
+ "btn",
+ "btn-operator"
+ ],
+ "events": {
+ "click": "input"
+ },
+ "attr": {
+ "value": "*"
+ }
+ }
+ ]
+ },
+ {
+ "type": "div",
+ "classList": [
+ "row"
+ ],
+ "children": [
+ {
+ "type": "text",
+ "classList": [
+ "btn"
+ ],
+ "events": {
+ "click": "input"
+ },
+ "attr": {
+ "value": "0"
+ }
+ },
+ {
+ "type": "text",
+ "classList": [
+ "btn"
+ ],
+ "events": {
+ "click": "input"
+ },
+ "attr": {
+ "value": "."
+ }
+ },
+ {
+ "type": "text",
+ "classList": [
+ "btn"
+ ],
+ "events": {
+ "click": "clear"
+ },
+ "attr": {
+ "value": "AC"
+ }
+ },
+ {
+ "type": "text",
+ "classList": [
+ "btn",
+ "btn-operator"
+ ],
+ "events": {
+ "click": "calculate"
+ },
+ "attr": {
+ "value": "="
+ }
+ }
+ ]
+ }
+ ]
+ }
+ ;__weex_module__.exports.style={
+ "row": {
+ "flexDirection": "row"
+ },
+ "result": {
+ "textAlign": "right",
+ "backgroundColor": "#666666",
+ "fontSize": 40,
+ "color": "#FFFFFF",
+ "height": 100,
+ "padding": 30,
+ "margin": 5
+ },
+ "btn": {
+ "flex": 1,
+ "textAlign": "center",
+ "backgroundColor": "#eeeeee",
+ "fontSize": 36,
+ "height": 100,
+ "padding": 30,
+ "margin": 5
+ },
+ "btn-operator": {
+ "backgroundColor": "#666699",
+ "fontSize": 40,
+ "color": "#FFFFFF"
+ }
+ }
+ })
+ ;__weex_bootstrap__("@weex-component/70765ef005f962901c201ee23e67ecca", {
+ "transformerVersion": "0.3.1"
+ },undefined)
+
+/***/ },
+/* 1 */
+/***/ function(module, exports, __webpack_require__) {
+
+ ;__weex_define__("@weex-component/index", [], function(__weex_require__, __weex_exports__, __weex_module__){
+
+ ;
+ __webpack_require__(2);
+ __webpack_require__(3);
+ __webpack_require__(4);
+ __webpack_require__(5);
+ __webpack_require__(6);
+ __webpack_require__(7);
+ __webpack_require__(8);
+ __webpack_require__(9);
+ __webpack_require__(10);
+ __webpack_require__(11);
+ __webpack_require__(12);
+
+ })
+
+/***/ },
+/* 2 */
+/***/ function(module, exports) {
+
+ ;__weex_define__("@weex-component/wxc-button", [], function(__weex_require__, __weex_exports__, __weex_module__){
+
+ ;
+ __weex_module__.exports = {
+ data: function () {return {
+ type: 'default',
+ size: 'large',
+ value: ''
+ }},
+ methods: {
+ }
+ }
+
+ ;__weex_module__.exports.template={
+ "type": "div",
+ "classList": function () {return ['btn', 'btn-' + (this.type), 'btn-sz-' + (this.size)]},
+ "children": [
+ {
+ "type": "text",
+ "classList": function () {return ['btn-txt', 'btn-txt-' + (this.type), 'btn-txt-sz-' + (this.size)]},
+ "attr": {
+ "value": function () {return this.value}
+ }
+ }
+ ]
+ }
+ ;__weex_module__.exports.style={
+ "btn": {
+ "marginBottom": 0,
+ "alignItems": "center",
+ "justifyContent": "center",
+ "borderWidth": 1,
+ "borderStyle": "solid",
+ "borderColor": "#333333"
+ },
+ "btn-default": {
+ "color": "rgb(51,51,51)"
+ },
+ "btn-primary": {
+ "backgroundColor": "rgb(40,96,144)",
+ "borderColor": "rgb(40,96,144)"
+ },
+ "btn-success": {
+ "backgroundColor": "rgb(92,184,92)",
+ "borderColor": "rgb(76,174,76)"
+ },
+ "btn-info": {
+ "backgroundColor": "rgb(91,192,222)",
+ "borderColor": "rgb(70,184,218)"
+ },
+ "btn-warning": {
+ "backgroundColor": "rgb(240,173,78)",
+ "borderColor": "rgb(238,162,54)"
+ },
+ "btn-danger": {
+ "backgroundColor": "rgb(217,83,79)",
+ "borderColor": "rgb(212,63,58)"
+ },
+ "btn-link": {
+ "borderColor": "rgba(0,0,0,0)",
+ "borderRadius": 0
+ },
+ "btn-txt-default": {
+ "color": "rgb(51,51,51)"
+ },
+ "btn-txt-primary": {
+ "color": "rgb(255,255,255)"
+ },
+ "btn-txt-success": {
+ "color": "rgb(255,255,255)"
+ },
+ "btn-txt-info": {
+ "color": "rgb(255,255,255)"
+ },
+ "btn-txt-warning": {
+ "color": "rgb(255,255,255)"
+ },
+ "btn-txt-danger": {
+ "color": "rgb(255,255,255)"
+ },
+ "btn-txt-link": {
+ "color": "rgb(51,122,183)"
+ },
+ "btn-sz-large": {
+ "width": 300,
+ "height": 100,
+ "paddingTop": 25,
+ "paddingBottom": 25,
+ "paddingLeft": 40,
+ "paddingRight": 40,
+ "borderRadius": 15
+ },
+ "btn-sz-middle": {
+ "width": 240,
+ "height": 80,
+ "paddingTop": 15,
+ "paddingBottom": 15,
+ "paddingLeft": 30,
+ "paddingRight": 30,
+ "borderRadius": 10
+ },
+ "btn-sz-small": {
+ "width": 170,
+ "height": 60,
+ "paddingTop": 12,
+ "paddingBottom": 12,
+ "paddingLeft": 25,
+ "paddingRight": 25,
+ "borderRadius": 7
+ },
+ "btn-txt-sz-large": {
+ "fontSize": 45
+ },
+ "btn-txt-sz-middle": {
+ "fontSize": 35
+ },
+ "btn-txt-sz-small": {
+ "fontSize": 30
+ }
+ }
+ })
+
+/***/ },
+/* 3 */
+/***/ function(module, exports) {
+
+ ;__weex_define__("@weex-component/wxc-hn", [], function(__weex_require__, __weex_exports__, __weex_module__){
+
+ ;
+ __weex_module__.exports = {
+ data: function () {return {
+ level: 1,
+ value: ''
+ }},
+ methods: {}
+ }
+
+ ;__weex_module__.exports.template={
+ "type": "div",
+ "classList": function () {return ['h' + (this.level)]},
+ "style": {
+ "justifyContent": "center"
+ },
+ "children": [
+ {
+ "type": "text",
+ "classList": function () {return ['txt-h' + (this.level)]},
+ "attr": {
+ "value": function () {return this.value}
+ }
+ }
+ ]
+ }
+ ;__weex_module__.exports.style={
+ "h1": {
+ "height": 110,
+ "paddingTop": 20,
+ "paddingBottom": 20
+ },
+ "h2": {
+ "height": 110,
+ "paddingTop": 20,
+ "paddingBottom": 20
+ },
+ "h3": {
+ "height": 110,
+ "paddingTop": 20,
+ "paddingBottom": 20
+ },
+ "txt-h1": {
+ "fontSize": 70
+ },
+ "txt-h2": {
+ "fontSize": 52
+ },
+ "txt-h3": {
+ "fontSize": 42
+ }
+ }
+ })
+
+/***/ },
+/* 4 */
+/***/ function(module, exports) {
+
+ ;__weex_define__("@weex-component/wxc-list-item", [], function(__weex_require__, __weex_exports__, __weex_module__){
+
+ ;
+ __weex_module__.exports = {
+ data: function () {return {
+ bgColor: '#ffffff'
+ }},
+ methods: {
+ touchstart: function() {
+ // FIXME android touch
+ // TODO adaptive opposite bgColor
+ // this.bgColor = '#e6e6e6';
+ },
+ touchend: function() {
+ // FIXME android touchend not triggered
+ // this.bgColor = '#ffffff';
+ }
+ }
+ }
+
+ ;__weex_module__.exports.template={
+ "type": "div",
+ "classList": [
+ "item"
+ ],
+ "events": {
+ "touchstart": "touchstart",
+ "touchend": "touchend"
+ },
+ "style": {
+ "backgroundColor": function () {return this.bgColor}
+ },
+ "children": [
+ {
+ "type": "content"
+ }
+ ]
+ }
+ ;__weex_module__.exports.style={
+ "item": {
+ "paddingTop": 25,
+ "paddingBottom": 25,
+ "paddingLeft": 35,
+ "paddingRight": 35,
+ "height": 160,
+ "justifyContent": "center",
+ "borderBottomWidth": 1,
+ "borderColor": "#dddddd"
+ }
+ }
+ })
+
+/***/ },
+/* 5 */
+/***/ function(module, exports) {
+
+ ;__weex_define__("@weex-component/wxc-panel", [], function(__weex_require__, __weex_exports__, __weex_module__){
+
+ ;
+ __weex_module__.exports = {
+ data: function () {return {
+ type: 'default',
+ title: '',
+ paddingBody: 20,
+ paddingHead: 20,
+ dataClass: '', // FIXME transfer class
+ border: 0
+ }},
+ ready: function() {
+ }
+ }
+
+ ;__weex_module__.exports.template={
+ "type": "div",
+ "classList": function () {return ['panel', 'panel-' + (this.type)]},
+ "style": {
+ "borderWidth": function () {return this.border}
+ },
+ "children": [
+ {
+ "type": "text",
+ "classList": function () {return ['panel-header', 'panel-header-' + (this.type)]},
+ "style": {
+ "paddingTop": function () {return this.paddingHead},
+ "paddingBottom": function () {return this.paddingHead},
+ "paddingLeft": function () {return this.paddingHead*1.5},
+ "paddingRight": function () {return this.paddingHead*1.5}
+ },
+ "attr": {
+ "value": function () {return this.title}
+ }
+ },
+ {
+ "type": "div",
+ "classList": function () {return ['panel-body', 'panel-body-' + (this.type)]},
+ "style": {
+ "paddingTop": function () {return this.paddingBody},
+ "paddingBottom": function () {return this.paddingBody},
+ "paddingLeft": function () {return this.paddingBody*1.5},
+ "paddingRight": function () {return this.paddingBody*1.5}
+ },
+ "children": [
+ {
+ "type": "content"
+ }
+ ]
+ }
+ ]
+ }
+ ;__weex_module__.exports.style={
+ "panel": {
+ "marginBottom": 20,
+ "backgroundColor": "#ffffff",
+ "borderColor": "#dddddd",
+ "borderWidth": 1
+ },
+ "panel-primary": {
+ "borderColor": "rgb(40,96,144)"
+ },
+ "panel-success": {
+ "borderColor": "rgb(76,174,76)"
+ },
+ "panel-info": {
+ "borderColor": "rgb(70,184,218)"
+ },
+ "panel-warning": {
+ "borderColor": "rgb(238,162,54)"
+ },
+ "panel-danger": {
+ "borderColor": "rgb(212,63,58)"
+ },
+ "panel-header": {
+ "backgroundColor": "#f5f5f5",
+ "fontSize": 40,
+ "color": "#333333"
+ },
+ "panel-header-primary": {
+ "backgroundColor": "rgb(40,96,144)",
+ "color": "#ffffff"
+ },
+ "panel-header-success": {
+ "backgroundColor": "rgb(92,184,92)",
+ "color": "#ffffff"
+ },
+ "panel-header-info": {
+ "backgroundColor": "rgb(91,192,222)",
+ "color": "#ffffff"
+ },
+ "panel-header-warning": {
+ "backgroundColor": "rgb(240,173,78)",
+ "color": "#ffffff"
+ },
+ "panel-header-danger": {
+ "backgroundColor": "rgb(217,83,79)",
+ "color": "#ffffff"
+ },
+ "panel-body": {}
+ }
+ })
+
+/***/ },
+/* 6 */
+/***/ function(module, exports) {
+
+ ;__weex_define__("@weex-component/wxc-tip", [], function(__weex_require__, __weex_exports__, __weex_module__){
+
+ ;
+ __weex_module__.exports = {
+ data: function () {return {
+ type: 'success',
+ value: ''
+ }}
+ }
+
+ ;__weex_module__.exports.template={
+ "type": "div",
+ "classList": function () {return ['tip', 'tip-' + (this.type)]},
+ "children": [
+ {
+ "type": "text",
+ "classList": function () {return ['tip-txt', 'tip-txt-' + (this.type)]},
+ "attr": {
+ "value": function () {return this.value}
+ }
+ }
+ ]
+ }
+ ;__weex_module__.exports.style={
+ "tip": {
+ "paddingLeft": 36,
+ "paddingRight": 36,
+ "paddingTop": 36,
+ "paddingBottom": 36,
+ "borderRadius": 10
+ },
+ "tip-txt": {
+ "fontSize": 28
+ },
+ "tip-success": {
+ "backgroundColor": "#dff0d8",
+ "borderColor": "#d6e9c6"
+ },
+ "tip-txt-success": {
+ "color": "#3c763d"
+ },
+ "tip-info": {
+ "backgroundColor": "#d9edf7",
+ "borderColor": "#bce8f1"
+ },
+ "tip-txt-info": {
+ "color": "#31708f"
+ },
+ "tip-warning": {
+ "backgroundColor": "#fcf8e3",
+ "borderColor": "#faebcc"
+ },
+ "tip-txt-warning": {
+ "color": "#8a6d3b"
+ },
+ "tip-danger": {
+ "backgroundColor": "#f2dede",
+ "borderColor": "#ebccd1"
+ },
+ "tip-txt-danger": {
+ "color": "#a94442"
+ }
+ }
+ })
+
+/***/ },
+/* 7 */
+/***/ function(module, exports) {
+
+ ;__weex_define__("@weex-component/wxc-countdown", [], function(__weex_require__, __weex_exports__, __weex_module__){
+
+ ;
+ __weex_module__.exports = {
+ data: function () {return {
+ now: 0,
+ remain: 0,
+ time: {
+ elapse: 0,
+ D: '0',
+ DD: '0',
+ h: '0',
+ hh: '00',
+ H: '0',
+ HH: '0',
+ m: '0',
+ mm: '00',
+ M: '0',
+ MM: '0',
+ s: '0',
+ ss: '00',
+ S: '0',
+ SS: '0'
+ },
+ outofview: false
+ }},
+ ready: function() {
+ if (this.remain <= 0) {
+ return;
+ }
+ // this.isWeb = this.$getConfig().env.platform === 'Web';
+ this.now = Date.now();
+ this.nextTick();
+ },
+ methods: {
+ nextTick: function() {
+ if (this.outofview) {
+ setTimeout(this.nextTick.bind(this), 1000);
+ } else {
+ this.time.elapse = parseInt((Date.now() - this.now) / 1000);
+
+ if (this.calc()) {
+ this.$emit('tick', Object.assign({}, this.time));
+ setTimeout(this.nextTick.bind(this), 1000);
+ } else {
+ this.$emit('alarm', Object.assign({}, this.time));
+ }
+ this._app.updateActions();
+ }
+ },
+ format: function(str) {
+ if (str.length >= 2) {
+ return str;
+ } else {
+ return '0' + str;
+ }
+ },
+ calc: function() {
+ var remain = this.remain - this.time.elapse;
+ if (remain < 0) {
+ remain = 0;
+ }
+ this.time.D = String(parseInt(remain / 86400));
+ this.time.DD = this.format(this.time.D);
+ this.time.h = String(parseInt((remain - parseInt(this.time.D) * 86400) / 3600));
+ this.time.hh = this.format(this.time.h);
+ this.time.H = String(parseInt(remain / 3600));
+ this.time.HH = this.format(this.time.H);
+ this.time.m = String(parseInt((remain - parseInt(this.time.H) * 3600) / 60));
+ this.time.mm = this.format(this.time.m);
+ this.time.M = String(parseInt(remain / 60));
+ this.time.MM = this.format(this.time.M);
+ this.time.s = String(remain - parseInt(this.time.M) * 60);
+ this.time.ss = this.format(this.time.s);
+ this.time.S = String(remain);
+ this.time.SS = this.format(this.time.S);
+ // console.log(remain, this.D, this.h, this.hh, this.H, this.HH, this.m, this.MM, this.s, this.ss, this.S, this.SS);
+ return remain > 0;
+ },
+ appeared: function() {
+ this.outofview = false;
+ },
+ disappeared: function() {
+ this.outofview = true;
+ }
+ }
+ }
+
+ ;__weex_module__.exports.template={
+ "type": "div",
+ "style": {
+ "overflow": "hidden",
+ "flexDirection": "row"
+ },
+ "events": {
+ "appear": "appeared",
+ "disappear": "disappeared"
+ },
+ "children": [
+ {
+ "type": "content"
+ }
+ ]
+ }
+ ;__weex_module__.exports.style={
+ "wrap": {
+ "overflow": "hidden"
+ }
+ }
+ })
+
+/***/ },
+/* 8 */
+/***/ function(module, exports) {
+
+ ;__weex_define__("@weex-component/wxc-marquee", [], function(__weex_require__, __weex_exports__, __weex_module__){
+
+ ;
+ __weex_module__.exports = {
+ data: function () {return {
+ step: 0,
+ count: 0,
+ index: 1,
+ duration: 0,
+ interval: 0,
+ outofview: false
+ }},
+ ready: function () {
+ if (this.interval > 0
+ && this.step > 0
+ && this.duration > 0) {
+ this.nextTick();
+ }
+ },
+ methods: {
+ nextTick: function() {
+ var self = this;
+ if (this.outofview) {
+ setTimeout(self.nextTick.bind(self), self.interval);
+ } else {
+ setTimeout(function() {
+ self.animation(self.nextTick.bind(self));
+ }, self.interval);
+ }
+ },
+ animation: function(cb) {
+ var self = this;
+ var offset = -self.step * self.index;
+ var $animation = __weex_require__('@weex-module/animation');
+ $animation.transition(this.$el('anim'), {
+ styles: {
+ transform: 'translateY(' + String(offset) + 'px) translateZ(0)'
+ },
+ timingFunction: 'ease',
+ duration: self.duration
+ }, function() {
+ self.index = (self.index + 1) % (self.count);
+ self.$emit('change', {
+ index: self.index,
+ count: self.count
+ });
+ cb && cb();
+ });
+ },
+ appeared: function() {
+ this.outofview = false;
+ },
+ disappeared: function() {
+ this.outofview = true;
+ }
+ }
+ }
+
+ ;__weex_module__.exports.template={
+ "type": "div",
+ "classList": [
+ "wrap"
+ ],
+ "events": {
+ "appear": "appeared",
+ "disappear": "disappeared"
+ },
+ "children": [
+ {
+ "type": "div",
+ "id": "anim",
+ "classList": [
+ "anim"
+ ],
+ "children": [
+ {
+ "type": "content"
+ }
+ ]
+ }
+ ]
+ }
+ ;__weex_module__.exports.style={
+ "wrap": {
+ "overflow": "hidden",
+ "position": "relative"
+ },
+ "anim": {
+ "flexDirection": "column",
+ "position": "absolute",
+ "transform": "translateY(0) translateZ(0)"
+ }
+ }
+ })
+
+/***/ },
+/* 9 */
+/***/ function(module, exports) {
+
+ ;__weex_define__("@weex-component/wxc-navbar", [], function(__weex_require__, __weex_exports__, __weex_module__){
+
+ ;
+ __weex_module__.exports = {
+ data: function () {return {
+ dataRole: 'navbar',
+
+ //\u5bfc\u822a\u6761\u80cc\u666f\u8272
+ backgroundColor: 'black',
+
+ //\u5bfc\u822a\u6761\u9ad8\u5ea6
+ height: 88,
+
+ //\u5bfc\u822a\u6761\u6807\u9898
+ title: "",
+
+ //\u5bfc\u822a\u6761\u6807\u9898\u989c\u8272
+ titleColor: 'black',
+
+ //\u53f3\u4fa7\u6309\u94ae\u56fe\u7247
+ rightItemSrc: '',
+
+ //\u53f3\u4fa7\u6309\u94ae\u6807\u9898
+ rightItemTitle: '',
+
+ //\u53f3\u4fa7\u6309\u94ae\u6807\u9898\u989c\u8272
+ rightItemColor: 'black',
+
+ //\u5de6\u4fa7\u6309\u94ae\u56fe\u7247
+ leftItemSrc: '',
+
+ //\u5de6\u4fa7\u6309\u94ae\u6807\u9898
+ leftItemTitle: '',
+
+ //\u5de6\u4fa7\u6309\u94ae\u989c\u8272
+ leftItemColor: 'black',
+ }},
+ methods: {
+ onclickrightitem: function (e) {
+ this.$dispatch('naviBar.rightItem.click', {});
+ },
+ onclickleftitem: function (e) {
+ this.$dispatch('naviBar.leftItem.click', {});
+ }
+ }
+ }
+
+ ;__weex_module__.exports.template={
+ "type": "div",
+ "classList": [
+ "container"
+ ],
+ "style": {
+ "height": function () {return this.height},
+ "backgroundColor": function () {return this.backgroundColor}
+ },
+ "attr": {
+ "dataRole": function () {return this.dataRole}
+ },
+ "children": [
+ {
+ "type": "text",
+ "classList": [
+ "right-text"
+ ],
+ "style": {
+ "color": function () {return this.rightItemColor}
+ },
+ "attr": {
+ "naviItemPosition": "right",
+ "value": function () {return this.rightItemTitle}
+ },
+ "shown": function () {return !this.rightItemSrc},
+ "events": {
+ "click": "onclickrigthitem"
+ }
+ },
+ {
+ "type": "image",
+ "classList": [
+ "right-image"
+ ],
+ "attr": {
+ "naviItemPosition": "right",
+ "src": function () {return this.rightItemSrc}
+ },
+ "shown": function () {return this.rightItemSrc},
+ "events": {
+ "click": "onclickrightitem"
+ }
+ },
+ {
+ "type": "text",
+ "classList": [
+ "left-text"
+ ],
+ "style": {
+ "color": function () {return this.leftItemColor}
+ },
+ "attr": {
+ "naviItemPosition": "left",
+ "value": function () {return this.leftItemTitle}
+ },
+ "shown": function () {return !this.leftItemSrc},
+ "events": {
+ "click": "onclickleftitem"
+ }
+ },
+ {
+ "type": "image",
+ "classList": [
+ "left-image"
+ ],
+ "attr": {
+ "naviItemPosition": "left",
+ "src": function () {return this.leftItemSrc}
+ },
+ "shown": function () {return this.leftItemSrc},
+ "events": {
+ "click": "onclickleftitem"
+ }
+ },
+ {
+ "type": "text",
+ "classList": [
+ "center-text"
+ ],
+ "style": {
+ "color": function () {return this.titleColor}
+ },
+ "attr": {
+ "naviItemPosition": "center",
+ "value": function () {return this.title}
+ }
+ }
+ ]
+ }
+ ;__weex_module__.exports.style={
+ "container": {
+ "flexDirection": "row",
+ "position": "fixed",
+ "top": 0,
+ "left": 0,
+ "right": 0,
+ "width": 750
+ },
+ "right-text": {
+ "position": "absolute",
+ "bottom": 28,
+ "right": 32,
+ "textAlign": "right",
+ "fontSize": 32,
+ "fontFamily": "'Open Sans', sans-serif"
+ },
+ "left-text": {
+ "position": "absolute",
+ "bottom": 28,
+ "left": 32,
+ "textAlign": "left",
+ "fontSize": 32,
+ "fontFamily": "'Open Sans', sans-serif"
+ },
+ "center-text": {
+ "position": "absolute",
+ "bottom": 25,
+ "left": 172,
+ "right": 172,
+ "textAlign": "center",
+ "fontSize": 36,
+ "fontWeight": "bold"
+ },
+ "left-image": {
+ "position": "absolute",
+ "bottom": 20,
+ "left": 28,
+ "width": 50,
+ "height": 50
+ },
+ "right-image": {
+ "position": "absolute",
+ "bottom": 20,
+ "right": 28,
+ "width": 50,
+ "height": 50
+ }
+ }
+ })
+
+/***/ },
+/* 10 */
+/***/ function(module, exports, __webpack_require__) {
+
+ ;__weex_define__("@weex-component/wxc-navpage", [], function(__weex_require__, __weex_exports__, __weex_module__){
+ __webpack_require__(9);
+
+ ;__weex_module__.exports.template={
+ "type": "div",
+ "classList": [
+ "wrapper"
+ ],
+ "children": [
+ {
+ "type": "wxc-navbar",
+ "attr": {
+ "dataRole": function () {return this.dataRole},
+ "height": function () {return this.height},
+ "backgroundColor": function () {return this.backgroundColor},
+ "title": function () {return this.title},
+ "titleColor": function () {return this.titleColor},
+ "leftItemSrc": function () {return this.leftItemSrc},
+ "leftItemTitle": function () {return this.leftItemTitle},
+ "leftItemColor": function () {return this.leftItemColor},
+ "rightItemSrc": function () {return this.rightItemSrc},
+ "rightItemTitle": function () {return this.rightItemTitle},
+ "rightItemColor": function () {return this.rightItemColor}
+ }
+ },
+ {
+ "type": "div",
+ "classList": [
+ "wrapper"
+ ],
+ "style": {
+ "marginTop": function () {return this.height}
+ },
+ "children": [
+ {
+ "type": "content"
+ }
+ ]
+ }
+ ]
+ }
+ ;__weex_module__.exports.style={
+ "wrapper": {
+ "position": "absolute",
+ "top": 0,
+ "left": 0,
+ "right": 0,
+ "bottom": 0,
+ "width": 750
+ }
+ }
+ })
+
+/***/ },
+/* 11 */
+/***/ function(module, exports, __webpack_require__) {
+
+ ;__weex_define__("@weex-component/wxc-tabbar", [], function(__weex_require__, __weex_exports__, __weex_module__){
+ __webpack_require__(12);
+
+ ;
+ __weex_module__.exports = {
+ data: function () {return {
+ tabItems: [ ],
+ selectedIndex: 0,
+ selectedColor: '#ff0000',
+ unselectedColor: '#000000',
+ }},
+ created: function () {
+ this.selected(this.selectedIndex);
+
+ this.$on('tabItem.onClick',function(e){
+ var detail= e.detail;
+ this.selectedIndex = detail.index;
+ this.selected(detail.index);
+
+ var params = {
+ index: detail.index
+ };
+ this.$dispatch('tabBar.onClick', params);
+ });
+ },
+ methods: {
+ selected: function(index) {
+ for(var i = 0; i < this.tabItems.length; i++) {
+ var tabItem = this.tabItems[i];
+ if(i == index){
+ tabItem.icon = tabItem.selectedImage;
+ tabItem.titleColor = this.selectedColor;
+ tabItem.visibility = 'visible';
+ }
+ else {
+ tabItem.icon = tabItem.image;
+ tabItem.titleColor = this.unselectedColor;
+ tabItem.visibility = 'hidden';
+ }
+ }
+ },
+ }
+ }
+
+ ;__weex_module__.exports.template={
+ "type": "div",
+ "classList": [
+ "wrapper"
+ ],
+ "children": [
+ {
+ "type": "embed",
+ "classList": [
+ "content"
+ ],
+ "style": {
+ "visibility": function () {return this.visibility}
+ },
+ "repeat": function () {return this.tabItems},
+ "attr": {
+ "src": function () {return this.src},
+ "type": "weex"
+ }
+ },
+ {
+ "type": "div",
+ "classList": [
+ "tabbar"
+ ],
+ "append": "tree",
+ "children": [
+ {
+ "type": "wxc-tabitem",
+ "repeat": function () {return this.tabItems},
+ "attr": {
+ "index": function () {return this.index},
+ "icon": function () {return this.icon},
+ "title": function () {return this.title},
+ "titleColor": function () {return this.titleColor}
+ }
+ }
+ ]
+ }
+ ]
+ }
+ ;__weex_module__.exports.style={
+ "wrapper": {
+ "width": 750,
+ "position": "absolute",
+ "top": 0,
+ "left": 0,
+ "right": 0,
+ "bottom": 0
+ },
+ "content": {
+ "position": "absolute",
+ "top": 0,
+ "left": 0,
+ "right": 0,
+ "bottom": 0,
+ "marginTop": 0,
+ "marginBottom": 88
+ },
+ "tabbar": {
+ "flexDirection": "row",
+ "position": "fixed",
+ "bottom": 0,
+ "left": 0,
+ "right": 0,
+ "height": 88
+ }
+ }
+ })
+
+/***/ },
+/* 12 */
+/***/ function(module, exports) {
+
+ ;__weex_define__("@weex-component/wxc-tabitem", [], function(__weex_require__, __weex_exports__, __weex_module__){
+
+ ;
+ __weex_module__.exports = {
+ data: function () {return {
+ index: 0,
+ title: '',
+ titleColor: '#000000',
+ icon: '',
+ backgroundColor: '#ffffff',
+ }},
+ methods: {
+ onclickitem: function (e) {
+ var vm = this;
+ var params = {
+ index: vm.index
+ };
+ vm.$dispatch('tabItem.onClick', params);
+ }
+ }
+ }
+
+ ;__weex_module__.exports.template={
+ "type": "div",
+ "classList": [
+ "container"
+ ],
+ "style": {
+ "backgroundColor": function () {return this.backgroundColor}
+ },
+ "events": {
+ "click": "onclickitem"
+ },
+ "children": [
+ {
+ "type": "image",
+ "classList": [
+ "top-line"
+ ],
+ "attr": {
+ "src": "http://gtms03.alicdn.com/tps/i3/TB1mdsiMpXXXXXpXXXXNw4JIXXX-640-4.png"
+ }
+ },
+ {
+ "type": "image",
+ "classList": [
+ "tab-icon"
+ ],
+ "attr": {
+ "src": function () {return this.icon}
+ }
+ },
+ {
+ "type": "text",
+ "classList": [
+ "tab-text"
+ ],
+ "style": {
+ "color": function () {return this.titleColor}
+ },
+ "attr": {
+ "value": function () {return this.title}
+ }
+ }
+ ]
+ }
+ ;__weex_module__.exports.style={
+ "container": {
+ "flex": 1,
+ "flexDirection": "column",
+ "alignItems": "center",
+ "justifyContent": "center",
+ "height": 88
+ },
+ "top-line": {
+ "position": "absolute",
+ "top": 0,
+ "left": 0,
+ "right": 0,
+ "height": 2
+ },
+ "tab-icon": {
+ "marginTop": 5,
+ "width": 40,
+ "height": 40
+ },
+ "tab-text": {
+ "marginTop": 5,
+ "textAlign": "center",
+ "fontSize": 20
+ }
+ }
+ })
+
+/***/ }
+/******/ ]);
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/f4fd0820/ios/playground/bundlejs/showcase/new-fashion/banner.js
----------------------------------------------------------------------
diff --git a/ios/playground/bundlejs/showcase/new-fashion/banner.js b/ios/playground/bundlejs/showcase/new-fashion/banner.js
new file mode 100644
index 0000000..c02c298
--- /dev/null
+++ b/ios/playground/bundlejs/showcase/new-fashion/banner.js
@@ -0,0 +1,92 @@
+/******/ (function(modules) { // webpackBootstrap
+/******/ // The module cache
+/******/ var installedModules = {};
+
+/******/ // The require function
+/******/ function __webpack_require__(moduleId) {
+
+/******/ // Check if module is in cache
+/******/ if(installedModules[moduleId])
+/******/ return installedModules[moduleId].exports;
+
+/******/ // Create a new module (and put it into the cache)
+/******/ var module = installedModules[moduleId] = {
+/******/ exports: {},
+/******/ id: moduleId,
+/******/ loaded: false
+/******/ };
+
+/******/ // Execute the module function
+/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
+
+/******/ // Flag the module as loaded
+/******/ module.loaded = true;
+
+/******/ // Return the exports of the module
+/******/ return module.exports;
+/******/ }
+
+
+/******/ // expose the modules object (__webpack_modules__)
+/******/ __webpack_require__.m = modules;
+
+/******/ // expose the module cache
+/******/ __webpack_require__.c = installedModules;
+
+/******/ // __webpack_public_path__
+/******/ __webpack_require__.p = "";
+
+/******/ // Load entry module and return exports
+/******/ return __webpack_require__(0);
+/******/ })
+/************************************************************************/
+/******/ ([
+/* 0 */
+/***/ function(module, exports) {
+
+ ;__weex_define__("@weex-component/182cfd86f4ae8de2b3d0ea308cf05b5f", [], function(__weex_require__, __weex_exports__, __weex_module__){
+
+ ;
+ __weex_module__.exports = {
+ data: function () {return {
+ quality: 'normal',
+ width: 0,
+ height: 0,
+ src: '',
+ href: '',
+ spmc:0,
+ spmd:0
+ }},
+ methods: {
+ ready: function () {
+ },
+ _clickHandler: function () {
+ this.$call('modal', 'toast', {
+ message: 'click',
+ duration: 1
+ });
+ }
+ }
+ };
+
+ ;__weex_module__.exports.template={
+ "type": "image",
+ "style": {
+ "width": function () {return this.width},
+ "height": function () {return this.height}
+ },
+ "attr": {
+ "src": function () {return this.src},
+ "imageQuality": function () {return this.quality}
+ },
+ "events": {
+ "click": "_clickHandler"
+ }
+ }
+ })
+ ;__weex_bootstrap__("@weex-component/182cfd86f4ae8de2b3d0ea308cf05b5f", {
+ "transformerVersion": "0.3.1"
+ },undefined)
+
+/***/ }
+/******/ ]);
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/f4fd0820/ios/playground/bundlejs/showcase/new-fashion/banners.js
----------------------------------------------------------------------
diff --git a/ios/playground/bundlejs/showcase/new-fashion/banners.js b/ios/playground/bundlejs/showcase/new-fashion/banners.js
new file mode 100644
index 0000000..2a88fa2
--- /dev/null
+++ b/ios/playground/bundlejs/showcase/new-fashion/banners.js
@@ -0,0 +1,188 @@
+/******/ (function(modules) { // webpackBootstrap
+/******/ // The module cache
+/******/ var installedModules = {};
+
+/******/ // The require function
+/******/ function __webpack_require__(moduleId) {
+
+/******/ // Check if module is in cache
+/******/ if(installedModules[moduleId])
+/******/ return installedModules[moduleId].exports;
+
+/******/ // Create a new module (and put it into the cache)
+/******/ var module = installedModules[moduleId] = {
+/******/ exports: {},
+/******/ id: moduleId,
+/******/ loaded: false
+/******/ };
+
+/******/ // Execute the module function
+/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
+
+/******/ // Flag the module as loaded
+/******/ module.loaded = true;
+
+/******/ // Return the exports of the module
+/******/ return module.exports;
+/******/ }
+
+
+/******/ // expose the modules object (__webpack_modules__)
+/******/ __webpack_require__.m = modules;
+
+/******/ // expose the module cache
+/******/ __webpack_require__.c = installedModules;
+
+/******/ // __webpack_public_path__
+/******/ __webpack_require__.p = "";
+
+/******/ // Load entry module and return exports
+/******/ return __webpack_require__(0);
+/******/ })
+/************************************************************************/
+/******/ ({
+
+/***/ 0:
+/***/ function(module, exports, __webpack_require__) {
+
+ ;__weex_define__("@weex-component/b7cd3d95d7e22a543af40cfb7441e8c6", [], function(__weex_require__, __weex_exports__, __weex_module__){
+ __webpack_require__(17);
+
+ ;
+ __weex_module__.exports = {
+ data: function () {return {
+ space: 0,
+ width: 0,
+ height: 0,
+ spmc:0,
+ spmdprefix:'',
+ ds: []
+ }},
+ methods: {
+ ready: function () {
+ var self = this;
+ var ds = self.ds;
+ var length = ds.length;
+ for (var i = 0; i < length; i++) {
+ var item = ds[i];
+ item.index = i;
+ item.space = (i % length === 0) ? 0 : self.space;
+ }
+ }
+ }
+ };
+
+ ;__weex_module__.exports.template={
+ "type": "container",
+ "children": [
+ {
+ "type": "container",
+ "shown": function () {return this.direction==='row'},
+ "style": {
+ "flexDirection": "row"
+ },
+ "children": [
+ {
+ "type": "container",
+ "repeat": function () {return this.ds},
+ "style": {
+ "width": function () {return this.width},
+ "height": function () {return this.height},
+ "marginLeft": function () {return this.space}
+ },
+ "children": [
+ {
+ "type": "banner",
+ "attr": {
+ "width": function () {return this.width},
+ "height": function () {return this.height},
+ "src": function () {return this.img},
+ "href": function () {return this.url}
+ }
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "container",
+ "shown": function () {return this.direction==='column'},
+ "children": [
+ {
+ "type": "container",
+ "repeat": function () {return this.ds},
+ "style": {
+ "width": function () {return this.width},
+ "height": function () {return this.height},
+ "marginTop": function () {return this.space}
+ },
+ "children": [
+ {
+ "type": "banner",
+ "attr": {
+ "width": function () {return this.width},
+ "height": function () {return this.height},
+ "src": function () {return this.img},
+ "href": function () {return this.url}
+ }
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ })
+ ;__weex_bootstrap__("@weex-component/b7cd3d95d7e22a543af40cfb7441e8c6", {
+ "transformerVersion": "0.3.1"
+ },undefined)
+
+/***/ },
+
+/***/ 17:
+/***/ function(module, exports) {
+
+ ;__weex_define__("@weex-component/banner", [], function(__weex_require__, __weex_exports__, __weex_module__){
+
+ ;
+ __weex_module__.exports = {
+ data: function () {return {
+ quality: 'normal',
+ width: 0,
+ height: 0,
+ src: '',
+ href: '',
+ spmc:0,
+ spmd:0
+ }},
+ methods: {
+ ready: function () {
+ },
+ _clickHandler: function () {
+ this.$call('modal', 'toast', {
+ message: 'click',
+ duration: 1
+ });
+ }
+ }
+ };
+
+ ;__weex_module__.exports.template={
+ "type": "image",
+ "style": {
+ "width": function () {return this.width},
+ "height": function () {return this.height}
+ },
+ "attr": {
+ "src": function () {return this.src},
+ "imageQuality": function () {return this.quality}
+ },
+ "events": {
+ "click": "_clickHandler"
+ }
+ }
+ })
+
+/***/ }
+
+/******/ });
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/f4fd0820/ios/playground/bundlejs/showcase/new-fashion/brand.js
----------------------------------------------------------------------
diff --git a/ios/playground/bundlejs/showcase/new-fashion/brand.js b/ios/playground/bundlejs/showcase/new-fashion/brand.js
new file mode 100644
index 0000000..6e32ebc
--- /dev/null
+++ b/ios/playground/bundlejs/showcase/new-fashion/brand.js
@@ -0,0 +1,278 @@
+/******/ (function(modules) { // webpackBootstrap
+/******/ // The module cache
+/******/ var installedModules = {};
+
+/******/ // The require function
+/******/ function __webpack_require__(moduleId) {
+
+/******/ // Check if module is in cache
+/******/ if(installedModules[moduleId])
+/******/ return installedModules[moduleId].exports;
+
+/******/ // Create a new module (and put it into the cache)
+/******/ var module = installedModules[moduleId] = {
+/******/ exports: {},
+/******/ id: moduleId,
+/******/ loaded: false
+/******/ };
+
+/******/ // Execute the module function
+/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
+
+/******/ // Flag the module as loaded
+/******/ module.loaded = true;
+
+/******/ // Return the exports of the module
+/******/ return module.exports;
+/******/ }
+
+
+/******/ // expose the modules object (__webpack_modules__)
+/******/ __webpack_require__.m = modules;
+
+/******/ // expose the module cache
+/******/ __webpack_require__.c = installedModules;
+
+/******/ // __webpack_public_path__
+/******/ __webpack_require__.p = "";
+
+/******/ // Load entry module and return exports
+/******/ return __webpack_require__(0);
+/******/ })
+/************************************************************************/
+/******/ ({
+
+/***/ 0:
+/***/ function(module, exports, __webpack_require__) {
+
+ ;__weex_define__("@weex-component/c913f50614100cbae8ac0e99f5f32376", [], function(__weex_require__, __weex_exports__, __weex_module__){
+ __webpack_require__(18);
+
+ ;
+ __weex_module__.exports = {
+ data: function () {return {
+ NUMBER_742: 742,
+ NUMBER_230: 230,
+ NUMBER_4: 4
+ }},
+ methods: {
+ ready: function () {
+ var self = this;
+ self._randomBrand();
+ },
+ _randomBrand: function () {
+ var self = this;
+ var bannerItems = self.ds.bannerItems;
+ bannerItems = bannerItems.sort(function(){
+ return Math.random()-0.5;
+ });
+ self.bannerItems = bannerItems.slice(0,8);
+ for(var i=0;i<bannerItems.length;i++){
+ var item = bannerItems[i];
+ if(i%2===0){
+ item.img = item.leftImg;
+ item.url = item.rightUrl;
+ }else{
+ item.img = item.rightImg;
+ item.url = item.rightUrl;
+ }
+ }
+ }
+ }
+ }
+
+ ;__weex_module__.exports.template={
+ "type": "container",
+ "classList": [
+ "container"
+ ],
+ "children": [
+ {
+ "type": "image",
+ "shown": function () {return this.ds.floorTitle},
+ "classList": [
+ "title"
+ ],
+ "attr": {
+ "src": function () {return this.ds.floorTitle}
+ }
+ },
+ {
+ "type": "container",
+ "style": {
+ "marginLeft": 4,
+ "marginRight": 4
+ },
+ "children": [
+ {
+ "type": "banners",
+ "attr": {
+ "ds": function () {return this.bannerItems},
+ "direction": "column",
+ "width": function () {return this.NUMBER_742},
+ "height": function () {return this.NUMBER_230},
+ "space": function () {return this.NUMBER_4}
+ }
+ }
+ ]
+ }
+ ]
+ }
+ ;__weex_module__.exports.style={
+ "title": {
+ "width": 750,
+ "height": 100
+ },
+ "container": {
+ "marginBottom": 4,
+ "backgroundColor": "#C0BABC"
+ }
+ }
+ })
+ ;__weex_bootstrap__("@weex-component/c913f50614100cbae8ac0e99f5f32376", {
+ "transformerVersion": "0.3.1"
+ },undefined)
+
+/***/ },
+
+/***/ 17:
+/***/ function(module, exports) {
+
+ ;__weex_define__("@weex-component/banner", [], function(__weex_require__, __weex_exports__, __weex_module__){
+
+ ;
+ __weex_module__.exports = {
+ data: function () {return {
+ quality: 'normal',
+ width: 0,
+ height: 0,
+ src: '',
+ href: '',
+ spmc:0,
+ spmd:0
+ }},
+ methods: {
+ ready: function () {
+ },
+ _clickHandler: function () {
+ this.$call('modal', 'toast', {
+ message: 'click',
+ duration: 1
+ });
+ }
+ }
+ };
+
+ ;__weex_module__.exports.template={
+ "type": "image",
+ "style": {
+ "width": function () {return this.width},
+ "height": function () {return this.height}
+ },
+ "attr": {
+ "src": function () {return this.src},
+ "imageQuality": function () {return this.quality}
+ },
+ "events": {
+ "click": "_clickHandler"
+ }
+ }
+ })
+
+/***/ },
+
+/***/ 18:
+/***/ function(module, exports, __webpack_require__) {
+
+ ;__weex_define__("@weex-component/banners", [], function(__weex_require__, __weex_exports__, __weex_module__){
+ __webpack_require__(17);
+
+ ;
+ __weex_module__.exports = {
+ data: function () {return {
+ space: 0,
+ width: 0,
+ height: 0,
+ spmc:0,
+ spmdprefix:'',
+ ds: []
+ }},
+ methods: {
+ ready: function () {
+ var self = this;
+ var ds = self.ds;
+ var length = ds.length;
+ for (var i = 0; i < length; i++) {
+ var item = ds[i];
+ item.index = i;
+ item.space = (i % length === 0) ? 0 : self.space;
+ }
+ }
+ }
+ };
+
+ ;__weex_module__.exports.template={
+ "type": "container",
+ "children": [
+ {
+ "type": "container",
+ "shown": function () {return this.direction==='row'},
+ "style": {
+ "flexDirection": "row"
+ },
+ "children": [
+ {
+ "type": "container",
+ "repeat": function () {return this.ds},
+ "style": {
+ "width": function () {return this.width},
+ "height": function () {return this.height},
+ "marginLeft": function () {return this.space}
+ },
+ "children": [
+ {
+ "type": "banner",
+ "attr": {
+ "width": function () {return this.width},
+ "height": function () {return this.height},
+ "src": function () {return this.img},
+ "href": function () {return this.url}
+ }
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "container",
+ "shown": function () {return this.direction==='column'},
+ "children": [
+ {
+ "type": "container",
+ "repeat": function () {return this.ds},
+ "style": {
+ "width": function () {return this.width},
+ "height": function () {return this.height},
+ "marginTop": function () {return this.space}
+ },
+ "children": [
+ {
+ "type": "banner",
+ "attr": {
+ "width": function () {return this.width},
+ "height": function () {return this.height},
+ "src": function () {return this.img},
+ "href": function () {return this.url}
+ }
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ })
+
+/***/ }
+
+/******/ });
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/f4fd0820/ios/playground/bundlejs/showcase/new-fashion/category.js
----------------------------------------------------------------------
diff --git a/ios/playground/bundlejs/showcase/new-fashion/category.js b/ios/playground/bundlejs/showcase/new-fashion/category.js
new file mode 100644
index 0000000..2d28e84
--- /dev/null
+++ b/ios/playground/bundlejs/showcase/new-fashion/category.js
@@ -0,0 +1,750 @@
+/******/ (function(modules) { // webpackBootstrap
+/******/ // The module cache
+/******/ var installedModules = {};
+
+/******/ // The require function
+/******/ function __webpack_require__(moduleId) {
+
+/******/ // Check if module is in cache
+/******/ if(installedModules[moduleId])
+/******/ return installedModules[moduleId].exports;
+
+/******/ // Create a new module (and put it into the cache)
+/******/ var module = installedModules[moduleId] = {
+/******/ exports: {},
+/******/ id: moduleId,
+/******/ loaded: false
+/******/ };
+
+/******/ // Execute the module function
+/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
+
+/******/ // Flag the module as loaded
+/******/ module.loaded = true;
+
+/******/ // Return the exports of the module
+/******/ return module.exports;
+/******/ }
+
+
+/******/ // expose the modules object (__webpack_modules__)
+/******/ __webpack_require__.m = modules;
+
+/******/ // expose the module cache
+/******/ __webpack_require__.c = installedModules;
+
+/******/ // __webpack_public_path__
+/******/ __webpack_require__.p = "";
+
+/******/ // Load entry module and return exports
+/******/ return __webpack_require__(0);
+/******/ })
+/************************************************************************/
+/******/ ({
+
+/***/ 0:
+/***/ function(module, exports, __webpack_require__) {
+
+ ;__weex_define__("@weex-component/5431263137f2dd27df2998658c228e48", [], function(__weex_require__, __weex_exports__, __weex_module__){
+ __webpack_require__(17);
+
+ ;
+ __weex_module__.exports = {
+ data: function () {return {
+ NUMBER_248: 248,
+ NUMBER_155: 155,
+ NUMBER_373: 373,
+ NUMBER_237: 237,
+ NUMBER_186: 186,
+ NUMBER_208: 208,
+ NUMBER_750: 750,
+ subItemBg: '//gw.alicdn.com/tps/TB1QzUfLVXXXXaOXVXXXXXXXXXX-248-86.jpg',
+ items: [],
+ subItems: []
+ }},
+ methods: {
+ ready: function () {
+ var self = this;
+ self._loadData();
+ },
+
+ _loadData: function () {
+ var self = this;
+ var content = {
+ "main": [{
+ "shopList": [{
+ "id": "619123122",
+ "picUrl": "//img.alicdn.com/tps/i1/TB1Cl5MLVXXXXXTaXXXSutbFXXX.jpg",
+ "finalScore": "0.884765209440857",
+ "shopUrl": "http://liangpinpuzi.tmall.com/campaign-3735-7.htm",
+ "entityType": "SHOP",
+ "brandId": "7724367"
+ }, {
+ "id": "880734502",
+ "picUrl": "//img.alicdn.com/tps/i1/TB1HN2XLVXXXXbkXFXXSutbFXXX.jpg",
+ "finalScore": "0.8822246866512714",
+ "shopUrl": "http://sanzhisongshu.tmall.com/campaign-3735-7.htm",
+ "entityType": "SHOP",
+ "brandId": "147280915"
+ }, {
+ "id": "392147177",
+ "picUrl": "//img.alicdn.com/tps/i1/TB1yq6dLVXXXXbXXpXXSutbFXXX.jpg",
+ "finalScore": "0.8805854724243631",
+ "shopUrl": "http://zhouheiya.tmall.com/campaign-3735-6.htm",
+ "entityType": "SHOP",
+ "brandId": "111496"
+ }, {
+ "id": "2081058060",
+ "picUrl": "//img.alicdn.com/tps/i1/TB1w4jxLVXXXXaxXXXXtKXbFXXX.gif",
+ "finalScore": "0.8640439551049249",
+ "shopUrl": "http://rongxintang.tmall.com/campaign-3735-6.htm",
+ "entityType": "SHOP",
+ "brandId": "8709890"
+ }],
+ "finalScore": "4.657333333333334",
+ "industryUrl": null,
+ "entityType": "OTHER",
+ "colour": "#fff5a3",
+ "industryTitle": null,
+ "bannerUrl": "//pages.tmall.com/wow/act/15617/newfood?abbucket=_AB-M1011_B14&acm=03654.1003.1.735362&aldid=KXPpnvEH&abtest=_AB-LR1011-PR1011&scm=1003.1.03654.OTHER_12_735362&pos=1",
+ "leftBannerImg": "http://img.alicdn.com/tps/i1/TB1LHh4MXXXXXbsXpXXeWjm2pXX-750-240.jpg",
+ "_pos_": "1",
+ "industryBenefit": null,
+ "industryId": "12",
+ "industryImg": null,
+ "rightBannerImg": "//img.alicdn.com/tps/i4/TB1wshUMXXXXXXaXVXXeWjm2pXX-750-240.jpg"
+ }, {
+ "shopList": [{
+ "id": "520557274",
+ "picUrl": "//img.alicdn.com/tps/i1/TB1aMjXLVXXXXbUaXXXSutbFXXX.jpg",
+ "finalScore": "0.8986382989845325",
+ "shopUrl": "http://newbalance.tmall.com/campaign-3735-20.htm",
+ "entityType": "SHOP",
+ "brandId": "20584"
+ }, {
+ "id": "746866993",
+ "picUrl": "//img.alicdn.com/tps/i1/TB1pXG9LVXXXXaLXFXXSutbFXXX.jpg",
+ "finalScore": "0.8917855242977327",
+ "shopUrl": "http://vans.tmall.com/campaign-3735-19.htm",
+ "entityType": "SHOP",
+ "brandId": "29529"
+ }, {
+ "id": "1612713147",
+ "picUrl": "//img.alicdn.com/tps/i1/TB1jHfXLVXXXXXPXFXXSutbFXXX.jpg",
+ "finalScore": "0.8895943606442631",
+ "shopUrl": "http://dcshoecousa.tmall.com/campaign-3735-8.htm",
+ "entityType": "SHOP",
+ "brandId": "3851662"
+ }, {
+ "id": "2379251418",
+ "picUrl": "//img.alicdn.com/tps/i1/TB1sbLlLVXXXXbeXXXXSutbFXXX.jpg",
+ "finalScore": "0.8881539668874383",
+ "shopUrl": "http://baijinydhw.tmall.com/campaign-3735-2.htm",
+ "entityType": "SHOP",
+ "brandId": "20579"
+ }],
+ "finalScore": "4.545333333333334",
+ "industryUrl": null,
+ "entityType": "OTHER",
+ "colour": "#cbdbfe",
+ "industryTitle": null,
+ "bannerUrl": "//pages.tmall.com/wow/act/15617/ydhw?abbucket=_AB-M1011_B14&acm=03654.1003.1.735362&aldid=KXPpnvEH&abtest=_AB-LR1011-PR1011&scm=1003.1.03654.OTHER_8_735362&pos=2",
+ "leftBannerImg": "http://img.alicdn.com/tps/i3/TB1h4kzLVXXXXawXpXXeWjm2pXX-750-240.jpg",
+ "_pos_": "2",
+ "industryBenefit": null,
+ "industryId": "8",
+ "industryImg": null,
+ "rightBannerImg": "//img.alicdn.com/tps/i4/TB19VMjLVXXXXaeaXXXeWjm2pXX-750-240.jpg"
+ }, {
+ "shopList": [{
+ "id": "811383091",
+ "picUrl": "//img.alicdn.com/tps/i1/TB1q49ZLVXXXXaJXVXXSutbFXXX.jpg",
+ "finalScore": "0.8723682716749482",
+ "shopUrl": "http://tongrentangbj.tmall.com/campaign-3735-9.htm",
+ "entityType": "SHOP",
+ "brandId": "44652"
+ }, {
+ "id": "838914626",
+ "picUrl": "//img.alicdn.com/tps/i1/TB1GQYbLVXXXXaXXVXXSutbFXXX.jpg",
+ "finalScore": "0.5027131908086584",
+ "shopUrl": "http://jouo.tmall.com/campaign-3735-3.htm",
+ "entityType": "SHOP",
+ "brandId": "14170081"
+ }, {
+ "id": "1077716829",
+ "picUrl": "//img.alicdn.com/tps/i1/TB1rdW2LVXXXXagapXXSutbFXXX.jpg",
+ "finalScore": "0.5015387557024262",
+ "shopUrl": "http://wetcode.tmall.com/campaign-3735-14.htm",
+ "entityType": "SHOP",
+ "brandId": "3675642"
+ }, {
+ "id": "1664976033",
+ "picUrl": "//img.alicdn.com/tps/i1/TB1Q.rpLVXXXXXiXpXXSutbFXXX.jpg",
+ "finalScore": "0.5014897109669442",
+ "shopUrl": "http://hanhoohzp.tmall.com/campaign-3735-17.htm",
+ "entityType": "SHOP",
+ "brandId": "78888695"
+ }],
+ "finalScore": "4.526666666666666",
+ "industryUrl": null,
+ "entityType": "OTHER",
+ "colour": "#ffd1b6",
+ "industryTitle": null,
+ "bannerUrl": "//pages.tmall.com/wow/act/15617/getbeauty?abbucket=_AB-M1011_B14&acm=03654.1003.1.735362&aldid=KXPpnvEH&abtest=_AB-LR1011-PR1011&scm=1003.1.03654.OTHER_2_735362&pos=3",
+ "leftBannerImg": "http://img.alicdn.com/tps/i4/TB1Djt9MXXXXXanXXXXeWjm2pXX-750-240.jpg",
+ "_pos_": "3",
+ "industryBenefit": null,
+ "industryId": "2",
+ "industryImg": null,
+ "rightBannerImg": "//img.alicdn.com/tps/i3/TB1_gVQMXXXXXX9XVXXeWjm2pXX-750-240.jpg"
+ }, {
+ "shopList": [{
+ "id": "2153169655",
+ "picUrl": "//img.alicdn.com/tps/i1/TB1nlK7LVXXXXaRXFXXSutbFXXX.jpg",
+ "finalScore": "0.8820210808835905",
+ "shopUrl": "http://ctkicks.tmall.com/campaign-3735-15.htm",
+ "entityType": "SHOP",
+ "brandId": "20584"
+ }, {
+ "id": "2784101115",
+ "picUrl": "//img.alicdn.com/tps/i1/TB1RrS.LVXXXXcrXpXXSutbFXXX.jpg",
+ "finalScore": "0.5930383227012586",
+ "shopUrl": "http://tomtailor.tmall.com/campaign-3735-0.htm",
+ "entityType": "SHOP",
+ "brandId": "213474060"
+ }, {
+ "id": "2183813726",
+ "picUrl": "//img.alicdn.com/tps/i1/TB1kmS_LVXXXXaBaXXXSutbFXXX.jpg",
+ "finalScore": "0.5882558957771681",
+ "shopUrl": "http://huaiyuan.tmall.com/campaign-3735-5.htm",
+ "entityType": "SHOP",
+ "brandId": "29465"
+ }, {
+ "id": "1785908005",
+ "picUrl": "//img.alicdn.com/tps/i1/TB1dB6zLVXXXXcJXXXXSutbFXXX.jpg",
+ "finalScore": "0.5694211862124341",
+ "shopUrl": "http://axonus.tmall.com/campaign-3735-1.htm",
+ "entityType": "SHOP",
+ "brandId": "115035841"
+ }],
+ "finalScore": "4.413955555555555",
+ "industryUrl": null,
+ "entityType": "OTHER",
+ "colour": "#b9eaf2",
+ "industryTitle": null,
+ "bannerUrl": "//pages.tmall.com/wow/act/15617/guojixfs?abbucket=_AB-M1011_B14&acm=03654.1003.1.735362&aldid=KXPpnvEH&abtest=_AB-LR1011-PR1011&scm=1003.1.03654.OTHER_1_735362&pos=4",
+ "leftBannerImg": "http://img.alicdn.com/tps/i3/TB1_T7ALVXXXXXOXXXXeWjm2pXX-750-240.jpg",
+ "_pos_": "4",
+ "industryBenefit": null,
+ "industryId": "1",
+ "industryImg": null,
+ "rightBannerImg": "//img.alicdn.com/tps/i2/TB1s7koLVXXXXafXFXXeWjm2pXX-750-240.jpg"
+ }, {
+ "shopList": [{
+ "id": "2453054335",
+ "picUrl": "//img.alicdn.com/tps/i1/TB1RX_vLVXXXXchXpXXSutbFXXX.jpg",
+ "finalScore": "0.8463447899590267",
+ "shopUrl": "http://nanshizixing.tmall.com/campaign-3735-2.htm",
+ "entityType": "SHOP",
+ "brandId": "844502560"
+ }, {
+ "id": "1041773234",
+ "picUrl": "//img.alicdn.com/tps/i1/TB1Q7jpLVXXXXX8XpXXSutbFXXX.jpg",
+ "finalScore": "0.560952734503075",
+ "shopUrl": "http://dapu.tmall.com/campaign-3735-8.htm",
+ "entityType": "SHOP",
+ "brandId": "14493763"
+ }, {
+ "id": "300031438",
+ "picUrl": "//img.alicdn.com/tps/i1/TB13VC4LVXXXXarXVXXSutbFXXX.jpg",
+ "finalScore": "0.5450674634839442",
+ "shopUrl": "http://kangerxin.tmall.com/campaign-3735-10.htm",
+ "entityType": "SHOP",
+ "brandId": "3781905"
+ }, {
+ "id": "92042735",
+ "picUrl": "//img.alicdn.com/tps/i1/TB1PxYcLVXXXXasaXXXSutbFXXX.jpg",
+ "finalScore": "0.5448023228053981",
+ "shopUrl": "http://shuixing.tmall.com/campaign-3735-10.htm",
+ "entityType": "SHOP",
+ "brandId": "3685660"
+ }],
+ "finalScore": "4.13",
+ "industryUrl": null,
+ "entityType": "OTHER",
+ "colour": "#bbffe5",
+ "industryTitle": null,
+ "bannerUrl": "//pages.tmall.com/wow/act/15617/jfjs?abbucket=_AB-M1011_B14&acm=03654.1003.1.735362&aldid=KXPpnvEH&abtest=_AB-LR1011-PR1011&scm=1003.1.03654.OTHER_4_735362&pos=5",
+ "leftBannerImg": "http://img.alicdn.com/tps/i3/TB1jeoCLVXXXXcoXXXXeWjm2pXX-750-240.jpg",
+ "_pos_": "5",
+ "industryBenefit": null,
+ "industryId": "4",
+ "industryImg": null,
+ "rightBannerImg": "//img.alicdn.com/tps/i4/TB1C5.fLVXXXXb3aXXXeWjm2pXX-750-240.jpg"
+ }, {
+ "shopList": [{
+ "id": "822428555",
+ "picUrl": "//img.alicdn.com/tps/i1/TB1g46aLVXXXXcUXVXXSutbFXXX.jpg",
+ "finalScore": "0.9183458776971917",
+ "shopUrl": "http://playboyyd.tmall.com/campaign-3735-11.htm",
+ "entityType": "SHOP",
+ "brandId": "29510"
+ }, {
+ "id": "196993935",
+ "picUrl": "//img.alicdn.com/tps/i1/TB1pHG8LVXXXXbraXXXSutbFXXX.jpg",
+ "finalScore": "0.9105525246667775",
+ "shopUrl": "https://uniqlo.tmall.com/campaign-3735-56.htm",
+ "entityType": "SHOP",
+ "brandId": "29527"
+ }, {
+ "id": "505753958",
+ "picUrl": "//img.alicdn.com/tps/i1/TB1WKYyLVXXXXXHXXXXSutbFXXX.jpg",
+ "finalScore": "0.90750966370726",
+ "shopUrl": "http://bonas.tmall.com/campaign-3735-11.htm",
+ "entityType": "SHOP",
+ "brandId": "3486580"
+ }, {
+ "id": "2113823580",
+ "picUrl": "//img.alicdn.com/tps/i1/TB1itHkLVXXXXX9XFXXSutbFXXX.jpg",
+ "finalScore": "0.5900977955635289",
+ "shopUrl": "http://kafanya.tmall.com/campaign-3735-7.htm",
+ "entityType": "SHOP",
+ "brandId": "110684218"
+ }],
+ "finalScore": "4.088",
+ "industryUrl": null,
+ "entityType": "OTHER",
+ "colour": "#ffc7c9",
+ "industryTitle": null,
+ "bannerUrl": "//pages.tmall.com/wow/act/15617/neiyi328?abbucket=_AB-M1011_B14&acm=03654.1003.1.735362&aldid=KXPpnvEH&abtest=_AB-LR1011-PR1011&scm=1003.1.03654.OTHER_9_735362&pos=6",
+ "leftBannerImg": "http://img.alicdn.com/tps/i1/TB1tl3tLVXXXXbbXFXXeWjm2pXX-750-240.jpg",
+ "_pos_": "6",
+ "industryBenefit": null,
+ "industryId": "9",
+ "industryImg": null,
+ "rightBannerImg": "//img.alicdn.com/tps/i2/TB1AkIyLVXXXXbjXpXXeWjm2pXX-750-240.jpg"
+ }],
+ "sub": [{
+ "shopList": null,
+ "finalScore": "4.033333333333333",
+ "industryUrl": "//pages.tmall.com/wow/act/15617/zbps?abbucket=_AB-M1011_B14&acm=03654.1003.1.735362&aldid=KXPpnvEH&abtest=_AB-LR1011-PR1011&scm=1003.1.03654.OTHER_3_735362&pos=7",
+ "entityType": "OTHER",
+ "colour": "#bbffe5",
+ "industryTitle": "\u73e0\u5b9d\u914d\u9970",
+ "bannerUrl": null,
+ "leftBannerImg": null,
+ "_pos_": "7",
+ "industryBenefit": "\u5927\u724c1\u6298\u79d2\u6740",
+ "industryId": "3",
+ "industryImg": "//img.alicdn.com/tps/i1/TB1s5y.LVXXXXb.aXXXrdvGIFXX-248-155.jpg",
+ "rightBannerImg": null
+ }, {
+ "shopList": null,
+ "finalScore": "3.8773333333333335",
+ "industryUrl": "//pages.tmall.com/wow/act/15617/dqc?abbucket=_AB-M1011_B14&acm=03654.1003.1.735362&aldid=KXPpnvEH&abtest=_AB-LR1011-PR1011&scm=1003.1.03654.OTHER_15_735362&pos=8",
+ "entityType": "OTHER",
+ "colour": "#b4ebff",
+ "industryTitle": "\u6570\u7801",
+ "bannerUrl": null,
+ "leftBannerImg": null,
+ "_pos_": "8",
+ "industryBenefit": "\u75af\u62a2\u5927\u724c\u65b0\u54c1",
+ "industryId": "15",
+ "industryImg": "//img.alicdn.com/tps/i4/TB1_xG.LVXXXXbWaXXXrdvGIFXX-248-155.jpg",
+ "rightBannerImg": null
+ }, {
+ "shopList": null,
+ "finalScore": "3.8359999999999994",
+ "industryUrl": "//pages.tmall.com/wow/act/15617/man?abbucket=_AB-M1011_B14&acm=03654.1003.1.735362&aldid=KXPpnvEH&abtest=_AB-LR1011-PR1011&scm=1003.1.03654.OTHER_6_735362&pos=9",
+ "entityType": "OTHER",
+ "colour": "#cbe9a9",
+ "industryTitle": "\u7537\u88c5",
+ "bannerUrl": null,
+ "leftBannerImg": null,
+ "_pos_": "9",
+ "industryBenefit": "\u65b0\u54c1\u4f4e\u81f39.9\u5143",
+ "industryId": "6",
+ "industryImg": "//img.alicdn.com/tps/i1/TB1mO2qLVXXXXXiXFXXrdvGIFXX-248-155.jpg",
+ "rightBannerImg": null
+ }, {
+ "shopList": null,
+ "finalScore": "3.243333333333333",
+ "industryUrl": "//pages.tmall.com/wow/act/15617/xihu?abbucket=_AB-M1011_B14&acm=03654.1003.1.735362&aldid=KXPpnvEH&abtest=_AB-LR1011-PR1011&scm=1003.1.03654.OTHER_13_735362&pos=10",
+ "entityType": "OTHER",
+ "colour": "#cdffa4",
+ "industryTitle": "\u6d17\u62a4",
+ "bannerUrl": null,
+ "leftBannerImg": null,
+ "_pos_": "10",
+ "industryBenefit": "\u7206\u6b3e1\u5206\u94b1\u62a2",
+ "industryId": "13",
+ "industryImg": "//img.alicdn.com/tps/i3/TB1Ft_CLVXXXXX2XXXXrdvGIFXX-248-155.jpg",
+ "rightBannerImg": null
+ }, {
+ "shopList": null,
+ "finalScore": "3.1553333333333335",
+ "industryUrl": "//pages.tmall.com/wow/act/15617/myxfs?abbucket=_AB-M1011_B14&acm=03654.1003.1.735362&aldid=KXPpnvEH&abtest=_AB-LR1011-PR1011&scm=1003.1.03654.OTHER_5_735362&pos=11",
+ "entityType": "OTHER",
+ "colour": "#f8e1ff",
+ "industryTitle": "\u6bcd\u5a74\u7ae5\u88c5",
+ "bannerUrl": null,
+ "leftBannerImg": null,
+ "_pos_": "11",
+ "industryBenefit": "\u8de8\u5e97\u6ee1299\u51cf40",
+ "industryId": "5",
+ "industryImg": "//img.alicdn.com/tps/i4/TB1c.HvLVXXXXXPXpXXrdvGIFXX-248-155.jpg",
+ "rightBannerImg": null
+ }, {
+ "shopList": null,
+ "finalScore": "2.6739999999999995",
+ "industryUrl": "//pages.tmall.com/wow/act/15617/nvzhuang?abbucket=_AB-M1011_B14&acm=03654.1003.1.735362&aldid=KXPpnvEH&abtest=_AB-LR1011-PR1011&scm=1003.1.03654.OTHER_7_735362&pos=12",
+ "entityType": "OTHER",
+ "colour": "#d5cbe8",
+ "industryTitle": "\u5973\u88c5",
+ "bannerUrl": null,
+ "leftBannerImg": null,
+ "_pos_": "12",
+ "industryBenefit": "\u6298\u540e\u7528\u5238\u62a2\u65b0",
+ "industryId": "7",
+ "industryImg": "//img.alicdn.com/tps/i3/TB1JdfsLVXXXXbRXpXXrdvGIFXX-248-155.jpg",
+ "rightBannerImg": null
+ }, {
+ "shopList": null,
+ "finalScore": "0.0",
+ "industryUrl": "//pages.tmall.com/wow/act/15617/mobilephone?abbucket=_AB-M1011_B14&acm=03654.1003.1.735362&aldid=KXPpnvEH&abtest=_AB-LR1011-PR1011&scm=1003.1.03654.OTHER_14_735362&pos=13",
+ "entityType": "OTHER",
+ "colour": "#c5ffdf",
+ "industryTitle": "\u624b\u673a",
+ "bannerUrl": null,
+ "leftBannerImg": null,
+ "_pos_": "13",
+ "industryBenefit": "1\u5143\u62a2\u4f18\u60e0\u5238",
+ "industryId": "14",
+ "industryImg": "//img.alicdn.com/tps/i4/TB1M3zhLVXXXXX4XVXXrdvGIFXX-248-155.jpg",
+ "rightBannerImg": null
+ }, {
+ "shopList": null,
+ "finalScore": "0.0",
+ "industryUrl": "//pages.tmall.com/wow/act/15617/xiangbaohuanxin?abbucket=_AB-M1011_B14&acm=03654.1003.1.735362&aldid=KXPpnvEH&abtest=_AB-LR1011-PR1011&scm=1003.1.03654.OTHER_11_735362&pos=14",
+ "entityType": "OTHER",
+ "colour": "#ffccdc",
+ "industryTitle": "\u7bb1\u5305",
+ "bannerUrl": null,
+ "leftBannerImg": null,
+ "_pos_": "14",
+ "industryBenefit": "\u6781\u81f4\u7115\u65b0\u5c16\u8d27",
+ "industryId": "11",
+ "industryImg": "//img.alicdn.com/tps/i3/TB1gE6kLVXXXXcrXFXXrdvGIFXX-248-155.jpg",
+ "rightBannerImg": null
+ }, {
+ "shopList": null,
+ "finalScore": "0.0",
+ "industryUrl": "//pages.tmall.com/wow/act/15617/newnv?abbucket=_AB-M1011_B14&acm=03654.1003.1.735362&aldid=KXPpnvEH&abtest=_AB-LR1011-PR1011&scm=1003.1.03654.OTHER_10_735362&pos=15",
+ "entityType": "OTHER",
+ "colour": "#fff8ee",
+ "industryTitle": "\u978b\u5c65",
+ "bannerUrl": null,
+ "leftBannerImg": null,
+ "_pos_": "15",
+ "industryBenefit": "\u6f6e\u54c1\u7cbe\u9009\u978b\u5c65",
+ "industryId": "10",
+ "industryImg": "//img.alicdn.com/tps/i3/TB1.qzpLVXXXXX.XFXXrdvGIFXX-248-155.jpg",
+ "rightBannerImg": null
+ }],
+ "isFormal": "false",
+ "exposureParam": "//ac.mmstat.com/1.gif?apply=vote&abbucket=_AB-M1011_B14&com=02&acm=03654.1003.1.735362&cod=03654&cache=U5revsTn&aldid=KXPpnvEH&logtype=4&abtest=_AB-LR1011-PR1011&scm=1003.1.03654.735362&ip=",
+ "id": "03654"
+ }
+ self._processData(content);
+ // self.$sendMtop({
+ // api: 'mtop.taobao.aladdin.service.AldRecommendService.newFashionIndustry',
+ // v: '1.0',
+ // isHttps: true,
+ // sessionOption: 'AutoLoginOnly',
+ // timer: 3000
+ // }, function (result) {
+ // console.log('in category load mtop data:', result)
+ // if(typeof result==='string') result = JSON.parse(result);
+ // var content = self.ds._backup;
+ // if (result.data && result.data.resultValue) {
+ // content = result.data.resultValue;
+ // }
+ // self._processData(content);
+ // });
+ },
+ _processData: function (content) {
+ var self = this;
+ var items = content.main;
+ var subItems = content.sub;
+ for (var j = 0; j < items.length; j++) {
+ var item = items[j];
+ item.index= j;
+ item.bannerImg = j % 2 === 0 ? item.leftBannerImg : item.rightBannerImg;
+ if(item.shopList){
+ for(var n=0;n<item.shopList.length;n++){
+ item.shopList[n].idx = n;
+ }
+ }
+ }
+
+ for (var i = 0; i < subItems.length; i++) {
+ var subItem = subItems[i];
+ subItem.index= i;
+ subItem.top = (i - i % 3) / 3 * (241 + 3);
+ subItem.left = i % 3 * (248 + 3);
+ }
+
+ self.items = items;
+ self.subItems = subItems;
+ }
+ }
+ }
+
+ ;__weex_module__.exports.template={
+ "type": "container",
+ "children": [
+ {
+ "type": "image",
+ "shown": function () {return this.ds.floorTitle},
+ "classList": [
+ "title"
+ ],
+ "attr": {
+ "src": function () {return this.ds.floorTitle}
+ }
+ },
+ {
+ "type": "container",
+ "classList": [
+ "item-container"
+ ],
+ "children": [
+ {
+ "type": "container",
+ "repeat": function () {return this.items},
+ "style": {
+ "width": 750,
+ "paddingBottom": 14,
+ "backgroundColor": function () {return this.colour}
+ },
+ "children": [
+ {
+ "type": "container",
+ "children": [
+ {
+ "type": "banner",
+ "attr": {
+ "width": function () {return this.NUMBER_750},
+ "height": function () {return this.NUMBER_237},
+ "src": function () {return this.bannerImg},
+ "href": function () {return this.bannerUrl}
+ }
+ }
+ ]
+ },
+ {
+ "type": "container",
+ "classList": [
+ "shop-list"
+ ],
+ "children": [
+ {
+ "type": "container",
+ "repeat": function () {return this.shopList},
+ "classList": [
+ "shop-img-container"
+ ],
+ "children": [
+ {
+ "type": "banner",
+ "attr": {
+ "width": function () {return this.NUMBER_186},
+ "height": function () {return this.NUMBER_208},
+ "src": function () {return this.picUrl},
+ "href": function () {return this.shopUrl}
+ }
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "container",
+ "classList": [
+ "sub-item-container"
+ ],
+ "style": {
+ "height": function () {return Math.round(this.subItems.length/3)*(241+3)}
+ },
+ "children": [
+ {
+ "type": "container",
+ "repeat": function () {return this.subItems},
+ "classList": [
+ "sub-item"
+ ],
+ "style": {
+ "top": function () {return this.top},
+ "left": function () {return this.left}
+ },
+ "children": [
+ {
+ "type": "image",
+ "classList": [
+ "sub-item-bg"
+ ],
+ "attr": {
+ "src": function () {return this.subItemBg}
+ }
+ },
+ {
+ "type": "container",
+ "classList": [
+ "sub-item-img"
+ ],
+ "children": [
+ {
+ "type": "banner",
+ "attr": {
+ "width": function () {return this.NUMBER_248},
+ "height": function () {return this.NUMBER_155},
+ "src": function () {return this.industryImg},
+ "href": function () {return this.industryUrl}
+ }
+ }
+ ]
+ },
+ {
+ "type": "container",
+ "classList": [
+ "sub-item-title"
+ ],
+ "children": [
+ {
+ "type": "text",
+ "classList": [
+ "industry-title"
+ ],
+ "attr": {
+ "href": function () {return this.industryUrl},
+ "value": function () {return this.industryTitle}
+ }
+ },
+ {
+ "type": "text",
+ "classList": [
+ "industry-benefit"
+ ],
+ "attr": {
+ "href": function () {return this.industryUrl},
+ "value": function () {return this.industryBenefit}
+ }
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ;__weex_module__.exports.style={
+ "title": {
+ "width": 750,
+ "height": 100
+ },
+ "shop-list": {
+ "flexDirection": "row"
+ },
+ "shop-img-container": {
+ "marginRight": 2
+ },
+ "sub-item": {
+ "position": "absolute",
+ "width": 248,
+ "height": 241,
+ "alignItems": "center",
+ "backgroundColor": "#ffffff"
+ },
+ "sub-item-bg": {
+ "width": 248,
+ "height": 86
+ },
+ "sub-item-title": {
+ "position": "absolute",
+ "left": 0,
+ "top": 0,
+ "width": 248,
+ "textAlign": "center"
+ },
+ "industry-title": {
+ "fontSize": 28,
+ "color": "#484848",
+ "textAlign": "center",
+ "marginTop": 10,
+ "height": 34
+ },
+ "industry-benefit": {
+ "fontSize": 24,
+ "color": "#999999",
+ "textAlign": "center"
+ }
+ }
+ })
+ ;__weex_bootstrap__("@weex-component/5431263137f2dd27df2998658c228e48", {
+ "transformerVersion": "0.3.1"
+ },undefined)
+
+/***/ },
+
+/***/ 17:
+/***/ function(module, exports) {
+
+ ;__weex_define__("@weex-component/banner", [], function(__weex_require__, __weex_exports__, __weex_module__){
+
+ ;
+ __weex_module__.exports = {
+ data: function () {return {
+ quality: 'normal',
+ width: 0,
+ height: 0,
+ src: '',
+ href: '',
+ spmc:0,
+ spmd:0
+ }},
+ methods: {
+ ready: function () {
+ },
+ _clickHandler: function () {
+ this.$call('modal', 'toast', {
+ message: 'click',
+ duration: 1
+ });
+ }
+ }
+ };
+
+ ;__weex_module__.exports.template={
+ "type": "image",
+ "style": {
+ "width": function () {return this.width},
+ "height": function () {return this.height}
+ },
+ "attr": {
+ "src": function () {return this.src},
+ "imageQuality": function () {return this.quality}
+ },
+ "events": {
+ "click": "_clickHandler"
+ }
+ }
+ })
+
+/***/ }
+
+/******/ });
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/f4fd0820/ios/playground/bundlejs/showcase/new-fashion/coupon.js
----------------------------------------------------------------------
diff --git a/ios/playground/bundlejs/showcase/new-fashion/coupon.js b/ios/playground/bundlejs/showcase/new-fashion/coupon.js
new file mode 100644
index 0000000..687e969
--- /dev/null
+++ b/ios/playground/bundlejs/showcase/new-fashion/coupon.js
@@ -0,0 +1,176 @@
+/******/ (function(modules) { // webpackBootstrap
+/******/ // The module cache
+/******/ var installedModules = {};
+
+/******/ // The require function
+/******/ function __webpack_require__(moduleId) {
+
+/******/ // Check if module is in cache
+/******/ if(installedModules[moduleId])
+/******/ return installedModules[moduleId].exports;
+
+/******/ // Create a new module (and put it into the cache)
+/******/ var module = installedModules[moduleId] = {
+/******/ exports: {},
+/******/ id: moduleId,
+/******/ loaded: false
+/******/ };
+
+/******/ // Execute the module function
+/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
+
+/******/ // Flag the module as loaded
+/******/ module.loaded = true;
+
+/******/ // Return the exports of the module
+/******/ return module.exports;
+/******/ }
+
+
+/******/ // expose the modules object (__webpack_modules__)
+/******/ __webpack_require__.m = modules;
+
+/******/ // expose the module cache
+/******/ __webpack_require__.c = installedModules;
+
+/******/ // __webpack_public_path__
+/******/ __webpack_require__.p = "";
+
+/******/ // Load entry module and return exports
+/******/ return __webpack_require__(0);
+/******/ })
+/************************************************************************/
+/******/ ([
+/* 0 */
+/***/ function(module, exports) {
+
+ ;__weex_define__("@weex-component/12e3fae9066debee37a22f0980a88637", [], function(__weex_require__, __weex_exports__, __weex_module__){
+
+ ;
+ var IS_WEB = typeof window !== 'undefined';
+ var IS_APP = !IS_WEB || /AliApp\((?:tb|tm)/i.test(navigator.userAgent);
+
+ __weex_module__.exports = {
+ data: function () {return {
+ currentStatus: '//img.alicdn.com/tps/i4/TB1cYBKMXXXXXayaXXXkxHk2pXX-750-228.jpg_q75.jpg'
+ }},
+ methods: {
+ ready: function () {
+ },
+ handleClick: function (e) {
+ this.$call('modal', 'toast', {
+ message: 'click',
+ duration: 1
+ });
+ }
+ }
+ };
+
+ ;__weex_module__.exports.template={
+ "type": "container",
+ "children": [
+ {
+ "type": "image",
+ "shown": function () {return this.ds.floorTitle},
+ "classList": [
+ "title"
+ ],
+ "attr": {
+ "src": function () {return this.ds.floorTitle}
+ }
+ },
+ {
+ "type": "container",
+ "classList": [
+ "wrapper"
+ ],
+ "children": [
+ {
+ "type": "image",
+ "classList": [
+ "img"
+ ],
+ "attr": {
+ "src": function () {return this.currentStatus}
+ }
+ },
+ {
+ "type": "container",
+ "classList": [
+ "my-coupon"
+ ],
+ "events": {
+ "click": "handleClick"
+ }
+ },
+ {
+ "type": "container",
+ "classList": [
+ "guides"
+ ],
+ "events": {
+ "click": "handleClick"
+ }
+ },
+ {
+ "type": "container",
+ "classList": [
+ "lottery"
+ ],
+ "events": {
+ "click": "handleClick"
+ }
+ }
+ ]
+ }
+ ]
+ }
+ ;__weex_module__.exports.style={
+ "title": {
+ "width": 750,
+ "height": 100
+ },
+ "wrapper": {
+ "color": "#FF4550",
+ "width": 750,
+ "height": 230
+ },
+ "my-coupon": {
+ "width": 180,
+ "height": 39,
+ "position": "absolute",
+ "top": 15,
+ "right": 149
+ },
+ "guides": {
+ "height": 39,
+ "width": 110,
+ "position": "absolute",
+ "top": 15,
+ "right": 32
+ },
+ "lottery": {
+ "width": 348,
+ "height": 76,
+ "position": "absolute",
+ "top": 132,
+ "right": 70
+ },
+ "info": {
+ "fontSize": 18,
+ "position": "absolute",
+ "top": 84,
+ "right": 70
+ },
+ "img": {
+ "width": 750,
+ "height": 230
+ }
+ }
+ })
+ ;__weex_bootstrap__("@weex-component/12e3fae9066debee37a22f0980a88637", {
+ "transformerVersion": "0.3.1"
+ },undefined)
+
+/***/ }
+/******/ ]);
\ No newline at end of file