Commit 47ce31de authored by xieyishang's avatar xieyishang

~~~~

parent 8f1f1351
...@@ -9,33 +9,34 @@ ...@@ -9,33 +9,34 @@
"preview": "vite preview" "preview": "vite preview"
}, },
"dependencies": { "dependencies": {
"@ckeditor/ckeditor5-vue": "^7.2.0", "@ckeditor/ckeditor5-vue": "^7.2.0",
"@element-plus/icons-vue": "^2.3.1", "@element-plus/icons-vue": "^2.3.1",
"axios": "^1.7.2", "axios": "^1.7.2",
"ckeditor5": "^43.2.0", "ckeditor5": "^43.2.0",
"codemirror": "5.65.5", "codemirror": "5.65.5",
"core-js": "3.29.0", "core-js": "3.29.0",
"cropperjs": "1.5.13", "cropperjs": "1.5.13",
"crypto-js": "4.1.1", "crypto-js": "4.1.1",
"echarts": "5.4.1", "echarts": "5.4.1",
"element-plus": "2.8.4", "element-plus": "2.8.4",
"nprogress": "0.2.0", "nprogress": "0.2.0",
"pinyin-match": "^1.2.4", "pinyin-match": "^1.2.4",
"qrcodejs2": "0.0.2", "qr-code-styling": "^1.9.1",
"sortablejs": "1.15.0", "qrcodejs2": "0.0.2",
"vue": "^3.4.21", "sortablejs": "1.15.0",
"vue-i18n": "^9.13.1", "vue": "^3.4.21",
"vue-router": "^4.3.2", "vue-i18n": "^9.13.1",
"vuedraggable": "^4.0.3", "vue-router": "^4.3.2",
"vuex": "^4.1.0", "vuedraggable": "^4.0.3",
"xgplayer": "2.32.2", "vuex": "^4.1.0",
"xgplayer-hls": "2.5.2", "xgplayer": "2.32.2",
"xlsx": "^0.18.5" "xgplayer-hls": "2.5.2",
"xlsx": "^0.18.5"
}, },
"devDependencies": { "devDependencies": {
"@vitejs/plugin-vue": "^5.0.4", "@vitejs/plugin-vue": "^5.0.4",
"sass": "1.77.2", "sass": "1.77.2",
"terser": "^5.31.0", "terser": "^5.31.0",
"vite": "^5.2.0" "vite": "^5.2.0"
} }
} }
...@@ -37,6 +37,13 @@ export default { ...@@ -37,6 +37,13 @@ export default {
post: async function(params){ post: async function(params){
return await http.post(this.url, 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 = { ...@@ -14,6 +14,8 @@ const DEFAULT_CONFIG = {
//接口地址 //接口地址
API_URL: "https://juwu.xicheda.cn/admin/", API_URL: "https://juwu.xicheda.cn/admin/",
API_URL_TWO: "https://juwu.xicheda.cn/api/",
//请求超时 //请求超时
TIMEOUT: 50000, TIMEOUT: 50000,
......
...@@ -311,4 +311,8 @@ text-align: center; ...@@ -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