Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
duiba-h5-frame
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
江思志
duiba-h5-frame
Commits
4d291e8e
Commit
4d291e8e
authored
Mar 19, 2019
by
jsz315
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
h5
parent
d3e7af8b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
49 additions
and
9 deletions
+49
-9
utils.js
build/utils.js
+2
-0
webpack.dev.conf.js
build/webpack.dev.conf.js
+34
-3
entry.js
src/pages/kejiji/webview/content/entry.js
+1
-1
home.vue
src/pages/kejiji/webview/content/page/home.vue
+12
-5
No files found.
build/utils.js
View file @
4d291e8e
...
...
@@ -110,6 +110,8 @@ exports.computeEntry = function(entry) {
result
[
pathBuild
+
name
]
=
[
entryJsPath
];
}
// result["vendor"] = ['vue', 'vue-router', 'axios'];
console
.
log
(
result
);
return
result
;
};
...
...
build/webpack.dev.conf.js
View file @
4d291e8e
...
...
@@ -8,7 +8,7 @@ const merge = require("webpack-merge");
const
webpack
=
require
(
"webpack"
);
const
path
=
require
(
"path"
);
const
FriendlyErrorsPlugin
=
require
(
"friendly-errors-webpack-plugin"
);
const
UglifyJsPlugin
=
require
(
'uglifyjs-webpack-plugin'
);
const
baseWebpackConfig
=
require
(
"./webpack.base.conf"
);
const
utils
=
require
(
"./utils"
);
const
config
=
require
(
"../config"
);
...
...
@@ -41,7 +41,38 @@ const devWebpackConfig = merge(baseWebpackConfig, {
})
},
devtool
:
config
.
build
.
devtool
,
optimization
:
{
// minimize: false,
minimizer
:
[
new
UglifyJsPlugin
({
uglifyOptions
:
config
.
build
.
uglifyConfig
})
],
// 分割代码块
splitChunks
:
{
chunks
:
'async'
,
minSize
:
30000
,
minChunks
:
1
,
maxAsyncRequests
:
5
,
maxInitialRequests
:
3
,
name
:
true
,
cacheGroups
:
{
// common: {
// name: "common",
// chunks: "all",
// // minSize: 1,
// priority: 0
// },
// vendor: {
// name: "vendor",
// test: /[\\/]node_modules[\\/]/,
// chunks: "all",
// priority: 10
// }
}
}
// runtimeChunk: true
},
plugins
:
[
new
webpack
.
DefinePlugin
({
HTTP
:
http
.
dev
.
HTTP
,
...
...
@@ -58,7 +89,7 @@ const devWebpackConfig = merge(baseWebpackConfig, {
// should the console be cleared between each compilation?
// default is true
clearConsole
:
true
})
})
,
// new webpack.ProvidePlugin({
// _: "underscore"
// })
...
...
src/pages/kejiji/webview/content/entry.js
View file @
4d291e8e
...
...
@@ -3,7 +3,7 @@
* @author : Dec-F
* @Date : 2018-08-17 14:16:56
* @Last Modified by: 江思志
* @Last Modified time: 2019-03-1
3 10:49
:01
* @Last Modified time: 2019-03-1
9 17:03
:01
*/
import
Vue
from
'vue'
;
...
...
src/pages/kejiji/webview/content/page/home.vue
View file @
4d291e8e
...
...
@@ -201,17 +201,24 @@ export default {
});
}
},
goActivitySetting
(
item
)
{
let
id
=
item
.
id
;
let
obj
=
JSON
.
parse
(
item
.
text
);
async
goActivitySetting
(
item
)
{
let
obj
=
JSON
.
parse
(
item
.
text
);
let
params
=
{
contentId
:
item
.
id
};
let
res
=
await
get
(
API
.
getScId
,
params
);
if
(
res
.
success
)
{
let
id
=
res
.
data
;
let
url
=
formatUrl
(
'/pages/activity/link/main'
,
{
scid
:
id
,
img
:
obj
.
previewImageUrl
,
url
:
obj
.
activity_url
});
wx
.
miniProgram
.
navigateTo
({
url
:
url
});
url
:
url
});
}
},
goArticlList
()
{
let
url
=
'/pages/content/articleList/main'
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment