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