├── .editorconfig ├── .gitignore ├── README.md ├── config.xml ├── ionic.config.json ├── package.json ├── resources ├── android │ ├── icon │ │ ├── drawable-hdpi-icon.png │ │ ├── drawable-ldpi-icon.png │ │ ├── drawable-mdpi-icon.png │ │ ├── drawable-xhdpi-icon.png │ │ ├── drawable-xxhdpi-icon.png │ │ └── drawable-xxxhdpi-icon.png │ └── splash │ │ ├── drawable-land-hdpi-screen.png │ │ ├── drawable-land-ldpi-screen.png │ │ ├── drawable-land-mdpi-screen.png │ │ ├── drawable-land-xhdpi-screen.png │ │ ├── drawable-land-xxhdpi-screen.png │ │ ├── drawable-land-xxxhdpi-screen.png │ │ ├── drawable-port-hdpi-screen.png │ │ ├── drawable-port-ldpi-screen.png │ │ ├── drawable-port-mdpi-screen.png │ │ ├── drawable-port-xhdpi-screen.png │ │ ├── drawable-port-xxhdpi-screen.png │ │ └── drawable-port-xxxhdpi-screen.png ├── icon.psd ├── icon.psd.md5 ├── ios │ ├── icon │ │ ├── icon-40.png │ │ ├── icon-40@2x.png │ │ ├── icon-40@3x.png │ │ ├── icon-50.png │ │ ├── icon-50@2x.png │ │ ├── icon-60.png │ │ ├── icon-60@2x.png │ │ ├── icon-60@3x.png │ │ ├── icon-72.png │ │ ├── icon-72@2x.png │ │ ├── icon-76.png │ │ ├── icon-76@2x.png │ │ ├── icon-83.5@2x.png │ │ ├── icon-small.png │ │ ├── icon-small@2x.png │ │ ├── icon-small@3x.png │ │ ├── icon.png │ │ └── icon@2x.png │ └── splash │ │ ├── Default-568h@2x~iphone.png │ │ ├── Default-667h.png │ │ ├── Default-736h.png │ │ ├── Default-Landscape-736h.png │ │ ├── Default-Landscape@2x~ipad.png │ │ ├── Default-Landscape@~ipadpro.png │ │ ├── Default-Landscape~ipad.png │ │ ├── Default-Portrait@2x~ipad.png │ │ ├── Default-Portrait@~ipadpro.png │ │ ├── Default-Portrait~ipad.png │ │ ├── Default@2x~iphone.png │ │ └── Default~iphone.png ├── splash.png └── splash.png.md5 ├── screens ├── 1.jpg └── 2.jpg ├── src ├── app │ ├── app.component.ts │ ├── app.html │ ├── app.module.ts │ ├── app.scss │ ├── app.service.ts │ ├── app.share.ts │ └── main.ts ├── assets │ └── icon │ │ ├── favicon.ico │ │ ├── iconfont.css │ │ ├── iconfont.eot │ │ ├── iconfont.js │ │ ├── iconfont.svg │ │ ├── iconfont.ttf │ │ └── iconfont.woff ├── components │ ├── components.module.ts │ └── ion-products │ │ ├── ion-products.html │ │ ├── ion-products.scss │ │ └── ion-products.ts ├── index.html ├── manifest.json ├── pages │ ├── about │ │ ├── about.html │ │ ├── about.module.ts │ │ ├── about.scss │ │ └── about.ts │ ├── contact │ │ ├── contact.html │ │ ├── contact.module.ts │ │ ├── contact.scss │ │ └── contact.ts │ ├── home │ │ ├── home.html │ │ ├── home.module.ts │ │ ├── home.scss │ │ └── home.ts │ ├── product-details │ │ ├── product-details.html │ │ ├── product-details.module.ts │ │ ├── product-details.scss │ │ └── product-details.ts │ ├── product-list │ │ ├── product-list.html │ │ ├── product-list.module.ts │ │ ├── product-list.scss │ │ └── product-list.ts │ └── tabs │ │ ├── tabs.html │ │ ├── tabs.module.ts │ │ ├── tabs.scss │ │ └── tabs.ts ├── service-worker.js └── theme │ └── variables.scss ├── tsconfig.json └── tslint.json /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig helps developers define and maintain consistent coding styles between different editors and IDEs 2 | # editorconfig.org 3 | 4 | root = true 5 | 6 | [*] 7 | indent_style = space 8 | indent_size = 2 9 | 10 | # We recommend you to keep these unchanged 11 | end_of_line = lf 12 | charset = utf-8 13 | trim_trailing_whitespace = true 14 | insert_final_newline = true 15 | 16 | [*.md] 17 | trim_trailing_whitespace = false -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Specifies intentionally untracked files to ignore when using Git 2 | # http://git-scm.com/docs/gitignore 3 | 4 | *~ 5 | *.sw[mnpcod] 6 | *.log 7 | *.tmp 8 | *.tmp.* 9 | log.txt 10 | *.sublime-project 11 | *.sublime-workspace 12 | .vscode/ 13 | npm-debug.log* 14 | 15 | .idea/ 16 | .sass-cache/ 17 | .tmp/ 18 | .versions/ 19 | coverage/ 20 | dist/ 21 | node_modules/ 22 | tmp/ 23 | temp/ 24 | hooks/ 25 | platforms/ 26 | plugins/ 27 | plugins/android.json 28 | plugins/ios.json 29 | www/ 30 | $RECYCLE.BIN/ 31 | 32 | .DS_Store 33 | Thumbs.db 34 | UserInterfaceState.xcuserstate 35 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 关于项目 2 | 3 | 此项目是基于ionic3+angular4开发的一款导购APP,主要作为教程源码给大家共享。 4 | 5 | # 部分截图 6 | ![效果](./screens/1.jpg) ||||| ![效果](./screens/2.jpg) 7 | 8 | 9 | 10 | # 如何使用 11 | 12 | ## 安装CLI 13 | 14 | ```bash 15 | $ npm install -g ionic cordova 16 | ``` 17 | 18 | ## 安装node_modules 19 | 20 | ```bash 21 | $ npm install 22 | ``` 23 | 24 | ## 浏览器调试 25 | 26 | ```bash 27 | $ ionic serve 28 | ``` 29 | 30 | # [Ionic3项目实战教程](http://www.jianshu.com/c/a2bc4a8f2c73) 31 | ionic3项目实战教程 - 第1讲 ionic3环境安装 项目搭建 32 | ionic3项目实战教程 - 第2讲 ionic3懒加载配置 33 | ionic3项目实战教程 - 第3讲 ionic3封装全局网络请求服务app.service 34 | ionic3项目实战教程 - 第4讲 ionic3商城首页设计(幻灯片+图标分类) 35 | ionic3项目实战教程 - 第5讲 ionic3商城首页透明导航栏设计 36 | ionic3项目实战教程 - 第6讲 ionic3 component 组建封装 37 | ionic3项目实战教程 - 第7讲 ionic3商品列表页的实现 38 | ionic3项目实战教程 - 第8讲 ionic3商品详情页的实现 39 | ionic3项目实战教程 - 第9讲 ionic3应用内主题浏览器ThemeableBrowser的使用 40 | ionic3项目实战教程 - 第10讲 ionic3分类菜单设计(类似外卖) 41 | ionic3项目实战教程 - 第11讲 ionic3个人中心界面设计 42 | ionic3项目实战教程 - 第12讲 ionic3制作icon和splash 43 | ionic3项目实战教程 - 第13讲 ionic3社交分享(QQ分享和微信分享) 44 | ionic3项目实战教程 - iOS打包上架到应用市场 45 | 46 | 47 | 48 | # 下载体验 49 | 50 | AppStore:[已上架](https://itunes.apple.com/cn/app/id1194942857) 51 | 52 | # 线上预览版 53 | 54 | 地址:[预览](http://dress.tongedev.cn) 55 | 56 | 57 | # 关于我们 58 | 59 | QQ群:111055535 60 | 简书ID:[IonicBlog](http://www.jianshu.com/u/7222ddf1ce84) 61 | 62 | # 目录结构 63 | 64 | index.html 65 | │ service-worker.js 66 | ├─app 67 | │ app.component.ts 68 | │ app.html 69 | │ app.module.ts 70 | │ app.scss 71 | │ app.service.ts 72 | │ main.ts 73 | ├─components 74 | │ │ components.module.ts 75 | │ │ 76 | │ └─ion-products 77 | │ ion-products.html 78 | │ ion-products.scss 79 | │ ion-products.ts 80 | │ 81 | ├─pages 82 | │ ├─about 83 | │ │ about.html 84 | │ │ about.module.ts 85 | │ │ about.scss 86 | │ │ about.ts 87 | │ │ 88 | │ ├─contact 89 | │ │ contact.html 90 | │ │ contact.module.ts 91 | │ │ contact.scss 92 | │ │ contact.ts 93 | │ │ 94 | │ ├─home 95 | │ │ home.html 96 | │ │ home.module.ts 97 | │ │ home.scss 98 | │ │ home.ts 99 | │ │ 100 | │ ├─product-details 101 | │ │ product-details.html 102 | │ │ product-details.module.ts 103 | │ │ product-details.scss 104 | │ │ product-details.ts 105 | │ │ 106 | │ ├─product-list 107 | │ │ product-list.html 108 | │ │ product-list.module.ts 109 | │ │ product-list.scss 110 | │ │ product-list.ts 111 | │ │ 112 | │ └─tabs 113 | │ tabs.html 114 | │ tabs.module.ts 115 | │ tabs.scss 116 | │ tabs.ts 117 | │ 118 | └─theme 119 | variables.scss 120 | 121 | 122 | # License 123 | 124 | 本APP代码仅供参考学习,请勿用作商业用途。 125 | -------------------------------------------------------------------------------- /config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 精品女装 4 | An awesome Ionic/Cordova app. 5 | Ionic Framework Team 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | -------------------------------------------------------------------------------- /ionic.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ionic3-dress", 3 | "app_id": "ionic3-dress", 4 | "type": "ionic-angular", 5 | "integrations": { 6 | "cordova": {} 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ionic3-dress", 3 | "version": "0.0.1", 4 | "author": "Tonge", 5 | "homepage": "http://ionicframework.com/", 6 | "private": true, 7 | "scripts": { 8 | "clean": "ionic-app-scripts clean", 9 | "build": "ionic-app-scripts build", 10 | "lint": "ionic-app-scripts lint", 11 | "ionic:build": "ionic-app-scripts build", 12 | "ionic:serve": "ionic-app-scripts serve" 13 | }, 14 | "dependencies": { 15 | "@angular/common": "4.1.3", 16 | "@angular/compiler": "4.1.3", 17 | "@angular/compiler-cli": "4.1.3", 18 | "@angular/core": "4.1.3", 19 | "@angular/forms": "4.1.3", 20 | "@angular/http": "4.1.3", 21 | "@angular/platform-browser": "4.1.3", 22 | "@angular/platform-browser-dynamic": "4.1.3", 23 | "@ionic-native/core": "3.12.1", 24 | "@ionic-native/splash-screen": "3.12.1", 25 | "@ionic-native/status-bar": "3.12.1", 26 | "@ionic-native/themeable-browser": "^4.1.0", 27 | "@ionic/storage": "2.0.1", 28 | "cordova-android": "^6.2.3", 29 | "cordova-plugin-console": "^1.0.5", 30 | "cordova-plugin-device": "^1.1.4", 31 | "cordova-plugin-qqsdk": "^0.9.6", 32 | "cordova-plugin-splashscreen": "^4.0.3", 33 | "cordova-plugin-statusbar": "^2.2.2", 34 | "cordova-plugin-themeablebrowser": "^0.2.17", 35 | "cordova-plugin-wechat": "git+https://github.com/wowgeeker/cordova-plugin-wechat.git", 36 | "cordova-plugin-whitelist": "^1.3.1", 37 | "ionic-angular": "3.6.0", 38 | "ionic-native": "^2.9.0", 39 | "ionic-plugin-keyboard": "^2.2.1", 40 | "ionicons": "3.0.0", 41 | "rxjs": "5.4.0", 42 | "sw-toolbox": "3.6.0", 43 | "zone.js": "0.8.12" 44 | }, 45 | "devDependencies": { 46 | "@ionic/app-scripts": "2.1.3", 47 | "ionic": "3.8.1", 48 | "typescript": "2.3.4" 49 | }, 50 | "description": "An Ionic project", 51 | "cordova": { 52 | "plugins": { 53 | "cordova-plugin-themeablebrowser": {}, 54 | "cordova-plugin-console": {}, 55 | "cordova-plugin-device": {}, 56 | "cordova-plugin-splashscreen": {}, 57 | "cordova-plugin-statusbar": {}, 58 | "cordova-plugin-whitelist": {}, 59 | "ionic-plugin-keyboard": {}, 60 | "cordova-plugin-qqsdk": { 61 | "QQ_APP_ID": "1105786989" 62 | }, 63 | "cordova-plugin-wechat": { 64 | "WECHATAPPID": "wx7b22a8079fcd2f45" 65 | } 66 | }, 67 | "platforms": [ 68 | "android" 69 | ] 70 | } 71 | } -------------------------------------------------------------------------------- /resources/android/icon/drawable-hdpi-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IonicBlog/ionic3-dress/1d32e60799f42d4381c547325e364d7535966ffa/resources/android/icon/drawable-hdpi-icon.png -------------------------------------------------------------------------------- /resources/android/icon/drawable-ldpi-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IonicBlog/ionic3-dress/1d32e60799f42d4381c547325e364d7535966ffa/resources/android/icon/drawable-ldpi-icon.png -------------------------------------------------------------------------------- /resources/android/icon/drawable-mdpi-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IonicBlog/ionic3-dress/1d32e60799f42d4381c547325e364d7535966ffa/resources/android/icon/drawable-mdpi-icon.png -------------------------------------------------------------------------------- /resources/android/icon/drawable-xhdpi-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IonicBlog/ionic3-dress/1d32e60799f42d4381c547325e364d7535966ffa/resources/android/icon/drawable-xhdpi-icon.png -------------------------------------------------------------------------------- /resources/android/icon/drawable-xxhdpi-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IonicBlog/ionic3-dress/1d32e60799f42d4381c547325e364d7535966ffa/resources/android/icon/drawable-xxhdpi-icon.png -------------------------------------------------------------------------------- /resources/android/icon/drawable-xxxhdpi-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IonicBlog/ionic3-dress/1d32e60799f42d4381c547325e364d7535966ffa/resources/android/icon/drawable-xxxhdpi-icon.png -------------------------------------------------------------------------------- /resources/android/splash/drawable-land-hdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IonicBlog/ionic3-dress/1d32e60799f42d4381c547325e364d7535966ffa/resources/android/splash/drawable-land-hdpi-screen.png -------------------------------------------------------------------------------- /resources/android/splash/drawable-land-ldpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IonicBlog/ionic3-dress/1d32e60799f42d4381c547325e364d7535966ffa/resources/android/splash/drawable-land-ldpi-screen.png -------------------------------------------------------------------------------- /resources/android/splash/drawable-land-mdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IonicBlog/ionic3-dress/1d32e60799f42d4381c547325e364d7535966ffa/resources/android/splash/drawable-land-mdpi-screen.png -------------------------------------------------------------------------------- /resources/android/splash/drawable-land-xhdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IonicBlog/ionic3-dress/1d32e60799f42d4381c547325e364d7535966ffa/resources/android/splash/drawable-land-xhdpi-screen.png -------------------------------------------------------------------------------- /resources/android/splash/drawable-land-xxhdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IonicBlog/ionic3-dress/1d32e60799f42d4381c547325e364d7535966ffa/resources/android/splash/drawable-land-xxhdpi-screen.png -------------------------------------------------------------------------------- /resources/android/splash/drawable-land-xxxhdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IonicBlog/ionic3-dress/1d32e60799f42d4381c547325e364d7535966ffa/resources/android/splash/drawable-land-xxxhdpi-screen.png -------------------------------------------------------------------------------- /resources/android/splash/drawable-port-hdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IonicBlog/ionic3-dress/1d32e60799f42d4381c547325e364d7535966ffa/resources/android/splash/drawable-port-hdpi-screen.png -------------------------------------------------------------------------------- /resources/android/splash/drawable-port-ldpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IonicBlog/ionic3-dress/1d32e60799f42d4381c547325e364d7535966ffa/resources/android/splash/drawable-port-ldpi-screen.png -------------------------------------------------------------------------------- /resources/android/splash/drawable-port-mdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IonicBlog/ionic3-dress/1d32e60799f42d4381c547325e364d7535966ffa/resources/android/splash/drawable-port-mdpi-screen.png -------------------------------------------------------------------------------- /resources/android/splash/drawable-port-xhdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IonicBlog/ionic3-dress/1d32e60799f42d4381c547325e364d7535966ffa/resources/android/splash/drawable-port-xhdpi-screen.png -------------------------------------------------------------------------------- /resources/android/splash/drawable-port-xxhdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IonicBlog/ionic3-dress/1d32e60799f42d4381c547325e364d7535966ffa/resources/android/splash/drawable-port-xxhdpi-screen.png -------------------------------------------------------------------------------- /resources/android/splash/drawable-port-xxxhdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IonicBlog/ionic3-dress/1d32e60799f42d4381c547325e364d7535966ffa/resources/android/splash/drawable-port-xxxhdpi-screen.png -------------------------------------------------------------------------------- /resources/icon.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IonicBlog/ionic3-dress/1d32e60799f42d4381c547325e364d7535966ffa/resources/icon.psd -------------------------------------------------------------------------------- /resources/icon.psd.md5: -------------------------------------------------------------------------------- 1 | aed127ede0e9885ff18a90e3e189e7df -------------------------------------------------------------------------------- /resources/ios/icon/icon-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IonicBlog/ionic3-dress/1d32e60799f42d4381c547325e364d7535966ffa/resources/ios/icon/icon-40.png -------------------------------------------------------------------------------- /resources/ios/icon/icon-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IonicBlog/ionic3-dress/1d32e60799f42d4381c547325e364d7535966ffa/resources/ios/icon/icon-40@2x.png -------------------------------------------------------------------------------- /resources/ios/icon/icon-40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IonicBlog/ionic3-dress/1d32e60799f42d4381c547325e364d7535966ffa/resources/ios/icon/icon-40@3x.png -------------------------------------------------------------------------------- /resources/ios/icon/icon-50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IonicBlog/ionic3-dress/1d32e60799f42d4381c547325e364d7535966ffa/resources/ios/icon/icon-50.png -------------------------------------------------------------------------------- /resources/ios/icon/icon-50@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IonicBlog/ionic3-dress/1d32e60799f42d4381c547325e364d7535966ffa/resources/ios/icon/icon-50@2x.png -------------------------------------------------------------------------------- /resources/ios/icon/icon-60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IonicBlog/ionic3-dress/1d32e60799f42d4381c547325e364d7535966ffa/resources/ios/icon/icon-60.png -------------------------------------------------------------------------------- /resources/ios/icon/icon-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IonicBlog/ionic3-dress/1d32e60799f42d4381c547325e364d7535966ffa/resources/ios/icon/icon-60@2x.png -------------------------------------------------------------------------------- /resources/ios/icon/icon-60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IonicBlog/ionic3-dress/1d32e60799f42d4381c547325e364d7535966ffa/resources/ios/icon/icon-60@3x.png -------------------------------------------------------------------------------- /resources/ios/icon/icon-72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IonicBlog/ionic3-dress/1d32e60799f42d4381c547325e364d7535966ffa/resources/ios/icon/icon-72.png -------------------------------------------------------------------------------- /resources/ios/icon/icon-72@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IonicBlog/ionic3-dress/1d32e60799f42d4381c547325e364d7535966ffa/resources/ios/icon/icon-72@2x.png -------------------------------------------------------------------------------- /resources/ios/icon/icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IonicBlog/ionic3-dress/1d32e60799f42d4381c547325e364d7535966ffa/resources/ios/icon/icon-76.png -------------------------------------------------------------------------------- /resources/ios/icon/icon-76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IonicBlog/ionic3-dress/1d32e60799f42d4381c547325e364d7535966ffa/resources/ios/icon/icon-76@2x.png -------------------------------------------------------------------------------- /resources/ios/icon/icon-83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IonicBlog/ionic3-dress/1d32e60799f42d4381c547325e364d7535966ffa/resources/ios/icon/icon-83.5@2x.png -------------------------------------------------------------------------------- /resources/ios/icon/icon-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IonicBlog/ionic3-dress/1d32e60799f42d4381c547325e364d7535966ffa/resources/ios/icon/icon-small.png -------------------------------------------------------------------------------- /resources/ios/icon/icon-small@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IonicBlog/ionic3-dress/1d32e60799f42d4381c547325e364d7535966ffa/resources/ios/icon/icon-small@2x.png -------------------------------------------------------------------------------- /resources/ios/icon/icon-small@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IonicBlog/ionic3-dress/1d32e60799f42d4381c547325e364d7535966ffa/resources/ios/icon/icon-small@3x.png -------------------------------------------------------------------------------- /resources/ios/icon/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IonicBlog/ionic3-dress/1d32e60799f42d4381c547325e364d7535966ffa/resources/ios/icon/icon.png -------------------------------------------------------------------------------- /resources/ios/icon/icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IonicBlog/ionic3-dress/1d32e60799f42d4381c547325e364d7535966ffa/resources/ios/icon/icon@2x.png -------------------------------------------------------------------------------- /resources/ios/splash/Default-568h@2x~iphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IonicBlog/ionic3-dress/1d32e60799f42d4381c547325e364d7535966ffa/resources/ios/splash/Default-568h@2x~iphone.png -------------------------------------------------------------------------------- /resources/ios/splash/Default-667h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IonicBlog/ionic3-dress/1d32e60799f42d4381c547325e364d7535966ffa/resources/ios/splash/Default-667h.png -------------------------------------------------------------------------------- /resources/ios/splash/Default-736h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IonicBlog/ionic3-dress/1d32e60799f42d4381c547325e364d7535966ffa/resources/ios/splash/Default-736h.png -------------------------------------------------------------------------------- /resources/ios/splash/Default-Landscape-736h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IonicBlog/ionic3-dress/1d32e60799f42d4381c547325e364d7535966ffa/resources/ios/splash/Default-Landscape-736h.png -------------------------------------------------------------------------------- /resources/ios/splash/Default-Landscape@2x~ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IonicBlog/ionic3-dress/1d32e60799f42d4381c547325e364d7535966ffa/resources/ios/splash/Default-Landscape@2x~ipad.png -------------------------------------------------------------------------------- /resources/ios/splash/Default-Landscape@~ipadpro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IonicBlog/ionic3-dress/1d32e60799f42d4381c547325e364d7535966ffa/resources/ios/splash/Default-Landscape@~ipadpro.png -------------------------------------------------------------------------------- /resources/ios/splash/Default-Landscape~ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IonicBlog/ionic3-dress/1d32e60799f42d4381c547325e364d7535966ffa/resources/ios/splash/Default-Landscape~ipad.png -------------------------------------------------------------------------------- /resources/ios/splash/Default-Portrait@2x~ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IonicBlog/ionic3-dress/1d32e60799f42d4381c547325e364d7535966ffa/resources/ios/splash/Default-Portrait@2x~ipad.png -------------------------------------------------------------------------------- /resources/ios/splash/Default-Portrait@~ipadpro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IonicBlog/ionic3-dress/1d32e60799f42d4381c547325e364d7535966ffa/resources/ios/splash/Default-Portrait@~ipadpro.png -------------------------------------------------------------------------------- /resources/ios/splash/Default-Portrait~ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IonicBlog/ionic3-dress/1d32e60799f42d4381c547325e364d7535966ffa/resources/ios/splash/Default-Portrait~ipad.png -------------------------------------------------------------------------------- /resources/ios/splash/Default@2x~iphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IonicBlog/ionic3-dress/1d32e60799f42d4381c547325e364d7535966ffa/resources/ios/splash/Default@2x~iphone.png -------------------------------------------------------------------------------- /resources/ios/splash/Default~iphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IonicBlog/ionic3-dress/1d32e60799f42d4381c547325e364d7535966ffa/resources/ios/splash/Default~iphone.png -------------------------------------------------------------------------------- /resources/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IonicBlog/ionic3-dress/1d32e60799f42d4381c547325e364d7535966ffa/resources/splash.png -------------------------------------------------------------------------------- /resources/splash.png.md5: -------------------------------------------------------------------------------- 1 | 0dcf1df8c92c1ece4382d3357d9f8562 -------------------------------------------------------------------------------- /screens/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IonicBlog/ionic3-dress/1d32e60799f42d4381c547325e364d7535966ffa/screens/1.jpg -------------------------------------------------------------------------------- /screens/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IonicBlog/ionic3-dress/1d32e60799f42d4381c547325e364d7535966ffa/screens/2.jpg -------------------------------------------------------------------------------- /src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | import { Platform } from 'ionic-angular'; 3 | import { StatusBar } from '@ionic-native/status-bar'; 4 | import { SplashScreen } from '@ionic-native/splash-screen'; 5 | 6 | @Component({ 7 | templateUrl: 'app.html' 8 | }) 9 | export class MyApp { 10 | rootPage: any = 'TabsPage'; 11 | 12 | constructor(platform: Platform, statusBar: StatusBar, splashScreen: SplashScreen) { 13 | platform.ready().then(() => { 14 | statusBar.styleDefault(); 15 | splashScreen.hide(); 16 | }); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/app/app.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/app/app.module.ts: -------------------------------------------------------------------------------- 1 | import { AppShare } from './app.share'; 2 | import { HttpModule } from '@angular/http'; 3 | import { AppService } from './app.service'; 4 | import { NgModule, ErrorHandler } from '@angular/core'; 5 | import { BrowserModule } from '@angular/platform-browser'; 6 | import { IonicApp, IonicModule, IonicErrorHandler } from 'ionic-angular'; 7 | import { MyApp } from './app.component'; 8 | 9 | import { StatusBar } from '@ionic-native/status-bar'; 10 | import { SplashScreen } from '@ionic-native/splash-screen'; 11 | 12 | @NgModule({ 13 | declarations: [ 14 | MyApp 15 | ], 16 | imports: [ 17 | BrowserModule, HttpModule, 18 | IonicModule.forRoot(MyApp) 19 | ], 20 | bootstrap: [IonicApp], 21 | entryComponents: [ 22 | MyApp 23 | ], 24 | providers: [ 25 | StatusBar, 26 | SplashScreen, AppService,AppShare, 27 | { provide: ErrorHandler, useClass: IonicErrorHandler } 28 | ] 29 | }) 30 | export class AppModule { } 31 | -------------------------------------------------------------------------------- /src/app/app.scss: -------------------------------------------------------------------------------- 1 | // http://ionicframework.com/docs/theming/ 2 | 3 | 4 | // App Global Sass 5 | // -------------------------------------------------- 6 | // Put style rules here that you want to apply globally. These 7 | // styles are for the entire app and not just one component. 8 | // Additionally, this file can be also used as an entry point 9 | // to import other Sass files to be included in the output CSS. 10 | // 11 | // Shared Sass variables, which can be used to adjust Ionic's 12 | // default Sass variables, belong in "theme/variables.scss". 13 | // 14 | // To declare rules for a specific mode, create a child rule 15 | // for the .md, .ios, or .wp mode classes. The mode class is 16 | // automatically applied to the element in the app. 17 | -------------------------------------------------------------------------------- /src/app/app.service.ts: -------------------------------------------------------------------------------- 1 | import { LoadingController, AlertController, ToastController } from 'ionic-angular'; 2 | import { Injectable } from '@angular/core'; 3 | import { Http } from '@angular/http'; 4 | import 'rxjs/add/operator/toPromise'; 5 | 6 | @Injectable() 7 | export class AppGlobal { 8 | 9 | static cache: any = { 10 | slides: "_dress_slides", 11 | categories: "_dress_categories", 12 | products: "_dress_products" 13 | } 14 | 15 | static domain = "https://tlimama.tongedev.cn" 16 | 17 | static API: any = { 18 | getCategories: '/api/ionic3/getCategories', 19 | getProducts: '/api/ionic3/getProducts', 20 | getDetails: '/api/ionic3/details' 21 | }; 22 | 23 | } 24 | 25 | @Injectable() 26 | export class AppService { 27 | 28 | 29 | constructor(public http: Http, public loadingCtrl: LoadingController, private alertCtrl: AlertController, private toastCtrl: ToastController, ) { } 30 | 31 | encode(params) { 32 | var str = ''; 33 | if (params) { 34 | for (var key in params) { 35 | if (params.hasOwnProperty(key)) { 36 | var value = params[key]; 37 | str += encodeURIComponent(key) + '=' + encodeURIComponent(value) + '&'; 38 | } 39 | } 40 | str = '?' + str.substring(0, str.length - 1); 41 | } 42 | return str; 43 | } 44 | 45 | httpGet(url, params, callback, loader: boolean = false) { 46 | let loading = this.loadingCtrl.create({}); 47 | if (loader) { 48 | loading.present(); 49 | } 50 | this.http.get(AppGlobal.domain + url + this.encode(params)) 51 | .toPromise() 52 | .then(res => { 53 | var d = res.json(); 54 | if (loader) { 55 | loading.dismiss(); 56 | } 57 | callback(d == null ? "[]" : d); 58 | }) 59 | .catch(error => { 60 | if (loader) { 61 | loading.dismiss(); 62 | } 63 | this.handleError(error); 64 | }); 65 | } 66 | 67 | httpPost(url, params, callback, loader: boolean = false) { 68 | let loading = this.loadingCtrl.create(); 69 | if (loader) { 70 | loading.present(); 71 | } 72 | this.http.post(AppGlobal.domain + url, params) 73 | .toPromise() 74 | .then(res => { 75 | var d = res.json(); 76 | if (loader) { 77 | loading.dismiss(); 78 | } 79 | callback(d == null ? "[]" : d); 80 | }).catch(error => { 81 | if (loader) { 82 | loading.dismiss(); 83 | } 84 | this.handleError(error); 85 | }); 86 | } 87 | 88 | private handleError(error: Response | any) { 89 | let msg = ''; 90 | if (error.status == 400) { 91 | msg = '请求无效(code:404)'; 92 | console.log('请检查参数类型是否匹配'); 93 | } 94 | if (error.status == 404) { 95 | msg = '请求资源不存在(code:404)'; 96 | console.error(msg + ',请检查路径是否正确'); 97 | } 98 | if (error.status == 500) { 99 | msg = '服务器发生错误(code:500)'; 100 | console.error(msg + ',请检查路径是否正确'); 101 | } 102 | console.log(error); 103 | if (msg != '') { 104 | this.toast(msg); 105 | } 106 | } 107 | 108 | getResources(url, callback) { 109 | this.http.get(url).subscribe(res => { 110 | callback(res.json() == null ? "[]" : res.json()); 111 | }) 112 | } 113 | 114 | alert(message, callback?) { 115 | if (callback) { 116 | let alert = this.alertCtrl.create({ 117 | title: '提示', 118 | message: message, 119 | buttons: [{ 120 | text: "确定", 121 | handler: data => { 122 | callback(); 123 | } 124 | }] 125 | }); 126 | alert.present(); 127 | } else { 128 | let alert = this.alertCtrl.create({ 129 | title: '提示', 130 | message: message, 131 | buttons: ["确定"] 132 | }); 133 | alert.present(); 134 | } 135 | } 136 | 137 | toast(message, callback?) { 138 | let toast = this.toastCtrl.create({ 139 | message: message, 140 | duration: 2000, 141 | dismissOnPageChange: true, 142 | }); 143 | toast.present(); 144 | if (callback) { 145 | callback(); 146 | } 147 | } 148 | 149 | setItem(key: string, obj: any) { 150 | try { 151 | var json = JSON.stringify(obj); 152 | window.localStorage[key] = json; 153 | } 154 | catch (e) { 155 | console.error("window.localStorage error:" + e); 156 | } 157 | } 158 | getItem(key: string, callback) { 159 | try { 160 | var json = window.localStorage[key]; 161 | var obj = JSON.parse(json); 162 | callback(obj); 163 | } 164 | catch (e) { 165 | console.error("window.localStorage error:" + e); 166 | } 167 | } 168 | 169 | } 170 | -------------------------------------------------------------------------------- /src/app/app.share.ts: -------------------------------------------------------------------------------- 1 | import { LoadingController, Platform } from 'ionic-angular'; 2 | import { Injectable } from '@angular/core'; 3 | 4 | declare var Wechat; 5 | declare var QQSDK; 6 | 7 | 8 | @Injectable() 9 | export class AppShare { 10 | 11 | //标题 12 | title: string = "女装尖货 - 单件月销1.8万" 13 | //描述 14 | description: string = "行业精选女装 好货任你挑"; 15 | //分享链接 16 | link: string = "http://dress.tongedev.cn"; 17 | //分享图片 18 | image: string = "https://mmbiz.qlogo.cn/mmbiz_png/khImeKLbVF7u5qdXdicpapLl9diadj5db6xHxdlVgxmYPxkYOR8WyVgOw4tn3EHEsvd9hlfu7zEpgVLYkLh28Nibg/0?wx_fmt=png"; 19 | 20 | constructor(public loadingCtrl: LoadingController, platform: Platform) { 21 | if (platform.is('ios')) { 22 | this.link = "https://itunes.apple.com/cn/app/女装尖货-单件月销1-8万/id1194942857?mt=8"; 23 | } 24 | else if (platform.is('android')) { 25 | this.link = "http://a.app.qq.com/o/simple.jsp?pkgname=cn.tongedev.dress"; 26 | } else { 27 | this.link = "http://dress.tongedev.cn"; 28 | } 29 | } 30 | 31 | wxShare(scene) { 32 | var loading = this.loadingCtrl.create({ showBackdrop: false }); 33 | loading.present(); 34 | try { 35 | Wechat.share({ 36 | message: { 37 | title: this.title, 38 | description: this.description, 39 | thumb: this.image, 40 | mediaTagName: "TEST-TAG-001", 41 | messageExt: "", // 这是第三方带的测试字段 42 | messageAction: "", // dotalist 43 | media: { 44 | type: Wechat.Type.WEBPAGE, 45 | webpageUrl: this.link 46 | } 47 | }, 48 | scene: scene == 0 ? Wechat.Scene.SESSION : Wechat.Scene.Timeline // share to Timeline 49 | }, function () { 50 | // alert("分享成功!"); 51 | }, function (reason) { 52 | // alert("Failed: " + reason); 53 | }); 54 | } catch (error) { 55 | console.log(error); 56 | } finally { 57 | loading.dismiss(); 58 | } 59 | } 60 | 61 | qqShare(scene) { 62 | var loading = this.loadingCtrl.create({ showBackdrop: false }); 63 | loading.present(); 64 | try { 65 | var args: any = {}; 66 | if (scene == 0) { 67 | args.scene = QQSDK.Scene.QQ;//QQSDK.Scene.QQZone,QQSDK.Scene.Favorite 68 | } 69 | else { 70 | args.scene = QQSDK.Scene.QQZone; 71 | } 72 | args.url = this.link; 73 | args.title = this.title; 74 | args.description = this.description; 75 | args.image = this.image; 76 | QQSDK.shareNews(function () { 77 | loading.dismiss(); 78 | }, function (failReason) { 79 | loading.dismiss(); 80 | }, args); 81 | } catch (error) { 82 | console.log(error); 83 | } finally { 84 | loading.dismiss(); 85 | } 86 | } 87 | 88 | } 89 | -------------------------------------------------------------------------------- /src/app/main.ts: -------------------------------------------------------------------------------- 1 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 2 | 3 | import { AppModule } from './app.module'; 4 | 5 | platformBrowserDynamic().bootstrapModule(AppModule); 6 | -------------------------------------------------------------------------------- /src/assets/icon/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IonicBlog/ionic3-dress/1d32e60799f42d4381c547325e364d7535966ffa/src/assets/icon/favicon.ico -------------------------------------------------------------------------------- /src/assets/icon/iconfont.css: -------------------------------------------------------------------------------- 1 | 2 | @font-face {font-family: "iconfont"; 3 | src: url('iconfont.eot?t=1502417957943'); /* IE9*/ 4 | src: url('iconfont.eot?t=1502417957943#iefix') format('embedded-opentype'), /* IE6-IE8 */ 5 | url('iconfont.woff?t=1502417957943') format('woff'), /* chrome, firefox */ 6 | url('iconfont.ttf?t=1502417957943') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/ 7 | url('iconfont.svg?t=1502417957943#iconfont') format('svg'); /* iOS 4.1- */ 8 | } 9 | 10 | .iconfont { 11 | font-family:"iconfont" !important; 12 | font-size:16px; 13 | font-style:normal; 14 | -webkit-font-smoothing: antialiased; 15 | -moz-osx-font-smoothing: grayscale; 16 | } 17 | 18 | .icon-xizhuang:before { content: "\e600"; } 19 | 20 | .icon-hunshalifu:before { content: "\e601"; } 21 | 22 | .icon-yurongfu:before { content: "\e602"; } 23 | 24 | .icon-qipao:before { content: "\e603"; } 25 | 26 | .icon-dadiku:before { content: "\e604"; } 27 | 28 | .icon-fengyizhong:before { content: "\e605"; } 29 | 30 | .icon-xiuxianku:before { content: "\e649"; } 31 | 32 | .icon-weiyi:before { content: "\e606"; } 33 | 34 | .icon-lianyiqun:before { content: "\e612"; } 35 | 36 | .icon-tubiaomoban12:before { content: "\e607"; } 37 | 38 | .icon-40:before { content: "\e608"; } 39 | 40 | .icon-waitao:before { content: "\e609"; } 41 | 42 | .icon-tshirt:before { content: "\e64a"; } 43 | 44 | .icon-xizhuangzhuanhuan:before { content: "\e60a"; } 45 | 46 | .icon-weiyizhuanhuan:before { content: "\e60b"; } 47 | 48 | .icon-yurongyizhuanhuan:before { content: "\e611"; } 49 | 50 | .icon-maoyizhuanhuan:before { content: "\e610"; } 51 | 52 | .icon-dayizhuanhuan:before { content: "\e60c"; } 53 | 54 | .icon-qipao1:before { content: "\e60d"; } 55 | 56 | .icon-chenshan:before { content: "\e636"; } 57 | 58 | .icon-waitao1:before { content: "\e60e"; } 59 | 60 | .icon-banshenqun:before { content: "\e613"; } 61 | 62 | .icon-fushineiyi:before { content: "\e60f"; } 63 | 64 | .icon-chenshan1:before { content: "\e6ae"; } 65 | 66 | .icon-beixin:before { content: "\e631"; } 67 | 68 | .icon-niuziku-nv:before { content: "\e637"; } 69 | 70 | -------------------------------------------------------------------------------- /src/assets/icon/iconfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IonicBlog/ionic3-dress/1d32e60799f42d4381c547325e364d7535966ffa/src/assets/icon/iconfont.eot -------------------------------------------------------------------------------- /src/assets/icon/iconfont.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | Created by iconfont 9 | 10 | 11 | 12 | 13 | 21 | 22 | 23 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | -------------------------------------------------------------------------------- /src/assets/icon/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IonicBlog/ionic3-dress/1d32e60799f42d4381c547325e364d7535966ffa/src/assets/icon/iconfont.ttf -------------------------------------------------------------------------------- /src/assets/icon/iconfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IonicBlog/ionic3-dress/1d32e60799f42d4381c547325e364d7535966ffa/src/assets/icon/iconfont.woff -------------------------------------------------------------------------------- /src/components/components.module.ts: -------------------------------------------------------------------------------- 1 | import { IonicModule } from 'ionic-angular'; 2 | import { NgModule } from '@angular/core'; 3 | import { IonProductsComponent } from './ion-products/ion-products'; 4 | 5 | @NgModule({ 6 | declarations: [IonProductsComponent], 7 | imports: [ 8 | IonicModule 9 | ], 10 | exports: [IonProductsComponent] 11 | }) 12 | export class ComponentsModule { } 13 | -------------------------------------------------------------------------------- /src/components/ion-products/ion-products.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | 5 | 6 |

{{p.Title}}

7 |
8 | {{p.ZkFinalPrice}} 9 | {{p.ReservePrice}} 10 |
11 |
12 |
13 |
14 | -------------------------------------------------------------------------------- /src/components/ion-products/ion-products.scss: -------------------------------------------------------------------------------- 1 | ion-products { 2 | .product { 3 | ion-row { 4 | background-color: #efefef; 5 | font-family: "Helvetica Neue", Helvetica, STHeiTi, sans-serif; 6 | padding-top: 3px; 7 | ion-col { 8 | position: relative; 9 | background-color: white; 10 | border: 2px solid #efefef; 11 | border-radius: 2px; 12 | padding: 0px; 13 | p { 14 | margin: 0px; 15 | padding: 0px; 16 | width: 100%; 17 | font-size: 12px; 18 | font-family: "黑体-简"; 19 | font-weight: 300; 20 | color: #808080; 21 | height: 26px; 22 | line-height: 26px; 23 | background: rgba(255, 255, 255, 0.8); 24 | overflow: hidden; 25 | text-indent: 5px; 26 | } 27 | } 28 | } 29 | .list-price { 30 | width: 98%; 31 | height: 26px; 32 | line-height: 18px; 33 | position: relative; 34 | bottom: 0; 35 | margin: 0 2%; 36 | } 37 | .price-new { 38 | font-size: 18px; 39 | color: #f8285c; 40 | } 41 | .list-price i { 42 | font-style: normal; 43 | font-size: 12px; 44 | } 45 | .del { 46 | color: rgba(171, 171, 171, 1); 47 | text-decoration: line-through; 48 | margin-left: 2px; 49 | } 50 | .good-btn { 51 | display: block; 52 | position: absolute; 53 | height: 16px; 54 | line-height: 12px; 55 | color: #f8285c; 56 | font-size: 13px; 57 | font-family: "黑体-简"; 58 | text-align: right; 59 | top: 5px; 60 | right: 2px; 61 | } 62 | .quan_img { 63 | position: absolute; 64 | width: 61px; 65 | height: 55px; 66 | z-index: 5; 67 | right: 0; 68 | top: 0; 69 | cursor: pointer; 70 | background: url(/assets/img/quan.png) no-repeat; 71 | background-size: contain; 72 | color: #fff; 73 | } 74 | .quan_img .num_money { 75 | font-family: Arial; 76 | font-size: 18px; 77 | height: 40px; 78 | left: 9px; 79 | position: absolute; 80 | text-align: center; 81 | top: 14px; 82 | width: 40px; 83 | } 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /src/components/ion-products/ion-products.ts: -------------------------------------------------------------------------------- 1 | import { NavController } from 'ionic-angular'; 2 | import { Component, Input } from '@angular/core'; 3 | 4 | @Component({ 5 | selector: 'ion-products', 6 | templateUrl: 'ion-products.html' 7 | }) 8 | export class IonProductsComponent { 9 | @Input() products: Array = []; 10 | constructor(public navCtrl: NavController) { 11 | console.log('Hello IonProducts Component'); 12 | } 13 | goDetails(item) { 14 | this.navCtrl.push('ProductDetailsPage', { item: item }); 15 | } 16 | } -------------------------------------------------------------------------------- /src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Ionic App 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /src/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Ionic", 3 | "short_name": "Ionic", 4 | "start_url": "index.html", 5 | "display": "standalone", 6 | "icons": [{ 7 | "src": "assets/imgs/logo.png", 8 | "sizes": "512x512", 9 | "type": "image/png" 10 | }], 11 | "background_color": "#4e8ef7", 12 | "theme_color": "#4e8ef7" 13 | } -------------------------------------------------------------------------------- /src/pages/about/about.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 个人中心 5 | 6 | 7 | 8 | 9 | 10 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /src/pages/about/about.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { IonicPageModule } from 'ionic-angular'; 3 | import { AboutPage } from './about'; 4 | 5 | @NgModule({ 6 | declarations: [ 7 | AboutPage, 8 | ], 9 | imports: [ 10 | IonicPageModule.forChild(AboutPage), 11 | ], 12 | }) 13 | export class AboutPageModule { } 14 | -------------------------------------------------------------------------------- /src/pages/about/about.scss: -------------------------------------------------------------------------------- 1 | page-about { 2 | 3 | } 4 | -------------------------------------------------------------------------------- /src/pages/about/about.ts: -------------------------------------------------------------------------------- 1 | import { ThemeableBrowser } from 'ionic-native'; 2 | import { Component } from '@angular/core'; 3 | import { NavController, IonicPage } from 'ionic-angular'; 4 | 5 | @IonicPage() 6 | @Component({ 7 | selector: 'page-about', 8 | templateUrl: 'about.html' 9 | }) 10 | export class AboutPage { 11 | items = [ 12 | { title: "我的淘宝", link: "https://h5.m.taobao.com/mlapp/mytaobao.html#mlapp-mytaobao" }, 13 | { title: "购物车", link: "https://h5.m.taobao.com/mlapp/cart.html" }, 14 | { title: "我的订单", link: "https://h5.m.taobao.com/mlapp/olist.html" }, 15 | { title: "待付款", link: "https://h5.m.taobao.com/mlapp/olist.html?spm=a2141.7756461.2.1&tabCode=waitPay" }, 16 | { title: "待发货", link: "https://h5.m.taobao.com/mlapp/olist.html?spm=a2141.7756461.2.2&tabCode=waitSend" }, 17 | { title: "待收货", link: "https://h5.m.taobao.com/mlapp/olist.html?spm=a2141.7756461.2.3&tabCode=waitConfirm" }, 18 | { title: "待评价", link: "https://h5.m.taobao.com/mlapp/olist.html?spm=a2141.7756461.2.4&tabCode=waitRate" } 19 | ]; 20 | constructor(public navCtrl: NavController) { 21 | } 22 | 23 | itemClick(item) { 24 | let options = { 25 | statusbar: { 26 | color: '#f8285c' 27 | }, 28 | toolbar: { 29 | height: 44, 30 | color: '#f8285c' 31 | }, 32 | title: { 33 | color: '#ffffffff', 34 | showPageTitle: true 35 | }, 36 | backButton: { 37 | image: 'back', 38 | imagePressed: 'back_pressed', 39 | align: 'left', 40 | event: 'backPressed' 41 | }, 42 | backButtonCanClose: true 43 | }; 44 | new ThemeableBrowser(item.link, '_blank', options) 45 | } 46 | 47 | } 48 | -------------------------------------------------------------------------------- /src/pages/contact/contact.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 优惠精选 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | {{c.FavoritesTitle}} 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 没有商品啦 ♪(^∇^*) 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /src/pages/contact/contact.module.ts: -------------------------------------------------------------------------------- 1 | import { ComponentsModule } from './../../components/components.module'; 2 | import { NgModule } from '@angular/core'; 3 | import { IonicPageModule } from 'ionic-angular'; 4 | import { ContactPage } from './contact'; 5 | 6 | @NgModule({ 7 | declarations: [ 8 | ContactPage, 9 | ], 10 | imports: [ 11 | IonicPageModule.forChild(ContactPage),ComponentsModule 12 | ], 13 | }) 14 | export class ContactPageModule { } 15 | -------------------------------------------------------------------------------- /src/pages/contact/contact.scss: -------------------------------------------------------------------------------- 1 | page-contact { 2 | background: #efefef; 3 | .menus { 4 | height: 100%; 5 | ion-scroll { 6 | background-color: #efefef; 7 | } 8 | } 9 | .items { 10 | height: 100%; 11 | ion-scroll { 12 | background-color: #fff; 13 | } 14 | } 15 | ion-grid { 16 | padding: 0px; 17 | margin: 0px; 18 | height: 100%; 19 | ion-row { 20 | padding: 0px; 21 | margin: 0px; 22 | height: 100%; 23 | ion-col { 24 | padding: 0px; 25 | margin: 0px; 26 | } 27 | } 28 | } 29 | ion-list { 30 | ion-item { 31 | background: #efefef; 32 | } 33 | } 34 | .product { 35 | .scroll-content { 36 | margin-bottom: 0px; 37 | } 38 | } 39 | .menus { 40 | .active { 41 | background: #fff; 42 | } 43 | ion-item { 44 | background: #efefef; 45 | ion-label { 46 | font-family: "黑体"; 47 | font-size: 90%; 48 | } 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/pages/contact/contact.ts: -------------------------------------------------------------------------------- 1 | import { AppGlobal, AppService } from './../../app/app.service'; 2 | import { Component, ViewChild } from '@angular/core'; 3 | import { NavController, IonicPage } from 'ionic-angular'; 4 | 5 | @IonicPage() 6 | @Component({ 7 | selector: 'page-contact', 8 | templateUrl: 'contact.html' 9 | }) 10 | export class ContactPage { 11 | 12 | @ViewChild('scroll') scrollElement: any; 13 | @ViewChild('spinner') spinnerElement: any; 14 | 15 | categories: Array = []; 16 | selectedMenuTarget: any; 17 | products: Array = []; 18 | hasmore = true; 19 | 20 | islock = false; 21 | 22 | params = { 23 | favoritesId: 0, 24 | pageNo: 1 25 | } 26 | 27 | constructor(public navCtrl: NavController, 28 | public appService: AppService) { 29 | 30 | } 31 | 32 | ionViewDidLoad() { 33 | this.getCategories(); 34 | this.addScrollEventListener(); 35 | } 36 | 37 | addScrollEventListener() { 38 | // lumia android 517 39 | // iphone5 474 40 | // iphone6 573 41 | // iphone6 plus 642 42 | this.scrollElement._scrollContent.nativeElement.onscroll = event => { 43 | // var offset = event.target.scrollHeight - event.target.scrollTop; 44 | // var rs = event.target.scrollHeight + " -- " + event.target.scrollTop + " offset :" + offset; 45 | // console.log(rs); 46 | if (this.spinnerElement) { 47 | //元素顶端到可见区域顶端的距离 48 | var top = this.spinnerElement.nativeElement.getBoundingClientRect().top; 49 | //可见区域高度 50 | var clientHeight = document.documentElement.clientHeight; 51 | if (top <= clientHeight) { 52 | console.log("ready loadmore..."); 53 | this.doInfinite(); 54 | } 55 | } 56 | } 57 | } 58 | 59 | // 获取左侧菜单 60 | getCategories() { 61 | this.appService.httpGet(AppGlobal.API.getCategories, { appTag: 'dress' }, rs => { 62 | console.debug(rs); 63 | this.categories = rs.data; 64 | //默认获取第一个分类的商品列表 65 | this.params.favoritesId = this.categories[0].FavoritesId; 66 | this.getProducts(); 67 | }) 68 | } 69 | 70 | // 选中左侧菜单 71 | itemClick(c, event) { 72 | 73 | var initSelected: any = document.getElementsByClassName('menuItem'); 74 | if (initSelected[0].classList.contains("active")) { 75 | initSelected[0].classList.remove("active") 76 | } 77 | 78 | //移除上次选中菜单的样式 79 | if (this.selectedMenuTarget) { 80 | this.selectedMenuTarget.classList.remove("active") 81 | } 82 | 83 | //修改本次选中菜单的样式 84 | event.currentTarget.classList.add("active"); 85 | 86 | //将本次选中的菜单记录 87 | this.selectedMenuTarget = event.currentTarget; 88 | 89 | this.hasmore = true; 90 | 91 | this.params.favoritesId = c.FavoritesId; 92 | this.params.pageNo = 1; 93 | this.products = []; 94 | 95 | this.getProducts(); 96 | } 97 | 98 | getProducts() { 99 | this.appService.httpGet(AppGlobal.API.getProducts, this.params, rs => { 100 | this.products = rs.data; 101 | this.params.pageNo += 1; 102 | }) 103 | } 104 | 105 | doInfinite() { 106 | if (this.islock) { 107 | return; 108 | } 109 | if (this.hasmore == false) { 110 | return; 111 | } 112 | this.islock = true; 113 | this.appService.httpGet(AppGlobal.API.getProducts, this.params, d => { 114 | this.islock = false; 115 | if (d.data.length > 0) { 116 | this.products = this.products.concat(d.data); 117 | this.params.pageNo += 1; 118 | } else { 119 | this.hasmore = false; 120 | console.log("没有数据啦!") 121 | } 122 | }); 123 | } 124 | 125 | goDetails(item) { 126 | this.navCtrl.push('ProductDetailsPage', { item: item }); 127 | } 128 | } 129 | -------------------------------------------------------------------------------- /src/pages/home/home.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 首页 4 | 5 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | {{item.Title}} 25 |
26 |
27 | 28 | 29 |
30 | 31 | 32 | 33 | 34 | {{c.FavoritesTitle}} 35 | 36 | 37 | 38 |
39 | 40 | 年会礼服2017年新款 41 | 42 | 43 |
44 | -------------------------------------------------------------------------------- /src/pages/home/home.module.ts: -------------------------------------------------------------------------------- 1 | import { ComponentsModule } from './../../components/components.module'; 2 | import { NgModule } from '@angular/core'; 3 | import { IonicPageModule } from 'ionic-angular'; 4 | import { HomePage } from './home'; 5 | 6 | @NgModule({ 7 | declarations: [ 8 | HomePage 9 | ], 10 | imports: [ 11 | IonicPageModule.forChild(HomePage),ComponentsModule 12 | ], 13 | }) 14 | export class HomePageModule { } 15 | -------------------------------------------------------------------------------- /src/pages/home/home.scss: -------------------------------------------------------------------------------- 1 | page-home { 2 | ion-slides { 3 | height: 30%; 4 | .cover { 5 | position: absolute; 6 | bottom: 0px; 7 | width: 100%; 8 | height: 20px; 9 | background: linear-gradient(to right, #673743, #f9537d); 10 | opacity: 0.6; 11 | } 12 | .title { 13 | position: absolute; 14 | bottom: 0px; 15 | width: 90%; 16 | height: 20px; 17 | line-height: 20px; 18 | font-size: 60%; 19 | left: 5px; 20 | text-align: center; 21 | color: white; 22 | } 23 | } 24 | .categories { 25 | .title { 26 | font-family: "黑体-简"; 27 | font-weight: 300; 28 | color: #808080; 29 | font-size: 80%; 30 | display: block; 31 | margin-top: 5px; 32 | } 33 | ion-row { 34 | background-color: #efefef; 35 | padding: 0px; 36 | } 37 | ion-col { 38 | background-color: white; 39 | /*border: 1px solid #efefef;*/ 40 | } 41 | } 42 | .icon { 43 | border-radius: 100px; 44 | color: white; 45 | background-color: #f8285c; 46 | font-size: 36px !important; 47 | padding: 5px; 48 | } 49 | .c1 { 50 | background-color: orangered; 51 | } 52 | .c2 { 53 | background-color: blueviolet; 54 | } 55 | .c3 { 56 | background-color: sandybrown; 57 | } 58 | .c4 { 59 | background-color: slateblue; 60 | } 61 | .c5 { 62 | background-color: orange; 63 | } 64 | .c6 { 65 | background-color: dimgray; 66 | } 67 | .t-header { 68 | font-family: "黑体-简"; 69 | font-weight: 300; 70 | color: #f8285c; 71 | border-left: 2px solid #f8285c; 72 | border-top: 5px solid #efefef; 73 | background: white; 74 | } 75 | .stores { 76 | .title { 77 | font-family: "黑体-简"; 78 | font-weight: 300; 79 | color: #808080; 80 | font-size: 80%; 81 | display: block; 82 | margin-top: 5px; 83 | } 84 | ion-row { 85 | background-color: #efefef; 86 | padding: 0px; 87 | } 88 | ion-col { 89 | background-color: white; 90 | border: 1px solid #efefef; 91 | } 92 | } 93 | 94 | } 95 | -------------------------------------------------------------------------------- /src/pages/home/home.ts: -------------------------------------------------------------------------------- 1 | import { AppShare } from './../../app/app.share'; 2 | import { AppService, AppGlobal } from './../../app/app.service'; 3 | import { Component } from '@angular/core'; 4 | import { NavController, IonicPage, ActionSheetController, LoadingController } from 'ionic-angular'; 5 | 6 | 7 | @IonicPage() 8 | @Component({ 9 | selector: 'page-home', 10 | templateUrl: 'home.html' 11 | }) 12 | export class HomePage { 13 | 14 | slides: Array = []; 15 | categories: Array = []; 16 | products: Array = []; 17 | 18 | spinner1: boolean = true; 19 | 20 | params = { 21 | favoritesId: 2054400, 22 | pageNo: 1, 23 | pageSize: 20 24 | } 25 | 26 | constructor(public appShare:AppShare,public loadingCtrl: LoadingController, public actionSheetCtrl: ActionSheetController, public appService: AppService, public navCtrl: NavController) { 27 | this.getSlides(); 28 | this.getCategories(); 29 | this.getProducts(); 30 | } 31 | //获取幻灯片 32 | getSlides() { 33 | var params = { 34 | favoritesId: 2056439, 35 | pageNo: 1, 36 | pageSize: 5 37 | } 38 | this.appService.httpGet(AppGlobal.API.getProducts, params, rs => { 39 | console.debug(rs); 40 | this.slides = rs.data; 41 | this.spinner1 = false; 42 | }) 43 | } 44 | //获取分类 45 | getCategories() { 46 | this.appService.httpGet(AppGlobal.API.getCategories, { appTag: 'dress' }, rs => { 47 | console.debug(rs); 48 | this.categories = rs.data; 49 | }) 50 | } 51 | //获取首页推荐列表 52 | getProducts() { 53 | this.appService.httpGet(AppGlobal.API.getProducts, this.params, rs => { 54 | console.debug(rs); 55 | this.products = rs.data; 56 | }) 57 | } 58 | //商品详情 59 | goDetails(item) { 60 | console.debug('go details...') 61 | } 62 | 63 | goProductList(item) { 64 | this.navCtrl.push('ProductListPage', { item: item }); 65 | } 66 | 67 | 68 | 69 | share(event) { 70 | let actionSheet = this.actionSheetCtrl.create({ 71 | title: '分享', 72 | buttons: [ 73 | { 74 | text: 'QQ好友', 75 | handler: () => { 76 | this.appShare.qqShare(0) 77 | } 78 | }, 79 | { 80 | text: 'QQ空间', 81 | handler: () => { 82 | this.appShare.qqShare(1) 83 | } 84 | }, 85 | { 86 | text: '微信好友', 87 | handler: () => { 88 | this.appShare.wxShare(0) 89 | } 90 | }, 91 | { 92 | text: '朋友圈', 93 | handler: () => { 94 | this.appShare.wxShare(1) 95 | } 96 | }, 97 | { 98 | text: '取消', 99 | role: 'cancel', 100 | handler: () => { 101 | console.log('Cancel clicked'); 102 | } 103 | } 104 | ] 105 | }); 106 | 107 | actionSheet.present(); 108 | } 109 | 110 | } 111 | -------------------------------------------------------------------------------- /src/pages/product-details/product-details.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 商品详情 4 | 5 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 |
19 | {{selectedItem.ZkFinalPrice}} 20 | ¥{{selectedItem.ReservePrice}} 21 |
22 |

{{selectedItem.Title}}

23 |
24 | 25 |
26 | 27 |
28 |
29 | -------------------------------------------------------------------------------- /src/pages/product-details/product-details.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { IonicPageModule } from 'ionic-angular'; 3 | import { ProductDetailsPage } from './product-details'; 4 | 5 | @NgModule({ 6 | declarations: [ 7 | ProductDetailsPage, 8 | ], 9 | imports: [ 10 | IonicPageModule.forChild(ProductDetailsPage), 11 | ], 12 | }) 13 | export class ProductDetailsPageModule {} 14 | -------------------------------------------------------------------------------- /src/pages/product-details/product-details.scss: -------------------------------------------------------------------------------- 1 | page-product-details { 2 | ion-col { 3 | padding: 0px; 4 | } 5 | .item-good .list-price { 6 | width: 96%; 7 | height: 34px; 8 | line-height: 35px; 9 | bottom: 0; 10 | padding: 2% 0; 11 | } 12 | .list-price .ml { 13 | color: #f8285c; 14 | margin-left: 27%; 15 | } 16 | .item-good h1 { 17 | width: 96%; 18 | font-size: 16px; 19 | font-weight: 500; 20 | color: rgba(102, 102, 102, 1); 21 | padding: 2%; 22 | text-align: center; 23 | } 24 | .item-good .list-price .f14 { 25 | font-size: 14px; 26 | } 27 | .item-good .list-price i { 28 | font-style: normal; 29 | font-size: 30px; 30 | } 31 | .item-good .price-new { 32 | font-size: 30px; 33 | } 34 | .list-price .ml2 { 35 | margin-left: 2%; 36 | } 37 | .item-good .del { 38 | color: rgba(171, 171, 171, 1); 39 | text-decoration: line-through; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/pages/product-details/product-details.ts: -------------------------------------------------------------------------------- 1 | import { ThemeableBrowser } from 'ionic-native'; 2 | import { Component } from '@angular/core'; 3 | import { IonicPage, NavController, NavParams } from 'ionic-angular'; 4 | 5 | @IonicPage() 6 | @Component({ 7 | selector: 'page-product-details', 8 | templateUrl: 'product-details.html', 9 | }) 10 | export class ProductDetailsPage { 11 | selectedItem: any; 12 | imgs: any; 13 | constructor(public navCtrl: NavController, public navParams: NavParams) { 14 | this.selectedItem = this.navParams.get("item"); 15 | if (this.selectedItem.SmallImages) { 16 | this.imgs = this.selectedItem.SmallImages; 17 | } 18 | } 19 | 20 | goBuy() { 21 | let options = { 22 | statusbar: { 23 | color: '#f8285c' 24 | }, 25 | toolbar: { 26 | height: 44, 27 | color: '#f8285c' 28 | }, 29 | title: { 30 | color: '#ffffffff', 31 | showPageTitle: true 32 | }, 33 | backButton: { 34 | image: 'back', 35 | imagePressed: 'back_pressed', 36 | align: 'left', 37 | event: 'backPressed' 38 | }, 39 | backButtonCanClose: true 40 | }; 41 | new ThemeableBrowser(this.selectedItem.ClickUrl, '_blank', options) 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/pages/product-list/product-list.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{selectedItem.FavoritesTitle}} 4 | 5 | 6 | 7 | 8 | 9 | 10 | 没有商品啦 ♪(^∇^*) 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/pages/product-list/product-list.module.ts: -------------------------------------------------------------------------------- 1 | import { ComponentsModule } from './../../components/components.module'; 2 | import { NgModule } from '@angular/core'; 3 | import { IonicPageModule } from 'ionic-angular'; 4 | import { ProductListPage } from './product-list'; 5 | 6 | @NgModule({ 7 | declarations: [ 8 | ProductListPage, 9 | ], 10 | imports: [ 11 | IonicPageModule.forChild(ProductListPage),ComponentsModule 12 | ], 13 | }) 14 | export class ProductListPageModule {} 15 | -------------------------------------------------------------------------------- /src/pages/product-list/product-list.scss: -------------------------------------------------------------------------------- 1 | page-product-list { 2 | 3 | } 4 | -------------------------------------------------------------------------------- /src/pages/product-list/product-list.ts: -------------------------------------------------------------------------------- 1 | import { AppService, AppGlobal } from './../../app/app.service'; 2 | import { Component } from '@angular/core'; 3 | import { IonicPage, NavController, NavParams } from 'ionic-angular'; 4 | 5 | @IonicPage() 6 | @Component({ 7 | selector: 'page-product-list', 8 | templateUrl: 'product-list.html', 9 | }) 10 | export class ProductListPage { 11 | hasmore = true; 12 | products: any; 13 | selectedItem: any; 14 | 15 | spinner1: boolean = true; 16 | 17 | params = { 18 | pageNo: 1, 19 | favoritesId: 0, 20 | } 21 | 22 | constructor(public navCtrl: NavController, public navParams: NavParams, public appService: AppService) { 23 | this.selectedItem = this.navParams.get("item"); 24 | this.params.favoritesId = this.selectedItem.FavoritesId; 25 | } 26 | 27 | ionViewDidLoad() { 28 | this.getFavoritesItems(); 29 | console.log('ionViewDidLoad ProductListPage'); 30 | } 31 | getFavoritesItems() { 32 | this.appService.httpGet(AppGlobal.API.getProducts, this.params, d => { 33 | this.products = d.data; 34 | this.params.pageNo += 1; 35 | this.spinner1 = false; 36 | }); 37 | } 38 | 39 | doInfinite(infiniteScroll) { 40 | if (this.hasmore == false) { 41 | infiniteScroll.complete(); 42 | return; 43 | } 44 | this.appService.httpGet(AppGlobal.API.getProducts,this.params, d => { 45 | if (d.data.length > 0) { 46 | this.products = this.products.concat(d.data); 47 | this.params.pageNo += 1; 48 | } else { 49 | this.hasmore = false; 50 | console.log("没有数据啦!") 51 | } 52 | infiniteScroll.complete(); 53 | }); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/pages/tabs/tabs.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/pages/tabs/tabs.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { IonicPageModule } from 'ionic-angular'; 3 | import { TabsPage } from './tabs'; 4 | 5 | @NgModule({ 6 | declarations: [ 7 | TabsPage, 8 | ], 9 | imports: [ 10 | IonicPageModule.forChild(TabsPage), 11 | ], 12 | }) 13 | export class TabsPageModule { } 14 | -------------------------------------------------------------------------------- /src/pages/tabs/tabs.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IonicBlog/ionic3-dress/1d32e60799f42d4381c547325e364d7535966ffa/src/pages/tabs/tabs.scss -------------------------------------------------------------------------------- /src/pages/tabs/tabs.ts: -------------------------------------------------------------------------------- 1 | import { IonicPage } from 'ionic-angular'; 2 | import { Component } from '@angular/core'; 3 | 4 | @IonicPage() 5 | @Component({ 6 | templateUrl: 'tabs.html' 7 | }) 8 | export class TabsPage { 9 | 10 | tab1Root = 'HomePage'; 11 | tab2Root = 'ContactPage'; 12 | tab3Root = 'AboutPage'; 13 | 14 | constructor() { 15 | 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/service-worker.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Check out https://googlechrome.github.io/sw-toolbox/ for 3 | * more info on how to use sw-toolbox to custom configure your service worker. 4 | */ 5 | 6 | 7 | 'use strict'; 8 | importScripts('./build/sw-toolbox.js'); 9 | 10 | self.toolbox.options.cache = { 11 | name: 'ionic-cache' 12 | }; 13 | 14 | // pre-cache our key assets 15 | self.toolbox.precache( 16 | [ 17 | './build/main.js', 18 | './build/vendor.js', 19 | './build/main.css', 20 | './build/polyfills.js', 21 | 'index.html', 22 | 'manifest.json' 23 | ] 24 | ); 25 | 26 | // dynamically cache any other local assets 27 | self.toolbox.router.any('/*', self.toolbox.cacheFirst); 28 | 29 | // for any other requests go to the network, cache, 30 | // and then only use that cached resource if your user goes offline 31 | self.toolbox.router.default = self.toolbox.networkFirst; 32 | -------------------------------------------------------------------------------- /src/theme/variables.scss: -------------------------------------------------------------------------------- 1 | // Ionic Variables and Theming. For more info, please see: 2 | // http://ionicframework.com/docs/theming/ 3 | 4 | // Font path is used to include ionicons, 5 | // roboto, and noto sans fonts 6 | $font-path: "../assets/fonts"; 7 | 8 | 9 | // The app direction is used to include 10 | // rtl styles in your app. For more info, please see: 11 | // http://ionicframework.com/docs/theming/rtl-support/ 12 | $app-direction: ltr; 13 | 14 | 15 | @import "ionic.globals"; 16 | 17 | 18 | // Shared Variables 19 | // -------------------------------------------------- 20 | // To customize the look and feel of this app, you can override 21 | // the Sass variables found in Ionic's source scss files. 22 | // To view all the possible Ionic variables, see: 23 | // http://ionicframework.com/docs/theming/overriding-ionic-variables/ 24 | 25 | 26 | 27 | 28 | // Named Color Variables 29 | // -------------------------------------------------- 30 | // Named colors makes it easy to reuse colors on various components. 31 | // It's highly recommended to change the default colors 32 | // to match your app's branding. Ionic uses a Sass map of 33 | // colors so you can add, rename and remove colors as needed. 34 | // The "primary" color is the only required color in the map. 35 | 36 | $colors: ( 37 | primary: #f8285c, 38 | secondary: #32db64, 39 | danger: #f53d3d, 40 | light: #f4f4f4, 41 | dark: #222 42 | ); 43 | 44 | 45 | // App iOS Variables 46 | // -------------------------------------------------- 47 | // iOS only Sass variables can go here 48 | 49 | 50 | 51 | 52 | // App Material Design Variables 53 | // -------------------------------------------------- 54 | // Material Design only Sass variables can go here 55 | 56 | 57 | 58 | 59 | // App Windows Variables 60 | // -------------------------------------------------- 61 | // Windows only Sass variables can go here 62 | 63 | 64 | 65 | 66 | // App Theme 67 | // -------------------------------------------------- 68 | // Ionic apps can have different themes applied, which can 69 | // then be future customized. This import comes last 70 | // so that the above variables are used and Ionic's 71 | // default are overridden. 72 | 73 | @import "ionic.theme.default"; 74 | 75 | 76 | // Ionicons 77 | // -------------------------------------------------- 78 | // The premium icon font for Ionic. For more info, please see: 79 | // http://ionicframework.com/docs/ionicons/ 80 | 81 | @import "ionic.ionicons"; 82 | 83 | 84 | // Fonts 85 | // -------------------------------------------------- 86 | 87 | @import "roboto"; 88 | @import "noto-sans"; 89 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "allowSyntheticDefaultImports": true, 4 | "declaration": false, 5 | "emitDecoratorMetadata": true, 6 | "experimentalDecorators": true, 7 | "lib": [ 8 | "dom", 9 | "es2015" 10 | ], 11 | "module": "es2015", 12 | "moduleResolution": "node", 13 | "sourceMap": true, 14 | "target": "es5" 15 | }, 16 | "include": [ 17 | "src/**/*.ts" 18 | ], 19 | "exclude": [ 20 | "node_modules" 21 | ], 22 | "compileOnSave": false, 23 | "atom": { 24 | "rewriteTsconfig": false 25 | } 26 | } -------------------------------------------------------------------------------- /tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-duplicate-variable": true, 4 | "no-unused-variable": [ 5 | true 6 | ] 7 | }, 8 | "rulesDirectory": [ 9 | "node_modules/tslint-eslint-rules/dist/rules" 10 | ] 11 | } 12 | --------------------------------------------------------------------------------