Commit 0c295980 by LinChengbiao

接口对接完成

parent 9d0575cf
{"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\wepy\\lib\\wepy.js":499162500000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\wepy-async-function\\index.js":1523427808000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\wepy-redux\\lib\\index.js":1522738267000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\moment\\moment.js":1527836312000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\redux-actions\\lib\\index.js":1532566051000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\redux\\lib\\index.js":1499904787000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\redux-promise\\lib\\index.js":1458072063000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\wepy\\lib\\app.js":499162500000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\wepy\\lib\\page.js":499162500000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\wepy\\lib\\component.js":499162500000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\wepy\\lib\\event.js":499162500000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\wepy\\lib\\base.js":499162500000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\wepy\\lib\\util.js":499162500000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\wepy\\lib\\mixin.js":499162500000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\wepy-async-function\\global.js":1517302333000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\promise-polyfill\\promise.js":1511627065000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\regenerator-runtime\\runtime.js":1493390741000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\wepy-redux\\lib\\connect\\index.js":1525770681000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\wepy-redux\\lib\\store.js":1522738267000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\wepy-redux\\lib\\helpers\\index.js":1522738268000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\redux-actions\\lib\\combineActions.js":1532566050000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\redux-actions\\lib\\createAction.js":1532566050000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\redux-actions\\lib\\createActions.js":1532566051000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\redux-actions\\lib\\createCurriedAction.js":1532566051000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\redux-actions\\lib\\handleAction.js":1532566051000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\redux-actions\\lib\\handleActions.js":1532566051000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\redux\\lib\\createStore.js":1499904787000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\redux\\lib\\combineReducers.js":1499904787000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\redux\\lib\\bindActionCreators.js":1499904787000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\redux\\lib\\applyMiddleware.js":1499904787000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\redux\\lib\\compose.js":1499904787000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\redux\\lib\\utils\\warning.js":1499904787000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\flux-standard-action\\lib\\index.js":1454443066000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\wepy\\lib\\native.js":499162500000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\invariant\\browser.js":1520965460000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\redux-actions\\lib\\utils\\isFunction.js":1532566052000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\redux-actions\\lib\\utils\\isSymbol.js":1532566052000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\redux-actions\\lib\\utils\\isEmpty.js":1532566052000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\redux-actions\\lib\\utils\\toString.js":1532566052000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\redux-actions\\lib\\utils\\isString.js":1532566052000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\redux-actions\\lib\\constants.js":1532566050000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\redux-actions\\lib\\utils\\identity.js":1532566052000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\redux-actions\\lib\\utils\\isNull.js":1532566052000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\redux-actions\\lib\\utils\\isPlainObject.js":1532566052000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\redux-actions\\lib\\utils\\isArray.js":1532566052000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\redux-actions\\lib\\utils\\isNil.js":1532566052000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\redux-actions\\lib\\utils\\getLastElement.js":1532566052000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\redux-actions\\lib\\utils\\camelCase.js":1532566051000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\redux-actions\\lib\\utils\\arrayToObject.js":1532566051000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\redux-actions\\lib\\utils\\flattenActionMap.js":1532566051000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\redux-actions\\lib\\utils\\unflattenActionCreators.js":1532566052000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\lodash.curry\\index.js":1471109591000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\redux-actions\\lib\\utils\\isUndefined.js":1532566052000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\reduce-reducers\\dist\\index.js":1536657658718,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\redux-actions\\lib\\utils\\isMap.js":1532566052000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\redux-actions\\lib\\utils\\ownKeys.js":1532566052000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\redux-actions\\lib\\utils\\flattenReducerMap.js":1532566051000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\lodash\\isPlainObject.js":499162500000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\symbol-observable\\lib\\index.js":1516988507000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\lodash.isplainobject\\index.js":1435677344000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\lodash.camelcase\\index.js":1471109624000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\redux-actions\\lib\\utils\\flattenWhenNode.js":1532566052000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\redux-actions\\lib\\utils\\hasGeneratorInterface.js":1532566052000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\lodash\\_baseGetTag.js":499162500000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\lodash\\_getPrototype.js":499162500000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\lodash\\isObjectLike.js":499162500000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\symbol-observable\\lib\\ponyfill.js":1516988507000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\lodash._basefor\\index.js":1452676959000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\lodash.isarguments\\index.js":1471109416000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\lodash.keysin\\index.js":1432605162000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\lodash\\_Symbol.js":499162500000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\lodash\\_getRawTag.js":499162500000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\lodash\\_objectToString.js":499162500000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\lodash\\_overArg.js":499162500000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\lodash.isarray\\index.js":1435677344000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\lodash\\_root.js":499162500000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\lodash\\_freeGlobal.js":499162500000}
\ No newline at end of file
{"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\wepy\\lib\\wepy.js":499162500000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\wepy-async-function\\index.js":1523427808000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\wepy-redux\\lib\\index.js":1522738267000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\moment\\moment.js":1527836312000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\axios\\index.js":1518376128000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\wepy-plugin-axios\\dist\\adapter.js":1523245694000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\redux-actions\\lib\\index.js":1532566051000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\redux\\lib\\index.js":1499904787000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\redux-promise\\lib\\index.js":1458072063000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\wepy\\lib\\app.js":499162500000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\wepy\\lib\\page.js":499162500000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\wepy\\lib\\component.js":499162500000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\wepy\\lib\\event.js":499162500000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\wepy\\lib\\base.js":499162500000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\wepy\\lib\\util.js":499162500000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\wepy\\lib\\mixin.js":499162500000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\wepy-async-function\\global.js":1517302333000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\promise-polyfill\\promise.js":1511627065000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\regenerator-runtime\\runtime.js":1493390741000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\wepy-redux\\lib\\connect\\index.js":1525770681000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\wepy-redux\\lib\\store.js":1522738267000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\wepy-redux\\lib\\helpers\\index.js":1522738268000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\axios\\lib\\axios.js":1518836391000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\redux-actions\\lib\\combineActions.js":1532566050000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\redux-actions\\lib\\createAction.js":1532566050000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\redux-actions\\lib\\createActions.js":1532566051000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\redux-actions\\lib\\createCurriedAction.js":1532566051000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\redux-actions\\lib\\handleAction.js":1532566051000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\redux-actions\\lib\\handleActions.js":1532566051000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\redux\\lib\\createStore.js":1499904787000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\redux\\lib\\combineReducers.js":1499904787000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\redux\\lib\\bindActionCreators.js":1499904787000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\redux\\lib\\applyMiddleware.js":1499904787000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\redux\\lib\\compose.js":1499904787000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\redux\\lib\\utils\\warning.js":1499904787000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\flux-standard-action\\lib\\index.js":1454443066000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\wepy\\lib\\native.js":499162500000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\axios\\lib\\utils.js":1519077740000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\axios\\lib\\helpers\\bind.js":1518376128000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\axios\\lib\\core\\Axios.js":1519077740000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\axios\\lib\\defaults.js":1538304085339,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\axios\\lib\\cancel\\Cancel.js":1518376128000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\axios\\lib\\cancel\\CancelToken.js":1518376128000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\axios\\lib\\cancel\\isCancel.js":1518376128000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\axios\\lib\\helpers\\spread.js":1518376128000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\invariant\\browser.js":1520965460000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\redux-actions\\lib\\utils\\isFunction.js":1532566052000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\redux-actions\\lib\\utils\\isSymbol.js":1532566052000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\redux-actions\\lib\\utils\\isEmpty.js":1532566052000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\redux-actions\\lib\\utils\\toString.js":1532566052000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\redux-actions\\lib\\utils\\isString.js":1532566052000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\redux-actions\\lib\\constants.js":1532566050000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\redux-actions\\lib\\utils\\identity.js":1532566052000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\redux-actions\\lib\\utils\\isNull.js":1532566052000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\redux-actions\\lib\\utils\\isPlainObject.js":1532566052000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\redux-actions\\lib\\utils\\isArray.js":1532566052000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\redux-actions\\lib\\utils\\isNil.js":1532566052000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\redux-actions\\lib\\utils\\getLastElement.js":1532566052000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\redux-actions\\lib\\utils\\camelCase.js":1532566051000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\redux-actions\\lib\\utils\\arrayToObject.js":1532566051000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\redux-actions\\lib\\utils\\flattenActionMap.js":1532566051000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\redux-actions\\lib\\utils\\unflattenActionCreators.js":1532566052000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\lodash.curry\\index.js":1471109591000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\redux-actions\\lib\\utils\\isUndefined.js":1532566052000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\reduce-reducers\\dist\\index.js":1536657658718,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\redux-actions\\lib\\utils\\isMap.js":1532566052000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\redux-actions\\lib\\utils\\ownKeys.js":1532566052000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\redux-actions\\lib\\utils\\flattenReducerMap.js":1532566051000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\lodash\\isPlainObject.js":499162500000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\symbol-observable\\lib\\index.js":1516988507000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\lodash.isplainobject\\index.js":1435677344000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\is-buffer\\index.js":1508966858000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\axios\\lib\\core\\InterceptorManager.js":1518376128000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\axios\\lib\\core\\dispatchRequest.js":1518982675000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\axios\\lib\\helpers\\normalizeHeaderName.js":1518376128000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\lodash.camelcase\\index.js":1471109624000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\redux-actions\\lib\\utils\\flattenWhenNode.js":1532566052000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\redux-actions\\lib\\utils\\hasGeneratorInterface.js":1532566052000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\lodash\\_baseGetTag.js":499162500000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\lodash\\_getPrototype.js":499162500000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\lodash\\isObjectLike.js":499162500000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\symbol-observable\\lib\\ponyfill.js":1516988507000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\lodash._basefor\\index.js":1452676959000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\lodash.isarguments\\index.js":1471109416000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\lodash.keysin\\index.js":1432605162000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\axios\\lib\\core\\transformData.js":1518376128000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\axios\\lib\\helpers\\isAbsoluteURL.js":1518376128000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\axios\\lib\\helpers\\combineURLs.js":1518376128000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\lodash\\_Symbol.js":499162500000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\lodash\\_getRawTag.js":499162500000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\lodash\\_objectToString.js":499162500000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\lodash\\_overArg.js":499162500000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\lodash.isarray\\index.js":1435677344000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\lodash\\_root.js":499162500000,"E:\\workspace\\brandEventLibraryMiniProgram\\node_modules\\lodash\\_freeGlobal.js":499162500000}
\ No newline at end of file
......@@ -253,11 +253,11 @@
"dev": true
},
"axios": {
"version": "0.16.2",
"resolved": "http://registry.npm.taobao.org/axios/download/axios-0.16.2.tgz",
"integrity": "sha1-uk+S8XFn37q0CYN4VFS5rBScPG0=",
"version": "0.18.0",
"resolved": "http://registry.npm.taobao.org/axios/download/axios-0.18.0.tgz",
"integrity": "sha1-MtU+SFHv3AoRmTts0AB4nXDAUQI=",
"requires": {
"follow-redirects": "^1.2.3",
"follow-redirects": "^1.3.0",
"is-buffer": "^1.1.5"
}
},
......@@ -6750,6 +6750,11 @@
"integrity": "sha1-VqExXa8fCTNK1qHoI364I7UPgrM=",
"dev": true
},
"wepy-plugin-axios": {
"version": "0.1.8",
"resolved": "http://registry.npm.taobao.org/wepy-plugin-axios/download/wepy-plugin-axios-0.1.8.tgz",
"integrity": "sha1-LR8gdPH8eBl8Rg8sfWC8MvHx6DI="
},
"wepy-plugin-imagemin": {
"version": "1.5.3",
"resolved": "http://registry.npm.taobao.org/wepy-plugin-imagemin/download/wepy-plugin-imagemin-1.5.3.tgz",
......@@ -6786,6 +6791,17 @@
"axios": "^0.16.1",
"vue": "^1.0.28",
"vue-router": "^0.7.13"
},
"dependencies": {
"axios": {
"version": "0.16.2",
"resolved": "http://registry.npm.taobao.org/axios/download/axios-0.16.2.tgz",
"integrity": "sha1-uk+S8XFn37q0CYN4VFS5rBScPG0=",
"requires": {
"follow-redirects": "^1.2.3",
"is-buffer": "^1.1.5"
}
}
}
},
"which": {
......
......@@ -17,6 +17,7 @@
"author": "LinChengbiao <1072907338@qq.com>",
"license": "MIT",
"dependencies": {
"axios": "^0.18.0",
"echarts": "^4.1.0",
"moment": "^2.22.2",
"redux": "^3.7.2",
......@@ -25,6 +26,7 @@
"wepy": "^1.6.0",
"wepy-async-function": "^1.4.6",
"wepy-com-toast": "^1.0.2",
"wepy-plugin-axios": "^0.1.8",
"wepy-redux": "^1.5.3",
"wepy-web": "^1.6.0"
},
......
......@@ -9,14 +9,16 @@ import './static/js/Math_Plus.js' // Math对象扩展
const store = configStore()
setStore(store)
// console.log = () => {} // 去除控制台 console.log 信息
export default class extends wepy.app {
config = {
pages: [
'pages/eventDetail',
'pages/login',
'pages/home',
'pages/searchList',
'pages/temp'
'pages/eventDetail'
// 'pages/temp'
],
window: {
backgroundTextStyle: 'light',
......@@ -36,21 +38,8 @@ export default class extends wepy.app {
}
onLaunch() {
// this.testAsync()
}
// sleep (s) {
// return new Promise((resolve, reject) => {
// setTimeout(() => {
// resolve('promise resolved')
// }, s * 1000)
// })
// }
//
// async testAsync () {
// const data = await this.sleep(3)
// console.log(data)
// }
}
// getUserInfo(cb) {
// const that = this
......
......@@ -3,7 +3,9 @@
<view class="alertMain">
<view class="closeBtn" @tap="close">×</view>
<view class="closeBtn" @tap="close">
<image src="../../static/img/i_popup_close.png" />
</view>
<view class="main">
<view class="icon">
......@@ -121,6 +123,11 @@ export default class alert extends wepy.component {
height: 34rpx;
top: 12rpx;
right: 12rpx;
image{
display: block;
width: 100%;
height: 100%;
}
}
.main{
display: flex;
......
......@@ -26,8 +26,9 @@ export default class searchInput extends wepy.component {
toSearch () {
this.$emit('toSearch')
},
clean () {
this.searchWord = ''
async clean () {
await (this.searchWord = '')
await this.$emit('toReset')
},
input (e) {
this.searchWord = e.detail.value
......
......@@ -3,7 +3,7 @@
<view class="title">渠道参与情况</view>
<view class="content">
<repeat for="{{ channelData }}" item="n" index="i" key="i">
<repeat for="{{ channelParticipationData }}" item="n" index="i" key="i">
<view class="item">
<view class="left">
......@@ -14,7 +14,7 @@
<view class="value">{{ n.showValue }}</view>
</view>
<view class="right">
<view class="span">{{ n.ptList }}</view>{{ n.mediaType }}媒体参与了该事件
<view class="span">{{ n.ptList }}</view>{{ n.ptList ? '等' : '暂无' }}{{ n.mediaType }}媒体参与了该事件
</view>
</view>
......@@ -28,31 +28,52 @@
import wepy from 'wepy'
export default class channelParticipation extends wepy.component {
data = {
channelData: [
{
mediaType: '央级',
value: 65.6,
showValue: '65.6%',
ptList: [ '人民网', '环球网' ].join('、')
},
{
mediaType: '财经类',
value: 65.6,
showValue: '65.6%',
ptList: [ '人民网', '环球网' ].join('、')
},
{
mediaType: '娱乐类',
value: 65.6,
showValue: '65.6%',
ptList: [ '人民网', '环球网' ].join('、')
props = {
channelData: {}
}
]
data = {
// channelParticipationData: [
// {
// mediaType: '央级',
// value: 65.6,
// showValue: '65.6%',
// ptList: [ '人民网', '环球网' ].join('、')
// },
// {
// mediaType: '财经类',
// value: 65.6,
// showValue: '65.6%',
// ptList: [ '人民网', '环球网' ].join('、')
// },
// {
// mediaType: '娱乐类',
// value: 65.6,
// showValue: '65.6%',
// ptList: [ '人民网', '环球网' ].join('、')
// }
// ]
}
onLoad () {
console.log('channelParticipation')
// console.log('channelParticipation')
}
computed = {
channelParticipationData () {
let data = this.channelData
let central = data.centralMediaIn
let science = data.scienceMediaIn
let finance = data.financeMediaIn
return central && science && finance ? [ central, science, finance ].map((n, i) => {
return {
mediaType: [ '央级', '科技类', '财经类' ][i],
value: n.mediaIn,
showValue: `${Math.format.round(n.mediaIn, 1)}%`,
ptList: n.sources.join('、')
}
}) : []
}
}
}
</script>
......@@ -63,7 +84,7 @@ export default class channelParticipation extends wepy.component {
font-size: 32rpx;
.item{
display: flex;
align-items: center;
align-items: flex-start;
padding: 24rpx 24rpx 20rpx;
.left{
.name{}
......
......@@ -3,7 +3,7 @@
<view class="title">重要渠道参与</view>
<view class="content">
<view class="sum">共23家重要渠道参与34次</view>
<!-- <view class="sum">共{{ channelCount }}家重要渠道参与{{ count }}次</view> -->
<view class="list">
......@@ -17,7 +17,7 @@
<view class="right">
<view class="ptTime">
<view class="pt">
<view class="point"></view>{{ n.ptName }}
<view class="point" style="background-color: {{ ptColor[n.pt] }};"></view>{{ n.source }}
</view>
<view class="time">{{ n.time }}</view>
</view>
......@@ -37,31 +37,81 @@
<script>
import wepy from 'wepy'
import moment from 'moment'
import loadMore from '@/components/common/loadMore'
import { axiosFormat } from '@/request/request.js'
export default class importantChannel extends wepy.component {
components = {
loadMore
}
props = {
eventId: {
type: String,
default: ''
}
}
data = {
upperLimit: 3,
channelData: Array(15).fill(0).map((n, i) => {
upperLimit: 5,
channelCount: 23,
count: 34,
channelData: [],
ptColor: {
media: '#49619F',
weibo: '#FEC52D',
wechat: '#5DB85B'
}
// Array(15).fill(0).map((n, i) => {
// return {
// source: '新浪',
// time: '09-12 12:45',
// title: '马云回应“转移1200亿元资产到国外”:我们要学会在谣言的口水里游泳'
// }
// })
}
onLoad () {
// console.log('importantChannel')
}
getImportantChannelData () {
axiosFormat({
url: 'base/smallBrand/importLine.do',
params: {
eventId: this.eventId
}
}).then(res => {
// console.log(res)
if (res.data.state) {
let data = res.data.data
this.channelData = data.imports.map((n, i) => {
return {
ptName: '新浪',
time: '09-12 12:45',
title: '马云回应“转移1200亿元资产到国外”:我们要学会在谣言的口水里游泳'
source: n.source,
pt: n.pt,
time: moment(n.time).format('MM-DD HH:mm'),
title: n.text
}
})
}
this.$apply()
}).catch(err => {
console.log(err.message)
})
}
onLoad () {
console.log('importantChannel')
watch = {
eventId () {
if (this.eventId !== '') {
this.getImportantChannelData()
}
}
}
events = {
loadMoreClick () {
this.upperLimit += 3
this.upperLimit += 5
}
}
}
......@@ -75,9 +125,10 @@ export default class importantChannel extends wepy.component {
.sum{
line-height: 72rpx;
color: #ACADAF;
margin-bottom: -20rpx;
}
.list{
margin-bottom: 20rpx;
padding: 20rpx 0;
.item{
display: flex;
.left{
......@@ -133,7 +184,7 @@ export default class importantChannel extends wepy.component {
.left{
.line{
position: absolute;
height: 10rpx;
height: 12rpx;
width: 2rpx;
background-color: #49619F;
top: -10rpx;
......
......@@ -42,32 +42,66 @@
import wepy from 'wepy'
export default class influencePower extends wepy.component {
props = {
infData: {}
}
data = {
influencePowerData: {
// influencePowerData: {
// fullInf: {
// value: 12657,
// showValue: Math.format.thousandBitSymbol(12657)
// },
// contrast: [
// { name: '过去24小时上升', color: '#000000', showValue: 315 },
// { name: '对比同类事件', color: 24.6 >= 0 && Date.now() ? '#F56485' : '#5DB85B', showValue: '+24.6%' },
// { name: '对比全局事件', color: -13.7 >= 0 && Date.now() ? '#F56485' : '#5DB85B', showValue: '-13.7%' }
// ],
// channelInf: [
// { name: '网媒', value: 7787, showValue: Math.format.thousandBitSymbol(7787) },
// { name: '微博', value: 6908, showValue: Math.format.thousandBitSymbol(6908) },
// { name: '微信', value: 4342, showValue: Math.format.thousandBitSymbol(4342) }
// ]
// }
}
onLoad () {
// console.log('influencePower')
}
computed = {
influencePowerData () {
return this.infData && this.infData.inf ? {
fullInf: {
value: 12657,
showValue: Math.format.thousandBitSymbol(12657)
value: parseInt(this.infData.sumH),
showValue: Math.format.thousandBitSymbol(parseInt(this.infData.sumH))
},
contrast: [
{ name: '过去24小时上升', color: '#000000', showValue: 315 },
{ name: '对比同类事件', color: 24.6 >= 0 && Date.now() ? '#F56485' : '#5DB85B', showValue: '+24.6%' },
{ name: '对比全局事件', color: -13.7 >= 0 && Date.now() ? '#F56485' : '#5DB85B', showValue: '-13.7%' }
{ name: '过去24小时上升', color: '#000000', showValue: parseInt(this.infData.dayH) },
{
name: '对比同类事件',
color: this.infData.classDiffer >= 0 ? '#F56485' : '#5DB85B',
showValue: (this.infData.classDiffer >= 0 ? '+' : '') + `${this.infData.classDiffer}%`
},
{
name: '对比全局事件',
color: this.infData.allDiffer >= 0 ? '#F56485' : '#5DB85B',
showValue: (this.infData.allDiffer >= 0 ? '+' : '') + `${this.infData.allDiffer}%`
}
],
channelInf: [
{ name: '网媒', value: 7787, showValue: Math.format.thousandBitSymbol(7787) },
{ name: '微博', value: 6908, showValue: Math.format.thousandBitSymbol(6908) },
{ name: '微信', value: 4342, showValue: Math.format.thousandBitSymbol(4342) }
{ name: '网媒', value: parseInt(this.infData.bdH), showValue: Math.format.thousandBitSymbol(parseInt(this.infData.bdH)) },
{ name: '微博', value: parseInt(this.infData.wbH), showValue: Math.format.thousandBitSymbol(parseInt(this.infData.wbH)) },
{ name: '微信', value: parseInt(this.infData.wxH), showValue: Math.format.thousandBitSymbol(parseInt(this.infData.wxH)) }
]
} : {
fullInf: {},
contrast: [],
channelInf: []
}
}
onLoad () {
console.log('influencePower')
}
computed = {
},
channelInfSum () {
return Math.sum(...this.influencePowerData.channelInf.map(n => n.value))
return this.influencePowerData.channelInf.length && Math.sum(...this.influencePowerData.channelInf.map(n => n.value))
}
}
}
......
<template>
<view class="leaderWpy eventPageModule">
<view class="leaderWpy eventPageModule" wx:if="{{ leaderData.length }}">
<view class="title">意见领袖观点</view>
<view class="content">
......@@ -19,7 +19,7 @@
<view class="text mult-ellipsis">{{ n.text }}</view>
<view class="count">
<view class="participate">参与{{ n.participate }}次</view>
<view class="media">{{ n.media }}家报道</view>
<view class="time">{{ n.time }}</view>
</view>
</view>
</view>
......@@ -38,6 +38,7 @@
<script>
import wepy from 'wepy'
import moment from 'moment'
import loadMore from '@/components/common/loadMore'
export default class leader extends wepy.component {
......@@ -45,27 +46,49 @@ export default class leader extends wepy.component {
loadMore
}
data = {
upperLimit: 5,
leaderData: Array(15).fill(0).map((n, i) => {
return {
name: '裸泳浩',
fans: '123万',
avatar: '../static/img/avatar.png',
text: 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et.',
participate: 76,
media: 16
props = {
viewData: {}
}
})
data = {
upperLimit: 4
// leaderData: Array(8).fill(0).map((n, i) => {
// return {
// name: '裸泳浩',
// fans: '123万',
// avatar: '../static/img/avatar.png',
// text: 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et.',
// participate: 76,
// time: 16
// }
// })
}
onLoad () {
console.log('leader')
}
computed = {
leaderData () {
let data = []
for (let k in this.viewData) {
let n = this.viewData[k]
data.push({
name: k,
fans: n[0].fensi < 10000 ? n[0].fensi : Math.format.round(n[0].fensi / 10000, 1) + '万',
avatar: n[0].img_url,
text: n[0].text,
participate: n.length,
time: moment(n.time).format('MM-DD HH:mm')
})
}
return data
}
}
events = {
loadMoreClick () {
this.upperLimit += 5
this.upperLimit += 4
}
}
}
......@@ -114,7 +137,7 @@ export default class leader extends wepy.component {
align-items: center;
font-size: 28rpx;
.participate{}
.media{
.time{
color: #B0B0B0;
}
}
......
......@@ -10,7 +10,7 @@
<view class="item">
<view class="left">{{ i + 1 }}.</view>
<view class="right">
<view class="name">{{ n.name }}</view>
<view class="name mult-ellipsis">{{ n.name }}</view>
<view class="count">{{ n.count }}家报道</view>
</view>
</view>
......@@ -36,18 +36,36 @@ export default class mediaViews extends wepy.component {
loadMore
}
data = {
upperLimit: 5,
mediaViews: Array(15).fill(0).map((n, i) => {
return {
name: '马云回应“转移1200亿元资产到国外”:我们要学会在谣言的口水里游泳',
count: parseInt(Math.random() * 10) + 6
props = {
similarData: {
type: Array,
default: () => []
}
}
})
data = {
upperLimit: 5
// mediaViews: Array(15).fill(0).map((n, i) => {
// return {
// name: '马云回应“转移1200亿元资产到国外”:我们要学会在谣言的口水里游泳',
// count: parseInt(Math.random() * 10) + 6
// }
// })
}
onLoad () {
console.log('mediaViews')
// console.log('mediaViews')
}
computed = {
mediaViews () {
return this.similarData && this.similarData.length ? this.similarData.map((n, i) => {
return {
name: n.title,
count: n.num
}
}).slice(0, 10) : []
}
}
events = {
......
......@@ -30,18 +30,31 @@
import wepy from 'wepy'
export default class overview extends wepy.component {
data = {
props = {
overviewData: {
name: '事件名XXXXXXXXXX',
img: '../static/img/avatar.png',
tags: ['负面危机'],
time: '2018-09-23',
desc: Array(3).fill('Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. ').join('')
type: Object,
default: {
name: '',
img: '',
tags: [],
time: '',
desc: ''
}
}
}
data = {
// overviewData: {
// name: '事件名XXXXXXXXXX',
// img: '../static/img/avatar.png',
// tags: ['负面危机'],
// time: '2018-09-23',
// desc: ''
// }
}
onLoad () {
console.log('overview')
// console.log('overview')
}
}
</script>
......
......@@ -7,7 +7,7 @@
<repeat for="{{ similarEventsData }}" item="n" index="i" key="i">
<view class="item">
<view class="item" @tap="pageTo('/pages/eventDetail?eventId={{ n.eventId }}')">
<view class="name ellipsis">{{ i + 1 }}、{{ n.name }}</view>
<view class="value">
<view class="progressBar">
......@@ -31,20 +31,58 @@
import wepy from 'wepy'
export default class similarEvents extends wepy.component {
data = {
similarEventsData: Array(5).fill(0).map((n, i) => {
return {
name: 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt.',
isCurrent: i === 1,
value: 563123,
showValue: Math.format.thousandBitSymbol(563123),
percentage: parseInt(Math.random() * 50) + 50 + '%'
props = {
eventId: {
type: String,
default: ''
},
nearEventsData: {
type: Array,
default: () => []
}
})
}
data = {
// similarEventsData: Array(5).fill(0).map((n, i) => {
// return {
// name: 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt.',
// isCurrent: i === 1,
// value: 563123,
// showValue: Math.format.thousandBitSymbol(563123),
// percentage: parseInt(Math.random() * 50) + 50 + '%'
// }
// })
}
onLoad () {
console.log('similarEvents')
// console.log('similarEvents')
}
methods = {
pageTo (url) {
wepy.navigateTo({ url })
}
}
computed = {
similarEventsData () {
return this.nearEventsData && this.nearEventsData.length ? (() => {
let data = []
this.nearEventsData.forEach((n, i) => {
data.push({
name: n.name,
eventId: n.id,
isCurrent: n.id === this.eventId,
value: parseInt(n.sumH),
showValue: Math.format.thousandBitSymbol(parseInt(n.sumH)),
hValue: Math.round(n.wxH + n.wbH + n.bdH)
// percentage: Math.round(n.wxH + n.wbH + n.bdH) / Math.round(this.nearEventsData[0].wxH + this.nearEventsData[0].wbH + this.nearEventsData[0].bdH) * 80 + '%'
})
data[i].percentage = data[i].hValue / data[0].hValue * 80 + '%'
})
return data
})() : []
}
}
}
</script>
......
......@@ -3,7 +3,7 @@
<view class="title">趋势</view>
<view class="content">
<view class="top">
<view class="top" wx:if="{{ !isEnd }}">
<view>当前热度</view>
<view class="progressBar">
<view class="progress" style="width: {{ currentHeat }}%">
......@@ -41,35 +41,93 @@
<script>
import wepy from 'wepy'
import moment from 'moment'
import echart from '@/components/common/echart'
import { getOptions } from './trendOptions.js'
import { axiosFormat } from '@/request/request.js'
import { ago } from '@/static/js/ago_CN.js'
export default class trend extends wepy.component {
components = {
echart
}
props = {
eventId: {
type: String,
default: ''
}
}
data = {
currentHeat: 50,
isEnd: true,
currentHeat: 0,
minUnit: 'hour' || 'day',
ec: {
option: getOptions({})
},
trendData: [
{ name: '持续时长', value: '1天11小时' },
{ name: '过去24小时传播速度', value: '25条/小时' },
{ name: '峰值传播速度', value: '212条/小时' }
]
// { name: '持续时长', value: '1天11小时' },
// { name: '过去24小时传播速度', value: '25条/小时' },
// { name: '峰值传播速度', value: '212条/小时' }
],
timelineData: {
hour: [],
day: []
}
}
methods = {
unitChange (unit) {
this.minUnit = unit
this.ec.option = getOptions({
data: this.timelineData[this.minUnit]
})
this.$apply()
}
}
onLoad () {
console.log('trend')
// console.log('trend')
}
getTimeline () {
axiosFormat({
url: 'base/smallBrand/timeline.do',
params: {
eventId: this.eventId
}
}).then(res => {
// console.log(res)
if (res.data.state) {
let data = res.data.data
this.currentHeat = data.nearHotInf
this.isEnd = data.isEnd
this.trendData = [
{ name: '持续时长', value: ago(data.continuedTime) },
{ name: data.isEnd ? '事件平均传播速度' : '过去24小时平均传播速度', value: `${Math.round(data.isEnd ? data.avgVelAll : data.avgVel)}条/小时` },
{ name: '峰值传播速度', value: `${Math.sum(...data.timeLine.map(n => n.num))}条/小时` }
]
this.timelineData = {
hour: data.timeLine.map(n => [ moment(`${n.time}:00`).format('YY-DD HH'), n.num ]).slice(0, -1),
day: data.dayTimeLine.all.map(n => [ moment(`${n.time}`).format('YY/DD'), n.num ]).slice(0, -1)
}
this.ec.option = getOptions({
data: this.timelineData[this.minUnit]
})
}
this.$apply()
}).catch(err => {
console.log(err.message)
})
}
watch = {
eventId () {
if (this.eventId !== '') {
this.getTimeline()
}
}
}
}
</script>
......@@ -95,7 +153,7 @@ export default class trend extends wepy.component {
overflow: hidden;
image{
display: block;
width: calc((375rpx - 30rpx * 2 - 24rpx * 2) * 2);
width: calc(317rpx * 2);
height: 100%;
}
}
......
export const getOptions = (params) => {
// 默认数据,传入 data 时将覆盖此数据
params.data = params.data || Array(4).fill(0).map((n, i) => {
return [
'10/0' + (i + 1),
parseInt(Math.random() * 60)
]
})
params.data = params.data || []
// Array(4).fill(0).map((n, i) => {
// return [
// '10/0' + (i + 1),
// parseInt(Math.random() * 60)
// ]
// })
console.log('@/components/eventDetail/trendOptions.js 图表数据:', params.data)
......
......@@ -36,14 +36,21 @@
import wepy from 'wepy'
export default class classificationEvent extends wepy.component {
props = {
typeInfData: {
type: Array,
default: () => []
}
}
data = {
dataInfo: [
{ name: '行业竞品', eventOccupyingRatio: `${39}%`, meanOfInf: 1878, meanOfInfFormat: Math.format.thousandBitSymbol(1878) },
{ name: '战略合作', eventOccupyingRatio: `${18}%`, meanOfInf: 786, meanOfInfFormat: Math.format.thousandBitSymbol(786) },
{ name: '负面危机', eventOccupyingRatio: `${18}%`, meanOfInf: 245, meanOfInfFormat: Math.format.thousandBitSymbol(245) },
{ name: '公司形象', eventOccupyingRatio: `${9}%`, meanOfInf: 45, meanOfInfFormat: Math.format.thousandBitSymbol(45) },
{ name: '公开报道', eventOccupyingRatio: `${7}%`, meanOfInf: 34, meanOfInfFormat: Math.format.thousandBitSymbol(34) }
]
// dataInfo: [
// { name: '行业竞品', eventOccupyingRatio: `${39}%`, meanOfInf: 1878, meanOfInfFormat: Math.format.thousandBitSymbol(1878) },
// { name: '战略合作', eventOccupyingRatio: `${18}%`, meanOfInf: 786, meanOfInfFormat: Math.format.thousandBitSymbol(786) },
// { name: '负面危机', eventOccupyingRatio: `${18}%`, meanOfInf: 245, meanOfInfFormat: Math.format.thousandBitSymbol(245) },
// { name: '公司形象', eventOccupyingRatio: `${9}%`, meanOfInf: 45, meanOfInfFormat: Math.format.thousandBitSymbol(45) },
// { name: '公开报道', eventOccupyingRatio: `${7}%`, meanOfInf: 34, meanOfInfFormat: Math.format.thousandBitSymbol(34) }
// ]
}
onLoad () {
......@@ -53,8 +60,21 @@ export default class classificationEvent extends wepy.component {
methods = {}
computed = {
dataInfo () {
return this.typeInfData && this.typeInfData.length ? this.typeInfData.map((n, i) => {
return {
name: n.type,
eventOccupyingRatio: `${n.num}%`,
meanOfInf: n.inf,
meanOfInfFormat: Math.format.thousandBitSymbol(n.inf),
sort: n.num
}
}).sort((n, m) => m.sort - n.sort).slice(0, 5) : []
},
meanOfInfluenceSum () {
return Math.sum(...this.dataInfo.map(n => n.meanOfInf))
return this.dataInfo.length
? Math.sum(...this.dataInfo.map(n => n.meanOfInf))
: 0
}
}
}
......
......@@ -3,16 +3,16 @@
<view class="title">热度榜</view>
<view class="content">
<repeat for="{{ list }}" item="n" index="i" key="i">
<repeat for="{{ heatListData }}" item="n" index="i" key="i">
<view class="item">
<view class="item" @tap="pageTo('/pages/eventDetail?eventId={{ n.eventId }}')">
<view class="serial">{{ i + 1 }}.</view>
<view class="name mult-ellipsis">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</view>
<view class="name mult-ellipsis">{{ n.name }}</view>
<view class="icon">
<image src="../../static/img/i_arrow_{{ i % 2 ? 'up' : 'down' }}.png" />
<image src="../../static/img/i_arrow_{{ n.upDown }}.png" />
</view>
<view class="value {{ i % 2 ? 'up' : 'down' }}">
<view>{{ mockValue[i] }}%</view>
<view class="value {{ n.upDown }}">
<view>{{ n.subShow }}</view>
</view>
</view>
......@@ -26,20 +26,35 @@
import wepy from 'wepy'
export default class heatList extends wepy.component {
props = {
hotTopData: {}
}
data = {
list: [1, 2, 3, 4, 5],
mockValue: [
parseInt(Math.random() * 10000) / 10,
parseInt(Math.random() * 10000) / 10,
parseInt(Math.random() * 10000) / 10,
parseInt(Math.random() * 10000) / 10,
parseInt(Math.random() * 10000) / 10
]
}
onLoad () {
// console.log('heatList')
}
methods = {
pageTo (url) {
wepy.navigateTo({ url })
}
}
computed = {
heatListData () {
return this.hotTopData && this.hotTopData.eventsTop
? this.hotTopData.eventsTop.map((n, i) => {
return {
...n,
subShow: Math.abs(n.sub) + '%',
upDown: n.sub < 0 ? 'down' : 'up'
}
}) : []
}
}
}
</script>
......@@ -84,7 +99,7 @@ export default class heatList extends wepy.component {
text-align: right;
font-size: 32rpx;
view{
width: 120rpx;
min-width: 90rpx;
}
&.up{ color: #F56386; }
&.down{ color: #5CB85C; }
......
......@@ -21,26 +21,21 @@
<script>
import wepy from 'wepy'
import echart from '@/components/common/echart'
import echarts from '@/static/plugs/ec-canvas/echarts.js'
import { getOptions } from './monthlyEventOptions.js'
export default class monthlyEvent extends wepy.component {
config = {
// usingComponents: {
// component: true,
// ecCanvas: '../../static/plugs/ec-canvas/ec-canvas'
// }
}
components = {
echart
}
props = {
monthlyEventData: {}
}
data = {
ec: {
option: getOptions({})
},
myChart: null
}
}
onLoad () {
......@@ -52,9 +47,6 @@ export default class monthlyEvent extends wepy.component {
// this.echartRefresh = false
// this.echartRefresh = true
// }, 2000)
// setTimeout(() => {
// this.ec.option = getOptions({})
// }, 1000)
}
methods = {
......@@ -63,15 +55,28 @@ export default class monthlyEvent extends wepy.component {
}
}
initChart (canvas, width, height) {
this.myChart = echarts.init(canvas, null, { width, height })
canvas.setChart(this.myChart)
this.drawChart()
watch = {
monthlyEventData () {
let infData = this.monthlyEventData.monthInfTimeLine
let numData = this.monthlyEventData.monthNumTimeLine
if (infData && numData) {
// 默认取最近 6 个月,当返回数据少于 6 个月时,按最少的月数为准
let length = Math.min(...[6, infData.length - 2, numData.length - 2])
this.ec.option = getOptions({
data: {
evts: {
name: '事件数',
data: numData.map((n, i) => [n.time, n.num]).slice(-length - 2, -2)
},
infs: {
name: '影响力均值',
data: infData.map((n, i) => [n.time, n.avg]).slice(-length - 2, -2)
}
}
})
}
this.$apply()
}
drawChart () {
const option = getOptions({})
this.myChart.setOption(option)
}
}
</script>
......@@ -98,8 +103,8 @@ export default class monthlyEvent extends wepy.component {
border-radius: 50%;
margin-right: 6rpx;
}
&.evts .i{ background-color: #F56586 }
&.infs .i{ background-color: #49619F }
&.evts .i{ background-color: #49619F }
&.infs .i{ background-color: #F56586 }
}
}
.myChart{
......
......@@ -3,18 +3,20 @@ export const getOptions = (params) => {
params.data = params.data || {
evts: {
name: '事件数',
data: Array(4).fill(0).map((n, i) => ['10-1' + i, parseInt(Math.random() * 40) + 20])
data: []
// data: Array(4).fill(0).map((n, i) => ['10-1' + i, parseInt(Math.random() * 40) + 20])
},
infs: {
name: '影响力均值',
data: Array(4).fill(0).map((n, i) => ['10-1' + i, parseInt(Math.random() * 4000) + 2000])
data: []
// data: Array(4).fill(0).map((n, i) => ['10-1' + i, parseInt(Math.random() * 4000) + 2000])
}
}
console.log('@/components/home/monthlyEventOption.js 图表数据:', params.data)
let option = {
color: ['#F56586', '#49619F'],
color: ['#49619F', '#F56586'],
grid: {
width: '100%',
top: '10rpx',
......@@ -56,8 +58,8 @@ export const getOptions = (params) => {
lineStyle: {
color: '#EDEDED'
}
},
splitNumber: 3
}
// splitNumber: 3
}
],
series: [
......
......@@ -19,11 +19,15 @@
import wepy from 'wepy'
export default class monthlyIncrease extends wepy.component {
props = {
overviewData: {}
}
data = {
dataInfo: [
{ name: '上月新增事件', value: Math.format.thousandBitSymbol(87) },
{ name: '本月新增事件', value: Math.format.thousandBitSymbol(56) }
]
// dataInfo: [
// { name: '上月新增事件', value: Math.format.thousandBitSymbol(87) },
// { name: '本月新增事件', value: Math.format.thousandBitSymbol(56) }
// ]
}
onLoad () {
......@@ -32,7 +36,18 @@ export default class monthlyIncrease extends wepy.component {
methods = {
showAllEvents () {
console.log('showAllEvents')
wepy.navigateTo({
url: '/pages/searchList'
})
}
}
computed = {
dataInfo () {
return this.overviewData.eventCount !== undefined ? [
{ name: '上月新增事件', value: Math.format.thousandBitSymbol(this.overviewData.lastMonthEvents) },
{ name: '本月新增事件', value: Math.format.thousandBitSymbol(this.overviewData.nowMonthEvents) }
] : []
}
}
}
......
......@@ -4,7 +4,7 @@
<view class="content">
<view class="top">
<view class="value">78</view>
<view class="value">{{ overviewData.eventCount }}</view>
<view>事件总数</view>
</view>
......@@ -25,16 +25,33 @@
<script>
import wepy from 'wepy'
import { ago } from '@/static/js/ago_CN.js'
export default class overview extends wepy.component {
props = {
overviewData: {}
}
data = {
dataInfo: [
{ name: '影响力均值', value: Math.format.thousandBitSymbol(6789) },
{ name: '峰值平均传播速度', value: '12条/小时' },
{ name: '达到峰值平均用时', value: '22.5小时' }
]
// dataInfo: [
// { name: '影响力均值', value: Math.format.thousandBitSymbol(6789) },
// { name: '峰值平均传播速度', value: '12条/小时' },
// { name: '达到峰值平均用时', value: '22.5小时' }
// ]
}
onLoad () {
}
computed = {
dataInfo () {
return this.overviewData.eventCount !== undefined ? [
{ name: '影响力均值', value: Math.format.thousandBitSymbol(parseInt(this.overviewData.avgSumH)) },
{ name: '峰值平均传播速度', value: `${this.overviewData.avgMaxSpeed}条/小时` },
{ name: '达到峰值平均用时', value: `${ago(this.overviewData.avgMaxTime)}` }
] : []
}
}
}
</script>
......
......@@ -29,20 +29,39 @@
<script>
import wepy from 'wepy'
import { ago } from '@/static/js/ago_CN.js'
export default class propagationCycle extends wepy.component {
props = {
cycleData: {}
}
data = {
dataInfo: [
{ name: '上升期', color: '#49619F', eachHour: `${234}条/小时`, duration: '20小时', percentage: `${80}%` },
{ name: '热议期', color: '#5978BB', eachHour: `${12}条/小时`, duration: '20小时', percentage: `${40}%` },
{ name: '衰减期', color: '#6A8FD3', eachHour: `${213}条/小时`, duration: '20小时', percentage: `${20}%` },
{ name: '长尾期', color: '#7AAAEC', eachHour: `${12}条/小时`, duration: '3天12小时', percentage: `${20}%` }
]
// dataInfo: [
// { name: '上升期', color: '#49619F', eachHour: `${234}条/小时`, duration: '20小时', percentage: `${80}%` },
// { name: '热议期', color: '#5978BB', eachHour: `${12}条/小时`, duration: '20小时', percentage: `${40}%` },
// { name: '衰减期', color: '#6A8FD3', eachHour: `${213}条/小时`, duration: '20小时', percentage: `${20}%` },
// { name: '长尾期', color: '#7AAAEC', eachHour: `${12}条/小时`, duration: '3天12小时', percentage: `${20}%` }
// ]
}
onLoad () {
// console.log('propagationCycle')
}
computed = {
dataInfo () {
return this.cycleData && this.cycleData.cycle ? this.cycleData.cycle.map((n, i) => {
return {
name: ['上升期', '热议期', '衰减期', '长尾期'][i],
color: ['#49619F', '#5978BB', '#6A8FD3', '#7AAAEC'][i],
eachHour: `${n.avgSpeed}条/小时`,
duration: ago(n.avgTime),
percentage: `${n.pTime}%`
}
}) : []
}
}
}
</script>
......
<template>
<view class="eventCardWpy">
<view class="eventCardWpy" @tap="pageTo('/pages/eventDetail?eventId={{ eventData.eventId }}')">
<view class="left">{{ eventData.index + 1 }}.</view>
......@@ -34,6 +34,12 @@ export default class eventCard extends wepy.component {
onLoad () {
console.log(this.eventData)
}
methods = {
pageTo (url) {
wepy.navigateTo({ url })
}
}
}
</script>
......
......@@ -5,28 +5,31 @@
<riskHints class="item" wx:if="{{ false }}" />
<!-- 概览 -->
<overview class="item" />
<overview class="item" :overviewData.sync="overviewData" />
<!-- 影响力 -->
<influencePower class="item" />
<influencePower class="item" :infData.sync="infData" />
<!-- 渠道参与情况 -->
<channelParticipation class="item" />
<channelParticipation class="item" :channelData.sync="channelData" />
<!-- 趋势 -->
<trend class="item" />
<trend class="item" :eventId.sync="eventId" />
<!-- 传播周期 -->
<propagationCycle class="item" :cycleData.sync="cycleData" wx:if="{{ isEnd }}" />
<!-- 重要渠道参与 -->
<importantChannel class="item" />
<importantChannel class="item" :eventId.sync="eventId" />
<!-- 媒体观点 -->
<mediaViews class="item" />
<mediaViews class="item" :similarData.sync="similarData" />
<!-- 意见领袖观点 -->
<leader class="item" />
<leader class="item" :viewData.sync="viewData" />
<!-- 同类事件对比 -->
<similarEvents class="item" />
<similarEvents class="item" :nearEventsData.sync="nearEventsData" :eventId.sync="eventId" />
</view>
</template>
......@@ -38,14 +41,16 @@ import overview from '@/components/eventDetail/overview' // 概览
import influencePower from '@/components/eventDetail/influencePower' // 影响力
import channelParticipation from '@/components/eventDetail/channelParticipation' // 渠道参与情况
import trend from '@/components/eventDetail/trend' // 趋势
import propagationCycle from '@/components/home/propagationCycle' // 传播周期
import importantChannel from '@/components/eventDetail/importantChannel' // 重要渠道参与
import mediaViews from '@/components/eventDetail/mediaViews' // 媒体观点
import leader from '@/components/eventDetail/leader' // 意见领袖观点
import similarEvents from '@/components/eventDetail/similarEvents' // 同类事件对比
import { axiosFormat } from '@/request/request.js'
export default class eventDetail extends wepy.page {
config = {
navigationBarTitleText: '事件名XXXXXXXXXX'
navigationBarTitleText: ''
}
components = {
......@@ -54,14 +59,85 @@ export default class eventDetail extends wepy.page {
influencePower,
channelParticipation,
trend,
propagationCycle,
importantChannel,
mediaViews,
leader,
similarEvents
}
onLoad () {
console.log('eventDetail')
data = {
isEnd: true,
eventId: '',
overviewData: {},
infData: {},
channelData: {},
cycleData: {},
similarData: [],
viewData: {},
nearEventsData: []
}
onLoad (options) {
// console.log('eventDetail')
this.eventId = options.eventId
this.getOverviewData()
this.getMediaViewsData()
}
getOverviewData () {
axiosFormat({
url: 'base/smallBrand/overview.do',
params: {
eventId: this.eventId
}
}).then(res => {
console.log(res)
if (res.data.state) {
let data = res.data.data
wepy.setNavigationBarTitle({
title: data.name
})
this.isEnd = data.isEnd
this.overviewData = {
name: data.name,
img: `https://ef.zhiweidata.com/img/event.do?name=${data.imgUrl}`,
tags: [ data.type ],
time: data.startDay,
desc: data.descript
}
this.infData = data.inf
this.channelData = {
centralMediaIn: data.centralMediaIn,
scienceMediaIn: data.scienceMediaIn,
financeMediaIn: data.financeMediaIn
}
this.cycleData = data.cycle
this.nearEventsData = data.nearEvents
}
this.$apply()
}).catch(err => {
console.log(err.message)
})
}
getMediaViewsData () {
axiosFormat({
url: 'base/smallBrand/mediaView.do',
params: {
eventId: this.eventId
}
}).then(res => {
// console.log(res)
if (res.data.state) {
let data = res.data.data
this.similarData = data.similar
this.viewData = data.view
}
this.$apply()
}).catch(err => {
console.log(err.message)
})
}
}
</script>
......
......@@ -8,22 +8,22 @@
<searchInput class="item" :searchWord.sync="searchWord" />
<!-- 热度榜 -->
<heatList class="item" />
<heatList class="item" :hotTopData.sync="hotTopData" />
<!-- 概览 -->
<overview class="item" />
<overview class="item" :overviewData.sync="overviewData" />
<!-- 月增 -->
<monthlyIncrease class="item" />
<monthlyIncrease class="item" :overviewData.sync="overviewData" />
<!-- 月度事件 -->
<monthlyEvent class="item" />
<monthlyEvent class="item" :monthlyEventData.sync="monthlyEventData" />
<!-- 传播周期 -->
<propagationCycle class="item" />
<propagationCycle class="item" :cycleData.sync="cycleData" />
<!-- 分类事件 -->
<classificationEvent class="item" />
<classificationEvent class="item" :typeInfData.sync="typeInfData" />
</view>
......@@ -40,6 +40,7 @@ import monthlyIncrease from '@/components/home/monthlyIncrease' // 月增
import monthlyEvent from '@/components/home/monthlyEvent' // 月度事件
import propagationCycle from '@/components/home/propagationCycle' // 传播周期
import classificationEvent from '@/components/home/classificationEvent' // 分类事件
import { axiosFormat } from '@/request/request.js'
export default class home extends wepy.page {
components = {
......@@ -54,11 +55,39 @@ export default class home extends wepy.page {
}
data = {
searchWord: ''
searchWord: '',
hotTopData: {},
overviewData: {},
monthlyEventData: {},
cycleData: {},
typeInfData: []
}
onLoad () {
// console.log('home')
this.getData()
}
getData () {
axiosFormat({
url: 'base/smallBrand/index.do'
}).then(res => {
// console.log(res)
if (res.data.state) {
let data = res.data.data
this.hotTopData = data.hotTop
this.overviewData = data.overview
this.monthlyEventData = {
monthInfTimeLine: data.monthInfTimeLine,
monthNumTimeLine: data.monthNumTimeLine
}
this.cycleData = data.cycle
this.typeInfData = data.typeInf
this.$apply()
}
}).catch(err => {
console.log(err.message)
})
}
events = {
......
......@@ -26,7 +26,7 @@
</view>
<!-- popup -->
<alert :alertData.sync="alertData" />
<alert :alertData.sync="alertData" wx:if="{{ alertData.show }}" />
</view>
</template>
......@@ -35,6 +35,7 @@
import wepy from 'wepy'
import bind2Way from '@/mixins/bind2Way.js'
import alert from '@/components/common/alert'
import { axiosFormat } from '@/request/request.js'
export default class login extends wepy.page {
components = {
......@@ -48,38 +49,169 @@ export default class login extends wepy.page {
username: '',
password: ''
},
alertData: {}
alertData: {},
autoLogin: true
}
onLoad () {
// console.log('login')
this.loginBrandSmall()
}
methods = {
// 绑定按钮
bindZhiWei () {
if (this.sendData.username === '' || this.sendData.password === '') {
this.alertData = {
show: true,
type: 'warn',
text: [ '有未填写项' ],
duration: 4,
callback: () => {}
}
} else {
this.zhiweiBind()
}
}
}
// 获取 code
getCode () {
return new Promise((resolve, reject) => {
wepy.login({
timeout: 1000 * 10,
success: (res) => {
// console.log(res)
resolve(res.code)
},
fail: (res) => {
this.alertData = {
show: true,
type: 'warn',
text: [ res.errMsg ],
duration: 4,
callback: () => {}
}
this.$apply()
},
complete: (res) => {
this.$apply()
}
})
})
}
// 绑定接口
async zhiweiBind () {
this.autoLogin = false
axiosFormat({
url: 'base/bindingBrandSmall.do',
method: 'POST',
data: {
username: this.sendData.username,
password: this.sendData.password,
code: await this.getCode()
}
}).then(res => {
console.log(res)
if (res.data.state) {
let data = res.data.data
console.log('bindingBrandSmall: ', data)
this.alertData = {
show: true,
type: 'success',
text: [
'绑定成功'
],
text: [ res.data.message ],
duration: 2,
callback: () => {
// console.log('页面跳转到首页')
// wepy.redirectTo({
// url: `/pages/home`
// })
this.loginBrandSmall()
}
}
} else {
this.alertData = {
show: true,
type: 'warn',
text: [ res.data.message ],
duration: 4,
callback () {
console.log('弹窗关闭了')
callback: () => {}
}
}
this.$apply()
}).catch(err => {
this.alertData = {
show: true,
type: 'warn',
text: [ err.message ],
duration: 4,
callback: () => {}
}
this.$apply()
})
}
// 登录接口
async loginBrandSmall () {
axiosFormat({
url: 'base/loginBrandSmall.do',
method: 'POST',
data: {
code: await this.getCode()
}
}).then(res => {
console.log(res)
if (res.data.state) {
let data = res.data.data
console.log('loginBrandSmall: ', data)
if (!this.autoLogin) {
this.alertData = {
show: true,
type: 'success',
text: [ res.data.message ],
duration: 2,
callback: () => {
// console.log('页面跳转到首页')
wepy.setStorageSync('JSESSIONID', data.JSESSIONID)
wepy.redirectTo({
url: `/pages/home`
})
}
}
} else {
wepy.setStorageSync('JSESSIONID', data.JSESSIONID)
wepy.redirectTo({
url: `/pages/home`
})
}
} else {
if (!this.autoLogin) {
this.alertData = {
show: true,
type: 'warn',
text: [ res.data.message ],
duration: 4,
callback: () => {}
}
}
}
this.$apply()
}).catch(err => {
if (!this.autoLogin) {
this.alertData = {
show: true,
type: 'warn',
text: [ err.message ],
duration: 4,
callback: () => {}
}
// this.alertData = {
// show: true,
// type: 'warn',
// text: [
// '该帐号已绑定微信号"abc"',
// '请联系项目管理员解绑后再绑定'
// ],
// duration: 4
// }
}
this.$apply()
})
}
// 获取用户信息 (登录/授权)
getUserInfo (e) {
this.$parent.globalData.userInfo = e.detail.userInfo
}
......
......@@ -52,7 +52,7 @@
</view>
<loadMore class="loadMoreBtn" />
<loadMore class="loadMoreBtn" wx:if="{{ haveNext }}" />
</view>
......@@ -66,6 +66,7 @@ import loadMore from '@/components/common/loadMore'
import homeHeader from '@/components/common/homeHeader' // header头
import searchInput from '@/components/common/searchInput' // 搜索框
import eventCard from '@/components/searchList/eventCard' // 事件卡片
import { axiosFormat } from '@/request/request.js'
export default class searchList extends wepy.page {
components = {
......@@ -79,39 +80,118 @@ export default class searchList extends wepy.page {
searchWord: '',
isSearchPage: false,
sort: 'time',
page: 0,
haveNext: true,
tab: [
{ name: '全部', selected: true },
{ name: '分类1', selected: false },
{ name: '分类2', selected: false },
{ name: '分类3', selected: false },
{ name: '分类4', selected: false },
{ name: '分类5', selected: false }
// { name: '全部', selected: true },
// { name: '分类1', selected: false },
// { name: '分类2', selected: false },
// { name: '分类3', selected: false },
// { name: '分类4', selected: false },
// { name: '分类5', selected: false }
],
eventList: Array(10).fill(0).map((n, i) => {
return {
index: i,
name: 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim ve'
.slice(0, parseInt(Math.random() * 80) + 40) + '.',
inf: Math.format.thousandBitSymbol(1234),
time: moment(Date.now()).format('YYYY-MM-DD'),
img: '../../static/img/avatar.png'
}
})
eventList: []
// Array(10).fill(0).map((n, i) => {
// return {
// index: i,
// name: 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim ve'
// .slice(0, parseInt(Math.random() * 80) + 40) + '.',
// inf: Math.format.thousandBitSymbol(1234),
// time: moment(Date.now()).format('YYYY-MM-DD'),
// img: '../../static/img/avatar.png'
// }
// })
}
onLoad (options) {
this.searchWord = options.wd
this.initData()
}
methods = {
// 排序条件改变
sortChange (sort) {
this.sort = sort
this.getPageData()
},
// tab切换
classifChange (name) {
this.tab.forEach(n => { n.selected = n.name === name })
this.getPageData()
}
}
async initData () {
await this.getTypeData()
await this.getPageData()
}
getTypeData () {
return new Promise((resolve, reject) => {
axiosFormat({
url: 'base/smallBrand/screen.do'
}).then(res => {
// console.log(res)
if (res.data.state) {
let data = res.data.data
for (let k in data.typeData) {
this.tab.push({
name: data.typeData[k].name,
selected: false
})
}
this.tab[0] && (this.tab[0].selected = true)
}
this.$apply()
resolve(true)
}).catch(err => {
console.log(err.message)
})
})
}
getPageData (isAppend = false) {
return new Promise((resolve, reject) => {
this.page = isAppend ? this.page + 1 : 1
console.log(this.tab.filter(n => n.selected)[0].name)
axiosFormat({
url: 'base/smallBrand/search.do',
params: {
name: this.searchWord, // 搜索关键词
firstType: this.tab.filter(n => n.selected)[0].name, // 类别:"全部"或null,为全部事件
sort: '', // 排序方式:"asc"升序,"desc"降序 为空时默认降序
sortField: this.sort, // 排序字段: duration maxSpeed inf 默认不传或其他 开始时间
page: this.page, // 页码 为空时默认一页
start: '', // 开始时间戳 可为空
end: '' // 结束时间戳 可为空
}
}).then(res => {
// console.log(res)
if (res.data.state) {
let data = res.data.data
let newPageData = data.events.map((n, i) => {
return {
index: (this.page - 1) * 10 + i,
name: n.name,
eventId: n.id,
inf: Math.format.thousandBitSymbol(parseInt(n.sumH)),
time: moment(n.startTime).format('YYYY-MM-DD'),
img: `http://ef.zhiweidata.com/img/event.do?name=${n.img}`
}
})
if (isAppend) {
this.eventList = this.eventList.concat(...newPageData)
} else {
this.eventList = newPageData
}
this.haveNext = !!data.haveNext
}
this.$apply()
resolve(true)
}).catch(err => {
console.log(err.message)
})
})
}
computed = {
......@@ -122,10 +202,16 @@ export default class searchList extends wepy.page {
events = {
toSearch () {
console.log(this.searchWord)
// console.log(this.searchWord)
this.getPageData()
},
toReset () {
// console.log(this.searchWord)
this.getPageData()
},
loadMoreClick () {
console.log('加载更多')
// console.log('加载更多')
this.getPageData(true)
}
}
}
......@@ -139,7 +225,7 @@ export default class searchList extends wepy.page {
margin-top: 26rpx;
border: 1px solid #EAEAEA;
border-radius: 6rpx;
font-size: 36rpx;
font-size: 32rpx;
.top{
display: flex;
justify-content: space-between;
......@@ -161,7 +247,7 @@ export default class searchList extends wepy.page {
width: 28rpx;
height: 47rpx;
transform-origin: left center;
transform: scale(.9);
transform: scale(.8);
}
&.active{
color: #4B60A1;
......@@ -175,7 +261,7 @@ export default class searchList extends wepy.page {
display: flex;
overflow-x: scroll;
overflow-y: hidden;
padding-bottom: 14rpx;
padding-bottom: 16rpx;
position: relative;
box-shadow: 0 -4rpx 0 #ccc inset;
.classif{
......@@ -183,10 +269,10 @@ export default class searchList extends wepy.page {
white-space: nowrap;
transition: all .2s ease;
position: relative;
padding: 0 10rpx;
&:not(:first-child){
margin-left: 80rpx;
}
padding: 0 40rpx;
// &:not(:first-child){
// margin-left: 80rpx;
// }
.underline{
width: 100%;
// height: 4rpx; // 这里高度本来应该是 4rpx,但是在手机上显示只有一半的效果
......
import axios from 'axios'
import wepyAxiosAdapter from 'wepy-plugin-axios/dist/adapter'
// adapter 的初始化一定要在任何其它的 axios.create 之前执行
const adapter = wepyAxiosAdapter(axios)
export default axios.create({
adapter: adapter, // 此属性为可以在小程序中使用 axios 的关键
withCredentials: true
})
import wepy from 'wepy'
import axios from '@/request/axios.js'
// 替换规则
export let reUrl = {
'^base/': 'https://ef.zhiweidata.com/' // 默认地址
}
// url替换
export const replaceUrl = (url) => {
for (let r in reUrl) {
let reg = new RegExp(r)
if (reg.test(url)) return url.replace(reg, reUrl[r])
}
return url
}
// axios 请求格式化
export const axiosFormat = (options) => {
let JSESSIONID = wepy.getStorageSync('JSESSIONID')
return axios({
method: 'GET', // 方法需要大写,可支持的方法以微信小程序官方文档为准
...options, // 自定义参数覆盖上面默认
url: replaceUrl(options.url), // url 替换处理
headers: {
token: JSESSIONID,
...options.header
}
})
}
import moment from 'moment'
export const ago = function (start, end) {
let duration = end === undefined ? parseInt(start) : parseInt(end) - parseInt(start)
let timeList = [
[moment.duration(duration).years(), '年'],
[moment.duration(duration).months(), '个月'],
[moment.duration(duration).days(), '天'],
[moment.duration(duration).hours(), '小时']
// [moment.duration(duration).minutes(), '分钟'],
// [moment.duration(duration).seconds(), '秒']
]
return timeList.map(n => n[0] ? n.join('') : '').join('')
}
......@@ -41,6 +41,7 @@ module.exports = {
}
},
plugins: {
axios: {}
},
appConfig: {
noPromiseAPI: ['createSelectorQuery']
......@@ -69,6 +70,7 @@ if (prod) {
quality: 80
}
}
}
},
axios: {}
}
}
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