Commit 47ce31de authored by xieyishang's avatar xieyishang

~~~~

parent 8f1f1351
......@@ -9,33 +9,34 @@
"preview": "vite preview"
},
"dependencies": {
"@ckeditor/ckeditor5-vue": "^7.2.0",
"@element-plus/icons-vue": "^2.3.1",
"axios": "^1.7.2",
"ckeditor5": "^43.2.0",
"codemirror": "5.65.5",
"core-js": "3.29.0",
"cropperjs": "1.5.13",
"crypto-js": "4.1.1",
"echarts": "5.4.1",
"element-plus": "2.8.4",
"nprogress": "0.2.0",
"pinyin-match": "^1.2.4",
"qrcodejs2": "0.0.2",
"sortablejs": "1.15.0",
"vue": "^3.4.21",
"vue-i18n": "^9.13.1",
"vue-router": "^4.3.2",
"vuedraggable": "^4.0.3",
"vuex": "^4.1.0",
"xgplayer": "2.32.2",
"xgplayer-hls": "2.5.2",
"xlsx": "^0.18.5"
"@ckeditor/ckeditor5-vue": "^7.2.0",
"@element-plus/icons-vue": "^2.3.1",
"axios": "^1.7.2",
"ckeditor5": "^43.2.0",
"codemirror": "5.65.5",
"core-js": "3.29.0",
"cropperjs": "1.5.13",
"crypto-js": "4.1.1",
"echarts": "5.4.1",
"element-plus": "2.8.4",
"nprogress": "0.2.0",
"pinyin-match": "^1.2.4",
"qr-code-styling": "^1.9.1",
"qrcodejs2": "0.0.2",
"sortablejs": "1.15.0",
"vue": "^3.4.21",
"vue-i18n": "^9.13.1",
"vue-router": "^4.3.2",
"vuedraggable": "^4.0.3",
"vuex": "^4.1.0",
"xgplayer": "2.32.2",
"xgplayer-hls": "2.5.2",
"xlsx": "^0.18.5"
},
"devDependencies": {
"@vitejs/plugin-vue": "^5.0.4",
"sass": "1.77.2",
"terser": "^5.31.0",
"vite": "^5.2.0"
"@vitejs/plugin-vue": "^5.0.4",
"sass": "1.77.2",
"terser": "^5.31.0",
"vite": "^5.2.0"
}
}
......@@ -37,6 +37,13 @@ export default {
post: async function(params){
return await http.post(this.url, params);
}
}
},
nativepc:{
url: `${config.API_URL_TWO}wechat/pay/nativepc`,
name: "支付订单",
post: async function(params){
return await http.post(this.url, params);
}
},
}
}
\ No newline at end of file
<template>
<div ref="qrcode" class="qrcodetags">
</div>
</template>
<script>
import QRCodeStyling from "qr-code-styling";
export default {
name: "QrCode",
props: {
value: {
type: String,
required: true
},
width: {
type: Number,
default: 200
}
},
data() {
return {
qrCode: null // 用于存储二维码实例
};
},
mounted() {
// this.initQRCode();
},
methods: {
initQRCode() {
console.info("initQRCode");
if (this.qrCode) {
this.qrCode.clear(); // 清除已存在的二维码
}
this.qrCode = new QRCodeStyling({
width: this.width,
data: this.value,
image: "", // 如果你想添加logo到二维码中间,可以在这里提供图片URL
dotsOptions: {
color: "#000000"
},
backgroundOptions: {
color: "#ffffff"
},
imageOptions: {
crossOrigin: "anonymous",
margin: 10
}
});
this.qrCode.append(this.$refs.qrcode);
},
updateQRCode(newValue) {
if (this.qrCode) {
this.qrCode.update({ data: newValue }); // 更新二维码的数据
} else {
this.initQRCode(); // 如果还没有初始化,则初始化
}
}
},
watch: {
value(newVal, oldVal) {
if (newVal !== oldVal) {
this.updateQRCode(newVal);
}
}
},
beforeDestroy() {
if (this.qrCode) {
this.qrCode.clear(); // 在组件销毁前清除二维码
}
}
};
</script>
<style scoped>
.qrcodetags{
margin: 0 auto;
width: 200px;
/* height: 200px; */
}
</style>
\ No newline at end of file
......@@ -14,6 +14,8 @@ const DEFAULT_CONFIG = {
//接口地址
API_URL: "https://juwu.xicheda.cn/admin/",
API_URL_TWO: "https://juwu.xicheda.cn/api/",
//请求超时
TIMEOUT: 50000,
......
......@@ -311,4 +311,8 @@ text-align: center;
}
}
}
}
.qrcodepup{
text-align: center;
}
\ No newline at end of file
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