Commit 683e5448 authored by 郝聪敏's avatar 郝聪敏

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

parent b26c62d5
......@@ -31,6 +31,10 @@
}
})();
</script>
<link
rel="stylesheet"
href="https://activitystatic.lkbang.net/cherry-1.2.7.css"
/>
<style>
#app .mainload{
margin-top:180px;
......@@ -49,5 +53,7 @@
</div>
</div>
<!-- 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>
</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 "@/service/load";
import App from "./App.vue";
import router from "./router";
import store from "./store";
......@@ -8,7 +7,6 @@ import "amfe-flexible";
import vConsole from "vconsole";
import sa from "sa-sdk-javascript";
import "@/assets/icons/index";
import "@/service/cherry-ui";
import Raven from "raven-js";
import RavenVue from "raven-js/plugins/vue";
import config from "@/config";
......
//引入axios
// import Vue from "vue"
import store from "@/store";
import router from "@/router";
import axios from "axios";
import cherry from "@qg/cherry-ui";
// import cherry from "@qg/cherry-ui";
import config from "../config";
import localStorage from "./localStorage";
......@@ -22,7 +23,7 @@ const ERR_MESSAGE_MAP = {
505: "http版本不支持该请求"
}
};
const { Notify } = cherry;
// const { Notify } = cherry;
const CancelToken = axios.CancelToken;
let pending = {};
let reqNum = 0;
......@@ -92,7 +93,7 @@ axios.interceptors.response.use(
// 后端返回异常信息时提出警告
if (response.data.code && response.data.msg) notifyType = "warning";
Notify({
window.Vue.prototype.$notify({
type: notifyType,
message: response.data.msg || "后端服务异常",
duration: notifyType === "warning" ? 6000 : 3000
......@@ -131,7 +132,7 @@ axios.interceptors.response.use(
} else {
err.message = "连接到服务器失败";
}
Notify({ type: "danger", message: err.message });
window.Vue.prototype.$notify({ type: "danger", message: err.message });
return Promise.reject(err.response);
}
);
......
......@@ -353,7 +353,7 @@ export default {
if (!currentIdNo) return "";
currentIdNo =
currentIdNo.indexOf("**") > -1
? familyList.find(item => item.userInfoSecId === currentUserId).idNo
? familyList?.find(item => item.userInfoSecId === currentUserId)?.idNo
: currentIdNo;
return currentIdNo;
},
......
......@@ -345,7 +345,7 @@ export default {
if (!currentIdNo) return "";
currentIdNo =
currentIdNo.indexOf("**") > -1
? familyList.find(item => item.userInfoSecId === currentUserId).idNo
? familyList?.find(item => item.userInfoSecId === currentUserId)?.idNo
: currentIdNo;
return currentIdNo;
},
......
......@@ -23,7 +23,7 @@ export default {
this.tradeType = this.customTradeType ?? (isXyqb ? "MWEB" : isWeixinBrower ? "JSAPI" : "MWEB");
},
methods: {
...mapActions(["setIsShowOpenBrower"]),
...mapActions(["setIsShowOpenBrower", "setIsLoading"]),
async generateOrder(detailType) {
const res = await placeOrder.create({
...this.subFormData
......
......@@ -118,13 +118,13 @@ export default {
async getList(type) {
let list = await getPolicyList();
this.list = list
.filter(
?.filter(
v =>
some(GOODS_LIST, { id: v.productNo }) &&
(type === 0 ? true : v.insuredRelation === relations[type]) &&
this.findKey(v)
)
.map(this.getData);
?.map(this.getData);
const hasPolicy = this.list.length ? true : false;
this.$emit("update:hasPolicy", hasPolicy);
},
......
......@@ -70,14 +70,14 @@ module.exports = {
reuseExistingChunk: true,
enforce: true
},
cherryUI: {
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
test: /[\\/]node_modules[\\/]@qg[\\/]_?cherry-ui(.*)/, // in order to adapt to cnpm
chunks: "initial",
reuseExistingChunk: true,
enforce: true
},
// cherryUI: {
// 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
// test: /[\\/]node_modules[\\/]@qg[\\/]_?cherry-ui(.*)/, // in order to adapt to cnpm
// chunks: "initial",
// reuseExistingChunk: true,
// enforce: true
// },
saSdk: {
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
......@@ -137,6 +137,9 @@ module.exports = {
},
configureWebpack: config => {
config.plugins.push(new SentryPlugin(SentryConfig));
config.externals = {
vue: "Vue"
};
if (IS_PROD) {
config.plugins.push(
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