Commit a875c80b authored by wangwei's avatar wangwei

打包

parent 45495184
......@@ -7,6 +7,6 @@ module.exports = merge(prodEnv, {
API_URL: '"/"',
MAX_FILESIZE:'1024*1024*10',
IMAGE_URL_HEAD:'"http://cdn.singsingenglish.com/"',
AUTHOR_UEL:'"https://wechat_test.changchangenglish.com/api/client/login"',
AUTHOR_UEL:'"http://wechat.test.singsingenglish.com/api/client/login?redirect_url=http://10.1.21.181:8085"',
REDIRECT_URL:'"http://localhost:8085/"',
});
......@@ -18,7 +18,7 @@ module.exports = {
}
},
// Various Dev Server settings
host: 'localhost', // can be overwritten by process.env.HOST
host: '10.1.21.181', // can be overwritten by process.env.HOST
port: 8085, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser: false,
errorOverlay: true,
......
......@@ -4,5 +4,5 @@ module.exports = {
IMAGE_URL_HEAD:'"http://cdn.singsingenglish.com/"',
API_URL: '"/"',
MAX_FILESIZE:'1024*1024*10',
AUTHOR_UEL:'"https://wechat_test.changchangenglish.com/api/client/login"'
AUTHOR_UEL:'"http://wechat.test.singsingenglish.com/api/client/login"'
}
......@@ -7,5 +7,5 @@ module.exports = merge(prodEnv, {
IMAGE_URL_HEAD:'"http://cdn.singsingenglish.com/"',
API_URL: '"/"',
MAX_FILESIZE:'1024*1024*10',
AUTHOR_UEL:'"https://wechat_test.changchangenglish.com/api/client/login"'
AUTHOR_UEL:'"http://wechat.test.singsingenglish.com/api/client/login"'
})
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no"><title>唱唱启蒙英语</title><link rel=stylesheet href=https://at.alicdn.com/t/font_822651_udxjxcaax8f.css><link href=/static/css/app.73c2e3a47f23cb672459f1ae0dda6041.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/static/js/manifest.2ae2e69a05c33dfc65f8.js></script><script type=text/javascript src=/static/js/vendor.2440c0f987f7b21e5d78.js></script><script type=text/javascript src=/static/js/app.0fcb52d6e3a842310d01.js></script></body></html>
\ No newline at end of file
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no"><title>唱唱启蒙英语</title><link rel=stylesheet href=https://at.alicdn.com/t/font_822651_udxjxcaax8f.css><link href=/static/css/app.26b9daa948bdc83eb680b0332169ab2d.css rel=stylesheet></head><body><div id=app></div><script src=https://res.wx.qq.com/open/js/jweixin-1.3.2.js></script><script src=static/vconsole/vconsole.min.js></script><script>var vConsole = new VConsole();</script><script type=text/javascript src=/static/js/manifest.2ae2e69a05c33dfc65f8.js></script><script type=text/javascript src=/static/js/vendor.a36caa6cd5af266e2b79.js></script><script type=text/javascript src=/static/js/app.6af81cc7a7685ff5f60b.js></script></body></html>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
{"version":3,"sources":["webpack:///webpack/bootstrap 209319a74e7eacc10cfc"],"names":["parentJsonpFunction","window","chunkIds","moreModules","executeModules","moduleId","chunkId","result","i","resolves","length","installedChunks","push","Object","prototype","hasOwnProperty","call","modules","shift","__webpack_require__","s","installedModules","2","exports","module","l","m","c","d","name","getter","o","defineProperty","configurable","enumerable","get","n","__esModule","object","property","p","oe","err","console","error"],"mappings":"aACA,IAAAA,EAAAC,OAAA,aACAA,OAAA,sBAAAC,EAAAC,EAAAC,GAIA,IADA,IAAAC,EAAAC,EAAAC,EAAAC,EAAA,EAAAC,KACQD,EAAAN,EAAAQ,OAAoBF,IAC5BF,EAAAJ,EAAAM,GACAG,EAAAL,IACAG,EAAAG,KAAAD,EAAAL,GAAA,IAEAK,EAAAL,GAAA,EAEA,IAAAD,KAAAF,EACAU,OAAAC,UAAAC,eAAAC,KAAAb,EAAAE,KACAY,EAAAZ,GAAAF,EAAAE,IAIA,IADAL,KAAAE,EAAAC,EAAAC,GACAK,EAAAC,QACAD,EAAAS,OAAAT,GAEA,GAAAL,EACA,IAAAI,EAAA,EAAYA,EAAAJ,EAAAM,OAA2BF,IACvCD,EAAAY,IAAAC,EAAAhB,EAAAI,IAGA,OAAAD,GAIA,IAAAc,KAGAV,GACAW,EAAA,GAIA,SAAAH,EAAAd,GAGA,GAAAgB,EAAAhB,GACA,OAAAgB,EAAAhB,GAAAkB,QAGA,IAAAC,EAAAH,EAAAhB,IACAG,EAAAH,EACAoB,GAAA,EACAF,YAUA,OANAN,EAAAZ,GAAAW,KAAAQ,EAAAD,QAAAC,IAAAD,QAAAJ,GAGAK,EAAAC,GAAA,EAGAD,EAAAD,QAKAJ,EAAAO,EAAAT,EAGAE,EAAAQ,EAAAN,EAGAF,EAAAS,EAAA,SAAAL,EAAAM,EAAAC,GACAX,EAAAY,EAAAR,EAAAM,IACAhB,OAAAmB,eAAAT,EAAAM,GACAI,cAAA,EACAC,YAAA,EACAC,IAAAL,KAMAX,EAAAiB,EAAA,SAAAZ,GACA,IAAAM,EAAAN,KAAAa,WACA,WAA2B,OAAAb,EAAA,SAC3B,WAAiC,OAAAA,GAEjC,OADAL,EAAAS,EAAAE,EAAA,IAAAA,GACAA,GAIAX,EAAAY,EAAA,SAAAO,EAAAC,GAAsD,OAAA1B,OAAAC,UAAAC,eAAAC,KAAAsB,EAAAC,IAGtDpB,EAAAqB,EAAA,IAGArB,EAAAsB,GAAA,SAAAC,GAA8D,MAApBC,QAAAC,MAAAF,GAAoBA","file":"static/js/manifest.2ae2e69a05c33dfc65f8.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tvar parentJsonpFunction = window[\"webpackJsonp\"];\n \twindow[\"webpackJsonp\"] = function webpackJsonpCallback(chunkIds, moreModules, executeModules) {\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [], result;\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules, executeModules);\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n \t\tif(executeModules) {\n \t\t\tfor(i=0; i < executeModules.length; i++) {\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = executeModules[i]);\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t};\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// objects to store loaded and loading chunks\n \tvar installedChunks = {\n \t\t2: 0\n \t};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 209319a74e7eacc10cfc"],"sourceRoot":""}
\ No newline at end of file
{"version":3,"sources":["webpack:///webpack/bootstrap e63c968556b3abbbd15f"],"names":["parentJsonpFunction","window","chunkIds","moreModules","executeModules","moduleId","chunkId","result","i","resolves","length","installedChunks","push","Object","prototype","hasOwnProperty","call","modules","shift","__webpack_require__","s","installedModules","2","exports","module","l","m","c","d","name","getter","o","defineProperty","configurable","enumerable","get","n","__esModule","object","property","p","oe","err","console","error"],"mappings":"aACA,IAAAA,EAAAC,OAAA,aACAA,OAAA,sBAAAC,EAAAC,EAAAC,GAIA,IADA,IAAAC,EAAAC,EAAAC,EAAAC,EAAA,EAAAC,KACQD,EAAAN,EAAAQ,OAAoBF,IAC5BF,EAAAJ,EAAAM,GACAG,EAAAL,IACAG,EAAAG,KAAAD,EAAAL,GAAA,IAEAK,EAAAL,GAAA,EAEA,IAAAD,KAAAF,EACAU,OAAAC,UAAAC,eAAAC,KAAAb,EAAAE,KACAY,EAAAZ,GAAAF,EAAAE,IAIA,IADAL,KAAAE,EAAAC,EAAAC,GACAK,EAAAC,QACAD,EAAAS,OAAAT,GAEA,GAAAL,EACA,IAAAI,EAAA,EAAYA,EAAAJ,EAAAM,OAA2BF,IACvCD,EAAAY,IAAAC,EAAAhB,EAAAI,IAGA,OAAAD,GAIA,IAAAc,KAGAV,GACAW,EAAA,GAIA,SAAAH,EAAAd,GAGA,GAAAgB,EAAAhB,GACA,OAAAgB,EAAAhB,GAAAkB,QAGA,IAAAC,EAAAH,EAAAhB,IACAG,EAAAH,EACAoB,GAAA,EACAF,YAUA,OANAN,EAAAZ,GAAAW,KAAAQ,EAAAD,QAAAC,IAAAD,QAAAJ,GAGAK,EAAAC,GAAA,EAGAD,EAAAD,QAKAJ,EAAAO,EAAAT,EAGAE,EAAAQ,EAAAN,EAGAF,EAAAS,EAAA,SAAAL,EAAAM,EAAAC,GACAX,EAAAY,EAAAR,EAAAM,IACAhB,OAAAmB,eAAAT,EAAAM,GACAI,cAAA,EACAC,YAAA,EACAC,IAAAL,KAMAX,EAAAiB,EAAA,SAAAZ,GACA,IAAAM,EAAAN,KAAAa,WACA,WAA2B,OAAAb,EAAA,SAC3B,WAAiC,OAAAA,GAEjC,OADAL,EAAAS,EAAAE,EAAA,IAAAA,GACAA,GAIAX,EAAAY,EAAA,SAAAO,EAAAC,GAAsD,OAAA1B,OAAAC,UAAAC,eAAAC,KAAAsB,EAAAC,IAGtDpB,EAAAqB,EAAA,IAGArB,EAAAsB,GAAA,SAAAC,GAA8D,MAApBC,QAAAC,MAAAF,GAAoBA","file":"static/js/manifest.2ae2e69a05c33dfc65f8.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tvar parentJsonpFunction = window[\"webpackJsonp\"];\n \twindow[\"webpackJsonp\"] = function webpackJsonpCallback(chunkIds, moreModules, executeModules) {\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [], result;\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules, executeModules);\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n \t\tif(executeModules) {\n \t\t\tfor(i=0; i < executeModules.length; i++) {\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = executeModules[i]);\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t};\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// objects to store loaded and loading chunks\n \tvar installedChunks = {\n \t\t2: 0\n \t};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap e63c968556b3abbbd15f"],"sourceRoot":""}
\ No newline at end of file
This diff is collapsed.
......@@ -9,5 +9,10 @@
<body>
<div id="app"></div>
<!-- built files will be auto injected -->
<script src="https://res.wx.qq.com/open/js/jweixin-1.3.2.js"></script>
<script src="static/vconsole/vconsole.min.js"></script>
<script>
var vConsole = new VConsole();
</script>
</body>
</html>
......@@ -15,7 +15,8 @@ export default {
}
},
created () {
window.location.href = `${process.env.AUTHOR_UEL}?redirect_url=${this.$route.query.retUrl}`
localStorage.setItem('retUrl',this.$route.query.retUrl);
window.location.href = `${process.env.AUTHOR_UEL}`
},
methods: {
onPageReload: function () {
......
This diff is collapsed.
......@@ -119,28 +119,6 @@
},
methods:{
enableShare: function(option) {
let _url = location.href
getwechatParam().then(wechatRes => {
if (wechatRes.data.result === 'success') {
ShareJs.wxConfig(wechatRes.data.data)
let options = {
title: option.product_title,
desc: option.desc,
link: option.shareUrl,
success:function () {
let link = `shopId=${this.shopId}&groupId=${this.groupId}&source=${this.source}`
window._hmt.push(['_trackEvent', '团购首页', "分享",'商品首页分享',link]);//百度统计
this.trackingPage(link,'share')
}
};
if (option.shareIcon) {
options.imgUrl = option.shareIcon
}
ShareJs.setOptions(options)
}
})
},
onShare: function(type) {
let URL = `${process.env.API_URL2}/#/groupbuy?groupId=${this.groupId}&source=${this.source}`;
if(type === 1 ){
......@@ -172,25 +150,13 @@
},
groupPay(type){
if (Cookie.get('cc_token')) {
checkGroupPay(this.shopId).then(res => {
if (res.data.result === 'success') {
this.$router.push({
name: 'groupBuyPay',
query: {groupId: this.groupId, shopId: this.shopId, type: type,source:this.source}
name: 'buy',
query: {shopId: this.shopId,source:this.source}
})
} else if(res.data.message === '数据不存在'){
this.popType = true;
this.popupVisible = true;
this.popcontentW = `该商品已下架,<br>您可以添加微信公众号了解更多`
}else{
this.popType = true;
this.popupVisible = true;
this.popcontentW = `您已经购买过课程,无需重复<br>购买,您可以添加微信公众号了解更多`
}
})
} else {
this.$router.push({name:'author',query:{'retUrl':window.location.href}})
console.log(this.$route.fullPath)
this.$router.push({name:'author',query:{'retUrl':this.$route.fullPath}})
}
}
}
......
......@@ -83,7 +83,6 @@
</template>
<script>
import Service from '../../service'
import ShareJs from '@/util/share'
import defaultUserIconUrl from '../../assets/Shape@2x.png'
import successIconUrl from '../../assets/successIcon.png'
......
......@@ -4,9 +4,11 @@ import Vue from 'vue'
import App from './App'
import router from './router'
import store from './store'
import MintUI from 'mint-ui'
import 'mint-ui/lib/style.css'
Vue.config.productionTip = false;
Vue.use(MintUI)
/* eslint-disable no-new */
new Vue({
el: '#app',
......
import Vue from 'vue'
import store from "@/store"
import Cookie from '../util/cookie'
import common from '../util/common'
import Router from 'vue-router'
import index from '@/components/index'
import buyDetail from '@/components/buy/index'
......@@ -21,7 +24,10 @@ const router =new Router({
},{
path: '/buyDetail',
name: 'buyDetail',
component: buyDetail
component: buyDetail,
meta:{
skip_login:true
}
}, {
path: '/buy',
name: 'buy',
......@@ -36,7 +42,35 @@ const router =new Router({
router.beforeEach((to,from,next)=> {
let goOn=function(){
if(localStorage.getItem('retUrl') && localStorage.getItem('retUrl') !== null && localStorage.getItem('retUrl') !== ''){
let retUrl = localStorage.getItem('retUrl');
next(retUrl);
localStorage.removeItem('retUrl');
}else{
next()
}
};
if(to.name === 'author'){
next()
}else if(window.location.href.indexOf('token')>-1){
let token = common.getUrlParam('token');
store.dispatch('setToken',token);
goOn()
// 通过cookie获取token
}else if(Cookie.get('cc_token')) {
store.dispatch('setToken', Cookie.get('cc_token'));
goOn()
// 无需token登录页面
}else if(to.meta.skip_login){
goOn()
}else{
next({name:'author',query:{retUrl:to.fullPath}})
}
// if(to.meta.skip_login){
// next();
// }
});
export default router;
......@@ -13,10 +13,18 @@ export const getBannerListApi = function () {
return Vue.prototype.$fetch(getBannerListUrl)
};
const getwechatParamUrl = `${_baseUrl}api/client/jssdk`;
export const getwechatParam = function () {
return Vue.prototype.$fetch(getwechatParamUrl,{api_list:'onMenuShareTimeline,onMenuShareAppMessage'})
export const getwechatParam = function (json) {
return Vue.prototype.$fetch(getwechatParamUrl,json)
};
const getGoodsDetailUrl = `${_baseUrl}api/client/goods/info/`;
export const getGoodsDetailApi = function (id) {
return Vue.prototype.$fetch(`${getGoodsDetailUrl}${id}`)
}
};
const getUserAdressUrl = `${_baseUrl}api/client/address/info`;
export const getUserAdressApi = function () {
return Vue.prototype.$fetch(getUserAdressUrl)
};
const payUrl = `${_baseUrl}api/client/bill/wechat/pay`
export const payApi = function (json) {
return Vue.prototype.$fetch(payUrl,json)
};
export default{
setToken({commit},token){
commit('setToken',token);
},
}
......@@ -6,7 +6,7 @@ Vue.use(vuex);
export default new vuex.Store({
state:{
token:'',
},
mutations,
actions
......
import Cookie from "@/util/cookie";
const mutations={
setToken(state,token){
state.token=token;
Cookie.set('cc_token',token);
},
};
export default mutations;
This diff is collapsed.
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