Commit 8c0359f5 by 李嘉林

Merge branch 'nativehome_tst' of http://code.mayi888.com/chengmo/mayi-mp-shop into nativehome_tst

parents 00363e8e 703ac7b3
...@@ -52,7 +52,7 @@ module.exports = { ...@@ -52,7 +52,7 @@ module.exports = {
fileExt: fileExt fileExt: fileExt
}, },
dev: { dev: {
env: require('./dev.env'), env: process.env.NODE_ENV=='production'?require('./prod.env'): require('./dev.env'),
port: 8080, port: 8080,
// 在小程序开发者工具中不需要自动打开浏览器 // 在小程序开发者工具中不需要自动打开浏览器
autoOpenBrowser: false, autoOpenBrowser: false,
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
"private": true, "private": true,
"scripts": { "scripts": {
"dev:wx": "cross-env NODE_ENV=development node build/dev-server.js wx", "dev:wx": "cross-env NODE_ENV=development node build/dev-server.js wx",
"pro": "cross-env NODE_ENV=production node build/dev-server.js wx",
"start:wx": "npm run dev:wx", "start:wx": "npm run dev:wx",
"build:wx": "cross-env NODE_ENV=production node build/build.js wx", "build:wx": "cross-env NODE_ENV=production node build/build.js wx",
"test:wx": "cross-env NODE_ENV=development node build/build.js wx", "test:wx": "cross-env NODE_ENV=development node build/build.js wx",
......
...@@ -10,14 +10,11 @@ export default { ...@@ -10,14 +10,11 @@ export default {
// NODE_ENV // NODE_ENV
let extConfig = wx.getExtConfigSync ? wx.getExtConfigSync() : {}; let extConfig = wx.getExtConfigSync ? wx.getExtConfigSync() : {};
console.log(extConfig, "-----------extConfig"); console.log(extConfig, "-----------extConfig");
if ( if (JSON.stringify(extConfig) == "{}") {
process.env.NODE_ENV == "production" || extConfig = process.env.NODE_ENV == "development" ? { mixid: "antgood", shopid: 67}:{ mixid: "xyyx",shopid:133 };
JSON.stringify(extConfig) == "{}"
) {
extConfig = { mixid: "antgood", shopid: 67 };
// extConfig = { "mixid":"xyyx",
// "shopid":133 };
} }
console.log("1444444444", extConfig); console.log("1444444444", extConfig);
this.$store.commit("setExtConfig", extConfig.mixid); this.$store.commit("setExtConfig", extConfig.mixid);
this.$store.commit('setExtConfigInfo',extConfig) this.$store.commit('setExtConfigInfo',extConfig)
......
...@@ -18,7 +18,7 @@ Component({ ...@@ -18,7 +18,7 @@ Component({
message: "Hello World", message: "Hello World",
indicatorDots: false, indicatorDots: false,
vertical: false, vertical: false,
autoplay: false, autoplay: true,
interval: 2000, interval: 2000,
duration: 500, duration: 500,
activeIndex: 0, activeIndex: 0,
...@@ -30,7 +30,6 @@ Component({ ...@@ -30,7 +30,6 @@ Component({
console.log("hello world! I am learning 微信小程序"); console.log("hello world! I am learning 微信小程序");
}, },
bannerChange(val) { bannerChange(val) {
console.log(val, "--------30");
this.setData({ activeIndex: val.detail.current }); this.setData({ activeIndex: val.detail.current });
}, },
onClick(data) { onClick(data) {
......
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