├── .babelrc ├── .eslintrc.json ├── .gitignore ├── README.md ├── package.json ├── sign └── debug │ ├── certificate.pem │ └── private.pem └── src ├── About └── index.ux ├── Brand ├── brand.css └── index.ux ├── Common ├── Api │ ├── brand.js │ ├── goods.js │ ├── index.js │ └── topic.js ├── Config │ ├── api.js │ └── config.js ├── Image │ ├── address_right.png │ ├── detail_tag_arrow.png │ ├── icon_go_more.png │ ├── logo.png │ └── service_policy_red.png └── Util │ ├── helper.js │ └── quickapp.js ├── Goods ├── goods.css └── index.ux ├── Index ├── index.css └── index.ux ├── Topic ├── index.ux └── topic.css ├── app.ux ├── manifest.json └── util.js /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | "env" 4 | ] 5 | } -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "commonjs": true 4 | }, 5 | "extends": "eslint:recommended", 6 | "parser": "babel-eslint", 7 | "parserOptions": { 8 | "sourceType": "module", 9 | "ecmaFeatures": { 10 | "experimentalObjectRestSpread": true, 11 | "jsx": true 12 | } 13 | }, 14 | "globals": { 15 | "loadData": false, 16 | "saveData": false, 17 | "history": false, 18 | "console": false, 19 | "setTimeout": false, 20 | "clearTimeout": false, 21 | "setInterval": false, 22 | "clearInterval": false 23 | }, 24 | "plugins": [ 25 | "hybrid" 26 | ], 27 | "rules": { 28 | "indent": [ 29 | "warn", 30 | 2 31 | ], 32 | "no-console": [ 33 | "warn", 34 | { 35 | "allow": [ 36 | "info", 37 | "warn", 38 | "error" 39 | ] 40 | } 41 | ], 42 | "no-unused-vars": [ 43 | "warn", 44 | { 45 | "varsIgnorePattern": "prompt" 46 | } 47 | ], 48 | "quotes": [ 49 | "warn", 50 | "single", 51 | { 52 | "avoidEscape": true, 53 | "allowTemplateLiterals": true 54 | } 55 | ], 56 | "linebreak-style": [ 57 | "warn", 58 | "unix" 59 | ], 60 | "semi": [ 61 | "warn", 62 | "never" 63 | ] 64 | } 65 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | node_modules/ 3 | build/ 4 | dist/ 5 | package-lock.json -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ### NideShop 开源商城(快应用) 2 | 3 | + 界面高仿网易严选商城(主要是2016年wap版) 4 | + 测试数据采集自网易严选商城 5 | + 功能和数据库参考ecshop 6 | + 服务端api基于Node.js+ThinkJS+MySQL 7 | + 计划添加基于Vue.js的后台管理系统、PC版、Wap版 8 | 9 | **注意:当前版本功能还未完善,只供学习参考,请勿商用。** 10 | 11 | 本项目需要配合NideShop商城服务端使用,GitHub: [https://github.com/tumobi/nideshop](https://github.com/tumobi/nideshop) 12 | 13 | ### 项目截图 14 | 15 | ![首页](http://upload-images.jianshu.io/upload_images/3985656-c543b937ac6e79bb.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/320) 16 | 17 | ### 功能列表 18 | + 首页 19 | .... 20 | 21 | ### 最后 22 | + 喜欢别忘了 Star 23 | + 微信号 tumobi 24 | + 交流 QQ 群:497145766 -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nideshop", 3 | "version": "1.0.0", 4 | "subversion": { 5 | "toolkit": "0.0.31", 6 | "packager": "0.0.5" 7 | }, 8 | "description": "", 9 | "scripts": { 10 | "lint": "./node_modules/.bin/eslint src/", 11 | "clear": "rm -rf build/* && rm -rf dist/*", 12 | "build": "cross-env NODE_PLATFORM=na NODE_PHASE=dv webpack --config ./node_modules/hap-tools/webpack.config.js", 13 | "release": "cross-env NODE_PLATFORM=na NODE_PHASE=ol webpack --config ./node_modules/hap-tools/webpack.config.js", 14 | "server": "cross-env node ./node_modules/hap-tools/server/index.js", 15 | "notify": "node ./node_modules/hap-tools/server/command/notify.js", 16 | "watch": "npm run na:dv -- --watch", 17 | "na:dv": "cross-env NODE_PLATFORM=na NODE_PHASE=dv webpack --config ./node_modules/hap-tools/webpack.config.js", 18 | "na:qa": "cross-env NODE_PLATFORM=na NODE_PHASE=qa webpack --config ./node_modules/hap-tools/webpack.config.js", 19 | "na:ol": "cross-env NODE_PLATFORM=na NODE_PHASE=ol webpack --config ./node_modules/hap-tools/webpack.config.js", 20 | "postinstall": "npm run postinstall:koaStatic && npm run postinstall:koaSend", 21 | "postinstall:koaStatic": "babel -d ./node_modules/koa-static ./node_modules/koa-static", 22 | "postinstall:koaSend": "babel -d ./node_modules/koa-send ./node_modules/koa-send", 23 | "debug": "npm run server -- --loadModules='debugger' --port=8081" 24 | }, 25 | "dependencies": { 26 | "babel-polyfill": "^6.26.0", 27 | "babel-preset-env": "^1.6.0", 28 | "babel-plugin-transform-runtime": "^6.9.0", 29 | "babel-runtime": "^6.9.2", 30 | "babel-template": "^6.24.1", 31 | "babel-traverse": "^6.24.1", 32 | "babel-types": "^6.24.1", 33 | "babel-plugin-transform-async-to-generator": "^6.24.1", 34 | "babylon": "^6.17.0", 35 | "babylon-jsx": "^1.0.0", 36 | "browserify": "^13.1.1", 37 | "chalk": "^1.1.3", 38 | "css": "~2.2.1", 39 | "escodegen": "~1.7.1", 40 | "esprima": "~2.7.0", 41 | "fs-extra": "^3.0.1", 42 | "fsmonitor": "^0.2.4", 43 | "hash-sum": "^1.0.2", 44 | "loader-utils": "~0.2.14", 45 | "md5": "^2.1.0", 46 | "parse5": "^3.0.0", 47 | "prompt": "^1.0.0", 48 | "resolve-bin": "^0.4.0", 49 | "serve": "^3.4.0", 50 | "source-map": "^0.5.6", 51 | "yargs": "^6.6.0", 52 | "jsrsasign": "^7.1.2", 53 | "jsrsasign-util": "^1.0.0", 54 | "qr-image": "^3.2.0", 55 | "qrcode-terminal": "^0.11.0", 56 | "socket.io": "^2.0.3", 57 | "tar": "^3.1.5", 58 | "jszip": "^3.1.5" 59 | }, 60 | "devDependencies": { 61 | "babel-cli": "^6.10.1", 62 | "babel-core": "^6.10.4", 63 | "babel-eslint": "^8.2.1", 64 | "babel-loader": "^6.2.4", 65 | "babel-plugin-syntax-jsx": "^6.18.0", 66 | "hybrid-chai": "~0.0.1", 67 | "cross-env": "^3.2.4", 68 | "eslint": "^2.13.1", 69 | "eslint-plugin-hybrid": "~0.0.1", 70 | "html-loader": "^0.4.5", 71 | "string-replace-loader": "^1.3.0", 72 | "file-loader": "^0.9.0", 73 | "html-webpack-plugin": "^2.28.0", 74 | "js-base64": "^2.1.9", 75 | "hybrid-mocha": "~0.0.1", 76 | "sinon": "^1.17.3", 77 | "sinon-chai": "^2.8.0", 78 | "url-loader": "^0.5.7", 79 | "webpack": "~1.13.0", 80 | "webpack-dev-server": "^1.16.5", 81 | "webdriverio": "^4.8.0", 82 | "css-what": "^2.1.0", 83 | "koa": "^2.3.0", 84 | "koa-send": "^4.1.1", 85 | "koa-static": "^4.0.1", 86 | "koa-body": "^2.5.0", 87 | "koa-router": "^7.2.1", 88 | "uglify-js": "^2.7.5" 89 | } 90 | } -------------------------------------------------------------------------------- /sign/debug/certificate.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIDMTCCAhmgAwIBAgIJAMKpjyszxkDpMA0GCSqGSIb3DQEBCwUAMC4xCzAJBgNV 3 | BAYTAkNOMQwwCgYDVQQKDANSUEsxETAPBgNVBAMMCFJQS0RlYnVnMCAXDTE3MDQx 4 | OTAyMzE0OVoYDzIxMTYwMzI2MDIzMTQ5WjAuMQswCQYDVQQGEwJDTjEMMAoGA1UE 5 | CgwDUlBLMREwDwYDVQQDDAhSUEtEZWJ1ZzCCASIwDQYJKoZIhvcNAQEBBQADggEP 6 | ADCCAQoCggEBAK3kPd9jzvTctTIA3XNZVv9cHHDbAc6nTBfdZp9mtPOTkXFpvyCb 7 | kL0QjOog0+1pv8D7dFeP4ptWXU5CT3ImvaPR+16dAtMRcsxEr5q4zieJzx3O6huL 8 | UBa1k+xrzjXpRzkcOysmc8fTxt0tAwbDgJ2AA5TlXLTcVyb7GmJ+hl5CjnhoG5NN 9 | LrkqI7S29c1U3uokj8Q7hzaj0TURu/uB5ZIMCLZY9KFDugqaEcvmUyJiD0fuV6sA 10 | O/4kpiZUOnhV8/xWpRbMI4WFQsfgLOCV+X9uzUa29D677y//46t/EDSuQTHyBZbl 11 | AcNMENkpMWZsH7J/+F19+U0/Hd5bJgneVRkCAwEAAaNQME4wHQYDVR0OBBYEFKDN 12 | SZtt47ttOBDQzIchFYyxsg3mMB8GA1UdIwQYMBaAFKDNSZtt47ttOBDQzIchFYyx 13 | sg3mMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBABaZctNrn4gLmNf/ 14 | eNJ3x5CJIPjPwm6j9nwKhtadJ6BF+TIzSkJuHSgxULjW436F37otv94NPzT5PCBF 15 | WxgXoqgLqnWwvsaqC4LUEjsZviWW4CB824YDUquEUVGFLE/U5KTZ7Kh1ceyUk4N8 16 | +mtkXkanWoBBk0OF24lNrAsNLB63yTLr9HxEe75+kmvxf1qVJUGtaOEWIhiFMiAB 17 | 5D4w/j2EFWktumjuy5TTwU0zhl52bc8V9SNixM1IaqzNrVPrdjv8viUX548pU3WT 18 | xZ5ylDsxhMC1q4BXQVeIY8C0cMEX+WHOmOCvWrkxCkP91pKsSPkuVrWlzrkn8Ojo 19 | swP6sBw= 20 | -----END CERTIFICATE----- 21 | -------------------------------------------------------------------------------- /sign/debug/private.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCt5D3fY8703LUy 3 | AN1zWVb/XBxw2wHOp0wX3WafZrTzk5Fxab8gm5C9EIzqINPtab/A+3RXj+KbVl1O 4 | Qk9yJr2j0ftenQLTEXLMRK+auM4nic8dzuobi1AWtZPsa8416Uc5HDsrJnPH08bd 5 | LQMGw4CdgAOU5Vy03Fcm+xpifoZeQo54aBuTTS65KiO0tvXNVN7qJI/EO4c2o9E1 6 | Ebv7geWSDAi2WPShQ7oKmhHL5lMiYg9H7lerADv+JKYmVDp4VfP8VqUWzCOFhULH 7 | 4Czglfl/bs1GtvQ+u+8v/+OrfxA0rkEx8gWW5QHDTBDZKTFmbB+yf/hdfflNPx3e 8 | WyYJ3lUZAgMBAAECggEBAJTnCBBdUB+fSs1prjeS/gsmnfgJoY+K9H7PCIxgj3yw 9 | FXAvZAmRDKzJGlF2EOOQlTG0YNiGDj6EAtv7rjoKcINyULSg8IU6wLmn61MrAuUa 10 | fa+Bujgh4E/B5swhOHAztNhzkzsM70Hi17wXSislh+HWd7qteOgqcbqgdOR4gaj+ 11 | HUqtcxG3H3hCL3dWugnjLZMtestLKGHSSZvbQNjYM3kKy2LvO8NpxmDE4a+TXygK 12 | qhaZjmS/dc/nJBJzOfkzby58RvGbzlJflfW/Uu3/gizj13GFQKWonq1xh630RAhv 13 | xX5ySok2aAx/+/SiJSpNXvM09grQuoORSr7D1tm+5rECgYEA3vf0hRfua0XAOu6f 14 | pyzNvLRRJ/pEew7XpNPCyS2TuMTd1yvXjGVxQfP46N6x1IM3SRU0zE+LSk80EF7l 15 | u1Or7GyCEhabYNe/7P2F8ENP73Do0HwvcI1jGrgr6r9oK0J27Xei+f6Q0bgJOPI2 16 | qaLj+V37cOjkNSM1mhTjtDwK8k0CgYEAx6cMrkjHl1+lDIIOc3qAEL3jb3xQveYk 17 | WrMF/B+j048k6boU4VvFJAIyQxOxMNxLjw3/9+zXCFJT4WaZK3TMXlg614ASGx3H 18 | tKjJM9O07ywwMq1gbutFS4nHCg3L3Os6esL0SPwMdATR3Yh22n5OGI9o+/aURulL 19 | GPEXef1Z2/0CgYEAgmwp5LxV4vu+8Pnp+4DSq4ISQr861XyeGTUhKEp3sUm+tgFY 20 | KTChakHKpHS3Mqa6bQ5xft08je/8dWL9IHFWDIqAHxKIOsKY6oh1k0/cbyPtmx45 21 | Ja4efV+jmMHzrfJH3KnxdCg7D+GFy4CrBtlYXuJhlO81pft9fC6h7yh8ArUCgYBq 22 | gvkl5Zftbs4rnRq+iqTVyagTKvwcQzIz3PwdZHfO/rfPpUFMdNv4eN99n3zRN0Vs 23 | HSjoiEazntA3GLgwUdBRqLpDi4SdSMbo337vkksdqbJQ5uPiaMuAIBG6kF+pDSkW 24 | ovkWErlGD+gySoI10FozihaVDRhPuFgjB0PiBcIxtQKBgGNSzX+Bx5+ux1Qny0Sn 25 | SUcBtepLnO8M8wafoGNyehbMnLzfuMbaDiJOdozGlBNHZTtPB3r4AYb8WnltdKW0 26 | 7i3fk26YZGiMVeUJvewA6/LOBEaqMdwoNwnoptvbR6ehHeE/PPtRtge2cD3bPIM7 27 | U9VlWgfgj9Dxfwhslqb9hmyp 28 | -----END PRIVATE KEY----- 29 | -------------------------------------------------------------------------------- /src/About/index.ux: -------------------------------------------------------------------------------- 1 | 38 | 39 | 135 | 136 | 165 | -------------------------------------------------------------------------------- /src/Brand/brand.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tumobi/nideshop-quickapp/88504050f8a597e5f79c5c83207318c3818b602b/src/Brand/brand.css -------------------------------------------------------------------------------- /src/Brand/index.ux: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 9 | 10 | -------------------------------------------------------------------------------- /src/Common/Api/brand.js: -------------------------------------------------------------------------------- 1 | import api from '../Config/api' 2 | import helper from '../Util/helper' 3 | 4 | const brand = {} 5 | 6 | brand.getBrandDetail = (id) => { 7 | return helper.get(api.BrandDetail, {id: id}) 8 | } 9 | 10 | 11 | brand.getBrandList = (page, size) => { 12 | return helper.get(api.BrandList, {page, size}) 13 | } 14 | 15 | 16 | export default brand 17 | -------------------------------------------------------------------------------- /src/Common/Api/goods.js: -------------------------------------------------------------------------------- 1 | import api from '../Config/api' 2 | import helper from '../Util/helper' 3 | 4 | const goods = {} 5 | 6 | goods.getGoodsDetail = (id) => { 7 | return helper.get(api.GoodsDetail, {id: id}) 8 | } 9 | 10 | 11 | goods.getRelatedGoods = (id) => { 12 | return helper.get(api.GoodsRelated, {id: id}) 13 | } 14 | 15 | 16 | export default goods 17 | -------------------------------------------------------------------------------- /src/Common/Api/index.js: -------------------------------------------------------------------------------- 1 | import api from '../Config/api' 2 | import helper from '../Util/helper' 3 | 4 | const index = {} 5 | 6 | index.getIndexData = () => { 7 | return helper.get(api.IndexUrl) 8 | } 9 | 10 | export default index 11 | -------------------------------------------------------------------------------- /src/Common/Api/topic.js: -------------------------------------------------------------------------------- 1 | import api from '../Config/api' 2 | import helper from '../Util/helper' 3 | 4 | const topic = {} 5 | 6 | topic.getTopicDetail = (id) => { 7 | return helper.get(api.TopicDetail, {id: id}) 8 | } 9 | 10 | 11 | topic.getRelatedTopics = (id) => { 12 | return helper.get(api.TopicRelated, {id: id}) 13 | } 14 | 15 | 16 | export default topic 17 | -------------------------------------------------------------------------------- /src/Common/Config/api.js: -------------------------------------------------------------------------------- 1 | import config from './config' 2 | 3 | const ApiRootUrl = config.ApiRootUrl 4 | 5 | export default { 6 | IndexUrl: ApiRootUrl + 'index/index', //首页数据接口 7 | CatalogList: ApiRootUrl + 'catalog/index', //分类目录全部分类数据接口 8 | CatalogCurrent: ApiRootUrl + 'catalog/current', //分类目录当前分类数据接口 9 | 10 | AuthLoginByWeixin: ApiRootUrl + 'auth/loginByWeixin', //微信登录 11 | 12 | GoodsCount: ApiRootUrl + 'goods/count', //统计商品总数 13 | GoodsList: ApiRootUrl + 'goods/list', //获得商品列表 14 | GoodsCategory: ApiRootUrl + 'goods/category', //获得分类数据 15 | GoodsDetail: ApiRootUrl + 'goods/detail', //获得商品的详情 16 | GoodsNew: ApiRootUrl + 'goods/new', //新品 17 | GoodsHot: ApiRootUrl + 'goods/hot', //热门 18 | GoodsRelated: ApiRootUrl + 'goods/related', //商品详情页的关联商品(大家都在看) 19 | 20 | BrandList: ApiRootUrl + 'brand/list', //品牌列表 21 | BrandDetail: ApiRootUrl + 'brand/detail', //品牌详情 22 | 23 | CartList: ApiRootUrl + 'cart/index', //获取购物车的数据 24 | CartAdd: ApiRootUrl + 'cart/add', // 添加商品到购物车 25 | CartUpdate: ApiRootUrl + 'cart/update', // 更新购物车的商品 26 | CartDelete: ApiRootUrl + 'cart/delete', // 删除购物车的商品 27 | CartChecked: ApiRootUrl + 'cart/checked', // 选择或取消选择商品 28 | CartGoodsCount: ApiRootUrl + 'cart/goodscount', // 获取购物车商品件数 29 | CartCheckout: ApiRootUrl + 'cart/checkout', // 下单前信息确认 30 | 31 | OrderSubmit: ApiRootUrl + 'order/submit', // 提交订单 32 | PayPrepayId: ApiRootUrl + 'pay/prepay', //获取微信统一下单prepay_id 33 | 34 | CollectList: ApiRootUrl + 'collect/list', //收藏列表 35 | CollectAddOrDelete: ApiRootUrl + 'collect/addordelete', //添加或取消收藏 36 | 37 | CommentList: ApiRootUrl + 'comment/list', //评论列表 38 | CommentCount: ApiRootUrl + 'comment/count', //评论总数 39 | CommentPost: ApiRootUrl + 'comment/post', //发表评论 40 | 41 | TopicList: ApiRootUrl + 'topic/list', //专题列表 42 | TopicDetail: ApiRootUrl + 'topic/detail', //专题详情 43 | TopicRelated: ApiRootUrl + 'topic/related', //相关专题 44 | 45 | SearchIndex: ApiRootUrl + 'search/index', //搜索页面数据 46 | SearchResult: ApiRootUrl + 'search/result', //搜索数据 47 | SearchHelper: ApiRootUrl + 'search/helper', //搜索帮助 48 | SearchClearHistory: ApiRootUrl + 'search/clearhistory', //搜索帮助 49 | 50 | AddressList: ApiRootUrl + 'address/list', //收货地址列表 51 | AddressDetail: ApiRootUrl + 'address/detail', //收货地址详情 52 | AddressSave: ApiRootUrl + 'address/save', //保存收货地址 53 | AddressDelete: ApiRootUrl + 'address/delete', //保存收货地址 54 | 55 | RegionList: ApiRootUrl + 'region/list', //获取区域列表 56 | 57 | OrderList: ApiRootUrl + 'order/list', //订单列表 58 | OrderDetail: ApiRootUrl + 'order/detail', //订单详情 59 | OrderCancel: ApiRootUrl + 'order/cancel', //取消订单 60 | OrderExpress: ApiRootUrl + 'order/express', //物流详情 61 | 62 | FootprintList: ApiRootUrl + 'footprint/list', //足迹列表 63 | FootprintDelete: ApiRootUrl + 'footprint/delete' //删除足迹 64 | } 65 | -------------------------------------------------------------------------------- /src/Common/Config/config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | ApiRootUrl: 'https://api.nideshop.com/api/' 3 | } 4 | -------------------------------------------------------------------------------- /src/Common/Image/address_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tumobi/nideshop-quickapp/88504050f8a597e5f79c5c83207318c3818b602b/src/Common/Image/address_right.png -------------------------------------------------------------------------------- /src/Common/Image/detail_tag_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tumobi/nideshop-quickapp/88504050f8a597e5f79c5c83207318c3818b602b/src/Common/Image/detail_tag_arrow.png -------------------------------------------------------------------------------- /src/Common/Image/icon_go_more.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tumobi/nideshop-quickapp/88504050f8a597e5f79c5c83207318c3818b602b/src/Common/Image/icon_go_more.png -------------------------------------------------------------------------------- /src/Common/Image/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tumobi/nideshop-quickapp/88504050f8a597e5f79c5c83207318c3818b602b/src/Common/Image/logo.png -------------------------------------------------------------------------------- /src/Common/Image/service_policy_red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tumobi/nideshop-quickapp/88504050f8a597e5f79c5c83207318c3818b602b/src/Common/Image/service_policy_red.png -------------------------------------------------------------------------------- /src/Common/Util/helper.js: -------------------------------------------------------------------------------- 1 | import fetch from '@system.fetch' 2 | 3 | const helper = {} 4 | 5 | helper.request = (method, url, data) => { 6 | return new Promise((resolve, reject) => { 7 | fetch.fetch({ 8 | url: url, 9 | data: data, 10 | method: method, 11 | success: function (res) { 12 | try { 13 | resolve(JSON.parse(res.data)) 14 | } catch(err) { 15 | reject(err) 16 | } 17 | }, 18 | fail: function (data) { 19 | reject(data) 20 | } 21 | }) 22 | }) 23 | } 24 | 25 | helper.get = (url, data) => { 26 | return helper.request('GET', url, data) 27 | } 28 | 29 | helper.post = (url, data) => { 30 | return helper.request('POST', url, data) 31 | } 32 | 33 | export default helper 34 | -------------------------------------------------------------------------------- /src/Common/Util/quickapp.js: -------------------------------------------------------------------------------- 1 | const quickapp = {} 2 | 3 | export default quickapp 4 | -------------------------------------------------------------------------------- /src/Goods/goods.css: -------------------------------------------------------------------------------- 1 | .goods-page { 2 | background-color: #f4f4f4; 3 | width: 100%; 4 | height: 100%; 5 | flex-direction: column; 6 | } 7 | 8 | .goodsimgs { 9 | width: 100%; 10 | height: 750px; 11 | indicator-color: rgba(0, 0, 0, 0.1); 12 | indicator-selected-color: rgba(0, 0, 0, 0.6); 13 | indicator-size: 16px; 14 | } 15 | 16 | .goodsimgs .img { 17 | width: 750px; 18 | height: 750px; 19 | resize-mode: cover; 20 | } 21 | 22 | .service-policy { 23 | width: 100%; 24 | height: 73px; 25 | background-color: #f4f4f4; 26 | padding: 0 31.25px; 27 | display: flex; 28 | flex-wrap: nowrap; 29 | align-items: center; 30 | justify-content: space-between; 31 | } 32 | 33 | .service-policy .item { 34 | /* background-image: url(/Common/Image/service_policy_red.png) 0 center no-repeat; */ 35 | /* background-size: 10px; */ 36 | align-items: center; 37 | justify-content: center; 38 | flex-direction: row; 39 | } 40 | 41 | .service-policy .item .txt{ 42 | font-size: 25px; 43 | color: #666666; 44 | padding-left: 10px; 45 | } 46 | 47 | .service-policy .item .icon{ 48 | width: 10px; 49 | height: 10px; 50 | } 51 | 52 | .goods-info { 53 | width: 100%; 54 | height: 306px; 55 | background-color: #ffffff; 56 | } 57 | 58 | .goods-info .c { 59 | width: 718.75px; 60 | height: 100%; 61 | margin-left: 31.25px; 62 | padding: 38px 31.25px 38px 0; 63 | /* border-bottom: 1px solid #f4f4f4; */ 64 | border-bottom-width: 1px; 65 | border-bottom-color: #f4f4f4; 66 | flex-direction: column; 67 | align-items: center; 68 | } 69 | 70 | .goods-info .c text { 71 | width: 687.5px; 72 | text-align: center; 73 | } 74 | 75 | .goods-info .name { 76 | height: 41px; 77 | margin-bottom: 5.208px; 78 | font-size: 41px; 79 | line-height: 41px; 80 | } 81 | 82 | .goods-info .desc { 83 | height: 43px; 84 | margin-bottom: 41px; 85 | font-size: 24px; 86 | line-height: 36px; 87 | color: #999999; 88 | } 89 | 90 | .goods-info .price { 91 | height: 35px; 92 | font-size: 35px; 93 | line-height: 35px; 94 | color: #b4282d; 95 | } 96 | 97 | 98 | .goods-info .brand{ 99 | flex-direction: row; 100 | width: 300px; 101 | margin-top: 23px; 102 | height: 48px; 103 | border: 1px solid #f48f18; 104 | border-radius: 4px; 105 | justify-content: center; 106 | align-items: center; 107 | } 108 | 109 | .goods-info .brand .txt{ 110 | width: 270px; 111 | font-size: 25px; 112 | color: #f48f18; 113 | } 114 | 115 | .goods-info .brand .icon{ 116 | margin-right: 10px; 117 | width: 10.75px; 118 | height: 18.75px; 119 | } 120 | 121 | .section-nav { 122 | width: 100%; 123 | height: 108px; 124 | background-color: #ffffff; 125 | margin-bottom: 20px; 126 | justify-content: space-between; 127 | } 128 | 129 | .section-nav .txt { 130 | width: 600px; 131 | height: 108px; 132 | line-height: 108px; 133 | font-size: 29px; 134 | color: #333333; 135 | margin-left: 31.25px; 136 | } 137 | 138 | .section-nav .icon { 139 | width: 52px; 140 | height: 52px; 141 | margin-right: 16px; 142 | margin-top: 28px; 143 | } 144 | 145 | .section-act .txt { 146 | align-items: center; 147 | width: 600px; 148 | height: 108px; 149 | line-height: 108px; 150 | font-size: 29px; 151 | color: #999999; 152 | margin-left: 31.25px; 153 | } 154 | 155 | .section-act .label { 156 | color: #999999; 157 | } 158 | 159 | .section-act .tag { 160 | align-items: center; 161 | padding: 0 10px; 162 | border-radius: 3px; 163 | height: 37px; 164 | color: #f48f18; 165 | border: 1px solid #f48f18; 166 | font-size: 25px; 167 | margin: 0 10px; 168 | } 169 | 170 | .section-act .text { 171 | align-items: center; 172 | height: 37px; 173 | color: #f48f18; 174 | font-size: 29px; 175 | } 176 | 177 | .comments { 178 | width: 100%; 179 | padding-left: 30px; 180 | background-color: #ffffff; 181 | flex-direction: column; 182 | margin: 20px 0; 183 | } 184 | 185 | .comments .h { 186 | height: 102.5px; 187 | line-height: 100.5px; 188 | width: 718.75px; 189 | padding-right: 16px; 190 | flex-direction: row; 191 | border-bottom-width: 1px; 192 | border-bottom-color: #d9d9d9; 193 | justify-content: space-between; 194 | } 195 | 196 | .comments .h .t { 197 | font-size: 38.5px; 198 | color: #333333; 199 | } 200 | 201 | .comments .h .i { 202 | height: 100.5px; 203 | line-height: 100.5px; 204 | align-items: center; 205 | } 206 | 207 | .comments .h .i .icon{ 208 | width: 52px; 209 | height: 52px; 210 | } 211 | .comments .b { 212 | width: 720px; 213 | flex-direction: column; 214 | } 215 | 216 | .comments .item { 217 | width: 720px; 218 | flex-direction: column; 219 | } 220 | 221 | .comments .info { 222 | height: 127px; 223 | width: 100%; 224 | padding: 33px 0 27px 0; 225 | flex-direction: row; 226 | justify-content: space-between; 227 | } 228 | 229 | .comments .user { 230 | height: 67px; 231 | line-height: 67px; 232 | font-size: 0; 233 | } 234 | 235 | .comments .user .avatar { 236 | width: 67px; 237 | height: 67px; 238 | margin-right: 17px; 239 | border-radius: 57px; 240 | } 241 | 242 | .comments .user .nickname { 243 | height: 66px; 244 | font-size: 29px; 245 | line-height: 66px; 246 | } 247 | 248 | .comments .time { 249 | height: 67px; 250 | line-height: 67px; 251 | color: #7f7f7f; 252 | font-size: 25px; 253 | margin-right: 30px; 254 | } 255 | 256 | .comments .content { 257 | width: 720px; 258 | padding-right: 30px; 259 | line-height: 45.8px; 260 | font-size: 29px; 261 | margin-bottom: 24px; 262 | } 263 | 264 | .comments .imgs { 265 | width: 720px; 266 | margin-bottom: 25px; 267 | } 268 | 269 | .comments .imgs .img { 270 | height: 150px; 271 | width: 150px; 272 | margin-right: 28px; 273 | } 274 | 275 | .comments .spec { 276 | width: 720px; 277 | padding-right: 30px; 278 | line-height: 30px; 279 | font-size: 24px; 280 | color: #999999; 281 | margin-bottom: 30px; 282 | } 283 | 284 | .goods-attr { 285 | width: 100%; 286 | padding: 0 31.25px 25px 31.25px; 287 | background-color: #ffffff; 288 | flex-direction: column; 289 | } 290 | 291 | .goods-attr .t { 292 | width: 687.5px; 293 | height: 104px; 294 | line-height: 104px; 295 | font-size: 38.5px; 296 | } 297 | 298 | .goods-attr .l{ 299 | flex-direction: column; 300 | } 301 | 302 | .goods-attr .item { 303 | width: 687.5px; 304 | height: 68px; 305 | padding: 11px 20px; 306 | margin-bottom: 11px; 307 | background-color: #f7f7f7; 308 | font-size: 38.5px; 309 | flex-direction: row; 310 | } 311 | 312 | .goods-attr .left { 313 | font-size: 25px; 314 | width: 134px; 315 | height: 45px; 316 | line-height: 45px; 317 | color: #999999; 318 | } 319 | 320 | .goods-attr .right { 321 | font-size: 36.5px; 322 | margin-left: 20px; 323 | width: 480px; 324 | height: 45px; 325 | line-height: 45px; 326 | color: #333333; 327 | } 328 | 329 | .detail { 330 | width: 100%; 331 | } 332 | 333 | .detail image { 334 | width: 100%; 335 | } 336 | 337 | .detail-content image { 338 | width: 100%; 339 | } 340 | 341 | 342 | .common-problem { 343 | width: 100%; 344 | flex-direction: column; 345 | } 346 | 347 | .common-problem .h { 348 | height: 145.5px; 349 | width: 100%; 350 | padding: 56.25px 0; 351 | background-color: #ffffff; 352 | text-align: center; 353 | flex-direction: row; 354 | justify-content: center; 355 | align-items: center; 356 | } 357 | 358 | .common-problem .h .line { 359 | height: 1px; 360 | width: 70px; 361 | background-color: #cccccc; 362 | } 363 | 364 | .common-problem .h .title { 365 | height: 33px; 366 | width: 180px; 367 | text-align: center; 368 | background-color: #ffffff; 369 | } 370 | 371 | .common-problem .b { 372 | width: 100%; 373 | padding: 0px 30px; 374 | flex-direction: column; 375 | background-color: #ffffff; 376 | } 377 | 378 | .common-problem .item { 379 | padding-bottom: 25px; 380 | flex-direction: column; 381 | } 382 | 383 | .common-problem .question-box{ 384 | flex-direction: row; 385 | align-items: center; 386 | margin-bottom: 10px; 387 | } 388 | 389 | .common-problem .question-box .spot { 390 | height: 8px; 391 | width: 8px; 392 | background-color: #b4282d; 393 | border-radius: 8px; 394 | } 395 | 396 | .common-problem .question-box .question { 397 | height: 30px; 398 | padding-left: 8px; 399 | font-size: 26px; 400 | color: #303030; 401 | } 402 | 403 | .common-problem .answer { 404 | line-height: 36px; 405 | padding-left: 16px; 406 | font-size: 26px; 407 | color: #787878; 408 | } 409 | 410 | .related-goods { 411 | width: 100%; 412 | flex-direction: column; 413 | background-color: #ff00dd; 414 | } 415 | 416 | .related-goods .h { 417 | height: 145.5px; 418 | width: 100%; 419 | flex-direction: row; 420 | padding: 56.25px 0; 421 | background-color: #ffffff; 422 | text-align: center; 423 | border-bottom-width: 1px; 424 | border-bottom-color: #f4f4f4; 425 | justify-content: center; 426 | align-items: center; 427 | } 428 | 429 | .related-goods .h .line { 430 | height: 1px; 431 | width: 70px; 432 | background-color: #cccccc; 433 | } 434 | 435 | .related-goods .h .title { 436 | height: 33px; 437 | width: 180px; 438 | text-align: center; 439 | background-color: #ffffff; 440 | } 441 | 442 | .related-goods .b { 443 | width: 100%; 444 | flex-direction: row; 445 | flex-wrap: wrap; 446 | } 447 | 448 | .related-goods .b .item { 449 | background-color: #ffffff; 450 | flex-direction: column; 451 | width: 375px; 452 | text-align: center; 453 | padding: 15px 31.25px; 454 | border-right-width: 1px; 455 | border-right-color: #f4f4f4; 456 | border-bottom-width: 1px; 457 | border-bottom-color: #f4f4f4; 458 | } 459 | 460 | .related-goods .item .img { 461 | width: 311.45px; 462 | height: 311.45px; 463 | } 464 | 465 | .related-goods .item .name { 466 | width: 311.45px; 467 | height: 35px; 468 | margin: 11.5px 0 15px 0; 469 | text-align: center; 470 | font-size: 30px; 471 | color: #333333; 472 | } 473 | 474 | .related-goods .item .price { 475 | width: 311.45px; 476 | height: 30px; 477 | text-align: center; 478 | font-size: 30px; 479 | color: #b4282d; 480 | } -------------------------------------------------------------------------------- /src/Goods/index.ux: -------------------------------------------------------------------------------- 1 | 107 | 108 | 109 | 111 | 112 | -------------------------------------------------------------------------------- /src/Index/index.css: -------------------------------------------------------------------------------- 1 | .index-page { 2 | background-color: #f4f4f4; 3 | width: 100%; 4 | height: 100%; 5 | flex-direction: column; 6 | } 7 | 8 | .banner { 9 | width: 100%; 10 | height: 417px; 11 | indicator-color: rgba(0, 0, 0, 0.1); 12 | indicator-selected-color: rgba(0, 0, 0, 0.6); 13 | indicator-size: 16px; 14 | } 15 | 16 | .banner image { 17 | width: 100%; 18 | height: 417px; 19 | resize-mode: cover; 20 | } 21 | 22 | .m-menu { 23 | flex-direction: row; 24 | display: flex; 25 | height: 181px; 26 | width: 100%; 27 | flex-wrap: nowrap; 28 | align-items: center; 29 | justify-content: space-between; 30 | background-color: #ffffff; 31 | } 32 | 33 | .m-menu .item { 34 | flex: 1; 35 | padding: 20px 0; 36 | height: 141px; 37 | flex-direction: column; 38 | align-items: center; 39 | justify-content: center; 40 | } 41 | 42 | .m-menu image { 43 | width: 58px; 44 | height: 58px; 45 | margin-bottom: 12px; 46 | resize-mode: cover; 47 | } 48 | 49 | .m-menu text { 50 | font-size: 24px; 51 | text-align: center; 52 | height: 30px; 53 | color: #333333; 54 | } 55 | 56 | .a-section { 57 | width: 100%; 58 | background-color: #ffffff; 59 | flex-direction: column; 60 | color: #333333; 61 | margin-top: 20px; 62 | } 63 | 64 | .a-section .h { 65 | display: flex; 66 | flex-direction: row; 67 | flex-wrap: nowrap; 68 | align-items: center; 69 | justify-content: center; 70 | height: 130px; 71 | } 72 | 73 | .a-section .h .txt { 74 | padding-right: 30px; 75 | display: flex; 76 | height: 36px; 77 | font-size: 33px; 78 | line-height: 36px; 79 | } 80 | 81 | .a-brand { 82 | height: 634px; 83 | } 84 | 85 | .a-brand .b { 86 | width: 100%; 87 | height: 504px; 88 | flex-direction: row; 89 | flex-wrap: wrap; 90 | } 91 | 92 | .a-brand .item { 93 | width: 375px; 94 | height: 252px; 95 | background-color: #f4f4f4; 96 | margin: 0 0 1px 0; 97 | border-left-width: 1px; 98 | border-left-color: #ffffff; 99 | border-right-width: 1px; 100 | border-right-color: #ffffff; 101 | } 102 | 103 | .a-brand .img { 104 | width: 375px; 105 | height: 252px; 106 | resize-mode: cover; 107 | } 108 | 109 | .a-brand .mt { 110 | padding: 27px 31px; 111 | flex-direction: column; 112 | } 113 | 114 | .a-brand .mt .brand { 115 | display: flex; 116 | font-size: 33px; 117 | height: 43px; 118 | color: #333333; 119 | } 120 | 121 | .a-brand .mt .price { 122 | font-size: 25px; 123 | color: #999999; 124 | } 125 | 126 | .a-new .b { 127 | width: 100%; 128 | padding: 0 31px 45px 31px; 129 | flex-direction: row; 130 | flex-wrap: wrap; 131 | justify-content: center; 132 | } 133 | 134 | .a-new .b .item { 135 | width: 302px; 136 | margin: 10px 21px 0 21px; 137 | flex-direction: column; 138 | justify-content: center; 139 | } 140 | 141 | .a-new .b .item-b { 142 | margin: 0 0 0 42px; 143 | } 144 | 145 | .a-new .b .img { 146 | width: 302px; 147 | height: 302px; 148 | } 149 | 150 | .a-new .b .name { 151 | text-align: center; 152 | width: 302px; 153 | height: 35px; 154 | margin: 0 0 14px 0; 155 | font-size: 30px; 156 | color: #333333; 157 | } 158 | 159 | .a-new .b .price { 160 | text-align: center; 161 | line-height: 30px; 162 | font-size: 30px; 163 | color: #b4282d; 164 | } 165 | 166 | .a-popular { 167 | width: 100%; 168 | } 169 | 170 | .a-popular .b { 171 | flex-direction: column; 172 | } 173 | 174 | .a-popular .b .item { 175 | border-top-width: 1px; 176 | border-top-color: #d9d9d9; 177 | margin: 0 20px; 178 | height: 264px; 179 | width: 710px; 180 | } 181 | 182 | .a-popular .b .img { 183 | margin-top: 12px; 184 | margin-right: 12px; 185 | width: 240px; 186 | height: 240px; 187 | } 188 | 189 | .a-popular .b .right { 190 | height: 264px; 191 | width: 456px; 192 | display: flex; 193 | } 194 | 195 | .a-popular .b .text { 196 | display: flex; 197 | flex-wrap: nowrap; 198 | flex-direction: column; 199 | justify-content: center; 200 | height: 264px; 201 | width: 456px; 202 | } 203 | 204 | .a-popular .b .name { 205 | width: 456px; 206 | color: #333333; 207 | line-height: 50px; 208 | font-size: 30px; 209 | } 210 | 211 | .a-popular .b .desc { 212 | width: 456px; 213 | color: #999999; 214 | line-height: 50px; 215 | font-size: 25px; 216 | } 217 | 218 | .a-popular .b .price { 219 | width: 456px; 220 | color: #b4282d; 221 | line-height: 50px; 222 | font-size: 33px; 223 | } 224 | 225 | .a-topic .b { 226 | height: 533px; 227 | width: 100%; 228 | padding: 0 0 48px 0; 229 | } 230 | 231 | .a-topic .b .list { 232 | height: 533px; 233 | width: 100%; 234 | flex-direction: row; 235 | column-span: 1; 236 | } 237 | 238 | .a-topic .b .item { 239 | height: 533px; 240 | width: 680.5px; 241 | margin-right: 30px; 242 | flex-direction: column; 243 | } 244 | 245 | .a-topic .b .item:disabled { 246 | margin-left: 30px; 247 | } 248 | 249 | .a-topic .b .img { 250 | height: 387.5px; 251 | width: 680.5px; 252 | margin-bottom: 30px; 253 | } 254 | 255 | .a-topic .b .np { 256 | height: 35px; 257 | margin-bottom: 13.5px; 258 | color: #333333; 259 | font-size: 30px; 260 | } 261 | 262 | .a-topic .b .np .price { 263 | margin-left: 20.8px; 264 | color: #b4282d; 265 | } 266 | 267 | .a-topic .b .desc { 268 | height: 30px; 269 | color: #999999; 270 | font-size: 24px; 271 | text-overflow: ellipsis; 272 | } 273 | 274 | .good-grid { 275 | width: 100%; 276 | flex-direction: column; 277 | } 278 | 279 | .good-grid .h { 280 | align-items: center; 281 | justify-content: center; 282 | height: 130px; 283 | font-size: 33px; 284 | color: #333333; 285 | } 286 | 287 | .good-grid .b { 288 | width: 100%; 289 | padding: 0 6.25px; 290 | flex-direction: row; 291 | flex-wrap: wrap; 292 | } 293 | 294 | .good-grid .b .item { 295 | background-color: #ffffff; 296 | width: 365px; 297 | margin-bottom: 6.25px; 298 | height: 452px; 299 | align-items: center; 300 | flex-direction: column; 301 | text-align: center; 302 | } 303 | 304 | 305 | .good-grid .b .item:disabled { 306 | margin-right: 6.25px; 307 | } 308 | 309 | .good-grid .item .img { 310 | margin-top: 20px; 311 | width: 302px; 312 | height: 302px; 313 | } 314 | 315 | .good-grid .item .name { 316 | width: 365.625px; 317 | padding: 0 20px; 318 | height: 35px; 319 | margin: 11.5px 0 22px 0; 320 | text-align: center; 321 | font-size: 30px; 322 | color: #333333; 323 | } 324 | 325 | .good-grid .item .price { 326 | width: 365.625px; 327 | height: 30px; 328 | text-align: center; 329 | font-size: 30px; 330 | color: #b4282d; 331 | } 332 | 333 | .good-grid .b .more-a { 334 | width: 365px; 335 | height: 452px; 336 | flex-direction: column; 337 | align-items: center; 338 | justify-content: center; 339 | } 340 | 341 | .good-grid .b .more-a .txt { 342 | height: 33px; 343 | line-height: 33px; 344 | color: #333333; 345 | font-size: 33px; 346 | } 347 | 348 | .good-grid .b .more-a .icon { 349 | margin: 30px 0 0 0; 350 | width: 70px; 351 | height: 70px; 352 | } -------------------------------------------------------------------------------- /src/Index/index.ux: -------------------------------------------------------------------------------- 1 | 106 | 107 | 108 | 111 | 112 | -------------------------------------------------------------------------------- /src/Topic/index.ux: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 9 | 10 | -------------------------------------------------------------------------------- /src/Topic/topic.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tumobi/nideshop-quickapp/88504050f8a597e5f79c5c83207318c3818b602b/src/Topic/topic.css -------------------------------------------------------------------------------- /src/app.ux: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "package": "com.nideshop.quickapp", 3 | "name": "NideShop", 4 | "versionName": "1.0.0", 5 | "versionCode": "1", 6 | "minPlatformVersion": "101", 7 | "icon": "/Common/Image/logo.png", 8 | "features": [ 9 | { "name": "system.prompt" }, 10 | { "name": "system.router" }, 11 | { "name": "system.shortcut" }, 12 | { "name": "system.fetch" } 13 | ], 14 | "permissions": [ 15 | { "origin": "*" } 16 | ], 17 | "config": { 18 | "logLevel": "log" 19 | }, 20 | "router": { 21 | "entry": "Index", 22 | "pages": { 23 | "Index": { 24 | "component": "index" 25 | }, 26 | "Goods": { 27 | "component": "index" 28 | }, 29 | "Brand": { 30 | "component": "index" 31 | }, 32 | "Topic": { 33 | "component": "index" 34 | }, 35 | "About": { 36 | "component": "index" 37 | } 38 | } 39 | }, 40 | "display": { 41 | "titleBarBackgroundColor": "#ffffff", 42 | "titleBarTextColor": "#414141", 43 | "menu": true, 44 | "pages": { 45 | "Index": { 46 | "titleBarText": "仿网易严选商城", 47 | "menu": true 48 | }, 49 | "Goods": { 50 | "titleBarText": "商品详情", 51 | "menu": true 52 | }, 53 | "About": { 54 | "titleBarText": "关于", 55 | "menu": false 56 | } 57 | } 58 | } 59 | } -------------------------------------------------------------------------------- /src/util.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 显示菜单 3 | */ 4 | function showMenu () { 5 | const prompt = require('@system.prompt') 6 | const router = require('@system.router') 7 | const appInfo = require('@system.app').getInfo() 8 | prompt.showContextMenu({ 9 | itemList: ['保存桌面', '关于', '取消'], 10 | success: function (ret) { 11 | switch (ret.index) { 12 | case 0: 13 | // 保存桌面 14 | createShortcut() 15 | break 16 | case 1: 17 | // 关于 18 | router.push({ 19 | uri: '/About', 20 | params: { 21 | name: appInfo.name, 22 | icon: appInfo.icon 23 | } 24 | }) 25 | break 26 | case 2: 27 | // 取消 28 | break 29 | default: 30 | prompt.showToast({ 31 | message: 'error' 32 | }) 33 | } 34 | } 35 | }) 36 | } 37 | 38 | /** 39 | * 创建桌面图标 40 | * 注意:使用加载器测试`创建桌面快捷方式`功能时,请先在`系统设置`中打开`应用加载器`的`桌面快捷方式`权限 41 | */ 42 | function createShortcut () { 43 | const prompt = require('@system.prompt') 44 | const shortcut = require('@system.shortcut') 45 | shortcut.hasInstalled({ 46 | success: function (ret) { 47 | if (ret) { 48 | prompt.showToast({ 49 | message: '已创建桌面图标' 50 | }) 51 | } else { 52 | shortcut.install({ 53 | success: function () { 54 | prompt.showToast({ 55 | message: '成功创建桌面图标' 56 | }) 57 | }, 58 | fail: function (errmsg, errcode) { 59 | prompt.showToast({ 60 | message: `${errcode}: ${errmsg}` 61 | }) 62 | } 63 | }) 64 | } 65 | } 66 | }) 67 | } 68 | 69 | export default { 70 | showMenu, 71 | createShortcut 72 | } 73 | --------------------------------------------------------------------------------