All Projects → HerbLuo → shop-native

HerbLuo / shop-native

Licence: other
基于weex(vuejs),同时使用了vuex, vue-router, axios,包含异步(async)语法糖在安卓端不兼容的解决方案

Programming Languages

javascript
184084 projects - #8 most used programming language
Vue
7211 projects
typescript
32286 projects
HTML
75241 projects

Projects that are alternatives of or similar to shop-native

Axios Mock Adapter
Axios adapter that allows to easily mock requests
Stars: ✭ 2,832 (+18780%)
Mutual labels:  axios
Mall
以小商城作为基本的内容演示,目的是希望打造一个前端 h5 通用型的解决方案。
Stars: ✭ 250 (+1566.67%)
Mutual labels:  axios
add-my-name
No more WhatsApp spams 🎉
Stars: ✭ 16 (+6.67%)
Mutual labels:  axios
Blog
若川的博客—学习源码整体架构系列8篇,前端面试高频源码,微信搜索「若川视野」关注我,长期交流学习~
Stars: ✭ 234 (+1460%)
Mutual labels:  axios
Vue Cnode
🔥Vue.js打造一个开源的CNode社区。CNode by Vue.js
Stars: ✭ 249 (+1560%)
Mutual labels:  axios
Bbs admin
vue+ElementUI+axios 接入数据,仿segmentfault,做相关的后台管理系统 https://lyh.red/admin/
Stars: ✭ 252 (+1580%)
Mutual labels:  axios
Vue Questionnaire
使用 Vue + CI 开发的简易问卷调查系统,演示账户:admin / admin
Stars: ✭ 220 (+1366.67%)
Mutual labels:  axios
electron-admin-antd-vue
Electron Vue3.x Ant Design Admin template
Stars: ✭ 21 (+40%)
Mutual labels:  axios
Bga issue blog
Flutter 或 Vue 全家桶(Vue + VueRouter + Vuex + Axios)抓取 GitHub 上的 Issues,结合 GitHub Pages 搭建个人博客站点,支持 GitHub 登录和评论
Stars: ✭ 249 (+1560%)
Mutual labels:  axios
chameleon-sdk-ios
iOS系统下Chameleon SDK
Stars: ✭ 27 (+80%)
Mutual labels:  weex
React Cnodejs.org
Material UI version of cnodejs.org, the biggest Node.js Chinese community.
Stars: ✭ 242 (+1513.33%)
Mutual labels:  axios
React Hooks Axios
Custom React Hooks for Axios.js
Stars: ✭ 245 (+1533.33%)
Mutual labels:  axios
Vue Element Admin
🎉 A magical vue admin https://panjiachen.github.io/vue-element-admin
Stars: ✭ 73,044 (+486860%)
Mutual labels:  axios
Vue Axios Github
Vue 全家桶 + axios 前端实现登录拦截、登出、拦截器等功能
Stars: ✭ 2,622 (+17380%)
Mutual labels:  axios
MQCMS-admin
MQCMS后台管理系统
Stars: ✭ 24 (+60%)
Mutual labels:  axios
Vue Admin
基于and-design-vue的vue后台管理系统模板
Stars: ✭ 226 (+1406.67%)
Mutual labels:  axios
Vue Video
vue + vue-router + vuex + (fetch->axios)
Stars: ✭ 251 (+1573.33%)
Mutual labels:  axios
weex componets
this library is no longer maintained. For the latest gameplay, please refer to: https://github.com/fengwuxp/wuxp_common_ts_module
Stars: ✭ 16 (+6.67%)
Mutual labels:  weex
coronadev
Aplicativo para consultar a situação global do COVID-19
Stars: ✭ 44 (+193.33%)
Mutual labels:  axios
JustDo8-weex-game
🎲 a game developed using weex|使用 Weex 开发的益智类小游戏
Stars: ✭ 25 (+66.67%)
Mutual labels:  weex

shop-native

基于 weex(vuejs)的shop-native
同时使用了vuex, vue-router, axios(少许修改)。
修改了部分代码 # run it 5,使得async语法糖在安卓平台下也顺利运行。

特性:

  1. 动态加载初始化代码,在app首次打开时,初始化持久层数据。
  2. 启用了内存缓存和闪存缓存,当数据过旧时,采用服务端数据。
  3. app创建时,自动启用loading状态,当所有组件加载完毕后,转换状态为loaded,通知 java,oc 端。

file structure

  • src/*: all source code
  • app.js: entrance of the Weex page
  • build/*: some build scripts
  • dist/*: where places generated code
  • assets/*: some assets for Web preview
  • index.html: a page with qrcode of Weex js bundle
  • shop.html: Web render
  • .babelrc: babel config (preset-2015, async, object-rest-spread)
  • .eslintrc: not used

src structure

  • a_sub_apps sub app(动态拉取),当前只包括app初始化代码片段
  • api 包含:服务端api,组件地址,图片大小调整api
  • components vue组件,@see views
  • dao 数据持久化和读取层
  • eventbus 包含vuex无法处理和不方便处理的事件:全局事件和简单事件
  • store vuex store
  • utils utils
  • views 路由级界面

npm scripts

# build the two js bundles and watch file changes
npm run dev

# start a Web server at 192.16.137.1:89
npm run serve

# start weex-devtool for debugging with native
npm run debug

run it

  1. npm install

  2. 运行服务端代码或者跳过此步

  3. 修改 /src/api/index.js 下的服务端地址 (default.)url.base 为步骤2中的ip
    http://www.cloudself.cn/shop/

  4. 修改 package.json 下的 serve script,将ip修改成 本机可用的ip,port 可保持89不变
    修改 /src/api/index.js 下的app地址 (default.)app.appBase 为上述的ip + port

  5. 打开 \node_modules\regenerator-runtime\runtime.js, 进行如下修改

// 删除如下代码片段 
var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
GeneratorFunctionPrototype.constructor = GeneratorFunction;
// 同样的位置添加如下代码
var o = Object.create(IteratorPrototype);
var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = {
    constructor: GeneratorFunctionPrototype,
    __proto__: GeneratorFunctionPrototype.prototype.__proto__
}
GeneratorFunction.prototype = Gp.constructor;
GeneratorFunctionPrototype.constructor = GeneratorFunction;

注释:代码使用了es2017 async API, babel 的转换器中有部分代码不与weex兼容 这是由于安卓平台下weex默认冻结了Object,导致object的constructor属性无法被设置, 如只使用iOS平台,可不必进行修改

  1. npm run serve, npm run debug

  2. open http://ip:port/index.html to show the QR code,
    open http://ip:port/shop.html to show the Web render

other

安卓端

IOS请使用playground

License:

本项目的所有 代码 均可自由使用,修改或者用来干其它任何事情,但需保留署名

本项目引用的所有 图片资源 均非本人所有,禁止用于任何商业活动

使用其他资源,请联系 [email protected]

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].