Commit 8fcec1c1 by 尹烁恒

完成首页和选择页面的开发

parent e43ec9e2
...@@ -213,7 +213,6 @@ ...@@ -213,7 +213,6 @@
"version": "5.5.2", "version": "5.5.2",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz",
"integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=",
"dev": true,
"requires": { "requires": {
"co": "4.6.0", "co": "4.6.0",
"fast-deep-equal": "1.1.0", "fast-deep-equal": "1.1.0",
...@@ -1958,8 +1957,7 @@ ...@@ -1958,8 +1957,7 @@
"co": { "co": {
"version": "4.6.0", "version": "4.6.0",
"resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz",
"integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ="
"dev": true
}, },
"coa": { "coa": {
"version": "1.0.4", "version": "1.0.4",
...@@ -3655,14 +3653,12 @@ ...@@ -3655,14 +3653,12 @@
"fast-deep-equal": { "fast-deep-equal": {
"version": "1.1.0", "version": "1.1.0",
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz",
"integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=", "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ="
"dev": true
}, },
"fast-json-stable-stringify": { "fast-json-stable-stringify": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz",
"integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I="
"dev": true
}, },
"fast-levenshtein": { "fast-levenshtein": {
"version": "2.0.6", "version": "2.0.6",
...@@ -3833,6 +3829,95 @@ ...@@ -3833,6 +3829,95 @@
"readable-stream": "2.3.6" "readable-stream": "2.3.6"
} }
}, },
"flyio": {
"version": "0.5.9",
"resolved": "https://registry.npmjs.org/flyio/-/flyio-0.5.9.tgz",
"integrity": "sha512-qClVDZQH1OsizhpqeLbdOy1OYsFct4m2fvlmQatdXcDL79TjR7HGWGEU4AJCYVVo8GnqFTRpsGeMDEwaCIW6yg==",
"requires": {
"request": "2.87.0"
},
"dependencies": {
"assert-plus": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
"integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU="
},
"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="
},
"caseless": {
"version": "0.12.0",
"resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz",
"integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw="
},
"form-data": {
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.2.tgz",
"integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=",
"requires": {
"asynckit": "0.4.0",
"combined-stream": "1.0.6",
"mime-types": "2.1.18"
}
},
"har-validator": {
"version": "5.0.3",
"resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz",
"integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=",
"requires": {
"ajv": "5.5.2",
"har-schema": "2.0.0"
}
},
"http-signature": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz",
"integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=",
"requires": {
"assert-plus": "1.0.0",
"jsprim": "1.4.1",
"sshpk": "1.14.1"
}
},
"request": {
"version": "2.87.0",
"resolved": "https://registry.npmjs.org/request/-/request-2.87.0.tgz",
"integrity": "sha512-fcogkm7Az5bsS6Sl0sibkbhcKsnyon/jV1kF3ajGmF0c8HrttdKTPRT9hieOaQHA5HEq6r8OyWOo/o781C1tNw==",
"requires": {
"aws-sign2": "0.7.0",
"aws4": "1.7.0",
"caseless": "0.12.0",
"combined-stream": "1.0.6",
"extend": "3.0.1",
"forever-agent": "0.6.1",
"form-data": "2.3.2",
"har-validator": "5.0.3",
"http-signature": "1.2.0",
"is-typedarray": "1.0.0",
"isstream": "0.1.2",
"json-stringify-safe": "5.0.1",
"mime-types": "2.1.18",
"oauth-sign": "0.8.2",
"performance-now": "2.1.0",
"qs": "6.5.1",
"safe-buffer": "5.1.2",
"tough-cookie": "2.3.4",
"tunnel-agent": "0.6.0",
"uuid": "3.2.1"
}
},
"tunnel-agent": {
"version": "0.6.0",
"resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
"integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=",
"requires": {
"safe-buffer": "5.1.2"
}
}
}
},
"follow-redirects": { "follow-redirects": {
"version": "1.5.0", "version": "1.5.0",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.0.tgz", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.0.tgz",
...@@ -4707,6 +4792,11 @@ ...@@ -4707,6 +4792,11 @@
"pify": "3.0.0" "pify": "3.0.0"
} }
}, },
"har-schema": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz",
"integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI="
},
"har-validator": { "har-validator": {
"version": "2.0.6", "version": "2.0.6",
"resolved": "https://registry.npmjs.org/har-validator/-/har-validator-2.0.6.tgz", "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-2.0.6.tgz",
...@@ -5545,8 +5635,7 @@ ...@@ -5545,8 +5635,7 @@
"json-schema-traverse": { "json-schema-traverse": {
"version": "0.3.1", "version": "0.3.1",
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz",
"integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=", "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A="
"dev": true
}, },
"json-stable-stringify-without-jsonify": { "json-stable-stringify-without-jsonify": {
"version": "1.0.1", "version": "1.0.1",
...@@ -6056,6 +6145,11 @@ ...@@ -6056,6 +6145,11 @@
"integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==",
"dev": true "dev": true
}, },
"minapp-api-promise": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/minapp-api-promise/-/minapp-api-promise-1.0.2.tgz",
"integrity": "sha512-wQnKABIFYK0fKFz2ajsM05j51d+TlK5Cfw040yhyAKDGIQG3nRUUWpbHy8fw2AXNv6Idg3cVGntNzWgtugckMw=="
},
"minimalistic-assert": { "minimalistic-assert": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz",
...@@ -6885,6 +6979,11 @@ ...@@ -6885,6 +6979,11 @@
"sha.js": "2.4.11" "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="
},
"pify": { "pify": {
"version": "3.0.0", "version": "3.0.0",
"resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
...@@ -7796,8 +7895,7 @@ ...@@ -7796,8 +7895,7 @@
"qs": { "qs": {
"version": "6.5.1", "version": "6.5.1",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz",
"integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==", "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A=="
"dev": true
}, },
"query-string": { "query-string": {
"version": "4.3.4", "version": "4.3.4",
......
...@@ -11,6 +11,8 @@ ...@@ -11,6 +11,8 @@
"lint": "eslint --ext .js,.vue src" "lint": "eslint --ext .js,.vue src"
}, },
"dependencies": { "dependencies": {
"flyio": "^0.5.9",
"minapp-api-promise": "^1.0.2",
"mpvue": "^1.0.11", "mpvue": "^1.0.11",
"node-sass": "^4.9.0", "node-sass": "^4.9.0",
"sass-loader": "^7.0.2", "sass-loader": "^7.0.2",
......
{ {
"description": "项目配置文件。", "description": "项目配置文件。",
"setting": { "setting": {
"urlCheck": true, "urlCheck": false,
"es6": false, "es6": false,
"postcss": true, "postcss": true,
"minified": true, "minified": true,
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
}, },
"miniprogramRoot": "./dist/", "miniprogramRoot": "./dist/",
"compileType": "miniprogram", "compileType": "miniprogram",
"appid": "wxa8fde6597493ec39", "appid": "wx5c22f66dec164454",
"projectname": "mpvue_quickstart", "projectname": "mpvue_quickstart",
"condition": { "condition": {
"search": { "search": {
...@@ -20,13 +20,24 @@ ...@@ -20,13 +20,24 @@
"current": -1, "current": -1,
"list": [] "list": []
}, },
"plugin": {
"current": -1,
"list": []
},
"game": { "game": {
"currentL": -1, "currentL": -1,
"list": [] "list": []
}, },
"miniprogram": { "miniprogram": {
"current": -1, "current": -1,
"list": [] "list": [
{
"id": -1,
"name": "counter",
"pathName": "pages/counter/main",
"query": ""
}
]
} }
} }
} }
\ No newline at end of file
<template> <template>
<div class="option-item"> <div class="option-item">
<img />
{{text}} {{text}}
</div> </div>
</template> </template>
...@@ -14,11 +15,20 @@ export default { ...@@ -14,11 +15,20 @@ export default {
}, },
methods: { methods: {
handleTap (index) { handleTap (index) {
console.log('card.vue', index) this.$emit('click', index)
} }
} }
} }
</script> </script>
<style> <style>
.option-item {
width: 80%;
border: 2rpx solid #eee;
border-radius: 12rpx;
height: 100rpx;
line-height: 100rpx;
text-align: center;
margin: 20rpx auto;
}
</style> </style>
import Vue from 'vue' import Vue from 'vue'
import App from './App' import App from './App'
Vue.config.productionTip = false Vue.config.productionTip = false
App.mpType = 'app' App.mpType = 'app'
const app = new Vue(App) const app = new Vue(App)
app.$mount() app.$mount()
...@@ -14,8 +12,8 @@ export default { ...@@ -14,8 +12,8 @@ export default {
pages: ['pages/logs/main', '^pages/index/main'], pages: ['pages/logs/main', '^pages/index/main'],
window: { window: {
backgroundTextStyle: 'light', backgroundTextStyle: 'light',
navigationBarBackgroundColor: '#fff', navigationBarBackgroundColor: '#cbbdab',
navigationBarTitleText: 'WeChat', navigationBarTitleText: '我的手机',
navigationBarTextStyle: 'black' navigationBarTextStyle: 'black'
}, },
debug: true debug: true
......
...@@ -3,3 +3,11 @@ import App from './index' ...@@ -3,3 +3,11 @@ import App from './index'
const app = new Vue(App) const app = new Vue(App)
app.$mount() app.$mount()
// 这里才会导出page.json
export default {
config: {
navigationBarTitleText: '布里吉',
disableScroll: true
}
}
<template> <template>
<div class="index-page"> <div class="index-page">
<button class="start-button" @click="handleStart">开始</button> <img src="../../assets/img/index-bg.jpg" class="index-bg"/>
<img src="../../assets/img/index-bg-cover.jpg" class="index-bg-cover" />
<img src="../../assets/img/index-start-button.jpg" class="index-start-button" @click="handleStart"/>
</div> </div>
</template> </template>
...@@ -45,16 +47,44 @@ export default { ...@@ -45,16 +47,44 @@ export default {
created () { created () {
// 调用应用实例的方法获取全局数据 // 调用应用实例的方法获取全局数据
this.getUserInfo() // this.getUserInfo()
} }
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.index-page { .index-page {
@include ellipsis; position: relative;
width: 100%; width: 100%;
height: 100vh; height: 100vh;
background: #fff; background: #c9baa8;
text-align: center;
}
.index-bg {
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
z-index: 1;
}
.index-bg-cover {
position: absolute;
width: 659rpx;
height: 798rpx;
top: 30rpx;
left: 50%;
transform: translate3d(-50%, 0 ,0);
z-index: 2;
}
.index-start-button {
position: absolute;
width: 489rpx;
height: 123rpx;
bottom: 180rpx;
left: 50%;
transform: translate3d(-50%, 0, 0);
z-index: 3;
} }
</style> </style>
...@@ -4,7 +4,7 @@ import App from './index' ...@@ -4,7 +4,7 @@ import App from './index'
const app = new Vue(App) const app = new Vue(App)
app.$mount() app.$mount()
// 这里才会导出json // 这里才会导出page.json
export default { export default {
config: { config: {
navigationBarTitleText: '布里吉', navigationBarTitleText: '布里吉',
......
...@@ -11,7 +11,7 @@ function setAuthorization (header) { ...@@ -11,7 +11,7 @@ function setAuthorization (header) {
Authorization = header Authorization = header
} }
const log = console.log const log = console.log
fly.config.baseURL = '' fly.config.baseURL = 'https://test-api.wxagame.com/game-mobile/api/v1/'
// add token // add token
fly.interceptors.request.use((config, promise) => { fly.interceptors.request.use((config, promise) => {
...@@ -62,3 +62,6 @@ fly.interceptors.response.use((config, promise) => { ...@@ -62,3 +62,6 @@ fly.interceptors.response.use((config, promise) => {
} }
}) })
export default fly export default fly
export {
setAuthorization
}
...@@ -31,10 +31,21 @@ const logsModule = { ...@@ -31,10 +31,21 @@ const logsModule = {
} }
} }
} }
const indexModule = {
state: {
config: {}
},
mutations: {
setConfig (state, payload) {
state.config = payload
}
}
}
const store = new Vuex.Store({ const store = new Vuex.Store({
modules: { modules: {
counterPage: counterModule, counterPage: counterModule,
logPage: logsModule logPage: logsModule,
indexPage: indexModule
} }
}) })
......
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