Browse Source

Merge pull request 'zq-0910-pay' (#8) from zq-0910-pay into master

Reviewed-on: zhangqi/acupuncture_admin#8
master
longchao 2 weeks ago
parent
commit
63cc4b9405
  1. 1
      src/assets/site/form_linkActive.svg
  2. 1
      src/assets/site/form_qua_ic.svg
  3. 1
      src/assets/site/siteSemInfo_Icon.svg
  4. 1
      src/assets/site/uploadIcon.svg
  5. 1
      src/assets/site/uploadIcon_light.svg
  6. 1
      src/assets/weixin.svg
  7. 1
      src/assets/zhifubao.svg
  8. 112
      src/components/CustomDropdown.vue
  9. 6
      src/components/GuipDialog.vue
  10. 131
      src/components/GuipSwitch.vue
  11. 221
      src/components/Tooltip.vue
  12. 456
      src/components/addPay.vue
  13. 2
      src/components/paymentMethod.vue
  14. 4
      src/main.js
  15. 12
      src/router/index.js
  16. 20
      src/store/index.js
  17. 3
      src/utils/eventBus.js
  18. 58
      src/utils/tooltip.js
  19. 6
      src/views/HomeView.vue
  20. 884
      src/views/HosInformation.vue
  21. 2
      src/views/Register.vue
  22. 4
      src/views/elementGroups.vue
  23. 342
      src/views/weChatPayment.vue

1
src/assets/site/form_linkActive.svg

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 8.1 KiB

1
src/assets/site/form_qua_ic.svg

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="14.000000953674316" height="14.000114440917969" viewBox="0 0 14.000000953674316 14.000114440917969"><g><path d="M6.99997,0C3.13397,0,0,3.13402,0,7.00003C0,10.8661,3.13397,14.0001,6.99997,14.0001C10.866,14.0001,14,10.8661,14,7.00006C14,3.13405,10.8661,0,6.99997,0ZM7.67931,11.0393C7.67931,11.2326,7.52265,11.3894,7.32932,11.3894L6.27931,11.3894C6.08606,11.3894,5.92934,11.2326,5.92934,11.0393L5.92934,9.98936C5.92934,9.79601,6.08606,9.63931,6.27931,9.63931L7.32932,9.63931C7.52264,9.63931,7.67931,9.79599,7.67931,9.98936L7.67931,11.0393ZM9.41428,6.22158C9.2736,6.42218,8.95427,6.67778,8.5545,6.98942L8.11148,7.29514C7.89631,7.46204,7.70548,7.65635,7.63491,7.87882C7.61079,7.95462,7.59272,8.07919,7.58056,8.21373C7.57443,8.28143,7.51387,8.41954,7.37231,8.41954L6.2329,8.41954C6.0477,8.41954,6.01462,8.27448,6.01771,8.20352C6.03821,7.73845,6.08083,7.32557,6.27031,7.10329Q6.65395,6.65348,7.52686,6.0936C7.65976,5.99331,7.76736,5.88429,7.84873,5.76547C7.99666,5.5615,8.11939,5.33749,8.11939,5.09263C8.11939,4.8112,8.03711,4.55467,7.87201,4.32247C7.70748,4.09118,7.4061,3.97531,6.96939,3.97531C6.53948,3.97531,6.23474,4.118,6.05511,4.40325C5.9224,4.614,5.83885,4.80778,5.80426,5.01862C5.79195,5.09324,5.7441,5.25041,5.5846,5.25041L4.47332,5.25041C4.2367,5.25041,4.1846,5.09707,4.19143,5.02315C4.27709,4.09158,4.64113,3.45509,5.28481,3.04639C5.7225,2.765,6.26099,2.62379,6.89974,2.62379C7.73906,2.62379,8.43578,2.82387,8.99123,3.2246C9.5457,3.62477,9.82373,4.21775,9.82373,5.004C9.82378,5.48549,9.65479,5.89152,9.41428,6.22158L9.41428,6.22158Z" fill="#8A9099" fill-opacity="1"/></g></svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

1
src/assets/site/siteSemInfo_Icon.svg

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="16" height="16" viewBox="0 0 16 16"><defs><clipPath id="master_svg0_217_60685"><rect x="0" y="0" width="16" height="16" rx="0"/></clipPath></defs><g clip-path="url(#master_svg0_217_60685)"><g><path d="M8,1C9.97933,1.052,11.6278,1.7368329999999998,12.9455,3.0545C14.2632,4.372170000000001,14.948,6.02067,15,8C14.948,9.97933,14.2632,11.6278,12.9455,12.9455C11.6278,14.2632,9.97933,14.948,8,15C6.02067,14.948,4.372170000000001,14.2632,3.0545,12.9455C1.7368329999999998,11.6278,1.052,9.97933,1,8C1.052,6.02067,1.7368329999999998,4.372170000000001,3.0545,3.0545C4.372170000000001,1.7368329999999998,6.02067,1.052,8,1C8,1,8,1,8,1C8,1,8,1,8,1ZM9.047,5.297C9.318,5.297,9.542,5.21633,9.719,5.055C9.896,4.89367,9.9845,4.6775,9.9845,4.406499999999999C9.9845,4.1355,9.896,3.91933,9.719,3.758C9.542,3.59667,9.32067,3.516,9.055,3.516C8.78933,3.516,8.568,3.59667,8.391,3.758C8.214,3.91933,8.125499999999999,4.1355,8.125499999999999,4.406499999999999C8.125499999999999,4.6775,8.214,4.89367,8.391,5.055C8.568,5.21633,8.78683,5.297,9.0475,5.297C9.0475,5.297,9.047,5.297,9.047,5.297C9.047,5.297,9.047,5.297,9.047,5.297ZM9.2345,10.922C9.2345,10.85933,9.23967,10.776,9.25,10.672C9.26033,10.568,9.26033,10.469,9.25,10.375C9.25,10.375,8.422,11.328,8.422,11.328C8.33867,11.4217,8.25267,11.4947,8.164,11.547C8.075330000000001,11.5993,7.99983,11.615,7.9375,11.594C7.84383,11.5523,7.80217,11.4793,7.8125,11.375C7.8125,11.375,9.1875,7.047,9.1875,7.047C9.2395,6.75533,9.19267,6.50533,9.047,6.297C8.90133,6.08867,8.667,5.96367,8.344000000000001,5.922C7.97933,5.93233,7.58083,6.086,7.1485,6.383C6.71617,6.68,6.3385,7.05767,6.0155,7.516C6.0155,7.516,6.0155,7.7505,6.0155,7.7505C6.00517,7.85483,6.00517,7.95383,6.0155,8.0475C6.0155,8.0475,6.8435,7.0945,6.8435,7.0945C6.92683,7.00083,7.01283,6.92783,7.1015,6.8755C7.19017,6.82317,7.2605,6.8075,7.3125,6.8285C7.41683,6.8805,7.45333,6.96383,7.422,7.0785C7.422,7.0785,6.0625,11.391,6.0625,11.391C5.9895,11.6513,6.026,11.8832,6.172,12.0865C6.318,12.2898,6.57317,12.4278,6.9375,12.5005C7.4585,12.4902,7.896,12.3392,8.25,12.0475C8.604,11.7558,8.93217,11.3808,9.2345,10.9225C9.2345,10.9225,9.2345,10.922,9.2345,10.922C9.2345,10.922,9.2345,10.922,9.2345,10.922Z" fill="#006AFF" fill-opacity="1"/></g></g></svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

1
src/assets/site/uploadIcon.svg

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="20" height="16" viewBox="0 0 20 16"><defs><clipPath id="master_svg0_166_43602"><rect x="0" y="0" width="20" height="16" rx="0"/></clipPath></defs><g clip-path="url(#master_svg0_166_43602)"><g transform="matrix(1,0,0,-1,0,30.6875)"><g><path d="M4.5,15.34375Q2.59375,15.40625,1.3125,16.65625Q0.0625,17.9375,0,19.84375Q0.03125,21.34375,0.84375,22.46875Q1.65625,23.59375,3,24.09375Q3,24.21875,3,24.34375Q3.0625,26.46875,4.46875,27.87495Q5.875,29.28125,8,29.34375Q9.40625,29.31255,10.5312,28.65625Q11.6562,27.96875,12.3438,26.84375Q13.0625,27.34375,14,27.34375Q15.2812,27.31255,16.125,26.46875Q16.9688,25.62495,17,24.34375Q17,23.78125,16.8125,23.25Q18.1875,22.96875,19.0938,21.875Q19.9688,20.8125,20,19.34375Q19.9688,17.65625,18.8438,16.5Q17.6875,15.375,16,15.34375L4.5,15.34375ZM6.96875,22.125Q6.53125,21.59375,6.96875,21.0625Q7.5,20.625,8.03125,21.0625L9.25,22.28125L9.25,18.09375Q9.3125,17.40625,10,17.34375Q10.6875,17.40625,10.75,18.09375L10.75,22.28125L11.9688,21.0625Q12.5,20.625,13.0312,21.0625Q13.4688,21.59375,13.0312,22.125L10.5312,24.625Q10,25.0625,9.46875,24.625L6.96875,22.125Z" fill="#626573" fill-opacity="1"/></g></g></g></svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

1
src/assets/site/uploadIcon_light.svg

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="20" height="16" viewBox="0 0 20 16"><defs><clipPath id="master_svg0_401_004793/89_47570"><rect x="0" y="0" width="20" height="16" rx="0"/></clipPath></defs><g clip-path="url(#master_svg0_401_004793/89_47570)"><g transform="matrix(1,0,0,-1,0,30.6875)"><g><path d="M4.5,15.34375Q2.59375,15.40625,1.3125,16.65625Q0.0625,17.9375,0,19.84375Q0.03125,21.34375,0.84375,22.46875Q1.65625,23.59375,3,24.09375Q3,24.21875,3,24.34375Q3.0625,26.46875,4.46875,27.87495Q5.875,29.28125,8,29.34375Q9.40625,29.31255,10.5312,28.65625Q11.6562,27.96875,12.3438,26.84375Q13.0625,27.34375,14,27.34375Q15.2812,27.31255,16.125,26.46875Q16.9688,25.62495,17,24.34375Q17,23.78125,16.8125,23.25Q18.1875,22.96875,19.0938,21.875Q19.9688,20.8125,20,19.34375Q19.9688,17.65625,18.8438,16.5Q17.6875,15.375,16,15.34375L4.5,15.34375ZM6.96875,22.125Q6.53125,21.59375,6.96875,21.0625Q7.5,20.625,8.03125,21.0625L9.25,22.28125L9.25,18.09375Q9.3125,17.40625,10,17.34375Q10.6875,17.40625,10.75,18.09375L10.75,22.28125L11.9688,21.0625Q12.5,20.625,13.0312,21.0625Q13.4688,21.59375,13.0312,22.125L10.5312,24.625Q10,25.0625,9.46875,24.625L6.96875,22.125Z" fill="#006AFF" fill-opacity="1"/></g></g></g></svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

1
src/assets/weixin.svg

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="26" height="26" viewBox="0 0 26 26"><defs><clipPath id="master_svg0_151_44063"><rect x="0" y="0" width="26" height="26" rx="0"/></clipPath></defs><g clip-path="url(#master_svg0_151_44063)"><g><rect x="1" y="4" width="24" height="20" rx="0" fill="#FFFFFF" fill-opacity="1"/></g><g><path d="M6,8.22114375C6,8.83064375,6.490547,9.321193749999999,7.1000499999999995,9.321193749999999C7.70955,9.321193749999999,8.20012,8.83064375,8.20012,8.22114375C8.20012,7.61164075,7.70955,7.12109375,7.1000499999999995,7.12109375C6.490572,7.12109375,6,7.61164075,6,8.22114375ZM14.53287,13.884953750000001C14.53287,14.360643750000001,14.9194,14.74717375,15.39509,14.74717375C15.87078,14.74717375,16.2573,14.360643750000001,16.2573,13.884953750000001C16.2573,13.409263750000001,15.87078,13.02274375,15.39509,13.02274375C14.9194,13.02274375,14.53287,13.409263750000001,14.53287,13.884953750000001ZM11.58949,8.22114375C11.58949,8.83064375,12.08004,9.321193749999999,12.689540000000001,9.321193749999999C13.29904,9.321193749999999,13.78959,8.83064375,13.78959,8.22114375C13.78959,7.61164075,13.29904,7.12109375,12.689540000000001,7.12109375C12.08004,7.12109375,11.58949,7.61164075,11.58949,8.22114375Z" fill="#00C261" fill-opacity="1"/></g><g><path d="M21.7860125,0L4.2147825,0C1.8957325,0,0.007812797353,1.88795,0.007812797353,4.22185L0.007812797353,21.7633C0.007812797353,24.0972,1.8957325,25.9851,4.2147825,25.9851L21.7860125,25.9851C24.1050125,25.9851,25.9929125,24.0972,25.9929125,21.7633L25.9929125,4.22185C25.9929125,1.90277,24.1050125,0,21.7860125,0ZM9.7596625,17.4225C8.7785225,17.4225,7.9906525,17.2144,6.9946525,17.0212L4.2445225,18.4036L5.0323925,16.04C3.0552725,14.6575,1.8808825,12.8736,1.8808825,10.7181C1.8808825,6.97196,5.4337625,4.0137,9.7596625,4.0137C13.6396125,4.0137,17.0289125,6.37731,17.7128125,9.54373C17.4604125,9.51401,17.2072125,9.49912,16.9546125,9.49912C13.2085125,9.49912,10.2502125,12.2939,10.2502125,15.7278C10.2502125,16.3076,10.3394125,16.8576,10.4881125,17.3779C10.2502125,17.4076,10.0124125,17.4225,9.7596625,17.4225ZM21.3846125,20.1727L21.9792125,22.1349L19.8237125,20.9457C19.0358125,21.1389,18.2479125,21.3471,17.4601125,21.3471C13.7139125,21.3471,10.7557125,18.7902,10.7557125,15.6238C10.7557125,12.4723,13.7139125,9.90051,17.4600125,9.90051C20.9981125,9.90051,24.1496125,12.4723,24.1496125,15.6238C24.1347125,17.4225,22.9603125,18.9983,21.3846125,20.1727Z" fill="#00C261" fill-opacity="1"/></g><g><path d="M18.828125,13.883699374999999C18.828125,14.359394375,19.214646,14.745914375,19.690339,14.745914375C20.166035,14.745914375,20.552554999999998,14.359394375,20.552554999999998,13.883699374999999C20.552554999999998,13.408006375,20.166035,13.021484375,19.690339,13.021484375C19.199792,13.021484375,18.828125,13.408006375,18.828125,13.883699374999999Z" fill="#00C261" fill-opacity="1"/></g></g></svg>

After

Width:  |  Height:  |  Size: 2.9 KiB

1
src/assets/zhifubao.svg

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="26" height="25.99951171875" viewBox="0 0 26 25.99951171875"><g><g><rect x="2.4453125" y="3.380859375" width="23.46553611755371" height="19.711050033569336" rx="0" fill="#FFFFFF" fill-opacity="1"/></g><g><path d="M16.3459,16.953C14.0665,19.6895,11.7089,21.3628,8.13524,21.3628C4.56157,21.3628,2.2049,19.1579,2.50939,16.4986C2.66211,14.7509,3.87815,11.8616,9.1241,12.3188C11.8607,12.546,13.154,13.0777,15.4343,13.8394C16.0433,12.776,16.4977,11.56,16.8775,10.344L6.84189,10.344L6.84189,9.3551L11.7834,9.3551L11.7834,7.60167L5.77762,7.60167L5.77762,6.46009L11.7834,6.46009L11.7834,3.87624Q11.8578,3.49635,12.315,3.49635L14.8244,3.49635L14.8244,6.46009L21.2091,6.46009L21.2091,7.5234L14.7471,7.5234L14.7471,9.27206L19.993,9.27206C19.5358,11.2498,18.777,13.0729,17.8655,14.5934C19.1588,15.0506,24.4029,16.6456,25.9234,17.1028L25.9234,3.80084C25.9234,1.67325,24.1757,1.67839e-7,22.1225,1.67839e-7L3.80275,0C1.67229,0,0,1.7477,0,3.80084L0,22.1989C0,24.3265,1.7477,25.9997,3.80084,25.9997L22.1989,25.9997C24.3265,25.9997,25.9997,24.252,25.9997,22.1989L25.9997,21.2845C24.7054,20.6784,18.9297,18.169,16.3459,16.953ZM3.57271,16.2686C3.34554,17.2574,3.9526,19.6151,7.75248,19.6151C10.0318,19.6151,12.315,18.1719,14.1372,15.8142C11.5524,14.5209,9.42287,13.9138,6.99079,13.9138C4.86415,13.9892,3.79988,15.2797,3.57271,16.2686Z" fill="#006AFF" fill-opacity="1"/></g></g></svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

112
src/components/CustomDropdown.vue

@ -1,36 +1,41 @@
<template>
<div class="custom-select" v-clickaway="closeDropdown" ref="dropdown" :class="{ 'is-open': isOpen }" :style="{width}">
<div class="custom-select" v-clickaway="closeDropdown" ref="dropdown" :class="{ 'is-open': isOpen }" :style="{width}">
<!-- 触发按钮 -->
<div class="select-trigger" @click="toggleDropdown">
<slot name="trigger">
{{ selectedItem ? selectedItem.label : placeholder }}
{{ selectedItem && selectedItem[displayKey] ? selectedItem[displayKey] : placeholder }}
</slot>
<img class="arrow-icon" :src="isOpen? require('../assets/dropDown_open.png'):require('../assets/dropDown_expand.png')" alt="">
<!-- <span class="arrow-icon">{{ isOpen ? img : "▼" }}</span> -->
</div>
<!-- 自定义内容 -->
<!-- 下拉内容 -->
<transition name="slide-fade">
<div v-if="isOpen" class="select-dropdown">
<slot v-if="isOpen" name="normal"></slot>
<div v-if="options">
<div v-for="(item, index) in options" :key="index" class="dropdown-item"
<div v-if="options && options.length">
<div v-for="(item, index) in options" :key="index" class="dropdown-item"
:class="{ 'is-selected': isSelected(item) }" @click="selectItem(item)">
<slot name="item" :item="item">
{{ item.label }}
<div class="flex-between" v-if="item">
<div class="left">
<p class="one">{{ item[displayKey] }}</p>
</div>
<div class="right">
<img v-if="selectedItem && selectedItem[displayKey] === item[displayKey]"
src="../assets/drop-selected.svg" alt="">
</div>
</div>
</slot>
</div>
</div>
<!-- <slot v-if="isOpen" name="options_null"></slot> -->
<div class="flex-between dropdown-item" v-if="options_null" @click="selectNullItem">
<div class="flex-between dropdown-item" v-if="options_null" @click="selectNullItem">
<div class="left">
<p class="one">暂无收款账号</p>
<p>暂时没有收款账号我想稍后配置</p>
<p class="one">暂无收款账号</p>
<p>暂时没有收款账号我想稍后配置</p>
</div>
<div class="right">
<img src="../assets/drop-selected.svg" alt="">
<img src="@/assets/drop-selected.svg" alt="">
</div>
</div>
</div>
@ -39,21 +44,25 @@
</template>
<script>
// import { mixin as clickaway } from 'vue-clickaway';
import { EventBus } from '@/utils/eventBus'
export default {
props: {
width:{
width: {
type: String,
default: "200px",
},
options: {
type: Array,
// required: true,
default: () => [],
validator: (value) => {
return Array.isArray(value) && value.every(item =>
item && typeof item === 'object'
)
}
},
options_null: {
type: Object,
default: () => {},
type: Boolean,
default: false,
},
placeholder: {
type: String,
@ -63,49 +72,79 @@ export default {
type: [String, Number, Object],
default: null,
},
valueKey: {
type: String,
default: "value",
},
displayKey: {
type: String,
default: "label",
},
},
// mixins: [clickaway],
data() {
return {
isOpen: false,
selectedItem: null,
};
},
mounted(){
// document.addEventListener('click', this.handleClickOutside);
},
beforeUnmount() {
//
// document.removeEventListener('click', this.handleClickOutside);
},
watch: {
value: {
immediate: true,
handler(newVal) {
this.selectedItem = this.options.find((item) => item.value === newVal);
if (this.options && this.options.length && newVal !== undefined && newVal !== null) {
this.selectedItem = this.options.find((item) =>
item && item[this.valueKey] === newVal
) || null;
}
},
},
options: {
immediate: true,
handler(newVal) {
if (newVal && newVal.length && this.value !== undefined && this.value !== null) {
this.selectedItem = newVal.find((item) =>
item && item[this.valueKey] === this.value
) || null;
} else {
this.selectedItem = null;
}
}
}
},
created() {
//
EventBus.$on('close-all-dropdowns', this.closeDropdown)
},
beforeDestroy() {
//
EventBus.$off('close-all-dropdowns', this.closeDropdown)
},
methods: {
closeDropdown() {
this.isOpen = false;
},
toggleDropdown() {
toggleDropdown(e) {
if(e) e.stopPropagation();
if ((!this.options || !this.options.length) && !this.options_null) {
// console.warn('Dropdown options are empty');
// return;
}
//
EventBus.$emit('close-all-dropdowns')
this.isOpen = !this.isOpen;
},
selectItem(item) {
if (!item) return;
this.selectedItem = item;
this.$emit("input", item.value); // v-model
this.$emit("change", item); // change
this.$emit("input", item[this.valueKey]);
this.$emit("change", item);
this.isOpen = false;
},
isSelected(item) {
return this.selectedItem && this.selectedItem.value === item.value;
return item && this.selectedItem && this.selectedItem[this.valueKey] === item[this.valueKey];
},
selectNullItem(){
// this.$emit("input", null); // v-model
this.$emit("changeNormal", ''); // change
selectNullItem() {
this.$emit("changeNormal", '');
this.isOpen = false;
}
},
@ -113,6 +152,7 @@ export default {
</script>
<style scoped>
/* Your existing styles remain the same */
.custom-select {
height: 38px;
position: relative;
@ -176,8 +216,8 @@ export default {
}
.dropdown-item.is-selected {
background-color: transparent;
color: #fff;
background-color: #F6F7FA;
color: #006AFF;
}
/* 展开收起动画 */

6
src/components/GuipDialog.vue

@ -18,7 +18,7 @@
</span>
</el-dialog>
</template>
<script>
import GuipButton from '@/components/GuipButton.vue';
@ -117,8 +117,8 @@
},
};
</script>
<style scoped lang="scss">
<style scoped lang="scss">
.el-dialog{
/* width: 599px; */
// min-height: 344px;

131
src/components/GuipSwitch.vue

@ -1,11 +1,13 @@
<template>
<el-form-item>
<div class="flex switchWrap">
<span class="switchDesc" v-if="activeText || inactiveText">{{ internalValue ? activeText : inactiveText
}}</span>
<el-form-item :prop="prop" :label="label" :rules="rules">
<div class="switchWrap">
<span :class="['switchDesc', { 'fl': float == 'left' }, { 'fr': float == 'right' }]"
v-if="activeText || inactiveText">
{{ internalValue === activeValue ? activeText : inactiveText}}</span>
<el-switch v-model="internalValue" :active-color="activeColor" :inactive-color="inactiveColor" v-bind="$attrs"
:disabled="disabled || loading" @change="handleChange">
<el-switch v-model="internalValue" :active-color="activeColor" :inactive-color="inactiveColor"
v-bind="$attrs" :disabled="disabled" :active-value="activeValue" :inactive-value="inactiveValue"
@change="handleChange">
<!-- 自定义开启时的图标 -->
<template #active-icon>
</template>
@ -13,19 +15,23 @@
<template #inactive-icon>
</template>
</el-switch>
</div>
</el-form-item>
</template>
<!-- 他这个描述文案不太符合当前使用暂且不用 -->
<!-- :active-text="activeText"
:inactive-text="inactiveText" -->
<!-- 设置active-value和inactive-value属性接受Boolean, String或Number类型的值 -->
<script>
<script>
export default {
name: 'CustomSwitch',
name: 'GuipSwitch',
inheritAttrs: false,
props: {
// modelValue: { type: [Boolean, String, Number], default: undefined },
value: { type: [Boolean, String, Number], default: undefined },
prop: String,
label: String,
rules: Array,
labelWidth: String,
activeText: {
type: String,
default: '',
@ -34,8 +40,12 @@ export default {
type: String,
default: '',
},
modelValue: {
type: [Boolean,String,Number],
activeValue: {
type: [Boolean, String, Number],
default: true,
},
inactiveValue: {
type: [Boolean, String, Number],
default: false,
},
activeColor: {
@ -46,67 +56,88 @@ export default {
type: String,
default: '#BABDC2',
},
float: {
type: String,
default: 'left',
},
disabled: {
type: Boolean,
default: false,
},
},
emits: ['update:modelValue', 'change'],
data() {
return {
internalValue: this.modelValue,
loading: false, //
};
internalValue: this.value,
errorMsg: ''
}
},
computed: {
// internalValue: {
// get() {
// return this.modelValue !== undefined ? this.modelValue : this.value
// },
// set(val) {
// this.$emit('update:modelValue', val)
// this.$emit('input', val)
// }
// }
},
// watch: {
// modelValue(newVal) {
// console.log(newVal,'newVal---');
// this.internalValue = newVal;
// },
// },
watch: {
value(newVal) {
this.internalValue = newVal;
},
internalValue(newVal) {
this.$emit('input', newVal);
this.internalValue = newVal
console.log(this.internalValue, 88888)
},
// modelValue(newVal) {
// this.internalValue = newVal
// },
},
methods: {
// switch
async handleChange(value) {
this.loading = true;
try {
//
await new Promise((resolve) => setTimeout(resolve, 1000));
this.internalValue = value;
this.$emit('update:modelValue', value);
this.$emit('change', value);
} catch (error) {
console.error('操作失败:', error);
} finally {
this.loading = false;
}
handleChange(val) {
// this.$emit('update:modelValue', val)
this.$emit('input', val)
this.$emit('change', val)
this.validateField()
},
},
components: {
},
};
validateField() {
if (this.prop && this.$parent.validateField) {
this.$parent.validateField(this.prop, (error) => {
this.errorMsg = error || ''
})
}
}
}
}
</script>
<style scoped>
.switchWrap {
align-items: center;
/* align-items: center; */
}
.fl {
float: left;
margin-right: 12px;
}
.fr {
float: right;
margin-left: 12px;
}
.switchDesc {
font-size: 12px;
font-weight: normal;
line-height: 13px;
line-height: 20px;
letter-spacing: 0.08em;
font-variation-settings: "opsz" auto;
/* text/text_3 */
color: #626573;
display: inline-block;
margin-right: 15px;
}
.error-msg {
color: #f56c6c;
font-size: 12px;
margin-left: 10px;
}
</style>

221
src/components/Tooltip.vue

@ -0,0 +1,221 @@
<template>
<transition name="fade">
<div v-if="visible" :class="['position-message', type, position]" :style="positionStyle">
<img :src="defaultImages[type]" class="message-image" />
<span>{{ currentMessage }}</span>
</div>
</transition>
</template>
<script>
export default {
props: {
type: {
type: String,
default: 'info',
validator: val => ['info', 'success', 'error', 'warning'].includes(val)
},
position: {
type: String,
default: 'top',
validator: val => ['top', 'bottom'].includes(val)
},
message: String,
target: null,
offset: {
type: Number,
default: 10
},
duration: {
type: Number,
default: 2000
}
},
data() {
return {
visible: false,
positionStyle: {},
currentMessage: this.message, // 使message
defaultImages: {
success: require('@/assets/message_Success.png'),
info: require('@/assets/message_Warning.png'),
warning: require('@/assets/message_Warning.png'),
error: require('@/assets/message_error.png')
},
timer: null
}
},
watch: {
// propsmessage
message(newVal) {
this.currentMessage = newVal;
this.$nextTick(() => {
this.calculatePosition();
});
}
},
computed: {
iconClass() {
return {
info: 'el-icon-info',
success: 'el-icon-success',
error: 'el-icon-error'
}[this.type]
}
},
methods: {
show() {
this.visible = true
this.$nextTick(() => {
this.calculatePosition();
// duration0
if (this.duration > 0) {
this.clearTimer();
this.timer = setTimeout(() => {
this.hide();
}, this.duration);
}
});
return this;
},
hide() {
this.visible = false;
this.clearTimer();
return this;
},
updateMessage(newMessage) {
this.currentMessage = newMessage;
this.$nextTick(() => {
this.calculatePosition();
});
return this;
},
updateConfig(newConfig) {
//
if (newConfig.message !== undefined) {
this.currentMessage = newConfig.message;
}
if (newConfig.type) {
this.$emit('update:type', newConfig.type);
}
if (newConfig.position) {
this.$emit('update:position', newConfig.position);
}
this.$nextTick(() => {
this.calculatePosition();
});
return this;
},
destroy() {
this.hide();
// DOM
setTimeout(() => {
if (this.$el && this.$el.parentNode) {
this.$el.parentNode.removeChild(this.$el);
}
this.$destroy();
}, 300);
},
clearTimer() {
if (this.timer) {
clearTimeout(this.timer);
this.timer = null;
}
},
calculatePosition() {
if (!this.$el || !this.visible) return;
const targetEl = typeof this.target === 'string'
? document.querySelector(this.target)
: this.target?.$el || this.target;
if (!targetEl?.getBoundingClientRect) {
console.error('Invalid target:', this.target);
return;
}
const targetRect = targetEl.getBoundingClientRect();
const messageWidth = this.$el.offsetWidth;
const viewportWidth = window.innerWidth;
const messageHeight = this.$el.offsetHeight;
const scrollY = window.scrollY || window.pageYOffset;
//
let left = targetRect.left + targetRect.width / 2 - messageWidth / 2;
let top = 0;
//
if (left < 5) {
left = 5; //
} else if (left + messageWidth > viewportWidth - 5) {
left = viewportWidth - messageWidth - 5; //
}
if (this.position === 'top') {
top = targetRect.top + scrollY - this.offset - messageHeight;
//
if (top < scrollY) {
top = targetRect.bottom + scrollY + this.offset;
}
} else {
top = targetRect.bottom + scrollY + this.offset;
//
if (top + messageHeight > scrollY + window.innerHeight) {
top = targetRect.top + scrollY - this.offset - messageHeight;
}
}
this.positionStyle = {
top: `${top}px`,
left: `${left}px`,
right: 'auto'
};
},
},
beforeDestroy() {
this.clearTimer();
}
}
</script>
<style scoped lang="scss">
.position-message {
position: absolute;
min-width: 100px;
padding: 14px 21px;
border-radius: 4px;
z-index: 9999;
display: flex;
align-items: center;
background: #FFFFFF;
box-sizing: border-box;
box-shadow: 0px 3px 8px 0px rgba(0, 0, 0, 0.16);
pointer-events: none;
span {
letter-spacing: 0.08em;
color: #626573;
white-space: nowrap;
}
}
.message-image {
width: 18px;
height: 18px;
margin-right: 10px;
flex-shrink: 0;
}
.fade-enter-active,
.fade-leave-active {
transition: opacity 0.3s, transform 0.3s;
}
.fade-enter,
.fade-leave-to {
opacity: 0;
transform: translateY(-10px);
}
</style>

456
src/components/addPay.vue

@ -0,0 +1,456 @@
<template>
<div class="config-offline-wrap">
<el-form>
<GuipDialog :dialogVisible="addPayDialogVisible" :title="addPayTitle" :show-close-button="false"
:show-cancel-button="showCancelButton" @confirm="addPayment" @cancel="handleCancel"
@close="handleClose" @dialogVisibleChange="dialogVisibleChange" :confirmText="addPayconfirmText" width="599px">
<!-- 自定义内容 -->
<div>
<!-- 淘宝 -->
<div class="taobaopay" v-if="addPayType==payTypeTaoBao">
<div class="beforeNotice">
<h4 class="flex"> <img src="@/assets/site/siteSemInfo_Icon.svg" alt=""> 前期准备事项</h4>
<p class="mt12 flex">
请确保使用要添加的淘宝主账号登录并授权
</p>
<p class="mt10 flex">
如未购买快乐帮手服务或已过期会跳转到购买服务页面
</p>
</div>
</div>
<!-- 微信 -->
<div class="weixinpay" v-if="addPayType==payTypeWeixin">
<div class="beforeNotice">
<h4 class="flex"> <img src="@/assets/site/siteSemInfo_Icon.svg" alt=""> 前期准备事项</h4>
<p class="mt12">1.申请公司微信支付<a href="https://zhic.yuque.com/staff-chwecz/xhk8nt/ggkqm3" target="_blank"><img src="@/assets/site/form_qua_ic.svg" alt="">常见问题</a> </p>
<p class="mt12 flex">
2.前往<a href="https://pay.weixin.qq.com/"
class="flex" target="_blank">
<img src="@/assets/site/form_linkActive.svg" alt="">微信商户平台</a>
</p>
<p> 在产品中心开通Native支付如需使用微信版开通JSAPI支付</p>
</div>
<el-form>
<GuipFormItem column="column" class="mb24" label="1. 公司简称">
<span class="desc" slot="formRight">请输入公司简称便于您区分账号所属公司</span>
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="company_short_name" prop="company_short_name" placeholder="6字以内">
</GuipInput>
</GuipFormItem>
<GuipFormItem column="column" class="mb24" label="2. 支付商户号(mch_id)">
<span class="desc" slot="formRight"><a href='https://pay.weixin.qq.com/' target='_blank'>微信支付平台</a>账户中心商户信息微信支付商户号</span>
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="mch_id" prop="mch_id" placeholder="请输入商户号">
</GuipInput>
</GuipFormItem>
<GuipFormItem column="column" class="mb24" label="3. 微信支付秘钥">
<span class="desc" slot="formRight"><a href='https://pay.weixin.qq.com/' target='_blank'>微信支付平台</a>账号中心账户设置API安全APIv2密钥<p class="mt10">注意支付密钥不能设置为纯数字</p></span>
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="apiv2" prop="apiv2" placeholder="请输入微信支付秘钥">
</GuipInput>
</GuipFormItem>
<GuipFormItem column="column" class="mb24" label="4. 公众号APPID">
<span class="desc" slot="formRight"><a href='https://mp.weixin.qq.com/' target='_blank'>公众平台</a>设置与开发基本配置公众号开发信息开发者IDAPPID</span>
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="appid" prop="appid" placeholder="请输入公众号APPID">
</GuipInput>
</GuipFormItem>
</el-form>
</div>
<!-- 支付宝 -->
<div class="alipay" v-if="addPayType==payTypeAlipay">
<el-tabs v-model="isPayPublic" @tab-click="handleClick">
<!-- <el-tab-pane label="我有公司,使用本公司支付宝" name="0"> -->
<el-form>
<GuipFormItem column="column" class="mb24" label="1. 公司简称">
<span class="desc" slot="formRight">请输入公司简称便于您区分账号所属公司</span>
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="company_short_name" prop="company_short_name" placeholder="6字以内"></GuipInput>
</GuipFormItem>
<GuipFormItem column="column" class="mb24" label="2. 公司支付宝账号">
<span class="desc flex gap12" slot="formRight">仅支持已签约 当面付 功能的公司支付宝 <a href='https://pay.weixin.qq.com/' class="guide"
target='_blank'><img src="@/assets/site/form_qua_ic.svg" alt="">指南</a></span>
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="alipay_account" prop="mch_id" placeholder="请输入公司支付宝账号"></GuipInput>
</GuipFormItem>
</el-form>
<!-- </el-tab-pane> -->
<!-- <el-tab-pane label="我无公司,申请平台代收款" name="1" v-if="isExistSelfSupplys===false">
<div class="beforeNotice">
<h4 class="flex"> <img src="@/assets/site/siteSemInfo_Icon.svg" alt=""> 须知</h4>
<p class="mt12">使用平台支付宝支付平台收取5%的服务费</p>
<p class="mt12 flex">使用平台支付宝支付真实姓名必须和支付宝账号实名认证姓名统一</p>
</div>
<el-form>
<GuipFormItem column="column" class="mb24" label="1. 收款人姓名">
<span class="desc" slot="formRight">请输入支付宝绑定的银行卡的持卡人姓名</span>
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="receive_payment_name" prop="company_short_name" placeholder="6字以内"></GuipInput>
</GuipFormItem>
<GuipFormItem column="column" class="mb24" label="2. 收款支付宝账号">
<span class="desc" slot="formRight">请输入有效账号</span>
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="receive_payment_account" prop="mch_id" placeholder="请输入有效收款支付宝账号"></GuipInput>
</GuipFormItem>
</el-form>
</el-tab-pane> -->
</el-tabs>
</div>
<!-- 拼多多 -->
<div class="pddpay" v-if="addPayType==payTypePdd">
<div class="beforeNotice">
<h4 class="flex"> <img src="@/assets/site/siteSemInfo_Icon.svg" alt=""> 前期准备事项</h4>
<p class="mt12 flex">主账号登录并授权<a :href="pddAuthUrl" class="flex" target="_blank"><img src="@/assets/site/form_linkActive.svg" alt="">去授权</a></p>
<p class="mt12 flex gray">如未购买快乐帮手服务或已过期会跳转到购买服务页面</p>
<p class="mt5 flex gray">授权成功后会进入快乐帮手烽火台复制右上角名称填入下方保存</p>
</div>
<el-form>
<GuipFormItem column="column" class="mb24" label="账号名称">
<!-- <span class="desc" slot="formRight">账号名称</span> -->
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="pdd_shop_name" prop="company_short_name" placeholder="请输入账号名称"></GuipInput>
</GuipFormItem>
</el-form>
</div>
</div>
</GuipDialog>
</el-form>
</div>
</template>
<script>
import GuipInput from '@/components/GuipInput.vue';
import GuipFormItem from '@/components/GuipFormItem.vue';
import GuipDialog from '@/components/GuipDialog.vue';
//
const PAY_TYPE_TAOBAO = 0; //
const PAY_TYPE_WEIXIN = 2; //
const PAY_TYPE_ALIPAY = 3; //
const PAY_TYPE_JINGDONG = 4; //
const PAY_TYPE_PDD = 11; //
export default {
//
name: 'addPay',
props: {
//
payType: {
type: [String, Number],
default: '-1',
// validator: value => ['success', 'warning', 'error', 'info'].includes(value)
},
//
visible: {
type: Boolean,
default: false
},
// url
taobaoAuthUrl: {
type: String,
default: ''
},
// url
pddAuthUrl: {
type: String,
default: ''
},
// url
jdAuthUrl: {
type: String,
default: ''
},
//
isExistSelfSupplys: {
type: Boolean,
default: false
},
},
components: {
GuipInput,
GuipFormItem,
GuipDialog,
},
data() {
return {
//
payTypeTaoBao: PAY_TYPE_TAOBAO,
payTypeWeixin: PAY_TYPE_WEIXIN,
payTypeAlipay: PAY_TYPE_ALIPAY,
payTypeJingdong: PAY_TYPE_JINGDONG,
payTypePdd: PAY_TYPE_PDD,
paytypeDesc: {
payTypeTaoBao: '淘宝/天猫店铺',
payTypeWeixin: '微信收款',
payTypeAlipay: '支付宝收款',
payTypeJingdong: '京东店铺',
payTypePdd: '拼多多店铺'
},
//
addPayType: -1,
//
addPayDialogVisible: false,
//
showCancelButton: true,
//
showCloseButton: true,
//
addPayTitle: '',
//
addPayconfirmText: '确定',
//
company_short_name: '',
//
mch_id: '',
//
apiv2: '',
// APPID
appid: '',
//
alipay_account: '',
//
receive_payment_account: '',
//
receive_payment_name: '',
// 0 1
isPayPublic: '0',
//
pdd_shop_name: '',
// localSiteInfo: { ...this.siteInfo }
}
},
computed: {
// ...mapState(['pageTitle']) // VuexshowSidebar
},
mounted() {
// store.commit('SET_PAGETITLE', '广');
},
methods: {
updateDialogByPayType() {
if (this.addPayType > -1) {
//
let typeDesc = '';
// addPayType
for (let key in this.paytypeDesc) {
if (this[key] === this.addPayType) {
typeDesc = this.paytypeDesc[key];
break;
}
}
this.addPayTitle = '添加' + typeDesc;
//
if (this.addPayType === this.payTypeTaoBao || this.addPayType === this.payTypeJingdong) {
this.addPayconfirmText = '去授权';
} else {
this.addPayconfirmText = '确定';
}
}
},
resetForm() {
//
this.company_short_name = '';
this.mch_id = '';
this.apiv2 = '';
this.appid = '';
this.alipay_account = '';
this.receive_payment_account = '';
this.receive_payment_name = '';
this.pdd_shop_name = '';
this.isPayPublic = '0'; //
},
// ---start
showAddPaymentMethodDialog(type, type_desc) {
console.log(type, 'type');
this.addPayDialogVisible = true;
this.addPayTitle = '添加' + type_desc;
this.addPayType = type;
if (type == PAY_TYPE_TAOBAO || type == PAY_TYPE_JINGDONG) {
this.addPayconfirmText = '去授权';
}
},
//
addPayment() {
if (this.addPayType == PAY_TYPE_TAOBAO) {
window.open(this.taobaoAuthUrl, '_blank');
} else if (this.addPayType == PAY_TYPE_WEIXIN) {
this.$http('POST', '/agentnew/ajax_add_weixinpay', {
company_short_name: this.company_short_name,
mch_id: this.mch_id,
apiv2: this.apiv2,
appid: this.appid
}).then(response => {
this.$nextTick(() => {
if (response.status) {
this.init(response.data);
this.$Message.success(response.info);
} else {
this.$Message.error(response.info);
}
})
}).catch(error => {
console.error(error, 'error')
})
} else if (this.addPayType == PAY_TYPE_ALIPAY) {
this.$http('POST', '/agentnew/ajax_add_alipay', {
company_short_name: this.company_short_name,
alipay_account: this.alipay_account,
is_pay_public: this.isPayPublic,
receive_payment_account: this.receive_payment_account,
receive_payment_name: this.receive_payment_name
}).then(response => {
this.$nextTick(() => {
if (response.status) {
this.init(response.data.payid);
if (this.isPayPublic == 1) {
this.$Message.success(response.info);
} else {
window.open(response.data.authurl, '_blank');
}
} else {
this.$Message.error(response.info);
}
})
}).catch(error => {
console.error(error, 'error')
})
} else if (this.addPayType == PAY_TYPE_PDD) {
this.$http('POST', '/agentnew/ajax_add_pddpay', {
shop_name: this.pdd_shop_name,
}).then(response => {
this.$nextTick(() => {
if (response.status) {
this.init(response.data);
this.$Message.success(response.info);
} else {
this.$Message.error(response.info);
}
})
}).catch(error => {
console.error(error, 'error')
})
} else if (this.addPayType == PAY_TYPE_JINGDONG) {
window.open(this.jdAuthUrl, '_blank');
}
this.init();
},
//
handleCancel() {
this.init();
},
//
handleClose() {
this.init();
},
dialogVisibleChange(data) {
console.log(data, 'data098908090');
},
handleClick(tab, event) {
console.log(tab, event);
},
init(payid) {
this.addPayDialogVisible = false;
this.$emit('update:visible', false);
this.resetForm(); //
if(payid){
this.$http('POST', '/agentnew/ajax_get_payinfo', {
payid: payid,
}).then(response => {
this.$nextTick(() => {
if (response.status) {
this.$emit('update:data', response.data);
}
})
}).catch(error => {
console.error(error, 'error')
})
}
},
},watch: {
visible(newVal) {
this.addPayDialogVisible = newVal;
},
payType(newVal) {
this.addPayType = newVal;
this.updateDialogByPayType();
this.resetForm(); //
},
}
}
</script>
<style scoped lang="scss">
.beforeNotice {
h4 {
margin: 0;
gap: 8px;
}
margin-bottom: 18px;
text-align: left;
box-sizing: border-box;
padding: 20px 14px;
border-radius: 4px;
/* middle/middle_blue_1 */
background: #F2F7FF;
/* middle/middle_blue_3 */
border: 1px solid #BFDAFF;
div {
margin-top: 2px;
padding-left: 23px;
p {
color: #8A9099;
}
}
p {
color: #1E2226;
i {
font-style: normal;
}
&:last-child {
display: flex;
align-items: stretch;
b {
font-weight: normal;
color: #8A9099;
display: inline-flex;
img {
margin-left: 4px;
}
}
}
}
a {
text-decoration: none;
color: #006AFF;
margin-right: 10px;
img {
margin-left: 5px;
margin-right: 5px;
}
}
}
.guide{
display: flex;
align-items: center;
gap: 6px;
color: #8A9099 !important;
font-size: 12px;
}
a {
color: #006AFF;
text-decoration: none;
}
</style>

2
src/components/paymentMethod.vue

@ -14,7 +14,7 @@
<p>{{ item.num }}</p>
</dd>
</dl>
<GuipSwitch :modelValue="item.flag" activeText="开启" inactiveText="关闭" @change="onSwitchChange">
<GuipSwitch :value="item.flag" activeText="开启" inactiveText="关闭" @change="onSwitchChange">
</GuipSwitch>
</div>
</div>

4
src/main.js

@ -14,6 +14,8 @@ import LoadingService from './services/loading'
import { directive as clickaway } from 'vue-clickaway';
import GuipMessage from '@/components/GuipMessage/index';
import HeaderIcon from './utils/headerIcon'
import PositionMessage from './utils/tooltip'
Vue.prototype.$loadingFn = LoadingService;
Vue.config.productionTip = false;
Vue.prototype.$http = request;
@ -21,6 +23,8 @@ Vue.use(ElementUI);
Vue.use(GuipMessage)
Vue.directive('clickaway', clickaway);
Vue.mixin(HeaderIcon)
Vue.use(PositionMessage)
new Vue({
router,
store,

12
src/router/index.js

@ -47,6 +47,18 @@ const routes = [
// hideInBreadcrumb: true // 可选:隐藏当前项
}
},
{
path: '/weChatPayment',
name: '微信收款',
component: () => import('../views/weChatPayment.vue'),
meta: {
title: '微信收款',
breadcrumbParent: '编辑医院' // 手动指定父级
// r如果想隐藏中间层级
// breadcrumbParent: '首页', // 跳过医生信息
// hideInBreadcrumb: true // 可选:隐藏当前项
}
},
{
path: '/addNewTreatment',

20
src/store/index.js

@ -35,7 +35,25 @@ export default new Vuex.Store({
desc: 'siteMessage3'
}
]
},{
},
{
name: '收款设置',
path: '',
noToPath:true,
img: 'menu/Totalprofit1.svg',
imgActive: require('@/assets/menu/Totalprofit.svg'),
list: [
{
name: '线上收款',
desc: 'siteMessage6'
},
{
name: '收挂号费',
desc: 'siteMessage7'
},
]
},
{
name: '项目管理',
path: '',
noToPath:true,

3
src/utils/eventBus.js

@ -0,0 +1,3 @@
// 在项目中创建 eventBus.js
import Vue from 'vue'
export const EventBus = new Vue()

58
src/utils/tooltip.js

@ -0,0 +1,58 @@
import Vue from 'vue'
import Tooltip from '@/components/Tooltip.vue'
const PositionMessageConstructor = Vue.extend(Tooltip)
// 存储实例引用,便于全局控制
const instances = []
function showMessage(options) {
const instance = new PositionMessageConstructor({
propsData: options
}).$mount()
document.body.appendChild(instance.$el)
instances.push(instance)
const showInstance = instance.show()
// 添加自动隐藏(duration为0表示一直显示)
if (options.duration !== 0) {
const duration = options.duration || 2000
setTimeout(() => {
instance.hide()
setTimeout(() => {
if (instance.$el && instance.$el.parentNode) {
instance.$el.parentNode.removeChild(instance.$el)
}
// 从实例数组中移除
const index = instances.indexOf(instance)
if (index > -1) {
instances.splice(index, 1)
}
}, 300) // 等待动画结束
}, duration)
}
return showInstance
}
// 隐藏所有tooltip
function hideAll() {
instances.forEach(instance => {
instance.hide()
setTimeout(() => {
if (instance.$el && instance.$el.parentNode) {
instance.$el.parentNode.removeChild(instance.$el)
}
}, 300)
})
instances.length = 0
}
export default {
install(Vue) {
Vue.prototype.$positionMessage = showMessage
Vue.prototype.$hideAllPositionMessages = hideAll
}
}

6
src/views/HomeView.vue

@ -31,8 +31,8 @@
<el-avatar :src="item.avator" v-if="item.avator"></el-avatar>
<span class="name">{{ item.name }}</span>
<span>{{ item.phone }}</span>
<GuipSwitch :modelValue="Boolean(Number(item.status))" @change="onSwitchChange(item, index)">
</GuipSwitch>
<GuipSwitch :value="Boolean(Number(item.status))" @change="onSwitchChange(item, index)" :active-value="true" :inactive-value="false"></GuipSwitch>
<GuipButton type="text" @click="editDoctor(item, index)">编辑</GuipButton>
</div>
<div class="right">
@ -77,7 +77,7 @@
<el-table-column prop="create" label="时间" min-width="250"> </el-table-column>
<el-table-column prop="stock" fixed="right" min-width="110">
<template slot-scope="scope">
<GuipSwitch :modelValue="scope.row.status" active-value="1" inactive-value="0" @change="onSwitchChange1(scope.row)"></GuipSwitch>
<GuipSwitch :value="scope.row.status" active-value="1" inactive-value="0" @change="onSwitchChange1(scope.row)"></GuipSwitch>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" min-width="120px">

884
src/views/HosInformation.vue

File diff suppressed because it is too large

2
src/views/Register.vue

@ -456,7 +456,7 @@
</el-table-column>
<el-table-column prop="stock" fixed="right" label="上首页" min-width="160">
<template slot-scope="scope">
<GuipSwitch :modelValue="scope.row.homeFlag" @change="onSwitchChange(scope.row)">
<GuipSwitch :value="scope.row.homeFlag" @change="onSwitchChange(scope.row)">
</GuipSwitch>
</template>
</el-table-column>

4
src/views/elementGroups.vue

@ -269,7 +269,7 @@
<div class="ele-item">
<label for="">开关L</label>
<GuipSwitch :modelValue="switchValue" activeText="开启" inactiveText="关闭" @change="onSwitchChange">
<GuipSwitch :value="switchValue" activeText="开启" inactiveText="关闭" @change="onSwitchChange">
</GuipSwitch>
</div>
<el-button type="primary" @click="submitForm">Submit</el-button>
@ -830,7 +830,7 @@ export default {
},
// ---end
//
//
handlePriceClick(row) {
this.currentRow = row;
this.editedPrice = row.price;

342
src/views/weChatPayment.vue

@ -0,0 +1,342 @@
<template>
<div class="site-setting-wrap pagePadding">
<div class="siteMessage flex-common" id="siteMessage1">
<p class="littleTitle mb32">微信收款</p>
<div class="weixinpay">
<div class="beforeNotice">
<h4 class="flex"> <img src="@/assets/site/siteSemInfo_Icon.svg" alt=""> 前期准备事项</h4>
<div class="flex-between">
<p class="mt12 flex">1.申请公司微信支付<a class="guide" href="https://zhic.yuque.com/staff-chwecz/xhk8nt/ggkqm3"
target="_blank"><img src="@/assets/site/form_qua_ic.svg" alt="">指南</a> </p>
<span class=" flex">
<a href="https://pay.weixin.qq.com/" class="flex" target="_blank">
<img src="@/assets/site/form_linkActive.svg" alt="">微信商户平台</a>
</span>
</div>
<p class="mt12">2.登录微信商户平台在产品中心开通Native支付如需使用微信版开通JSAPI支付</p>
</div>
<el-form>
<div class="flex-wrap">
<div class="flex-left">
<GuipFormItem column="column" class="mb24" label="公司简称" :required="true">
<span class="desc" slot="formRight">请输入公司简称便于您区分账号所属公司</span>
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="company_short_name"
prop="company_short_name" placeholder="请输入">
</GuipInput>
</GuipFormItem>
<GuipFormItem column="column" class="mb24" label="微信支付商户号" :required="true">
<span class="desc" slot="formRight">
<a href='https://pay.weixin.qq.com/' class="guide"
target='_blank'><img src="@/assets/site/form_qua_ic.svg" alt="">指南</a>
</span>
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="mch_id" prop="mch_id"
placeholder="请输入">
</GuipInput>
</GuipFormItem>
</div>
<div class="flex-line"></div>
<div class="flex-right">
<GuipFormItem column="column" class="mb24" label="微信支付秘钥" :required="true">
<span class="desc" slot="formRight"><a href='https://pay.weixin.qq.com/' class="guide"
target='_blank'><img src="@/assets/site/form_qua_ic.svg" alt="">指南</a>
</span>
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="apiv2" prop="apiv2"
placeholder="不能设为纯数字">
</GuipInput>
</GuipFormItem>
<GuipFormItem column="column" class="mb24" label="公众号APPID" :required="true">
<span class="desc" slot="formRight"><a href='https://mp.weixin.qq.com/' class="guide"
target='_blank'><img src="@/assets/site/form_qua_ic.svg" alt="">指南</a></span>
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="appid" prop="appid"
placeholder="不能设为纯数字">
</GuipInput>
</GuipFormItem>
</div>
</div>
</el-form>
</div>
</div>
<div class="siteMessage flex-common mt12" id="siteMessage2">
<h3 class="mb12">管理证书</h3>
<div class="beforeNotice">
<span class="flex"> <img src="@/assets/site/siteSemInfo_Icon.svg" alt="" style="margin-right: 5px;">
API证书获取
<a href="https://pay.weixin.qq.com/" class="flex" target="_blank"><img style="margin-right: 5px;"
src="@/assets/site/form_linkActive.svg" alt="">微信商户平台</a>账户中心账户设置API安全
</span>
</div>
<el-form>
<div class="flex-wrap">
<div class="flex-left">
<div class="uploadwrap">
<label class="flex upload-title gap8">上传 apiclient_cert.pem 证书<img class="ml-4"
src="@/assets/require.svg" /></label>
<el-upload class="upload-demo" :on-change="handleAvatarChange" action="#" :multiple="false"
:limit="Number(1)" ref="avatorUpload" :auto-upload="false">
<GuipButton class="upload-button" slot="trigger" type="ignore"
:btnstyle="{ width: '118px' }">
<i class="bgImg"></i>选择文件
</GuipButton>
</el-upload>
<p class="uploaded" v-if="payinfo.cert_uploaded">已上传</p>
<p class="normalUpload notuploaded" v-else>未上传任何文件</p>
</div>
</div>
<div class="flex-line"></div>
<div class="flex-right">
<div class="uploadwrap">
<label class="flex upload-title gap8">上传 apiclient_key.pem 证书<img class="ml-4"
src="@/assets/require.svg" /></label>
<el-upload class="upload-demo" :on-change="handleAvatarChange1" action="#" :multiple="false"
:limit="Number(1)" ref="avatorUpload" :auto-upload="false">
<GuipButton class="upload-button" slot="trigger" type="ignore"
:btnstyle="{ width: '118px' }">
<i class="bgImg"></i>选择文件
</GuipButton>
</el-upload>
<p class="uploaded" v-if="payinfo.key_uploaded">已上传</p>
<p class="normalUpload" v-else>未上传任何文件</p>
</div>
</div>
</div>
</el-form>
</div>
<div class="save-button">
<GuipButton type="primary" ref="saveRef" :btnstyle="saveBtnStyleObj" @click="saveConfirm">保存</GuipButton>
</div>
</div>
</template>
<script>
import GuipInput from '@/components/GuipInput.vue';
import GuipButton from '@/components/GuipButton.vue';
import GuipFormItem from '@/components/GuipFormItem.vue';
export default {
//
name: 'addPay',
props: {},
components: {
GuipInput,
GuipButton,
GuipFormItem,
},
data() {
return {
//
company_short_name: '',
//
mch_id: '',
//
apiv2: '',
// APPID
appid: '',
payinfo: [],
saveBtnStyleObj: {
width: '144px',
height: '46px',
borderRadius: '4px',
background: '#006AFF',
},
}
},
created() {
//
// this.getPayment()
},
methods: {
getPayment() {
this.$http('POST', '/agentnew/ajax_get_payinfo', {
payid: this.$route.query.payid,
}).then(response => {
this.$nextTick(() => {
this.payinfo = response.data
})
}).catch(error => {
console.error(error, 'error')
})
},
handleAvatarChange(file, fileList) {
console.log(file, fileList)
let fileObj = file.raw
this.formData.set('apiclient_cert', fileObj)
},
handleAvatarChange1(file, fileList) {
console.log(file, fileList)
let fileObj = file.raw
this.formData.set('apiclient_key', fileObj)
},
saveConfirm() {
//
// this.$positionMessage({
// type: 'error',
// message: '',
// target: this.$refs['saveRef'], // DOM
// position: 'top'
// })
// let obj = {}
// obj.uid = this.serviceInfo.uid
// obj.type = this.serviceInfo.type
// obj.info = ""
// const that = this
// this.$http('POST', '/agentnew/ajax_payment_switch', obj).then(response => {
// if(response.status){
// that.$message.success('');
// that.payList = response.data.paylist
// that.$emit('saveEvent', that.payList)
// return true;
// }
// that.$message.error(response.info);
// }).catch(error => {
// console.error(error, 'error')
// })
},
}
}
</script>
<style scoped lang="scss">
.guide{
display: flex;
align-items: center;
gap: 6px;
color: #8A9099 !important;
font-size: 12px;
}
.site-setting-wrap{
height: calc(100% - 80px);
overflow-y: auto;
}
.notuploaded,.uploaded,.normalUpload{
margin-top: 8px;
font-size: 12px;
color: #606266;
}
.normalUpload{
color:#606266;
}
.notuploaded{
color: #FD3B3B;
}
.save-button {
position: fixed;
left: 0;
bottom: 0;
width: 100%;
background: #fff;
box-shadow: 0 4px 16px 0 rgba(17, 55, 143, 0.12);
display: flex;
align-items: center;
justify-content: center;
padding: 16px 0;
z-index: 9;
}
.uploadwrap {
text-align: left;
}
.upload-title {
font-size: 14px;
font-weight: normal;
line-height: normal;
letter-spacing: 0.08em;
color: #23242B;
}
.upload-button {
border-radius: 4px;
background: #F2F3F5;
box-sizing: border-box;
border: 1px solid #BABDC2;
.bgImg {
width: 20px;
height: 16px;
margin-right: 6px;
background-image: url(@/assets/site/uploadIcon.svg);
}
&:hover {
.bgImg {
background-image: url(@/assets/site/uploadIcon_light.svg);
}
}
}
.upload-demo {
margin-top: 12px;
}
.beforeNotice {
h4 {
margin: 0;
gap: 8px;
}
margin-bottom: 18px;
text-align: left;
box-sizing: border-box;
padding: 20px 14px;
border-radius: 4px;
/* middle/middle_blue_1 */
background: #F2F7FF;
/* middle/middle_blue_3 */
border: 1px solid #BFDAFF;
div {
// margin-top: 2px;
// padding-left: 23px;
p {
// color: #8A9099;
}
}
p {
color: #1E2226;
i {
font-style: normal;
}
&:last-child {
display: flex;
align-items: stretch;
b {
font-weight: normal;
color: #8A9099;
display: inline-flex;
img {
margin-left: 4px;
}
}
}
}
a {
text-decoration: none;
color: #006AFF;
margin-right: 10px;
img {
margin-left: 5px;
margin-right: 5px;
}
}
}
a {
color: #006AFF;
text-decoration: none;
}
</style>
Loading…
Cancel
Save