提交 ecc1f17c 编写于 作者: M maguohua

udpata

上级 c56c4c36
{
"presets": ["es2015", "stage-2"],
"plugins": ["transform-runtime"],
"comments": false
}
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
.DS_Store
node_modules/
dist/
npm-debug.log
# happyfri
一个简单的vue2入门项目,熟悉如何利用vue + vue-router + vuex 在初期搭建一个项目
## 项目运行
``` bash
# 安装依赖
npm install
# 开启本地服务器localhost:8080
npm run dev
# 发布环境
npm run build
```
<img src="https://github.com/bailicangdu/vue2-happyfri/blob/master/src/images/project-index.png" width="280" height="500"/>
<img src="https://github.com/bailicangdu/vue2-happyfri/blob/master/src/images/project-item.png" width="280" height="500"/>
<img src="https://github.com/bailicangdu/vue2-happyfri/blob/master/src/images/project-score.png" width="280" height="500"/>
# vue2-elm
// https://github.com/shelljs/shelljs
require('shelljs/global')
env.NODE_ENV = 'production'
var path = require('path')
var config = require('../config')
var ora = require('ora')
var webpack = require('webpack')
var webpackConfig = require('./webpack.prod.conf')
var spinner = ora('building for production...')
spinner.start()
var assetsPath = path.join(config.build.assetsRoot, config.build.assetsSubDirectory)
rm('-rf', assetsPath)
mkdir('-p', assetsPath)
cp('-R', 'static/*', assetsPath)
webpack(webpackConfig, function(err, stats) {
spinner.stop()
if (err) throw err
process.stdout.write(stats.toString({
colors: true,
modules: false,
children: false,
chunks: false,
chunkModules: false
}) + '\n')
})
\ No newline at end of file
/* eslint-disable */
require('eventsource-polyfill')
var hotClient = require('webpack-hot-middleware/client?noInfo=true&reload=true')
hotClient.subscribe(function(event) {
if (event.action === 'reload') {
window.location.reload()
console.log(111111111111111)
}
})
\ No newline at end of file
var config = require('../config')
if (!process.env.NODE_ENV) process.env.NODE_ENV = JSON.parse(config.dev.env.NODE_ENV)
var path = require('path')
var express = require('express')
var webpack = require('webpack')
var opn = require('opn')
var proxyMiddleware = require('http-proxy-middleware')
var webpackConfig = require('./webpack.dev.conf')
// default port where dev server listens for incoming traffic
var port = process.env.PORT || config.dev.port
// Define HTTP proxies to your custom API backend
// https://github.com/chimurai/http-proxy-middleware
var server = express()
var compiler = webpack(webpackConfig)
var devMiddleware = require('webpack-dev-middleware')(compiler, {
publicPath: webpackConfig.output.publicPath,
stats: {
colors: true,
chunks: false
}
})
var hotMiddleware = require('webpack-hot-middleware')(compiler)
// force page reload when html-webpack-plugin template changes
compiler.plugin('compilation', function(compilation) {
compilation.plugin('html-webpack-plugin-after-emit', function(data, cb) {
hotMiddleware.publish({
action: 'reload'
})
cb()
})
})
var context = config.dev.context
var proxypath = config.dev.proxypath
var options = {
target: proxypath,
changeOrigin: true,
}
if (context.length) {
server.use(proxyMiddleware(context, options))
}
// server.use(proxyMiddleware('/*/*', {
// target: 'https://mainsite-restapi.ele.me',
// changeOrigin: true,
// secure: false,
// }))
// handle fallback for HTML5 history API
server.use(require('connect-history-api-fallback')())
// serve webpack bundle output
server.use(devMiddleware)
// enable hot-reload and state-preserving
// compilation error display
server.use(hotMiddleware)
// serve pure static assets
var staticPath = path.posix.join(config.dev.assetsPublicPath, config.dev.assetsSubDirectory)
server.use(staticPath, express.static('./static'))
module.exports = server.listen(port, function(err) {
if (err) {
console.log(err)
return
}
var uri = 'http://localhost:' + port
console.log('Listening at ' + uri + '\n')
// when env is testing, don't need open it
if (process.env.NODE_ENV !== 'testing') {
//opn(uri)
}
})
\ No newline at end of file
var path = require('path')
var config = require('../config')
var ExtractTextPlugin = require('extract-text-webpack-plugin')
exports.assetsPath = function(_path) {
var assetsSubDirectory = process.env.NODE_ENV === 'production' ? config.build.assetsSubDirectory : config.dev.assetsSubDirectory
return path.posix.join(assetsSubDirectory, _path)
}
exports.cssLoaders = function(options) {
options = options || {}
// generate loader string to be used with extract text plugin
function generateLoaders(loaders) {
var sourceLoader = loaders.map(function(loader) {
var extraParamChar
if (/\?/.test(loader)) {
loader = loader.replace(/\?/, '-loader?')
extraParamChar = '&'
} else {
loader = loader + '-loader'
extraParamChar = '?'
}
return loader + (options.sourceMap ? extraParamChar + 'sourceMap' : '')
}).join('!')
// Extract CSS when that option is specified
// (which is the case during production build)
if (options.extract) {
return ExtractTextPlugin.extract('vue-style-loader', sourceLoader)
} else {
return ['vue-style-loader', sourceLoader].join('!')
}
}
// http://vuejs.github.io/vue-loader/en/configurations/extract-css.html
return {
css: generateLoaders(['css']),
postcss: generateLoaders(['css']),
less: generateLoaders(['css', 'less']),
sass: generateLoaders(['css', 'sass?indentedSyntax']),
scss: generateLoaders(['css', 'sass']),
stylus: generateLoaders(['css', 'stylus']),
styl: generateLoaders(['css', 'stylus'])
}
}
// Generate loaders for standalone style files (outside of .vue)
exports.styleLoaders = function(options) {
var output = []
var loaders = exports.cssLoaders(options)
for (var extension in loaders) {
var loader = loaders[extension]
output.push({
test: new RegExp('\\.' + extension + '$'),
loader: loader
})
}
return output
}
\ No newline at end of file
var path = require('path')
var config = require('../config')
var utils = require('./utils')
var projectRoot = path.resolve(__dirname, '../')
var env = process.env.NODE_ENV
// check env & config/index.js to decide weither to enable CSS Sourcemaps for the
// various preprocessor loaders added to vue-loader at the end of this file
var cssSourceMapDev = (env === 'development' && config.dev.cssSourceMap)
var cssSourceMapProd = (env === 'production' && config.build.productionSourceMap)
var useCssSourceMap = cssSourceMapDev || cssSourceMapProd
module.exports = {
entry: {
app: './src/main.js'
},
output: {
path: config.build.assetsRoot,
publicPath: process.env.NODE_ENV === 'production' ? config.build.assetsPublicPath : config.dev.assetsPublicPath,
filename: '[name].js'
},
resolve: {
extensions: ['', '.js', '.vue', '.less', '.css', '.scss'],
fallback: [path.join(__dirname, '../node_modules')],
alias: {
'vue$': 'vue/dist/vue.common.js',
'src': path.resolve(__dirname, '../src'),
'assets': path.resolve(__dirname, '../src/assets'),
'components': path.resolve(__dirname, '../src/components')
}
},
resolveLoader: {
fallback: [path.join(__dirname, '../node_modules')]
},
module: {
loaders: [{
test: /\.vue$/,
loader: 'vue'
}, {
test: /\.js$/,
loader: 'babel',
include: projectRoot,
exclude: /node_modules/
}, {
test: /\.json$/,
loader: 'json'
}, {
test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
loader: 'url',
query: {
limit: 10000,
name: utils.assetsPath('img/[name].[ext]')
}
}, {
test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
loader: 'url',
query: {
limit: 10000,
name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
}
}]
},
vue: {
loaders: utils.cssLoaders({
sourceMap: useCssSourceMap
}),
postcss: [
require('autoprefixer')({
browsers: ['last 10 versions']
})
]
}
}
\ No newline at end of file
var config = require('../config')
var webpack = require('webpack')
var merge = require('webpack-merge')
var utils = require('./utils')
var baseWebpackConfig = require('./webpack.base.conf')
var HtmlWebpackPlugin = require('html-webpack-plugin')
// add hot-reload related code to entry chunks
Object.keys(baseWebpackConfig.entry).forEach(function(name) {
baseWebpackConfig.entry[name] = ['./build/dev-client'].concat(baseWebpackConfig.entry[name])
})
module.exports = merge(baseWebpackConfig, {
module: {
loaders: utils.styleLoaders({
sourceMap: config.dev.cssSourceMap
})
},
// eval-source-map is faster for development
devtool: '#eval-source-map',
plugins: [
new webpack.DefinePlugin({
'process.env': config.dev.env
}),
// https://github.com/glenjamin/webpack-hot-middleware#installation--usage
new webpack.optimize.OccurenceOrderPlugin(),
new webpack.HotModuleReplacementPlugin(),
new webpack.NoErrorsPlugin(),
// https://github.com/ampedandwired/html-webpack-plugin
new HtmlWebpackPlugin({
filename: 'index.html',
template: 'index.html',
inject: true
})
]
})
\ No newline at end of file
var path = require('path')
var config = require('../config')
var utils = require('./utils')
var webpack = require('webpack')
var merge = require('webpack-merge')
var baseWebpackConfig = require('./webpack.base.conf')
var ExtractTextPlugin = require('extract-text-webpack-plugin')
var HtmlWebpackPlugin = require('html-webpack-plugin')
var env = config.build.env
var webpackConfig = merge(baseWebpackConfig, {
module: {
loaders: utils.styleLoaders({
sourceMap: config.build.productionSourceMap,
extract: true
})
},
//devtool: config.build.productionSourceMap ? '#source-map' : false,
output: {
path: config.build.assetsRoot,
filename: utils.assetsPath('js/[name].js'),
chunkFilename: utils.assetsPath('js/[name].[chunkhash].min.js')
},
vue: {
loaders: utils.cssLoaders({
sourceMap: config.build.productionSourceMap,
extract: true
})
},
plugins: [
// http://vuejs.github.io/vue-loader/en/workflow/production.html
new webpack.DefinePlugin({
'process.env': env
}),
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false
}
}),
new webpack.optimize.OccurrenceOrderPlugin(),
// extract css into its own file
new ExtractTextPlugin(utils.assetsPath('css/[name].css')),
// generate dist index.html with correct asset hash for caching.
// you can customize output by editing /index.html
// see https://github.com/ampedandwired/html-webpack-plugin
new HtmlWebpackPlugin({
filename: config.build.index,
template: 'index.html',
inject: true,
// minify: {
// removeComments: true,
// collapseWhitespace: true,
// removeAttributeQuotes: true
// // more options:
// // https://github.com/kangax/html-minifier#options-quick-reference
// },
// necessary to consistently work with multiple chunks via CommonsChunkPlugin
chunksSortMode: 'dependency'
}),
// split vendor js into its own file
new webpack.optimize.CommonsChunkPlugin({
name: 'vendor',
minChunks: function(module, count) {
// any required modules inside node_modules are extracted to vendor
return (
module.resource &&
/\.js$/.test(module.resource) &&
module.resource.indexOf(
path.join(__dirname, '../node_modules')
) === 0
)
}
}),
// extract webpack runtime and module manifest to its own file in order to
// prevent vendor hash from being updated whenever app bundle is updated
new webpack.optimize.CommonsChunkPlugin({
name: 'manifest',
chunks: ['vendor']
})
]
})
if (config.build.productionGzip) {
var CompressionWebpackPlugin = require('compression-webpack-plugin')
webpackConfig.plugins.push(
new CompressionWebpackPlugin({
asset: '[path].gz[query]',
algorithm: 'gzip',
test: new RegExp(
'\\.(' +
config.build.productionGzipExtensions.join('|') +
')$'
),
threshold: 10240,
minRatio: 0.8
})
)
}
module.exports = webpackConfig
\ No newline at end of file
// see http://vuejs-templates.github.io/webpack for documentation.
var path = require('path')
module.exports = {
build: {
env: {NODE_ENV: '"production"'},
index: path.resolve(__dirname, '../elm/index.html'),
assetsRoot: path.resolve(__dirname, '../elm'),
assetsSubDirectory: 'static',
assetsPublicPath: '/elm/',
productionSourceMap: true,
// Gzip off by default as many popular static hosts such as
// Surge or Netlify already gzip all static assets for you.
// Before setting to `true`, make sure to:
// npm install --save-dev compression-webpack-plugin
productionGzip: false,
productionGzipExtensions: ['js', 'css']
},
dev: {
env: {NODE_ENV: '"development"'},
port: 8088,
assetsSubDirectory: 'static',
assetsPublicPath: '/',
context: [ //代理路径
'/shopping',
'/v1',
'/v2',
'/v3',
'/v4',
],
proxypath: 'https://mainsite-restapi.ele.me',
// CSS Sourcemaps off by default because relative paths are "buggy"
// with this option, according to the CSS-Loader README
// (https://github.com/webpack/css-loader#sourcemaps)
// In our experience, they generally work as expected,
// just be aware of this issue when enabling this option.
cssSourceMap: false
}
}
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, minimal-ui">
<meta name="screen-orientation" content="portrait" />
<meta content="yes" name="apple-mobile-web-app-capable">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta content="black" name="apple-mobile-web-app-status-bar-style">
<meta name="format-detection" content="telephone=no">
<meta name="full-screen" content="yes">
<meta name="x5-fullscreen" content="true">
<title>快乐星期五</title>
<link href="/elm/static/css/app.css" rel="stylesheet"></head>
<body>
<div id="app">
<router-view></router-view>
</div>
<script type="text/javascript" src="/elm/static/js/manifest.js"></script><script type="text/javascript" src="/elm/static/js/vendor.js"></script><script type="text/javascript" src="/elm/static/js/app.js"></script></body>
</html>
a,article,aside,b,body,button,dd,div,dl,dt,footer,h1,h2,h3,h4,h5,header,i,input,li,nav,p,section,select,span,textarea,ul{padding:0;margin:0;list-style:none;font-style:normal;text-decoration:none;border:none;color:#313131;box-sizing:border-box;font-weight:lighter;font-family:Microsoft YaHei;-webkit-tap-highlight-color:transparent}a:focus,article:focus,aside:focus,b:focus,body:focus,button:focus,dd:focus,div:focus,dl:focus,dt:focus,footer:focus,h1:focus,h2:focus,h3:focus,h4:focus,h5:focus,header:focus,i:focus,input:focus,li:focus,nav:focus,p:focus,section:focus,select:focus,span:focus,textarea:focus,ul:focus{outline:none}body,html{height:100%;width:100%}body{background:url(/elm/static/img/1-1.jpg) no-repeat;background-size:100% 100%}.clear:after{content:'';display:block;clear:both}.clear{zoom:1}.back_img{background-repeat:no-repeat;background-size:100% 100%}.margin{margin:0 auto}.left{float:left}.right{float:right}.hide{display:none}.show{display:block}
\ No newline at end of file
webpackJsonp([5,3],{0:function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}var a=n(64),o=i(a),r=n(143),u=i(r),d=n(71),c=i(d),s=n(73),f=i(s),_=n(24),l=(i(_),n(69)),p=i(l);n(124),n(70),(0,p.default)("get","/v2/index_entry",{geohash:"wtw3630xg5e",group_type:1,"flags[]":"F"}).then(function(e){console.log(e)}).catch(function(e){console.log(e)}),o.default.use(u.default);var v=new u.default({routes:c.default});new o.default({router:v,store:f.default}).$mount("#app")},24:function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(80),o=i(a),r=n(75),u=i(r),d=n(47),c=i(d),s=n(48),f=i(s);t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"GET",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return new f.default(function(a,r){e=e.toUpperCase();var d=void 0;if(d=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject,"GET"==e){var s="";(0,c.default)(n).forEach(function(e){s+=e+"="+n[e]+"&"}),s=s.substr(0,s.lastIndexOf("&")),t=t+"?"+s,d.open(e,t,i),d.setRequestHeader("Content-type","application/x-www-form-urlencoded"),d.send()}else"POST"==e?(d.open(e,t,i),d.setRequestHeader("Content-type","application/x-www-form-urlencoded"),d.send((0,u.default)(n))):r("error type");d.onreadystatechange=function(){if(4==d.readyState)if(200==d.status){var e=d.response;"object"!==("undefined"==typeof e?"undefined":(0,o.default)(e))&&(e=JSON.parse(e)),a(e)}else r(d)}})}},65:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={}},69:function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(47),o=i(a),r=n(48),u=i(r),d="";t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"GET",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new u.default(function(i,a){e=e.toUpperCase();var r="";(0,o.default)(n).forEach(function(e){r+=e+"="+n[e]+"&"}),r=r.substr(0,r.lastIndexOf("&")),t=""!==r?d+t+"?"+r:d+t,fetch(t,{method:e,headers:{Accept:"application/json","Content-Type":"application/json"},mode:"no-cors"}).then(function(e){return 200===e.status?e.json():a(e)}).then(function(e){i(e)}).catch(function(e){a(e)})})}},70:function(e,t){"use strict";!function(e,t){var n=e.documentElement,i="orientationchange"in window?"orientationchange":"resize",a=function(){var e=n.clientWidth;e&&(n.style.fontSize=20*(e/320)+"px")};e.addEventListener&&(t.addEventListener(i,a,!1),e.addEventListener("DOMContentLoaded",a,!1))}(document,window)},71:function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(135),o=i(a);t.default=[{path:"/",component:o.default,children:[{path:"",component:function(e){return n.e(1,function(){return e(n(136))})}},{path:"/item",component:function(e){return n.e(0,function(){return e(n(137))})}},{path:"/score",component:function(e){return n.e(2,function(){return e(n(138))})}}]}]},72:function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(24),o=i(a);t.default={addNum:function(e,t){var n=e.commit,i=e.state;n("REMBER_ANSWER",{id:t}),i.itemNum<i.itemDetail.length&&n("ADD_ITEMNUM",{num:1})},getData:function(e){var t=e.commit;e.state;(0,o.default)("GET","http://operating-activities.putao.com/happyfriday?active_topic_id=4").then(function(e){t("GET_DATA",{res:e})})},initializeData:function(e){var t=e.commit;t("INITIALIZE_DATA")}}},73:function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(64),o=i(a),r=n(46),u=i(r),d=n(74),c=i(d),s=n(72),f=i(s),_=n(24);i(_);o.default.use(u.default);var l={level:"第一周",itemNum:1,allTime:0,timer:"",itemDetail:[{topic_id:20,active_topic_id:4,type:"ONE",topic_name:"题目一",active_id:1,active_title:"欢乐星期五标题",active_topic_phase:"第一周",active_start_time:"1479139200",active_end_time:"1482163200",topic_answer:[{topic_answer_id:66,topic_id:20,answer_name:"答案aaaa",is_standard_answer:0},{topic_answer_id:67,topic_id:20,answer_name:"答案bbbb",is_standard_answer:0},{topic_answer_id:68,topic_id:20,answer_name:"答案cccc",is_standard_answer:0},{topic_answer_id:69,topic_id:20,answer_name:"答案dddd",is_standard_answer:1}]},{topic_id:21,active_topic_id:4,type:"MORE",topic_name:"题目二",active_id:1,active_title:"欢乐星期五标题",active_topic_phase:"第一周",active_start_time:"1479139200",active_end_time:"1482163200",topic_answer:[{topic_answer_id:70,topic_id:21,answer_name:"答案A",is_standard_answer:1},{topic_answer_id:71,topic_id:21,answer_name:"答案B",is_standard_answer:0},{topic_answer_id:72,topic_id:21,answer_name:"答案C",is_standard_answer:0},{topic_answer_id:73,topic_id:21,answer_name:"答案D",is_standard_answer:0}]}],answerid:{}};t.default=new u.default.Store({state:l,actions:f.default,mutations:c.default})},74:function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a,o=n(79),r=i(o),u="GET_DATA",d="ADD_ITEMNUM",c="REMBER_ANSWER",s="REMBER_TIME",f="INITIALIZE_DATA",_="GET_USER_INFORM";t.default=(a={},(0,r.default)(a,u,function(e,t){200==t.res.httpStatusCode&&(e.itemDetail=t.res.topiclist)}),(0,r.default)(a,_,function(e,t){e.user_id=t.res.users_id}),(0,r.default)(a,d,function(e,t){e.itemNum+=t.num}),(0,r.default)(a,c,function(e,t){e.answerid[e.itemNum]=t.id}),(0,r.default)(a,s,function(e){e.timer=setInterval(function(){e.allTime++},1e3)}),(0,r.default)(a,f,function(e){e.itemNum=1,e.allTime=0}),a)},124:function(e,t){},126:function(e,t){},135:function(e,t,n){var i,a;n(126),i=n(65);var o=n(140);a=i=i||{},"object"!=typeof i.default&&"function"!=typeof i.default||(a=i=i.default),"function"==typeof a&&(a=a.options),a.render=o.render,a.staticRenderFns=o.staticRenderFns,e.exports=i},140:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement;return t("div",{attrs:{id:"app"}},[t("router-view")])},staticRenderFns:[]}}});
\ No newline at end of file
此差异已折叠。
此差异已折叠。
!function(e){function a(t){if(n[t])return n[t].exports;var r=n[t]={exports:{},id:t,loaded:!1};return e[t].call(r.exports,r,r.exports,a),r.loaded=!0,r.exports}var t=window.webpackJsonp;window.webpackJsonp=function(c,o){for(var p,f,s=0,i=[];s<c.length;s++)f=c[s],r[f]&&i.push.apply(i,r[f]),r[f]=0;for(p in o)e[p]=o[p];for(t&&t(c,o);i.length;)i.shift().call(null,a);if(o[0])return n[0]=0,a(0)};var n={},r={3:0};a.e=function(e,t){if(0===r[e])return t.call(null,a);if(void 0!==r[e])r[e].push(t);else{r[e]=[t];var n=document.getElementsByTagName("head")[0],c=document.createElement("script");c.type="text/javascript",c.charset="utf-8",c.async=!0,c.src=a.p+"static/js/"+({0:"item",1:"home",2:"score",4:"vendor",5:"app"}[e]||e)+"."+{0:"fb31465b6c6baab204a8",1:"3df2ba210b8842ba636c",2:"a3c49ab604ed4c1bd9bd",4:"57e45fed1af7392f04f4",5:"51423e8986afa67289bf"}[e]+".min.js",n.appendChild(c)}},a.m=e,a.c=n,a.p="/elm/"}([]);
\ No newline at end of file
webpackJsonp([2,3],{68:function(A,C){"use strict";Object.defineProperty(C,"__esModule",{value:!0}),C.default={name:"score",data:function(){return{showHide:!1,score:0,scoreTips:"",shareTitle:"",scoreTipsArr:["你说,是不是把知识都还给小学老师了?","还不错,但还需要继续加油哦!","不要嘚瑟还有进步的空间!","智商离爆表只差一步了!","你也太聪明啦,葡萄之家欢迎你!"]}},methods:{showCover:function(){this.showHide=!this.showHide},getScoreTip:function(){return this.score<=50?void(this.scoreTips=this.scoreTipsArr[0]):this.score<=70?void(this.scoreTips=this.scoreTipsArr[1]):this.score<=80?void(this.scoreTips=this.scoreTipsArr[2]):this.score<=90?void(this.scoreTips=this.scoreTipsArr[3]):void(this.score<=100&&(this.scoreTips=this.scoreTipsArr[4]))}},created:function(){this.score=20,this.getScoreTip(),document.body.style.backgroundImage="url(./static/img/4-1.jpg)"}}},121:function(A,C,Q){C=A.exports=Q(16)(),C.push([A.id,"body{background-image:url("+Q(129)+");padding-top:1.2rem}.your_scores_container{width:9.7rem;height:9.1rem;background:url("+Q(130)+") no-repeat;background-size:100% 100%;margin:0 auto;position:relative}.your_scores_container .your_scores{position:absolute;width:100%;text-indent:3.3rem;top:4.7rem;font-size:1.4rem;font-weight:900;-webkit-text-stroke:.05rem #412318;font-family:Microsoft YaHei}.your_scores_container .your_scores .score_num{font-family:Tahoma,Helvetica,Arial;color:#a51d31}.your_scores_container .your_scores .fenshu{color:#a51d31}.your_scores_container .result_tip{position:absolute;top:7rem;width:9rem;left:.6rem;color:#3e2415;font-size:.65rem;text-align:center}.share_button{width:6.025rem;height:2.4rem;margin:.8rem auto 0;background:url("+Q(131)+") no-repeat .4rem 0;background-size:5.825rem 100%}.share_code{width:5.3rem;margin:1.5rem auto 0}.share_code .share_header{color:#664718;font-size:.475rem;font-family:Microsoft YaHei;width:7rem;font-weight:500}.share_code .code_img{height:5.3rem;width:5.3rem;margin-top:.5rem}.share_cover{position:fixed;bottom:0;right:0;top:0;left:0;background:url("+Q(133)+") no-repeat;background-size:100% 100%;opacity:.92}.share_img{height:10.975rem;width:11.95rem;position:fixed;top:.5rem;left:50%;margin-left:-5.975rem}","",{version:3,sources:["/./src/page/score/index.vue"],names:[],mappings:"AACA,KAAK,+CAA2C,kBAAkB,CACjE,AACD,uBAAuB,aAAa,cAAc,mDAA+C,0BAA0B,cAAgB,iBAAiB,CAC3J,AACD,oCAAoC,kBAAkB,WAAW,mBAAmB,WAAW,iBAAiB,gBAAgB,mCAAmC,2BAA6B,CAC/L,AACD,+CAA+C,mCAAmC,aAAa,CAC9F,AACD,4CAA4C,aAAa,CACxD,AACD,mCAAmC,kBAAkB,SAAS,WAAW,WAAW,cAAc,iBAAiB,iBAAiB,CACnI,AACD,cAAc,eAAe,cAAc,oBAAoB,2DAAuD,6BAA6B,CAClJ,AACD,YAAY,aAAa,oBAAoB,CAC5C,AACD,0BAA0B,cAAc,kBAAkB,4BAA8B,WAAW,eAAe,CACjH,AACD,sBAAsB,cAAc,aAAa,gBAAgB,CAChE,AACD,aAAa,eAAe,SAAS,QAAQ,MAAM,OAAO,mDAA+C,0BAA0B,WAAW,CAC7I,AACD,WAAW,iBAAiB,eAAe,eAAe,UAAU,SAAS,qBAAqB,CACjG",file:"index.vue",sourcesContent:["\nbody{background-image:url(../../images/4-1.jpg);padding-top:1.2rem\n}\n.your_scores_container{width:9.7rem;height:9.1rem;background:url(../../images/4-2.png) no-repeat;background-size:100% 100%;margin:0 auto 0;position:relative\n}\n.your_scores_container .your_scores{position:absolute;width:100%;text-indent:3.3rem;top:4.7rem;font-size:1.4rem;font-weight:900;-webkit-text-stroke:.05rem #412318;font-family:'Microsoft YaHei'\n}\n.your_scores_container .your_scores .score_num{font-family:Tahoma,Helvetica,Arial;color:#a51d31\n}\n.your_scores_container .your_scores .fenshu{color:#a51d31\n}\n.your_scores_container .result_tip{position:absolute;top:7rem;width:9rem;left:.6rem;color:#3e2415;font-size:.65rem;text-align:center\n}\n.share_button{width:6.025rem;height:2.4rem;margin:.8rem auto 0;background:url(../../images/4-3.png) no-repeat .4rem 0;background-size:5.825rem 100%\n}\n.share_code{width:5.3rem;margin:1.5rem auto 0\n}\n.share_code .share_header{color:#664718;font-size:.475rem;font-family:'Microsoft YaHei';width:7rem;font-weight:500\n}\n.share_code .code_img{height:5.3rem;width:5.3rem;margin-top:.5rem\n}\n.share_cover{position:fixed;bottom:0;right:0;top:0;left:0;background:url(../../images/5-1.png) no-repeat;background-size:100% 100%;opacity:.92\n}\n.share_img{height:10.975rem;width:11.95rem;position:fixed;top:.5rem;left:50%;margin-left:-5.975rem\n}"],sourceRoot:"webpack://"}])},125:function(A,C,Q){var B=Q(121);"string"==typeof B&&(B=[[A.id,B,""]]);Q(17)(B,{});B.locals&&(A.exports=B.locals)},129:function(A,C,Q){A.exports=Q.p+"static/img/4-1.jpg"},130:function(A,C,Q){A.exports=Q.p+"static/img/4-2.png"},131:function(A,C,Q){A.exports=Q.p+"static/img/4-3.png"},132:function(A,C,Q){A.exports=Q.p+"static/img/4-4.png"},133:function(A,C){A.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAoAAAARwCAYAAAB6j+UAAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAEUVJREFUeNrs1jEBADAIxMBSGe/fHSZwwcKdhEypJP0AADjjSwAAYAABADCAAAAYQAAADCAAAAYQAAADCACAAQQAwAACAGAAAQAwgAAAGEAAAAwgAAAGEADAAAIAYAABADCAAAAYQAAADCAAAAYQAAADCACAAQQAwAACAGAAAQAwgAAAGEAAAAwgAAAGEADAAAIAYAABADCAAAAYQAAADCAAAAYQAAADCACAAQQAwAACAGAAAQAwgAAAGEAAAAwgAIABBADAAAIAYAABADCAAAAYQAAADCAAAAYQAAADCACAAQQAwAACAGAAAQAwgAAAGEAAAAwgAIABBADAAAIAYAABADCAAAAYQAAADCAAAAYQAAADCACAAQQAwAACAGAAAQAwgAAAGEAAAAMIAIABBADAAAIAYAABADCAAAAYQAAADCAAAAYQAAADCACAAQQAwAACAGAAAQAwgAAAGEAAAAMIAIABBADAAAIAYAABADCAAAAYQAAADCAAAAYQAAADCACAAQQAwAACAGAAAQAwgAAAGEAAAAMIAIABBADAAAIAYAABADCAAAAYQAAADCAAAAYQAAADCACAAQQAwAACAGAAAQAwgAAABhAAAAMIAIABBADAAAIAYAABADCAAAAYQAAADCAAAAYQAAADCACAAQQAwAACAGAAAQAwgAAABhAAAAMIAIABBADAAAIAYAABADCAAAAYQAAADCAAAAYQAAADCACAAQQAwAACAGAAAQAMIAAABhAAAAMIAIABBADAAAIAYAABADCAAAAYQAAADCAAAAYQAAADCACAAQQAwAACAGAAAQAMIAAABhAAAAMIAIABBADAAAIAYAABADCAAAAYQAAADCAAAAYQAAADCACAAQQAwAACABhAAAAMIAAABhAAAAMIAIABBADAAAIAYAABADCAAAAYQAAADCAAAAYQAAADCACAAQQAwAACABhAAAAMIAAABhAAAAMIAIABBADAAAIAYAABADCAAAAYQAAADCAAAAYQAAADCACAAQQAwAACABhAAAAMIAAABhAAAAMIAIABBADAAAIAYAABADCAAAAYQAAADCAAAAYQAAADCACAAQQAMIAAABhAAAAMIAAABhAAAAMIAIABBADAAAIAYAABADCAAAAYQAAADCAAAAYQAAADCACAAQQAMIAAABhAAAAMIAAABhAAAAMIAIABBADAAAIAYAABADCAAAAYQAAADCAAAAYQAAADCABgAAEAMIAAABhAAAAMIAAABhAAAAMIAIABBADAAAIAYAABADCAAAAYQAAADCAAAAYQAAADCABgAAEAMIAAABhAAAAMIAAABhAAAAMIAIABBADAAAIAYAABADCAAAAYQAAADCAAAAYQAMAASgAAYAABADCAAAAYQAAADCAAAAYQAAADCACAAQQAwAACAGAAAQAwgAAAGEAAAAwgAAAGEADAAAIAYAABADCAAAAYQAAADCAAAAYQAAADCACAAQQAwAACAGAAAQAwgAAAGEAAAAwgAAAGEADAAAIAYAABADCAAAAYQAAADCAAAAYQAAADCACAAQQAwAACAGAAAQAwgAAAGEAAAAwgAIABBADAAAIAYAABADCAAAAYQAAADCAAAAYQAAADCACAAQQAwAACAGAAAQAwgAAAGEAAAAwgAIABBADAAAIAYAABADCAAAAYQAAADCAAAAYQAAADCACAAQQAwAACAGAAAQAwgAAAGEAAAAMIAIABBADAAAIAYAABADCAAAAYQAAADCAAAAYQAAADCACAAQQAwAACAGAAAQAwgAAAGEAAAAMIAIABBADAAAIAYAABADCAAAAYQAAADCAAAAYQAAADCACAAQQAwAACAGAAAQAwgAAAGEAAAAMIAIABBADAAAIAYAABADCAAAAYQAAADCAAAAYQAAADCACAAQQAwAACAGAAAQAwgAAABhAAAAMIAIABBADAAAIAYAABADCAAAAYQAAADCAAAAYQAAADCACAAQQAwAACAGAAAQAwgAAABhAAAAMIAIABBADAAAIAYAABADCAAAAYQAAADCAAAAYQAAADCACAAQQAwAACAGAAAQAMIAAABhAAAAMIAIABBADAAAIAYAABADCAAAAYQAAADCAAAAYQAAADCACAAQQAwAACAGAAAQAMIAAABhAAAAMIAIABBADAAAIAYAABADCAAAAYQAAADCAAAAYQAAADCACAAQQAwAACABhAAAAMIAAABhAAAAMIAIABBADAAAIAYAABADCAAAAYQAAADCAAAAYQAAADCACAAQQAwAACABhAAAAMIAAABhAAAAMIAIABBADAAAIAYAABADCAAAAYQAAADCAAAAYQAAADCACAAQQAwAACABhAAAAMIAAABhAAAAMIAIABBADAAAIAYAABADCAAAAYQAAADCAAAAYQAAADCACAAQQAMIAAABhAAAAMIAAABhAAAAMIAIABBADAAAIAYAABADCAAAAYQAAADCAAAAYQAAADCACAAQQAMIAAABhAAAAMIAAABhAAAAMIAIABBADAAAIAYAABADCAAAAYQAAADCAAAAYQAAADCABgAAEAMIAAABhAAAAMIAAABhAAAAMIAIABBADAAAIAYAABADCAAAAYQAAADCAAAAYQAAADCABgAAEAMIAAABhAAAAMIAAABhAAAAMIAIABBADAAAIAYAABADCAAAAYQAAADCAAAAYQAMAASgAAYAABADCAAAAYQAAADCAAAAYQAAADCACAAQQAwAACAGAAAQAwgAAAGEAAAAwgAAAGEADAAAIAYAABADCAAAAYQAAADCAAAAYQAAADCACAAQQAwAACAGAAAQAwgAAAGEAAAAwgAAAGEADAAAIAYAABADCAAAAYQAAADCAAAAYQAAADCACAAQQAwAACAGAAAQAwgAAAGEAAAAwgAIABBADAAAIAYAABADCAAAAYQAAADCAAAAYQAAADCACAAQQAwAACAGAAAQAwgAAAGEAAAAwgAIABBADAAAIAYAABADCAAAAYQAAADCAAAAYQAAADCACAAQQAwAACAGAAAQAwgAAAGEAAAAMIAIABBADAAAIAYAABADCAAAAYQAAADCAAAAYQAAADCACAAQQAwAACAGAAAQAwgAAAGEAAAAMIAIABBADAAAIAYAABADCAAAAYQAAADCAAAAYQAAADCACAAQQAwAACAGAAAQAwgAAAGEAAAAMIAIABBADAAAIAYAABADCAAAAYQAAADCAAAAYQAAADCACAAQQAwAACAGAAAQAwgAAABhAAAAMIAIABBADAAAIAYAABADCAAAAYQAAADCAAAAYQAAADCACAAQQAwAACAGAAAQAwgAAABhAAAAMIAIABBADAAAIAYAABADCAAAAYQAAADCAAAAYQAAADCACAAQQAwAACAGAAAQAMIAAABhAAAAMIAIABBADAAAIAYAABADCAAAAYQAAADCAAAAYQAAADCACAAQQAwAACAGAAAQAMIAAABhAAAAMIAIABBADAAAIAYAABADCAAAAYQAAADCAAAAYQAAADCACAAQQAwAACABhAAAAMIAAABhAAAAMIAIABBADAAAIAYAABADCAAAAYQAAADCAAAAYQAAADCACAAQQAwAACABhAAAAMIAAABhAAAAMIAIABBADAAAIAYAABADCAAAAYQAAADCAAAAYQAAADCACAAQQAwAACABhAAAAMIAAABhAAAAMIAIABBADAAAIAYAABADCAAAAYQAAADCAAAAYQAAADCACAAQQAMIAAABhAAAAMIAAABhAAAAMIAIABBADAAAIAYAABADCAAAAYQAAADCAAAAYQAAADCACAAQQAMIAAABhAAAAMIAAABhAAAAMIAIABBADAAAIAYAABADCAAAAYQAAADCAAAAYQAAADCABgAAEAMIAAABhAAAAMIAAABhAAAAMIAIABBADAAAIAYAABADCAAAAYQAAADCAAAAYQAAADCABgAAEAMIAAABhAAAAMIAAABhAAAAMIAIABBADAAAIAYAABADCAAAAYQAAADCAAAAYQAMAASgAAYAABADCAAAAYQAAADCAAAAYQAAADCACAAQQAwAACAGAAAQAwgAAAGEAAAAwgAAAGEADAAAIAYAABADCAAAAYQAAADCAAAAYQAAADCACAAQQAwAACAGAAAQAwgAAAGEAAAAwgAAAGEADAAAIAYAABADCAAAAYQAAADCAAAAYQAAADCACAAQQAwAACAGAAAQAwgAAAGEAAAAwgAIABBADAAAIAYAABADCAAAAYQAAADCAAAAYQAAADCACAAQQAwAACAGAAAQAwgAAAGEAAAAwgAIABBADAAAIAYAABADCAAAAYQAAADCAAAAYQAAADCACAAQQAwAACAGAAAQAwgAAAGEAAAAMIAIABBADAAAIAYAABADCAAAAYQAAADCAAAAYQAAADCACAAQQAwAACAGAAAQAwgAAAGEAAAAMIAIABBADAAAIAYAABADCAAAAYQAAADCAAAAYQAAADCACAAQQAwAACAGAAAQAwgAAAGEAAAAMIAIABBADAAAIAYAABADCAAAAYQAAADCAAAAYQAAADCACAAQQAwAACAGAAAQAwgAAABhAAAAMIAIABBADAAAIAYAABADCAAAAYQAAADCAAAAYQAAADCACAAQQAwAACAGAAAQAwgAAABhAAAAMIAIABBADAAAIAYAABADCAAAAYQAAADCAAAAYQAAADCACAAQQAwAACAGAAAQAMIAAABhAAAAMIAIABBADAAAIAYAABADCAAAAYQAAADCAAAAYQAAADCACAAQQAwAACAGAAAQAMIAAABhAAAAMIAIABBADAAAIAYAABADCAAAAYQAAADCAAAAYQAAADCACAAQQAwAACABhAAAAMIAAABhAAAAMIAIABBADAAAIAYAABADCAAAAYQAAADCAAAAYQAAADCACAAQQAwAACABhAAAAMIAAABhAAAAMIAIABBADAAAIAYAABADCAAAAYQAAADCAAAAYQAAADCACAAQQAwAACABhAAAAMIAAABhAAAAMIAIABBADAAAIAYAABADCAAAAYQAAADCAAAAYQAAADCACAAQQAMIAAABhAAAAMIAAABhAAAAMIAIABBADAAAIAYAABADCAAAAYQAAADCAAAAYQAAADCACAAQQAMIAAABhAAAAMIAAABhAAAAMIAIABBADAAAIAYAABADCAAAAYQAAADCAAAAYQAAADCABgAAEAMIAAABhAAAAMIAAABhAAAAMIAIABBADAAAIAYAABADCAAAAYQAAADCAAAAYQAAADCABgAAEAMIAAABhAAAAMIAAABhAAAAMIAIABBADAAAIAYAABADCAAAAYQAAADCAAAAYQAMAASgAAYAABADCAAAAYQAAADCAAAAYQAAADCACAAQQAwAACAGAAAQAwgAAAGEAAAAwgAAAGEADAAAIAYAABADCAAAAYQAAADCAAAAYQAAADCACAAQQAwAACAGAAAQAwgAAAGEAAAAwgAAAGEADAAAIAYAABADCAAAAYQAAADCAAAAYQAAADCACAAQQAwAACAGAAAQAwgAAAGEAAAAwgAIABBADAAAIAYAABADCAAAAYQAAADCAAAAYQAAADCACAAQQAwAACAGAAAQAwgAAAGEAAAAwgAIABBADAAAIAYAABADCAAAAYQAAADCAAAAYQAAADCACAAQQAwAACAGAAAQAwgAAAGEAAAAMIAIABBADAAAIAYAABADCAAAAYQAAADCAAAAYQAAADCACAAQQAwAACAGAAAQAwgAAAGEAAAAMIAIABBADAAAIAYAABADCAAAAYQAAADCAAAAYQAAADCACAAQQAwAACAGAAAQAwgAAAGEAAAAMIAIABBADAAAIAYAABADCAAAAYQAAADCAAAHtGAAEGAJqJChmP07bKAAAAAElFTkSuQmCC"},134:function(A,C,Q){A.exports=Q.p+"static/img/5-2.png"},138:function(A,C,Q){var B,e;Q(125),B=Q(68);var D=Q(139);e=B=B||{},"object"!=typeof B.default&&"function"!=typeof B.default||(e=B=B.default),"function"==typeof e&&(e=e.options),e.render=D.render,e.staticRenderFns=D.staticRenderFns,A.exports=B},139:function(A,C,Q){A.exports={render:function(){var A=this,C=A.$createElement;return C("div",[C("div",{staticClass:"your_scores_container"},[C("header",{staticClass:"your_scores"},[C("span",{staticClass:"score_num"},[A._s(A.score)]),C("span",{staticClass:"fenshu"},["分!"])])," ",C("div",{staticClass:"result_tip"},[A._s(A.scoreTips)])])," ",C("div",{staticClass:"share_button",on:{click:A.showCover}})," ",A._m(0)," ",C("div",{directives:[{name:"show",rawName:"v-show",value:A.showHide,expression:"showHide"}],staticClass:"share_cover",on:{click:A.showCover}},[C("img",{staticClass:"share_img",attrs:{src:Q(134)}})])])},staticRenderFns:[function(){var A=this,C=A.$createElement;return C("div",{staticClass:"share_code"},[C("header",{staticClass:"share_header"},["关注葡萄之家,获取答案。"])," ",C("img",{staticClass:"code_img",attrs:{src:Q(132),height:"212",width:"212"}})])}]}}});
\ No newline at end of file
此差异已折叠。
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, minimal-ui">
<meta name="screen-orientation" content="portrait" />
<meta content="yes" name="apple-mobile-web-app-capable">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta content="black" name="apple-mobile-web-app-status-bar-style">
<meta name="format-detection" content="telephone=no">
<meta name="full-screen" content="yes">
<meta name="x5-fullscreen" content="true">
<title>快乐星期五</title>
</head>
<body>
<div id="app">
<router-view></router-view>
</div>
</body>
</html>
{
"name": "elm",
"version": "1.0.0",
"description": "vue2-elm",
"author": "maguohua <1264889788@qq.com>",
"private": true,
"scripts": {
"dev": "node build/dev-server.js",
"build": "node build/build.js"
},
"dependencies": {
"vue": "^2.1.0",
"vue-router": "^2.1.1",
"vuex": "^2.0.0"
},
"devDependencies": {
"autoprefixer": "^6.4.0",
"autoprefixer-loader": "^3.2.0",
"babel-core": "^6.0.0",
"babel-loader": "^6.0.0",
"babel-plugin-transform-runtime": "^6.0.0",
"babel-preset-es2015": "^6.0.0",
"babel-preset-stage-2": "^6.0.0",
"babel-register": "^6.0.0",
"chalk": "^1.1.3",
"connect-history-api-fallback": "^1.1.0",
"css-loader": "^0.25.0",
"eventsource-polyfill": "^0.9.6",
"express": "^4.13.3",
"extract-text-webpack-plugin": "^1.0.1",
"file-loader": "^0.9.0",
"function-bind": "^1.0.2",
"html-webpack-plugin": "^2.8.1",
"http-proxy-middleware": "^0.17.2",
"json-loader": "^0.5.4",
"less": "^2.7.1",
"less-loader": "^2.2.3",
"opn": "^4.0.2",
"ora": "^0.3.0",
"semver": "^5.3.0",
"shelljs": "^0.7.4",
"style-loader": "^0.13.1",
"url-loader": "^0.5.7",
"vue-loader": "^10.0.0",
"vue-style-loader": "^1.0.0",
"vue-template-compiler": "^2.1.0",
"webpack": "^1.13.2",
"webpack-dev-middleware": "^1.8.3",
"webpack-dev-server": "^1.16.2",
"webpack-hot-middleware": "^2.12.2",
"webpack-merge": "^0.14.1"
},
"engines": {
"node": ">= 4.0.0",
"npm": ">= 3.0.0"
}
}
\ No newline at end of file
<template>
<div id="app">
<router-view></router-view>
</div>
</template>
<script>
export default {
}
</script>
<style lang="less">
</style>
<template>
<section>
<header class="top_tips">
<span class="num_tip" v-if="fatherComponent == 'home'">{{level}}</span>
<span class="num_tip" v-if="fatherComponent == 'item'">题目{{itemNum}}</span>
</header>
<div v-if="fatherComponent == 'home'" >
<div class="home_logo item_container_style"></div>
<router-link to="item" class="start button_style" ></router-link>
</div>
<div v-if="fatherComponent == 'item'" >
<div class="item_back item_container_style">
<div class="item_list_container" v-if="this.$store.state.itemDetail.length > 0">
<header class="item_title">{{itemDetail[itemNum-1].topic_name}}</header>
<ul>
<li v-for="(item, index) in itemDetail[itemNum-1].topic_answer" @click="choosed(index, item.topic_answer_id)" class="item_list">
<span class="option_style" v-bind:class="{'has_choosed':choosedNum==index}">{{chooseType(index)}}</span>
<span class="option_detail">{{item.answer_name}}</span>
</li>
</ul>
</div>
</div>
<span class="next_item button_style" @click="nextItem" v-if="itemNum < itemDetail.length"></span>
<span class="submit_item button_style" v-else @click="submitAnswer"></span>
</div>
</section>
</template>
<script>
import { mapState, mapActions } from 'vuex'
export default {
name: 'itemcontainer',
data() {
return {
itemId: null,
choosedNum: null,
choosedId:null
}
},
props:['fatherComponent'],
computed: mapState({
itemNum: state => state.itemNum,
level: state => state.level,
itemDetail: state => state.itemDetail
}),
methods: {
nextItem: function (){
if (this.choosedNum !== null) {
this.choosedNum = null;
this.$store.dispatch('addNum',this.choosedId)
}else{
alert('您还没有选择答案哦')
}
},
chooseType: type => {
switch(type){
case 0: return 'A';
case 1: return 'B';
case 2: return 'C';
case 3: return 'D';
}
},
choosed: function (type,id){
this.choosedNum = type;
this.choosedId = id;
},
submitAnswer: function (){
if (this.choosedNum !== null) {
this.$store.dispatch('addNum',this.choosedId)
clearInterval(this.$store.state.timer)
this.$router.push('score')
}else{
alert('您还没有选择答案哦')
}
},
},
created(){
this.$store.dispatch('initializeData');
if(this.$store.state.itemDetail.length == 0){
this.$store.dispatch('getData');
}
document.body.style.backgroundImage = 'url(./static/img/1-1.jpg)';
}
}
</script>
<style lang="less">
.top_tips{
position: absolute;
height: 7.35rem;
width: 3.25rem;
top: -1.3rem;
right: 1.6rem;
background: url(../images/WechatIMG2.png) no-repeat;
background-size: 100% 100%;
z-index: 10;
.num_tip{
position: absolute;
left: 0.48rem;
bottom: 1.1rem;
height: 0.7rem;
width: 2.5rem;
font-size: 0.6rem;
font-family: '黑体';
font-weight: 600;
color: #a57c50;
text-align: center;
}
}
.item_container_style{
height: 11.625rem;
width: 13.15rem;
background-repeat: no-repeat;
position: absolute;
top: 4.1rem;
left: 1rem;
}
.home_logo{
background-image: url(../images/1-2.png);
background-size: 13.142rem 100%;
background-position: right center;
}
.item_back{
background-image: url(../images/2-1.png);
background-size: 100% 100%;
}
.button_style{
display: block;
height: 2.1rem;
width: 4.35rem;
background-size: 100% 100%;
position: absolute;
top: 16.5rem;
left: 50%;
margin-left: -2.4rem;
background-repeat: no-repeat;
}
.start{
background-image: url(../images/1-4.png);
}
.next_item{
background-image: url(../images/2-2.png);
}
.submit_item{
background-image: url(../images/3-1.png);
}
.item_list_container{
position: absolute;
height: 7.0rem;
width: 8.0rem;
top: 2.4rem;
left: 3rem;
-webkit-font-smoothing: antialiased;
}
.item_title{
font-size: 0.65rem;
color: #fff;
line-height: 0.7rem;
}
.item_list{
font-size: 0;
margin-top: 0.4rem;
width: 10rem;
span{
display: inline-block;
font-size: 0.6rem;
color: #fff;
vertical-align: middle;
}
.option_style{
height: 0.725rem;
width: 0.725rem;
border: 1px solid #fff;
border-radius: 50%;
line-height: 0.725rem;
text-align: center;
margin-right: 0.3rem;
font-size: 0.5rem;
font-family: 'Arial';
}
.has_choosed{
background-color: #ffd400;
color: #575757;
border-color: #ffd400;
}
.option_detail{
width: 7.5rem;
padding-top: 0.11rem;
}
}
</style>
export default (type='GET', url='', data={}, async=true) => {
return new Promise((resolve, reject) => { //定义一个promise
type = type.toUpperCase();
let requestObj;
if (window.XMLHttpRequest) {
requestObj = new XMLHttpRequest();
} else {
requestObj = new ActiveXObject;
}
if (type == 'GET') {
let dataStr = ''; //数据拼接字符串
Object.keys(data).forEach(key => {
dataStr += key + '=' + data[key] + '&';
})
dataStr = dataStr.substr(0, dataStr.lastIndexOf('&'));
url = url + '?' + dataStr;
requestObj.open(type, url, async);
requestObj.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
requestObj.send();
}else if (type == 'POST') {
requestObj.open(type, url, async);
requestObj.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
requestObj.send(JSON.stringify(data));
}else {
reject('error type');
}
requestObj.onreadystatechange = () => {
if (requestObj.readyState == 4) {
if (requestObj.status == 200) {
let obj = requestObj.response
if (typeof obj !== 'object') {
obj = JSON.parse(obj);
}
resolve(obj);
}else {
reject(requestObj);
}
}
}
})
}
\ No newline at end of file
let baseUrl = ''
export default (type='GET', url='', data={}) => {
return new Promise((resolve, reject) => { //定义一个promise
type = type.toUpperCase();
let dataStr = ''; //数据拼接字符串
Object.keys(data).forEach( key => {
dataStr += key + '=' + data[key] + '&';
})
dataStr = dataStr.substr(0, dataStr.lastIndexOf('&'));
if (dataStr !== '') {
url = baseUrl + url + '?' + dataStr;
}else {
url = baseUrl + url
}
fetch(url, {
method: type,
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
mode: "no-cors",
// body: JSON.stringify({
// content: "留言内容"
// })
}).then(res => {
if (res.status === 200) {
return res.json()
} else {
return reject(res)
}
}).then(data => {
resolve(data);
}).catch(err => {
reject(err);
});
})
}
\ No newline at end of file
(function(doc, win) {
var docEl = doc.documentElement,
resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize',
recalc = function() {
var clientWidth = docEl.clientWidth;
if (!clientWidth) return;
docEl.style.fontSize = 20 * (clientWidth / 320) + 'px';
};
if (!doc.addEventListener) return;
win.addEventListener(resizeEvt, recalc, false);
doc.addEventListener('DOMContentLoaded', recalc, false);
})(document, window);
\ No newline at end of file
import Vue from 'vue'
import VueRouter from 'vue-router'
import routes from './router/router'
import store from './store/'
import ajax from './config/ajax'
import fetch from './config/fetch'
import './style/common'
import './config/rem'
// ajax('GET', '/shopping/restaurants',{
// latitude: 31.16407,
// longitude: 121.38876,
// offset: 0,
// limit: 20,
// 'extras[]': 'activities',
// })
fetch('get', '/v2/index_entry', {
geohash: 'wtw3630xg5e',
group_type: 1,
'flags[]': 'F',
}).then(res => {
console.log(res)
}).catch(error => {
console.log(error)
})
// var obj = {
// mobile: '13681711254',
// scene: 'login',
// type: 'sms',
// }
// var a = JSON.stringify(obj)
// ajax('POST', '/v4/mobile/verify_code/send', a)
// var loginObj = {
// code:212128,
// mobile: '13681711254',
// validate_token: '0af8df2bfd363e37cba0c616498e049777d7b118f13be41664491a05d8ad9da2'
// }
// var b = JSON.stringify(loginObj)
// ajax('POST', '/v1/login/app_mobile', b)
Vue.use(VueRouter)
const router = new VueRouter({
routes
})
new Vue({
router,
store,
}).$mount('#app')
\ No newline at end of file
<template>
<div class="home_container">
<itemcontainer father-component="home"></itemcontainer>
</div>
</template>
<script>
import itemcontainer from '../../components/itemcontainer'
export default {
name: 'home',
components: {
itemcontainer
},
created(){
}
}
</script>
<style lang="less" scoped>
.home_container{
}
</style>
<template>
<div>
<itemcontainer father-component="item"></itemcontainer>
</div>
</template>
<script>
import itemcontainer from '../../components/itemcontainer'
export default {
name: 'item',
components: {
itemcontainer
},
created(){
this.$store.commit('REMBER_TIME');
}
}
</script>
<style lang="less">
</style>
<template>
<div>
<div class="your_scores_container">
<header class="your_scores"><span class="score_num">{{score}}</span><span class="fenshu">分!</span></header>
<div class="result_tip">{{scoreTips}}</div>
</div>
<div class="share_button" @click="showCover"></div>
<div class="share_code">
<header class="share_header">关注葡萄之家,获取答案。</header>
<img src="../../images/4-4.png" height="212" width="212" class="code_img">
</div>
<div class="share_cover" v-show="showHide" @click="showCover">
<img src="../../images/5-2.png" class="share_img">
</div>
</div>
</template>
<script>
export default {
name: 'score',
data(){
return {
showHide: false,
score: 0,
scoreTips:'',
shareTitle:'',
scoreTipsArr:['你说,是不是把知识都还给小学老师了?','还不错,但还需要继续加油哦!','不要嘚瑟还有进步的空间!','智商离爆表只差一步了!','你也太聪明啦,葡萄之家欢迎你!'],
}
},
methods: {
showCover: function (){
this.showHide = !this.showHide;
},
getScoreTip: function (){
if(this.score <= 50) {
this.scoreTips = this.scoreTipsArr[0];
return
}
if(this.score <= 70) {
this.scoreTips = this.scoreTipsArr[1];
return
}
if(this.score <= 80) {
this.scoreTips = this.scoreTipsArr[2];
return
}
if(this.score <= 90) {
this.scoreTips = this.scoreTipsArr[3];
return
}
if(this.score <= 100) {
this.scoreTips = this.scoreTipsArr[4];
}
}
},
created(){
this.score = 20;
this.getScoreTip();
document.body.style.backgroundImage = 'url(./static/img/4-1.jpg)';
}
}
</script>
<style lang="less">
body{
background-image: url(../../images/4-1.jpg);
padding-top: 1.2rem;
}
.your_scores_container{
width: 9.7rem;
height: 9.1rem;
background: url(../../images/4-2.png) no-repeat;
background-size: 100% 100%;
margin: 0 auto 0;
position: relative;
.your_scores{
position: absolute;
width: 100%;
text-indent: 3.3rem;
top: 4.7rem;
font-size: 1.4rem;
font-weight: 900;
-webkit-text-stroke: 0.05rem #412318;
font-family: 'Microsoft YaHei';
.score_num{
font-family: Tahoma,Helvetica,Arial;
color: #a51d31;
}
.fenshu{
color: #a51d31;
}
}
.result_tip{
position: absolute;
top: 7rem;
width: 9rem;
left: 0.6rem;
color: #3e2415;
font-size: 0.65rem;
text-align: center;
}
}
.share_button{
width: 6.025rem;
height: 2.4rem;
margin: 0.8rem auto 0;
background: url(../../images/4-3.png) no-repeat 0.4rem 0;
background-size: 5.825rem 100%;
}
.share_code{
width: 5.3rem;
margin: 1.5rem auto 0;
.share_header{
color: #664718;
font-size: 0.475rem;
font-family: 'Microsoft YaHei';
width: 7rem;
font-weight: 500;
}
.code_img{
height: 5.3rem;
width: 5.3rem;
margin-top: 0.5rem;
}
}
.share_cover{
position: fixed;
bottom: 0;
right: 0;
top: 0;
left: 0;
background: url(../../images/5-1.png) no-repeat;
background-size: 100% 100%;
opacity: 0.92;
}
.share_img{
height: 10.975rem;
width: 11.95rem;
position: fixed;
top: 0.5rem;
left: 50%;
margin-left: -5.975rem;
}
</style>
import App from '../App'
export default [{
path: '/',
component: App,
children: [{
path: '',
component: r => require.ensure([], () => r(require('../page/home')), 'home')
}, {
path: '/item',
component: r => require.ensure([], () => r(require('../page/item')), 'item')
}, {
path: '/score',
component: r => require.ensure([], () => r(require('../page/score')), 'score')
}]
}]
\ No newline at end of file
import ajax from '../config/ajax'
export default {
addNum({ commit, state }, id) {
commit('REMBER_ANSWER', { id })
if (state.itemNum < state.itemDetail.length) {
commit('ADD_ITEMNUM', {
num: 1
})
}
},
getData({ commit, state }) {
ajax('GET', 'http://operating-activities.putao.com/happyfriday?active_topic_id=4').
then(res => {
commit('GET_DATA', {
res
})
})
},
initializeData({ commit }) {
commit('INITIALIZE_DATA')
}
}
\ No newline at end of file
import Vue from 'vue'
import Vuex from 'vuex'
import mutations from './mutations'
import actions from './action'
import ajax from '../config/ajax'
Vue.use(Vuex)
const state = {
level: '第一周',
itemNum: 1,
allTime: 0,
timer: '',
itemDetail: [{
"topic_id": 20,
"active_topic_id": 4,
"type": "ONE",
"topic_name": "题目一",
"active_id": 1,
"active_title": "欢乐星期五标题",
"active_topic_phase": "第一周",
"active_start_time": "1479139200",
"active_end_time": "1482163200",
"topic_answer": [{
"topic_answer_id": 66,
"topic_id": 20,
"answer_name": "答案aaaa",
"is_standard_answer": 0
}, {
"topic_answer_id": 67,
"topic_id": 20,
"answer_name": "答案bbbb",
"is_standard_answer": 0
}, {
"topic_answer_id": 68,
"topic_id": 20,
"answer_name": "答案cccc",
"is_standard_answer": 0
}, {
"topic_answer_id": 69,
"topic_id": 20,
"answer_name": "答案dddd",
"is_standard_answer": 1
}]
}, {
"topic_id": 21,
"active_topic_id": 4,
"type": "MORE",
"topic_name": "题目二",
"active_id": 1,
"active_title": "欢乐星期五标题",
"active_topic_phase": "第一周",
"active_start_time": "1479139200",
"active_end_time": "1482163200",
"topic_answer": [{
"topic_answer_id": 70,
"topic_id": 21,
"answer_name": "答案A",
"is_standard_answer": 1
}, {
"topic_answer_id": 71,
"topic_id": 21,
"answer_name": "答案B",
"is_standard_answer": 0
}, {
"topic_answer_id": 72,
"topic_id": 21,
"answer_name": "答案C",
"is_standard_answer": 0
}, {
"topic_answer_id": 73,
"topic_id": 21,
"answer_name": "答案D",
"is_standard_answer": 0
}]
}],
answerid: {}
}
export default new Vuex.Store({
state,
actions,
mutations
})
\ No newline at end of file
const GET_DATA = 'GET_DATA'
const ADD_ITEMNUM = 'ADD_ITEMNUM'
const REMBER_ANSWER = 'REMBER_ANSWER'
const REMBER_TIME = 'REMBER_TIME'
const INITIALIZE_DATA = 'INITIALIZE_DATA'
const GET_USER_INFORM = 'GET_USER_INFORM'
export default {
[GET_DATA](state, payload) {
if (payload.res.httpStatusCode == 200) {
state.itemDetail = payload.res.topiclist;
}
},
[GET_USER_INFORM](state, payload) {
state.user_id = payload.res.users_id;
},
[ADD_ITEMNUM](state, payload) {
state.itemNum += payload.num;
},
[REMBER_ANSWER](state, payload) {
state.answerid[state.itemNum] = payload.id;
},
[REMBER_TIME](state) {
state.timer = setInterval(() => {
state.allTime++;
}, 1000)
},
[INITIALIZE_DATA](state) {
state.itemNum = 1;
state.allTime = 0;
},
}
\ No newline at end of file
body, div, span, header, footer, nav, section, aside, article, ul, dl, dt, dd, li, a, p, h1, h2, h3, h4,h5, i, b, textarea, button, input, select {
padding: 0;
margin: 0;
list-style: none;
font-style: normal;
text-decoration: none;
border: none;
color: #313131;
box-sizing: border-box;
font-weight: lighter;
font-family: 'Microsoft YaHei';
-webkit-tap-highlight-color:transparent;
&:focus {
outline: none;
}
}
html{
height: 100%;
width: 100%;
}
body{
height: 100%;
width: 100%;
background: url(../images/1-1.jpg) no-repeat;
background-size: 100% 100%;
}
.clear:after{
content: '';
display: block;
clear: both;
}
.clear{
zoom:1;
}
.back_img{
background-repeat: no-repeat;
background-size: 100% 100%;
}
.margin{
margin: 0 auto;
}
.left{
float: left;
}
.right{
float:right;
}
.hide{
display: none;
}
.show{
display: block;
}
webpackJsonp([23], {
0: function(t, e, a) {
t.exports = a(176)
},
113: function(t, e) {
"use strict";
Object.defineProperty(e, "__esModule", {
value: !0
});
var a = function(t) {
var e = document.createElement("a");
e.href = t;
var a = ["http:", "https:", "eleme:"];
return a.indexOf(e.protocol) !== -1 && !(e.hostname && !e.hostname.match(/(^|\.)ele(net)?\.me$/))
};
e.default = {
post: function(t, e) {
var a = {
method: "POST",
credentials: "include",
body: JSON.stringify(e)
};
return window.fetch(t, a).then(function(t) {
var e = t.json();
return t.ok ? e : e.then(Promise.reject.bind(Promise))
})
},
redirect: function() {
var t = (new window.UParams).redirect;
t && a(t) || (t = "/msite/"),
location.href = t
}
}
},
140: function(t, e, a) {
var s, o, i = {};
a(559),
s = a(329),
o = a(878),
t.exports = s || {},
t.exports.__esModule && (t.exports = t.exports.default);
var c = "function" == typeof t.exports ? t.exports.options || (t.exports.options = {}) : t.exports;
o && (c.template = o),
c.computed || (c.computed = {}),
Object.keys(i).forEach(function(t) {
var e = i[t];
c.computed[t] = function() {
return e
}
})
},
176: function(t, e, a) {
"use strict";
var s = a(1006)
, o = babelHelpers.interopRequireDefault(s);
new Vue({
el: "body",
components: {
App: o.default
}
})
},
328: function(t, e, a) {
"use strict";
Object.defineProperty(e, "__esModule", {
value: !0
});
var s = a(1007)
, o = babelHelpers.interopRequireDefault(s)
, i = a(1008)
, c = babelHelpers.interopRequireDefault(i)
, n = a(4);
e.default = {
components: {
ElemeHeader: n.ElemeHeader,
Message: o.default,
Password: c.default
},
data: function() {
return {
apihost: "//mainsite-restapi.ele.me",
current: "message",
toast: "",
timer: null,
showToast: !1,
isApp: /Eleme/.test(navigator.userAgent)
}
},
computed: {
headerOpt: function() {
return {
message: {
title: "登录",
switchName: "密码登录",
switchTarget: "password"
},
password: {
title: "密码登录",
switchName: "短信登录",
switchTarget: "message"
}
}[this.current]
}
},
methods: {
switchTo: function(t) {
this.current = t
}
},
events: {
setToast: function(t) {
var e = this;
clearTimeout(this.timer),
this.toast = t,
this.showToast = !0,
this.timer = setTimeout(function() {
e.showToast = !1
}, 2e3)
}
}
}
},
329: function(t, e) {
"use strict";
Object.defineProperty(e, "__esModule", {
value: !0
}),
e.default = {
props: {
apihost: {
type: String,
default: "//mainsite-restapi.ele.me"
},
confirmButton: {
type: Function,
default: function() {}
},
cancelButton: {
type: Function,
default: function() {}
}
},
data: function() {
return {
captchaCode: "",
userCaptcha: ""
}
},
computed: {
captchaImage: function() {
if (this.captchaCode)
return this.apihost + "/v1/captchas/" + this.captchaCode
}
},
methods: {
$fetch: function(t, e) {
return window.fetch(t, e).then(function(t) {
var e = t.json();
return t.status >= 200 && t.status < 300 ? e : e.then(Promise.reject.bind(Promise))
})
},
reloadCaptcha: function() {
this.$emit("getCaptcha")
},
submitCaptcha: function() {
return this.userCaptcha ? void this.confirmButton(this.userCaptcha, this.captchaCode) : this.$dispatch("setToast", "请填写验证码")
}
},
events: {
getCaptcha: function() {
var t = this;
this.userCaptcha = "",
this.$fetch(this.apihost + "/v1/captchas", {
method: "POST",
credentials: "include"
}).then(function(e) {
t.captchaCode = e.code
}).catch(function() {
return {}
})
}
}
}
},
330: function(t, e, a) {
"use strict";
Object.defineProperty(e, "__esModule", {
value: !0
});
var s = a(140)
, o = babelHelpers.interopRequireDefault(s)
, i = a(113)
, c = babelHelpers.interopRequireDefault(i);
e.default = {
components: {
Captcha: o.default
},
props: ["apihost", "current", "is-app"],
data: function() {
return {
isShowLayer: void 0,
interval: null,
countdown: 0,
mobilePhone: "",
msgCaptcha: "",
msgToken: ""
}
},
computed: {
isMobile: function t() {
var t = /(^(13\d|15[^4,\D]|17[13678]|18\d)\d{8}|170[^346,\D]\d{7})$/;
return t.test(this.mobilePhone)
},
enableShowLayer: function() {
return !this.isShowLayer && this.isMobile
},
buttonText: function() {
return "undefined" == typeof this.isShowLayer ? "获取验证码" : this.isShowLayer ? "发送中..." : "重新获取"
}
},
methods: {
showLayer: function() {
this.enableShowLayer && (this.$broadcast("getCaptcha"),
this.isShowLayer = !0)
},
hideLayer: function() {
this.isShowLayer = !1
},
getMsgCaptcha: function(t) {
var e = this
, a = {
mobile: this.mobilePhone,
scene: "login",
type: "sms"
};
t && (this.isShowLayer = !1,
a.captcha_code = t),
c.default.post(this.apihost + "/v4/mobile/verify_code/send", a).then(function(t) {
e.setCountdown(),
e.msgToken = t.validate_token,
e.isShowLayer = !1
}).catch(function(t) {
"NEED_CAPTCHA" === t.name ? e.showLayer() : e.$dispatch("setToast", t.message)
})
},
setCountdown: function() {
var t = this
, e = function() {
if (t.countdown--,
t.countdown <= 0)
return clearInterval(t.interval)
};
this.countdown = 30,
this.interval = setInterval(e, 1e3)
},
loginByMsg: function() {
var t = this;
return this.mobilePhone ? this.isMobile ? this.msgToken ? this.msgCaptcha ? void c.default.post(this.apihost + "/v1/login/app_mobile", {
validate_token: this.msgToken,
code: this.msgCaptcha,
mobile: this.mobilePhone
}).then(function() {
c.default.redirect()
}).catch(function(e) {
t.msgCaptcha = "",
t.$dispatch("setToast", e.message)
}) : this.$dispatch("setToast", "请填写验证码") : this.$dispatch("setToast", "请获取验证码") : this.$dispatch("setToast", "请填写合法的手机号") : this.$dispatch("setToast", "请填写手机号")
}
}
}
},
331: function(t, e, a) {
"use strict";
Object.defineProperty(e, "__esModule", {
value: !0
});
var s = a(140)
, o = babelHelpers.interopRequireDefault(s)
, i = a(1009)
, c = babelHelpers.interopRequireDefault(i)
, n = a(113)
, r = babelHelpers.interopRequireDefault(n);
e.default = {
components: {
Captcha: o.default,
Switch: c.default
},
props: ["apihost", "current", "is-app"],
data: function() {
return {
captchaCode: "",
userId: "",
userPw: "",
userCaptcha: "",
showPwText: !1
}
},
computed: {
captchaImage: function() {
return this.captchaCode ? this.apihost + "/v1/captchas/" + this.captchaCode : void 0
}
},
methods: {
getCaptchaCode: function() {
var t = this;
this.userCaptcha = "",
r.default.post(this.apihost + "/v1/captchas").then(function(e) {
t.captchaCode = e.code
}).catch(function() {
return {}
})
},
loginByUserId: function() {
var t = this
, e = this.captchaCode && this.userCaptcha || !this.captchaCode;
return this.userId ? this.userPw ? e ? void r.default.post(this.apihost + "/v2/login", {
username: this.userId,
password: this.userPw,
captcha_code: this.userCaptcha
}).then(function() {
r.default.redirect()
}).catch(function(e) {
t.getCaptchaCode(),
t.$dispatch("setToast", e.message)
}) : this.$dispatch("setToast", "请填写验证码") : this.$dispatch("setToast", "密码不能为空") : this.$dispatch("setToast", "手机/邮箱/用户名 不能为空")
}
}
}
},
332: function(t, e) {
"use strict";
Object.defineProperty(e, "__esModule", {
value: !0
}),
e.default = {
props: {
value: {
type: Boolean,
twoWay: !0
}
},
methods: {
switchValue: function() {
this.value = !this.value
}
}
}
},
448: function(t, e) {},
449: function(t, e) {},
450: function(t, e) {},
559: function(t, e) {},
581: function(t, e) {},
788: function(t, e) {
t.exports = " <div> <eleme-header :data=headerOpt> <span class=header-right slot=right @click=switchTo(headerOpt.switchTarget)>{{ headerOpt.switchName }}</span> </eleme-header> <component :is=current :current.sync=current :is-app=isApp :apihost=apihost></component> <div class=toast-wrap v-show=showToast transition=toast> <div class=toast-text v-text=toast></div> </div> </div> "
},
789: function(t, e) {
t.exports = " <div> <div class=form> <div class=form-line> <input type=tel maxlength=11 placeholder=手机号 v-model=mobilePhone> <div class=msg-form-btn v-if=countdown>已发送({{ countdown }}s)</div> <div v-else class=msg-form-btn :class=\"{ 'msg-form-enable': enableShowLayer }\" @click=getMsgCaptcha()>{{ buttonText }} </div> </div> <div class=form-line> <input type=text maxlength=8 placeholder=验证码 v-model=msgCaptcha> </div> </div> <div class=msg-tips> 温馨提示:未注册饿了么帐号的手机号,登录时将自动注册,且代表您已同意<a href=//h5.ele.me/service/agreement/ target=_blank>《用户服务协议》</a> </div> <div class=form-login @click=loginByMsg>登录</div> <div class=password-forget v-if=isApp> <a href=javascript: @click=\"current = 'password'\">密码登录</a> </div> <captcha v-show=isShowLayer :apihost=apihost :confirm-button=getMsgCaptcha :cancel-button=hideLayer> </captcha> </div> "
},
790: function(t, e) {
t.exports = " <div class=form> <div class=form-line> <input type=text placeholder=手机/邮箱/用户名 v-model=userId> </div> <div class=form-line> <input placeholder=密码 v-model=userPw :type=\"showPwText ? 'text' : 'password'\"> <switch :value.sync=showPwText></switch> </div> <div class=form-line v-if=captchaCode> <input type=text placeholder=验证码 v-model=userCaptcha> <img class=password-img-captcha :src=captchaImage @click=getCaptchaCode()> <div class=password-img-change @click=getCaptchaCode()> 看不清<br> <span>换一张</span> </div> </div> <div class=\"form-login password-login\" @click=loginByUserId()>登录</div> <div class=password-forget> <a href=javascript: @click=\"current = 'message'\" v-if=isApp>短信登录</a> <a href=//m.ele.me/forget/ target=_blank>忘记密码?</a> </div> </div> "
},
878: function(t, e) {
t.exports = ' <div class=captcha-mask _v-49aa31ab=""> <div class=captcha-wrap _v-49aa31ab=""> <h3 _v-49aa31ab="">请填写图形验证码</h3> <div class=captcha-form _v-49aa31ab=""> <input type=text maxlength=10 v-model=userCaptcha @keyup.enter=submitCaptcha() _v-49aa31ab=""> <img :src=captchaImage @click=reloadCaptcha() _v-49aa31ab=""> </div> <div class=captcha-confirm _v-49aa31ab=""> <span @click=cancelButton() _v-49aa31ab="">取消</span> <span @click=submitCaptcha() _v-49aa31ab="">确定</span> </div> </div> </div> '
},
900: function(t, e) {
t.exports = ' <div class=switch-wrap :class="{ \'switch-true\': value }" @click=switchValue() _v-6afc61da=""> <div class=switch-cycle _v-6afc61da=""></div> <div class=switch-left _v-6afc61da="">abc</div> <div class=switch-right _v-6afc61da="">···</div> </div> '
},
1006: function(t, e, a) {
var s, o, i = {};
a(450),
s = a(328),
o = a(788),
t.exports = s || {},
t.exports.__esModule && (t.exports = t.exports.default);
var c = "function" == typeof t.exports ? t.exports.options || (t.exports.options = {}) : t.exports;
o && (c.template = o),
c.computed || (c.computed = {}),
Object.keys(i).forEach(function(t) {
var e = i[t];
c.computed[t] = function() {
return e
}
})
},
1007: function(t, e, a) {
var s, o, i = {};
a(448),
s = a(330),
o = a(789),
t.exports = s || {},
t.exports.__esModule && (t.exports = t.exports.default);
var c = "function" == typeof t.exports ? t.exports.options || (t.exports.options = {}) : t.exports;
o && (c.template = o),
c.computed || (c.computed = {}),
Object.keys(i).forEach(function(t) {
var e = i[t];
c.computed[t] = function() {
return e
}
})
},
1008: function(t, e, a) {
var s, o, i = {};
a(449),
s = a(331),
o = a(790),
t.exports = s || {},
t.exports.__esModule && (t.exports = t.exports.default);
var c = "function" == typeof t.exports ? t.exports.options || (t.exports.options = {}) : t.exports;
o && (c.template = o),
c.computed || (c.computed = {}),
Object.keys(i).forEach(function(t) {
var e = i[t];
c.computed[t] = function() {
return e
}
})
},
1009: function(t, e, a) {
var s, o, i = {};
a(581),
s = a(332),
o = a(900),
t.exports = s || {},
t.exports.__esModule && (t.exports = t.exports.default);
var c = "function" == typeof t.exports ? t.exports.options || (t.exports.options = {}) : t.exports;
o && (c.template = o),
c.computed || (c.computed = {}),
Object.keys(i).forEach(function(t) {
var e = i[t];
c.computed[t] = function() {
return e
}
})
}
});
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册