[WEEX-86][doc] Update stream document.

Project: http://git-wip-us.apache.org/repos/asf/incubator-weex-site/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-weex-site/commit/1342cddf
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex-site/tree/1342cddf
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex-site/diff/1342cddf

Branch: refs/heads/master
Commit: 1342cddfb827a2c46fdce34fac1ac31569118d71
Parents: 40b5aaf
Author: miomin <[email protected]>
Authored: Thu Jan 18 16:28:53 2018 +0800
Committer: miomin <[email protected]>
Committed: Thu Jan 18 16:28:53 2018 +0800

----------------------------------------------------------------------
 source/cn/references/modules/stream.md | 73 ++---------------------------
 source/references/modules/stream.md    | 70 +--------------------------
 2 files changed, 4 insertions(+), 139 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex-site/blob/1342cddf/source/cn/references/modules/stream.md
----------------------------------------------------------------------
diff --git a/source/cn/references/modules/stream.md 
b/source/cn/references/modules/stream.md
index fd83124..bae42f7 100644
--- a/source/cn/references/modules/stream.md
+++ b/source/cn/references/modules/stream.md
@@ -37,6 +37,7 @@ version: 2.1
   - `statusText {string}`:状态描述文本
   - `data {Object | string}`: 返回的数据,如果请求类型是 `json` 
和 `jsonp`,则它就是一个 object ,如果不是,则它就是一个 
string。
   - `headers {Object}`:响应头
+
 - `progressCallback {Function}`:关于请求状态的回调。 
这个回调函数将在请求完成后就被调用:
   - `readyState {number}`:当前状态
     state:'1': 请求连接中
@@ -50,76 +51,8 @@ version: 2.1
 ### 注意
 
  - 默认 Content-Type 是 'application/x-www-form-urlencoded'。
- - 如果你需要通过 `POST` json , 你需要将 Content-Type 设为 
'application/json'。
+ - 如果你需要通过 `POST` json , 需要将 Content-Type 设为 
'application/json'。
 
 ### Example
 
-```html
-<template>
-  <div class="wrapper">
-    <div class="group">
-      <text class="title">Weex Star :</text>
-      <text class="count">{{weexStar}}</text>
-    </div>
-    <div class="group">
-      <text class="title">Vue Star :</text>
-      <text class="count">{{vueStar}}</text>
-    </div>
-  </div>
-</template>
-
-<script>
-  var stream = weex.requireModule('stream')
-  export default {
-    data () {
-      return {
-        weexStar: 'unknown',
-        vueStar: 'unknown'
-      }
-    },
-
-    methods: {
-      getStarCount (repo, callback) {
-        return stream.fetch({
-          method: 'GET',
-          type: 'json',
-          url: 'https://api.github.com/repos/' + repo
-        }, callback)
-      }
-    },
-    created () {
-      this.getStarCount('alibaba/weex', res => {
-        this.weexStar = res.ok ? res.data.stargazers_count : '(network error)'
-      })
-      this.getStarCount('vuejs/vue', res => {
-        this.vueStar = res.ok ? res.data.stargazers_count : '(network error)'
-      })
-    }
-  }
-</script>
-
-
-<style scoped>
-  .wrapper {
-    flex-direction: column;
-    justify-content: center;
-  }
-  .group {
-    flex-direction: row;
-    justify-content: center;
-    margin-bottom: 40px;
-  }
-  .title {
-    font-size: 45px;
-    color: #888888;
-  }
-  .count {
-    font-size: 45px;
-    font-weight: bold;
-    margin-left: 12px;
-    color: #41B883;
-  }
-</style>
-```
-
-[try it](http://dotwe.org/vue/29bbf2d49fc8a204f98240044bbe211a)
+[stream demo](http://dotwe.org/vue/e182a9fbbeb6f0763cd1df1baddf1e10)

http://git-wip-us.apache.org/repos/asf/incubator-weex-site/blob/1342cddf/source/references/modules/stream.md
----------------------------------------------------------------------
diff --git a/source/references/modules/stream.md 
b/source/references/modules/stream.md
index ee56d22..0f8ccda 100644
--- a/source/references/modules/stream.md
+++ b/source/references/modules/stream.md
@@ -61,72 +61,4 @@ Start a network request, use two callbacks to receive 
server's response data.
 
 ### Example
 
-```html
-<template>
-  <div class="wrapper">
-    <div class="group">
-      <text class="title">Weex Star :</text>
-      <text class="count">{{weexStar}}</text>
-    </div>
-    <div class="group">
-      <text class="title">Vue Star :</text>
-      <text class="count">{{vueStar}}</text>
-    </div>
-  </div>
-</template>
-
-<script>
-  var stream = weex.requireModule('stream')
-  export default {
-    data () {
-      return {
-        weexStar: 'unknown',
-        vueStar: 'unknown'
-      }
-    },
-
-    methods: {
-      getStarCount (repo, callback) {
-        return stream.fetch({
-          method: 'GET',
-          type: 'json',
-          url: 'https://api.github.com/repos/' + repo
-        }, callback)
-      }
-    },
-    created () {
-      this.getStarCount('alibaba/weex', res => {
-        this.weexStar = res.ok ? res.data.stargazers_count : '(network error)'
-      })
-      this.getStarCount('vuejs/vue', res => {
-        this.vueStar = res.ok ? res.data.stargazers_count : '(network error)'
-      })
-    }
-  }
-</script>
-
-
-<style scoped>
-  .wrapper {
-    flex-direction: column;
-    justify-content: center;
-  }
-  .group {
-    flex-direction: row;
-    justify-content: center;
-    margin-bottom: 40px;
-  }
-  .title {
-    font-size: 45px;
-    color: #888888;
-  }
-  .count {
-    font-size: 45px;
-    font-weight: bold;
-    margin-left: 12px;
-    color: #41B883;
-  }
-</style>
-```
-
-[try it](http://dotwe.org/vue/29bbf2d49fc8a204f98240044bbe211a)
+[stream demo](http://dotwe.org/vue/e182a9fbbeb6f0763cd1df1baddf1e10)

Reply via email to