You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by kfeagle <gi...@git.apache.org> on 2017/05/04 08:09:36 UTC

[GitHub] incubator-weex pull request #315: + [ios]support bota and atob

GitHub user kfeagle opened a pull request:

    https://github.com/apache/incubator-weex/pull/315

    + [ios]support bota and atob

    - support bota and atob
    - demo
    ```html
    <template>
      <div id="test" style="" onlongpress="longpress" onclick="click">
    
        <text id="canvas_demo" style="backgroundColor:yellow;width:750;height:100;">demo 1</text>
    
        <text if="{{shown}}" style="width:750;height:100;">{{original}}</text>
        <text if="{{shown}}" style="width:750;height:100;">{{encode}}</text>
        <text if="{{shown}}" style="width:750;height:100;">{{decode}}</text>
    
    
        <text id="canvas_demo2" style="backgroundColor:yellow;width:750;height:100;">demo 2</text>
    
    
      </div>
    </template>
    <script>
      console.log("[index.we::script] start...");
    
    
    
      module.exports = {
        data: {
          shown: true,
          original: '',
          encode: '',
          decode: ''
        },
        methods: {
          longpress: function(e) {
            console.log('long:', e);
          },
          click: function(e) {
            //runNextCase();
          },
          disable: function() {
            disableGcanvas();
          }
    
        },
    
        created: function() {
    
    
        },
        ready: function() {
    
          //leonTest();
    
    
          console.log("base64 >>> ready() ");
    
          //input编码后输出应该是 YWxpYmFiYSB0YW9iYW8gd2VleA==
          var input = "alibaba taobao weex";
    
          var input2 = "";
    
          //for (var k = 0 ; k < 1000 * 1000 * 10; k++){
          for (var k = 0; k < 1000 * 1000; k++) {
            input2 += "abcdefghijklmnopqrstuvwxyz"
          }
    
          var encode_str, decode_str;
    
    
    
          console.log("base64 >>> encode_str");
          this.original = "原始字符串: " + input;
          encode_str = btoa(input);
          decode_str = atob(encode_str);
    
          this.encode = "编码后: " +  encode_str;
          this.decode = "解码后: " + decode_str;
          console.log("base64 encode_str: " + encode_str);
          console.log("base64 decode_str: " + decode_str);
    
    
    
          var time1 = new Date().getTime();
          var time2;
    
    
          encode_str = btoa(input2);
    
          time2 = new Date().getTime();
    
          console.log("base64 encode a very long string, time cost: " + (time2 - time1));
    
    
    
    
        },
    
    
        destroyed: function() {
    
    
          //clearInterval(timer1);
          //clearInterval(timer2);
          console.log('在页面被销毁时调用 222222222');
          //disable();
        }
    
      }
    </script>
    ```

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/kfeagle/incubator-weex ios-bota-0.13-dev

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-weex/pull/315.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #315
    
----
commit 71dbb5b234380039e64ef8f989b8ab99e33a3d18
Author: 齐山 <su...@163.com>
Date:   2017-05-04T08:06:49Z

    + [ios] add feature b to a

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-weex issue #315: + [ios]support bota and atob

Posted by weex-bot <gi...@git.apache.org>.
Github user weex-bot commented on the issue:

    https://github.com/apache/incubator-weex/pull/315
  
    <table>
      <thead>
        <tr>
          <th width="50"></th>
          <th width="100%" data-danger-table="true" data-kind="Message">
              1 Message
          </th>
         </tr>
      </thead>
      <tbody>
        <tr>
          <td>:book:</td>
          <td data-sticky="false">Executed 53 tests, with 0 failures (0 unexpected) in 89.793 (89.868) seconds</td>
        </tr>
      </tbody>
    </table>
    
    <p align="right" data-meta="generated_by_danger">
      Generated by :no_entry_sign: <a href="http://danger.systems/">danger</a>
    </p>



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-weex pull request #315: + [ios]support bota and atob

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/incubator-weex/pull/315


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-weex issue #315: + [ios]support bota and atob

Posted by weex-bot <gi...@git.apache.org>.
Github user weex-bot commented on the issue:

    https://github.com/apache/incubator-weex/pull/315
  
    
    <!--
      0 failure: 
      1 warning:  No Changelog chan...
      
      
    -->
    
    
    <table>
      <thead>
        <tr>
          <th width="50"></th>
          <th width="100%" data-danger-table="true">Warnings</th>
        </tr>
      </thead>
      <tbody><tr>
          <td>:warning:</td>
          <td>No Changelog changes!</td>
        </tr>
      </tbody>
    </table>
    
    
    
    <p align="right">
      Generated by :no_entry_sign: <a href="http://github.com/danger/danger-js/">dangerJS</a>
    </p>



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---