Commit 8aa9fb36 authored by 郝聪敏's avatar 郝聪敏

Merge branch 'feature/add_cdn' into 'master'

feature: 活动图片压缩、组件库cdn引入

See merge request !237
parents b26c62d5 683e5448
...@@ -31,6 +31,10 @@ ...@@ -31,6 +31,10 @@
} }
})(); })();
</script> </script>
<link
rel="stylesheet"
href="https://activitystatic.lkbang.net/cherry-1.2.7.css"
/>
<style> <style>
#app .mainload{ #app .mainload{
margin-top:180px; margin-top:180px;
...@@ -49,5 +53,7 @@ ...@@ -49,5 +53,7 @@
</div> </div>
</div> </div>
<!-- built files will be auto injected --> <!-- built files will be auto injected -->
<script src="https://activitystatic.lkbang.net/vue/2.6.11/vue.min.js"></script>
<script src="https://activitystatic.lkbang.net/cherry-1.2.7.js"></script>
</body> </body>
</html> </html>
src/assets/images/home/guangmang.png

117 KB | W: | H:

src/assets/images/home/guangmang.png

26.2 KB | W: | H:

src/assets/images/home/guangmang.png
src/assets/images/home/guangmang.png
src/assets/images/home/guangmang.png
src/assets/images/home/guangmang.png
  • 2-up
  • Swipe
  • Onion skin
src/assets/images/home/guide@2x.png

124 KB | W: | H:

src/assets/images/home/guide@2x.png

28.1 KB | W: | H:

src/assets/images/home/guide@2x.png
src/assets/images/home/guide@2x.png
src/assets/images/home/guide@2x.png
src/assets/images/home/guide@2x.png
  • 2-up
  • Swipe
  • Onion skin
src/assets/images/home/winning@2x.png

125 KB | W: | H:

src/assets/images/home/winning@2x.png

36.7 KB | W: | H:

src/assets/images/home/winning@2x.png
src/assets/images/home/winning@2x.png
src/assets/images/home/winning@2x.png
src/assets/images/home/winning@2x.png
  • 2-up
  • Swipe
  • Onion skin
import Vue from "vue"; import Vue from "vue";
import "@/service/load";
import App from "./App.vue"; import App from "./App.vue";
import router from "./router"; import router from "./router";
import store from "./store"; import store from "./store";
...@@ -8,7 +7,6 @@ import "amfe-flexible"; ...@@ -8,7 +7,6 @@ import "amfe-flexible";
import vConsole from "vconsole"; import vConsole from "vconsole";
import sa from "sa-sdk-javascript"; import sa from "sa-sdk-javascript";
import "@/assets/icons/index"; import "@/assets/icons/index";
import "@/service/cherry-ui";
import Raven from "raven-js"; import Raven from "raven-js";
import RavenVue from "raven-js/plugins/vue"; import RavenVue from "raven-js/plugins/vue";
import config from "@/config"; import config from "@/config";
......
//引入axios //引入axios
// import Vue from "vue"
import store from "@/store"; import store from "@/store";
import router from "@/router"; import router from "@/router";
import axios from "axios"; import axios from "axios";
import cherry from "@qg/cherry-ui"; // import cherry from "@qg/cherry-ui";
import config from "../config"; import config from "../config";
import localStorage from "./localStorage"; import localStorage from "./localStorage";
...@@ -22,7 +23,7 @@ const ERR_MESSAGE_MAP = { ...@@ -22,7 +23,7 @@ const ERR_MESSAGE_MAP = {
505: "http版本不支持该请求" 505: "http版本不支持该请求"
} }
}; };
const { Notify } = cherry; // const { Notify } = cherry;
const CancelToken = axios.CancelToken; const CancelToken = axios.CancelToken;
let pending = {}; let pending = {};
let reqNum = 0; let reqNum = 0;
...@@ -92,7 +93,7 @@ axios.interceptors.response.use( ...@@ -92,7 +93,7 @@ axios.interceptors.response.use(
// 后端返回异常信息时提出警告 // 后端返回异常信息时提出警告
if (response.data.code && response.data.msg) notifyType = "warning"; if (response.data.code && response.data.msg) notifyType = "warning";
Notify({ window.Vue.prototype.$notify({
type: notifyType, type: notifyType,
message: response.data.msg || "后端服务异常", message: response.data.msg || "后端服务异常",
duration: notifyType === "warning" ? 6000 : 3000 duration: notifyType === "warning" ? 6000 : 3000
...@@ -131,7 +132,7 @@ axios.interceptors.response.use( ...@@ -131,7 +132,7 @@ axios.interceptors.response.use(
} else { } else {
err.message = "连接到服务器失败"; err.message = "连接到服务器失败";
} }
Notify({ type: "danger", message: err.message }); window.Vue.prototype.$notify({ type: "danger", message: err.message });
return Promise.reject(err.response); return Promise.reject(err.response);
} }
); );
......
...@@ -353,7 +353,7 @@ export default { ...@@ -353,7 +353,7 @@ export default {
if (!currentIdNo) return ""; if (!currentIdNo) return "";
currentIdNo = currentIdNo =
currentIdNo.indexOf("**") > -1 currentIdNo.indexOf("**") > -1
? familyList.find(item => item.userInfoSecId === currentUserId).idNo ? familyList?.find(item => item.userInfoSecId === currentUserId)?.idNo
: currentIdNo; : currentIdNo;
return currentIdNo; return currentIdNo;
}, },
......
...@@ -345,7 +345,7 @@ export default { ...@@ -345,7 +345,7 @@ export default {
if (!currentIdNo) return ""; if (!currentIdNo) return "";
currentIdNo = currentIdNo =
currentIdNo.indexOf("**") > -1 currentIdNo.indexOf("**") > -1
? familyList.find(item => item.userInfoSecId === currentUserId).idNo ? familyList?.find(item => item.userInfoSecId === currentUserId)?.idNo
: currentIdNo; : currentIdNo;
return currentIdNo; return currentIdNo;
}, },
......
...@@ -23,7 +23,7 @@ export default { ...@@ -23,7 +23,7 @@ export default {
this.tradeType = this.customTradeType ?? (isXyqb ? "MWEB" : isWeixinBrower ? "JSAPI" : "MWEB"); this.tradeType = this.customTradeType ?? (isXyqb ? "MWEB" : isWeixinBrower ? "JSAPI" : "MWEB");
}, },
methods: { methods: {
...mapActions(["setIsShowOpenBrower"]), ...mapActions(["setIsShowOpenBrower", "setIsLoading"]),
async generateOrder(detailType) { async generateOrder(detailType) {
const res = await placeOrder.create({ const res = await placeOrder.create({
...this.subFormData ...this.subFormData
......
...@@ -118,13 +118,13 @@ export default { ...@@ -118,13 +118,13 @@ export default {
async getList(type) { async getList(type) {
let list = await getPolicyList(); let list = await getPolicyList();
this.list = list this.list = list
.filter( ?.filter(
v => v =>
some(GOODS_LIST, { id: v.productNo }) && some(GOODS_LIST, { id: v.productNo }) &&
(type === 0 ? true : v.insuredRelation === relations[type]) && (type === 0 ? true : v.insuredRelation === relations[type]) &&
this.findKey(v) this.findKey(v)
) )
.map(this.getData); ?.map(this.getData);
const hasPolicy = this.list.length ? true : false; const hasPolicy = this.list.length ? true : false;
this.$emit("update:hasPolicy", hasPolicy); this.$emit("update:hasPolicy", hasPolicy);
}, },
......
...@@ -70,14 +70,14 @@ module.exports = { ...@@ -70,14 +70,14 @@ module.exports = {
reuseExistingChunk: true, reuseExistingChunk: true,
enforce: true enforce: true
}, },
cherryUI: { // cherryUI: {
name: "chunk-cherryUI", // split cherryUI into a single package // name: "chunk-cherryUI", // split cherryUI into a single package
priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app // priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app
test: /[\\/]node_modules[\\/]@qg[\\/]_?cherry-ui(.*)/, // in order to adapt to cnpm // test: /[\\/]node_modules[\\/]@qg[\\/]_?cherry-ui(.*)/, // in order to adapt to cnpm
chunks: "initial", // chunks: "initial",
reuseExistingChunk: true, // reuseExistingChunk: true,
enforce: true // enforce: true
}, // },
saSdk: { saSdk: {
name: "chunk-sa-sdk", // split cherryUI into a single package name: "chunk-sa-sdk", // split cherryUI into a single package
priority: 19, // the weight needs to be larger than libs and app or it will be packaged into libs or app priority: 19, // the weight needs to be larger than libs and app or it will be packaged into libs or app
...@@ -137,6 +137,9 @@ module.exports = { ...@@ -137,6 +137,9 @@ module.exports = {
}, },
configureWebpack: config => { configureWebpack: config => {
config.plugins.push(new SentryPlugin(SentryConfig)); config.plugins.push(new SentryPlugin(SentryConfig));
config.externals = {
vue: "Vue"
};
if (IS_PROD) { if (IS_PROD) {
config.plugins.push( config.plugins.push(
new CompressionPlugin({ new CompressionPlugin({
......
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