Commit e991348b authored by wangwei's avatar wangwei

首次编写打包

parent 36f56fe3
......@@ -7,5 +7,6 @@ module.exports = merge(prodEnv, {
API_URL: '"/"',
MAX_FILESIZE:'1024*1024*10',
IMAGE_URL_HEAD:'"http://cdn.singsingenglish.com/"',
INVITE_URL:'"http://wechat.test.singsingenglish.com"',
AUTHOR_UEL:'"https://wechat_test.changchangenglish.com/api/client/login"',
REDIRECT_URL:'"http://localhost:8085/"',
});
......@@ -4,4 +4,5 @@ module.exports = {
IMAGE_URL_HEAD:'"http://cdn.singsingenglish.com/"',
API_URL: '"/"',
MAX_FILESIZE:'1024*1024*10',
AUTHOR_UEL:'"https://wechat_test.changchangenglish.com/api/client/login"'
}
......@@ -7,4 +7,5 @@ module.exports = merge(prodEnv, {
IMAGE_URL_HEAD:'"http://cdn.singsingenglish.com/"',
API_URL: '"/"',
MAX_FILESIZE:'1024*1024*10',
AUTHOR_UEL:'"https://wechat_test.changchangenglish.com/api/client/login"'
})
......@@ -2,8 +2,9 @@
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no" />
<title>唱唱启蒙英语</title>
<link rel="stylesheet" href="https://at.alicdn.com/t/font_822651_udxjxcaax8f.css">
</head>
<body>
<div id="app"></div>
......
......@@ -184,6 +184,23 @@
"integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=",
"dev": true
},
"asap": {
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz",
"integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=",
"dev": true,
"optional": true
},
"asn1": {
"version": "0.2.4",
"resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz",
"integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==",
"dev": true,
"optional": true,
"requires": {
"safer-buffer": "2.1.2"
}
},
"asn1.js": {
"version": "4.10.1",
"resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz",
......@@ -221,6 +238,12 @@
}
}
},
"assert-plus": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
"integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=",
"dev": true
},
"assign-symbols": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz",
......@@ -248,6 +271,13 @@
"integrity": "sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg==",
"dev": true
},
"asynckit": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
"integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=",
"dev": true,
"optional": true
},
"atob": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz",
......@@ -268,6 +298,20 @@
"postcss-value-parser": "3.3.0"
}
},
"aws-sign2": {
"version": "0.7.0",
"resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz",
"integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=",
"dev": true,
"optional": true
},
"aws4": {
"version": "1.8.0",
"resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz",
"integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==",
"dev": true,
"optional": true
},
"axios": {
"version": "0.18.0",
"resolved": "http://registry.npmjs.org/axios/-/axios-0.18.0.tgz",
......@@ -1189,6 +1233,16 @@
"integrity": "sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY=",
"dev": true
},
"bcrypt-pbkdf": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz",
"integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=",
"dev": true,
"optional": true,
"requires": {
"tweetnacl": "0.14.5"
}
},
"bfj-node4": {
"version": "5.3.1",
"resolved": "https://registry.npmjs.org/bfj-node4/-/bfj-node4-5.3.1.tgz",
......@@ -1551,6 +1605,13 @@
"integrity": "sha512-ovvb0uya4cKJct8Rj9Olstz0LaWmyJhCp3NawRG5fVigka8pEhIIwipF7zyYd2Q58UZb5YfIt52pVF444uj2kQ==",
"dev": true
},
"caseless": {
"version": "0.12.0",
"resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz",
"integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=",
"dev": true,
"optional": true
},
"center-align": {
"version": "0.1.3",
"resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz",
......@@ -1798,6 +1859,15 @@
"integrity": "sha1-FopHAXVran9RoSzgyXv6KMCE7WM=",
"dev": true
},
"combined-stream": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz",
"integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=",
"dev": true,
"requires": {
"delayed-stream": "1.0.0"
}
},
"commander": {
"version": "2.17.1",
"resolved": "https://registry.npmjs.org/commander/-/commander-2.17.1.tgz",
......@@ -2375,6 +2445,16 @@
"es5-ext": "0.10.46"
}
},
"dashdash": {
"version": "1.14.1",
"resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz",
"integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=",
"dev": true,
"optional": true,
"requires": {
"assert-plus": "1.0.0"
}
},
"date-now": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz",
......@@ -2513,6 +2593,12 @@
}
}
},
"delayed-stream": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
"integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=",
"dev": true
},
"depd": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz",
......@@ -2631,6 +2717,14 @@
}
}
},
"dom7": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/dom7/-/dom7-2.1.0.tgz",
"integrity": "sha512-AUKEuF4M4hEg3isykF0cOz6GQiO4furiki58bryfVqedlKY3BJTR+l5HaH4AXt9Yi1iptGnzgumS+MhxFA6e0g==",
"requires": {
"ssr-window": "1.0.1"
}
},
"domain-browser": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz",
......@@ -2680,6 +2774,17 @@
"stream-shift": "1.0.0"
}
},
"ecc-jsbn": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz",
"integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=",
"dev": true,
"optional": true,
"requires": {
"jsbn": "0.1.1",
"safer-buffer": "2.1.2"
}
},
"ee-first": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
......@@ -3110,6 +3215,13 @@
}
}
},
"extend": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",
"integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==",
"dev": true,
"optional": true
},
"extend-shallow": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz",
......@@ -3214,6 +3326,12 @@
"webpack-sources": "1.2.0"
}
},
"extsprintf": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz",
"integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=",
"dev": true
},
"fast-deep-equal": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz",
......@@ -3406,6 +3524,25 @@
"for-in": "1.0.2"
}
},
"forever-agent": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz",
"integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=",
"dev": true,
"optional": true
},
"form-data": {
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.2.tgz",
"integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=",
"dev": true,
"optional": true,
"requires": {
"asynckit": "0.4.0",
"combined-stream": "1.0.6",
"mime-types": "2.1.20"
}
},
"forwarded": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz",
......@@ -4052,6 +4189,16 @@
"integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=",
"dev": true
},
"getpass": {
"version": "0.1.7",
"resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz",
"integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=",
"dev": true,
"optional": true,
"requires": {
"assert-plus": "1.0.0"
}
},
"glob": {
"version": "7.1.3",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz",
......@@ -4171,6 +4318,24 @@
"integrity": "sha1-/Xqtcmvxpf0W38KbL3pmAdJxOcQ=",
"dev": true
},
"har-schema": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz",
"integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=",
"dev": true,
"optional": true
},
"har-validator": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.0.tgz",
"integrity": "sha512-+qnmNjI4OfH2ipQ9VQOw23bBd/ibtfbVdK2fYbY4acTDqKTW/YDp9McimZdDbG8iV9fZizUqQMD5xvriB146TA==",
"dev": true,
"optional": true,
"requires": {
"ajv": "5.5.2",
"har-schema": "2.0.0"
}
},
"has": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
......@@ -4548,6 +4713,18 @@
}
}
},
"http-signature": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz",
"integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=",
"dev": true,
"optional": true,
"requires": {
"assert-plus": "1.0.0",
"jsprim": "1.4.1",
"sshpk": "1.14.2"
}
},
"https-browserify": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz",
......@@ -4593,6 +4770,13 @@
"integrity": "sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==",
"dev": true
},
"image-size": {
"version": "0.5.5",
"resolved": "https://registry.npmjs.org/image-size/-/image-size-0.5.5.tgz",
"integrity": "sha1-Cd/Uq50g4p6xw+gLiZA3jfnjy5w=",
"dev": true,
"optional": true
},
"import-cwd": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/import-cwd/-/import-cwd-2.1.0.tgz",
......@@ -4937,6 +5121,13 @@
"integrity": "sha1-PMWfAAJRlLarLjjbrmaJJWtmBXI=",
"dev": true
},
"is-typedarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
"integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=",
"dev": true,
"optional": true
},
"is-utf8": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz",
......@@ -4973,6 +5164,13 @@
"integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=",
"dev": true
},
"isstream": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz",
"integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=",
"dev": true,
"optional": true
},
"js-base64": {
"version": "2.4.9",
"resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.4.9.tgz",
......@@ -5000,6 +5198,13 @@
"esprima": "2.7.3"
}
},
"jsbn": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz",
"integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=",
"dev": true,
"optional": true
},
"jsesc": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz",
......@@ -5018,12 +5223,26 @@
"integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==",
"dev": true
},
"json-schema": {
"version": "0.2.3",
"resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz",
"integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=",
"dev": true,
"optional": true
},
"json-schema-traverse": {
"version": "0.3.1",
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz",
"integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=",
"dev": true
},
"json-stringify-safe": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
"integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=",
"dev": true,
"optional": true
},
"json3": {
"version": "3.3.2",
"resolved": "https://registry.npmjs.org/json3/-/json3-3.3.2.tgz",
......@@ -5036,6 +5255,19 @@
"integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=",
"dev": true
},
"jsprim": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz",
"integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=",
"dev": true,
"optional": true,
"requires": {
"assert-plus": "1.0.0",
"extsprintf": "1.3.0",
"json-schema": "0.2.3",
"verror": "1.10.0"
}
},
"killable": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/killable/-/killable-1.0.0.tgz",
......@@ -5076,6 +5308,50 @@
"invert-kv": "1.0.0"
}
},
"less": {
"version": "3.8.1",
"resolved": "https://registry.npmjs.org/less/-/less-3.8.1.tgz",
"integrity": "sha512-8HFGuWmL3FhQR0aH89escFNBQH/nEiYPP2ltDFdQw2chE28Yx2E3lhAIq9Y2saYwLSwa699s4dBVEfCY8Drf7Q==",
"dev": true,
"requires": {
"clone": "2.1.2",
"errno": "0.1.7",
"graceful-fs": "4.1.11",
"image-size": "0.5.5",
"mime": "1.6.0",
"mkdirp": "0.5.1",
"promise": "7.3.1",
"request": "2.88.0",
"source-map": "0.6.1"
},
"dependencies": {
"clone": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz",
"integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=",
"dev": true
}
}
},
"less-loader": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/less-loader/-/less-loader-4.1.0.tgz",
"integrity": "sha512-KNTsgCE9tMOM70+ddxp9yyt9iHqgmSs0yTZc5XH5Wo+g80RWRIYNqE58QJKm/yMud5wZEvz50ugRDuzVIkyahg==",
"dev": true,
"requires": {
"clone": "2.1.2",
"loader-utils": "1.1.0",
"pify": "3.0.0"
},
"dependencies": {
"clone": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz",
"integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=",
"dev": true
}
}
},
"load-json-file": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz",
......@@ -5794,11 +6070,17 @@
"integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=",
"dev": true
},
"oauth-sign": {
"version": "0.9.0",
"resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz",
"integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==",
"dev": true,
"optional": true
},
"object-assign": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
"integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=",
"dev": true
"integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM="
},
"object-copy": {
"version": "0.1.0",
......@@ -6166,6 +6448,13 @@
"sha.js": "2.4.11"
}
},
"performance-now": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
"integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=",
"dev": true,
"optional": true
},
"pify": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
......@@ -8339,6 +8628,16 @@
"integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==",
"dev": true
},
"promise": {
"version": "7.3.1",
"resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz",
"integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==",
"dev": true,
"optional": true,
"requires": {
"asap": "2.0.6"
}
},
"promise-inflight": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz",
......@@ -8367,6 +8666,13 @@
"integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=",
"dev": true
},
"psl": {
"version": "1.1.29",
"resolved": "https://registry.npmjs.org/psl/-/psl-1.1.29.tgz",
"integrity": "sha512-AeUmQ0oLN02flVHXWh9sSJF7mcdFq0ppid/JkErufc3hGIV/AMa8Fo9VgDo/cT2jFdOWoFvHp90qqBH54W+gjQ==",
"dev": true,
"optional": true
},
"public-encrypt": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.2.tgz",
......@@ -8807,6 +9113,44 @@
"is-finite": "1.0.2"
}
},
"request": {
"version": "2.88.0",
"resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz",
"integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==",
"dev": true,
"optional": true,
"requires": {
"aws-sign2": "0.7.0",
"aws4": "1.8.0",
"caseless": "0.12.0",
"combined-stream": "1.0.6",
"extend": "3.0.2",
"forever-agent": "0.6.1",
"form-data": "2.3.2",
"har-validator": "5.1.0",
"http-signature": "1.2.0",
"is-typedarray": "1.0.0",
"isstream": "0.1.2",
"json-stringify-safe": "5.0.1",
"mime-types": "2.1.20",
"oauth-sign": "0.9.0",
"performance-now": "2.1.0",
"qs": "6.5.2",
"safe-buffer": "5.1.2",
"tough-cookie": "2.4.3",
"tunnel-agent": "0.6.0",
"uuid": "3.3.2"
},
"dependencies": {
"qs": {
"version": "6.5.2",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz",
"integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==",
"dev": true,
"optional": true
}
}
},
"require-directory": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
......@@ -8929,6 +9273,12 @@
"ret": "0.1.15"
}
},
"safer-buffer": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
"dev": true
},
"sax": {
"version": "1.2.4",
"resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz",
......@@ -9404,6 +9754,29 @@
"integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=",
"dev": true
},
"sshpk": {
"version": "1.14.2",
"resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.14.2.tgz",
"integrity": "sha1-xvxhZIo9nE52T9P8306hBeSSupg=",
"dev": true,
"optional": true,
"requires": {
"asn1": "0.2.4",
"assert-plus": "1.0.0",
"bcrypt-pbkdf": "1.0.2",
"dashdash": "1.14.1",
"ecc-jsbn": "0.1.2",
"getpass": "0.1.7",
"jsbn": "0.1.1",
"safer-buffer": "2.1.2",
"tweetnacl": "0.14.5"
}
},
"ssr-window": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/ssr-window/-/ssr-window-1.0.1.tgz",
"integrity": "sha512-dgFqB+f00LJTEgb6UXhx0h+SrG50LJvti2yMKMqAgzfUmUXZrLSv2fjULF7AWGwK25EXu8+smLR3jYsJQChPsg=="
},
"ssri": {
"version": "5.3.0",
"resolved": "https://registry.npmjs.org/ssri/-/ssri-5.3.0.tgz",
......@@ -9581,6 +9954,15 @@
"whet.extend": "0.9.9"
}
},
"swiper": {
"version": "4.3.5",
"resolved": "https://registry.npmjs.org/swiper/-/swiper-4.3.5.tgz",
"integrity": "sha512-zFRvMZNFFrXGJWRSJLeD8wkHcIr5uStqk+Cv1fvPDtZxB687PurfjYgK1Ga7j7XQGm5xfCqGMSELNRSaBn36gA==",
"requires": {
"dom7": "2.1.0",
"ssr-window": "1.0.1"
}
},
"tapable": {
"version": "0.2.8",
"resolved": "https://registry.npmjs.org/tapable/-/tapable-0.2.8.tgz",
......@@ -9667,6 +10049,26 @@
"integrity": "sha1-LmhELZ9k7HILjMieZEOsbKqVACk=",
"dev": true
},
"tough-cookie": {
"version": "2.4.3",
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz",
"integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==",
"dev": true,
"optional": true,
"requires": {
"psl": "1.1.29",
"punycode": "1.4.1"
},
"dependencies": {
"punycode": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz",
"integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=",
"dev": true,
"optional": true
}
}
},
"trim-newlines": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz",
......@@ -9691,6 +10093,23 @@
"integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=",
"dev": true
},
"tunnel-agent": {
"version": "0.6.0",
"resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
"integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=",
"dev": true,
"optional": true,
"requires": {
"safe-buffer": "5.1.2"
}
},
"tweetnacl": {
"version": "0.14.5",
"resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz",
"integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=",
"dev": true,
"optional": true
},
"type-is": {
"version": "1.6.16",
"resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.16.tgz",
......@@ -10037,6 +10456,18 @@
"integrity": "sha512-w/hry/368nO21AN9QljsaIhb9ZiZtZARoVH5f3CsFbawdLdayCgKRPup7CggujvySMxx0I91NOyxdVENohprLQ==",
"dev": true
},
"verror": {
"version": "1.10.0",
"resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz",
"integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=",
"dev": true,
"optional": true,
"requires": {
"assert-plus": "1.0.0",
"core-util-is": "1.0.2",
"extsprintf": "1.3.0"
}
},
"vm-browserify": {
"version": "0.0.4",
"resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz",
......@@ -10051,6 +10482,15 @@
"resolved": "https://registry.npmjs.org/vue/-/vue-2.5.17.tgz",
"integrity": "sha512-mFbcWoDIJi0w0Za4emyLiW72Jae0yjANHbCVquMKijcavBGypqlF7zHRgMa5k4sesdv7hv2rB4JPdZfR+TPfhQ=="
},
"vue-awesome-swiper": {
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/vue-awesome-swiper/-/vue-awesome-swiper-3.1.3.tgz",
"integrity": "sha512-E7suzkyApO8vNZbgdEnjSmnpsmQZyRvSVXJ7sey3XYwKPOkLhH3+GnHroBw+5PZIQXvWBwdCeQsPG1xQ1r1Rhg==",
"requires": {
"object-assign": "4.1.1",
"swiper": "4.3.5"
}
},
"vue-hot-reload-api": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/vue-hot-reload-api/-/vue-hot-reload-api-2.3.0.tgz",
......
<template>
<div id="app">
<img src="./assets/logo.png">
<router-view/>
</div>
</template>
......@@ -13,11 +12,20 @@ export default {
<style>
#app {
font-family: 'Avenir', Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
margin-top: 60px;
font-family: "Helvetica Neue",
Helvetica,
"PingFang SC",
"Hiragino Sans GB",
"Microsoft YaHei",
"微软雅黑",
Arial,
sans-serif;
}
html,body{
height: 100%;
}
*{
margin: auto;
padding: auto;
}
</style>
<template>
<div class="hello">
<h1>{{ msg }}</h1>
<h2>Essential Links</h2>
<ul>
<li>
<a
href="https://vuejs.org"
target="_blank"
>
Core Docs
</a>
</li>
<li>
<a
href="https://forum.vuejs.org"
target="_blank"
>
Forum
</a>
</li>
<li>
<a
href="https://chat.vuejs.org"
target="_blank"
>
Community Chat
</a>
</li>
<li>
<a
href="https://twitter.com/vuejs"
target="_blank"
>
Twitter
</a>
</li>
<br>
<li>
<a
href="http://vuejs-templates.github.io/webpack/"
target="_blank"
>
Docs for This Template
</a>
</li>
</ul>
<h2>Ecosystem</h2>
<ul>
<li>
<a
href="http://router.vuejs.org/"
target="_blank"
>
vue-router
</a>
</li>
<li>
<a
href="http://vuex.vuejs.org/"
target="_blank"
>
vuex
</a>
</li>
<li>
<a
href="http://vue-loader.vuejs.org/"
target="_blank"
>
vue-loader
</a>
</li>
<li>
<a
href="https://github.com/vuejs/awesome-vue"
target="_blank"
>
awesome-vue
</a>
</li>
</ul>
</div>
</template>
<script>
export default {
name: 'HelloWorld',
data () {
return {
msg: 'Welcome to Your Vue.js App'
}
}
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h1, h2 {
font-weight: normal;
}
ul {
list-style-type: none;
padding: 0;
}
li {
display: inline-block;
margin: 0 10px;
}
a {
color: #42b983;
}
</style>
<template>
<div class="address">
<!--地址选择组件-->
<mt-popup v-model="show" position="bottom" :closeOnClickModal="closeOnClickModal">
<section style="width:100%; height: 100%;">
<div class="padding">
<span @click="hidePicker">取消</span>
<span @click="saveAddress" class="float-right">完成</span>
</div>
<mt-picker :slots="slots" @change="onValuesChange"></mt-picker>
</section>
</mt-popup>
</div>
</template>
<script>
import Address from './addr.js'
let type = 1
let provinceValue = 2
let cityValue = 52
//根据apid查找对象
function findcity(item) {
return item.type == type;
}
//根据aname获取名字
function getAddressName(item) {
return item.label
}
//根据aname获取children
function getAddressChildren(item) {
return item.children
}
// 根据label获取对象
function findObj (list, label) {
let filtered = list.filter((item) => {
return item.label === label
})
return filtered[0]
}
// 根据value获取list中的children
function findChildren(list, value) {
let filtered = list.filter((item) => {
return item.value === value
})
return filtered[0].children
}
//筛选出各省级对象
let pObj = Address.filter(findcity)
//获取各省级对象名字
let provinces = pObj.map(getAddressName)
// 根据省级value获取各市对象
let citiesObj = findChildren(pObj, provinceValue)
let cities = citiesObj.map(getAddressName)
let countriesObj = findChildren(citiesObj, cityValue)
let countries = countriesObj.map(getAddressName)
export default {
name: 'address',
props: {
showAddressPicker: Boolean,
init: String
},
created() {
if (this.init) {
this.initVal = this.init
}
this.initAddress()
},
mounted() {
let vm = this
vm.show = vm.showAddressPicker
},
data() {
return {
slots: [{
flex: 1,
values: [],
className: 'slot1',
textAlign: 'center',
defaultIndex: 3
}, {
divider: true,
content: '-',
className: 'slot2'
}, {
flex: 1,
values: [],
className: 'slot3',
textAlign: 'center'
}, {
divider: true,
content: '-',
className: 'slot4',
defaultIndex: 0
}, {
flex: 1,
values: [],
className: 'slot5',
textAlign: 'center',
defaultIndex: 0
}],
addressValue: '',
addressValueCode: '',
disableClear: true,
show: true,
initVal: '北京-北京-东城区',
closeOnClickModal: false
}
},
watch: {
showAddressPicker(old, val) {
this.show = !val
},
init(val) {
this.initVal = val
this.initAddress()
}
},
methods: {
saveAddress() { //保存所选地区
let vm = this
vm.show = false
vm.$emit('save-address', vm.addressValue, vm.addressValueCode);
},
hidePicker() { // 取消选择
this.$emit('hide-picker', false);
},
initAddress() { //初始化地址组件
let vm = this
let initAddress = vm.initVal.split("-")
let defaultIndex0 = pObj.findIndex((obj)=>{
return obj.label === initAddress[0]
});
vm.slots[0].values = provinces
vm.slots[0].defaultIndex = defaultIndex0
let tempCitiesObj = pObj[defaultIndex0].children
let defaultIndex1 = tempCitiesObj.findIndex((obj)=>{
return obj.label === initAddress[1]
});
vm.slots[2].values = tempCitiesObj.map(getAddressName)
vm.slots[2].defaultIndex = defaultIndex1
let tempCountriesObj = tempCitiesObj[defaultIndex1].children
let defaultIndex2 = tempCountriesObj.findIndex((obj)=>{
return obj.label === initAddress[2]
});
vm.slots[4].values = tempCountriesObj.map(getAddressName)
vm.slots[4].defaultIndex = defaultIndex2
vm.addressValue = vm.slots[0].values[vm.slots[0].defaultIndex] +
"-" + vm.slots[2].values[vm.slots[2].defaultIndex] +
"-" + vm.slots[4].values[vm.slots[4].defaultIndex]
},
onValuesChange(picker, values) {
let vm = this
let valueCodes = []
let defaultIndex0 = pObj.findIndex((obj)=>{
return obj.label === values[0]
});
if(defaultIndex0 > -1){
vm.slots[0].defaultIndex = defaultIndex0
valueCodes[0] = pObj[defaultIndex0].value
let tempCitiesObj = pObj[defaultIndex0].children
vm.slots[2].values = tempCitiesObj.map(getAddressName)
let defaultIndex1 = tempCitiesObj.findIndex((obj)=>{
return obj.label === values[1]
})
if(defaultIndex1 > -1) {
vm.slots[2].defaultIndex = defaultIndex1
valueCodes[1] = tempCitiesObj[defaultIndex1].value
let tempCountriesObj = tempCitiesObj[defaultIndex1].children
vm.slots[4].values = tempCountriesObj.map(getAddressName)
let defaultIndex2 = tempCountriesObj.findIndex((obj)=>{
return obj.label === values[2]
})
valueCodes[2] = defaultIndex2 > -1 ? tempCountriesObj[defaultIndex2].value : tempCountriesObj[0].value
vm.slots[4].defaultIndex = defaultIndex2 > -1 ? defaultIndex2 : 0
vm.addressValue = values.join("-")
vm.addressValueCode = valueCodes.join("-")
}
}
}
}
}
</script>
<style scoped>
.mint-popup {
width: 100%;
}
.footer-btn {
box-sizing: border-box;
position: fixed;
width: 100%;
z-index: 2;
left: 0;
bottom: 3rem;
}
.input {
border: none;
}
.padding {
padding: 1.5rem;
font-size: 1.4rem;
}
.float-right {
float: right;
}
</style>
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
<template>
<div class="author">
<img :src="loadingUrl" />
<p>正在加载中......</p>
<p class="reload" :click="onPageReload">点击重新加载</p>
</div>
</template>
<script>
export default {
name: 'author',
data () {
return {
loadingUrl: 'https://cdn.singsingenglish.com/singsing/poster/monkey.jpg'
}
},
created () {
window.location.href = `${process.env.AUTHOR_UEL}?redirect_url=${this.$route.query.retUrl}`
},
methods: {
onPageReload: function () {
window.location.reload()
}
}
}
</script>
<style scoped lang="less">
img[lazy=loading] {
width: 50vw !important;
height: 50vw;
background-color: #eee;
margin: auto;
}
.author {
display: flex;
flex-flow: column nowrap;
justify-content: center;
align-items: center;
height: 100vh;
font-size: 1.8rem;
&>img {
width: 50vw;
}
.reload {
font-size: 1.2rem;
color: #199be0;
}
}
</style>
<template>
<div class="address">
<mt-header title="添加地址">
<mt-button icon="back" slot="left" @click="closeAdd">返回</mt-button>
</mt-header>
<mt-field label="收货人" v-model="receiveName"></mt-field>
<mt-field label="手机号" v-model="receiveMobile"></mt-field>
<mt-cell title="所在地区" :value="addressArea" @click.native="showPicker" is-link></mt-cell>
<mt-field label="详细地址" v-model="address"></mt-field>
<div @click="onSave" class="btn">保存</div>
<my-address :showAddressPicker="showAddressPicker" @save-address="saveAddress" @hide-picker="hidePicker" :init="addressArea">
</my-address>
</div>
</template>
<script>
import MyAddress from '@/components/address-picker/Address.vue'
import { Toast } from 'mint-ui'
export default {
name: 'address',
components: {
MyAddress
},
data () {
return {
receiveName: '',
receiveMobile: '',
addressDetail: '',
showAddressPicker: false,
addressArea: '广东-深圳-福田区',
addressAreaCode: '6-77-705',
address: ''
}
},
mounted () {
this.getUserAddress()
},
computed: {
courseUrl: function () {
return this[`courseType${this.type}Url`]
}
},
methods: {
closeAdd(){
this.$emit('closeAdd', false)
},
onSave: function () {
let values = this.addressAreaCode.split('-')
let labels = this.addressArea.split('-')
if (!this.receiveName) {
Toast('收货人不能为空')
return false
} else if (!this.receiveMobile) {
Toast('手机号不能为空')
return false
} else if (!(/^1\d{10}$/.test(this.receiveMobile))) {
Toast('手机号格式不正确')
return false
} else if (!this.address) {
Toast('详细地址不能为空')
return false
}
let param = {}
param.receive_name = this.receiveName
param.receive_mobile = this.receiveMobile
param.address = this.address
param.province_id = values[0]
param.province_name = labels[0]
param.city_id = values[1]
param.city = labels[1]
param.area_id = values[2]
param.area = labels[2]
Server.saveAddress(param).then((res) => {
if (res.data.result === 'success') {
this.closeAdd()
}
})
},
onValuesChange: function (picker, values) {
if (values[0] > values[1]) {
picker.setSlotValue(1, values[0])
}
},
hidePicker () {
// 接受子组件关闭popup事件
this.showAddressPicker = false
},
showPicker () {
this.showAddressPicker = !this.showAddressPicker
},
saveAddress (labels, values) {
// 从子组件接受返回所选值 val
this.addressArea = labels
this.addressAreaCode = values
this.showAddressPicker = !this.showAddressPicker
},
getUserAddress: function () {
Server.getUserAddress().then((res) => {
if (res.data.result === 'success' && res.data.data) {
if (res.data.data) {
let addressInfo = res.data.data
this.receiveName = addressInfo.receive_name ? addressInfo.receive_name : ''
this.receiveMobile = addressInfo.receive_mobile ? addressInfo.receive_mobile : ''
this.address = addressInfo.address
this.addressArea = `${addressInfo.province_name}-${addressInfo.city}-${addressInfo.area}`
this.addressAreaCode = `${addressInfo.province_id}-${addressInfo.city_id}-${addressInfo.area_id}`
}
}
})
}
}
}
</script>
<style scoped lang="less">
image[lazy=loading] {
width: 140px;
height: 300px;
margin: auto;
}
.no-select {
-webkit-touch-callout: none;
-webkit-text-size-adjust: none;
-webkit-tap-highlight-color: transparent;
-webkit-user-select: none;
user-select: none;
}
.address {
.btn{
margin-top: 20vw;
height: 11.73333vw;
line-height: 11.73333vw;
color: #fff;
font-size: 1.4rem;
text-align: center;
background: #60ADF0;
-webkit-box-shadow: 0 2px 6.66667vw 0 rgba(200, 205, 220, 0.7);
box-shadow: 0 2px 6.66667vw 0 rgba(200, 205, 220, 0.7);
border-radius: 20px;
margin-left: 1rem;
margin-right: 1rem;
}
}
</style>
<template>
<div class="group-buy">
<div class="address-block" v-if="groupDetail.allow_distribute === 1">
<div class="add-address" v-if="!addressObj" @click="showAdd">
+请输入收件人地址
</div>
<div class="address-content" v-if="addressObj" @click="showAdd">
<div class="hf">姓名:{{addressObj.receive_name}}</div>
<div class="hf">联系电话:{{addressObj.receive_mobile}}</div>
<div>收货人:{{addressObj.province_name}}{{addressObj.city}}{{addressObj.area}}{{addressObj.address}}</div>
</div>
</div>
<div class="shop-block">
<div class="shop">
<div class="img-block">
<img :src="groupDetail.share_info.shareIcon">
</div>
<div>
<div class="title">
{{groupDetail.product_title}}
</div>
<div class="content">
{{groupDetail.product_detail}}
</div>
<div class="price" v-if="type === 0">
价格 ¥{{groupDetail.single_price/100}}
</div>
<div class="price" v-if="type === 1">
团购价 ¥{{groupDetail.group_price/100}}
</div>
</div>
</div>
</div>
<footer>
合计金额:<span>{{price}}</span>
<div class="pay-btn" @click="payOrder">提交订单</div>
</footer>
<transition name="slide-fade">
<div v-if="addressPop" class="address-pop">
<addAddress @closeAdd="closeAdd"></addAddress>
</div>
</transition>
</div>
</template>
<script>
import Service from '../../service'
import common from '../../util/common'
import { Toast, MessageBox } from 'mint-ui'
import addAddress from './address'
export default {
name: "buy",
components:{
addAddress
},
data(){
return{
addressPop:false,
groupDetail:false,
popupVisible:true,
shopId:'',
groupId:'',
addressObj:false,
price:'',
source:'',
type:0,
jsApiParameters:'',
orderNo:''
}
},
mounted(){
this.initPage()
},
methods:{
trackingPage(data,type){
let json={
type:type,
value:'groupAddress',
desc:data
};
Service.trackingAciton(json)
},
jsApiCall: function () {
let that = this
// eslint-disable-next-line
// let _URL = this.$router.resolve({name:'groupSuccess',query:{out_trade_no:this.orderNo}}).location;
WeixinJSBridge.invoke(
'getBrandWCPayRequest',
this.jsApiParameters,
function (res) {
// eslint-disable-next-line
// WeixinJSBridge.log(res.err_msg)
if (res.err_msg === 'get_brand_wcpay_request:ok') {
// 支付成功后处理
Toast('支付成功');
// that.$router.push(_URL);
window._hmt.push(['_trackEvent', '下单页','支付成功' ,`shopId=${this.shopId}&groupId=${this.groupId}&source=${this.source}`]);//百度统计
setTimeout(function () {
that.$router.push({name:'groupSuccess',query:{out_trade_no:that.orderNo,source:that.source}});
},1000)
// window.location.href = `/#/groupSuccess?out_trade_no=${that.orderNo}`
}
if (res.err_msg === 'get_brand_wcpay_request:fail') {
Toast('购买失败')
}
if (res.err_msg === 'get_brand_wcpay_request:cancel') {
Toast('取消购买')
}
})
},
payOrder(){
if(this.groupDetail.allow_distribute === 1 && !this.addressObj){
Toast('请填写地址');
return false
}
let json={
product_type:'group',
buy_type:this.type,
source:this.source,
group_order_id:this.groupId,
product_id:this.shopId
};
Service.groupPay(json).then(res=>{
if (res.data.result === 'success') {
let that = this;
this.orderNo = res.data.data.out_trade_no
this.jsApiParameters = res.data.data;
wx.miniProgram.getEnv(function(res) {
if(res.miniprogram){
let payParam = encodeURIComponent(JSON.stringify(json))
console.log('是小程序环境',payParam,JSON.stringify(json))
window._hmt.push(['_trackEvent', 'document','miniPay','触发小程序购买']);
wx.miniProgram.navigateTo({url: `pages/wxPay/main?payParam=${payParam}`})
}else if (typeof WeixinJSBridge === 'undefined') {
if (document.addEventListener) {
document.addEventListener('WeixinJSBridgeReady', that.jsApiCall, false)
} else if (document.attachEvent) {
document.attachEvent('WeixinJSBridgeReady', that.jsApiCall);
document.attachEvent('onWeixinJSBridgeReady', that.jsApiCall)
}
} else {
that.jsApiCall()
}
})
} else {
MessageBox.alert('', res.data.message)
}
})
},
closeAdd(data){
this.addressPop = false;
this.initPage()
},
showAdd(){
this.addressPop = true
},
initPage(){
Service.getUserAddress().then(res=>{
this.addressObj = res.data.data
});
this.type = Number(common.getUrlParam('type'));
this.shopId = common.getUrlParam('shopId');
Service.getGroupDetail(this.shopId).then(res=>{
if(res.data.result==='success'){
let data = res.data.data;
data.product_img = JSON.parse(data.product_img);
data.share_info = JSON.parse(data.share_info);
this.groupDetail = data;
this.groupId = common.getUrlParam('groupId');
this.source = common.getUrlParam('source');
this.trackingPage(`shopId=${this.shopId}&groupId=${this.groupId}&source=${this.source}&type=${this.type}`,'page');
if(this.type === 0){
this.price=data.single_price/100
}else{
this.price = data.group_price/100
}
}else{
Toast(res.data.message);
}
});
}
}
}
</script>
<style scoped lang="less">
.slide-fade-enter-active {
transition: all .5s ease;
}
.slide-fade-leave-active {
transition: all .5s cubic-bezier(1.0, 0.5, 0.8, 1.0);
}
.slide-fade-enter, .slide-fade-leave-to
/* .slide-fade-leave-active for below version 2.1.8 */ {
transform: translateX(10px);
opacity: 0;
}
.group-buy{
.address-block{
background: #f0f0f0;
padding: 10*7.5vw 0;
.add-address{
background: white;
height: 90*7.5vw;
line-height: 90*7.5vw;
margin: 20*7.5vw 20*7.5vw;
text-align: center;
border-radius: 100px;
font-size: 16px;
color: #666666;
}
.address-content{
padding: 20*7.5vw;
background: white;
line-height: 1.6em;
}
}
.shop-block{
.shop{
padding: 20*7.5vw;
border-bottom: 1px solid #d8d8d8;
position: relative;
&:after{
content:'';
display: block;
clear: both;
}
.img-block{
float: left;
margin-right: 20*7.5vw;
img{
width: 250*7.5vw;
}
min-height: 120px;
}
.title{
font-size: 18px;
overflow: hidden;
text-overflow:ellipsis;
white-space: nowrap;
color: #333333;
margin-bottom: 5*7.5vw;
}
.content{
font-size: 12px;
line-height: 1.4em;
color: #CCCCCC;
height: 4.2em;
overflow: hidden;
}
.price{
font-size: 18px;
color: #FF001F;
position: absolute;
right: 20*7.5vw;
bottom: 20*7.5vw;
}
}
}
footer{
position: fixed;
bottom: 0;
width: 100%;
border-top: 1px solid #d8d8d8;
padding-left: 20*7.5vw;
height: 100*7.5vw;
line-height: 100*7.5vw;
span{
font-size: 20px;
color: #F83534;
}
.pay-btn{
width: 300*7.5vw;
text-align: center;
float: right;
height: 100*7.5vw;
background: #F83534;
color: white;
}
}
.address-pop{
top: 0;
bottom: 0;
left: 0;
right: 0;
position: fixed;
background: white;
}
}
</style>
<template>
<div class="group-index" v-if="groupDetail">
<swiper :options="swiperOption" class="banner" ref="mySwiper">
<swiper-slide v-for="(data,index) in groupDetail.product_img" :key="index">
<img :src="data"/>
</swiper-slide>
<div class="swiper-pagination" slot="pagination"></div>
</swiper>
<div class="head">
<div class="title">
{{groupDetail.name}}
</div>
<span class="detail">
{{groupDetail.goods_desc}}
</span>
<div class="price">
<span class="price-content">{{groupDetail.current_price/100}}</span>
</div>
</div>
<div class="welfare" v-if="groupDetail.head_welfare && groupDetail.head_welfare !== '' && groupDetail.head_welfare !== null">
团长福利:{{groupDetail.head_welfare}}
</div>
<div class="main-detail">
<div class="tab-content">
<div :class="{'tab-btn':true,active:tabType}" @click="tabType=true">图文详情</div>
<div :class="{'tab-btn':true,active:!tabType}" @click="tabType=false">Q&A</div>
</div>
<div v-if="tabType" class="detail">
<div v-html="groupDetail.desc"></div>
</div>
<div v-if="!tabType" class="qa-block">
<div class="qa-content" v-html="groupDetail.desc">
</div>
</div>
</div>
<mt-popup v-model="popupVisible">
<div class="pop-block">
<img v-if="popType" :src="qrCode"/>
<img v-if="!popType" :src="groupDetail.teacher_alias"/>
<div>
<span v-if="popType" v-html="popcontentW"></span>
<span v-if="!popType" v-html="popcontentT"></span>
</div>
<img class="close" :src="closeUrl" @click="popupVisible = false">
</div>
</mt-popup>
<mt-popup v-model="popFill" :closeOnClickModal="false">
<div class="pop-fill">
您好,本次拼团已经结束。您可以选择重新开团或单独购买
<div class="btn-block">
<div class="btn" @click="rePlay()">重新开团</div>
</div>
</div>
</mt-popup>
<footer>
<div class="btn" @click="showTeacher()">
<img :src="weChatIcon"/>
</div>
<div class="btn big" @click="groupPay(0)" :id="join ? 'reGroup':'singleBuy'">
<span v-if="!join">{{groupDetail.current_price/100}}</span>
<div v-if="!join">单独购</div>
<span v-if="join">{{groupDetail.current_price/100}}</span>
<div v-if="join">重新开团</div>
</div>
<div class="btn big price" @click="groupPay(1)" :id="join ? 'joinGroup':'newGroup'">
<span>{{groupDetail.current_price/100}}</span>
<div v-if="!join">{{groupDetail.group_num}}人团</div>
<div v-if="join">立即参团</div>
</div>
</footer>
</div>
</template>
<script>
import 'swiper/dist/css/swiper.css'
import { swiper, swiperSlide } from 'vue-awesome-swiper'
import comment from '../../util/common'
import { Toast } from 'mint-ui';
import {getwechatParam,getGoodsDetailApi} from "../../service/api";
import Cookie from '../../util/cookie'
import ShareJs from '../../util/share'
import moreUrl from '../../assets/more.png'
import weChatIcon from '../../assets/wechatIcon.png'
import weChatQrUrl from '../../assets/weChatCode.png'
import closeUrl from '../../assets/closemy.png'
export default {
name: "index",
components: {
swiper,
swiperSlide
},
data(){
return {
join:false,
popType:false,
popFill:false,
popupVisible:false,
tabType:true,
popcontentW:`您已经购买过课程,无需重复<br>购买,您可以添加微信公众号了解更多`,
popcontentT:`为了更好地为您进行课程服务,<br>请扫码添加老师二维码`,
qrCode:weChatQrUrl,
weChatIcon:weChatIcon,
closeUrl:closeUrl,
moreUrl:moreUrl,
swiperOption: {
pagination: {
el: '.swiper-pagination'
}
},
source:'',
shopId:'',
groupId:'',
groupDetail:false
}
},
mounted(){
this.getDetail();
},
methods:{
enableShare: function(option) {
let _url = location.href
getwechatParam().then(wechatRes => {
if (wechatRes.data.result === 'success') {
ShareJs.wxConfig(wechatRes.data.data)
let options = {
title: option.product_title,
desc: option.desc,
link: option.shareUrl,
success:function () {
let link = `shopId=${this.shopId}&groupId=${this.groupId}&source=${this.source}`
window._hmt.push(['_trackEvent', '团购首页', "分享",'商品首页分享',link]);//百度统计
this.trackingPage(link,'share')
}
};
if (option.shareIcon) {
options.imgUrl = option.shareIcon
}
ShareJs.setOptions(options)
}
})
},
onShare: function(type) {
let URL = `${process.env.API_URL2}/#/groupbuy?groupId=${this.groupId}&source=${this.source}`;
if(type === 1 ){
URL = `${process.env.API_URL2}/#/groupbuy?shopId=${this.shopId}&source=${this.source}`
}
this.enableShare({
product_title: this.groupDetail.share_info.share_title,
desc: this.groupDetail.share_info.share_content,
shareIcon:this.groupDetail.share_info.shareIcon,
shareUrl:URL
})
},
getDetail(){
if(window.location.href.indexOf('source')> -1){
this.source = comment.getUrlParam('source');
}
if(window.location.href.indexOf('shopId')>-1){
this.shopId = comment.getUrlParam('shopId');
getGoodsDetailApi(this.shopId).then(res=>{
this.groupDetail = res;
this.trackingPage(`shopId=${this.shopId}&source=${this.source}`,'page')
})
}
},
showTeacher(){
this.popType = false;
this.popupVisible = true
},
groupPay(type){
if (Cookie.get('cc_token')) {
checkGroupPay(this.shopId).then(res => {
if (res.data.result === 'success') {
this.$router.push({
name: 'groupBuyPay',
query: {groupId: this.groupId, shopId: this.shopId, type: type,source:this.source}
})
} else if(res.data.message === '数据不存在'){
this.popType = true;
this.popupVisible = true;
this.popcontentW = `该商品已下架,<br>您可以添加微信公众号了解更多`
}else{
this.popType = true;
this.popupVisible = true;
this.popcontentW = `您已经购买过课程,无需重复<br>购买,您可以添加微信公众号了解更多`
}
})
} else {
this.$router.push({name:'author',query:{'retUrl':window.location.href}})
}
}
}
}
</script>
<style scoped lang="less">
.group-index{
overflow: auto;
height: 100%;
padding-bottom: toVw(150);
background: #f0f0f0;
font-family: PingFangSC-Regular;
.banner{
background: white;
img{
width: 100%;
}
}
.head{
background: white;
margin-bottom: 10px;
padding: 20/7.5vw;
.title{
font-size: 20px;
color: #333333;
margin-bottom: 15/7.5vw;
}
.detail{
font-size: 12px;
line-height: 1.6em;
color: #333333;
display: block;
margin-bottom: 15/7.5vw;
}
.price{
.price-content{
font-family: PingFang-SC-Bold;
font-size: 20px;
color: #F83534;
}
}
}
.head-icon{
padding: 20/7.5vw;
background: white;
margin-bottom: 2px;
.icon{
display: inline-block;
width: 60/7.5vw;
margin: 0 10/7.5vw;
border-radius: 1000px;
vertical-align: middle;
}
.more{
width: 50/7.5vw;
vertical-align: middle;
}
.has{
font-size: 12px;
color: #999999;
float: right;
}
}
.welfare{
background: white;
padding:10/7.5vw ;
font-size: 12px;
text-align: center;
color: #999999;
margin-bottom: 20px;
}
.main-detail{
padding: 20/7.5vw;
background: white;
.tab-content{
border-radius: 9px ;
border: 1px solid #F63539;
&:after{
content: '';
display: block;
clear: both;
}
.tab-btn{
width: 50%;
float: left;
height: 80/7.5vw;
line-height: 80/7.5vw;
text-align: center;
color: #F63539;
border-radius:9px ;
&.active{
background: #F63539;
color: white;
}
}
}
.qa-block{
padding: 20/7.5vw 0 toVw(150) 0;
.qa-content{
margin: toVw(10) 0;
.qa-q{
font-size: 16px;
color: #666666;
}
.qa-a{
font-size: 16px;
color: #333333;
}
}
}
.detail{
padding: 20/7.5vw 0 150/7.5vw 0;
}
}
footer{
position: absolute;
position: fixed;
bottom: 0;
width: 100%;
height: 120/7.5vw;
display: -webkit-box; // OLD - iOS 6-, Safari 3.1-6 //
display: -moz-box; // OLD - Firefox 19- (buggy but mostly works) //
display: -ms-flexbox; // TWEENER - IE 10 //
display: -webkit-flex; // NEW - Chrome //
display: flex; // NEW, Spec - Opera 12.1, Firefox 20+ //
background: white;
padding: 10/7.5vw;
border-top: 1px solid #d8d8d8;
justify-content:space-around;
.btn{
border: 1px solid #cccccc;
border-radius: 8px;
width:0;
flex-grow:2;
text-align: center;
padding: 15/7.5vw 0;
margin: 0 10/7.5vw;
line-height: 1.4em;
font-size: 16px;
color: #666666;
span{
display: block;
font-size: 20px;
font-family: PingFang-SC-Bold;
}
img{
width: 50/7.5vw;
}
&.big{
padding: 5/7.5vw 0;
flex-grow:5;
&.price{
background: #F83534;
border-color: #F83534;
color: white;
}
}
}
}
.pop-block{
padding:40/7.5vw 10/7.5vw;
width: 600/7.5vw;
text-align: center;
font-size: 14px;
color: #666666;
position: relative;
img{
width: 250/7.5vw;
}
.close{
width: 50/7.5vw;
position: absolute;
top: 20/7.5vw;
right: 20/7.5vw;
}
}
.mint-popup{
border-radius: 10px;
}
.pop-fill{
width: 500/7.5vw;
padding:30/7.5vw 30/7.5vw;
font-size: 16px;
color: #333333;
.btn-block{
margin-top: 30/7.5vw;
&:after{
content:'';
display: block;
clear: both;
}
.btn{
float: right;
background: #F83534;
font-size: 14px;
padding: 5/7.5vw 10/7.5vw;
border-radius: 8px;
color: #FFFFFF;
}
}
}
}
</style>
<template>
<div class="success">
<mt-popup
v-model="shareVisible"
class="refer-share"
position="top">
<img :src="shareUrl">
</mt-popup>
<div class="head">
<div v-if="status === 0 && type === 1">
<img :src="successIconUrl">开团成功
<div class="sec">
快去邀请好友加入吧
</div>
</div>
<div v-if=" status === 1 && type === 1">
<img :src="successIconUrl">恭喜,已经拼单成功!
</div>
<div v-if="type === 0">
<img :src="successIconUrl">恭喜,已经购买成功!
</div>
</div>
<div class="shop-block">
<div class="shop">
<div class="img-block">
<img :src="groupDetail.share_info.shareIcon">
</div>
<div>
<div class="title">
{{groupDetail.product_title}}
</div>
<div class="content">
{{groupDetail.product_detail}}
</div>
<div class="price" v-if="type === 0">
价格 ¥{{groupDetail.single_price/100}}
</div>
<div class="price" v-if="type === 1">
团购价 ¥{{groupDetail.group_price/100}}
</div>
</div>
</div>
</div>
<div class="success-block">
<div class="suc-head">
<img v-if="status !== 1 " v-for="(data,index) in buyer_avatar" :src="data" :key="index">
<!--<div v-if="status !== 1" v-for="data in (groupDetail.group_num - buyer_avatar.length)" class="otherIcon"></div>-->
<img :src="defaultUserIconUrl" v-if="status !== 1" v-for="data in (groupDetail.group_num - buyer_avatar.length)"/>
<div class="title" v-if="status !== 1">
还差<span class="red">{{(groupDetail.group_num - buyer_avatar.length)}}</span>人成团,赶快邀请好友来拼单吧
</div>
</div>
<div class="text-content" v-if="type === 0">
恭喜您已成功购买
</div>
<div class="text-content" v-if=" type === 1 && status === 1">
恭喜您已成功拼团
</div>
<div class="text-content last" v-if=" type === 1 && status === 0">
剩余
<span>{{h}}</span>:<span>{{m}}</span>:<span>{{s}}</span>
结束
</div>
</div>
<div class="share" v-if=" type === 1" @click="shareVisible = true">
<img :src="weChatIcon"/>
<br>
分享给好友
<div v-if="groupDetail.head_welfare && groupDetail.head_welfare !== '' && groupDetail.head_welfare !== null">
团长福利:{{groupDetail.head_welfare}}
</div>
</div>
<div class="qr-block">
<img :src="weChatQrUrl"/>
<div class="text">
请扫码关注公众号后,
<br>
点击“我要上课”等待课程开班
</div>
</div>
</div>
</template>
<script>
import Service from '../../service'
import ShareJs from '@/util/share'
import defaultUserIconUrl from '../../assets/Shape@2x.png'
import successIconUrl from '../../assets/successIcon.png'
import weChatQrUrl from '../../assets/weChatCode.png'
import weChatIcon from '../../assets/wechat.jpg'
import shareUrl from '../../assets/Bitmap@2x.png'
export default {
name: "success",
data(){
return {
groupDetail:'',
defaultUserIconUrl:defaultUserIconUrl,
shareUrl:shareUrl,
weChatIcon:weChatIcon,
orderNo:'',
shareVisible:true,
weChatQrUrl:weChatQrUrl,
successIconUrl:successIconUrl,
shopId:'',
type:1,
source:'',
groupId:'',
is_captain:1,
buyer_avatar:[],
status:'',
deadline:'',
h:0,
m:0,
s:0
}
},
computed:{
other(){
return Number(this.groupDetail.group_num - this.this.buyer_avatar.length)
}
},
mounted(){
this.initPage()
},
methods:{
trackingPage(data,type){
let json={
type:type,
value:'groupShow',
desc:data
};
Service.trackingAciton(json)
},
enableShare: function(option) {
let _url = location.href
Service.getwechatParam({
url: _url
}).then(wechatRes => {
if (wechatRes.data.result === 'success') {
ShareJs.wxConfig(wechatRes.data.data)
let options = {
title: option.product_title,
desc: option.desc,
link: option.shareUrl,
success:function () {
let link = `shopId=${this.shopId}&groupId=${this.groupId}&source=${this.source}&type=${this.type}&out_trade_no=${this.orderNo}`
window._hmt.push(['_trackEvent', '团购分享页', "分享",'成功页面分享',link]);//百度统计
this.trackingPage(link,'share')
}
};
if (option.shareIcon) {
options.imgUrl = option.shareIcon
}
ShareJs.setOptions(options)
}
})
},
onShare: function() {
let URL = `${process.env.API_URL2}/#/groupbuy?groupId=${this.groupId}&source=${this.source}`;
if(this.status ===1 ){
URL = `${process.env.API_URL2}/#/groupbuy?shopId=${this.shopId}&source=${this.source}`
}
this.enableShare({
product_title: this.groupDetail.share_info.share_title,
desc: this.groupDetail.share_info.share_content,
shareIcon:this.groupDetail.share_info.shareIcon,
shareUrl:URL
})
},
initPage(){
if(this.$route.query.out_trade_no&&this.$route.query.out_trade_no !== '' && this.$route.query.out_trade_no !== null){
this.orderNo = this.$route.query.out_trade_no;
}else{
this.groupId = this.$route.query.groupId;
}
this.source = this.$route.query.source
let json={
out_trade_no:this.orderNo,
group_id:this.groupId
};
Service.getGroupId(json).then(res=>{
if(res.data.result==='success'){
this.type = res.data.data.buy_type;
if(this.type === 1){
this.groupId = res.data.data.id;
this.buyer_avatar = res.data.data.buyer_avatar;
}
this.status = res.data.data.status;
this.shopId = res.data.data.product_group_id;
if(res.data.data.deadline){
this.deadline = res.data.data.deadline;
this.leftTimer();
}
Service.getGroupDetail(this.shopId).then(res=>{
if(res.data.result==='success'){
let data = res.data.data;
this.join=true;
data.product_img = JSON.parse(data.product_img);
data.share_info = JSON.parse(data.share_info);
this.groupDetail = data;
this.trackingPage(`shopId=${this.shopId}&groupId=${this.groupId}&source=${this.source}&type=${this.type}&out_trade_no=${this.orderNo}`,'page')
this.onShare();
}else{
Toast(res.data.message);
}
})
}
})
},
leftTimer(){
let leftTime = (new Date(this.deadline.replace(/\-/g, '/'))) - (new Date()); //计算剩余的毫秒数
let hours = parseInt(leftTime / 1000 / 60 / 60 % 24 , 10); //计算剩余的小时
let minutes = parseInt(leftTime / 1000 / 60 % 60, 10);//计算剩余的分钟
let seconds = parseInt(leftTime / 1000 % 60, 10);//计算剩余的秒数
hours = this.checkTime(hours);
minutes = this.checkTime(minutes);
seconds = this.checkTime(seconds);
this.h = hours;
this.m = minutes;
this.s = seconds;
window.setTimeout(this.leftTimer,1000)
},
checkTime(i){ //将0-9的数字前面加上0,例1变为01
if(i<10)
{
i = "0" + i;
}
return i;
}
}
}
</script>
<style scoped lang="less">
.success{
background: #f0f0f0;
height: 100%;
}
.head{
background: #F83534;
padding: 10/7.5vw;
text-align: center;
color: white;
font-size: 16px;
line-height: 1.4em;
img{
width: 18px;
vertical-align: middle;
margin-right: 5px;
}
.sec{
font-size: 12px;
}
}
.shop-block{
.shop{
padding: toVw(20);
background: white;
position: relative;
&:after{
content:'';
display: block;
clear: both;
}
.img-block{
float: left;
margin-right: toVw(20);
img{
width: toVw(250);
}
min-height: 120px;
}
.title{
font-size: 18px;
overflow: hidden;
text-overflow:ellipsis;
white-space: nowrap;
color: #333333;
margin-bottom: toVw(5);
}
.content{
font-size: 12px;
line-height: 1.4em;
color: #CCCCCC;
height: 4.2em;
overflow: hidden;
}
.price{
font-size: 18px;
color: #FF001F;
position: absolute;
right: toVw(20);
bottom: toVw(20);
}
}
}
.success-block{
padding: 0 toVw(40);
margin-bottom: toVw(30);
position: relative;
background: #f0f0f0;
.suc-head{
padding: toVw(40) 0;
text-align: center;
border-bottom: 1px solid #d0d0d0;
.title{
font-size: 16px;
color: #333333;
.red{
color: #FF001F;
}
}
img{
width: toVw(80);
border-radius: 1000px;
margin: toVw(10);
}
.otherIcon{
width: toVw(80);
height: toVw(80);
display: inline-block;
border-radius: 1000px;
margin: toVw(10);
background: #d0d0d0;
}
}
.text-content{
position: absolute;
bottom: -8px;
height: toVw(38);
line-height: toVw(38);
background: #f0f0f0;
width: 16em;
left: 50%;
margin-left: -8em;
text-align: center;
font-size: 16px;
color: #333333;
&.last{
font-size: 12px;
span{
display: inline-block;
background: #F83534;
width:1.6em;
height: 1.6em;
line-height: 1.6em;
border-radius: 3px;
color: white;
margin: 0 5px;
font-size: 12px;
}
}
}
}
.qr-block{
padding: toVw(30);
text-align: center;
background: #f0f0f0;
img{
width: toVw(300);
}
.text{
font-size: 14px;
line-height: 1.6em;
color: #666666;
text-align: center;
}
}
.share{
text-align: center;
padding: toVw(20);
font-size: 12px;
color: #333333;
line-height: 1.6em;
img{
width: toVw(80);
}
div{
margin-top: toVw(20);
}
}
.refer-share {
width: 100%;
}
.refer-share img {
position: absolute;
width: 80%;
right: 0;
}
</style>
<style>
.v-modal{
opacity: 0.7;
}
</style>
<template>
<div class="index">
<div class="banner-block">
<mt-swipe :auto="5000">
<mt-swipe-item v-for="(data,index) in bannerList" :key="index">
<img class="banner" :src="data.url">
</mt-swipe-item>
</mt-swipe>
</div>
<div class="btn-block">
<div class="btn">
<img :src="imgUrl.record"/>
</div>
<div class="btn">
<img :src="imgUrl.money"/>
</div>
<div class="btn">
<img :src="imgUrl.listen"/>
</div>
<div class="btn">
<img :src="imgUrl.more"/>
</div>
</div>
<div class="class-block">
<div class="title">
我的课程
</div>
</div>
</div>
</template>
<script>
import {getBannerListApi} from "../service/api";
import {Swipe, SwipeItem} from 'mint-ui'
import {IndexImage} from "../util/imgUrl";
export default {
name: "index"
name: "index",
components:{
'mt-swipe':Swipe,
'mt-swipe-item':SwipeItem
},
data(){
return {
bannerList:[],
imgUrl: IndexImage
}
},
methods:{
initPage(){
getBannerListApi().then(res=>{
this.bannerList = res.list
})
}
},
mounted(){
this.initPage()
}
}
</script>
<style scoped>
<style scoped lang="less">
@import "../util/public";
.index{
background: #eee;
}
.banner-block{
width: 375*@toVw;
height: 140*@toVw;
.banner{
width: 375*@toVw;
height: 140*@toVw;
}
}
.btn-block{
display: flex;
padding: 12*@toVw 8*@toVw;
background: white;
justify-content: space-around;
.btn{
width: 68*@toVw;
height: 68*@toVw;
img{
width: 100%;
}
}
}
.class-block{
margin-top: 10px;
background: white;
padding: 5px;
font-family: PingFang-SC-Medium;
font-size: 20px;
color: #333333;
text-align: center;
}
</style>
......@@ -3,10 +3,8 @@
import Vue from 'vue'
import App from './App'
import router from './router'
import Mint from 'mint-ui'
import store from './store'
Vue.use(Mint);
import 'mint-ui/lib/style.css'
Vue.config.productionTip = false;
/* eslint-disable no-new */
......
import Vue from 'vue'
import Router from 'vue-router'
import index from '@/components/index'
import buyDetail from '@/components/buy/index'
import buy from '@/components/buy/buy'
import success from '@/components/buy/success'
import author from'@/components/author'
Vue.use(Router)
Vue.use(Router);
export default new Router({
const router =new Router({
routes: [
{
path: '/',
name: 'index',
component: index
}, {
path: '/author',
name: 'author',
component: author
},{
path: '/buyDetail',
name: 'buyDetail',
component: buyDetail
}, {
path: '/buy',
name: 'buy',
component: buy
}, {
path: '/success',
name: 'success',
component: success
}
]
})
});
router.beforeEach((to,from,next)=> {
});
export default router;
......@@ -8,358 +8,15 @@ Vue.prototype.$put=put;
Vue.prototype.$del=del;
Vue.prototype.$upload = upload;
//登录
const loginURL = `${_baseUrl}api/admin/login`;
export const loginApi = function(json) {
return Vue.prototype.$post(loginURL,{"username":json.username,"passwd":json.password})
};
//退出登录
const logOutUrl = `${_baseUrl}api/admin/logout`;
export const logoutApi = function() {
return Vue.prototype.$post(logOutUrl)
};
//查询账号列表
const getAdminListUrl = `${_baseUrl}api/admin/user/list`;
export const getAdminListApi = function () {
return Vue.prototype.$fetch(getAdminListUrl)
};
//修改账号信息
const editAdminUrl = `${_baseUrl}api/admin/user/info`;
export const editAdminListApi = function (id,json) {
return Vue.prototype.$put(`${editAdminUrl}/${id}`,json)
};
//添加账号
const addAdminUrl = `${_baseUrl}api/admin/user/add`;
export const addAdminListApi = function (json) {
return Vue.prototype.$post(addAdminUrl,json)
};
//删除账号
const delAdminUrl = `${_baseUrl}api/admin/user`;
export const delAdminListApi = function (id) {
return Vue.prototype.$del(`${delAdminUrl}/${id}`)
};
//修改密码
const editPasswordUrl = `${_baseUrl}api/admin/user/passwd`;
export const editPasswordApi = function (id,json) {
return Vue.prototype.$patch(`${editPasswordUrl}/${id}`,json)
};
//获取用户列表
const getUserListUrl = `${_baseUrl}api/admin/student/list`;
export const getUserListApi = function (json) {
return Vue.prototype.$fetch(getUserListUrl,json)
};
//获取用户详情
const getUserDetailUrl = `${_baseUrl}api/admin/student/info`;
export const getUserDetailApi = function (id) {
return Vue.prototype.$fetch(`${getUserDetailUrl}/${id}`)
};
//获取教师列表
const getTeacherListUrl = `${_baseUrl}api/admin/teacher/list`;
export const getTeacherListApi = function (json) {
return Vue.prototype.$fetch(`${getTeacherListUrl}`,json)
};
//获取教师详情
const getTeacherDetailUrl = `${_baseUrl}api/admin/teacher/info`;
export const getTeacherDetailApi = function (id) {
return Vue.prototype.$fetch(`${getTeacherDetailUrl}/${id}`)
};
//添加教师
const addTeacherUrl = `${_baseUrl}api/admin/teacher/add`;
export const addTeacherApi = function (json) {
return Vue.prototype.$post(addTeacherUrl,json)
};
//更新教师信息
const editTeacherUrl = `${_baseUrl}api/admin/teacher/info`;
export const editTeacherApi = function (id, json) {
return Vue.prototype.$put(`${editTeacherUrl}/${id}`,json)
};
//删除教师
const delTeacherUrl = `${_baseUrl}api/admin/teacher`;
export const delTeacherApi = function (id) {
return Vue.prototype.$del(`${delTeacherUrl}/${id}`)
};
//获取课程列表
const getLessonUrl = `${_baseUrl}api/admin/course/list`;
export const getLessonApi = function (json) {
return Vue.prototype.$fetch(getLessonUrl,json)
};
//获取课程详情
const getLessonDetailUrl = `${_baseUrl}api/admin/course/info`;
export const getLessonDetailApi = function (id, json) {
return Vue.prototype.$fetch(`${getLessonDetailUrl}/${id}`,json)
};
//编辑课程详情
const editLessonDetailUrl = `${_baseUrl}api/admin/course/info`;
export const editLessonApi = function (id,json) {
return Vue.prototype.$put(`${editLessonDetailUrl}/${id}`,json)
};
//删除课程
const deleteLessonUrl = `${_baseUrl}api/admin/course`;
export const deleteLessonAPI = function (id) {
return Vue.prototype.$del(`${deleteLessonUrl}/${id}`)
};
//新增课程
const addLessonUrl = `${_baseUrl}api/admin/course/add`;
export const addLessonApi = function (json) {
return Vue.prototype.$post(addLessonUrl,json)
};
//获取商品列表
const getGoodsListUrl = `${_baseUrl}api/admin/goods/list`;
export const getGoodsListApi = function (json) {
return Vue.prototype.$fetch(getGoodsListUrl,json)
};
//获取商品详情
const getGoodsDetailUrl = `${_baseUrl}api/admin/goods/info`;
export const getGoodsDetailApi = function (id, json) {
return Vue.prototype.$fetch(`${getGoodsDetailUrl}/${id}`,json)
};
//添加商品
const addGoodsUrl = `${_baseUrl}api/admin/goods/add`;
export const addGoodsApi = function (json) {
return Vue.prototype.$post(addGoodsUrl,json)
};
//编辑商品
const editGoodsUrl = `${_baseUrl}api/admin/goods/info`;
export const editGoodsApi = function (id, json) {
return Vue.prototype.$put(`${editGoodsUrl}/${id}`,json)
};
//删除商品
const deleteGoodsUrl = `${_baseUrl}api/admin/goods`;
export const deleteGoodsApi = function (id) {
return Vue.prototype.$del(`${deleteGoodsUrl}/${id}`)
};
// 商品上架
const upGoodsUrl = `${_baseUrl}api/admin/goods/putaway/`;
export const upGoodsApi = function (id) {
return Vue.prototype.$patch(`${upGoodsUrl}/${id}`)
};
// 商品下架
const downGoodsUrl = `${_baseUrl}api/admin/goods/soldout/`;
export const downGoodsApi = function (id) {
return Vue.prototype.$patch(`${downGoodsUrl}/${id}`)
};
//查询元素、菜单分类
const getCategoryUrl = `${_baseUrl}api/admin/category/list/0`;
export const getCategoryApi = function (pid) {
return Vue.prototype.$fetch(getCategoryUrl,{'pid':pid})
};
// 添加教材菜单
const addCategoryUrl = `${_baseUrl}api/admin/category/add/0`;
export const addCategoryApi = function (json) {
return Vue.prototype.$post(addCategoryUrl,json)
};
//删除分类
const delCategoryUrl = `${_baseUrl}api/admin/category`;
export const delCategoryApi = function (id) {
return Vue.prototype.$del(`${delCategoryUrl}/${id}`)
};
//分类排序修改
const sortCategoryUrl = `${_baseUrl}api/admin/category/sort`;
export const sortCategoryApi = function (json) {
return Vue.prototype.$patch(sortCategoryUrl,json)
};
//获取分类下的元素列表
const getCateDetailListUrl = `${_baseUrl}api/admin/element/list/0`;
export const getCateListApi = function (id) {
return Vue.prototype.$fetch(getCateDetailListUrl,id)
};
// 添加元素
const addElementUrl = `${_baseUrl}api/admin/element/add/`;
export const addElementApi = function (json, type) {
console.log(type)
return Vue.prototype.$post(`${addElementUrl}${type}`,json)
};
// 查询元素详情
const getElemenetDetailUrl = `${_baseUrl}api/admin/element/`;
export const getElemenetDetailApi = function (id) {
return Vue.prototype.$fetch(`${getElemenetDetailUrl}${id}`)
};
// 编辑元素
const editElementUrl = `${_baseUrl}api/admin/element/`;
export const editElementApi = function (json, id) {
return Vue.prototype.$put(`${editElementUrl}${id}`, json)
};
// 删除元素
const delElementUrl = `${_baseUrl}api/admin/element/`;
export const delElementApi = function (id) {
return Vue.prototype.$del(`${delElementUrl}${id}`)
}
// 获取单品列表
const getSingleListUrl = `${_baseUrl}api/admin/item/stock/list`;
export const getSingleListApi = function (name) {
return Vue.prototype.$fetch(`${getSingleListUrl}`,{name:name})
};
// 获取单品详情
const getSingleDetailUrl = `${_baseUrl}api/admin/item/stock/info/`;
export const getSingleDetailApi = function (id) {
return Vue.prototype.$fetch(`${getSingleDetailUrl}${id}`)
};
// 删除单品
const delSingleUrl = `${_baseUrl}api/admin/item/stock/`;
export const delSingleApi = function (id) {
return Vue.prototype.$del(`${delSingleUrl}${id}`)
};
// 新增单品
const addSingleUrl = `${_baseUrl}api/admin/item/stock/add`;
export const addSingleApi = function (json) {
return Vue.prototype.$post(addSingleUrl,json)
};
// 修改单品
const editSingleUrl = `${_baseUrl}api/admin/item/stock/info/`;
export const editSingleApi = function (id,json) {
return Vue.prototype.$put(`${editSingleUrl}${id}`,json)
};
// 获取盒子分类
const getBoxTypeListUrl = `${_baseUrl}api/admin/category/list/1`;
export const getBoxTypeListApi = function () {
return Vue.prototype.$fetch(getBoxTypeListUrl)
};
// 获取盒子列表
const getBoxListUrl = `${_baseUrl}api/admin/item/box/list/`;
export const getBoxListApi = function (id) {
return Vue.prototype.$fetch(`${getBoxListUrl}${id}`)
};
// 添加盒子
const addBoxUrl = `${_baseUrl}api/admin/item/box/add/`;
export const addBoxApi = function (id, json) {
return Vue.prototype.$post(`${addBoxUrl}${id}`,json)
};
// 删除盒子
const delBoxUrl = `${_baseUrl}api/admin/item/box/`;
export const delBoxApi = function (id) {
return Vue.prototype.$del(`${delBoxUrl}${id}`)
};
// 获取盒子详情
const getBoxDetailUrl = `${_baseUrl}api/admin/item/box/info/`;
export const getBoxDetailApi = function (id) {
return Vue.prototype.$fetch(`${getBoxDetailUrl}${id}`)
};
// 更新盒子
const editBoxUrl = `${_baseUrl}api/admin/item/box/info/`;
export const editBoxApi = function (id, json) {
return Vue.prototype.$put(`${editBoxUrl}${id}`,json)
};
// 获取公众号菜单
const getPublicMenuUrl = `${_baseUrl}api/admin/open/menu`;
export const getPublicMenuApi = function () {
return Vue.prototype.$fetch(getPublicMenuUrl)
};
// 添加公众号菜单
export const savePublicMenuApi = function (json) {
return Vue.prototype.$post(getPublicMenuUrl,json)
};
// 获取配置列表
const getConfigListUrl = `${_baseUrl}api/admin/sys/config/list`;
export const getConfigListApi = function (json) {
return Vue.prototype.$fetch(getConfigListUrl, json)
};
// 新增系统配置
const saveConfigUrl = `${_baseUrl}api/admin/sys/config`;
export const saveConfigApi = function (json) {
return Vue.prototype.$post(saveConfigUrl, json)
};
// 更新关键词
const updateConfigUrl = `${_baseUrl}api/admin/sys/config`;
export const updateConfigApi = function (config_id,json) {
return Vue.prototype.$put(`${updateConfigUrl}/${config_id}`, json)
};
// 删除配置
const delConfigUrl = `${_baseUrl}api/admin/sys/config/`;
export const deleteConfigApi = function (config_id) {
return Vue.prototype.$del(`${delConfigUrl}${config_id}`)
};
// 获取配置详情
const getConfigDetailUrl = `${_baseUrl}api/admin/sys/config/`;
export const getConfigDetailApi = function (id) {
return Vue.prototype.$fetch(`${getConfigDetailUrl}${id}`)
};
// 获取素材列表
const getMediaListUrl = `${_baseUrl}api/admin/open/media/list`;
export const getMediaListApi = function (json) {
return Vue.prototype.$fetch(getMediaListUrl, json)
};
// 文件上传
const uploadFileUrl = `${_baseUrl}api/public/upload/zone`;
export const uploadFileApi = function (json) {
return Vue.prototype.$upload(uploadFileUrl,json)
};
// 获取菜单列表
const getMenuListUrl = `${_baseUrl}api/admin/category/list/2`;
export const getMenuListApi = function () {
return Vue.prototype.$fetch(`${getMenuListUrl}`)
};
// 新增菜单
const addMenuListUrl = `${_baseUrl}api/admin/category/add/2`;
export const saveMenuApi = function (json) {
return Vue.prototype.$post(addMenuListUrl, json)
};
// 更改菜单
const updateMenuUrl = `${_baseUrl}api/admin/category/`;
export const updateMenuApi = function (id,json) {
return Vue.prototype.$put(`${updateMenuUrl}${id}`, json)
};
// 删除菜单
export const delMenuApi = function (id) {
return Vue.prototype.$del(`${updateMenuUrl}${id}`)
};
// 获取权限列表
const getRoleListUrl = `${_baseUrl}api/admin/role/list`;
export const getRoleListApi = function (json) {
return Vue.prototype.$fetch(`${getRoleListUrl}`, json)
};
// 新增角色
const addRoleUrl = `${_baseUrl}api/admin/role/add`;
export const saveRoleApi = function (json) {
return Vue.prototype.$post(addRoleUrl, json)
};
// 更新权限
const updateRoleUrl = `${_baseUrl}api/admin/role/info/`;
export const updateRoleApi = function (id,json) {
return Vue.prototype.$put(`${updateRoleUrl}${id}`, json)
};
// 获取权限详情
export const getRoleDetailApi = function (id) {
return Vue.prototype.$fetch(`${updateRoleUrl}${id}`)
};
// 删除权限
const delRoleUrl = `${_baseUrl}api/admin/role/`;
export const delRoleApi = function (id) {
return Vue.prototype.$del(`${delRoleUrl}${id}`)
};
// 获取banner列表
const getBannerListUrl = `${_baseUrl}api/admin/banner/list`;
const getBannerListUrl = `${_baseUrl}api/client/banner/list`;
export const getBannerListApi = function () {
return Vue.prototype.$fetch(`${getBannerListUrl}`)
};
// 添加banner
const addBannerUrl = `${_baseUrl}api/admin/banner/add`;
export const addBannerApi = function (json) {
return Vue.prototype.$post(addBannerUrl, json)
};
// 编辑banner
const editBannerUrl = `${_baseUrl}api/admin/banner/info/`;
export const editBannerApi = function (id,json) {
return Vue.prototype.$put(`${editBannerUrl}${id}`, json)
};
// 获取banner详情
export const getBannerDetailApi = function (id) {
return Vue.prototype.$fetch(`${editBannerUrl}${id}`)
return Vue.prototype.$fetch(getBannerListUrl)
};
// 删除banner
const delBannerUrl = `${_baseUrl}api/admin/banner/`;
export const delBannerApi = function (id) {
return Vue.prototype.$del(`${delBannerUrl}${id}`)
};
// 移动顺序
const moveUrl = `${_baseUrl}api/admin/banner/sort`;
export const moveApi = function (upId, downId) {
return Vue.prototype.$patch(`${moveUrl}`, {banner_up_id: upId, banner_down_id: downId})
};
// 获取期数列表
const getPeriodsUrl = `${_baseUrl}api/admin/periods/list`;
export const getPeriodsApi = function (json) {
let data = json | {};
return Vue.prototype.$fetch(getPeriodsUrl,data)
const getwechatParamUrl = `${_baseUrl}api/client/jssdk`;
export const getwechatParam = function () {
return Vue.prototype.$fetch(getwechatParamUrl,{api_list:'onMenuShareTimeline,onMenuShareAppMessage'})
};
const getGoodsDetailUrl = `${_baseUrl}api/client/goods/info/`;
export const getGoodsDetailApi = function (id) {
return Vue.prototype.$fetch(`${getGoodsDetailUrl}${id}`)
}
import axios from 'axios';
import md5 from 'js-md5';
import store from "@/store"
import { MessageBox ,Message } from 'element-ui';
import { Toast,MessageBox } from 'mint-ui';
import router from '../router'
import Cookie from '../util/cookie'
// 默认超时设置
......@@ -99,7 +99,7 @@ export function upload(url,json) {
resolve(response.data.data);
}
}else{
Message.error(response.data.msg)
Toast(response.data.msg)
}
})
.catch(err => {
......@@ -109,7 +109,6 @@ export function upload(url,json) {
MessageBox({
title:'错误!',
message:message,
type:'error',
})
})
};
......@@ -132,7 +131,7 @@ export function fetch(url,params={}){
if(response.data.code === 200){
resolve(response.data.data);
}else{
Message.error(response.data.msg)
Toast(response.data.msg)
}
})
.catch(err => {
......@@ -142,7 +141,6 @@ export function fetch(url,params={}){
MessageBox({
title:'错误!',
message:message,
type:'error',
})
})
})
......@@ -163,7 +161,7 @@ export function post(url,data = {}){
if(response.data.code === 200){
resolve(response.data.data);
}else{
Message.error(response.data.msg)
Toast(response.data.msg)
}
},err => {
reject(err);
......@@ -172,7 +170,6 @@ export function post(url,data = {}){
MessageBox({
title:'错误!',
message:message,
type:'error',
})
})
})
......@@ -192,7 +189,7 @@ export function patch(url,data = {}){
if(response.data.code === 200){
resolve(response.data.data);
}else{
Message.error(response.data.msg)
Toast(response.data.msg)
}
},err => {
reject(err);
......@@ -201,7 +198,6 @@ export function patch(url,data = {}){
MessageBox({
title:'错误!',
message:message,
type:'error',
})
})
})
......@@ -221,7 +217,7 @@ export function put(url,data = {}){
if(response.data.code === 200){
resolve(response.data.data);
}else{
Message.error(response.data.msg)
Toast(response.data.msg)
}
},err => {
reject(err);
......@@ -230,7 +226,6 @@ export function put(url,data = {}){
MessageBox({
title:'错误!',
message:message,
type:'error',
})
})
})
......@@ -243,7 +238,7 @@ export function del(url,data = {}){
if(response.data.code === 200){
resolve(response.data.data);
}else{
Message.error(response.data.msg)
Toast(response.data.msg)
}
},err => {
reject(err);
......@@ -252,7 +247,6 @@ export function del(url,data = {}){
MessageBox({
title:'错误!',
message:message,
type:'error',
})
})
})
......
export default{
//设置token
setToken({commit},token){
commit('setToken',token);
},
//设置用户名
setUserName({commit},name){
commit('setUserName',name);
},
setProgress({commit},data){
commit('progress',data);
},
}
import Vue from 'vue'
import vuex from 'vuex'
import menu from '../util/menuList'
import mutations from './mutations'
import actions from './actions'
Vue.use(vuex);
export default new vuex.Store({
state:{
show:false,
userName:'',
token:'',
mainLoad:true,
menuList:menu,
menuType:false,
nowTab:'first',
progressList:[],
openedTab:[
{
value:'首页',
routerName:'first',
name:'first',
delNo:true,
path:'/index'
}
],
},
mutations,
actions
......
import Cookie from "@/util/cookie";
const mutations={
//设置token
setToken(state,token){
state.token=token;
Cookie.set('cc_token',token);
},
//设置用户名
setUserName(state,userName){
state.userName=userName;
Cookie.set('cc_user_name',userName);
},
mainCanShow(state){
state.mainLoad = false
},
mainUnShow(state){
state.mainLoad = true
},
changeParentRouter(state,data){
state.menuList.find((a)=>{return a.name === data.name}).routerName = data.to.name
},
progress(state,data){
switch (data.type) {
case 'new':
state.progressList.push({num:0,id:data.id});
break;
case 'change':
state.progressList.find((x)=>{return x.id === data.id}).num = data.num;
break;
case 'delete':
delete state.progressList.find((x)=>{return x.id === data.id});
break
}
}
};
export default mutations;
export default{
dateFmt:function(date,format) {
var o = {
"M+" : date.getMonth()+1, //month
"d+" : date.getDate(), //day
"h+" : date.getHours(), //hour
"m+" : date.getMinutes(), //minute
"s+" : date.getSeconds(), //second
"q+" : Math.floor((date.getMonth()+3)/3), //quarter
"S" : date.getMilliseconds() //millisecond
}
if(/(y+)/.test(format)) format=format.replace(RegExp.$1,
(date.getFullYear()+"").substr(4 - RegExp.$1.length));
for(var k in o)if(new RegExp("("+ k +")").test(format))
format = format.replace(RegExp.$1,
RegExp.$1.length==1 ? o[k] :
("00"+ o[k]).substr((""+ o[k]).length));
return format;
},
getUrlParam(name){
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
var spList=window.location.href.split('?');
if(spList.length>0){
var r = spList[spList.length-1].match(reg); //匹配目标参数
let r2 = spList[spList.length-2].match(reg)
if (r != null) {
return unescape(r[2]);
}else if(r2 != null) {
return unescape(r2[2]);
}//返回参数值
}else{
return '';
}
},
toDataURL (src, callback) {
var xhttp = new XMLHttpRequest()
xhttp.onload = function () {
var fileReader = new FileReader()
fileReader.onloadend = function () {
callback(fileReader.result)
}
fileReader.readAsDataURL(xhttp.response)
};
xhttp.responseType = 'blob'
xhttp.open('GET', src, true)
xhttp.send()
}
}
\ No newline at end of file
import indexBtn1 from '../assets/record.png'
import indexBtn2 from '../assets/money.png'
import indexBtn3 from '../assets/listen.png'
import indexBtn4 from '../assets/more.png'
export const IndexImage={
record:indexBtn1,
money:indexBtn2,
listen:indexBtn3,
more:indexBtn4
};
export default [
{
name: '',
value: '教研管理',
icon: 'icon-material',
list: [
{
value:'教材列表',
routerName:'resources',
path:'/resources'
}
]
},{
name: '',
value: '课程管理',
icon: 'icon-kecheng',
list: [
{
value:'课程列表',
routerName:'lesson',
path:'/lesson'
}
]
},{
name: '',
value: '期数管理',
icon: 'icon-rili',
list: [
{
value:'班级列表',
routerName:'class',
path:'/class'
},
{
value:'期数列表',
routerName:'periods',
path:'/periods'
},{
value:'不上课日期',
routerName:'noLesson',
path:'/noLesson'
},
]
},{
name: '',
value: '商品管理',
icon: 'icon-shangpin1',
list: [
{
value:'商品列表',
routerName:'shop',
path:'/shop'
}
]
},{
name: '',
value: '人员管理',
icon: 'icon-laoshi',
list: [
{
value:'教师列表',
routerName:'teacher',
path:'/teacher'
},
{
value:'用户列表',
routerName:'user',
path:'/user'
}
]
},{
name: '',
value: '订单管理',
icon: 'icon-dingdan',
list: [
{
value:'订单列表',
routerName:'order',
path:'/order'
},
{
value:'发货管理',
routerName:'consignment',
path:'/consignment'
}
]
},{
name: '',
value: '实物管理',
icon: 'icon-shu',
list: [
{
value:'单品列表',
routerName:'single',
path:'/single'
},
{
value:'盒子列表',
routerName:'box',
path:'/box'
}
]
},{
name: '',
value: '公众号',
icon: 'icon-ai-weixin',
list: [
{
value:'关注回复',
routerName:'focusReply',
path:'/focusReply'
},
{
value:'关键词回复',
routerName:'autoReply',
path:'/autoReply'
},
{
value:'公众号',
routerName:'weChat',
path:'/weChat'
},
{
value:'素材管理',
routerName:'weChatResource',
path:'/weChatResource'
}
]
},{
name: '',
value: '系统管理',
icon: 'icon-shezhi',
list: [
{
value:'账号管理',
routerName:'admin',
path:'/admin'
},{
value:'Banner管理',
routerName:'banner',
path:'/banner'
},{
value:'角色管理',
routerName:'role',
path:'/role'
},{
value:'菜单管理',
routerName:'menu',
path:'/menu'
},{
value:'系统配置',
routerName:'sysConfig',
path:'/sysConfig'
}
]
},{
name: '',
value: '帮助中心',
icon: 'icon-bangzhu',
list: [
{
value:'帮助中心',
routerName:'help',
path:'/help'
}
]
}
]
import look1_bg from '../assets/mould/look1/bg.png'
import look1_bank from '../assets/mould/look1/bank.png'
import look1_feiji from '../assets/mould/look1/feiji.png'
import look1_flour from '../assets/mould/look1/flour.png'
import look1_go from '../assets/mould/look1/go.png'
import look1_qiqiu from '../assets/mould/look1/qiqiu.png'
import look1_radio from '../assets/mould/look1/radio.png'
import look1_rainbow from '../assets/mould/look1/rainbow.png'
import look1_redM from '../assets/mould/look1/redM.png'
import look1_reqiqiu from '../assets/mould/look1/reqiqiu.png'
import look1_tadayBg from '../assets/mould/look1/tadayBg.png'
import look1_title1 from '../assets/mould/look1/title1.png'
import look1_title2 from '../assets/mould/look1/title2.png'
import look1_xuxian from '../assets/mould/look1/xuxian.png'
import look1_yun from '../assets/mould/look1/yun.png'
import radio1_bg from '../assets/mould/radio1/bg.png'
import radio1_backLookBtn from '../assets/mould/radio1/backLookBtn.png'
import radio1_CD from '../assets/mould/radio1/CD.png'
import radio1_contentBg from '../assets/mould/radio1/contentBg.png'
import radio1_loading from '../assets/mould/radio1/loading.png'
import radio1_near from '../assets/mould/radio1/near.png'
import radio1_next from '../assets/mould/radio1/next.png'
import radio1_play from '../assets/mould/radio1/play.png'
import radio1_showBtn from '../assets/mould/radio1/showBtn.png'
import radio_moerduo from '../assets/mould/radio1/moerduo.png'
import radio_moerduoBg from '../assets/mould/radio1/moerduobg.png'
import radio_tabVideo from '../assets/mould/radio1/tabVideo.png'
import playTitle from '../assets/mould/radio1/title.png'
import play1_bg from '../assets/mould/video/bg.png'
import play1_back from '../assets/mould/video/back.png'
import play1_next from '../assets/mould/video/next.png'
import play1_paly from '../assets/mould/video/paly.png'
import play1_radio from '../assets/mould/video/radio.png'
import show1_bg from '../assets/mould/show1/bg.png'
import show1_backBtn from '../assets/mould/show1/backBtn.png'
import show1_contentBg from '../assets/mould/show1/contentBg.png'
import show1_haiou from '../assets/mould/show1/haiou.png'
import show1_imgIcon from '../assets/mould/show1/imgIcon.png'
import show1_jiayoubao from '../assets/mould/show1/jiayoubao.png'
import show1_radioIcon from '../assets/mould/show1/radioIcon.png'
import show1_riji from '../assets/mould/show1/riji.png'
import show1_subBtn from '../assets/mould/show1/subBtn.png'
import show1_videoIcon from '../assets/mould/show1/videoIcon.png'
import show1_yeziyou from '../assets/mould/show1/yeziyou.png'
import show1_yezizuo from '../assets/mould/show1/yezizuo.png'
import show1_zhaopianqiang from '../assets/mould/show1/zhaopianqiang.png'
import show1_zhuangshi from '../assets/mould/show1/zhuangshi.png'
import show1_title from '../assets/mould/show1/title.png'
import refueling1_bg from '../assets/mould/refueling1/bg.png'
import refueling1_backBtn from '../assets/mould/refueling1/backBtn.png'
import refueling1_finish from '../assets/mould/refueling1/finish.png'
import refueling1_next from '../assets/mould/refueling1/next.png'
import refueling1_radio from '../assets/mould/refueling1/radio.png'
import refueling1_title from '../assets/mould/refueling1/title.png'
export default {
look1:{
bg:look1_bg,
bank:look1_bank,
feiji:look1_feiji,
flour:look1_flour,
go:look1_go,
qiqiu:look1_qiqiu,
radio:look1_radio,
rainbow:look1_rainbow,
redM:look1_redM,
reqiqiu:look1_reqiqiu,
tadayBg:look1_tadayBg,
title1:look1_title1,
title2:look1_title2,
xuxian:look1_xuxian,
yun:look1_yun
},
radio1:{
bg:radio1_bg,
backLookBtn:radio1_backLookBtn,
CD:radio1_CD,
contentBg:radio1_contentBg,
loading:radio1_loading,
near:radio1_near,
next:radio1_next,
play:radio1_play,
showBtn:radio1_showBtn,
title:playTitle,
moerduo:radio_moerduo,
moerduoBg:radio_moerduoBg,
finishBtn:refueling1_finish,
nextBtn:refueling1_next,
backPlayBtn:refueling1_backBtn,
tabVideo: radio_tabVideo
},
play1:{
bg:play1_bg,
backBtn:play1_back,
next:play1_next,
radio:play1_radio,
play:play1_paly,
},
show1:{
bg: show1_bg,
backBtn: show1_backBtn,
contentBg: show1_contentBg,
haiou: show1_haiou,
imgIcon: show1_imgIcon,
jiayoubao: show1_jiayoubao,
radioIcon: show1_radioIcon,
riji: show1_riji,
subBtn: show1_subBtn,
videoIcon: show1_videoIcon,
yeziyou: show1_yeziyou,
yezizuo: show1_yezizuo,
zhaopianqiang: show1_zhaopianqiang,
zhuangshi: show1_zhuangshi,
title:show1_title
},
refueling1:{
bg:refueling1_bg,
backBtn:refueling1_backBtn,
finish: refueling1_finish,
next: refueling1_next,
radio: refueling1_radio,
title: refueling1_title,
}
}
//颜色参数
@toVw:100/375vw;
@bg-b: #333;
@bg-b-s:#444;
@black-line:#191919;
......@@ -19,14 +20,7 @@
padding: 5px;
}
html{
font-family: "Helvetica Neue",
Helvetica,
"PingFang SC",
"Hiragino Sans GB",
"Microsoft YaHei",
"微软雅黑",
Arial,
sans-serif;
}
.clear-both{
&:after{
......
import lookUrl from '../assets/mould/example/look.png'
import playRadioUrl from '../assets/mould/example/playRadio.png'
import playVideoUrl from '../assets/mould/example/playVideo.png'
import RefuelingUrl from '../assets/mould/example/Refueling.png'
import showBabyUrl from '../assets/mould/example/showBaby.png'
export const MOULDLIST = [
{
title:'爸妈看一看',
imgUrl:lookUrl,
name:'看一看-1',
key:'look1',
content:{
radioUrl:[],
today:'',
directory:'',
nextIndex:'',
timeLang:0,
}
},{
title:'宝贝玩一玩',
imgUrl:playRadioUrl,
name:'玩-radio-1',
key:'radio1',
content:{
radio:[
],
nextIndex:'',
lastIndex:'',
buttonType:0,
titleType:0,
tabVideo:{
type:false,
index:''
},
}
},{
title:'宝贝玩一玩',
imgUrl:playVideoUrl,
name:'玩-video-1',
key:'play1',
content:{
videoUrl:[],
banner:[],
nextIndex:'',
lastIndex:'',
tabRadio:{
type:false,
index:''
}
}
},{
title:'唱学加油包',
imgUrl:RefuelingUrl,
name:'加油包-1',
key:'refueling1',
content:{
radio:[],
banner:[],
nextIndex:'',
nextType:true,
lastIndex:'',
}
},{
title:'爸妈秀宝贝',
imgUrl:showBabyUrl,
name:'秀宝贝-1',
key:'show1',
content:{
text:'',
check:true,
nextIndex:'',
lastIndex:'',
}
},
];
export default {
setOptions: function(options) {
var defaults = {
title: "我的推荐",
desc: "我的推荐",
link: location.href, //分享页面地址,不能为空
imgUrl: 'https://cdn.singsingenglish.com/singsing/recommend/logo-refer.png', //分享是封面图片,不能为空
success: function() {}, //分享成功触发
cancel: function() {} //分享取消触发,需要时可以调用
}
options = Object.assign({}, defaults, options);
wx.ready(function() {
var thatopts = options;
wx.onMenuShareTimeline({
title: thatopts.title, // 分享标题
desc: thatopts.desc, // 分享描述
link: thatopts.link, // 分享链接
imgUrl: thatopts.imgUrl, // 分享图标
success: function() {
// alert("成功");
},
cancel: function() {
// alert("失败")
}
});
wx.onMenuShareAppMessage({
title: thatopts.title, // 分享标题
desc: thatopts.desc, // 分享描述
link: thatopts.link, // 分享链接
imgUrl: thatopts.imgUrl, // 分享图标
success: function() {
// alert("成功");
},
cancel: function() {
// alert("失败")
}
});
});
},
wxConfig: function(jssdk) {
wx.config({
debug: false,
appId: jssdk.appId,
timestamp: parseInt(jssdk.timestamp),
nonceStr: jssdk.nonceStr,
signature: jssdk.signature,
jsApiList: [
"onMenuShareTimeline",
"onMenuShareAppMessage"
]
});
},
disableShare: function(jssdk) {
wx.config({
debug: false,
appId: jssdk.appId,
timestamp: parseInt(jssdk.timestamp),
nonceStr: jssdk.nonceStr,
signature: jssdk.signature,
jsApiList: []
});
}
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment