Repository: zchengo/crm
Branch: main
Commit: 0e9f2197cdc1
Files: 120
Total size: 1021.8 KB
Directory structure:
gitextract_8rd8nrrh/
├── .gitattributes
├── .github/
│ └── workflows/
│ └── deploy.yaml
├── .gitignore
├── LICENSE
├── README.md
├── docs/
│ ├── docs/
│ │ ├── .vitepress/
│ │ │ ├── cache/
│ │ │ │ └── deps/
│ │ │ │ ├── _metadata.json
│ │ │ │ ├── package.json
│ │ │ │ └── vue.js
│ │ │ ├── config.js
│ │ │ └── theme/
│ │ │ ├── adsense.vue
│ │ │ ├── index.css
│ │ │ └── index.js
│ │ ├── about/
│ │ │ └── about.md
│ │ ├── index.md
│ │ ├── project/
│ │ │ ├── backend/
│ │ │ │ ├── cors-handle.md
│ │ │ │ └── jwt-handle.md
│ │ │ ├── devops/
│ │ │ │ ├── ci-cd.md
│ │ │ │ └── deploy-cloudserver.md
│ │ │ ├── docs/
│ │ │ │ ├── deploy-guide.md
│ │ │ │ ├── detailed-design.md
│ │ │ │ ├── getting-started.md
│ │ │ │ ├── introduction.md
│ │ │ │ ├── problem-feedback.md
│ │ │ │ └── update-log.md
│ │ │ └── frontend/
│ │ │ ├── axios-package.md
│ │ │ ├── env-var-modes.md
│ │ │ └── nprogress.md
│ │ └── sponsor/
│ │ └── sponsor.md
│ └── package.json
├── server/
│ ├── api/
│ │ ├── common.go
│ │ ├── config.go
│ │ ├── contract.go
│ │ ├── customer.go
│ │ ├── dashboard.go
│ │ ├── notice.go
│ │ ├── product.go
│ │ ├── subscribe.go
│ │ └── user.go
│ ├── common/
│ │ ├── alipay.go
│ │ ├── excel.go
│ │ ├── jwt.go
│ │ ├── mail.go
│ │ ├── rand.go
│ │ └── uuid.go
│ ├── config/
│ │ └── config.go
│ ├── config.yaml
│ ├── dao/
│ │ ├── common.go
│ │ ├── config.go
│ │ ├── contract.go
│ │ ├── customer.go
│ │ ├── dashboard.go
│ │ ├── notice.go
│ │ ├── product.go
│ │ ├── subscribe.go
│ │ └── user.go
│ ├── db/
│ │ └── crm.sql
│ ├── global/
│ │ └── global.go
│ ├── go.mod
│ ├── go.sum
│ ├── initialize/
│ │ ├── alipay.go
│ │ ├── gorm.go
│ │ ├── load.go
│ │ ├── redis.go
│ │ ├── router.go
│ │ └── run.go
│ ├── main.go
│ ├── middleware/
│ │ ├── cors.go
│ │ └── jwt.go
│ ├── models/
│ │ ├── common.go
│ │ ├── config.go
│ │ ├── contract.go
│ │ ├── customer.go
│ │ ├── dashboard.go
│ │ ├── notice.go
│ │ ├── product.go
│ │ ├── subscribe.go
│ │ └── user.go
│ ├── response/
│ │ ├── errcode.go
│ │ └── response.go
│ └── service/
│ ├── common.go
│ ├── config.go
│ ├── contract.go
│ ├── customer.go
│ ├── dashboard.go
│ ├── notice.go
│ ├── product.go
│ ├── subscribe.go
│ └── user.go
└── web/
├── index.html
├── package.json
├── src/
│ ├── App.vue
│ ├── api/
│ │ ├── common.js
│ │ ├── config.js
│ │ ├── contract.js
│ │ ├── customer.js
│ │ ├── dashboard.js
│ │ ├── notice.js
│ │ ├── product.js
│ │ ├── subscribe.js
│ │ └── user.js
│ ├── assets/
│ │ └── region.js
│ ├── axios/
│ │ └── index.js
│ ├── components/
│ │ └── Spot.vue
│ ├── main.js
│ ├── router/
│ │ └── index.js
│ ├── store/
│ │ └── index.js
│ └── views/
│ ├── Config.vue
│ ├── Contract.vue
│ ├── Customer.vue
│ ├── Dashboard.vue
│ ├── Error.vue
│ ├── Home.vue
│ ├── Index.vue
│ ├── Login.vue
│ ├── Pass.vue
│ ├── Product.vue
│ ├── Register.vue
│ ├── Result.vue
│ └── Subscribe.vue
└── vite.config.js
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitattributes
================================================
region.js linguist-vendored
================================================
FILE: .github/workflows/deploy.yaml
================================================
name: CRM CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '18.12.0'
- name: Build Web
run: cd web && npm install && npm run build
- name: Build Docs
run: cd docs && npm install && npm run docs:build
- name: Use Go
uses: actions/setup-go@v3
with:
go-version: 1.19
- name: Build Server
run: cd server && go mod tidy && go build -o crmserver main.go
- name: Deploy CRM
env:
KEY: ${{ secrets.SSH_PRIVATE_KEY }}
HOST: ${{ secrets.REMOTE_HOST }}
run: |
mkdir -p ~/.ssh/ && echo "$KEY" > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa
scp -o StrictHostKeyChecking=no -r web/dist ubuntu@${HOST}:/usr/local/nginx/html/
scp -o StrictHostKeyChecking=no -r docs/docs/.vitepress/dist ubuntu@${HOST}:/usr/local/nginx/html/docs/
ssh -o StrictHostKeyChecking=no ubuntu@${HOST} "sudo /usr/local/nginx/sbin/nginx -s reload"
scp -o StrictHostKeyChecking=no -r server/crmserver ubuntu@${HOST}:/home/ubuntu/
ssh -o StrictHostKeyChecking=no ubuntu@${HOST} "sudo /home/ubuntu/crmapi/restart.sh > /dev/null 2>&1 &"
================================================
FILE: .gitignore
================================================
### node
node_modules
/dist
### IDEA ###
.idea
### MacOS ###
.DS_Store
### VS Code ###
.vscode
================================================
FILE: LICENSE
================================================
MIT License
Copyright (c) 2022-present zchengo
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
================================================
FILE: README.md
================================================
# crm
## 简介
客户关系管理系统,基于 Vue + Go 实现,主要功能有仪表盘、客户管理、合同管理、产品管理,配置、订阅等功能。
- 在线演示:[zocrm.cloud](https://zocrm.cloud)
- 项目文档:[docs.zocrm.cloud](https://docs.zocrm.cloud)
## 快速开始
系统运行环境:
| 环境 | 版本 | 下载地址 |
|---|---|---|
| go | >= 1.19.2 | https://golang.google.cn/dl |
| mysql | >= 8.0.31 | https://www.mysql.com/downloads |
| redis | >= 7.0.5 | https://redis.io/download |
| node | >= 18.12.0 | https://nodejs.org/en/download |
在终端中,执行如下命令:
```bash
$ cd server
$ go mod tidy
$ go build -o server main.go (windows编译命令为 go build -o server.exe main.go )
# 运行二进制
$ ./server (windows运行命令为 server.exe)
$ cd web
$ npm install
$ npm run dev
```
初始化和启动成功后,打开浏览器访问[http://127.0.0.1:8060](http://127.0.0.1:8060)。
## 项目文档
想要了解有关项目的更多信息,请访问[docs.zocrm.cloud](https://docs.zocrm.cloud)。
## 许可证
[MIT License](https://github.com/zchengo/crm/blob/main/LICENSE)
Copyright (c) 2022-present zchengo
================================================
FILE: docs/docs/.vitepress/cache/deps/_metadata.json
================================================
{
"hash": "ce2e264b",
"browserHash": "e34b92f3",
"optimized": {
"vue": {
"src": "../../../../node_modules/vue/dist/vue.runtime.esm-bundler.js",
"file": "vue.js",
"fileHash": "0c7ec6e0",
"needsInterop": false
}
},
"chunks": {}
}
================================================
FILE: docs/docs/.vitepress/cache/deps/package.json
================================================
{"type":"module"}
================================================
FILE: docs/docs/.vitepress/cache/deps/vue.js
================================================
// node_modules/@vue/shared/dist/shared.esm-bundler.js
function makeMap(str, expectsLowerCase) {
const map2 = /* @__PURE__ */ Object.create(null);
const list = str.split(",");
for (let i = 0; i < list.length; i++) {
map2[list[i]] = true;
}
return expectsLowerCase ? (val) => !!map2[val.toLowerCase()] : (val) => !!map2[val];
}
var GLOBALS_WHITE_LISTED = "Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt";
var isGloballyWhitelisted = makeMap(GLOBALS_WHITE_LISTED);
function normalizeStyle(value) {
if (isArray(value)) {
const res = {};
for (let i = 0; i < value.length; i++) {
const item = value[i];
const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item);
if (normalized) {
for (const key in normalized) {
res[key] = normalized[key];
}
}
}
return res;
} else if (isString(value)) {
return value;
} else if (isObject(value)) {
return value;
}
}
var listDelimiterRE = /;(?![^(]*\))/g;
var propertyDelimiterRE = /:([^]+)/;
var styleCommentRE = /\/\*.*?\*\//gs;
function parseStringStyle(cssText) {
const ret = {};
cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => {
if (item) {
const tmp = item.split(propertyDelimiterRE);
tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());
}
});
return ret;
}
function normalizeClass(value) {
let res = "";
if (isString(value)) {
res = value;
} else if (isArray(value)) {
for (let i = 0; i < value.length; i++) {
const normalized = normalizeClass(value[i]);
if (normalized) {
res += normalized + " ";
}
}
} else if (isObject(value)) {
for (const name in value) {
if (value[name]) {
res += name + " ";
}
}
}
return res.trim();
}
function normalizeProps(props) {
if (!props)
return null;
let { class: klass, style } = props;
if (klass && !isString(klass)) {
props.class = normalizeClass(klass);
}
if (style) {
props.style = normalizeStyle(style);
}
return props;
}
var HTML_TAGS = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot";
var SVG_TAGS = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view";
var VOID_TAGS = "area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr";
var isHTMLTag = makeMap(HTML_TAGS);
var isSVGTag = makeMap(SVG_TAGS);
var isVoidTag = makeMap(VOID_TAGS);
var specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;
var isSpecialBooleanAttr = makeMap(specialBooleanAttrs);
var isBooleanAttr = makeMap(specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`);
function includeBooleanAttr(value) {
return !!value || value === "";
}
var isKnownHtmlAttr = makeMap(`accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap`);
var isKnownSvgAttr = makeMap(`xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan`);
function looseCompareArrays(a, b) {
if (a.length !== b.length)
return false;
let equal = true;
for (let i = 0; equal && i < a.length; i++) {
equal = looseEqual(a[i], b[i]);
}
return equal;
}
function looseEqual(a, b) {
if (a === b)
return true;
let aValidType = isDate(a);
let bValidType = isDate(b);
if (aValidType || bValidType) {
return aValidType && bValidType ? a.getTime() === b.getTime() : false;
}
aValidType = isSymbol(a);
bValidType = isSymbol(b);
if (aValidType || bValidType) {
return a === b;
}
aValidType = isArray(a);
bValidType = isArray(b);
if (aValidType || bValidType) {
return aValidType && bValidType ? looseCompareArrays(a, b) : false;
}
aValidType = isObject(a);
bValidType = isObject(b);
if (aValidType || bValidType) {
if (!aValidType || !bValidType) {
return false;
}
const aKeysCount = Object.keys(a).length;
const bKeysCount = Object.keys(b).length;
if (aKeysCount !== bKeysCount) {
return false;
}
for (const key in a) {
const aHasKey = a.hasOwnProperty(key);
const bHasKey = b.hasOwnProperty(key);
if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key])) {
return false;
}
}
}
return String(a) === String(b);
}
function looseIndexOf(arr, val) {
return arr.findIndex((item) => looseEqual(item, val));
}
var toDisplayString = (val) => {
return isString(val) ? val : val == null ? "" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? JSON.stringify(val, replacer, 2) : String(val);
};
var replacer = (_key, val) => {
if (val && val.__v_isRef) {
return replacer(_key, val.value);
} else if (isMap(val)) {
return {
[`Map(${val.size})`]: [...val.entries()].reduce((entries, [key, val2]) => {
entries[`${key} =>`] = val2;
return entries;
}, {})
};
} else if (isSet(val)) {
return {
[`Set(${val.size})`]: [...val.values()]
};
} else if (isObject(val) && !isArray(val) && !isPlainObject(val)) {
return String(val);
}
return val;
};
var EMPTY_OBJ = true ? Object.freeze({}) : {};
var EMPTY_ARR = true ? Object.freeze([]) : [];
var NOOP = () => {
};
var NO = () => false;
var onRE = /^on[^a-z]/;
var isOn = (key) => onRE.test(key);
var isModelListener = (key) => key.startsWith("onUpdate:");
var extend = Object.assign;
var remove = (arr, el) => {
const i = arr.indexOf(el);
if (i > -1) {
arr.splice(i, 1);
}
};
var hasOwnProperty = Object.prototype.hasOwnProperty;
var hasOwn = (val, key) => hasOwnProperty.call(val, key);
var isArray = Array.isArray;
var isMap = (val) => toTypeString(val) === "[object Map]";
var isSet = (val) => toTypeString(val) === "[object Set]";
var isDate = (val) => toTypeString(val) === "[object Date]";
var isRegExp = (val) => toTypeString(val) === "[object RegExp]";
var isFunction = (val) => typeof val === "function";
var isString = (val) => typeof val === "string";
var isSymbol = (val) => typeof val === "symbol";
var isObject = (val) => val !== null && typeof val === "object";
var isPromise = (val) => {
return isObject(val) && isFunction(val.then) && isFunction(val.catch);
};
var objectToString = Object.prototype.toString;
var toTypeString = (value) => objectToString.call(value);
var toRawType = (value) => {
return toTypeString(value).slice(8, -1);
};
var isPlainObject = (val) => toTypeString(val) === "[object Object]";
var isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key;
var isReservedProp = makeMap(
// the leading comma is intentional so empty string "" is also included
",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"
);
var isBuiltInDirective = makeMap("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo");
var cacheStringFunction = (fn) => {
const cache = /* @__PURE__ */ Object.create(null);
return (str) => {
const hit = cache[str];
return hit || (cache[str] = fn(str));
};
};
var camelizeRE = /-(\w)/g;
var camelize = cacheStringFunction((str) => {
return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : "");
});
var hyphenateRE = /\B([A-Z])/g;
var hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, "-$1").toLowerCase());
var capitalize = cacheStringFunction((str) => str.charAt(0).toUpperCase() + str.slice(1));
var toHandlerKey = cacheStringFunction((str) => str ? `on${capitalize(str)}` : ``);
var hasChanged = (value, oldValue) => !Object.is(value, oldValue);
var invokeArrayFns = (fns, arg) => {
for (let i = 0; i < fns.length; i++) {
fns[i](arg);
}
};
var def = (obj, key, value) => {
Object.defineProperty(obj, key, {
configurable: true,
enumerable: false,
value
});
};
var looseToNumber = (val) => {
const n = parseFloat(val);
return isNaN(n) ? val : n;
};
var toNumber = (val) => {
const n = isString(val) ? Number(val) : NaN;
return isNaN(n) ? val : n;
};
var _globalThis;
var getGlobalThis = () => {
return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {});
};
// node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js
function warn(msg, ...args) {
console.warn(`[Vue warn] ${msg}`, ...args);
}
var activeEffectScope;
var EffectScope = class {
constructor(detached = false) {
this.detached = detached;
this._active = true;
this.effects = [];
this.cleanups = [];
this.parent = activeEffectScope;
if (!detached && activeEffectScope) {
this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(this) - 1;
}
}
get active() {
return this._active;
}
run(fn) {
if (this._active) {
const currentEffectScope = activeEffectScope;
try {
activeEffectScope = this;
return fn();
} finally {
activeEffectScope = currentEffectScope;
}
} else if (true) {
warn(`cannot run an inactive effect scope.`);
}
}
/**
* This should only be called on non-detached scopes
* @internal
*/
on() {
activeEffectScope = this;
}
/**
* This should only be called on non-detached scopes
* @internal
*/
off() {
activeEffectScope = this.parent;
}
stop(fromParent) {
if (this._active) {
let i, l;
for (i = 0, l = this.effects.length; i < l; i++) {
this.effects[i].stop();
}
for (i = 0, l = this.cleanups.length; i < l; i++) {
this.cleanups[i]();
}
if (this.scopes) {
for (i = 0, l = this.scopes.length; i < l; i++) {
this.scopes[i].stop(true);
}
}
if (!this.detached && this.parent && !fromParent) {
const last = this.parent.scopes.pop();
if (last && last !== this) {
this.parent.scopes[this.index] = last;
last.index = this.index;
}
}
this.parent = void 0;
this._active = false;
}
}
};
function effectScope(detached) {
return new EffectScope(detached);
}
function recordEffectScope(effect2, scope = activeEffectScope) {
if (scope && scope.active) {
scope.effects.push(effect2);
}
}
function getCurrentScope() {
return activeEffectScope;
}
function onScopeDispose(fn) {
if (activeEffectScope) {
activeEffectScope.cleanups.push(fn);
} else if (true) {
warn(`onScopeDispose() is called when there is no active effect scope to be associated with.`);
}
}
var createDep = (effects) => {
const dep = new Set(effects);
dep.w = 0;
dep.n = 0;
return dep;
};
var wasTracked = (dep) => (dep.w & trackOpBit) > 0;
var newTracked = (dep) => (dep.n & trackOpBit) > 0;
var initDepMarkers = ({ deps }) => {
if (deps.length) {
for (let i = 0; i < deps.length; i++) {
deps[i].w |= trackOpBit;
}
}
};
var finalizeDepMarkers = (effect2) => {
const { deps } = effect2;
if (deps.length) {
let ptr = 0;
for (let i = 0; i < deps.length; i++) {
const dep = deps[i];
if (wasTracked(dep) && !newTracked(dep)) {
dep.delete(effect2);
} else {
deps[ptr++] = dep;
}
dep.w &= ~trackOpBit;
dep.n &= ~trackOpBit;
}
deps.length = ptr;
}
};
var targetMap = /* @__PURE__ */ new WeakMap();
var effectTrackDepth = 0;
var trackOpBit = 1;
var maxMarkerBits = 30;
var activeEffect;
var ITERATE_KEY = Symbol(true ? "iterate" : "");
var MAP_KEY_ITERATE_KEY = Symbol(true ? "Map key iterate" : "");
var ReactiveEffect = class {
constructor(fn, scheduler = null, scope) {
this.fn = fn;
this.scheduler = scheduler;
this.active = true;
this.deps = [];
this.parent = void 0;
recordEffectScope(this, scope);
}
run() {
if (!this.active) {
return this.fn();
}
let parent = activeEffect;
let lastShouldTrack = shouldTrack;
while (parent) {
if (parent === this) {
return;
}
parent = parent.parent;
}
try {
this.parent = activeEffect;
activeEffect = this;
shouldTrack = true;
trackOpBit = 1 << ++effectTrackDepth;
if (effectTrackDepth <= maxMarkerBits) {
initDepMarkers(this);
} else {
cleanupEffect(this);
}
return this.fn();
} finally {
if (effectTrackDepth <= maxMarkerBits) {
finalizeDepMarkers(this);
}
trackOpBit = 1 << --effectTrackDepth;
activeEffect = this.parent;
shouldTrack = lastShouldTrack;
this.parent = void 0;
if (this.deferStop) {
this.stop();
}
}
}
stop() {
if (activeEffect === this) {
this.deferStop = true;
} else if (this.active) {
cleanupEffect(this);
if (this.onStop) {
this.onStop();
}
this.active = false;
}
}
};
function cleanupEffect(effect2) {
const { deps } = effect2;
if (deps.length) {
for (let i = 0; i < deps.length; i++) {
deps[i].delete(effect2);
}
deps.length = 0;
}
}
function effect(fn, options) {
if (fn.effect) {
fn = fn.effect.fn;
}
const _effect = new ReactiveEffect(fn);
if (options) {
extend(_effect, options);
if (options.scope)
recordEffectScope(_effect, options.scope);
}
if (!options || !options.lazy) {
_effect.run();
}
const runner = _effect.run.bind(_effect);
runner.effect = _effect;
return runner;
}
function stop(runner) {
runner.effect.stop();
}
var shouldTrack = true;
var trackStack = [];
function pauseTracking() {
trackStack.push(shouldTrack);
shouldTrack = false;
}
function resetTracking() {
const last = trackStack.pop();
shouldTrack = last === void 0 ? true : last;
}
function track(target, type, key) {
if (shouldTrack && activeEffect) {
let depsMap = targetMap.get(target);
if (!depsMap) {
targetMap.set(target, depsMap = /* @__PURE__ */ new Map());
}
let dep = depsMap.get(key);
if (!dep) {
depsMap.set(key, dep = createDep());
}
const eventInfo = true ? { effect: activeEffect, target, type, key } : void 0;
trackEffects(dep, eventInfo);
}
}
function trackEffects(dep, debuggerEventExtraInfo) {
let shouldTrack2 = false;
if (effectTrackDepth <= maxMarkerBits) {
if (!newTracked(dep)) {
dep.n |= trackOpBit;
shouldTrack2 = !wasTracked(dep);
}
} else {
shouldTrack2 = !dep.has(activeEffect);
}
if (shouldTrack2) {
dep.add(activeEffect);
activeEffect.deps.push(dep);
if (activeEffect.onTrack) {
activeEffect.onTrack(Object.assign({ effect: activeEffect }, debuggerEventExtraInfo));
}
}
}
function trigger(target, type, key, newValue, oldValue, oldTarget) {
const depsMap = targetMap.get(target);
if (!depsMap) {
return;
}
let deps = [];
if (type === "clear") {
deps = [...depsMap.values()];
} else if (key === "length" && isArray(target)) {
const newLength = Number(newValue);
depsMap.forEach((dep, key2) => {
if (key2 === "length" || key2 >= newLength) {
deps.push(dep);
}
});
} else {
if (key !== void 0) {
deps.push(depsMap.get(key));
}
switch (type) {
case "add":
if (!isArray(target)) {
deps.push(depsMap.get(ITERATE_KEY));
if (isMap(target)) {
deps.push(depsMap.get(MAP_KEY_ITERATE_KEY));
}
} else if (isIntegerKey(key)) {
deps.push(depsMap.get("length"));
}
break;
case "delete":
if (!isArray(target)) {
deps.push(depsMap.get(ITERATE_KEY));
if (isMap(target)) {
deps.push(depsMap.get(MAP_KEY_ITERATE_KEY));
}
}
break;
case "set":
if (isMap(target)) {
deps.push(depsMap.get(ITERATE_KEY));
}
break;
}
}
const eventInfo = true ? { target, type, key, newValue, oldValue, oldTarget } : void 0;
if (deps.length === 1) {
if (deps[0]) {
if (true) {
triggerEffects(deps[0], eventInfo);
} else {
triggerEffects(deps[0]);
}
}
} else {
const effects = [];
for (const dep of deps) {
if (dep) {
effects.push(...dep);
}
}
if (true) {
triggerEffects(createDep(effects), eventInfo);
} else {
triggerEffects(createDep(effects));
}
}
}
function triggerEffects(dep, debuggerEventExtraInfo) {
const effects = isArray(dep) ? dep : [...dep];
for (const effect2 of effects) {
if (effect2.computed) {
triggerEffect(effect2, debuggerEventExtraInfo);
}
}
for (const effect2 of effects) {
if (!effect2.computed) {
triggerEffect(effect2, debuggerEventExtraInfo);
}
}
}
function triggerEffect(effect2, debuggerEventExtraInfo) {
if (effect2 !== activeEffect || effect2.allowRecurse) {
if (effect2.onTrigger) {
effect2.onTrigger(extend({ effect: effect2 }, debuggerEventExtraInfo));
}
if (effect2.scheduler) {
effect2.scheduler();
} else {
effect2.run();
}
}
}
function getDepFromReactive(object, key) {
var _a2;
return (_a2 = targetMap.get(object)) === null || _a2 === void 0 ? void 0 : _a2.get(key);
}
var isNonTrackableKeys = makeMap(`__proto__,__v_isRef,__isVue`);
var builtInSymbols = new Set(
Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol)
);
var get$1 = createGetter();
var shallowGet = createGetter(false, true);
var readonlyGet = createGetter(true);
var shallowReadonlyGet = createGetter(true, true);
var arrayInstrumentations = createArrayInstrumentations();
function createArrayInstrumentations() {
const instrumentations = {};
["includes", "indexOf", "lastIndexOf"].forEach((key) => {
instrumentations[key] = function(...args) {
const arr = toRaw(this);
for (let i = 0, l = this.length; i < l; i++) {
track(arr, "get", i + "");
}
const res = arr[key](...args);
if (res === -1 || res === false) {
return arr[key](...args.map(toRaw));
} else {
return res;
}
};
});
["push", "pop", "shift", "unshift", "splice"].forEach((key) => {
instrumentations[key] = function(...args) {
pauseTracking();
const res = toRaw(this)[key].apply(this, args);
resetTracking();
return res;
};
});
return instrumentations;
}
function hasOwnProperty2(key) {
const obj = toRaw(this);
track(obj, "has", key);
return obj.hasOwnProperty(key);
}
function createGetter(isReadonly2 = false, shallow = false) {
return function get2(target, key, receiver) {
if (key === "__v_isReactive") {
return !isReadonly2;
} else if (key === "__v_isReadonly") {
return isReadonly2;
} else if (key === "__v_isShallow") {
return shallow;
} else if (key === "__v_raw" && receiver === (isReadonly2 ? shallow ? shallowReadonlyMap : readonlyMap : shallow ? shallowReactiveMap : reactiveMap).get(target)) {
return target;
}
const targetIsArray = isArray(target);
if (!isReadonly2) {
if (targetIsArray && hasOwn(arrayInstrumentations, key)) {
return Reflect.get(arrayInstrumentations, key, receiver);
}
if (key === "hasOwnProperty") {
return hasOwnProperty2;
}
}
const res = Reflect.get(target, key, receiver);
if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) {
return res;
}
if (!isReadonly2) {
track(target, "get", key);
}
if (shallow) {
return res;
}
if (isRef(res)) {
return targetIsArray && isIntegerKey(key) ? res : res.value;
}
if (isObject(res)) {
return isReadonly2 ? readonly(res) : reactive(res);
}
return res;
};
}
var set$1 = createSetter();
var shallowSet = createSetter(true);
function createSetter(shallow = false) {
return function set2(target, key, value, receiver) {
let oldValue = target[key];
if (isReadonly(oldValue) && isRef(oldValue) && !isRef(value)) {
return false;
}
if (!shallow) {
if (!isShallow(value) && !isReadonly(value)) {
oldValue = toRaw(oldValue);
value = toRaw(value);
}
if (!isArray(target) && isRef(oldValue) && !isRef(value)) {
oldValue.value = value;
return true;
}
}
const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key);
const result = Reflect.set(target, key, value, receiver);
if (target === toRaw(receiver)) {
if (!hadKey) {
trigger(target, "add", key, value);
} else if (hasChanged(value, oldValue)) {
trigger(target, "set", key, value, oldValue);
}
}
return result;
};
}
function deleteProperty(target, key) {
const hadKey = hasOwn(target, key);
const oldValue = target[key];
const result = Reflect.deleteProperty(target, key);
if (result && hadKey) {
trigger(target, "delete", key, void 0, oldValue);
}
return result;
}
function has$1(target, key) {
const result = Reflect.has(target, key);
if (!isSymbol(key) || !builtInSymbols.has(key)) {
track(target, "has", key);
}
return result;
}
function ownKeys(target) {
track(target, "iterate", isArray(target) ? "length" : ITERATE_KEY);
return Reflect.ownKeys(target);
}
var mutableHandlers = {
get: get$1,
set: set$1,
deleteProperty,
has: has$1,
ownKeys
};
var readonlyHandlers = {
get: readonlyGet,
set(target, key) {
if (true) {
warn(`Set operation on key "${String(key)}" failed: target is readonly.`, target);
}
return true;
},
deleteProperty(target, key) {
if (true) {
warn(`Delete operation on key "${String(key)}" failed: target is readonly.`, target);
}
return true;
}
};
var shallowReactiveHandlers = extend({}, mutableHandlers, {
get: shallowGet,
set: shallowSet
});
var shallowReadonlyHandlers = extend({}, readonlyHandlers, {
get: shallowReadonlyGet
});
var toShallow = (value) => value;
var getProto = (v) => Reflect.getPrototypeOf(v);
function get(target, key, isReadonly2 = false, isShallow3 = false) {
target = target[
"__v_raw"
/* ReactiveFlags.RAW */
];
const rawTarget = toRaw(target);
const rawKey = toRaw(key);
if (!isReadonly2) {
if (key !== rawKey) {
track(rawTarget, "get", key);
}
track(rawTarget, "get", rawKey);
}
const { has: has2 } = getProto(rawTarget);
const wrap = isShallow3 ? toShallow : isReadonly2 ? toReadonly : toReactive;
if (has2.call(rawTarget, key)) {
return wrap(target.get(key));
} else if (has2.call(rawTarget, rawKey)) {
return wrap(target.get(rawKey));
} else if (target !== rawTarget) {
target.get(key);
}
}
function has(key, isReadonly2 = false) {
const target = this[
"__v_raw"
/* ReactiveFlags.RAW */
];
const rawTarget = toRaw(target);
const rawKey = toRaw(key);
if (!isReadonly2) {
if (key !== rawKey) {
track(rawTarget, "has", key);
}
track(rawTarget, "has", rawKey);
}
return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);
}
function size(target, isReadonly2 = false) {
target = target[
"__v_raw"
/* ReactiveFlags.RAW */
];
!isReadonly2 && track(toRaw(target), "iterate", ITERATE_KEY);
return Reflect.get(target, "size", target);
}
function add(value) {
value = toRaw(value);
const target = toRaw(this);
const proto = getProto(target);
const hadKey = proto.has.call(target, value);
if (!hadKey) {
target.add(value);
trigger(target, "add", value, value);
}
return this;
}
function set(key, value) {
value = toRaw(value);
const target = toRaw(this);
const { has: has2, get: get2 } = getProto(target);
let hadKey = has2.call(target, key);
if (!hadKey) {
key = toRaw(key);
hadKey = has2.call(target, key);
} else if (true) {
checkIdentityKeys(target, has2, key);
}
const oldValue = get2.call(target, key);
target.set(key, value);
if (!hadKey) {
trigger(target, "add", key, value);
} else if (hasChanged(value, oldValue)) {
trigger(target, "set", key, value, oldValue);
}
return this;
}
function deleteEntry(key) {
const target = toRaw(this);
const { has: has2, get: get2 } = getProto(target);
let hadKey = has2.call(target, key);
if (!hadKey) {
key = toRaw(key);
hadKey = has2.call(target, key);
} else if (true) {
checkIdentityKeys(target, has2, key);
}
const oldValue = get2 ? get2.call(target, key) : void 0;
const result = target.delete(key);
if (hadKey) {
trigger(target, "delete", key, void 0, oldValue);
}
return result;
}
function clear() {
const target = toRaw(this);
const hadItems = target.size !== 0;
const oldTarget = true ? isMap(target) ? new Map(target) : new Set(target) : void 0;
const result = target.clear();
if (hadItems) {
trigger(target, "clear", void 0, void 0, oldTarget);
}
return result;
}
function createForEach(isReadonly2, isShallow3) {
return function forEach(callback, thisArg) {
const observed = this;
const target = observed[
"__v_raw"
/* ReactiveFlags.RAW */
];
const rawTarget = toRaw(target);
const wrap = isShallow3 ? toShallow : isReadonly2 ? toReadonly : toReactive;
!isReadonly2 && track(rawTarget, "iterate", ITERATE_KEY);
return target.forEach((value, key) => {
return callback.call(thisArg, wrap(value), wrap(key), observed);
});
};
}
function createIterableMethod(method, isReadonly2, isShallow3) {
return function(...args) {
const target = this[
"__v_raw"
/* ReactiveFlags.RAW */
];
const rawTarget = toRaw(target);
const targetIsMap = isMap(rawTarget);
const isPair = method === "entries" || method === Symbol.iterator && targetIsMap;
const isKeyOnly = method === "keys" && targetIsMap;
const innerIterator = target[method](...args);
const wrap = isShallow3 ? toShallow : isReadonly2 ? toReadonly : toReactive;
!isReadonly2 && track(rawTarget, "iterate", isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY);
return {
// iterator protocol
next() {
const { value, done } = innerIterator.next();
return done ? { value, done } : {
value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value),
done
};
},
// iterable protocol
[Symbol.iterator]() {
return this;
}
};
};
}
function createReadonlyMethod(type) {
return function(...args) {
if (true) {
const key = args[0] ? `on key "${args[0]}" ` : ``;
console.warn(`${capitalize(type)} operation ${key}failed: target is readonly.`, toRaw(this));
}
return type === "delete" ? false : this;
};
}
function createInstrumentations() {
const mutableInstrumentations2 = {
get(key) {
return get(this, key);
},
get size() {
return size(this);
},
has,
add,
set,
delete: deleteEntry,
clear,
forEach: createForEach(false, false)
};
const shallowInstrumentations2 = {
get(key) {
return get(this, key, false, true);
},
get size() {
return size(this);
},
has,
add,
set,
delete: deleteEntry,
clear,
forEach: createForEach(false, true)
};
const readonlyInstrumentations2 = {
get(key) {
return get(this, key, true);
},
get size() {
return size(this, true);
},
has(key) {
return has.call(this, key, true);
},
add: createReadonlyMethod(
"add"
/* TriggerOpTypes.ADD */
),
set: createReadonlyMethod(
"set"
/* TriggerOpTypes.SET */
),
delete: createReadonlyMethod(
"delete"
/* TriggerOpTypes.DELETE */
),
clear: createReadonlyMethod(
"clear"
/* TriggerOpTypes.CLEAR */
),
forEach: createForEach(true, false)
};
const shallowReadonlyInstrumentations2 = {
get(key) {
return get(this, key, true, true);
},
get size() {
return size(this, true);
},
has(key) {
return has.call(this, key, true);
},
add: createReadonlyMethod(
"add"
/* TriggerOpTypes.ADD */
),
set: createReadonlyMethod(
"set"
/* TriggerOpTypes.SET */
),
delete: createReadonlyMethod(
"delete"
/* TriggerOpTypes.DELETE */
),
clear: createReadonlyMethod(
"clear"
/* TriggerOpTypes.CLEAR */
),
forEach: createForEach(true, true)
};
const iteratorMethods = ["keys", "values", "entries", Symbol.iterator];
iteratorMethods.forEach((method) => {
mutableInstrumentations2[method] = createIterableMethod(method, false, false);
readonlyInstrumentations2[method] = createIterableMethod(method, true, false);
shallowInstrumentations2[method] = createIterableMethod(method, false, true);
shallowReadonlyInstrumentations2[method] = createIterableMethod(method, true, true);
});
return [
mutableInstrumentations2,
readonlyInstrumentations2,
shallowInstrumentations2,
shallowReadonlyInstrumentations2
];
}
var [mutableInstrumentations, readonlyInstrumentations, shallowInstrumentations, shallowReadonlyInstrumentations] = createInstrumentations();
function createInstrumentationGetter(isReadonly2, shallow) {
const instrumentations = shallow ? isReadonly2 ? shallowReadonlyInstrumentations : shallowInstrumentations : isReadonly2 ? readonlyInstrumentations : mutableInstrumentations;
return (target, key, receiver) => {
if (key === "__v_isReactive") {
return !isReadonly2;
} else if (key === "__v_isReadonly") {
return isReadonly2;
} else if (key === "__v_raw") {
return target;
}
return Reflect.get(hasOwn(instrumentations, key) && key in target ? instrumentations : target, key, receiver);
};
}
var mutableCollectionHandlers = {
get: createInstrumentationGetter(false, false)
};
var shallowCollectionHandlers = {
get: createInstrumentationGetter(false, true)
};
var readonlyCollectionHandlers = {
get: createInstrumentationGetter(true, false)
};
var shallowReadonlyCollectionHandlers = {
get: createInstrumentationGetter(true, true)
};
function checkIdentityKeys(target, has2, key) {
const rawKey = toRaw(key);
if (rawKey !== key && has2.call(target, rawKey)) {
const type = toRawType(target);
console.warn(`Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`);
}
}
var reactiveMap = /* @__PURE__ */ new WeakMap();
var shallowReactiveMap = /* @__PURE__ */ new WeakMap();
var readonlyMap = /* @__PURE__ */ new WeakMap();
var shallowReadonlyMap = /* @__PURE__ */ new WeakMap();
function targetTypeMap(rawType) {
switch (rawType) {
case "Object":
case "Array":
return 1;
case "Map":
case "Set":
case "WeakMap":
case "WeakSet":
return 2;
default:
return 0;
}
}
function getTargetType(value) {
return value[
"__v_skip"
/* ReactiveFlags.SKIP */
] || !Object.isExtensible(value) ? 0 : targetTypeMap(toRawType(value));
}
function reactive(target) {
if (isReadonly(target)) {
return target;
}
return createReactiveObject(target, false, mutableHandlers, mutableCollectionHandlers, reactiveMap);
}
function shallowReactive(target) {
return createReactiveObject(target, false, shallowReactiveHandlers, shallowCollectionHandlers, shallowReactiveMap);
}
function readonly(target) {
return createReactiveObject(target, true, readonlyHandlers, readonlyCollectionHandlers, readonlyMap);
}
function shallowReadonly(target) {
return createReactiveObject(target, true, shallowReadonlyHandlers, shallowReadonlyCollectionHandlers, shallowReadonlyMap);
}
function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) {
if (!isObject(target)) {
if (true) {
console.warn(`value cannot be made reactive: ${String(target)}`);
}
return target;
}
if (target[
"__v_raw"
/* ReactiveFlags.RAW */
] && !(isReadonly2 && target[
"__v_isReactive"
/* ReactiveFlags.IS_REACTIVE */
])) {
return target;
}
const existingProxy = proxyMap.get(target);
if (existingProxy) {
return existingProxy;
}
const targetType = getTargetType(target);
if (targetType === 0) {
return target;
}
const proxy = new Proxy(target, targetType === 2 ? collectionHandlers : baseHandlers);
proxyMap.set(target, proxy);
return proxy;
}
function isReactive(value) {
if (isReadonly(value)) {
return isReactive(value[
"__v_raw"
/* ReactiveFlags.RAW */
]);
}
return !!(value && value[
"__v_isReactive"
/* ReactiveFlags.IS_REACTIVE */
]);
}
function isReadonly(value) {
return !!(value && value[
"__v_isReadonly"
/* ReactiveFlags.IS_READONLY */
]);
}
function isShallow(value) {
return !!(value && value[
"__v_isShallow"
/* ReactiveFlags.IS_SHALLOW */
]);
}
function isProxy(value) {
return isReactive(value) || isReadonly(value);
}
function toRaw(observed) {
const raw = observed && observed[
"__v_raw"
/* ReactiveFlags.RAW */
];
return raw ? toRaw(raw) : observed;
}
function markRaw(value) {
def(value, "__v_skip", true);
return value;
}
var toReactive = (value) => isObject(value) ? reactive(value) : value;
var toReadonly = (value) => isObject(value) ? readonly(value) : value;
function trackRefValue(ref2) {
if (shouldTrack && activeEffect) {
ref2 = toRaw(ref2);
if (true) {
trackEffects(ref2.dep || (ref2.dep = createDep()), {
target: ref2,
type: "get",
key: "value"
});
} else {
trackEffects(ref2.dep || (ref2.dep = createDep()));
}
}
}
function triggerRefValue(ref2, newVal) {
ref2 = toRaw(ref2);
const dep = ref2.dep;
if (dep) {
if (true) {
triggerEffects(dep, {
target: ref2,
type: "set",
key: "value",
newValue: newVal
});
} else {
triggerEffects(dep);
}
}
}
function isRef(r) {
return !!(r && r.__v_isRef === true);
}
function ref(value) {
return createRef(value, false);
}
function shallowRef(value) {
return createRef(value, true);
}
function createRef(rawValue, shallow) {
if (isRef(rawValue)) {
return rawValue;
}
return new RefImpl(rawValue, shallow);
}
var RefImpl = class {
constructor(value, __v_isShallow) {
this.__v_isShallow = __v_isShallow;
this.dep = void 0;
this.__v_isRef = true;
this._rawValue = __v_isShallow ? value : toRaw(value);
this._value = __v_isShallow ? value : toReactive(value);
}
get value() {
trackRefValue(this);
return this._value;
}
set value(newVal) {
const useDirectValue = this.__v_isShallow || isShallow(newVal) || isReadonly(newVal);
newVal = useDirectValue ? newVal : toRaw(newVal);
if (hasChanged(newVal, this._rawValue)) {
this._rawValue = newVal;
this._value = useDirectValue ? newVal : toReactive(newVal);
triggerRefValue(this, newVal);
}
}
};
function triggerRef(ref2) {
triggerRefValue(ref2, true ? ref2.value : void 0);
}
function unref(ref2) {
return isRef(ref2) ? ref2.value : ref2;
}
var shallowUnwrapHandlers = {
get: (target, key, receiver) => unref(Reflect.get(target, key, receiver)),
set: (target, key, value, receiver) => {
const oldValue = target[key];
if (isRef(oldValue) && !isRef(value)) {
oldValue.value = value;
return true;
} else {
return Reflect.set(target, key, value, receiver);
}
}
};
function proxyRefs(objectWithRefs) {
return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers);
}
var CustomRefImpl = class {
constructor(factory) {
this.dep = void 0;
this.__v_isRef = true;
const { get: get2, set: set2 } = factory(() => trackRefValue(this), () => triggerRefValue(this));
this._get = get2;
this._set = set2;
}
get value() {
return this._get();
}
set value(newVal) {
this._set(newVal);
}
};
function customRef(factory) {
return new CustomRefImpl(factory);
}
function toRefs(object) {
if (!isProxy(object)) {
console.warn(`toRefs() expects a reactive object but received a plain one.`);
}
const ret = isArray(object) ? new Array(object.length) : {};
for (const key in object) {
ret[key] = toRef(object, key);
}
return ret;
}
var ObjectRefImpl = class {
constructor(_object, _key, _defaultValue) {
this._object = _object;
this._key = _key;
this._defaultValue = _defaultValue;
this.__v_isRef = true;
}
get value() {
const val = this._object[this._key];
return val === void 0 ? this._defaultValue : val;
}
set value(newVal) {
this._object[this._key] = newVal;
}
get dep() {
return getDepFromReactive(toRaw(this._object), this._key);
}
};
function toRef(object, key, defaultValue) {
const val = object[key];
return isRef(val) ? val : new ObjectRefImpl(object, key, defaultValue);
}
var _a$1;
var ComputedRefImpl = class {
constructor(getter, _setter, isReadonly2, isSSR) {
this._setter = _setter;
this.dep = void 0;
this.__v_isRef = true;
this[_a$1] = false;
this._dirty = true;
this.effect = new ReactiveEffect(getter, () => {
if (!this._dirty) {
this._dirty = true;
triggerRefValue(this);
}
});
this.effect.computed = this;
this.effect.active = this._cacheable = !isSSR;
this[
"__v_isReadonly"
/* ReactiveFlags.IS_READONLY */
] = isReadonly2;
}
get value() {
const self2 = toRaw(this);
trackRefValue(self2);
if (self2._dirty || !self2._cacheable) {
self2._dirty = false;
self2._value = self2.effect.run();
}
return self2._value;
}
set value(newValue) {
this._setter(newValue);
}
};
_a$1 = "__v_isReadonly";
function computed(getterOrOptions, debugOptions, isSSR = false) {
let getter;
let setter;
const onlyGetter = isFunction(getterOrOptions);
if (onlyGetter) {
getter = getterOrOptions;
setter = true ? () => {
console.warn("Write operation failed: computed value is readonly");
} : NOOP;
} else {
getter = getterOrOptions.get;
setter = getterOrOptions.set;
}
const cRef = new ComputedRefImpl(getter, setter, onlyGetter || !setter, isSSR);
if (debugOptions && !isSSR) {
cRef.effect.onTrack = debugOptions.onTrack;
cRef.effect.onTrigger = debugOptions.onTrigger;
}
return cRef;
}
var _a;
var tick = Promise.resolve();
_a = "__v_isReadonly";
// node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js
var stack = [];
function pushWarningContext(vnode) {
stack.push(vnode);
}
function popWarningContext() {
stack.pop();
}
function warn2(msg, ...args) {
if (false)
return;
pauseTracking();
const instance = stack.length ? stack[stack.length - 1].component : null;
const appWarnHandler = instance && instance.appContext.config.warnHandler;
const trace = getComponentTrace();
if (appWarnHandler) {
callWithErrorHandling(appWarnHandler, instance, 11, [
msg + args.join(""),
instance && instance.proxy,
trace.map(({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>`).join("\n"),
trace
]);
} else {
const warnArgs = [`[Vue warn]: ${msg}`, ...args];
if (trace.length && // avoid spamming console during tests
true) {
warnArgs.push(`
`, ...formatTrace(trace));
}
console.warn(...warnArgs);
}
resetTracking();
}
function getComponentTrace() {
let currentVNode = stack[stack.length - 1];
if (!currentVNode) {
return [];
}
const normalizedStack = [];
while (currentVNode) {
const last = normalizedStack[0];
if (last && last.vnode === currentVNode) {
last.recurseCount++;
} else {
normalizedStack.push({
vnode: currentVNode,
recurseCount: 0
});
}
const parentInstance = currentVNode.component && currentVNode.component.parent;
currentVNode = parentInstance && parentInstance.vnode;
}
return normalizedStack;
}
function formatTrace(trace) {
const logs = [];
trace.forEach((entry, i) => {
logs.push(...i === 0 ? [] : [`
`], ...formatTraceEntry(entry));
});
return logs;
}
function formatTraceEntry({ vnode, recurseCount }) {
const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``;
const isRoot = vnode.component ? vnode.component.parent == null : false;
const open = ` at <${formatComponentName(vnode.component, vnode.type, isRoot)}`;
const close = `>` + postfix;
return vnode.props ? [open, ...formatProps(vnode.props), close] : [open + close];
}
function formatProps(props) {
const res = [];
const keys = Object.keys(props);
keys.slice(0, 3).forEach((key) => {
res.push(...formatProp(key, props[key]));
});
if (keys.length > 3) {
res.push(` ...`);
}
return res;
}
function formatProp(key, value, raw) {
if (isString(value)) {
value = JSON.stringify(value);
return raw ? value : [`${key}=${value}`];
} else if (typeof value === "number" || typeof value === "boolean" || value == null) {
return raw ? value : [`${key}=${value}`];
} else if (isRef(value)) {
value = formatProp(key, toRaw(value.value), true);
return raw ? value : [`${key}=Ref<`, value, `>`];
} else if (isFunction(value)) {
return [`${key}=fn${value.name ? `<${value.name}>` : ``}`];
} else {
value = toRaw(value);
return raw ? value : [`${key}=`, value];
}
}
function assertNumber(val, type) {
if (false)
return;
if (val === void 0) {
return;
} else if (typeof val !== "number") {
warn2(`${type} is not a valid number - got ${JSON.stringify(val)}.`);
} else if (isNaN(val)) {
warn2(`${type} is NaN - the duration expression might be incorrect.`);
}
}
var ErrorTypeStrings = {
[
"sp"
/* LifecycleHooks.SERVER_PREFETCH */
]: "serverPrefetch hook",
[
"bc"
/* LifecycleHooks.BEFORE_CREATE */
]: "beforeCreate hook",
[
"c"
/* LifecycleHooks.CREATED */
]: "created hook",
[
"bm"
/* LifecycleHooks.BEFORE_MOUNT */
]: "beforeMount hook",
[
"m"
/* LifecycleHooks.MOUNTED */
]: "mounted hook",
[
"bu"
/* LifecycleHooks.BEFORE_UPDATE */
]: "beforeUpdate hook",
[
"u"
/* LifecycleHooks.UPDATED */
]: "updated",
[
"bum"
/* LifecycleHooks.BEFORE_UNMOUNT */
]: "beforeUnmount hook",
[
"um"
/* LifecycleHooks.UNMOUNTED */
]: "unmounted hook",
[
"a"
/* LifecycleHooks.ACTIVATED */
]: "activated hook",
[
"da"
/* LifecycleHooks.DEACTIVATED */
]: "deactivated hook",
[
"ec"
/* LifecycleHooks.ERROR_CAPTURED */
]: "errorCaptured hook",
[
"rtc"
/* LifecycleHooks.RENDER_TRACKED */
]: "renderTracked hook",
[
"rtg"
/* LifecycleHooks.RENDER_TRIGGERED */
]: "renderTriggered hook",
[
0
/* ErrorCodes.SETUP_FUNCTION */
]: "setup function",
[
1
/* ErrorCodes.RENDER_FUNCTION */
]: "render function",
[
2
/* ErrorCodes.WATCH_GETTER */
]: "watcher getter",
[
3
/* ErrorCodes.WATCH_CALLBACK */
]: "watcher callback",
[
4
/* ErrorCodes.WATCH_CLEANUP */
]: "watcher cleanup function",
[
5
/* ErrorCodes.NATIVE_EVENT_HANDLER */
]: "native event handler",
[
6
/* ErrorCodes.COMPONENT_EVENT_HANDLER */
]: "component event handler",
[
7
/* ErrorCodes.VNODE_HOOK */
]: "vnode hook",
[
8
/* ErrorCodes.DIRECTIVE_HOOK */
]: "directive hook",
[
9
/* ErrorCodes.TRANSITION_HOOK */
]: "transition hook",
[
10
/* ErrorCodes.APP_ERROR_HANDLER */
]: "app errorHandler",
[
11
/* ErrorCodes.APP_WARN_HANDLER */
]: "app warnHandler",
[
12
/* ErrorCodes.FUNCTION_REF */
]: "ref function",
[
13
/* ErrorCodes.ASYNC_COMPONENT_LOADER */
]: "async component loader",
[
14
/* ErrorCodes.SCHEDULER */
]: "scheduler flush. This is likely a Vue internals bug. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core"
};
function callWithErrorHandling(fn, instance, type, args) {
let res;
try {
res = args ? fn(...args) : fn();
} catch (err) {
handleError(err, instance, type);
}
return res;
}
function callWithAsyncErrorHandling(fn, instance, type, args) {
if (isFunction(fn)) {
const res = callWithErrorHandling(fn, instance, type, args);
if (res && isPromise(res)) {
res.catch((err) => {
handleError(err, instance, type);
});
}
return res;
}
const values = [];
for (let i = 0; i < fn.length; i++) {
values.push(callWithAsyncErrorHandling(fn[i], instance, type, args));
}
return values;
}
function handleError(err, instance, type, throwInDev = true) {
const contextVNode = instance ? instance.vnode : null;
if (instance) {
let cur = instance.parent;
const exposedInstance = instance.proxy;
const errorInfo = true ? ErrorTypeStrings[type] : type;
while (cur) {
const errorCapturedHooks = cur.ec;
if (errorCapturedHooks) {
for (let i = 0; i < errorCapturedHooks.length; i++) {
if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) {
return;
}
}
}
cur = cur.parent;
}
const appErrorHandler = instance.appContext.config.errorHandler;
if (appErrorHandler) {
callWithErrorHandling(appErrorHandler, null, 10, [err, exposedInstance, errorInfo]);
return;
}
}
logError(err, type, contextVNode, throwInDev);
}
function logError(err, type, contextVNode, throwInDev = true) {
if (true) {
const info = ErrorTypeStrings[type];
if (contextVNode) {
pushWarningContext(contextVNode);
}
warn2(`Unhandled error${info ? ` during execution of ${info}` : ``}`);
if (contextVNode) {
popWarningContext();
}
if (throwInDev) {
throw err;
} else {
console.error(err);
}
} else {
console.error(err);
}
}
var isFlushing = false;
var isFlushPending = false;
var queue = [];
var flushIndex = 0;
var pendingPostFlushCbs = [];
var activePostFlushCbs = null;
var postFlushIndex = 0;
var resolvedPromise = Promise.resolve();
var currentFlushPromise = null;
var RECURSION_LIMIT = 100;
function nextTick(fn) {
const p2 = currentFlushPromise || resolvedPromise;
return fn ? p2.then(this ? fn.bind(this) : fn) : p2;
}
function findInsertionIndex(id) {
let start = flushIndex + 1;
let end = queue.length;
while (start < end) {
const middle = start + end >>> 1;
const middleJobId = getId(queue[middle]);
middleJobId < id ? start = middle + 1 : end = middle;
}
return start;
}
function queueJob(job) {
if (!queue.length || !queue.includes(job, isFlushing && job.allowRecurse ? flushIndex + 1 : flushIndex)) {
if (job.id == null) {
queue.push(job);
} else {
queue.splice(findInsertionIndex(job.id), 0, job);
}
queueFlush();
}
}
function queueFlush() {
if (!isFlushing && !isFlushPending) {
isFlushPending = true;
currentFlushPromise = resolvedPromise.then(flushJobs);
}
}
function invalidateJob(job) {
const i = queue.indexOf(job);
if (i > flushIndex) {
queue.splice(i, 1);
}
}
function queuePostFlushCb(cb) {
if (!isArray(cb)) {
if (!activePostFlushCbs || !activePostFlushCbs.includes(cb, cb.allowRecurse ? postFlushIndex + 1 : postFlushIndex)) {
pendingPostFlushCbs.push(cb);
}
} else {
pendingPostFlushCbs.push(...cb);
}
queueFlush();
}
function flushPreFlushCbs(seen, i = isFlushing ? flushIndex + 1 : 0) {
if (true) {
seen = seen || /* @__PURE__ */ new Map();
}
for (; i < queue.length; i++) {
const cb = queue[i];
if (cb && cb.pre) {
if (checkRecursiveUpdates(seen, cb)) {
continue;
}
queue.splice(i, 1);
i--;
cb();
}
}
}
function flushPostFlushCbs(seen) {
if (pendingPostFlushCbs.length) {
const deduped = [...new Set(pendingPostFlushCbs)];
pendingPostFlushCbs.length = 0;
if (activePostFlushCbs) {
activePostFlushCbs.push(...deduped);
return;
}
activePostFlushCbs = deduped;
if (true) {
seen = seen || /* @__PURE__ */ new Map();
}
activePostFlushCbs.sort((a, b) => getId(a) - getId(b));
for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) {
if (checkRecursiveUpdates(seen, activePostFlushCbs[postFlushIndex])) {
continue;
}
activePostFlushCbs[postFlushIndex]();
}
activePostFlushCbs = null;
postFlushIndex = 0;
}
}
var getId = (job) => job.id == null ? Infinity : job.id;
var comparator = (a, b) => {
const diff = getId(a) - getId(b);
if (diff === 0) {
if (a.pre && !b.pre)
return -1;
if (b.pre && !a.pre)
return 1;
}
return diff;
};
function flushJobs(seen) {
isFlushPending = false;
isFlushing = true;
if (true) {
seen = seen || /* @__PURE__ */ new Map();
}
queue.sort(comparator);
const check = true ? (job) => checkRecursiveUpdates(seen, job) : NOOP;
try {
for (flushIndex = 0; flushIndex < queue.length; flushIndex++) {
const job = queue[flushIndex];
if (job && job.active !== false) {
if (check(job)) {
continue;
}
callWithErrorHandling(
job,
null,
14
/* ErrorCodes.SCHEDULER */
);
}
}
} finally {
flushIndex = 0;
queue.length = 0;
flushPostFlushCbs(seen);
isFlushing = false;
currentFlushPromise = null;
if (queue.length || pendingPostFlushCbs.length) {
flushJobs(seen);
}
}
}
function checkRecursiveUpdates(seen, fn) {
if (!seen.has(fn)) {
seen.set(fn, 1);
} else {
const count = seen.get(fn);
if (count > RECURSION_LIMIT) {
const instance = fn.ownerInstance;
const componentName = instance && getComponentName(instance.type);
warn2(`Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`);
return true;
} else {
seen.set(fn, count + 1);
}
}
}
var isHmrUpdating = false;
var hmrDirtyComponents = /* @__PURE__ */ new Set();
if (true) {
getGlobalThis().__VUE_HMR_RUNTIME__ = {
createRecord: tryWrap(createRecord),
rerender: tryWrap(rerender),
reload: tryWrap(reload)
};
}
var map = /* @__PURE__ */ new Map();
function registerHMR(instance) {
const id = instance.type.__hmrId;
let record = map.get(id);
if (!record) {
createRecord(id, instance.type);
record = map.get(id);
}
record.instances.add(instance);
}
function unregisterHMR(instance) {
map.get(instance.type.__hmrId).instances.delete(instance);
}
function createRecord(id, initialDef) {
if (map.has(id)) {
return false;
}
map.set(id, {
initialDef: normalizeClassComponent(initialDef),
instances: /* @__PURE__ */ new Set()
});
return true;
}
function normalizeClassComponent(component) {
return isClassComponent(component) ? component.__vccOpts : component;
}
function rerender(id, newRender) {
const record = map.get(id);
if (!record) {
return;
}
record.initialDef.render = newRender;
[...record.instances].forEach((instance) => {
if (newRender) {
instance.render = newRender;
normalizeClassComponent(instance.type).render = newRender;
}
instance.renderCache = [];
isHmrUpdating = true;
instance.update();
isHmrUpdating = false;
});
}
function reload(id, newComp) {
const record = map.get(id);
if (!record)
return;
newComp = normalizeClassComponent(newComp);
updateComponentDef(record.initialDef, newComp);
const instances = [...record.instances];
for (const instance of instances) {
const oldComp = normalizeClassComponent(instance.type);
if (!hmrDirtyComponents.has(oldComp)) {
if (oldComp !== record.initialDef) {
updateComponentDef(oldComp, newComp);
}
hmrDirtyComponents.add(oldComp);
}
instance.appContext.optionsCache.delete(instance.type);
if (instance.ceReload) {
hmrDirtyComponents.add(oldComp);
instance.ceReload(newComp.styles);
hmrDirtyComponents.delete(oldComp);
} else if (instance.parent) {
queueJob(instance.parent.update);
} else if (instance.appContext.reload) {
instance.appContext.reload();
} else if (typeof window !== "undefined") {
window.location.reload();
} else {
console.warn("[HMR] Root or manually mounted instance modified. Full reload required.");
}
}
queuePostFlushCb(() => {
for (const instance of instances) {
hmrDirtyComponents.delete(normalizeClassComponent(instance.type));
}
});
}
function updateComponentDef(oldComp, newComp) {
extend(oldComp, newComp);
for (const key in oldComp) {
if (key !== "__file" && !(key in newComp)) {
delete oldComp[key];
}
}
}
function tryWrap(fn) {
return (id, arg) => {
try {
return fn(id, arg);
} catch (e) {
console.error(e);
console.warn(`[HMR] Something went wrong during Vue component hot-reload. Full reload required.`);
}
};
}
var devtools;
var buffer = [];
var devtoolsNotInstalled = false;
function emit$1(event, ...args) {
if (devtools) {
devtools.emit(event, ...args);
} else if (!devtoolsNotInstalled) {
buffer.push({ event, args });
}
}
function setDevtoolsHook(hook, target) {
var _a2, _b;
devtools = hook;
if (devtools) {
devtools.enabled = true;
buffer.forEach(({ event, args }) => devtools.emit(event, ...args));
buffer = [];
} else if (// handle late devtools injection - only do this if we are in an actual
// browser environment to avoid the timer handle stalling test runner exit
// (#4815)
typeof window !== "undefined" && // some envs mock window but not fully
window.HTMLElement && // also exclude jsdom
!((_b = (_a2 = window.navigator) === null || _a2 === void 0 ? void 0 : _a2.userAgent) === null || _b === void 0 ? void 0 : _b.includes("jsdom"))) {
const replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || [];
replay.push((newHook) => {
setDevtoolsHook(newHook, target);
});
setTimeout(() => {
if (!devtools) {
target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null;
devtoolsNotInstalled = true;
buffer = [];
}
}, 3e3);
} else {
devtoolsNotInstalled = true;
buffer = [];
}
}
function devtoolsInitApp(app, version2) {
emit$1("app:init", app, version2, {
Fragment,
Text,
Comment,
Static
});
}
function devtoolsUnmountApp(app) {
emit$1("app:unmount", app);
}
var devtoolsComponentAdded = createDevtoolsComponentHook(
"component:added"
/* DevtoolsHooks.COMPONENT_ADDED */
);
var devtoolsComponentUpdated = createDevtoolsComponentHook(
"component:updated"
/* DevtoolsHooks.COMPONENT_UPDATED */
);
var _devtoolsComponentRemoved = createDevtoolsComponentHook(
"component:removed"
/* DevtoolsHooks.COMPONENT_REMOVED */
);
var devtoolsComponentRemoved = (component) => {
if (devtools && typeof devtools.cleanupBuffer === "function" && // remove the component if it wasn't buffered
!devtools.cleanupBuffer(component)) {
_devtoolsComponentRemoved(component);
}
};
function createDevtoolsComponentHook(hook) {
return (component) => {
emit$1(hook, component.appContext.app, component.uid, component.parent ? component.parent.uid : void 0, component);
};
}
var devtoolsPerfStart = createDevtoolsPerformanceHook(
"perf:start"
/* DevtoolsHooks.PERFORMANCE_START */
);
var devtoolsPerfEnd = createDevtoolsPerformanceHook(
"perf:end"
/* DevtoolsHooks.PERFORMANCE_END */
);
function createDevtoolsPerformanceHook(hook) {
return (component, type, time) => {
emit$1(hook, component.appContext.app, component.uid, component, type, time);
};
}
function devtoolsComponentEmit(component, event, params) {
emit$1("component:emit", component.appContext.app, component, event, params);
}
function emit(instance, event, ...rawArgs) {
if (instance.isUnmounted)
return;
const props = instance.vnode.props || EMPTY_OBJ;
if (true) {
const { emitsOptions, propsOptions: [propsOptions] } = instance;
if (emitsOptions) {
if (!(event in emitsOptions) && true) {
if (!propsOptions || !(toHandlerKey(event) in propsOptions)) {
warn2(`Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(event)}" prop.`);
}
} else {
const validator = emitsOptions[event];
if (isFunction(validator)) {
const isValid = validator(...rawArgs);
if (!isValid) {
warn2(`Invalid event arguments: event validation failed for event "${event}".`);
}
}
}
}
}
let args = rawArgs;
const isModelListener2 = event.startsWith("update:");
const modelArg = isModelListener2 && event.slice(7);
if (modelArg && modelArg in props) {
const modifiersKey = `${modelArg === "modelValue" ? "model" : modelArg}Modifiers`;
const { number, trim } = props[modifiersKey] || EMPTY_OBJ;
if (trim) {
args = rawArgs.map((a) => isString(a) ? a.trim() : a);
}
if (number) {
args = rawArgs.map(looseToNumber);
}
}
if (true) {
devtoolsComponentEmit(instance, event, args);
}
if (true) {
const lowerCaseEvent = event.toLowerCase();
if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) {
warn2(`Event "${lowerCaseEvent}" is emitted in component ${formatComponentName(instance, instance.type)} but the handler is registered for "${event}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${hyphenate(event)}" instead of "${event}".`);
}
}
let handlerName;
let handler = props[handlerName = toHandlerKey(event)] || // also try camelCase event handler (#2249)
props[handlerName = toHandlerKey(camelize(event))];
if (!handler && isModelListener2) {
handler = props[handlerName = toHandlerKey(hyphenate(event))];
}
if (handler) {
callWithAsyncErrorHandling(handler, instance, 6, args);
}
const onceHandler = props[handlerName + `Once`];
if (onceHandler) {
if (!instance.emitted) {
instance.emitted = {};
} else if (instance.emitted[handlerName]) {
return;
}
instance.emitted[handlerName] = true;
callWithAsyncErrorHandling(onceHandler, instance, 6, args);
}
}
function normalizeEmitsOptions(comp, appContext, asMixin = false) {
const cache = appContext.emitsCache;
const cached = cache.get(comp);
if (cached !== void 0) {
return cached;
}
const raw = comp.emits;
let normalized = {};
let hasExtends = false;
if (__VUE_OPTIONS_API__ && !isFunction(comp)) {
const extendEmits = (raw2) => {
const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true);
if (normalizedFromExtend) {
hasExtends = true;
extend(normalized, normalizedFromExtend);
}
};
if (!asMixin && appContext.mixins.length) {
appContext.mixins.forEach(extendEmits);
}
if (comp.extends) {
extendEmits(comp.extends);
}
if (comp.mixins) {
comp.mixins.forEach(extendEmits);
}
}
if (!raw && !hasExtends) {
if (isObject(comp)) {
cache.set(comp, null);
}
return null;
}
if (isArray(raw)) {
raw.forEach((key) => normalized[key] = null);
} else {
extend(normalized, raw);
}
if (isObject(comp)) {
cache.set(comp, normalized);
}
return normalized;
}
function isEmitListener(options, key) {
if (!options || !isOn(key)) {
return false;
}
key = key.slice(2).replace(/Once$/, "");
return hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key);
}
var currentRenderingInstance = null;
var currentScopeId = null;
function setCurrentRenderingInstance(instance) {
const prev = currentRenderingInstance;
currentRenderingInstance = instance;
currentScopeId = instance && instance.type.__scopeId || null;
return prev;
}
function pushScopeId(id) {
currentScopeId = id;
}
function popScopeId() {
currentScopeId = null;
}
var withScopeId = (_id) => withCtx;
function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) {
if (!ctx)
return fn;
if (fn._n) {
return fn;
}
const renderFnWithContext = (...args) => {
if (renderFnWithContext._d) {
setBlockTracking(-1);
}
const prevInstance = setCurrentRenderingInstance(ctx);
let res;
try {
res = fn(...args);
} finally {
setCurrentRenderingInstance(prevInstance);
if (renderFnWithContext._d) {
setBlockTracking(1);
}
}
if (true) {
devtoolsComponentUpdated(ctx);
}
return res;
};
renderFnWithContext._n = true;
renderFnWithContext._c = true;
renderFnWithContext._d = true;
return renderFnWithContext;
}
var accessedAttrs = false;
function markAttrsAccessed() {
accessedAttrs = true;
}
function renderComponentRoot(instance) {
const { type: Component, vnode, proxy, withProxy, props, propsOptions: [propsOptions], slots, attrs, emit: emit2, render: render2, renderCache, data, setupState, ctx, inheritAttrs } = instance;
let result;
let fallthroughAttrs;
const prev = setCurrentRenderingInstance(instance);
if (true) {
accessedAttrs = false;
}
try {
if (vnode.shapeFlag & 4) {
const proxyToUse = withProxy || proxy;
result = normalizeVNode(render2.call(proxyToUse, proxyToUse, renderCache, props, setupState, data, ctx));
fallthroughAttrs = attrs;
} else {
const render3 = Component;
if (attrs === props) {
markAttrsAccessed();
}
result = normalizeVNode(render3.length > 1 ? render3(props, true ? {
get attrs() {
markAttrsAccessed();
return attrs;
},
slots,
emit: emit2
} : { attrs, slots, emit: emit2 }) : render3(
props,
null
/* we know it doesn't need it */
));
fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs);
}
} catch (err) {
blockStack.length = 0;
handleError(
err,
instance,
1
/* ErrorCodes.RENDER_FUNCTION */
);
result = createVNode(Comment);
}
let root = result;
let setRoot = void 0;
if (result.patchFlag > 0 && result.patchFlag & 2048) {
[root, setRoot] = getChildRoot(result);
}
if (fallthroughAttrs && inheritAttrs !== false) {
const keys = Object.keys(fallthroughAttrs);
const { shapeFlag } = root;
if (keys.length) {
if (shapeFlag & (1 | 6)) {
if (propsOptions && keys.some(isModelListener)) {
fallthroughAttrs = filterModelListeners(fallthroughAttrs, propsOptions);
}
root = cloneVNode(root, fallthroughAttrs);
} else if (!accessedAttrs && root.type !== Comment) {
const allAttrs = Object.keys(attrs);
const eventAttrs = [];
const extraAttrs = [];
for (let i = 0, l = allAttrs.length; i < l; i++) {
const key = allAttrs[i];
if (isOn(key)) {
if (!isModelListener(key)) {
eventAttrs.push(key[2].toLowerCase() + key.slice(3));
}
} else {
extraAttrs.push(key);
}
}
if (extraAttrs.length) {
warn2(`Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.`);
}
if (eventAttrs.length) {
warn2(`Extraneous non-emits event listeners (${eventAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.`);
}
}
}
}
if (vnode.dirs) {
if (!isElementRoot(root)) {
warn2(`Runtime directive used on component with non-element root node. The directives will not function as intended.`);
}
root = cloneVNode(root);
root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs;
}
if (vnode.transition) {
if (!isElementRoot(root)) {
warn2(`Component inside renders non-element root node that cannot be animated.`);
}
root.transition = vnode.transition;
}
if (setRoot) {
setRoot(root);
} else {
result = root;
}
setCurrentRenderingInstance(prev);
return result;
}
var getChildRoot = (vnode) => {
const rawChildren = vnode.children;
const dynamicChildren = vnode.dynamicChildren;
const childRoot = filterSingleRoot(rawChildren);
if (!childRoot) {
return [vnode, void 0];
}
const index = rawChildren.indexOf(childRoot);
const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1;
const setRoot = (updatedRoot) => {
rawChildren[index] = updatedRoot;
if (dynamicChildren) {
if (dynamicIndex > -1) {
dynamicChildren[dynamicIndex] = updatedRoot;
} else if (updatedRoot.patchFlag > 0) {
vnode.dynamicChildren = [...dynamicChildren, updatedRoot];
}
}
};
return [normalizeVNode(childRoot), setRoot];
};
function filterSingleRoot(children) {
let singleRoot;
for (let i = 0; i < children.length; i++) {
const child = children[i];
if (isVNode(child)) {
if (child.type !== Comment || child.children === "v-if") {
if (singleRoot) {
return;
} else {
singleRoot = child;
}
}
} else {
return;
}
}
return singleRoot;
}
var getFunctionalFallthrough = (attrs) => {
let res;
for (const key in attrs) {
if (key === "class" || key === "style" || isOn(key)) {
(res || (res = {}))[key] = attrs[key];
}
}
return res;
};
var filterModelListeners = (attrs, props) => {
const res = {};
for (const key in attrs) {
if (!isModelListener(key) || !(key.slice(9) in props)) {
res[key] = attrs[key];
}
}
return res;
};
var isElementRoot = (vnode) => {
return vnode.shapeFlag & (6 | 1) || vnode.type === Comment;
};
function shouldUpdateComponent(prevVNode, nextVNode, optimized) {
const { props: prevProps, children: prevChildren, component } = prevVNode;
const { props: nextProps, children: nextChildren, patchFlag } = nextVNode;
const emits = component.emitsOptions;
if ((prevChildren || nextChildren) && isHmrUpdating) {
return true;
}
if (nextVNode.dirs || nextVNode.transition) {
return true;
}
if (optimized && patchFlag >= 0) {
if (patchFlag & 1024) {
return true;
}
if (patchFlag & 16) {
if (!prevProps) {
return !!nextProps;
}
return hasPropsChanged(prevProps, nextProps, emits);
} else if (patchFlag & 8) {
const dynamicProps = nextVNode.dynamicProps;
for (let i = 0; i < dynamicProps.length; i++) {
const key = dynamicProps[i];
if (nextProps[key] !== prevProps[key] && !isEmitListener(emits, key)) {
return true;
}
}
}
} else {
if (prevChildren || nextChildren) {
if (!nextChildren || !nextChildren.$stable) {
return true;
}
}
if (prevProps === nextProps) {
return false;
}
if (!prevProps) {
return !!nextProps;
}
if (!nextProps) {
return true;
}
return hasPropsChanged(prevProps, nextProps, emits);
}
return false;
}
function hasPropsChanged(prevProps, nextProps, emitsOptions) {
const nextKeys = Object.keys(nextProps);
if (nextKeys.length !== Object.keys(prevProps).length) {
return true;
}
for (let i = 0; i < nextKeys.length; i++) {
const key = nextKeys[i];
if (nextProps[key] !== prevProps[key] && !isEmitListener(emitsOptions, key)) {
return true;
}
}
return false;
}
function updateHOCHostEl({ vnode, parent }, el) {
while (parent && parent.subTree === vnode) {
(vnode = parent.vnode).el = el;
parent = parent.parent;
}
}
var isSuspense = (type) => type.__isSuspense;
var SuspenseImpl = {
name: "Suspense",
// In order to make Suspense tree-shakable, we need to avoid importing it
// directly in the renderer. The renderer checks for the __isSuspense flag
// on a vnode's type and calls the `process` method, passing in renderer
// internals.
__isSuspense: true,
process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals) {
if (n1 == null) {
mountSuspense(n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals);
} else {
patchSuspense(n1, n2, container, anchor, parentComponent, isSVG, slotScopeIds, optimized, rendererInternals);
}
},
hydrate: hydrateSuspense,
create: createSuspenseBoundary,
normalize: normalizeSuspenseChildren
};
var Suspense = SuspenseImpl;
function triggerEvent(vnode, name) {
const eventListener = vnode.props && vnode.props[name];
if (isFunction(eventListener)) {
eventListener();
}
}
function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals) {
const { p: patch, o: { createElement } } = rendererInternals;
const hiddenContainer = createElement("div");
const suspense = vnode.suspense = createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, isSVG, slotScopeIds, optimized, rendererInternals);
patch(null, suspense.pendingBranch = vnode.ssContent, hiddenContainer, null, parentComponent, suspense, isSVG, slotScopeIds);
if (suspense.deps > 0) {
triggerEvent(vnode, "onPending");
triggerEvent(vnode, "onFallback");
patch(
null,
vnode.ssFallback,
container,
anchor,
parentComponent,
null,
// fallback tree will not have suspense context
isSVG,
slotScopeIds
);
setActiveBranch(suspense, vnode.ssFallback);
} else {
suspense.resolve();
}
}
function patchSuspense(n1, n2, container, anchor, parentComponent, isSVG, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) {
const suspense = n2.suspense = n1.suspense;
suspense.vnode = n2;
n2.el = n1.el;
const newBranch = n2.ssContent;
const newFallback = n2.ssFallback;
const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense;
if (pendingBranch) {
suspense.pendingBranch = newBranch;
if (isSameVNodeType(newBranch, pendingBranch)) {
patch(pendingBranch, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, isSVG, slotScopeIds, optimized);
if (suspense.deps <= 0) {
suspense.resolve();
} else if (isInFallback) {
patch(
activeBranch,
newFallback,
container,
anchor,
parentComponent,
null,
// fallback tree will not have suspense context
isSVG,
slotScopeIds,
optimized
);
setActiveBranch(suspense, newFallback);
}
} else {
suspense.pendingId++;
if (isHydrating) {
suspense.isHydrating = false;
suspense.activeBranch = pendingBranch;
} else {
unmount(pendingBranch, parentComponent, suspense);
}
suspense.deps = 0;
suspense.effects.length = 0;
suspense.hiddenContainer = createElement("div");
if (isInFallback) {
patch(null, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, isSVG, slotScopeIds, optimized);
if (suspense.deps <= 0) {
suspense.resolve();
} else {
patch(
activeBranch,
newFallback,
container,
anchor,
parentComponent,
null,
// fallback tree will not have suspense context
isSVG,
slotScopeIds,
optimized
);
setActiveBranch(suspense, newFallback);
}
} else if (activeBranch && isSameVNodeType(newBranch, activeBranch)) {
patch(activeBranch, newBranch, container, anchor, parentComponent, suspense, isSVG, slotScopeIds, optimized);
suspense.resolve(true);
} else {
patch(null, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, isSVG, slotScopeIds, optimized);
if (suspense.deps <= 0) {
suspense.resolve();
}
}
}
} else {
if (activeBranch && isSameVNodeType(newBranch, activeBranch)) {
patch(activeBranch, newBranch, container, anchor, parentComponent, suspense, isSVG, slotScopeIds, optimized);
setActiveBranch(suspense, newBranch);
} else {
triggerEvent(n2, "onPending");
suspense.pendingBranch = newBranch;
suspense.pendingId++;
patch(null, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, isSVG, slotScopeIds, optimized);
if (suspense.deps <= 0) {
suspense.resolve();
} else {
const { timeout, pendingId } = suspense;
if (timeout > 0) {
setTimeout(() => {
if (suspense.pendingId === pendingId) {
suspense.fallback(newFallback);
}
}, timeout);
} else if (timeout === 0) {
suspense.fallback(newFallback);
}
}
}
}
}
var hasWarned = false;
function createSuspenseBoundary(vnode, parent, parentComponent, container, hiddenContainer, anchor, isSVG, slotScopeIds, optimized, rendererInternals, isHydrating = false) {
if (!hasWarned) {
hasWarned = true;
console[console.info ? "info" : "log"](` is an experimental feature and its API will likely change.`);
}
const { p: patch, m: move, um: unmount, n: next, o: { parentNode, remove: remove2 } } = rendererInternals;
const timeout = vnode.props ? toNumber(vnode.props.timeout) : void 0;
if (true) {
assertNumber(timeout, `Suspense timeout`);
}
const suspense = {
vnode,
parent,
parentComponent,
isSVG,
container,
hiddenContainer,
anchor,
deps: 0,
pendingId: 0,
timeout: typeof timeout === "number" ? timeout : -1,
activeBranch: null,
pendingBranch: null,
isInFallback: true,
isHydrating,
isUnmounted: false,
effects: [],
resolve(resume = false) {
if (true) {
if (!resume && !suspense.pendingBranch) {
throw new Error(`suspense.resolve() is called without a pending branch.`);
}
if (suspense.isUnmounted) {
throw new Error(`suspense.resolve() is called on an already unmounted suspense boundary.`);
}
}
const { vnode: vnode2, activeBranch, pendingBranch, pendingId, effects, parentComponent: parentComponent2, container: container2 } = suspense;
if (suspense.isHydrating) {
suspense.isHydrating = false;
} else if (!resume) {
const delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === "out-in";
if (delayEnter) {
activeBranch.transition.afterLeave = () => {
if (pendingId === suspense.pendingId) {
move(
pendingBranch,
container2,
anchor2,
0
/* MoveType.ENTER */
);
}
};
}
let { anchor: anchor2 } = suspense;
if (activeBranch) {
anchor2 = next(activeBranch);
unmount(activeBranch, parentComponent2, suspense, true);
}
if (!delayEnter) {
move(
pendingBranch,
container2,
anchor2,
0
/* MoveType.ENTER */
);
}
}
setActiveBranch(suspense, pendingBranch);
suspense.pendingBranch = null;
suspense.isInFallback = false;
let parent2 = suspense.parent;
let hasUnresolvedAncestor = false;
while (parent2) {
if (parent2.pendingBranch) {
parent2.effects.push(...effects);
hasUnresolvedAncestor = true;
break;
}
parent2 = parent2.parent;
}
if (!hasUnresolvedAncestor) {
queuePostFlushCb(effects);
}
suspense.effects = [];
triggerEvent(vnode2, "onResolve");
},
fallback(fallbackVNode) {
if (!suspense.pendingBranch) {
return;
}
const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, isSVG: isSVG2 } = suspense;
triggerEvent(vnode2, "onFallback");
const anchor2 = next(activeBranch);
const mountFallback = () => {
if (!suspense.isInFallback) {
return;
}
patch(
null,
fallbackVNode,
container2,
anchor2,
parentComponent2,
null,
// fallback tree will not have suspense context
isSVG2,
slotScopeIds,
optimized
);
setActiveBranch(suspense, fallbackVNode);
};
const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in";
if (delayEnter) {
activeBranch.transition.afterLeave = mountFallback;
}
suspense.isInFallback = true;
unmount(
activeBranch,
parentComponent2,
null,
// no suspense so unmount hooks fire now
true
// shouldRemove
);
if (!delayEnter) {
mountFallback();
}
},
move(container2, anchor2, type) {
suspense.activeBranch && move(suspense.activeBranch, container2, anchor2, type);
suspense.container = container2;
},
next() {
return suspense.activeBranch && next(suspense.activeBranch);
},
registerDep(instance, setupRenderEffect) {
const isInPendingSuspense = !!suspense.pendingBranch;
if (isInPendingSuspense) {
suspense.deps++;
}
const hydratedEl = instance.vnode.el;
instance.asyncDep.catch((err) => {
handleError(
err,
instance,
0
/* ErrorCodes.SETUP_FUNCTION */
);
}).then((asyncSetupResult) => {
if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) {
return;
}
instance.asyncResolved = true;
const { vnode: vnode2 } = instance;
if (true) {
pushWarningContext(vnode2);
}
handleSetupResult(instance, asyncSetupResult, false);
if (hydratedEl) {
vnode2.el = hydratedEl;
}
const placeholder = !hydratedEl && instance.subTree.el;
setupRenderEffect(
instance,
vnode2,
// component may have been moved before resolve.
// if this is not a hydration, instance.subTree will be the comment
// placeholder.
parentNode(hydratedEl || instance.subTree.el),
// anchor will not be used if this is hydration, so only need to
// consider the comment placeholder case.
hydratedEl ? null : next(instance.subTree),
suspense,
isSVG,
optimized
);
if (placeholder) {
remove2(placeholder);
}
updateHOCHostEl(instance, vnode2.el);
if (true) {
popWarningContext();
}
if (isInPendingSuspense && --suspense.deps === 0) {
suspense.resolve();
}
});
},
unmount(parentSuspense, doRemove) {
suspense.isUnmounted = true;
if (suspense.activeBranch) {
unmount(suspense.activeBranch, parentComponent, parentSuspense, doRemove);
}
if (suspense.pendingBranch) {
unmount(suspense.pendingBranch, parentComponent, parentSuspense, doRemove);
}
}
};
return suspense;
}
function hydrateSuspense(node, vnode, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals, hydrateNode) {
const suspense = vnode.suspense = createSuspenseBoundary(
vnode,
parentSuspense,
parentComponent,
node.parentNode,
document.createElement("div"),
null,
isSVG,
slotScopeIds,
optimized,
rendererInternals,
true
/* hydrating */
);
const result = hydrateNode(node, suspense.pendingBranch = vnode.ssContent, parentComponent, suspense, slotScopeIds, optimized);
if (suspense.deps === 0) {
suspense.resolve();
}
return result;
}
function normalizeSuspenseChildren(vnode) {
const { shapeFlag, children } = vnode;
const isSlotChildren = shapeFlag & 32;
vnode.ssContent = normalizeSuspenseSlot(isSlotChildren ? children.default : children);
vnode.ssFallback = isSlotChildren ? normalizeSuspenseSlot(children.fallback) : createVNode(Comment);
}
function normalizeSuspenseSlot(s) {
let block;
if (isFunction(s)) {
const trackBlock = isBlockTreeEnabled && s._c;
if (trackBlock) {
s._d = false;
openBlock();
}
s = s();
if (trackBlock) {
s._d = true;
block = currentBlock;
closeBlock();
}
}
if (isArray(s)) {
const singleChild = filterSingleRoot(s);
if (!singleChild) {
warn2(` slots expect a single root node.`);
}
s = singleChild;
}
s = normalizeVNode(s);
if (block && !s.dynamicChildren) {
s.dynamicChildren = block.filter((c) => c !== s);
}
return s;
}
function queueEffectWithSuspense(fn, suspense) {
if (suspense && suspense.pendingBranch) {
if (isArray(fn)) {
suspense.effects.push(...fn);
} else {
suspense.effects.push(fn);
}
} else {
queuePostFlushCb(fn);
}
}
function setActiveBranch(suspense, branch) {
suspense.activeBranch = branch;
const { vnode, parentComponent } = suspense;
const el = vnode.el = branch.el;
if (parentComponent && parentComponent.subTree === vnode) {
parentComponent.vnode.el = el;
updateHOCHostEl(parentComponent, el);
}
}
function provide(key, value) {
if (!currentInstance) {
if (true) {
warn2(`provide() can only be used inside setup().`);
}
} else {
let provides = currentInstance.provides;
const parentProvides = currentInstance.parent && currentInstance.parent.provides;
if (parentProvides === provides) {
provides = currentInstance.provides = Object.create(parentProvides);
}
provides[key] = value;
}
}
function inject(key, defaultValue, treatDefaultAsFactory = false) {
const instance = currentInstance || currentRenderingInstance;
if (instance) {
const provides = instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides;
if (provides && key in provides) {
return provides[key];
} else if (arguments.length > 1) {
return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance.proxy) : defaultValue;
} else if (true) {
warn2(`injection "${String(key)}" not found.`);
}
} else if (true) {
warn2(`inject() can only be used inside setup() or functional components.`);
}
}
function watchEffect(effect2, options) {
return doWatch(effect2, null, options);
}
function watchPostEffect(effect2, options) {
return doWatch(effect2, null, true ? Object.assign(Object.assign({}, options), { flush: "post" }) : { flush: "post" });
}
function watchSyncEffect(effect2, options) {
return doWatch(effect2, null, true ? Object.assign(Object.assign({}, options), { flush: "sync" }) : { flush: "sync" });
}
var INITIAL_WATCHER_VALUE = {};
function watch(source, cb, options) {
if (!isFunction(cb)) {
warn2(`\`watch(fn, options?)\` signature has been moved to a separate API. Use \`watchEffect(fn, options?)\` instead. \`watch\` now only supports \`watch(source, cb, options?) signature.`);
}
return doWatch(source, cb, options);
}
function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EMPTY_OBJ) {
if (!cb) {
if (immediate !== void 0) {
warn2(`watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.`);
}
if (deep !== void 0) {
warn2(`watch() "deep" option is only respected when using the watch(source, callback, options?) signature.`);
}
}
const warnInvalidSource = (s) => {
warn2(`Invalid watch source: `, s, `A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.`);
};
const instance = getCurrentScope() === (currentInstance === null || currentInstance === void 0 ? void 0 : currentInstance.scope) ? currentInstance : null;
let getter;
let forceTrigger = false;
let isMultiSource = false;
if (isRef(source)) {
getter = () => source.value;
forceTrigger = isShallow(source);
} else if (isReactive(source)) {
getter = () => source;
deep = true;
} else if (isArray(source)) {
isMultiSource = true;
forceTrigger = source.some((s) => isReactive(s) || isShallow(s));
getter = () => source.map((s) => {
if (isRef(s)) {
return s.value;
} else if (isReactive(s)) {
return traverse(s);
} else if (isFunction(s)) {
return callWithErrorHandling(
s,
instance,
2
/* ErrorCodes.WATCH_GETTER */
);
} else {
warnInvalidSource(s);
}
});
} else if (isFunction(source)) {
if (cb) {
getter = () => callWithErrorHandling(
source,
instance,
2
/* ErrorCodes.WATCH_GETTER */
);
} else {
getter = () => {
if (instance && instance.isUnmounted) {
return;
}
if (cleanup) {
cleanup();
}
return callWithAsyncErrorHandling(source, instance, 3, [onCleanup]);
};
}
} else {
getter = NOOP;
warnInvalidSource(source);
}
if (cb && deep) {
const baseGetter = getter;
getter = () => traverse(baseGetter());
}
let cleanup;
let onCleanup = (fn) => {
cleanup = effect2.onStop = () => {
callWithErrorHandling(
fn,
instance,
4
/* ErrorCodes.WATCH_CLEANUP */
);
};
};
let ssrCleanup;
if (isInSSRComponentSetup) {
onCleanup = NOOP;
if (!cb) {
getter();
} else if (immediate) {
callWithAsyncErrorHandling(cb, instance, 3, [
getter(),
isMultiSource ? [] : void 0,
onCleanup
]);
}
if (flush === "sync") {
const ctx = useSSRContext();
ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []);
} else {
return NOOP;
}
}
let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;
const job = () => {
if (!effect2.active) {
return;
}
if (cb) {
const newValue = effect2.run();
if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue)) || false) {
if (cleanup) {
cleanup();
}
callWithAsyncErrorHandling(cb, instance, 3, [
newValue,
// pass undefined as the old value when it's changed for the first time
oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue,
onCleanup
]);
oldValue = newValue;
}
} else {
effect2.run();
}
};
job.allowRecurse = !!cb;
let scheduler;
if (flush === "sync") {
scheduler = job;
} else if (flush === "post") {
scheduler = () => queuePostRenderEffect(job, instance && instance.suspense);
} else {
job.pre = true;
if (instance)
job.id = instance.uid;
scheduler = () => queueJob(job);
}
const effect2 = new ReactiveEffect(getter, scheduler);
if (true) {
effect2.onTrack = onTrack;
effect2.onTrigger = onTrigger;
}
if (cb) {
if (immediate) {
job();
} else {
oldValue = effect2.run();
}
} else if (flush === "post") {
queuePostRenderEffect(effect2.run.bind(effect2), instance && instance.suspense);
} else {
effect2.run();
}
const unwatch = () => {
effect2.stop();
if (instance && instance.scope) {
remove(instance.scope.effects, effect2);
}
};
if (ssrCleanup)
ssrCleanup.push(unwatch);
return unwatch;
}
function instanceWatch(source, value, options) {
const publicThis = this.proxy;
const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis);
let cb;
if (isFunction(value)) {
cb = value;
} else {
cb = value.handler;
options = value;
}
const cur = currentInstance;
setCurrentInstance(this);
const res = doWatch(getter, cb.bind(publicThis), options);
if (cur) {
setCurrentInstance(cur);
} else {
unsetCurrentInstance();
}
return res;
}
function createPathGetter(ctx, path) {
const segments = path.split(".");
return () => {
let cur = ctx;
for (let i = 0; i < segments.length && cur; i++) {
cur = cur[segments[i]];
}
return cur;
};
}
function traverse(value, seen) {
if (!isObject(value) || value[
"__v_skip"
/* ReactiveFlags.SKIP */
]) {
return value;
}
seen = seen || /* @__PURE__ */ new Set();
if (seen.has(value)) {
return value;
}
seen.add(value);
if (isRef(value)) {
traverse(value.value, seen);
} else if (isArray(value)) {
for (let i = 0; i < value.length; i++) {
traverse(value[i], seen);
}
} else if (isSet(value) || isMap(value)) {
value.forEach((v) => {
traverse(v, seen);
});
} else if (isPlainObject(value)) {
for (const key in value) {
traverse(value[key], seen);
}
}
return value;
}
function useTransitionState() {
const state = {
isMounted: false,
isLeaving: false,
isUnmounting: false,
leavingVNodes: /* @__PURE__ */ new Map()
};
onMounted(() => {
state.isMounted = true;
});
onBeforeUnmount(() => {
state.isUnmounting = true;
});
return state;
}
var TransitionHookValidator = [Function, Array];
var BaseTransitionImpl = {
name: `BaseTransition`,
props: {
mode: String,
appear: Boolean,
persisted: Boolean,
// enter
onBeforeEnter: TransitionHookValidator,
onEnter: TransitionHookValidator,
onAfterEnter: TransitionHookValidator,
onEnterCancelled: TransitionHookValidator,
// leave
onBeforeLeave: TransitionHookValidator,
onLeave: TransitionHookValidator,
onAfterLeave: TransitionHookValidator,
onLeaveCancelled: TransitionHookValidator,
// appear
onBeforeAppear: TransitionHookValidator,
onAppear: TransitionHookValidator,
onAfterAppear: TransitionHookValidator,
onAppearCancelled: TransitionHookValidator
},
setup(props, { slots }) {
const instance = getCurrentInstance();
const state = useTransitionState();
let prevTransitionKey;
return () => {
const children = slots.default && getTransitionRawChildren(slots.default(), true);
if (!children || !children.length) {
return;
}
let child = children[0];
if (children.length > 1) {
let hasFound = false;
for (const c of children) {
if (c.type !== Comment) {
if (hasFound) {
warn2(" can only be used on a single element or component. Use for lists.");
break;
}
child = c;
hasFound = true;
if (false)
break;
}
}
}
const rawProps = toRaw(props);
const { mode } = rawProps;
if (mode && mode !== "in-out" && mode !== "out-in" && mode !== "default") {
warn2(`invalid mode: ${mode}`);
}
if (state.isLeaving) {
return emptyPlaceholder(child);
}
const innerChild = getKeepAliveChild(child);
if (!innerChild) {
return emptyPlaceholder(child);
}
const enterHooks = resolveTransitionHooks(innerChild, rawProps, state, instance);
setTransitionHooks(innerChild, enterHooks);
const oldChild = instance.subTree;
const oldInnerChild = oldChild && getKeepAliveChild(oldChild);
let transitionKeyChanged = false;
const { getTransitionKey } = innerChild.type;
if (getTransitionKey) {
const key = getTransitionKey();
if (prevTransitionKey === void 0) {
prevTransitionKey = key;
} else if (key !== prevTransitionKey) {
prevTransitionKey = key;
transitionKeyChanged = true;
}
}
if (oldInnerChild && oldInnerChild.type !== Comment && (!isSameVNodeType(innerChild, oldInnerChild) || transitionKeyChanged)) {
const leavingHooks = resolveTransitionHooks(oldInnerChild, rawProps, state, instance);
setTransitionHooks(oldInnerChild, leavingHooks);
if (mode === "out-in") {
state.isLeaving = true;
leavingHooks.afterLeave = () => {
state.isLeaving = false;
if (instance.update.active !== false) {
instance.update();
}
};
return emptyPlaceholder(child);
} else if (mode === "in-out" && innerChild.type !== Comment) {
leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => {
const leavingVNodesCache = getLeavingNodesForType(state, oldInnerChild);
leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild;
el._leaveCb = () => {
earlyRemove();
el._leaveCb = void 0;
delete enterHooks.delayedLeave;
};
enterHooks.delayedLeave = delayedLeave;
};
}
}
return child;
};
}
};
var BaseTransition = BaseTransitionImpl;
function getLeavingNodesForType(state, vnode) {
const { leavingVNodes } = state;
let leavingVNodesCache = leavingVNodes.get(vnode.type);
if (!leavingVNodesCache) {
leavingVNodesCache = /* @__PURE__ */ Object.create(null);
leavingVNodes.set(vnode.type, leavingVNodesCache);
}
return leavingVNodesCache;
}
function resolveTransitionHooks(vnode, props, state, instance) {
const { appear, mode, persisted = false, onBeforeEnter, onEnter, onAfterEnter, onEnterCancelled, onBeforeLeave, onLeave, onAfterLeave, onLeaveCancelled, onBeforeAppear, onAppear, onAfterAppear, onAppearCancelled } = props;
const key = String(vnode.key);
const leavingVNodesCache = getLeavingNodesForType(state, vnode);
const callHook3 = (hook, args) => {
hook && callWithAsyncErrorHandling(hook, instance, 9, args);
};
const callAsyncHook = (hook, args) => {
const done = args[1];
callHook3(hook, args);
if (isArray(hook)) {
if (hook.every((hook2) => hook2.length <= 1))
done();
} else if (hook.length <= 1) {
done();
}
};
const hooks = {
mode,
persisted,
beforeEnter(el) {
let hook = onBeforeEnter;
if (!state.isMounted) {
if (appear) {
hook = onBeforeAppear || onBeforeEnter;
} else {
return;
}
}
if (el._leaveCb) {
el._leaveCb(
true
/* cancelled */
);
}
const leavingVNode = leavingVNodesCache[key];
if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el._leaveCb) {
leavingVNode.el._leaveCb();
}
callHook3(hook, [el]);
},
enter(el) {
let hook = onEnter;
let afterHook = onAfterEnter;
let cancelHook = onEnterCancelled;
if (!state.isMounted) {
if (appear) {
hook = onAppear || onEnter;
afterHook = onAfterAppear || onAfterEnter;
cancelHook = onAppearCancelled || onEnterCancelled;
} else {
return;
}
}
let called = false;
const done = el._enterCb = (cancelled) => {
if (called)
return;
called = true;
if (cancelled) {
callHook3(cancelHook, [el]);
} else {
callHook3(afterHook, [el]);
}
if (hooks.delayedLeave) {
hooks.delayedLeave();
}
el._enterCb = void 0;
};
if (hook) {
callAsyncHook(hook, [el, done]);
} else {
done();
}
},
leave(el, remove2) {
const key2 = String(vnode.key);
if (el._enterCb) {
el._enterCb(
true
/* cancelled */
);
}
if (state.isUnmounting) {
return remove2();
}
callHook3(onBeforeLeave, [el]);
let called = false;
const done = el._leaveCb = (cancelled) => {
if (called)
return;
called = true;
remove2();
if (cancelled) {
callHook3(onLeaveCancelled, [el]);
} else {
callHook3(onAfterLeave, [el]);
}
el._leaveCb = void 0;
if (leavingVNodesCache[key2] === vnode) {
delete leavingVNodesCache[key2];
}
};
leavingVNodesCache[key2] = vnode;
if (onLeave) {
callAsyncHook(onLeave, [el, done]);
} else {
done();
}
},
clone(vnode2) {
return resolveTransitionHooks(vnode2, props, state, instance);
}
};
return hooks;
}
function emptyPlaceholder(vnode) {
if (isKeepAlive(vnode)) {
vnode = cloneVNode(vnode);
vnode.children = null;
return vnode;
}
}
function getKeepAliveChild(vnode) {
return isKeepAlive(vnode) ? vnode.children ? vnode.children[0] : void 0 : vnode;
}
function setTransitionHooks(vnode, hooks) {
if (vnode.shapeFlag & 6 && vnode.component) {
setTransitionHooks(vnode.component.subTree, hooks);
} else if (vnode.shapeFlag & 128) {
vnode.ssContent.transition = hooks.clone(vnode.ssContent);
vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
} else {
vnode.transition = hooks;
}
}
function getTransitionRawChildren(children, keepComment = false, parentKey) {
let ret = [];
let keyedFragmentCount = 0;
for (let i = 0; i < children.length; i++) {
let child = children[i];
const key = parentKey == null ? child.key : String(parentKey) + String(child.key != null ? child.key : i);
if (child.type === Fragment) {
if (child.patchFlag & 128)
keyedFragmentCount++;
ret = ret.concat(getTransitionRawChildren(child.children, keepComment, key));
} else if (keepComment || child.type !== Comment) {
ret.push(key != null ? cloneVNode(child, { key }) : child);
}
}
if (keyedFragmentCount > 1) {
for (let i = 0; i < ret.length; i++) {
ret[i].patchFlag = -2;
}
}
return ret;
}
function defineComponent(options) {
return isFunction(options) ? { setup: options, name: options.name } : options;
}
var isAsyncWrapper = (i) => !!i.type.__asyncLoader;
function defineAsyncComponent(source) {
if (isFunction(source)) {
source = { loader: source };
}
const {
loader,
loadingComponent,
errorComponent,
delay = 200,
timeout,
// undefined = never times out
suspensible = true,
onError: userOnError
} = source;
let pendingRequest = null;
let resolvedComp;
let retries = 0;
const retry = () => {
retries++;
pendingRequest = null;
return load();
};
const load = () => {
let thisRequest;
return pendingRequest || (thisRequest = pendingRequest = loader().catch((err) => {
err = err instanceof Error ? err : new Error(String(err));
if (userOnError) {
return new Promise((resolve2, reject) => {
const userRetry = () => resolve2(retry());
const userFail = () => reject(err);
userOnError(err, userRetry, userFail, retries + 1);
});
} else {
throw err;
}
}).then((comp) => {
if (thisRequest !== pendingRequest && pendingRequest) {
return pendingRequest;
}
if (!comp) {
warn2(`Async component loader resolved to undefined. If you are using retry(), make sure to return its return value.`);
}
if (comp && (comp.__esModule || comp[Symbol.toStringTag] === "Module")) {
comp = comp.default;
}
if (comp && !isObject(comp) && !isFunction(comp)) {
throw new Error(`Invalid async component load result: ${comp}`);
}
resolvedComp = comp;
return comp;
}));
};
return defineComponent({
name: "AsyncComponentWrapper",
__asyncLoader: load,
get __asyncResolved() {
return resolvedComp;
},
setup() {
const instance = currentInstance;
if (resolvedComp) {
return () => createInnerComp(resolvedComp, instance);
}
const onError = (err) => {
pendingRequest = null;
handleError(
err,
instance,
13,
!errorComponent
/* do not throw in dev if user provided error component */
);
};
if (suspensible && instance.suspense || isInSSRComponentSetup) {
return load().then((comp) => {
return () => createInnerComp(comp, instance);
}).catch((err) => {
onError(err);
return () => errorComponent ? createVNode(errorComponent, {
error: err
}) : null;
});
}
const loaded = ref(false);
const error = ref();
const delayed = ref(!!delay);
if (delay) {
setTimeout(() => {
delayed.value = false;
}, delay);
}
if (timeout != null) {
setTimeout(() => {
if (!loaded.value && !error.value) {
const err = new Error(`Async component timed out after ${timeout}ms.`);
onError(err);
error.value = err;
}
}, timeout);
}
load().then(() => {
loaded.value = true;
if (instance.parent && isKeepAlive(instance.parent.vnode)) {
queueJob(instance.parent.update);
}
}).catch((err) => {
onError(err);
error.value = err;
});
return () => {
if (loaded.value && resolvedComp) {
return createInnerComp(resolvedComp, instance);
} else if (error.value && errorComponent) {
return createVNode(errorComponent, {
error: error.value
});
} else if (loadingComponent && !delayed.value) {
return createVNode(loadingComponent);
}
};
}
});
}
function createInnerComp(comp, parent) {
const { ref: ref2, props, children, ce } = parent.vnode;
const vnode = createVNode(comp, props, children);
vnode.ref = ref2;
vnode.ce = ce;
delete parent.vnode.ce;
return vnode;
}
var isKeepAlive = (vnode) => vnode.type.__isKeepAlive;
var KeepAliveImpl = {
name: `KeepAlive`,
// Marker for special handling inside the renderer. We are not using a ===
// check directly on KeepAlive in the renderer, because importing it directly
// would prevent it from being tree-shaken.
__isKeepAlive: true,
props: {
include: [String, RegExp, Array],
exclude: [String, RegExp, Array],
max: [String, Number]
},
setup(props, { slots }) {
const instance = getCurrentInstance();
const sharedContext = instance.ctx;
if (!sharedContext.renderer) {
return () => {
const children = slots.default && slots.default();
return children && children.length === 1 ? children[0] : children;
};
}
const cache = /* @__PURE__ */ new Map();
const keys = /* @__PURE__ */ new Set();
let current = null;
if (true) {
instance.__v_cache = cache;
}
const parentSuspense = instance.suspense;
const { renderer: { p: patch, m: move, um: _unmount, o: { createElement } } } = sharedContext;
const storageContainer = createElement("div");
sharedContext.activate = (vnode, container, anchor, isSVG, optimized) => {
const instance2 = vnode.component;
move(vnode, container, anchor, 0, parentSuspense);
patch(instance2.vnode, vnode, container, anchor, instance2, parentSuspense, isSVG, vnode.slotScopeIds, optimized);
queuePostRenderEffect(() => {
instance2.isDeactivated = false;
if (instance2.a) {
invokeArrayFns(instance2.a);
}
const vnodeHook = vnode.props && vnode.props.onVnodeMounted;
if (vnodeHook) {
invokeVNodeHook(vnodeHook, instance2.parent, vnode);
}
}, parentSuspense);
if (true) {
devtoolsComponentAdded(instance2);
}
};
sharedContext.deactivate = (vnode) => {
const instance2 = vnode.component;
move(vnode, storageContainer, null, 1, parentSuspense);
queuePostRenderEffect(() => {
if (instance2.da) {
invokeArrayFns(instance2.da);
}
const vnodeHook = vnode.props && vnode.props.onVnodeUnmounted;
if (vnodeHook) {
invokeVNodeHook(vnodeHook, instance2.parent, vnode);
}
instance2.isDeactivated = true;
}, parentSuspense);
if (true) {
devtoolsComponentAdded(instance2);
}
};
function unmount(vnode) {
resetShapeFlag(vnode);
_unmount(vnode, instance, parentSuspense, true);
}
function pruneCache(filter) {
cache.forEach((vnode, key) => {
const name = getComponentName(vnode.type);
if (name && (!filter || !filter(name))) {
pruneCacheEntry(key);
}
});
}
function pruneCacheEntry(key) {
const cached = cache.get(key);
if (!current || !isSameVNodeType(cached, current)) {
unmount(cached);
} else if (current) {
resetShapeFlag(current);
}
cache.delete(key);
keys.delete(key);
}
watch(
() => [props.include, props.exclude],
([include, exclude]) => {
include && pruneCache((name) => matches(include, name));
exclude && pruneCache((name) => !matches(exclude, name));
},
// prune post-render after `current` has been updated
{ flush: "post", deep: true }
);
let pendingCacheKey = null;
const cacheSubtree = () => {
if (pendingCacheKey != null) {
cache.set(pendingCacheKey, getInnerChild(instance.subTree));
}
};
onMounted(cacheSubtree);
onUpdated(cacheSubtree);
onBeforeUnmount(() => {
cache.forEach((cached) => {
const { subTree, suspense } = instance;
const vnode = getInnerChild(subTree);
if (cached.type === vnode.type && cached.key === vnode.key) {
resetShapeFlag(vnode);
const da = vnode.component.da;
da && queuePostRenderEffect(da, suspense);
return;
}
unmount(cached);
});
});
return () => {
pendingCacheKey = null;
if (!slots.default) {
return null;
}
const children = slots.default();
const rawVNode = children[0];
if (children.length > 1) {
if (true) {
warn2(`KeepAlive should contain exactly one component child.`);
}
current = null;
return children;
} else if (!isVNode(rawVNode) || !(rawVNode.shapeFlag & 4) && !(rawVNode.shapeFlag & 128)) {
current = null;
return rawVNode;
}
let vnode = getInnerChild(rawVNode);
const comp = vnode.type;
const name = getComponentName(isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : comp);
const { include, exclude, max } = props;
if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) {
current = vnode;
return rawVNode;
}
const key = vnode.key == null ? comp : vnode.key;
const cachedVNode = cache.get(key);
if (vnode.el) {
vnode = cloneVNode(vnode);
if (rawVNode.shapeFlag & 128) {
rawVNode.ssContent = vnode;
}
}
pendingCacheKey = key;
if (cachedVNode) {
vnode.el = cachedVNode.el;
vnode.component = cachedVNode.component;
if (vnode.transition) {
setTransitionHooks(vnode, vnode.transition);
}
vnode.shapeFlag |= 512;
keys.delete(key);
keys.add(key);
} else {
keys.add(key);
if (max && keys.size > parseInt(max, 10)) {
pruneCacheEntry(keys.values().next().value);
}
}
vnode.shapeFlag |= 256;
current = vnode;
return isSuspense(rawVNode.type) ? rawVNode : vnode;
};
}
};
var KeepAlive = KeepAliveImpl;
function matches(pattern, name) {
if (isArray(pattern)) {
return pattern.some((p2) => matches(p2, name));
} else if (isString(pattern)) {
return pattern.split(",").includes(name);
} else if (isRegExp(pattern)) {
return pattern.test(name);
}
return false;
}
function onActivated(hook, target) {
registerKeepAliveHook(hook, "a", target);
}
function onDeactivated(hook, target) {
registerKeepAliveHook(hook, "da", target);
}
function registerKeepAliveHook(hook, type, target = currentInstance) {
const wrappedHook = hook.__wdc || (hook.__wdc = () => {
let current = target;
while (current) {
if (current.isDeactivated) {
return;
}
current = current.parent;
}
return hook();
});
injectHook(type, wrappedHook, target);
if (target) {
let current = target.parent;
while (current && current.parent) {
if (isKeepAlive(current.parent.vnode)) {
injectToKeepAliveRoot(wrappedHook, type, target, current);
}
current = current.parent;
}
}
}
function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) {
const injected = injectHook(
type,
hook,
keepAliveRoot,
true
/* prepend */
);
onUnmounted(() => {
remove(keepAliveRoot[type], injected);
}, target);
}
function resetShapeFlag(vnode) {
vnode.shapeFlag &= ~256;
vnode.shapeFlag &= ~512;
}
function getInnerChild(vnode) {
return vnode.shapeFlag & 128 ? vnode.ssContent : vnode;
}
function injectHook(type, hook, target = currentInstance, prepend = false) {
if (target) {
const hooks = target[type] || (target[type] = []);
const wrappedHook = hook.__weh || (hook.__weh = (...args) => {
if (target.isUnmounted) {
return;
}
pauseTracking();
setCurrentInstance(target);
const res = callWithAsyncErrorHandling(hook, target, type, args);
unsetCurrentInstance();
resetTracking();
return res;
});
if (prepend) {
hooks.unshift(wrappedHook);
} else {
hooks.push(wrappedHook);
}
return wrappedHook;
} else if (true) {
const apiName = toHandlerKey(ErrorTypeStrings[type].replace(/ hook$/, ""));
warn2(`${apiName} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup(). If you are using async setup(), make sure to register lifecycle hooks before the first await statement.`);
}
}
var createHook = (lifecycle) => (hook, target = currentInstance) => (!isInSSRComponentSetup || lifecycle === "sp") && injectHook(lifecycle, (...args) => hook(...args), target);
var onBeforeMount = createHook(
"bm"
/* LifecycleHooks.BEFORE_MOUNT */
);
var onMounted = createHook(
"m"
/* LifecycleHooks.MOUNTED */
);
var onBeforeUpdate = createHook(
"bu"
/* LifecycleHooks.BEFORE_UPDATE */
);
var onUpdated = createHook(
"u"
/* LifecycleHooks.UPDATED */
);
var onBeforeUnmount = createHook(
"bum"
/* LifecycleHooks.BEFORE_UNMOUNT */
);
var onUnmounted = createHook(
"um"
/* LifecycleHooks.UNMOUNTED */
);
var onServerPrefetch = createHook(
"sp"
/* LifecycleHooks.SERVER_PREFETCH */
);
var onRenderTriggered = createHook(
"rtg"
/* LifecycleHooks.RENDER_TRIGGERED */
);
var onRenderTracked = createHook(
"rtc"
/* LifecycleHooks.RENDER_TRACKED */
);
function onErrorCaptured(hook, target = currentInstance) {
injectHook("ec", hook, target);
}
function validateDirectiveName(name) {
if (isBuiltInDirective(name)) {
warn2("Do not use built-in directive ids as custom directive id: " + name);
}
}
function withDirectives(vnode, directives) {
const internalInstance = currentRenderingInstance;
if (internalInstance === null) {
warn2(`withDirectives can only be used inside render functions.`);
return vnode;
}
const instance = getExposeProxy(internalInstance) || internalInstance.proxy;
const bindings = vnode.dirs || (vnode.dirs = []);
for (let i = 0; i < directives.length; i++) {
let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i];
if (dir) {
if (isFunction(dir)) {
dir = {
mounted: dir,
updated: dir
};
}
if (dir.deep) {
traverse(value);
}
bindings.push({
dir,
instance,
value,
oldValue: void 0,
arg,
modifiers
});
}
}
return vnode;
}
function invokeDirectiveHook(vnode, prevVNode, instance, name) {
const bindings = vnode.dirs;
const oldBindings = prevVNode && prevVNode.dirs;
for (let i = 0; i < bindings.length; i++) {
const binding = bindings[i];
if (oldBindings) {
binding.oldValue = oldBindings[i].value;
}
let hook = binding.dir[name];
if (hook) {
pauseTracking();
callWithAsyncErrorHandling(hook, instance, 8, [
vnode.el,
binding,
vnode,
prevVNode
]);
resetTracking();
}
}
}
var COMPONENTS = "components";
var DIRECTIVES = "directives";
function resolveComponent(name, maybeSelfReference) {
return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;
}
var NULL_DYNAMIC_COMPONENT = Symbol();
function resolveDynamicComponent(component) {
if (isString(component)) {
return resolveAsset(COMPONENTS, component, false) || component;
} else {
return component || NULL_DYNAMIC_COMPONENT;
}
}
function resolveDirective(name) {
return resolveAsset(DIRECTIVES, name);
}
function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) {
const instance = currentRenderingInstance || currentInstance;
if (instance) {
const Component = instance.type;
if (type === COMPONENTS) {
const selfName = getComponentName(
Component,
false
/* do not include inferred name to avoid breaking existing code */
);
if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) {
return Component;
}
}
const res = (
// local registration
// check instance[type] first which is resolved for options API
resolve(instance[type] || Component[type], name) || // global registration
resolve(instance.appContext[type], name)
);
if (!res && maybeSelfReference) {
return Component;
}
if (warnMissing && !res) {
const extra = type === COMPONENTS ? `
If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``;
warn2(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);
}
return res;
} else if (true) {
warn2(`resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().`);
}
}
function resolve(registry, name) {
return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]);
}
function renderList(source, renderItem, cache, index) {
let ret;
const cached = cache && cache[index];
if (isArray(source) || isString(source)) {
ret = new Array(source.length);
for (let i = 0, l = source.length; i < l; i++) {
ret[i] = renderItem(source[i], i, void 0, cached && cached[i]);
}
} else if (typeof source === "number") {
if (!Number.isInteger(source)) {
warn2(`The v-for range expect an integer value but got ${source}.`);
}
ret = new Array(source);
for (let i = 0; i < source; i++) {
ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]);
}
} else if (isObject(source)) {
if (source[Symbol.iterator]) {
ret = Array.from(source, (item, i) => renderItem(item, i, void 0, cached && cached[i]));
} else {
const keys = Object.keys(source);
ret = new Array(keys.length);
for (let i = 0, l = keys.length; i < l; i++) {
const key = keys[i];
ret[i] = renderItem(source[key], key, i, cached && cached[i]);
}
}
} else {
ret = [];
}
if (cache) {
cache[index] = ret;
}
return ret;
}
function createSlots(slots, dynamicSlots) {
for (let i = 0; i < dynamicSlots.length; i++) {
const slot = dynamicSlots[i];
if (isArray(slot)) {
for (let j = 0; j < slot.length; j++) {
slots[slot[j].name] = slot[j].fn;
}
} else if (slot) {
slots[slot.name] = slot.key ? (...args) => {
const res = slot.fn(...args);
if (res)
res.key = slot.key;
return res;
} : slot.fn;
}
}
return slots;
}
function renderSlot(slots, name, props = {}, fallback, noSlotted) {
if (currentRenderingInstance.isCE || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.isCE) {
if (name !== "default")
props.name = name;
return createVNode("slot", props, fallback && fallback());
}
let slot = slots[name];
if (slot && slot.length > 1) {
warn2(`SSR-optimized slot function detected in a non-SSR-optimized render function. You need to mark this component with $dynamic-slots in the parent template.`);
slot = () => [];
}
if (slot && slot._c) {
slot._d = false;
}
openBlock();
const validSlotContent = slot && ensureValidVNode(slot(props));
const rendered = createBlock(
Fragment,
{
key: props.key || validSlotContent && validSlotContent.key || `_${name}`
},
validSlotContent || (fallback ? fallback() : []),
validSlotContent && slots._ === 1 ? 64 : -2
/* PatchFlags.BAIL */
);
if (!noSlotted && rendered.scopeId) {
rendered.slotScopeIds = [rendered.scopeId + "-s"];
}
if (slot && slot._c) {
slot._d = true;
}
return rendered;
}
function ensureValidVNode(vnodes) {
return vnodes.some((child) => {
if (!isVNode(child))
return true;
if (child.type === Comment)
return false;
if (child.type === Fragment && !ensureValidVNode(child.children))
return false;
return true;
}) ? vnodes : null;
}
function toHandlers(obj, preserveCaseIfNecessary) {
const ret = {};
if (!isObject(obj)) {
warn2(`v-on with no argument expects an object value.`);
return ret;
}
for (const key in obj) {
ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : toHandlerKey(key)] = obj[key];
}
return ret;
}
var getPublicInstance = (i) => {
if (!i)
return null;
if (isStatefulComponent(i))
return getExposeProxy(i) || i.proxy;
return getPublicInstance(i.parent);
};
var publicPropertiesMap = (
// Move PURE marker to new line to workaround compiler discarding it
// due to type annotation
extend(/* @__PURE__ */ Object.create(null), {
$: (i) => i,
$el: (i) => i.vnode.el,
$data: (i) => i.data,
$props: (i) => true ? shallowReadonly(i.props) : i.props,
$attrs: (i) => true ? shallowReadonly(i.attrs) : i.attrs,
$slots: (i) => true ? shallowReadonly(i.slots) : i.slots,
$refs: (i) => true ? shallowReadonly(i.refs) : i.refs,
$parent: (i) => getPublicInstance(i.parent),
$root: (i) => getPublicInstance(i.root),
$emit: (i) => i.emit,
$options: (i) => __VUE_OPTIONS_API__ ? resolveMergedOptions(i) : i.type,
$forceUpdate: (i) => i.f || (i.f = () => queueJob(i.update)),
$nextTick: (i) => i.n || (i.n = nextTick.bind(i.proxy)),
$watch: (i) => __VUE_OPTIONS_API__ ? instanceWatch.bind(i) : NOOP
})
);
var isReservedPrefix = (key) => key === "_" || key === "$";
var hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key);
var PublicInstanceProxyHandlers = {
get({ _: instance }, key) {
const { ctx, setupState, data, props, accessCache, type, appContext } = instance;
if (key === "__isVue") {
return true;
}
let normalizedProps;
if (key[0] !== "$") {
const n = accessCache[key];
if (n !== void 0) {
switch (n) {
case 1:
return setupState[key];
case 2:
return data[key];
case 4:
return ctx[key];
case 3:
return props[key];
}
} else if (hasSetupBinding(setupState, key)) {
accessCache[key] = 1;
return setupState[key];
} else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
accessCache[key] = 2;
return data[key];
} else if ((normalizedProps = instance.propsOptions[0]) && hasOwn(normalizedProps, key)) {
accessCache[key] = 3;
return props[key];
} else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {
accessCache[key] = 4;
return ctx[key];
} else if (!__VUE_OPTIONS_API__ || shouldCacheAccess) {
accessCache[key] = 0;
}
}
const publicGetter = publicPropertiesMap[key];
let cssModule, globalProperties;
if (publicGetter) {
if (key === "$attrs") {
track(instance, "get", key);
markAttrsAccessed();
}
return publicGetter(instance);
} else if ((cssModule = type.__cssModules) && (cssModule = cssModule[key])) {
return cssModule;
} else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {
accessCache[key] = 4;
return ctx[key];
} else if (globalProperties = appContext.config.globalProperties, hasOwn(globalProperties, key)) {
{
return globalProperties[key];
}
} else if (currentRenderingInstance && (!isString(key) || // #1091 avoid internal isRef/isVNode checks on component instance leading
// to infinite warning loop
key.indexOf("__v") !== 0)) {
if (data !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn(data, key)) {
warn2(`Property ${JSON.stringify(key)} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.`);
} else if (instance === currentRenderingInstance) {
warn2(`Property ${JSON.stringify(key)} was accessed during render but is not defined on instance.`);
}
}
},
set({ _: instance }, key, value) {
const { data, setupState, ctx } = instance;
if (hasSetupBinding(setupState, key)) {
setupState[key] = value;
return true;
} else if (setupState.__isScriptSetup && hasOwn(setupState, key)) {
warn2(`Cannot mutate
微信扫一扫赞赏码,赞赏支持作者!
================================================
FILE: docs/docs/.vitepress/theme/index.css
================================================
:root {
/* 标题 */
--vp-home-hero-name-color: transparent;
--vp-home-hero-name-background: linear-gradient( 135deg, #93a9fa 5%, #476FFF 100%);
/* 图标背景 */
--vp-home-hero-image-background-image: linear-gradient( 135deg, #97abf5 10%, #476FFF 100%);
--vp-home-hero-image-filter: blur(100px);
/* brand按钮 */
--vp-button-brand-border: #476FFF;
--vp-button-brand-text: #FFFFFF;
--vp-button-brand-bg: #476FFF;
--vp-button-brand-border-radius: 10px;
--vp-button-brand-hover-border: #476FFF;
--vp-button-brand-hover-text: #FFFFFF;
--vp-button-brand-hover-bg: #476FFF;
--vp-button-brand-active-border: #476FFF;
--vp-button-brand-active-bg: #476FFF;
/* 主题基色 */
--vp-c-brand: #476FFF;
--vp-c-brand-light: #476FFF;
--vp-c-brand-dark: #476FFF;
}
================================================
FILE: docs/docs/.vitepress/theme/index.js
================================================
import Theme from 'vitepress/theme'
import './index.css'
import adsense from './adsense.vue'
export default {
...Theme,
Layout: adsense
}
================================================
FILE: docs/docs/about/about.md
================================================
# 关于
Crm(英文全称 Customer relationship management )是一个免费、开源的客户关系管理系统,主要功能有仪表盘、客户管理、合同管理、产品管理、配置、订阅等功能。
项目基于 Vue + Golang 实现,采用[MIT 许可证](https://github.com/zchengo/crm/blob/main/LICENSE),使用完全免费。
## 为何要开源
开源的目的是希望这个项目能够给大家带来更多的学习参考价值。
## 作者简介
程序员,Go 开发工程师,喜欢 Go 语言、Vue.js、区块链、开源。
## 关注作者
欢迎关注公众号「**GoCode**」,本公众号专注Go语言技术分享!
================================================
FILE: docs/docs/index.md
================================================
---
layout: home
hero:
name: CRM DOCS
text: 客户关系管理系统
tagline: 基于 Vue3 和 Golang 实现,适用于新手学习参考。
image:
src: /logo.svg
alt: logo
width: 300
height: 300
actions:
- theme: brand
text: 在线预览
link: https://zocrm.cloud
- theme: alt
text: 查看代码库
link: https://github.com/zchengo/crm
features:
- title: 前端
details: 采用 Vue3 框架,Axios 网络请求库,Pinia 状态管理,Vite 构建工具,Ant Design Vue UI组件库等。
- title: 后端
details: 采用 Go 语言,Gin Web 框架,Gorm ORM 框架,Jwt 用户认证,Viper 读取配置等。
- title: 运维
details: 采用 Nginx 作为代理服务器,GitHub Actions 作为持续集成和持续交付 (CI/CD) 平台。
---
================================================
FILE: docs/docs/project/backend/cors-handle.md
================================================
# 跨域请求处理
您可以在前端、服务端或者 Nginx 服务器上处理跨域请求。
## 什么是跨域请求?
当您在浏览器中从一个域名的网页去请求另一个域名的资源时,域名、端口、协议中的任一不同,就会出现请求跨域。只要协议、域名和端口中的任何一个不同,都会被当作是不同的域,之间的请求就是跨域请求。
## 在服务端处理跨域请求
请参考如下代码:
```go
// Cors 处理跨域请求
func Cors() gin.HandlerFunc {
return func(c *gin.Context) {
method := c.Request.Method
origin := c.Request.Header.Get("Origin")
c.Header("Access-Control-Allow-Origin", origin)
c.Header("Access-Control-Allow-Headers", "Content-Type,AccessToken,X-CSRF-Token, Authorization, Token,X-Token,X-User-Id, Uid, Ver")
c.Header("Access-Control-Allow-Methods", "POST, GET, OPTIONS,DELETE,PUT")
c.Header("Access-Control-Expose-Headers", "Content-Length, Access-Control-Allow-Origin, Access-Control-Allow-Headers, Content-Type")
c.Header("Access-Control-Allow-Credentials", "true")
// 放行所有OPTIONS方法
if method == "OPTIONS" {
c.AbortWithStatus(http.StatusNoContent)
}
// 处理请求
c.Next()
}
}
```
将 Cors 作为 Gin 的中间件,用户每次发送 API 请求时,都会经过此中间件(即每个跨域请求都会被处理)。
处理跨域请求的方式是在这个请求中设置跨域相关的请求头:
| 跨域相关的请求头 | 说明 |
| --- | -- |
| Access-Control-Allow-Origin | 允许跨域的域名,指定了该响应的资源是否被允许与给定的来源(origin)共享。 |
| Access-Control-Allow-Headers | 允许跨域的请求头, 用于预检请求中,列出了将会在正式请求的 ```Access-Control-Request-Headers``` 字段中出现的首部信息。 |
| Access-Control-Allow-Methods | 允许跨域请求的方法,在对预检请求的应答中明确了客户端所要访问的资源允许使用的方法或方法列表。 |
| Access-Control-Expose-Headers | 允许服务器指示那些响应标头可以暴露给浏览器中运行的脚本,以响应跨域请求。 |
| Access-Control-Allow-Credentials | 允许客户端携带验证信息,用于在请求要求包含 ```credentials``` 时,告知浏览器是否可以将对请求的响应暴露给前端 JavaScript 代码。Credentials 可以是 cookies 或 authorization headers。 |
## 在 Vue + Vite 项目中配置允许跨域请求
在 ```vite.config.js``` 配置文件中添加请求代理配置,请参考如下配置:
```js
export default defineConfig({
server: {
host: '127.0.0.1',
port: 8060,
proxy: {
'/api': {
target: 'http://127.0.0.1:8000/',
changeOrigin: true,
rewrite: path => path.replace(/^\/api/, '')
}
}
},
plugins: [vue()],
})
```
## 在 Nginx 中配置允许跨域请求
修改 ```nginx.conf``` 配置文件,请参考如下:
```bash
server {
listen 80;
server_name zocrm.cloud;
location / {
root html/dist;
index index.html;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
# api proxy
location /api {
# 配置跨域
add_header 'Access-Control-Allow-Origin' *;
add_header 'Access-Control-Allow-Credentials' 'true';
add_header 'Access-Control-Allow-Methods' *;
add_header 'Access-Control-Allow-Headers' *;
proxy_pass http://127.0.0.1:8000;
}
}
```
## 如何选择?
以上三种跨域请求处理方式,比较推荐在服务端或者 Nginx 服务器上处理跨域请求,好处是跨域请求相关的配置可以由我们自己来决定。
================================================
FILE: docs/docs/project/backend/jwt-handle.md
================================================
# 用户授权与认证
Crm 系统采用 JWT 来完成用户授权与认证。
## 什么是 JWT ?
JSON Web Token(JWT)是一个开放标准(RFC 7519),它定义了一种紧凑和自包含的方式,用于作为JSON对象在各方之间安全地传输信息。
这些信息可以被验证和信任,因为它是数字签名的。JWT可以使用秘密(使用HMAC算法)或使用RSA或ECDSA的公钥/私钥对进行签名。
以下是一些 JSON Web Token 应用场景:
- 授权:这是使用 JWT 最常见的场景。一旦用户登录,每个后续请求都将包括 JWT,允许用户访问该令牌允许的路由、服务和资源。单点登录是当今广泛使用 JWT 的一项功能,因为它的开销很小,并且可以轻松地在不同领域使用。
- 信息交换:JWT 是各方之间安全传输信息的好方法。因为JWT可以签名,例如,使用公钥或私钥对,您可以确定发件人就是他们所说的那个人。此外,由于签名是使用标头和有效负载计算的,您还可以验证内容是否未被篡改。
想了解有关 JWT 的更多信息,请访问[jwt.io](https://jwt.io)。
## 安装
添加 ```golang-jwt``` 作为Go程序中的依赖项,请执行诶下命令:
```bash
go get -u github.com/golang-jwt/jwt/v4
```
## 封装成方法
请参考如下代码:
```go
import (
"crm/global"
"time"
"github.com/golang-jwt/jwt/v4"
)
type Claims struct {
Uid int64 `json:"uid"`
jwt.RegisteredClaims
}
// 生成Token
func GenToken(uid int64) (string, error) {
var signingKey = []byte(global.Config.Jwt.SigningKey)
var expiredTime = global.Config.Jwt.ExpiredTime
claims := Claims{uid, jwt.RegisteredClaims{
ExpiresAt: &jwt.NumericDate{Time: time.Now().Add(time.Duration(expiredTime) * time.Second)},
Issuer: "crm",
}}
token, err := jwt.NewWithClaims(jwt.SigningMethodHS256, claims).SignedString(signingKey)
return token, err
}
// 校验Token
func VerifyToken(tokens string) (int64, error) {
token, err := jwt.ParseWithClaims(tokens, &Claims{}, func(token *jwt.Token) (interface{}, error) {
return []byte(global.Config.Jwt.SigningKey), nil
})
claims, ok := token.Claims.(*Claims)
if ok && token.Valid {
return claims.Uid, nil
}
return 0, err
}
```
想要了解有关 golang-jwt 的更多信息,请访问[golang-jwt](https://github.com/golang-jwt/jwt)。
## 当用户登录成功后生成 Token 信息
请参考 ```crm/server/service/user.go``` 中的 ```Login``` 方法,部分代码如下:
```go
// 用户登录
func (u *UserService) Login(param *models.UserLoginParam) (*models.UserInfo, int) {
...
// 生成Token
token, err := common.GenToken(user.Id)
if err != nil {
log.Printf("[error]Login:GenerateToken:%s", err)
return nil, response.ErrCodeFailed
}
userInfo := models.UserInfo{
Uid: user.Id,
Token: token,
}
...
}
```
## 使用 JWT 中间件校验 Token
请参考如下代码:
```go
// JWT认证中间件
func JwtAuth() gin.HandlerFunc {
return func(c *gin.Context) {
uid, _ := strconv.Atoi(c.Request.Header.Get("uid"))
token := c.Request.Header.Get("token")
if token == "" {
response.Result(response.ErrCodeNoLogin, nil, c)
c.Abort()
return
}
userid, err := common.VerifyToken(token)
if userid != int64(uid) || err != nil {
response.Result(response.ErrCodeTokenExpire, nil, c)
c.Abort()
return
}
c.Next()
}
}
```
前端发送请求时会携带 ```uid``` 和 ```token```,JWT 认证中间件会校验 ```token``` 的合法性来判断用户是否登录。
================================================
FILE: docs/docs/project/devops/ci-cd.md
================================================
# 持续集成与交付 (CI/CD)
Crm 系统使用 GitHub Actions 作为持续集成和持续交付 (CI/CD) 平台,自动执行生成、测试和部署,通过创建工作流程来自动构建和部署项目到生产环境。
想要了解有关 GitHub Actions 的更多信息,请访问[GitHub Actions](https://docs.github.com/en/actions)。
## 创建工作流
在您的 Github 存储库中创建 ```.github/workflows``` 目录,在该目录下创建一个 ```Ymal``` 文件(如 deploy.ymal)。
## 编写配置文件
配置文件 ```deploy.ymal```, 请参考如下:
```yaml
name: CRM CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '18.12.0'
- name: Build Web
run: cd web && npm install && npm run build
- name: Build Docs
run: cd docs && npm install && npm run docs:build
- name: Use Go
uses: actions/setup-go@v3
with:
go-version: 1.19
- name: Build Server
run: cd server && go mod tidy && go build -o crmserver main.go
- name: Deploy CRM
env:
KEY: ${{ secrets.SSH_PRIVATE_KEY }}
HOST: ${{ secrets.REMOTE_HOST }}
run: |
mkdir -p ~/.ssh/ && echo "$KEY" > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa
scp -o StrictHostKeyChecking=no -r web/dist ubuntu@${HOST}:/usr/local/nginx/html/
scp -o StrictHostKeyChecking=no -r docs/docs/.vitepress/dist ubuntu@${HOST}:/usr/local/nginx/html/docs/
ssh -o StrictHostKeyChecking=no ubuntu@${HOST} "sudo /usr/local/nginx/sbin/nginx -s reload"
scp -o StrictHostKeyChecking=no -r server/crmserver ubuntu@${HOST}:/home/ubuntu/
ssh -o StrictHostKeyChecking=no ubuntu@${HOST} "sudo /home/ubuntu/crmapi/restart.sh > /dev/null 2>&1 &"
```
## 配置文件说明
### 使用 Ubuntu 系统构建应用
```yaml
jobs:
build:
runs-on: ubuntu-latest
```
### 构建Web端与项目文档
```yaml
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '18.12.0'
- name: Build Web
run: cd web && npm install && npm run build
- name: Build Docs
run: cd docs && npm install && npm run docs:build
```
### 构建服务端
```yaml
- name: Use Go
uses: actions/setup-go@v3
with:
go-version: 1.19
- name: Build Server
run: cd server && go mod tidy && go build -o crmserver main.go
```
### 部署到服务器
```yaml
- name: Deploy CRM
env:
KEY: ${{ secrets.SSH_PRIVATE_KEY }}
HOST: ${{ secrets.REMOTE_HOST }}
run: |
mkdir -p ~/.ssh/ && echo "$KEY" > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa
scp -o StrictHostKeyChecking=no -r web/dist ubuntu@${HOST}:/usr/local/nginx/html/
scp -o StrictHostKeyChecking=no -r docs/docs/.vitepress/dist ubuntu@${HOST}:/usr/local/nginx/html/docs/
ssh -o StrictHostKeyChecking=no ubuntu@${HOST} "sudo /usr/local/nginx/sbin/nginx -s reload"
scp -o StrictHostKeyChecking=no -r server/crmserver ubuntu@${HOST}:/home/ubuntu/
ssh -o StrictHostKeyChecking=no ubuntu@${HOST} "sudo /home/ubuntu/crmapi/restart.sh > /dev/null 2>&1 &"
```
设置 ```SSH_PRIVATE_KEY``` 和 ```REMOTE_HOST```:
```SSH_PRIVATE_KEY``` 指的是你在自己电脑上生成的 SSH 私钥(与服务器关联的那个秘钥),```REMOTE_HOST``` 指的是服务器的IP地址。
由于这两个变量属于敏感信息,不方便直接写在配置文件中,所以需要在您的 ```代码库``` -> ```Settings``` -> ```secrets``` -> ```Actions``` 中设置。设置后,可通过 ```secrets``` 来调用。
在虚拟机环境中配置 ```SSH```:
```bash
mkdir -p ~/.ssh/ && echo "$KEY" > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa
```
将构建的页面资源上传到服务器的特定目录:
```bash
scp -o StrictHostKeyChecking=no -r web/dist ubuntu@${HOST}:/usr/local/nginx/html/
scp -o StrictHostKeyChecking=no -r docs/docs/.vitepress/dist ubuntu@${HOST}:/usr/local/nginx/html/docs/
```
连接到服务器、重启 Nginx 服务:
```bash
ssh -o StrictHostKeyChecking=no ubuntu@${HOST} "sudo /usr/local/nginx/sbin/nginx -s reload"
```
将构建的Go可执行文件上传到服务器的特定目录:
```bash
scp -o StrictHostKeyChecking=no -r server/crmserver ubuntu@${HOST}:/home/ubuntu/
```
使用 Shell 脚本重启Go服务:
```bash
ssh -o StrictHostKeyChecking=no ubuntu@${HOST} "sudo /home/ubuntu/crmapi/restart.sh > /dev/null 2>&1 &"
```
Shell 重启Go服务脚本 ```restart.sh```,请参考如下:
```shell
#!/bin/bash
sudo pkill crmserver
sudo cp /home/ubuntu/crmserver /home/ubuntu/crmapi/
sudo nohup /home/ubuntu/crmapi/crmserver > /home/ubuntu/crmapi/crmserver.log 2>&1 &
```
## 常见问题
遇到问题,请访问[GitHub Actions](https://docs.github.com/en/actions)查看更多信息。
================================================
FILE: docs/docs/project/devops/deploy-cloudserver.md
================================================
# 部署到云服务器
如果您打算将 Crm 系统部署到您自己的云服务器上,您需要先注册一个域名和购买一台云服务器,然后在云服务器上进行环境安装、服务启动与配置、项目的构建与部署。
## 注册域名
您可以选择以下任意云厂商提供的域名注册,完成域名注册。
- [阿里云-域名注册](https://wanwang.aliyun.com)
- [腾讯云-域名注册](https://dnspod.cloud.tencent.com/)
- [百度智能云-域名服务](https://cloud.baidu.com/product/bcd.html)
## 购买云服务器
您可以选择以下任意云厂商提供的云服务器,完成云服务器购买。
- [阿里云-云服务器ECS](https://www.aliyun.com/product/ecs)
- [腾讯云-云服务器CVM](https://cloud.tencent.com/product/cvm)
- [华为云-弹性云服务器ECS](https://www.huaweicloud.com/product/ecs.html)
- [亚马逊云-Amazon EC2](https://aws.amazon.com/cn/ec2/?nc2=h_ql_prod_fs_ec2)
- [百度智能云-云服务器BCC](https://cloud.baidu.com/product/bcc.html)
::: tip 友情提示
亚马逊云新用户可以免费体验12个月云服务器以及其他基础设施产品和服务,[前往免费体验](https://aws.amazon.com/cn/campaigns/freecenter-select-region)。
:::
## 创建云服务器实例
以亚马逊云 Amazon EC2(其他云服务器类似)为例,创建与配置云服务器实例。
第一步,登录到亚马逊云控制台,点击 ```EC2```。
第二步,选择 ```实例```,点击 ```启动新实例```。
第三步,填写实例名称 ```crm```(可填写任意名称),操作系统选择 ```Ubuntu```(比较推荐),其他按默认设置即可,然后点击 ```启动实例```。
第四步,实例启动成功后,您需要连接到您的实例,请点击 ```连接到实例```。
第五步,连接到实例的方式有四种,推荐使用 ```SSH 客户端``` 来连接实例,您需要先关联密钥对,请根据如下提示进行操作。
::: details 如何将密钥对与 EC2 实例(云服务器)进行关联?
1. 在您自己的电脑中,执行如下命令来生成密钥对:
```bash
ssh-keygen -t rsa -C "xxxx@qq.com"
```
生成密钥对后,会在 ```~/.ssh/``` 目录下生成私钥文件 ```id_rsa``` 和公钥文件 ```id_rsa.pub```,复制公钥文件中的内容。
2. 查看实例列表,选中您创建的实例,点击 ```连接```。
3. 在连接到实例页面中,选择 ```EC2 Instance Connect```,点击 ```连接```,即可连接到服务器。
4. 将自己电脑中生成的公钥文件的内容,复制到云服务器的 ```~/.ssh/authorized_keys``` 文件中。
完成以上步骤,即可完成密钥对与 EC2 实例(云服务器)的关联。
:::
密钥对与 EC2 实例(云服务器)关联成功后,您就可以使用 SSH 连接到您创建的 EC2 实例),您可以执行如下命令:
```bash
ssh 用户名@ip地址 // 比如 ssh ubuntu@52.223.50.216
```
进入到云服务器后,即可搭建系统的运行环境。
## 环境搭建
您需要安装以下运行环境:
| 环境 | 版本 | 下载地址 |
|---|---|---|
| go | >= 1.19.2 | https://golang.google.cn/dl |
| mysql | >= 8.0.31 | https://www.mysql.com/downloads |
| redis | >= 7.0.5 | https://redis.io/download |
| node | >= 18.12.0 | https://nodejs.org/en/download |
| nginx | >= 1.22.1 | http://nginx.org/en/download.html |
::: tip 提示
以下安装操作适用于 Ubuntu 操作系统,安装版本均为 Linux 版本。
:::
### 安装 Go 环境
安装 Go 语言压缩包,请执行如下命令:
```bash
$ wget https://golang.google.cn/dl/go1.19.5.linux-amd64.tar.gz
```
压缩包下载完成后,建议解压到 ```/usr/local/``` 目录下,您可以执行如下命令:
```bash
$ sudo tar -zxvf go1.19.5.linux-amd64.tar.gz -C /usr/local/
```
配置 Go 环境变量,使用 ```vi``` 命令打开 ```~/.profile``` 文件,添加如下配置:
```bash
# golang
export PATH="$PATH:/usr/local/go/bin"
```
添加完成后,执行 ```source .profile```。
查看 Go 环境是否安装成功:
```bash
$ go version
go version go1.19.5 linux/amd64
```
### 安装 Node 环境
下载 Node For Linux Binaries (x64) 并解压到 ```/usr/local/``` 目录下,请执行如下命令:
```bash
$ wget https://nodejs.org/dist/v18.13.0/node-v18.13.0-linux-x64.tar.xz
$ sudo tar -xvf node-v18.13.0-linux-x64.tar.xz -C /usr/local/
```
配置 Node 环境变量,使用 ```vi``` 命令打开 ```~/.profile``` 文件,添加如下配置:
```bash
# nodejs
export PATH="$PATH:/usr/local/node-v18.13.0-linux-x64/bin"
```
添加完成后,执行 ```source .profile```。
查看 Node 环境是否安装成功:
```bash
$ node -v
v18.13.0
$ npm -v
8.19.3
```
### 安装 MySQL
使用 ```apt install``` 安装,请执行如下命令:
```bash
$ sudo apt install mysql-server
```
查看是否安装成功:
```bash
$ mysql --version
mysql Ver 8.0.31-0ubuntu0.22.04.1 for Linux on x86_64 ((Ubuntu))
```
默认用户名 ```root```, 默认密码 ``` ```,修改默认密码为 ```123456```,请执行如下命令:
```bash
# mysqladmin -u用户名 -p旧密码 password 新密码
$ sudo mysqladmin -uroot -p password 123456
```
登录到 MySQl,请执行如下命令:
```bash
$ sudo mysql -uroot -p123456
```
### 安装 Redis
安装 redis-stable 源码,请执行如下命令:
```bash
wget https://download.redis.io/redis-stable.tar.gz
```
编译和安装 redis,默认会安装到 ```/usr/local/bin``` 目录下,请执行如下命令:
```bash
$ sudo tar -xzvf redis-stable.tar.gz
$ cd redis-stable
$ sudo make
$ sudo make install
```
启动 redis 服务,请执行如下命令:
```bash
$ redis-server
```
### 安装 Nginx
安装 Nginx 源码包,请执行如下命令:
```bash
$ wget http://nginx.org/download/nginx-1.22.1.tar.gz
```
解压 ```nginx-1.22.1.tar.gz``` 到当前目录,请执行如下命令:
```bash
$ sudo tar -zxvf nginx-1.22.1.tar.gz
```
编译和安装 Nginx,请执行如下命令:
```bash
$ cd nginx-1.22.1
$ sudo ./configure --prefix=/usr/local/nginx --without-http_rewrite_module
```
::: danger 您可能会遇到如下报错:
```bash
./configure: error: the HTTP gzip module requires the zlib library.
You can either disable the module by using --without-http_gzip_module
option, or install the zlib library into the system, or build the zlib library
statically from the source with nginx by using --with-zlib= option.
```
:::
需要先安装 ```zlib library```, 请执行如下命令:
```bash
$ wget http://www.zlib.net/zlib-1.2.13.tar.gz
$ tar -zxvf zlib-1.2.13.tar.gz
$ cd zlib-1.2.13
$ sudo ./configure
$ sudo make
$ sudo make install
```
了解 zlib 的更多信息,请访问[zlib.net](http://www.zlib.net/)。
安装完 ```zlib library``` 后,重新安装 Nginx,请执行如下命令:
```bash
$ cd nginx-1.22.1
$ sudo ./configure --prefix=/usr/local/nginx --without-http_rewrite_module
$ sudo make
$ sudo make install
```
查看是否安装成功,请执行如下命令:
```bash
$ nginx -v
nginx version: nginx/1.22.1
```
修改 Nginx 配置文件 ```/usr/local/nginx/conf/nginx.conf```,请参考如下配置:
```bash
#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';
#access_log logs/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
#gzip on;
server {
listen 80;
server_name zocrm.cloud;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root html/dist;
index index.html;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
# api proxy
location /api {
proxy_pass http://127.0.0.1:8000;
}
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
#location ~ \.php$ {
# root html;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
# include fastcgi_params;
#}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}
# another virtual host using mix of IP-, name-, and port-based configuration
#
#server {
# listen 8000;
# listen somename:8080;
# server_name somename alias another.alias;
# location / {
# root html;
# index index.html index.htm;
# }
#}
# HTTPS server
server {
listen 443 ssl;
server_name zocrm.cloud;
ssl_certificate cert/8913125_zocrm.cloud.pem;
ssl_certificate_key cert/8913125_zocrm.cloud.key;
# ssl_session_cache shared:SSL:1m;
# ssl_session_timeout 5m;
# ssl_ciphers HIGH:!aNULL:!MD5;
# ssl_prefer_server_ciphers on;
location / {
root html/dist;
index index.html;
}
location /api {
proxy_pass http://127.0.0.1:8000;
}
}
server {
listen 443 ssl;
server_name docs.zocrm.cloud;
ssl_certificate cert/9129982_docs.zocrm.cloud.pem;
ssl_certificate_key cert/9129982_docs.zocrm.cloud.key;
# ssl_session_cache shared:SSL:1m;
# ssl_session_timeout 5m;
# ssl_ciphers HIGH:!aNULL:!MD5;
# ssl_prefer_server_ciphers on;
location / {
root html/docs/dist;
index index.html;
}
}
}
```
启动 Nginx 服务,请执行如下命令:
```bash
$ cd /usr/local/nginx/sbin/
$ sudo ./nginx -c /usr/local/nginx/conf/nginx.conf
# 或者
$ sudo nginx
```
当 Nginx 服务成功启动后,您可以尝试在浏览器中访问服务器的 ```IP地址```,查看是否能访问到 Nginx 的默认页面。
::: details 访问不到 Nginx 默认页面?
您可能需要配置服务器实例的安全组,进入到 ```Amazon EC2 控制台``` -> ```EC2``` -> ```安全组``` -> ```入站规则``` -> ```编辑入站规则信息``` -> ```添加规则```,请参考如下:
点击 ```保存规则```,在浏览器中访问 ```IP地址```,即可看到如下页面:
:::
到这里,系统运行环境的搭建基本已经完成。
## 构建与部署
您需要先下载 Crm 项目代码到服务器。
如果您的系统中已经安装了 ```Git```,您可以使用如下方式安装(推荐):
```bash
git clone https://github.com/zchengo/crm.git
```
您也可以使用 ```wget``` 命令下载压缩包,使用 ```unzip``` 解压,请执行如下命令:
```bash
wget https://github.com/zchengo/crm/archive/refs/heads/main.zip
unzip main.zip
```
### 部署服务端
::: tip 前提条件:
Go 环境正常、MySQL 服务正常启动、Redis 服务正常启动。
:::
#### 导入数据库文件
请先登录到 MySQl,请执行如下命令:
```bash
$ sudo mysql -uroot -p123456
```
再把 ```crm/server/db/crm.sql``` 文件导入到 MySQL 数据库中,执行如下 SQL 语句:
```bash
mysql> source SQL文件路径
```
#### 修改配置文件
您需要修改 ```crm/server/config.yaml``` 配置文件,必须修改文件存储配置、邮件服务配置和支付宝支付服务配置,否则您将无法正常使用文件导出、注册、密码找回、获取验证码、订阅、支付等功能。
文件存储配置如下:
```yaml
file:
path: /home/ubuntu/crm/source/
```
把路径改成自己的系统路径,建议使用绝对路径。
邮件服务配置如下:
```yaml
# 邮件服务
mail:
smtp: smtp.qq.com
secret: dhsepilzlvoaceij // 改成自己的QQ邮箱SMTP服务的授权码
sender: 1655064994@qq.com // 改成自己的QQ邮箱
```
**如何开启邮箱的 SMTP 服务并获取授权码?**
请参考官方文档[service.mail.qq.com](https://service.mail.qq.com)。
支付宝支付服务配置如下:
```yaml
# 支付宝支付服务配置
alipay:
appId: 2022003122606990
privateKey: MIIEpQIBAAKCAQEAkR0YofR...2sDd6uIy9rkpk8azj/rLmetW5r+tqTZgxcPWKeSz4=
appPublicCert: /home/ubuntu/crm/cert/appPublicCert.crt
alipayRootCert: /home/ubuntu/crm/cert/alipayRootCert.crt
alipayPublicCert: /home/ubuntu/crm/cert/alipayPublicCert.crt
returnURL: http://127.0.0.1:8060/#/subscribe
notifyURL: http://127.0.0.1:8000/api/subscribe/payback
```
**如何获取支付宝支付服务的 appId、privateKey、appPublicCert、alipayRootCert、alipayPublicCert ?**
您需要登录到支付宝开放平台,请访问[open.alipay.com](https://open.alipay.com)。
登录到支付宝开放平台后,点击 ```控制台``` -> ```开发工具推荐``` -> ```沙箱``` -> ```沙箱应用```,在基本信息中可看到 ```APPID``` ,然后在开发信息中选择 ```系统默认秘钥``` -> ````启用证书模式``` -> ```查看```,即可看到复制私钥和下载证书,1个私钥和3个证书。
**如何获取支付账号?**
点击 ```控制台``` -> ```开发工具推荐``` -> ```沙箱``` -> ```沙箱账号```,里面有商家信息和买家信息,买家信息中的买家账号就是支付账号。
将 ```returnURL```、```notifyURL```、```paySuccessURL``` 中的 ```IP地址```改成您的服务器的 ```IP地址``` 或 ```域名```。
#### 初始化和运行
服务端初始化和运行,请执行如下命令:
```bash
$ cd crm
$ cd server
$ go mod tidy
$ go build -o crmserver main.go (windows编译命令为 go build -o crmserver.exe main.go )
# 运行二进制
$ ./crmserver (windows运行命令为 crmserver.exe)
# 或者在后台运行
$ sudo nohup ./crmserver > /home/ubuntu/crmserver.log 2>&1 &
```
### 部署Web端
::: tip 前提条件:
Node 环境正常。
:::
Web端初始化和打包,请执行如下命令:
```bash
$ cd crm
$ cd web
$ npm install
$ npm run build
```
::: details 使用 ```npm install``` 命令安装依赖时,出现下载缓慢、卡住等问题?
您可能需要修改 npm 默认的镜像源,请执行如下命令:
```bash
$ npm install -g cnpm --registry=https://registry.npmmirror.com
```
想要了解有关 Npm Mirror 中国镜像站的更多信息,请访问[npmmirror.com](https://npmmirror.com)。
:::
打包完成后,会在 ```crm/web/dist/``` 目录下生成页面资源文件,您需要复制这些文件到 ```/usr/local/nginx/html/``` 目录下,请执行如下命令:
```bash
sudo cp ./crm/web/dist /usr/local/nginx/html/
```
您可能需要适当的修改 Nginx 配置文件 ```/usr/local/nginx/conf/nginx.conf```,以确保能够访问到页面,您可能需要修改这个部分:
```bash
http {
...
server {
...
location / {
root html/dist;
index index.html;
}
}
}
```
然后您就可以通过 ```IP地址``` 或 ```域名``` 来访问 Crm 系统的页面了。
### 部署Docs文档
如果您有需要,您也可以部署 Docs 项目文档,部署方式与部署Web端类似。
请参考如下命令:
```bash
$ cd crm/docs
$ npm install
$ npm run docs:build
$ sudo cp ./docs/docs/.vitepress/dist /usr/local/nginx/html/docs
```
修改 Nginx 配置文件请参考:
```bash
#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
...
# HTTPS server
# Web
server {
listen 443 ssl;
server_name zocrm.cloud;
ssl_certificate cert/8913125_zocrm.cloud.pem;
ssl_certificate_key cert/8913125_zocrm.cloud.key;
location / {
root html/dist;
index index.html;
}
location /api {
proxy_pass http://127.0.0.1:8000;
}
}
# Docs
server {
listen 443 ssl;
server_name docs.zocrm.cloud;
ssl_certificate cert/9129982_docs.zocrm.cloud.pem;
ssl_certificate_key cert/9129982_docs.zocrm.cloud.key;
location / {
root html/docs/dist;
index index.html;
}
}
}
```
当然,如果你使用域名来替换 ```html/``` 目录下的 ```dist``` 目录名称,或许会更优雅。
比如您可以这样命名:
```text
/usr/local/nginx/html/www/zocrm/com
/usr/local/nginx/html/www/docs/zocrm/com
```
### 测试
在浏览器访问您部署的项目,比如 http://3.83.115.236 或者 http://zocrm.cloud。
如果您配置了 SSL 证书,您可以使用 HTTPS 来访问。
## 持续集成与交付
当有新版本发布时,即可自动部署到服务器,请参考[持续集成与交付 (CI/CD)](/project/devops/ci-cd)。
## 常见问题
如果您在部署过程中遇到了问题,您可以通过以下方式反馈:
- [New Issues In Github](https://github.com/zchengo/crm/issues)
## 支持作者
此文档对您有帮助的话,您可以[支持作者](/sponsor/sponsor)。
================================================
FILE: docs/docs/project/docs/deploy-guide.md
================================================
# 部署指南
::: tip 提示
请先安装运行环境,再运行服务端和Web端。
:::
## 环境安装
你需要在你的系统中,安装如下运行环境:
| 环境 | 版本 | 下载地址 |
|---|---|---|
| go | >= 1.19.2 | https://golang.google.cn/dl |
| mysql | >= 8.0.31 | https://www.mysql.com/downloads |
| redis | >= 7.0.5 | https://redis.io/download |
| node | >= 18.12.0 | https://nodejs.org/en/download |
## 运行服务端
::: tip 前提条件:
Go 环境正常、MySQL 服务正常启动、Redis 服务正常启动。
:::
### 导入数据库文件
您需要把 ```crm/server/db/crm.sql``` 文件导入到本地的数据库中,您可以在数据库开发工具 Navicat 中直接导入 SQL 文件。
或者使用 MySQL 自带的命令行工具导入 SQL 文件:
```bash
mysql> source 文件路径
```
### 修改配置文件
您需要修改 ```crm/server/config.yaml``` 配置文件,您可以保持默认配置,但是您必须修改文件存储配置、邮件服务配置和支付宝支付服务配置,否则您将无法正常使用文件导出、注册、密码找回、获取验证码、订阅、支付等功能。
文件存储配置如下:
```yaml
file:
path: /home/ubuntu/crm/source/
```
把路径改成自己的系统路径,建议使用绝对路径。
邮件服务配置如下:
```yaml
# 邮件服务
mail:
smtp: smtp.qq.com
secret: dhsepilzlvoaceij // 改成自己的QQ邮箱SMTP服务的授权码
sender: 1655064994@qq.com // 改成自己的QQ邮箱
```
**如何开启邮箱的 SMTP 服务并获取授权码?**
请参考官方文档[service.mail.qq.com](https://service.mail.qq.com)。
支付宝支付服务配置如下:
```yaml
# 支付宝支付服务配置
alipay:
appId: 2022003122606990
privateKey: MIIEpQIBAAKCAQEAkR0YofR...2sDd6uIy9rkpk8azj/rLmetW5r+tqTZgxcPWKeSz4=
appPublicCert: /home/ubuntu/crm/cert/appPublicCert.crt
alipayRootCert: /home/ubuntu/crm/cert/alipayRootCert.crt
alipayPublicCert: /home/ubuntu/crm/cert/alipayPublicCert.crt
returnURL: http://127.0.0.1:8060/#/subscribe
notifyURL: http://127.0.0.1:8000/api/subscribe/payback
```
**如何获取支付宝支付服务的 appId、privateKey、appPublicCert、alipayRootCert、alipayPublicCert ?**
您需要登录到支付宝开放平台,请访问[open.alipay.com](https://open.alipay.com)。
登录到支付宝开放平台后,点击 ```控制台``` -> ```开发工具推荐``` -> ```沙箱``` -> ```沙箱应用```,在基本信息中可看到 ```APPID``` ,然后在开发信息中选择 ```系统默认秘钥``` -> ````启用证书模式``` -> ```查看```,即可看到复制私钥和下载证书,1个私钥和3个证书。
**如何获取支付账号?**
点击 ```控制台``` -> ```开发工具推荐``` -> ```沙箱``` -> ```沙箱账号```,里面有商家信息和买家信息,买家信息中的买家账号就是支付账号。
### 初始化并运行
使用 VS Code 或者 Goland 等开发工具,打开 crm 目录,找到 Terminal 终端。
执行如下命令:
```bash
$ cd server
$ go mod tidy
$ go build -o server main.go (windows编译命令为 go build -o server.exe main.go )
# 运行二进制
$ ./server (windows运行命令为 server.exe)
```
运行二进制文件后,如果控制台没有出现报错信息,就说明服务端启动成功。
## 运行Web端
::: tip 前提条件:
Node 环境正常。
:::
使用 VSCode 或 WebStom 等开发工具,打开 crm 目录,找到 Terminal 终端。
执行如下命令:
```bash
$ cd web
$ npm install
$ npm run dev
```
当您使用 ```npm install``` 命令安装依赖时,如果出现下载缓慢、卡住等问题,您可能需要修改 npm 默认的镜像源。
要修改镜像源,请执行如下命令:
```bash
$ npm install -g cnpm --registry=https://registry.npmmirror.com
```
想要了解有关 Npm Mirror 中国镜像站的更多信息,请访问[npmmirror.com](https://npmmirror.com)。
当 Web 端启动成功后,打开浏览器访问http://127.0.0.1:8060。
## 部署到云服务器
以上是把项目部署到本地,如果您想部署到云服务器,请参考[部署到云服务器](/project/devops/deploy-cloudserver)。
================================================
FILE: docs/docs/project/docs/detailed-design.md
================================================
# 详细设计
文档即将发布...
================================================
FILE: docs/docs/project/docs/getting-started.md
================================================
# 快速开始
## 安装
如果你的系统中已经安装了 ```Git```,你可以使用如下方式安装:
```bash
git clone https://github.com/zchengo/crm.git
```
你也可以通过下载压缩包的方式安装[Download ZIP](https://github.com/zchengo/crm/archive/refs/heads/main.zip)。
## 部署
你需要在你的系统中,安装如下运行环境:
| 环境 | 版本 | 下载地址 |
|---|---|---|
| go | >= 1.19.2 | https://golang.google.cn/dl |
| mysql | >= 8.0.31 | https://www.mysql.com/downloads |
| redis | >= 7.0.5 | https://redis.io/download |
| node | >= 18.12.0 | https://nodejs.org/en/download |
::: tip 初始化和运行的前提条件
Go 环境正常、Node 环境正常、MySQL 和 Redis 能正常启动。
:::
然后在终端中,执行如下命令:
```bash
$ cd server
$ go mod tidy
$ go build -o server main.go (windows编译命令为 go build -o server.exe main.go )
# 运行二进制
$ ./server (windows运行命令为 server.exe)
$ cd web
$ npm install
$ npm run dev
```
项目初始化并运行成功后,打开浏览器访问http://127.0.0.1:8060。
有关 Crm 的详细部署文档,请参考[部署指南](/project/docs/deploy-guide)。
================================================
FILE: docs/docs/project/docs/introduction.md
================================================
# 简介
::: tip 提示
你正在阅读的是 Crm 最新版的[项目文档](https://docs.zocrm.cloud)。
:::
## 什么是 Crm ?
Crm(英文全称 Customer relationship management )是一个客户关系管理系统,主要功能有仪表盘、客户管理、合同管理、产品管理、配置、订阅等功能。
- 在线演示:[zocrm.cloud](https://zocrm.cloud)
- 项目文档:[docs.zocrm.cloud](https://docs.zocrm.cloud)
## 技术栈
Crm 系统主要采用 Vue3 和 Golang 实现。
### 前端技术
| 技术 | 说明 | 相关文档 |
|---|---|---|
| Vue.js | 前端框架 | https://v3.cn.vuejs.org |
| Vue Router | 页面路由 | https://router.vuejs.org |
| Axios | 网络请求库 | https://axios-http.com |
| Pinia | 状态管理 | https://pinia.vuejs.org |
| Vite | 构建工具 | https://vitejs.dev |
| Ant Design Vue | 前端UI组件库 | https://www.antdv.com |
| Apache ECharts | 可视化图表库 | https://echarts.apache.org |
| Moment | 日期库 | https://momentjs.com |
### 后端技术
| 技术 | 说明 | 相关文档 |
|---|---|---|
| Gin | Web框架 | https://gin-gonic.com |
| Gorm | ORM框架 | https://gorm.io |
| Jwt | 用户认证 | https://github.com/golang-jwt/jwt |
| Viper | 配置管理 | https://github.com/spf13/viper |
| Redis | 数据缓存 | https://github.com/go-redis/redis |
| Gomail | 邮件服务SDK | https://github.com/go-gomail/gomail |
| Gopay | 支付服务SDK | https://github.com/go-pay/gopay |
## 目录结构
Crm 的目录结构如下:
```text
crm
├── .github/workflows // 工作流
├── deploy.yaml // 自动部署配置文件
├── docs // 项目文档
├── docs // 项目文档
├── .vitepress // VitePress配置
├── logs // 更新日志
├── project // Markdown文档
├── sponsor // 赞赏
├── index.md // 文档首页
├── package-lock.json // Npm依赖管理
├── package.json // Npm依赖管理
├── server // 服务端
├── api // API层
├── common // 通用的工具
├── config // 配置文件
├── dao // 数据访问层
├── db // 数据库 SQL 文件
├── global // 全局对象
├── initialize // 初始化
├── middleware // 中间件
├── models // 数据模型
├── response // 数据响应封装
├── service // service层
├── config.yaml // Yaml配置文件
├── go.mod // Go模块
├── go.sum // Go模块相关
├── main.go // 程序启动的入口
├── web // Web端
├── public // 公共的资源
├── src // 源代码
|── api // API接口
├── assets // 资源
├── axios // 网络请求
├── components // 自定义组件
├── router // 页面路由
├── store // 状态管理
├── views // 页面
├── App.vue // 组件入口
├── main.js // 程序启动的入口
├── .env.dev // 开发模式环境变量
├── .env.prod // 生产模式环境变量
├── index.html // 首页
├── package-lock.json // Npm依赖管理
├── package.json // Npm依赖管理
├── vite.config.js // Vite配置文件
├── .gitattributes // Git描述
├── .gitignore // Git文件忽略
├── LICENSE // 许可证
├── README.md // 项目简介文档
```
## 系统架构
Crm 系统采用前后端分离架构,前端与后端分开部署,且部署到同一台服务器。
系统架构图:
## 许可证
Crm 是采用 MIT 许可的开源项目,使用完全免费。想要了解有关 MIT 许可证的更多信息,请访问[MIT License](https://github.com/zchengo/crm/blob/main/LICENSE)。
================================================
FILE: docs/docs/project/docs/problem-feedback.md
================================================
# 问题反馈
在使用过程中遇到了问题,您可以通过以下方式反馈:
- [New Issues In Github](https://github.com/zchengo/crm/issues)
================================================
FILE: docs/docs/project/docs/update-log.md
================================================
# 更新日志
### 2023-01-15
- 项目文档优化。
- 新增前端、后端以及运维相关的文档。
### 2023-01-10
- CRM 项目文档正式发布。
================================================
FILE: docs/docs/project/frontend/axios-package.md
================================================
# 网络请求库封装
Crm 系统采用 axios 作为网络请求库。
## 什么是 axios ?
axios 是浏览器和 node.js 的一个简单的基于 promise 的 HTTP 客户端。axios 在一个具有非常可扩展界面的小软件包中提供了一个简单易用的库。
了解有关 axios 的更多信息,请访问[axios](https://github.com/axios/axios)。
## 封装 axios
封装 axios 请求库,请参考如下:
```js
import axios from 'axios';
import { message } from 'ant-design-vue';
axios.defaults.baseURL = import.meta.env.VITE_API_BASE_URL
const request = axios.create({
// timeout: 5000,`
headers: {
'Content-Type': 'application/json;charset=UTF-8'
}
})
request.interceptors.request.use(config => {
config.headers['uid'] = localStorage.getItem('uid')
config.headers['token'] = localStorage.getItem('token')
return config
})
request.interceptors.response.use(response => {
console.log(response)
if (response.data.code == 1) {
message.error('服务器异常!')
}
return response;
}, error => {
console.log(error)
return Promise.reject(error)
})
export default request;
```
### 初始化请求的 baseURL
```js
axios.defaults.baseURL = import.meta.env.VITE_API_BASE_URL
```
通过 ```import.meta.env.VITE_API_BASE_URL``` 获取环境变量。
### 设置请求超时时间与请求头
```js
const request = axios.create({
// timeout: 5000,`
headers: {
'Content-Type': 'application/json;charset=UTF-8'
}
})
```
### 请求拦截与响应拦截
请求拦截,请参考如下:
```js
request.interceptors.request.use(config => {
config.headers['uid'] = localStorage.getItem('uid')
config.headers['token'] = localStorage.getItem('token')
return config
})
```
前端每次发送请求时,都会被 axios 拦截。axios 会先给这个请求设置请求头 ```uid``` 和 ```token```,然后再向服务端发送请求。
响应拦截,请参考如下:
```js
request.interceptors.response.use(response => {
console.log(response)
if (response.data.code == 1) {
message.error('服务器异常!')
}
return response;
}, error => {
console.log(error)
return Promise.reject(error)
})
```
了解有关 axios 请求拦截与响应拦截的更多信息,请访问[axios interceptors](https://github.com/axios/axios#interceptors)。
================================================
FILE: docs/docs/project/frontend/env-var-modes.md
================================================
# 环境变量和模式
Crm 采用 Vite 提供的环境变量与模式,来设置应用的环境变量与运行模式。
了解有关 Vite 环境变量与模式的更多信息,请参考文档[Vite 环境变量与模式](https://vitejs.dev/guide/env-and-mode.html#env-files)。
## 创建 ```.env``` 文件
在 ```crm/web/``` 目录下创建 ```.env``` 文件,Vite 会从你的 ```环境目录``` 中的下列文件加载额外的环境变量:
```txt
.env # 所有情况下都会加载
.env.local # 所有情况下都会加载,但会被 git 忽略
.env.[mode] # 只在指定模式下加载
.env.[mode].local # 只在指定模式下加载,但会被 git 忽略
```
在 Crm 系统中,只定义了开发模式与生产模式:
```txt
.env.dev # 开发模式的环境变量
.env.prod # 生产模式的环境变量
```
## 定义环境变量
分别在开发模式和生产模式中定义开发环境和生产环境所需要环境变量。
请参考 ```crm/web/.env.dev``` 文件如下:
```txt
# .env.development
VITE_API_BASE_URL=http://127.0.0.1:8000/api
VITE_FILE_UPLOAD_URL=http://127.0.0.1:8000/api/common/file/upload
```
请参考 ```crm/web/.env.prod``` 文件如下:
```txt
# .env.production
VITE_API_BASE_URL=https://zocrm.cloud/api
VITE_FILE_UPLOAD_URL=https://zocrm.cloud/api/common/file/upload
```
## 加载环境变量
通过 ```import.meta.env``` 来获得环境变量:
```js
console.log(import.meta.env.VITE_API_BASE_URL) // http://127.0.0.1:8000/api
console.log(import.meta.env.VITE_FILE_UPLOAD_URL) // http://127.0.0.1:8000/api/common/file/upload
```
请注意,Vite 只会加载以 ```VITE_``` 为前缀的变量。
在 ```crm/web/src/axios/index.js``` 中加载环境变量:
```js
import axios from 'axios';
import { message } from 'ant-design-vue';
axios.defaults.baseURL = import.meta.env.VITE_API_BASE_URL
const request = axios.create({
// timeout: 5000,`
headers: {
'Content-Type': 'application/json;charset=UTF-8'
}
})
...
```
## 运行模式
在 ```crm/web/package.json``` 中添加运行模式,请参考如下:
```json
{
"name": "web",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite --mode dev",
"build": "vite build --mode prod",
"preview": "vite preview"
},
"dependencies": {
...
},
"devDependencies": {
...
}
}
```
================================================
FILE: docs/docs/project/frontend/nprogress.md
================================================
# 页面中的加载进度条
Crm 系统使用 NProgress 作为页面中的加载进度条。
## 什么是 NProgress?
NProgress 是一个适用于应用程序的超薄进度条,灵感来自谷歌、YouTube和媒体。了解有关 NProgress 的更多信息,请访问[NProgress](https://github.com/rstacruz/nprogress)。
## 安装 NProgress
添加 ```nprogress.js``` 和 ```nprogress.css``` 到您的项目。
```html
```
或者使用 ```npm``` 安装:
```bash
$ npm install --save nprogress
```
## 在 Vue Router 中使用
在 Vue Router 中使用 nprogress,请参考如下:
```js
const router = createRouter({
history: createWebHashHistory(), routes
})
NProgress.configure({ easing: 'ease', speed: 500, showSpinner: false });
router.beforeEach((to, from, next) => {
NProgress.start() // 进度条开始
next()
})
router.afterEach(() => {
NProgress.done() // 进度条结束
})
```
查看完整代码,请访问[crm/web/src/router/index.js](https://github.com/zchengo/crm/blob/main/web/src/router/index.js)。
想要了解有关 NProgress 的更多信息,请访问[NProgress](https://github.com/rstacruz/nprogress)。
================================================
FILE: docs/docs/sponsor/sponsor.md
================================================
# 赞赏
打开微信扫一扫,扫描下方赞赏码,请作者喝咖啡!
### 赞赏记录
| 用户昵称 | 金额 | 备注 | 赞赏日期 |
| ---- | -- | -- | -- |
| 罗**弦 | ¥5 | 学习您的项目 | 2023.02.23 |
================================================
FILE: docs/package.json
================================================
{
"name": "docs",
"version": "1.0.0",
"description": "crm docs",
"main": "index.js",
"scripts": {
"docs:dev": "vitepress dev docs",
"docs:build": "vitepress build docs",
"docs:preview": "vitepress preview docs"
},
"author": "zchengo",
"license": "MIT",
"dependencies": {
"vitepress": "^1.0.0-alpha.47",
"vue": "^3.2.45"
}
}
================================================
FILE: server/api/common.go
================================================
package api
import (
"crm/models"
"crm/response"
"crm/service"
"log"
"github.com/gin-gonic/gin"
)
type CommonApi struct {
commonService *service.CommonService
}
func NewCommonApi() *CommonApi {
return &CommonApi{
commonService: service.NewCommonService(),
}
}
// 初始化数据库
func (c *CommonApi) InitDatabase(context *gin.Context) {
errCode := c.commonService.InitDatabase()
response.Result(errCode, nil, context)
}
// 文件上传
func (c *CommonApi) FileUpload(context *gin.Context) {
file, _ := context.FormFile("file")
fileInfo, errCode := c.commonService.FileUpload(file)
response.Result(errCode, fileInfo, context)
}
// 文件移除
func (c *CommonApi) FileRemove(context *gin.Context) {
var param models.FileParam
if err := context.ShouldBind(¶m); err != nil {
response.Result(response.ErrCodeParamInvalid, nil, context)
log.Println(err)
return
}
errCode := c.commonService.FileRemove(¶m)
response.Result(errCode, nil, context)
}
================================================
FILE: server/api/config.go
================================================
package api
import (
"crm/models"
"crm/response"
"crm/service"
"log"
"strconv"
"github.com/gin-gonic/gin"
)
type MailConfigApi struct {
mailConfigService *service.MailConfigService
}
func NewMailConfigApi() *MailConfigApi {
return &MailConfigApi{
mailConfigService: service.NewMailConfigService(),
}
}
// 保存邮件服务配置
func (m *MailConfigApi) Save(context *gin.Context) {
var param models.MailConfigSaveParam
uid, _ := strconv.Atoi(context.Request.Header.Get("uid"))
err := context.ShouldBind(¶m)
if uid <= 0 || err != nil {
response.Result(response.ErrCodeParamInvalid, nil, context)
log.Println(err)
return
}
param.Creator = int64(uid)
errCode := m.mailConfigService.Save(¶m)
if errCode == 0 {
mailConfig, errCode := m.mailConfigService.GetInfo(int64(uid))
response.Result(errCode, mailConfig, context)
return
}
response.Result(errCode, nil, context)
}
// 删除邮件服务配置
func (m *MailConfigApi) Delete(context *gin.Context) {
var param models.MailConfigDeleteParam
if err := context.ShouldBind(¶m); err != nil {
response.Result(response.ErrCodeParamInvalid, nil, context)
log.Println(err)
return
}
errCode := m.mailConfigService.Delete(¶m)
response.Result(errCode, nil, context)
}
// 开启或关闭邮件服务
func (m *MailConfigApi) UpdateStatus(context *gin.Context) {
var param models.MailConfigStatusParam
uid, _ := strconv.Atoi(context.Request.Header.Get("uid"))
err := context.ShouldBind(¶m)
if uid <= 0 || err != nil {
response.Result(response.ErrCodeParamInvalid, nil, context)
log.Println(err)
return
}
param.Creator = int64(uid)
errCode := m.mailConfigService.UpdateStatus(¶m)
response.Result(errCode, nil, context)
}
// 获取邮件服务配置信息
func (m *MailConfigApi) GetInfo(context *gin.Context) {
uid, _ := strconv.Atoi(context.Request.Header.Get("uid"))
if uid <= 0 {
response.Result(response.ErrCodeParamInvalid, nil, context)
return
}
mailConfig, errCode := m.mailConfigService.GetInfo(int64(uid))
response.Result(errCode, mailConfig, context)
}
// 检查邮件配置的有效性
func (m *MailConfigApi) Check(context *gin.Context) {
uid, _ := strconv.Atoi(context.Request.Header.Get("uid"))
if uid <= 0 {
response.Result(response.ErrCodeParamInvalid, nil, context)
return
}
errCode := m.mailConfigService.Check(int64(uid))
response.Result(errCode, nil, context)
}
================================================
FILE: server/api/contract.go
================================================
package api
import (
"crm/models"
"crm/response"
"crm/service"
"strconv"
"github.com/gin-gonic/gin"
)
type ContractApi struct {
contractService *service.ContractService
}
func NewContractApi() *ContractApi {
contractApi := ContractApi{
contractService: &service.ContractService{},
}
return &contractApi
}
// 创建合同
func (c *ContractApi) Create(context *gin.Context) {
var param models.ContractCreateParam
uid, _ := strconv.Atoi(context.Request.Header.Get("uid"))
err := context.ShouldBind(¶m)
if uid <= 0 || err != nil {
response.Result(response.ErrCodeParamInvalid, nil, context)
return
}
param.Creator = int64(uid)
errCode := c.contractService.Create(¶m)
response.Result(errCode, nil, context)
}
// 更新合同
func (c *ContractApi) Update(context *gin.Context) {
var param models.ContractUpdateParam
if err := context.ShouldBind(¶m); err != nil {
response.Result(response.ErrCodeParamInvalid, nil, context)
return
}
errCode := c.contractService.Update(¶m)
response.Result(errCode, nil, context)
}
// 删除合同
func (c *ContractApi) Delete(context *gin.Context) {
var param models.ContractDeleteParam
if err := context.ShouldBind(¶m); err != nil {
response.Result(response.ErrCodeParamInvalid, nil, context)
return
}
errCode := c.contractService.Delete(¶m)
response.Result(errCode, nil, context)
}
// 查询合同列表
func (c *ContractApi) GetList(context *gin.Context) {
var param models.ContractQueryParam
uid, _ := strconv.Atoi(context.Request.Header.Get("uid"))
err := context.ShouldBind(¶m)
if uid <= 0 || err != nil || param.Page.PageNum <= 0 || param.Page.PageSize <= 0 {
response.Result(response.ErrCodeParamInvalid, nil, context)
return
}
param.Creator = int64(uid)
productList, rows, errCode := c.contractService.GetList(¶m)
response.PageResult(errCode, productList, rows, context)
}
// 查询合同信息
func (c *ContractApi) GetInfo(context *gin.Context) {
var param models.ContractQueryParam
if err := context.ShouldBind(¶m); err != nil {
response.Result(response.ErrCodeParamInvalid, nil, context)
return
}
productInfo, errCode := c.contractService.GetInfo(¶m)
response.Result(errCode, productInfo, context)
}
// 编辑合同时,查询产品列表
func (p *ContractApi) GetProductList(context *gin.Context) {
var param models.ContractQueryParam
if err := context.ShouldBind(¶m); err != nil {
response.Result(response.ErrCodeParamInvalid, nil, context)
return
}
productList, errCode := p.contractService.GetProductList(¶m)
response.Result(errCode, productList, context)
}
// 导出Excel文件
func (c *ContractApi) Export(context *gin.Context) {
uid, _ := strconv.Atoi(context.Request.Header.Get("uid"))
if uid <= 0 {
response.Result(response.ErrCodeParamInvalid, nil, context)
return
}
file, errCode := c.contractService.Export(int64(uid))
if len(file) >= 0 && errCode != 0 {
response.Result(errCode, nil, context)
return
}
context.File(file)
}
================================================
FILE: server/api/customer.go
================================================
package api
import (
"crm/models"
"crm/response"
"crm/service"
"log"
"strconv"
"github.com/gin-gonic/gin"
)
type CustomerApi struct {
customerService *service.CustomerService
}
func NewCustomerApi() *CustomerApi {
customerApi := CustomerApi{
customerService: &service.CustomerService{},
}
return &customerApi
}
// 创建产品
func (c *CustomerApi) Create(context *gin.Context) {
var param models.CustomerCreateParam
uid, _ := strconv.Atoi(context.Request.Header.Get("uid"))
err := context.ShouldBind(¶m)
if uid <= 0 || err != nil {
response.Result(response.ErrCodeParamInvalid, nil, context)
return
}
param.Creator = int64(uid)
errCode := c.customerService.Create(¶m)
response.Result(errCode, nil, context)
}
// 更新产品
func (c *CustomerApi) Update(context *gin.Context) {
var param models.CustomerUpdateParam
if err := context.ShouldBind(¶m); err != nil {
response.Result(response.ErrCodeParamInvalid, nil, context)
return
}
errCode := c.customerService.Update(¶m)
response.Result(errCode, nil, context)
}
// 发送邮件给客户
func (c *CustomerApi) SendMail(context *gin.Context) {
var param models.CustomerSendMailParam
uid, _ := strconv.Atoi(context.Request.Header.Get("uid"))
err := context.ShouldBind(¶m)
if uid <= 0 || err != nil {
response.Result(response.ErrCodeParamInvalid, nil, context)
log.Println(err)
return
}
param.Uid = int64(uid)
errCode := c.customerService.SendMail(¶m)
response.Result(errCode, nil, context)
}
// 删除客户
func (c *CustomerApi) Delete(context *gin.Context) {
var param models.CustomerDeleteParam
if err := context.ShouldBind(¶m); err != nil {
response.Result(response.ErrCodeParamInvalid, nil, context)
return
}
errCode := c.customerService.Delete(¶m)
response.Result(errCode, nil, context)
}
// 查询客户列表
func (c *CustomerApi) GetList(context *gin.Context) {
var param models.CustomerQueryParam
uid, _ := strconv.Atoi(context.Request.Header.Get("uid"))
err := context.ShouldBind(¶m)
if uid <= 0 || err != nil {
response.Result(response.ErrCodeParamInvalid, nil, context)
return
}
param.Creator = int64(uid)
customerList, rows, errCode := c.customerService.GetList(¶m)
response.PageResult(errCode, customerList, rows, context)
}
// 查询客户信息
func (c *CustomerApi) GetInfo(context *gin.Context) {
var param models.CustomerQueryParam
if err := context.ShouldBind(¶m); err != nil {
response.Result(response.ErrCodeParamInvalid, nil, context)
return
}
customerInfo, errCode := c.customerService.GetInfo(¶m)
response.Result(errCode, customerInfo, context)
}
// 查询客户选项
func (c *CustomerApi) GetOption(context *gin.Context) {
uid, _ := strconv.Atoi(context.Request.Header.Get("uid"))
if uid <= 0 {
response.Result(response.ErrCodeParamInvalid, nil, context)
return
}
customerOption, errCode := c.customerService.GetOption(int64(uid))
response.Result(errCode, customerOption, context)
}
// 导出Excel文件
func (c *CustomerApi) Export(context *gin.Context) {
uid, _ := strconv.Atoi(context.Request.Header.Get("uid"))
if uid <= 0 {
response.Result(response.ErrCodeParamInvalid, nil, context)
return
}
file, errCode := c.customerService.Export(int64(uid))
if len(file) >= 0 && errCode != 0 {
response.Result(errCode, nil, context)
return
}
context.File(file)
}
================================================
FILE: server/api/dashboard.go
================================================
package api
import (
"crm/response"
"crm/service"
"strconv"
"github.com/gin-gonic/gin"
)
type DashboardApi struct {
dashboardService *service.DashboardService
}
func NewDashboardApi() *DashboardApi {
dashboardApi := DashboardApi{
dashboardService: &service.DashboardService{},
}
return &dashboardApi
}
// 获取数据汇总
func (d *DashboardApi) Summary(context *gin.Context) {
uid, _ := strconv.Atoi(context.Request.Header.Get("uid"))
days, _ := strconv.Atoi(context.Query("daysRange"))
if days < 7 || days > 30 {
response.Result(response.ErrCodeParamInvalid, nil, context)
return
}
sum := d.dashboardService.Summary(int64(uid), days)
response.Result(response.ErrCodeSuccess, sum, context)
}
================================================
FILE: server/api/notice.go
================================================
package api
import (
"crm/models"
"crm/response"
"crm/service"
"fmt"
"strconv"
"github.com/gin-gonic/gin"
)
type NoticeApi struct {
noticeService *service.NoticeService
}
func NewNoticeApi() *NoticeApi {
noticeApi := NoticeApi{
noticeService: &service.NoticeService{},
}
return ¬iceApi
}
func (n *NoticeApi) Update(context *gin.Context) {
var param models.NoticeUpdateParam
if err := context.ShouldBind(¶m); err != nil {
fmt.Println(err)
response.Result(response.ErrCodeParamInvalid, nil, context)
return
}
errCode := n.noticeService.Update(¶m)
response.Result(errCode, nil, context)
}
func (n *NoticeApi) GetUnReadCount(context *gin.Context) {
uid, _ := strconv.Atoi(context.Request.Header.Get("uid"))
if uid <= 0 {
response.Result(response.ErrCodeParamInvalid, nil, context)
return
}
unReadNotice, errCode := n.noticeService.GetUnReadCount(int64(uid))
response.Result(errCode, unReadNotice, context)
}
func (n *NoticeApi) Delete(context *gin.Context) {
var param models.NoticeDeleteParam
if err := context.ShouldBind(¶m); err != nil {
response.Result(response.ErrCodeParamInvalid, nil, context)
return
}
errCode := n.noticeService.Delete(¶m)
response.Result(errCode, nil, context)
}
func (n *NoticeApi) GetList(context *gin.Context) {
uid, _ := strconv.Atoi(context.Request.Header.Get("uid"))
if uid <= 0 {
response.Result(response.ErrCodeParamInvalid, nil, context)
return
}
noticeList, errCode := n.noticeService.GetList(int64(uid))
response.Result(errCode, noticeList, context)
}
================================================
FILE: server/api/product.go
================================================
package api
import (
"crm/models"
"crm/response"
"crm/service"
"strconv"
"github.com/gin-gonic/gin"
)
type ProductApi struct {
productService *service.ProductService
}
func NewProductApi() *ProductApi {
productApi := ProductApi{
productService: &service.ProductService{},
}
return &productApi
}
// 创建产品
func (p *ProductApi) Create(context *gin.Context) {
var param models.ProductCreateParam
uid, _ := strconv.Atoi(context.Request.Header.Get("uid"))
err := context.ShouldBind(¶m)
if uid <= 0 || err != nil {
response.Result(response.ErrCodeParamInvalid, nil, context)
return
}
param.Creator = int64(uid)
errCode := p.productService.Create(¶m)
response.Result(errCode, nil, context)
}
// 更新产品
func (p *ProductApi) Update(context *gin.Context) {
var param models.ProductUpdateParam
if err := context.ShouldBind(¶m); err != nil {
response.Result(response.ErrCodeParamInvalid, nil, context)
return
}
errCode := p.productService.Update(¶m)
response.Result(errCode, nil, context)
}
// 删除产品
func (p *ProductApi) Delete(context *gin.Context) {
var param models.ProductDeleteParam
if err := context.ShouldBind(¶m); err != nil {
response.Result(response.ErrCodeParamInvalid, nil, context)
return
}
errCode := p.productService.Delete(¶m)
response.Result(errCode, nil, context)
}
// 查询产品列表
func (p *ProductApi) GetList(context *gin.Context) {
var param models.ProductQueryParam
uid, _ := strconv.Atoi(context.Request.Header.Get("uid"))
err := context.ShouldBind(¶m)
if uid <= 0 || err != nil {
response.Result(response.ErrCodeParamInvalid, nil, context)
return
}
param.Creator = int64(uid)
productList, rows, errCode := p.productService.GetList(¶m)
response.PageResult(errCode, productList, rows, context)
}
// 查询产品信息
func (p *ProductApi) GetInfo(context *gin.Context) {
var param models.ProductQueryParam
if err := context.ShouldBind(¶m); err != nil {
response.Result(response.ErrCodeParamInvalid, nil, context)
return
}
productInfo, errCode := p.productService.GetInfo(¶m)
response.Result(errCode, productInfo, context)
}
// 导出Excel文件
func (p *ProductApi) Export(context *gin.Context) {
uid, _ := strconv.Atoi(context.Request.Header.Get("uid"))
if uid <= 0 {
response.Result(response.ErrCodeParamInvalid, nil, context)
return
}
file, errCode := p.productService.Export(int64(uid))
if len(file) >= 0 && errCode != 0 {
response.Result(errCode, nil, context)
return
}
context.File(file)
}
================================================
FILE: server/api/subscribe.go
================================================
package api
import (
"crm/common"
"crm/models"
"crm/response"
"crm/service"
"net/http"
"strconv"
"github.com/gin-gonic/gin"
)
type SubscribeApi struct {
subscribeService *service.SubscribeService
}
func NewSubscribeApi() *SubscribeApi {
subscribeApi := SubscribeApi{
subscribeService: service.NewSubscribeService(),
}
return &subscribeApi
}
// 订阅专业版,发起支付
func (s *SubscribeApi) Pay(context *gin.Context) {
var param models.SubscribePayParam
uid, _ := strconv.Atoi(context.Request.Header.Get("uid"))
err := context.ShouldBind(¶m)
if int64(uid) <= 0 || err != nil {
response.Result(response.ErrCodeParamInvalid, nil, context)
return
}
param.Uid = int64(uid)
payUrl, errCode := s.subscribeService.Pay(param)
response.Result(errCode, payUrl, context)
}
// 支付成功回调
func (s *SubscribeApi) PayBack(context *gin.Context) {
notifyReq := common.GetAlipay().VerifySign(context.Request)
errCode := s.subscribeService.PayBack(notifyReq.GetString("out_trade_no"))
context.String(http.StatusOK, "%s", "success")
response.Result(errCode, nil, context)
}
// 获取订阅信息
func (s *SubscribeApi) GetInfo(context *gin.Context) {
uid, _ := strconv.Atoi(context.Request.Header.Get("uid"))
if int64(uid) <= 0 {
response.Result(response.ErrCodeParamInvalid, nil, context)
return
}
subscribeInfo, errCode := s.subscribeService.GetInfo(int64(uid))
response.Result(errCode, subscribeInfo, context)
}
================================================
FILE: server/api/user.go
================================================
package api
import (
"crm/models"
"crm/response"
"crm/service"
"log"
"strconv"
"github.com/gin-gonic/gin"
)
type UserApi struct {
userService *service.UserService
}
func NewUserApi() *UserApi {
userApi := UserApi{
userService: service.NewUserService(),
}
return &userApi
}
// 用户注册
func (u *UserApi) Register(context *gin.Context) {
var param models.UserCreateParam
if err := context.ShouldBind(¶m); err != nil {
response.Result(response.ErrCodeParamInvalid, nil, context)
log.Printf("[error]UserApi:Register:%s", err)
return
}
errCode := u.userService.Register(¶m)
response.Result(errCode, nil, context)
}
// 用户登录
func (u *UserApi) Login(context *gin.Context) {
var param models.UserLoginParam
if err := context.ShouldBind(¶m); err != nil {
response.Result(response.ErrCodeParamInvalid, nil, context)
return
}
userInfo, errCode := u.userService.Login(¶m)
if userInfo == nil {
response.Result(errCode, nil, context)
return
}
response.Result(errCode, userInfo, context)
}
// 获取验证码
func (u *UserApi) GetVerifyCode(context *gin.Context) {
var param models.UserVerifyCodeParam
if err := context.ShouldBind(¶m); err != nil {
response.Result(response.ErrCodeParamInvalid, nil, context)
return
}
errCode := u.userService.GetVerifyCode(param.Email)
response.Result(errCode, nil, context)
}
// 忘记密码
func (u *UserApi) ForgotPass(context *gin.Context) {
var param models.UserPassParam
if err := context.ShouldBind(¶m); err != nil {
response.Result(response.ErrCodeParamInvalid, nil, context)
return
}
errCode := u.userService.ForgotPass(¶m)
response.Result(errCode, nil, context)
}
// 注销账号
func (u *UserApi) Delete(context *gin.Context) {
var param models.UserDeleteParam
uid, _ := strconv.Atoi(context.Request.Header.Get("uid"))
err := context.ShouldBind(¶m)
if uid <= 0 || err != nil {
response.Result(response.ErrCodeParamInvalid, nil, context)
return
}
param.Id = int64(uid)
errCode := u.userService.Delete(param)
response.Result(errCode, nil, context)
}
// 获取用户信息
func (u *UserApi) GetInfo(context *gin.Context) {
uid, _ := strconv.Atoi(context.Request.Header.Get("uid"))
if uid <= 0 {
response.Result(response.ErrCodeParamInvalid, nil, context)
return
}
userInfo, errCode := u.userService.GetInfo(int64(uid))
response.Result(errCode, userInfo, context)
}
================================================
FILE: server/common/alipay.go
================================================
package common
import (
"context"
"crm/global"
"net/http"
"strconv"
"time"
"github.com/go-pay/gopay"
"github.com/go-pay/gopay/alipay"
"github.com/go-pay/gopay/pkg/xlog"
)
type Alipay struct {
}
func GetAlipay() *Alipay {
return &Alipay{}
}
func (a *Alipay) PagePay(tradeNo string, totalAmount float64) (string, error) {
bm := make(gopay.BodyMap)
bm.Set("subject", "服务订阅").
Set("out_trade_no", tradeNo).
Set("total_amount", totalAmount).
Set("timeout_express", "2m")
payUrl, err := global.Alipay.TradePagePay(context.Background(), bm)
if err != nil {
if bizErr, ok := alipay.IsBizError(err); ok {
xlog.Errorf("%+v", bizErr)
return "", err
}
xlog.Errorf("client.TradePay(%+v),err:%+v", bm, err)
return "", err
}
return payUrl, nil
}
func (a *Alipay) VerifySign(req *http.Request) gopay.BodyMap {
notifyReq, err := alipay.ParseNotifyToBodyMap(req)
if err != nil {
xlog.Error(err)
return nil
}
// 支付宝异步通知验签(公钥模式)
if _, err = alipay.VerifySignWithCert(global.Config.Alipay.AlipayPublicCert, notifyReq); err != nil {
xlog.Error(err)
return nil
}
return notifyReq
}
func (a *Alipay) GenTradeNo() string {
return time.Now().Format("20060102150405") + strconv.Itoa(RandInt(100000, 999999))
}
================================================
FILE: server/common/excel.go
================================================
package common
import (
"crm/global"
"log"
"reflect"
"strconv"
"github.com/xuri/excelize/v2"
)
const (
letter = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
)
func GenExcelFile[T any](sheet string, columns []string, rowValue []T, filename string) (string, error) {
f := excelize.NewFile()
index := f.NewSheet(sheet)
for i := 0; i < len(columns); i++ {
axis := string(letter[i]) + strconv.Itoa(1)
f.SetCellValue(sheet, axis, columns[i])
}
num := 2
for r := 0; r < len(rowValue); r++ {
v := reflect.ValueOf(rowValue[r])
for i := 0; i < v.NumField(); i++ {
axis := string(letter[i]) + strconv.Itoa(num)
f.SetCellValue(sheet, axis, v.Field(i))
}
num++
}
f.SetActiveSheet(index)
path := global.Config.File.Path + filename + ".xlsx"
if err := f.SaveAs(path); err != nil {
log.Printf("[ERROR] file save error: %s", err)
return "", err
}
return path, nil
}
================================================
FILE: server/common/jwt.go
================================================
package common
import (
"crm/global"
"time"
"github.com/golang-jwt/jwt/v4"
)
type Claims struct {
Uid int64 `json:"uid"`
jwt.RegisteredClaims
}
// 生成Token
func GenToken(uid int64) (string, error) {
var signingKey = []byte(global.Config.Jwt.SigningKey)
var expiredTime = global.Config.Jwt.ExpiredTime
claims := Claims{uid, jwt.RegisteredClaims{
ExpiresAt: &jwt.NumericDate{Time: time.Now().Add(time.Duration(expiredTime) * time.Second)},
Issuer: "crm",
}}
token, err := jwt.NewWithClaims(jwt.SigningMethodHS256, claims).SignedString(signingKey)
return token, err
}
// 校验Token
func VerifyToken(tokens string) (int64, error) {
token, err := jwt.ParseWithClaims(tokens, &Claims{}, func(token *jwt.Token) (interface{}, error) {
return []byte(global.Config.Jwt.SigningKey), nil
})
claims, ok := token.Claims.(*Claims)
if ok && token.Valid {
return claims.Uid, nil
}
return 0, err
}
================================================
FILE: server/common/mail.go
================================================
package common
import (
"crm/global"
"crm/models"
"crypto/tls"
"fmt"
"log"
"gopkg.in/gomail.v2"
)
// 发送邮件(系统级别)
// QQ邮箱:SMTP 服务器地址:smtp.qq.com(SSL协议端口:465/994 | 非SSL协议端口:25)
// 163邮箱:SMTP 服务器地址:smtp.163.com(端口:25)
func SendMail(email, content string) error {
smtp := global.Config.Mail.Smtp
secret := global.Config.Mail.Secret
sender := global.Config.Mail.Sender
m := gomail.NewMessage()
m.SetHeader("From", sender) // 发件人
m.SetHeader("To", email) // 收件人,可以多个收件人,但必须使用相同的 SMTP 连接
m.SetHeader("Cc", email) // 抄送,可以多个
m.SetHeader("Bcc", email) // 暗送,可以多个
m.SetHeader("Subject", "ZOCRM") // 邮件主题
m.SetBody("text/html", content)
d := gomail.NewDialer(smtp, 465, sender, secret)
// 关闭SSL协议认证
d.TLSConfig = &tls.Config{InsecureSkipVerify: true}
if err := d.DialAndSend(m); err != nil {
fmt.Printf("qq mail send error : %s", err)
return err
}
return nil
}
// 发送邮件给客户(客户级别)
func SendMailToCustomer(mp models.MailParam) error {
m := gomail.NewMessage()
m.SetHeader("From", mp.Sender)
m.SetHeader("To", mp.Receiver)
m.SetHeader("Subject", mp.Subject)
m.SetBody("text/html", mp.Content)
if mp.Attachment != "" {
m.Attach(mp.Attachment)
}
d := gomail.NewDialer(mp.Smtp, mp.Port, mp.Sender, mp.AuthCode)
d.TLSConfig = &tls.Config{InsecureSkipVerify: true}
if err := d.DialAndSend(m); err != nil {
log.Printf("send mail to customer error : %s", err)
return err
}
return nil
}
// 检测STMP服务是否可连接
func DialMail(smtp string, port int, sender, authCode string) error {
d := gomail.NewDialer(smtp, port, sender, authCode)
d.TLSConfig = &tls.Config{InsecureSkipVerify: true}
_, err := d.Dial()
return err
}
================================================
FILE: server/common/rand.go
================================================
package common
import (
"math/rand"
"time"
)
func RandInt(min, max int) int {
rand.Seed(time.Now().UnixNano())
if min >= max || min == 0 || max == 0 {
return max
}
return rand.Intn(max-min+1) + min
}
================================================
FILE: server/common/uuid.go
================================================
package common
import (
"log"
"github.com/gofrs/uuid"
)
// 生成UUID
func GenUUID() string {
u, err := uuid.NewV4()
if err != nil {
log.Fatalf("failed to generate UUID: %v", err)
}
return u.String()
}
================================================
FILE: server/config/config.go
================================================
package config
// 组合全部配置模型
type Config struct {
Server Server `mapstructure:"server"`
Mysql Mysql `mapstructure:"mysql"`
Redis Redis `mapstructure:"redis"`
Jwt Jwt `mapstructure:"jwt"`
File File `mapstructure:"file"`
Mail Mail `mapstructure:"mail"`
Alipay Alipay `mapstructure:"alipay"`
}
// 服务端启动配置
type Server struct {
Port int `mapstructure:"port"`
Runenv string `mapstructure:"runenv"`
}
// MySQL数据库配置
type Mysql struct {
Host string `mapstructure:"host"`
Port int `mapstructure:"port"`
Username string `mapstructure:"username"`
Password string `mapstructure:"password"`
Dbname string `mapstructure:"dbname"`
MaxIdleConns int `mapstructure:"maxIdleConns"`
MaxOpenConns int `mapstructure:"maxOpenConns"`
ConnMaxLifetime int `mapstructure:"connMaxLifetime"`
DbFile string `mapstructure:"dbFile"`
}
// Redis数据库配置
type Redis struct {
Host string `mapstructure:"host"`
Port int `mapstructure:"port"`
Password string `mapstructure:"password"`
Database int `mapstructure:"database"`
}
// JWT用户认证配置
type Jwt struct {
SigningKey string `mapstructure:"signingKey"`
ExpiredTime int `mapstructure:"expiredTime"`
}
// 文件存储配置
type File struct {
Path string `mapstructure:"path"`
}
// 邮件服务配置
type Mail struct {
Smtp string `mapstructure:"smtp"`
Secret string `mapstructure:"secret"`
Sender string `mapstructure:"sender"`
}
// 支付宝支付服务配置
type Alipay struct {
AppId string `mapstructure:"appId"`
PrivateKey string `mapstructure:"privateKey"`
AppPublicCert string `mapstructure:"appPublicCert"`
AlipayRootCert string `mapstructure:"alipayRootCert"`
AlipayPublicCert string `mapstructure:"alipayPublicCert"`
ReturnURL string `mapstructure:"returnURL"`
NotifyURL string `mapstructure:"notifyURL"`
}
================================================
FILE: server/config.yaml
================================================
# 服务端启动配置
server:
port: 8000
runenv: dev
# MySQL数据库配置
mysql:
host: 127.0.0.1
port: 3306
username: root
password: 123456
dbname: crm
maxIdleConns: 10
maxOpenConns: 100
connMaxLifetime: 3600
dbFile: /home/ubuntu/crmapi/crm.sql
# Redis数据库配置
redis:
host: 127.0.0.1
port: 6379
password:
database: 0
# JWT配置
jwt:
signingKey: z3d6k8v0n3w7m9sa1fd0u09h
expiredTime: 604800
# 文件存储配置
file:
path: /home/ubuntu/crm/source/
# 邮件服务配置
mail:
smtp: smtp.qq.com
secret: dhsepilzlvoaceij
sender: 1655064994@qq.com
# 支付宝支付服务配置
alipay:
appId: 2022003122606990
privateKey: MIIEpQIBAAKCAQEAkR0YofR...2sDd6uIy9rkpk8azj/rLmetW5r+tqTZgxcPWKeSz4=
appPublicCert: /home/ubuntu/crm/cert/appPublicCert.crt
alipayRootCert: /home/ubuntu/crm/cert/alipayRootCert.crt
alipayPublicCert: /home/ubuntu/crm/cert/alipayPublicCert.crt
returnURL: http://127.0.0.1:8060/#/subscribe
notifyURL: http://127.0.0.1:8000/api/subscribe/payback
================================================
FILE: server/dao/common.go
================================================
package dao
import (
"context"
"crm/common"
"crm/global"
"crm/models"
"io"
"log"
"mime/multipart"
"os"
"path"
"strings"
)
const (
// 数据库表名
USER = "user"
CUSTOMER = "customer"
CONTRACT = "contract"
PRODUCT = "product"
SUBSCRIBE = "subscribe"
NOTICE = "notice"
MAIL_CONFIG = "mail_config"
// 空值
NumberNull = 0
StringNull = ""
// 运行环境
Dev = "dev"
Prod = "prod"
)
var ctx = context.Background()
// RestPage 分页查询
// page 设置起始页、每页条数,
// name 查询目标表的名称
// query 查询条件,
// dest 查询结果绑定的结构体,
// bind 绑定表结构对应的结构体
func restPage(page models.Page, name string, query interface{}, dest interface{}, bind interface{}) (int64, error) {
if page.PageNum > 0 && page.PageSize > 0 {
offset := (page.PageNum - 1) * page.PageSize
global.Db.Offset(offset).Limit(page.PageSize).Table(name).Where(query).Find(dest)
}
res := global.Db.Table(name).Where(query).Find(bind)
return res.RowsAffected, res.Error
}
type CommonDao struct {
}
func NewCommonDao() *CommonDao {
return &CommonDao{}
}
func (c *CommonDao) InitDatabase() error {
env := global.Config.Server.Runenv
if env == Prod {
dbFile := global.Config.Mysql.DbFile
sql, err := os.ReadFile(dbFile)
if err != nil {
log.Printf("Common.InitDatabase.Error: read file %s error: %s", dbFile, err)
return err
}
sqls := strings.Split(string(sql), ";")
for _, sql := range sqls {
s := strings.TrimSpace(sql)
if s == StringNull {
continue
}
if err := global.Db.Exec(s).Error; err != nil {
log.Printf("Common.InitDatabase.Error: %s", err)
return err
}
}
return nil
}
return nil
}
func (c *CommonDao) FileUpload(file *multipart.FileHeader) (*models.FileInfo, error) {
dist := global.Config.File.Path
name := common.GenUUID() + path.Ext(file.Filename)
dn := dist + name
src, err := file.Open()
if err != nil {
return nil, err
}
defer src.Close()
out, err := os.Create(dn)
if err != nil {
return nil, err
}
defer out.Close()
_, err = io.Copy(out, src)
if err != nil {
return nil, err
}
flieInfo := models.FileInfo{
Url: dn,
Name: name,
}
return &flieInfo, err
}
func (c *CommonDao) FileRemove(fileName string) error {
file := global.Config.File.Path + fileName
return os.Remove(file)
}
================================================
FILE: server/dao/config.go
================================================
package dao
import (
"crm/global"
"crm/models"
"time"
)
const (
Closed = 2
)
type MailConfigDao struct {
}
func NewMailConfigDao() *MailConfigDao {
return &MailConfigDao{}
}
func (m *MailConfigDao) Save(param *models.MailConfigSaveParam) error {
if !m.IsExists(param.Creator) {
return create(param)
}
return update(param)
}
func (m *MailConfigDao) Delete(param *models.MailConfigDeleteParam) error {
return global.Db.Delete(&models.MailConfig{}, param.Id).Error
}
func (m *MailConfigDao) GetInfo(uid int64) (*models.MailConfig, error) {
var mc models.MailConfig
err := global.Db.Table(MAIL_CONFIG).Where("creator = ?", uid).First(&mc).Error
if err != nil {
return nil, err
}
return &mc, nil
}
func (m *MailConfigDao) UpdateStatus(param *models.MailConfigStatusParam) error {
mailConfig := models.MailConfig{
Status: param.Status,
Updated: time.Now().Unix(),
}
db := global.Db.Model(&mailConfig).Where("id = ? and creator = ?", param.Id, param.Creator)
if err := db.Updates(&mailConfig).Error; err != nil {
return err
}
return nil
}
func (m *MailConfigDao) IsExists(uid int64) bool {
var mc models.MailConfig
db := global.Db.Table(MAIL_CONFIG).Where("creator = ?", uid).First(&mc)
return db.RowsAffected != NumberNull
}
func create(param *models.MailConfigSaveParam) error {
mailConfig := models.MailConfig{
Stmp: param.Stmp,
Port: param.Port,
AuthCode: param.AuthCode,
Email: param.Email,
Status: Closed,
Creator: param.Creator,
Created: time.Now().Unix(),
}
if err := global.Db.Create(&mailConfig).Error; err != nil {
return err
}
return nil
}
func update(param *models.MailConfigSaveParam) error {
mailConfig := models.MailConfig{
Id: param.Id,
Stmp: param.Stmp,
Port: param.Port,
AuthCode: param.AuthCode,
Email: param.Email,
Status: param.Status,
Creator: param.Creator,
Updated: time.Now().Unix(),
}
db := global.Db.Model(&mailConfig).Select("*").Omit("id", "creator", "created")
if err := db.Updates(&mailConfig).Error; err != nil {
return err
}
return nil
}
================================================
FILE: server/dao/contract.go
================================================
package dao
import (
"crm/global"
"crm/models"
"time"
)
type ContractDao struct {
}
func NewContractDao() *ContractDao {
return &ContractDao{}
}
func (c *ContractDao) Create(param *models.ContractCreateParam) error {
contract := models.Contract{
Name: param.Name,
Amount: param.Amount,
BeginTime: param.BeginTime,
OverTime: param.OverTime,
Remarks: param.Remarks,
Cid: param.Cid,
Productlist: param.Productlist,
Status: param.Status,
Creator: param.Creator,
Created: time.Now().Unix(),
}
return global.Db.Create(&contract).Error
}
func (c *ContractDao) Update(param *models.ContractUpdateParam) error {
contract := models.Contract{
Id: param.Id,
Name: param.Name,
Amount: param.Amount,
BeginTime: param.BeginTime,
OverTime: param.OverTime,
Remarks: param.Remarks,
Cid: param.Cid,
Productlist: param.Productlist,
Status: param.Status,
Updated: time.Now().Unix(),
}
db := global.Db.Model(&contract).Select("*").Omit("id", "creator", "created")
return db.Updates(&contract).Error
}
func (c *ContractDao) Delete(param *models.ContractDeleteParam) error {
return global.Db.Delete(&models.Contract{}, param.Ids).Error
}
func (c *ContractDao) GetList(param *models.ContractQueryParam) ([]*models.ContractList, int64, error) {
contractList := make([]*models.ContractList, 0)
field := "contract.id, contract.name, contract.amount, contract.begin_time, contract.over_time, customer.name as cname, contract.remarks, contract.status, contract.created, contract.updated"
where := "inner join customer on contract.cid = customer.id and contract.creator = ?"
raw := "select count(*) from contract where creator = ?"
// 分页查询
offset := (param.Page.PageNum - 1) * param.Page.PageSize
db := global.Db.Offset(offset).Limit(param.Page.PageSize).Table(CONTRACT).Select(field)
var rows int64
if param.Id != NumberNull {
db.Joins(where+" and contract.id = ?", param.Creator, param.Id)
global.Db.Raw(raw + " and contract.id = ?", param.Creator, param.Creator).Scan(&rows)
} else {
if param.Status != NumberNull {
db.Joins(where+" and contract.status = ?", param.Creator, param.Status)
global.Db.Raw(raw + " and contract.status = ?", param.Creator, param.Status).Scan(&rows)
} else {
db.Joins(where, param.Creator)
global.Db.Raw(raw, param.Creator).Scan(&rows)
}
}
if err := db.Scan(&contractList).Error; err != nil {
return nil, NumberNull, nil
}
return contractList, rows, nil
}
func (c *ContractDao) GetListByUid(uid int64) ([]*models.ContractList, error) {
contracts := make([]*models.ContractList, 0)
s := "contract.id, contract.name, contract.amount, contract.begin_time, contract.over_time, customer.name as cname, contract.remarks, contract.status, contract.created, contract.updated"
j := "left join customer on contract.cid = customer.id and contract.creator = ?"
err := global.Db.Table(CONTRACT).Select(s).Joins(j, uid).Scan(&contracts).Error
if err != nil {
return nil, err
}
return contracts, nil
}
func (c *ContractDao) GetInfo(param *models.ContractQueryParam) (*models.ContractInfo, error) {
contract := models.Contract{
Id: param.Id,
}
contractInfo := models.ContractInfo{}
err := global.Db.Table(CONTRACT).Where(&contract).First(&contractInfo).Error
if err != nil {
return nil, err
}
return &contractInfo, nil
}
func (c *ContractDao) GetAddedPList(id int64) (*models.Contract, error) {
var contract models.Contract
err := global.Db.Table(CONTRACT).Select("productlist").First(&contract, id).Error
if err != nil {
return nil, err
}
return &contract, nil
}
================================================
FILE: server/dao/customer.go
================================================
package dao
import (
"crm/global"
"crm/models"
"time"
)
type CustomerDao struct {
}
func NewCustomerDao() *CustomerDao {
return &CustomerDao{}
}
func (c *CustomerDao) Create(param *models.CustomerCreateParam) error {
customer := models.Customer{
Name: param.Name,
Source: param.Source,
Phone: param.Phone,
Email: param.Email,
Industry: param.Industry,
Level: param.Level,
Remarks: param.Remarks,
Region: param.Region,
Address: param.Address,
Status: 1,
Creator: param.Creator,
Created: time.Now().Unix(),
}
return global.Db.Create(&customer).Error
}
func (c *CustomerDao) Update(param *models.CustomerUpdateParam) error {
customer := models.Customer{
Id: param.Id,
Name: param.Name,
Source: param.Source,
Phone: param.Phone,
Email: param.Email,
Industry: param.Industry,
Level: param.Level,
Remarks: param.Remarks,
Region: param.Region,
Address: param.Address,
Status: param.Status,
Updated: time.Now().Unix(),
}
db := global.Db.Model(&customer).Select("*").Omit("id", "creator", "created")
return db.Updates(&customer).Error
}
func (c *CustomerDao) Delete(param *models.CustomerDeleteParam) error {
return global.Db.Delete(&models.Customer{}, param.Ids).Error
}
func (c *CustomerDao) IsExists(name string, uid int64) bool {
var customer models.Customer
db := global.Db.Table(CUSTOMER).Where("name = ? and creator = ?", name, uid).First(&customer)
return db.RowsAffected != NumberNull
}
func (c *CustomerDao) GetList(param *models.CustomerQueryParam) ([]*models.CustomerList, int64, error) {
customer := models.Customer{
Name: param.Name,
Source: param.Source,
Industry: param.Industry,
Level: param.Level,
Status: param.Status,
Creator: param.Creator,
}
customerList := make([]*models.CustomerList, 0)
rows, err := restPage(param.Page, CUSTOMER, customer, &customerList, &[]*models.CustomerList{})
if err != nil {
return nil, 0, err
}
return customerList, rows, nil
}
func (c *CustomerDao) GetInfo(param *models.CustomerQueryParam) (*models.CustomerInfo, error) {
customer := models.Customer{
Id: param.Id,
}
customerInfo := models.CustomerInfo{}
err := global.Db.Table(CUSTOMER).Where(&customer).First(&customerInfo).Error
if err != nil {
return nil, err
}
return &customerInfo, nil
}
func (c *CustomerDao) GetOption(uid int64) ([]*models.CustomerOption, error) {
customer := models.Customer{
Creator: uid,
}
option := make([]*models.CustomerOption, 0)
err := global.Db.Table(CUSTOMER).Where(&customer).Find(&option).Error
if err != nil {
return nil, err
}
return option, nil
}
func (c *CustomerDao) GetListByUid(uid int64) ([]*models.Customer, error) {
customers := make([]*models.Customer, 0)
err := global.Db.Where("creator = ?", uid).Find(&customers).Error
if err != nil {
return nil, err
}
return customers, nil
}
================================================
FILE: server/dao/dashboard.go
================================================
package dao
import (
"crm/global"
"crm/models"
)
type DashboardDao struct {
}
func NewDashboardDao() *DashboardDao {
return &DashboardDao{}
}
func (d *DashboardDao) Count(uid int64, days int) models.DashboardSum {
var ds models.DashboardSum
global.Db.Raw("select count(*) from customer where creator = ?", uid).Scan(&ds.Customers)
global.Db.Raw("select count(*) from contract where creator = ?", uid).Scan(&ds.Contracts)
global.Db.Raw("select sum(amount) from contract where creator = ?", uid).Scan(&ds.ContractAmount)
global.Db.Raw("select count(*) from product where creator = ?", uid).Scan(&ds.Products)
s := "industry as name, count(*) as value"
global.Db.Model(&models.Customer{}).Select(s).Where("creator = ?", uid).Group("industry").Find(&ds.CustomerIndustry)
return ds
}
func (d *DashboardDao) AmountSum(start, end, uid int64) float64 {
var as float64
con := "created > ? and created < ? and status = 1 and creator = ?"
global.Db.Table(CONTRACT).Where(con, start, end, uid).Pluck("amount", &as)
return as
}
================================================
FILE: server/dao/notice.go
================================================
package dao
import (
"crm/global"
"crm/models"
"time"
)
const (
Read = 1 // 已读
UnRead = 2 // 未读
)
type NoticeDao struct {
}
func NewNoticeDao() *NoticeDao {
return &NoticeDao{}
}
func (n *NoticeDao) Create(param *models.NoticeCreateParam) error {
notice := models.Notice{
Content: param.Content,
Status: UnRead,
Creator: param.Creator,
Created: time.Now().Unix(),
}
return global.Db.Create(¬ice).Error
}
func (n *NoticeDao) Update(param *models.NoticeUpdateParam) error {
notice := models.Notice{
Id: param.Id,
Status: Read,
Updated: time.Now().Unix(),
}
return global.Db.Model(¬ice).Updates(¬ice).Error
}
func (n *NoticeDao) GetUnReadCountByUid(uid int64) (models.UnReadNotice, error) {
var unRead models.UnReadNotice
raw := "select count(*) from notice where status = 2 and creator = ?"
if err := global.Db.Raw(raw, uid).Scan(&unRead.Count).Error; err != nil {
return unRead, err
}
return unRead, nil
}
func (n *NoticeDao) Delete(param *models.NoticeDeleteParam) error {
return global.Db.Delete(&models.Notice{}, param.Ids).Error
}
func (n *NoticeDao) GetList(uid int64) ([]*models.NoticeList, error) {
noticeList := make([]*models.NoticeList, 0)
db := global.Db.Table(NOTICE).Where("creator = ?", uid)
if err := db.Order("status desc").Order("created desc").Find(¬iceList).Error; err != nil {
return nil, err
}
return noticeList, nil
}
================================================
FILE: server/dao/product.go
================================================
package dao
import (
"crm/global"
"crm/models"
"time"
)
type ProductDao struct {
}
func NewProductDao() *ProductDao {
return &ProductDao{}
}
func (p *ProductDao) Create(param *models.ProductCreateParam) error {
product := models.Product{
Name: param.Name,
Type: param.Type,
Unit: param.Unit,
Code: param.Code,
Price: param.Price,
Description: param.Description,
Status: param.Status,
Creator: param.Creator,
Created: time.Now().Unix(),
}
return global.Db.Create(&product).Error
}
func (p *ProductDao) Update(param *models.ProductUpdateParam) error {
product := models.Product{
Id: param.Id,
Name: param.Name,
Type: param.Type,
Unit: param.Unit,
Code: param.Code,
Price: param.Price,
Description: param.Description,
Status: param.Status,
Updated: time.Now().Unix(),
}
db := global.Db.Model(&product).Select("*").Omit("id", "creator", "created")
return db.Updates(&product).Error
}
func (p *ProductDao) Delete(param *models.ProductDeleteParam) error {
return global.Db.Delete(&models.Product{}, param.Ids).Error
}
func (p *ProductDao) IsExists(name string, uid int64) bool {
var product models.Product
db := global.Db.Table(PRODUCT).Where("name = ? and creator = ?", name, uid).First(&product)
return db.RowsAffected != NumberNull
}
func (p *ProductDao) GetList(param *models.ProductQueryParam) ([]*models.ProductList, int64, error) {
product := models.Product{
Name: param.Name,
Status: param.Status,
Creator: param.Creator,
}
productList := make([]*models.ProductList, 0)
rows, err := restPage(param.Page, PRODUCT, product, &productList, &[]*models.ProductList{})
if err != nil {
return nil, 0, err
}
return productList, rows, err
}
func (p *ProductDao) GetListByIds(ids []int64) ([]*models.Products, error) {
products := make([]*models.Products, 0)
if err := global.Db.Table(PRODUCT).Find(&products, ids).Error; err != nil {
return nil, err
}
return products, nil
}
func (p *ProductDao) GetInfo(param *models.ProductQueryParam) (*models.ProductInfo, error) {
product := models.Product{
Id: param.Id,
}
productInfo := models.ProductInfo{}
err := global.Db.Table(PRODUCT).Where(&product).First(&productInfo).Error
if err != nil {
return nil, err
}
return &productInfo, err
}
func (p *ProductDao) GetListByUid(uid int64) ([]*models.Product, error) {
products := make([]*models.Product, 0)
err := global.Db.Where("creator = ?", uid).Find(&products).Error
if err != nil {
return nil, err
}
return products, nil
}
================================================
FILE: server/dao/subscribe.go
================================================
package dao
import (
"crm/global"
"crm/models"
"encoding/json"
"time"
)
type SubscribeDao struct {
}
func NewSubscribeDao() *SubscribeDao {
return &SubscribeDao{}
}
func (s *SubscribeDao) Create(param *models.SubscribeCreateParam) error {
subscribe := models.Subscribe{
Uid: param.Uid,
Version: param.Version,
Expired: param.Expired,
Created: time.Now().Unix(),
}
return global.Db.Table(SUBSCRIBE).Create(&subscribe).Error
}
func (s *SubscribeDao) Update(param *models.SubscribeUpdateParam) error {
subscribe := models.Subscribe{
Version: param.Version,
Expired: param.Expired,
Updated: time.Now().Unix(),
}
return global.Db.Model(&models.Subscribe{}).Where("uid = ?", param.Uid).Updates(&subscribe).Error
}
func (s *SubscribeDao) UpdateVersion(uid int64, v int) error {
return global.Db.Model(&models.Subscribe{}).Where("uid = ?", uid).Update("version", v).Error
}
func (u *SubscribeDao) IsExists(uid int64) bool {
var subscribe models.Subscribe
db := global.Db.Table(SUBSCRIBE).Where("uid = ?", uid).First(&subscribe)
return db.RowsAffected != NumberNull
}
func (s *SubscribeDao) GetInfo(uid int64) (*models.SubscribeInfo, error) {
var si models.SubscribeInfo
if err := global.Db.Table(SUBSCRIBE).First(&si, "uid = ?", uid).Error; err != nil {
return nil, err
}
return &si, nil
}
func (s *SubscribeDao) SetOrder(tradeNo string, param *models.SubscribePayOrder) error {
order, _ := json.Marshal(¶m)
return global.Rdb.Set(ctx, tradeNo, string(order), time.Minute*30).Err()
}
func (s *SubscribeDao) GetOrder(tradeNo string) (string, error) {
orderJson, err := global.Rdb.Get(ctx, tradeNo).Result()
if err != nil {
return StringNull, err
}
return orderJson, nil
}
================================================
FILE: server/dao/user.go
================================================
package dao
import (
"crm/global"
"crm/models"
"fmt"
"strconv"
"time"
"gorm.io/gorm"
)
type UserDao struct {
}
func NewUserDao() *UserDao {
return &UserDao{}
}
func (u *UserDao) Create(param *models.UserCreateParam) error {
user := models.User{
Email: param.Email,
Password: param.Password,
Status: 1,
Created: time.Now().Unix(),
}
return global.Db.Create(&user).Error
}
func (u *UserDao) UpdatePass(email, password string) error {
userPass := models.User{
Password: password,
Updated: time.Now().Unix(),
}
return global.Db.Model(&models.User{}).Where("email = ?", email).Updates(&userPass).Error
}
func (u *UserDao) IsExists(email string) bool {
rows := global.Db.Where("email = ?", email).First(&models.User{}).RowsAffected
return rows != NumberNull
}
func (u *UserDao) GetUid(email string) (int64, error) {
user, err := u.GetUser(email)
if err != nil {
return NumberNull, err
}
return user.Id, nil
}
func (u *UserDao) GetUser(email string) (*models.User, error) {
var user models.User
err := global.Db.Table(USER).Where("email = ?", email).First(&user).Error
if err != nil {
return nil, err
}
return &user, nil
}
func (u *UserDao) DeleteData(param models.UserDeleteParam) error {
return global.Db.Transaction(func(tx *gorm.DB) error {
mw := map[interface{}]string{
&models.Product{}: "creator = ?",
&models.Customer{}: "creator = ?",
&models.Contract{}: "creator = ?",
&models.MailConfig{}: "creator = ?",
&models.Subscribe{}: "uid = ?",
&models.User{}: "id = ?",
}
for k, v := range mw {
if err := tx.Where(v, param.Id).Delete(k).Error; err != nil {
return err
}
}
return nil
})
}
func (u *UserDao) GetInfo(uid int64) (*models.UserPersonInfo, error) {
var user models.UserPersonInfo
err := global.Db.Transaction(func(tx *gorm.DB) error {
if err := tx.Table(USER).Where("id = ?", uid).First(&user).Error; err != nil {
return err
}
var subscribe models.Subscribe
if err := tx.Table(SUBSCRIBE).Select("version").Where("uid = ?", uid).First(&subscribe).Error; err != nil {
return err
}
user.Version = subscribe.Version
return nil
})
return &user, err
}
func (u *UserDao) SetCode(code int, email string) error {
key := fmt.Sprintf("user:%s:code", email)
return global.Rdb.SetEx(ctx, key, strconv.Itoa(code), 10*time.Minute).Err()
}
func (u *UserDao) GetCode(email string) string {
key := fmt.Sprintf("user:%s:code", email)
return global.Rdb.Get(ctx, key).Val()
}
================================================
FILE: server/db/crm.sql
================================================
/*
Navicat Premium Data Transfer
Source Server : mysql
Source Server Type : MySQL
Source Server Version : 80031 (8.0.31)
Source Host : localhost:3306
Source Schema : crm
Target Server Type : MySQL
Target Server Version : 80031 (8.0.31)
File Encoding : 65001
Date: 28/01/2023 19:19:16
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for contract
-- ----------------------------
DROP TABLE IF EXISTS `contract`;
CREATE TABLE `contract` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '编号',
`name` varchar(200) DEFAULT NULL COMMENT '合同名称',
`amount` decimal(10,2) DEFAULT NULL COMMENT '金额',
`begin_time` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '开始时间',
`over_time` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '结束时间',
`remarks` varchar(80) DEFAULT NULL COMMENT '备注',
`cid` bigint DEFAULT NULL COMMENT '客户编号',
`productlist` json DEFAULT NULL COMMENT '产品编号和数量',
`status` tinyint DEFAULT NULL COMMENT '状态',
`creator` bigint DEFAULT NULL COMMENT '创建人',
`created` bigint DEFAULT NULL COMMENT '创建时间',
`updated` bigint DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`),
KEY `idx_creator` (`creator`)
) ENGINE=InnoDB AUTO_INCREMENT=20026 DEFAULT CHARSET=utf8mb3;
-- ----------------------------
-- Records of contract
-- ----------------------------
BEGIN;
INSERT INTO `contract` (`id`, `name`, `amount`, `begin_time`, `over_time`, `remarks`, `cid`, `productlist`, `status`, `creator`, `created`, `updated`) VALUES (20001, '电动车交易1', 89880.00, '2023-01-28', '2023-01-30', '无备注', 1, '[{\"id\": 1, \"name\": \"电动车1\", \"type\": 1, \"unit\": \"台\", \"count\": 10, \"price\": 1498, \"total\": 14980}, {\"id\": 2, \"name\": \"电动车2\", \"type\": 1, \"unit\": \"台\", \"count\": 20, \"price\": 1498, \"total\": 29960}, {\"id\": 3, \"name\": \"电动车3\", \"type\": 1, \"unit\": \"台\", \"count\": 30, \"price\": 1498, \"total\": 44940}]', 1, 29, 1674900672, 0);
INSERT INTO `contract` (`id`, `name`, `amount`, `begin_time`, `over_time`, `remarks`, `cid`, `productlist`, `status`, `creator`, `created`, `updated`) VALUES (20002, '电动车交易2', 89880.00, '2023-01-28', '2023-01-30', '无备注', 2, '[{\"id\": 1, \"name\": \"电动车1\", \"type\": 1, \"unit\": \"台\", \"count\": 10, \"price\": 1498, \"total\": 14980}, {\"id\": 2, \"name\": \"电动车2\", \"type\": 1, \"unit\": \"台\", \"count\": 20, \"price\": 1498, \"total\": 29960}, {\"id\": 3, \"name\": \"电动车3\", \"type\": 1, \"unit\": \"台\", \"count\": 30, \"price\": 1498, \"total\": 44940}]', 1, 29, 1674900672, 0);
INSERT INTO `contract` (`id`, `name`, `amount`, `begin_time`, `over_time`, `remarks`, `cid`, `productlist`, `status`, `creator`, `created`, `updated`) VALUES (20003, '电动车交易3', 89880.00, '2023-01-28', '2023-01-30', '无备注', 3, '[{\"id\": 1, \"name\": \"电动车1\", \"type\": 1, \"unit\": \"台\", \"count\": 10, \"price\": 1498, \"total\": 14980}, {\"id\": 2, \"name\": \"电动车2\", \"type\": 1, \"unit\": \"台\", \"count\": 20, \"price\": 1498, \"total\": 29960}, {\"id\": 3, \"name\": \"电动车3\", \"type\": 1, \"unit\": \"台\", \"count\": 30, \"price\": 1498, \"total\": 44940}]', 2, 29, 1674900672, 0);
INSERT INTO `contract` (`id`, `name`, `amount`, `begin_time`, `over_time`, `remarks`, `cid`, `productlist`, `status`, `creator`, `created`, `updated`) VALUES (20004, '电动车交易4', 89880.00, '2023-01-28', '2023-01-30', '无备注', 4, '[{\"id\": 1, \"name\": \"电动车1\", \"type\": 1, \"unit\": \"台\", \"count\": 10, \"price\": 1498, \"total\": 14980}, {\"id\": 2, \"name\": \"电动车2\", \"type\": 1, \"unit\": \"台\", \"count\": 20, \"price\": 1498, \"total\": 29960}, {\"id\": 3, \"name\": \"电动车3\", \"type\": 1, \"unit\": \"台\", \"count\": 30, \"price\": 1498, \"total\": 44940}]', 1, 29, 1674900672, 1674901109);
INSERT INTO `contract` (`id`, `name`, `amount`, `begin_time`, `over_time`, `remarks`, `cid`, `productlist`, `status`, `creator`, `created`, `updated`) VALUES (20005, '电动车交易5', 89880.00, '2023-01-28', '2023-01-30', '无备注', 5, '[{\"id\": 1, \"name\": \"电动车1\", \"type\": 1, \"unit\": \"台\", \"count\": 10, \"price\": 1498, \"total\": 14980}, {\"id\": 2, \"name\": \"电动车2\", \"type\": 1, \"unit\": \"台\", \"count\": 20, \"price\": 1498, \"total\": 29960}, {\"id\": 3, \"name\": \"电动车3\", \"type\": 1, \"unit\": \"台\", \"count\": 30, \"price\": 1498, \"total\": 44940}]', 1, 29, 1674900672, 0);
INSERT INTO `contract` (`id`, `name`, `amount`, `begin_time`, `over_time`, `remarks`, `cid`, `productlist`, `status`, `creator`, `created`, `updated`) VALUES (20006, '电动车交易6', 89880.00, '2023-01-28', '2023-01-30', '无备注', 6, '[{\"id\": 1, \"name\": \"电动车1\", \"type\": 1, \"unit\": \"台\", \"count\": 10, \"price\": 1498, \"total\": 14980}, {\"id\": 2, \"name\": \"电动车2\", \"type\": 1, \"unit\": \"台\", \"count\": 20, \"price\": 1498, \"total\": 29960}, {\"id\": 3, \"name\": \"电动车3\", \"type\": 1, \"unit\": \"台\", \"count\": 30, \"price\": 1498, \"total\": 44940}]', 2, 29, 1674900672, 0);
INSERT INTO `contract` (`id`, `name`, `amount`, `begin_time`, `over_time`, `remarks`, `cid`, `productlist`, `status`, `creator`, `created`, `updated`) VALUES (20007, '电动车交易7', 89880.00, '2023-01-28', '2023-01-30', '无备注', 7, '[{\"id\": 1, \"name\": \"电动车1\", \"type\": 1, \"unit\": \"台\", \"count\": 10, \"price\": 1498, \"total\": 14980}, {\"id\": 2, \"name\": \"电动车2\", \"type\": 1, \"unit\": \"台\", \"count\": 20, \"price\": 1498, \"total\": 29960}, {\"id\": 3, \"name\": \"电动车3\", \"type\": 1, \"unit\": \"台\", \"count\": 30, \"price\": 1498, \"total\": 44940}]', 1, 29, 1674900672, 0);
INSERT INTO `contract` (`id`, `name`, `amount`, `begin_time`, `over_time`, `remarks`, `cid`, `productlist`, `status`, `creator`, `created`, `updated`) VALUES (20008, '电动车交易8', 89880.00, '2023-01-28', '2023-01-30', '无备注', 8, '[{\"id\": 1, \"name\": \"电动车1\", \"type\": 1, \"unit\": \"台\", \"count\": 10, \"price\": 1498, \"total\": 14980}, {\"id\": 2, \"name\": \"电动车2\", \"type\": 1, \"unit\": \"台\", \"count\": 20, \"price\": 1498, \"total\": 29960}, {\"id\": 3, \"name\": \"电动车3\", \"type\": 1, \"unit\": \"台\", \"count\": 30, \"price\": 1498, \"total\": 44940}]', 1, 29, 1674900672, 0);
INSERT INTO `contract` (`id`, `name`, `amount`, `begin_time`, `over_time`, `remarks`, `cid`, `productlist`, `status`, `creator`, `created`, `updated`) VALUES (20009, '电动车交易9', 89880.00, '2023-01-28', '2023-01-30', '无备注', 9, '[{\"id\": 1, \"name\": \"电动车1\", \"type\": 1, \"unit\": \"台\", \"count\": 10, \"price\": 1498, \"total\": 14980}, {\"id\": 2, \"name\": \"电动车2\", \"type\": 1, \"unit\": \"台\", \"count\": 20, \"price\": 1498, \"total\": 29960}, {\"id\": 3, \"name\": \"电动车3\", \"type\": 1, \"unit\": \"台\", \"count\": 30, \"price\": 1498, \"total\": 44940}]', 2, 29, 1674900672, 1674901130);
INSERT INTO `contract` (`id`, `name`, `amount`, `begin_time`, `over_time`, `remarks`, `cid`, `productlist`, `status`, `creator`, `created`, `updated`) VALUES (20010, '电动车交易10', 89880.00, '2023-01-28', '2023-01-30', '无备注', 10, '[{\"id\": 1, \"name\": \"电动车1\", \"type\": 1, \"unit\": \"台\", \"count\": 10, \"price\": 1498, \"total\": 14980}, {\"id\": 2, \"name\": \"电动车2\", \"type\": 1, \"unit\": \"台\", \"count\": 20, \"price\": 1498, \"total\": 29960}, {\"id\": 3, \"name\": \"电动车3\", \"type\": 1, \"unit\": \"台\", \"count\": 30, \"price\": 1498, \"total\": 44940}]', 2, 29, 1674900672, 0);
INSERT INTO `contract` (`id`, `name`, `amount`, `begin_time`, `over_time`, `remarks`, `cid`, `productlist`, `status`, `creator`, `created`, `updated`) VALUES (20011, '电动车交易11', 89880.00, '2023-01-28', '2023-01-30', '无备注', 11, '[{\"id\": 1, \"name\": \"电动车1\", \"type\": 1, \"unit\": \"台\", \"count\": 10, \"price\": 1498, \"total\": 14980}, {\"id\": 2, \"name\": \"电动车2\", \"type\": 1, \"unit\": \"台\", \"count\": 20, \"price\": 1498, \"total\": 29960}, {\"id\": 3, \"name\": \"电动车3\", \"type\": 1, \"unit\": \"台\", \"count\": 30, \"price\": 1498, \"total\": 44940}]', 2, 29, 1674900672, 0);
INSERT INTO `contract` (`id`, `name`, `amount`, `begin_time`, `over_time`, `remarks`, `cid`, `productlist`, `status`, `creator`, `created`, `updated`) VALUES (20012, '电动车交易12', 89880.00, '2023-01-28', '2023-01-30', '无备注', 12, '[{\"id\": 1, \"name\": \"电动车1\", \"type\": 1, \"unit\": \"台\", \"count\": 10, \"price\": 1498, \"total\": 14980}, {\"id\": 2, \"name\": \"电动车2\", \"type\": 1, \"unit\": \"台\", \"count\": 20, \"price\": 1498, \"total\": 29960}, {\"id\": 3, \"name\": \"电动车3\", \"type\": 1, \"unit\": \"台\", \"count\": 30, \"price\": 1498, \"total\": 44940}]', 2, 29, 1674900672, 0);
INSERT INTO `contract` (`id`, `name`, `amount`, `begin_time`, `over_time`, `remarks`, `cid`, `productlist`, `status`, `creator`, `created`, `updated`) VALUES (20013, '电动车交易13', 89880.00, '2023-01-28', '2023-01-30', '无备注', 13, '[{\"id\": 1, \"name\": \"电动车1\", \"type\": 1, \"unit\": \"台\", \"count\": 10, \"price\": 1498, \"total\": 14980}, {\"id\": 2, \"name\": \"电动车2\", \"type\": 1, \"unit\": \"台\", \"count\": 20, \"price\": 1498, \"total\": 29960}, {\"id\": 3, \"name\": \"电动车3\", \"type\": 1, \"unit\": \"台\", \"count\": 30, \"price\": 1498, \"total\": 44940}]', 2, 29, 1674900672, 0);
INSERT INTO `contract` (`id`, `name`, `amount`, `begin_time`, `over_time`, `remarks`, `cid`, `productlist`, `status`, `creator`, `created`, `updated`) VALUES (20014, '电动车交易14', 89880.00, '2023-01-28', '2023-01-30', '无备注', 14, '[{\"id\": 1, \"name\": \"电动车1\", \"type\": 1, \"unit\": \"台\", \"count\": 10, \"price\": 1498, \"total\": 14980}, {\"id\": 2, \"name\": \"电动车2\", \"type\": 1, \"unit\": \"台\", \"count\": 20, \"price\": 1498, \"total\": 29960}, {\"id\": 3, \"name\": \"电动车3\", \"type\": 1, \"unit\": \"台\", \"count\": 30, \"price\": 1498, \"total\": 44940}]', 2, 29, 1674900672, 0);
INSERT INTO `contract` (`id`, `name`, `amount`, `begin_time`, `over_time`, `remarks`, `cid`, `productlist`, `status`, `creator`, `created`, `updated`) VALUES (20015, '电动车交易15', 89880.00, '2023-01-28', '2023-01-30', '无备注', 15, '[{\"id\": 1, \"name\": \"电动车1\", \"type\": 1, \"unit\": \"台\", \"count\": 10, \"price\": 1498, \"total\": 14980}, {\"id\": 2, \"name\": \"电动车2\", \"type\": 1, \"unit\": \"台\", \"count\": 20, \"price\": 1498, \"total\": 29960}, {\"id\": 3, \"name\": \"电动车3\", \"type\": 1, \"unit\": \"台\", \"count\": 30, \"price\": 1498, \"total\": 44940}]', 1, 29, 1674900672, 0);
INSERT INTO `contract` (`id`, `name`, `amount`, `begin_time`, `over_time`, `remarks`, `cid`, `productlist`, `status`, `creator`, `created`, `updated`) VALUES (20016, '电动车交易16', 89880.00, '2023-01-28', '2023-01-30', '无备注', 16, '[{\"id\": 1, \"name\": \"电动车1\", \"type\": 1, \"unit\": \"台\", \"count\": 10, \"price\": 1498, \"total\": 14980}, {\"id\": 2, \"name\": \"电动车2\", \"type\": 1, \"unit\": \"台\", \"count\": 20, \"price\": 1498, \"total\": 29960}, {\"id\": 3, \"name\": \"电动车3\", \"type\": 1, \"unit\": \"台\", \"count\": 30, \"price\": 1498, \"total\": 44940}]', 1, 29, 1674900672, 0);
INSERT INTO `contract` (`id`, `name`, `amount`, `begin_time`, `over_time`, `remarks`, `cid`, `productlist`, `status`, `creator`, `created`, `updated`) VALUES (20017, '电动车交易17', 89880.00, '2023-01-28', '2023-01-30', '无备注', 17, '[{\"id\": 1, \"name\": \"电动车1\", \"type\": 1, \"unit\": \"台\", \"count\": 10, \"price\": 1498, \"total\": 14980}, {\"id\": 2, \"name\": \"电动车2\", \"type\": 1, \"unit\": \"台\", \"count\": 20, \"price\": 1498, \"total\": 29960}, {\"id\": 3, \"name\": \"电动车3\", \"type\": 1, \"unit\": \"台\", \"count\": 30, \"price\": 1498, \"total\": 44940}]', 1, 29, 1674900672, 0);
INSERT INTO `contract` (`id`, `name`, `amount`, `begin_time`, `over_time`, `remarks`, `cid`, `productlist`, `status`, `creator`, `created`, `updated`) VALUES (20018, '电动车交易18', 89880.00, '2023-01-28', '2023-01-30', '无备注', 18, '[{\"id\": 1, \"name\": \"电动车1\", \"type\": 1, \"unit\": \"台\", \"count\": 10, \"price\": 1498, \"total\": 14980}, {\"id\": 2, \"name\": \"电动车2\", \"type\": 1, \"unit\": \"台\", \"count\": 20, \"price\": 1498, \"total\": 29960}, {\"id\": 3, \"name\": \"电动车3\", \"type\": 1, \"unit\": \"台\", \"count\": 30, \"price\": 1498, \"total\": 44940}]', 1, 29, 1674900672, 0);
INSERT INTO `contract` (`id`, `name`, `amount`, `begin_time`, `over_time`, `remarks`, `cid`, `productlist`, `status`, `creator`, `created`, `updated`) VALUES (20019, '电动车交易19', 89880.00, '2023-01-28', '2023-01-30', '无备注', 19, '[{\"id\": 1, \"name\": \"电动车1\", \"type\": 1, \"unit\": \"台\", \"count\": 10, \"price\": 1498, \"total\": 14980}, {\"id\": 2, \"name\": \"电动车2\", \"type\": 1, \"unit\": \"台\", \"count\": 20, \"price\": 1498, \"total\": 29960}, {\"id\": 3, \"name\": \"电动车3\", \"type\": 1, \"unit\": \"台\", \"count\": 30, \"price\": 1498, \"total\": 44940}]', 2, 29, 1674900672, 0);
INSERT INTO `contract` (`id`, `name`, `amount`, `begin_time`, `over_time`, `remarks`, `cid`, `productlist`, `status`, `creator`, `created`, `updated`) VALUES (20020, '电动车交易20', 89880.00, '2023-01-28', '2023-01-30', '无备注', 20, '[{\"id\": 1, \"name\": \"电动车1\", \"type\": 1, \"unit\": \"台\", \"count\": 10, \"price\": 1498, \"total\": 14980}, {\"id\": 2, \"name\": \"电动车2\", \"type\": 1, \"unit\": \"台\", \"count\": 20, \"price\": 1498, \"total\": 29960}, {\"id\": 3, \"name\": \"电动车3\", \"type\": 1, \"unit\": \"台\", \"count\": 30, \"price\": 1498, \"total\": 44940}]', 1, 29, 1674900672, 0);
INSERT INTO `contract` (`id`, `name`, `amount`, `begin_time`, `over_time`, `remarks`, `cid`, `productlist`, `status`, `creator`, `created`, `updated`) VALUES (20021, '电动车交易21', 89880.00, '2023-01-28', '2023-01-30', '无备注', 21, '[{\"id\": 1, \"name\": \"电动车1\", \"type\": 1, \"unit\": \"台\", \"count\": 10, \"price\": 1498, \"total\": 14980}, {\"id\": 2, \"name\": \"电动车2\", \"type\": 1, \"unit\": \"台\", \"count\": 20, \"price\": 1498, \"total\": 29960}, {\"id\": 3, \"name\": \"电动车3\", \"type\": 1, \"unit\": \"台\", \"count\": 30, \"price\": 1498, \"total\": 44940}]', 2, 29, 1674900672, 0);
INSERT INTO `contract` (`id`, `name`, `amount`, `begin_time`, `over_time`, `remarks`, `cid`, `productlist`, `status`, `creator`, `created`, `updated`) VALUES (20022, '电动车交易22', 89880.00, '2023-01-28', '2023-01-30', '无备注', 22, '[{\"id\": 1, \"name\": \"电动车1\", \"type\": 1, \"unit\": \"台\", \"count\": 10, \"price\": 1498, \"total\": 14980}, {\"id\": 2, \"name\": \"电动车2\", \"type\": 1, \"unit\": \"台\", \"count\": 20, \"price\": 1498, \"total\": 29960}, {\"id\": 3, \"name\": \"电动车3\", \"type\": 1, \"unit\": \"台\", \"count\": 30, \"price\": 1498, \"total\": 44940}]', 2, 29, 1674900672, 0);
INSERT INTO `contract` (`id`, `name`, `amount`, `begin_time`, `over_time`, `remarks`, `cid`, `productlist`, `status`, `creator`, `created`, `updated`) VALUES (20023, '电动车交易23', 89880.00, '2023-01-28', '2023-01-30', '无备注', 23, '[{\"id\": 1, \"name\": \"电动车1\", \"type\": 1, \"unit\": \"台\", \"count\": 10, \"price\": 1498, \"total\": 14980}, {\"id\": 2, \"name\": \"电动车2\", \"type\": 1, \"unit\": \"台\", \"count\": 20, \"price\": 1498, \"total\": 29960}, {\"id\": 3, \"name\": \"电动车3\", \"type\": 1, \"unit\": \"台\", \"count\": 30, \"price\": 1498, \"total\": 44940}]', 2, 29, 1674900672, 0);
INSERT INTO `contract` (`id`, `name`, `amount`, `begin_time`, `over_time`, `remarks`, `cid`, `productlist`, `status`, `creator`, `created`, `updated`) VALUES (20024, '电动车交易24', 89880.00, '2023-01-28', '2023-01-30', '无备注', 24, '[{\"id\": 1, \"name\": \"电动车1\", \"type\": 1, \"unit\": \"台\", \"count\": 10, \"price\": 1498, \"total\": 14980}, {\"id\": 2, \"name\": \"电动车2\", \"type\": 1, \"unit\": \"台\", \"count\": 20, \"price\": 1498, \"total\": 29960}, {\"id\": 3, \"name\": \"电动车3\", \"type\": 1, \"unit\": \"台\", \"count\": 30, \"price\": 1498, \"total\": 44940}]', 1, 29, 1674900672, 0);
INSERT INTO `contract` (`id`, `name`, `amount`, `begin_time`, `over_time`, `remarks`, `cid`, `productlist`, `status`, `creator`, `created`, `updated`) VALUES (20025, '电动车交易25', 89880.00, '2023-01-28', '2023-01-30', '无备注', 25, '[{\"id\": 1, \"name\": \"电动车1\", \"type\": 1, \"unit\": \"台\", \"count\": 10, \"price\": 1498, \"total\": 14980}, {\"id\": 2, \"name\": \"电动车2\", \"type\": 1, \"unit\": \"台\", \"count\": 20, \"price\": 1498, \"total\": 29960}, {\"id\": 3, \"name\": \"电动车3\", \"type\": 1, \"unit\": \"台\", \"count\": 30, \"price\": 1498, \"total\": 44940}]', 1, 29, 1674900672, 0);
COMMIT;
-- ----------------------------
-- Table structure for customer
-- ----------------------------
DROP TABLE IF EXISTS `customer`;
CREATE TABLE `customer` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '编号',
`name` varchar(50) DEFAULT NULL COMMENT '名称',
`source` char(15) DEFAULT NULL COMMENT '来源',
`phone` char(12) DEFAULT NULL COMMENT '手机号',
`email` char(20) DEFAULT NULL COMMENT '邮箱',
`industry` char(30) DEFAULT NULL COMMENT '所在行业',
`level` char(10) DEFAULT NULL COMMENT '级别',
`remarks` varchar(200) NOT NULL COMMENT '备注',
`region` char(80) DEFAULT NULL COMMENT '地区',
`address` varchar(255) DEFAULT NULL COMMENT '详细地址',
`status` tinyint DEFAULT NULL COMMENT '成交状态',
`creator` bigint DEFAULT NULL COMMENT '创建人',
`created` bigint DEFAULT NULL COMMENT '创建时间',
`updated` bigint DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`),
KEY `idx_creator` (`creator`)
) ENGINE=InnoDB AUTO_INCREMENT=67 DEFAULT CHARSET=utf8mb3;
-- ----------------------------
-- Records of customer
-- ----------------------------
BEGIN;
INSERT INTO `customer` (`id`, `name`, `source`, `phone`, `email`, `industry`, `level`, `remarks`, `region`, `address`, `status`, `creator`, `created`, `updated`) VALUES (1, '北京文化有限公司1', '电话咨询', '13050803360', 'bjwenhua@gmail.com', '金融业', '重点客户', '', '北京市,朝阳区', '望京东园615号', 1, 29, 1674899545, 0);
INSERT INTO `customer` (`id`, `name`, `source`, `phone`, `email`, `industry`, `level`, `remarks`, `region`, `address`, `status`, `creator`, `created`, `updated`) VALUES (2, '北京文化有限公司2', '线上注册', '13050803360', 'bjwenhua@gmail.com', '金融业', '重点客户', '', '北京市,朝阳区', '望京东园615号', 1, 29, 1674899545, 1674899808);
INSERT INTO `customer` (`id`, `name`, `source`, `phone`, `email`, `industry`, `level`, `remarks`, `region`, `address`, `status`, `creator`, `created`, `updated`) VALUES (3, '北京文化有限公司3', '电话咨询', '13050803360', 'bjwenhua@gmail.com', '金融业', '重点客户', '', '北京市,朝阳区', '望京东园615号', 1, 29, 1674899545, 0);
INSERT INTO `customer` (`id`, `name`, `source`, `phone`, `email`, `industry`, `level`, `remarks`, `region`, `address`, `status`, `creator`, `created`, `updated`) VALUES (4, '北京文化有限公司4', '电话咨询', '13050803360', 'bjwenhua@gmail.com', '互联网', '普通客户', '', '北京市,朝阳区', '望京东园615号', 1, 29, 1674899545, 1674900143);
INSERT INTO `customer` (`id`, `name`, `source`, `phone`, `email`, `industry`, `level`, `remarks`, `region`, `address`, `status`, `creator`, `created`, `updated`) VALUES (5, '北京文化有限公司5', '电话咨询', '13050803360', 'bjwenhua@gmail.com', '金融业', '重点客户', '', '北京市,朝阳区', '望京东园615号', 1, 29, 1674899545, 0);
INSERT INTO `customer` (`id`, `name`, `source`, `phone`, `email`, `industry`, `level`, `remarks`, `region`, `address`, `status`, `creator`, `created`, `updated`) VALUES (6, '北京文化有限公司6', '电话咨询', '13050803360', 'bjwenhua@gmail.com', '金融业', '重点客户', '', '北京市,朝阳区', '望京东园615号', 2, 29, 1674899545, 0);
INSERT INTO `customer` (`id`, `name`, `source`, `phone`, `email`, `industry`, `level`, `remarks`, `region`, `address`, `status`, `creator`, `created`, `updated`) VALUES (7, '北京文化有限公司7', '搜索引擎', '13050803360', 'bjwenhua@gmail.com', '金融业', '重点客户', '', '北京市,朝阳区', '望京东园615号', 2, 29, 1674899545, 1674900036);
INSERT INTO `customer` (`id`, `name`, `source`, `phone`, `email`, `industry`, `level`, `remarks`, `region`, `address`, `status`, `creator`, `created`, `updated`) VALUES (8, '北京文化有限公司8', '电话咨询', '13050803360', 'bjwenhua@gmail.com', '互联网', '非优先客户', '', '北京市,朝阳区', '望京东园615号', 2, 29, 1674899545, 1674899824);
INSERT INTO `customer` (`id`, `name`, `source`, `phone`, `email`, `industry`, `level`, `remarks`, `region`, `address`, `status`, `creator`, `created`, `updated`) VALUES (9, '北京文化有限公司9', '电话咨询', '13050803360', 'bjwenhua@gmail.com', '金融业', '重点客户', '', '北京市,朝阳区', '望京东园615号', 1, 29, 1674899545, 0);
INSERT INTO `customer` (`id`, `name`, `source`, `phone`, `email`, `industry`, `level`, `remarks`, `region`, `address`, `status`, `creator`, `created`, `updated`) VALUES (10, '北京文化有限公司10', '电话咨询', '13050803360', 'bjwenhua@gmail.com', '文化传媒', '重点客户', '', '北京市,朝阳区', '望京东园615号', 1, 29, 1674899545, 1674899838);
INSERT INTO `customer` (`id`, `name`, `source`, `phone`, `email`, `industry`, `level`, `remarks`, `region`, `address`, `status`, `creator`, `created`, `updated`) VALUES (11, '北京文化有限公司11', '促销', '13050803360', 'bjwenhua@gmail.com', '互联网', '非优先客户', '', '北京市,朝阳区', '望京东园615号', 1, 29, 1674899545, 1674900100);
INSERT INTO `customer` (`id`, `name`, `source`, `phone`, `email`, `industry`, `level`, `remarks`, `region`, `address`, `status`, `creator`, `created`, `updated`) VALUES (12, '北京文化有限公司12', '电话咨询', '13050803360', 'bjwenhua@gmail.com', '金融业', '重点客户', '', '北京市,朝阳区', '望京东园615号', 2, 29, 1674899545, 0);
INSERT INTO `customer` (`id`, `name`, `source`, `phone`, `email`, `industry`, `level`, `remarks`, `region`, `address`, `status`, `creator`, `created`, `updated`) VALUES (13, '北京文化有限公司13', '电话咨询', '13050803360', 'bjwenhua@gmail.com', '金融业', '重点客户', '', '北京市,朝阳区', '望京东园615号', 1, 29, 1674899545, 0);
INSERT INTO `customer` (`id`, `name`, `source`, `phone`, `email`, `industry`, `level`, `remarks`, `region`, `address`, `status`, `creator`, `created`, `updated`) VALUES (14, '北京文化有限公司14', '邮件咨询', '13050803360', 'bjwenhua@gmail.com', '文化传媒', '非优先客户', '', '北京市,朝阳区', '望京东园615号', 1, 29, 1674899545, 1674899962);
INSERT INTO `customer` (`id`, `name`, `source`, `phone`, `email`, `industry`, `level`, `remarks`, `region`, `address`, `status`, `creator`, `created`, `updated`) VALUES (15, '北京文化有限公司15', '电话咨询', '13050803360', 'bjwenhua@gmail.com', '金融业', '重点客户', '', '北京市,朝阳区', '望京东园615号', 2, 29, 1674899545, 0);
INSERT INTO `customer` (`id`, `name`, `source`, `phone`, `email`, `industry`, `level`, `remarks`, `region`, `address`, `status`, `creator`, `created`, `updated`) VALUES (16, '北京文化有限公司16', '电话咨询', '13050803360', 'bjwenhua@gmail.com', '金融业', '重点客户', '', '北京市,朝阳区', '望京东园615号', 1, 29, 1674899545, 0);
INSERT INTO `customer` (`id`, `name`, `source`, `phone`, `email`, `industry`, `level`, `remarks`, `region`, `address`, `status`, `creator`, `created`, `updated`) VALUES (17, '北京文化有限公司17', '转介绍', '13050803360', 'bjwenhua@gmail.com', '文化传媒', '非优先客户', '', '北京市,朝阳区', '望京东园615号', 2, 29, 1674899545, 1674900109);
INSERT INTO `customer` (`id`, `name`, `source`, `phone`, `email`, `industry`, `level`, `remarks`, `region`, `address`, `status`, `creator`, `created`, `updated`) VALUES (18, '北京文化有限公司18', '电话咨询', '13050803360', 'bjwenhua@gmail.com', '金融业', '重点客户', '', '北京市,朝阳区', '望京东园615号', 2, 29, 1674899545, 0);
INSERT INTO `customer` (`id`, `name`, `source`, `phone`, `email`, `industry`, `level`, `remarks`, `region`, `address`, `status`, `creator`, `created`, `updated`) VALUES (19, '北京文化有限公司19', '线上注册', '13050803360', 'bjwenhua@gmail.com', '政府', '普通客户', '', '北京市,朝阳区', '望京东园615号', 1, 29, 1674899545, 1674900124);
INSERT INTO `customer` (`id`, `name`, `source`, `phone`, `email`, `industry`, `level`, `remarks`, `region`, `address`, `status`, `creator`, `created`, `updated`) VALUES (20, '北京文化有限公司20', '电话咨询', '13050803360', 'bjwenhua@gmail.com', '金融业', '重点客户', '', '北京市,朝阳区', '望京东园615号', 2, 29, 1674899545, 0);
INSERT INTO `customer` (`id`, `name`, `source`, `phone`, `email`, `industry`, `level`, `remarks`, `region`, `address`, `status`, `creator`, `created`, `updated`) VALUES (21, '北京文化有限公司21', '电话咨询', '13050803360', 'bjwenhua@gmail.com', '物流运输', '普通客户', '', '北京市,朝阳区', '望京东园615号', 1, 29, 1674899545, 1674899902);
INSERT INTO `customer` (`id`, `name`, `source`, `phone`, `email`, `industry`, `level`, `remarks`, `region`, `address`, `status`, `creator`, `created`, `updated`) VALUES (22, '北京文化有限公司22', '电话咨询', '13050803360', 'bjwenhua@gmail.com', '金融业', '重点客户', '', '北京市,朝阳区', '望京东园615号', 1, 29, 1674899545, 0);
INSERT INTO `customer` (`id`, `name`, `source`, `phone`, `email`, `industry`, `level`, `remarks`, `region`, `address`, `status`, `creator`, `created`, `updated`) VALUES (23, '北京文化有限公司23', '电话咨询', '13050803360', 'bjwenhua@gmail.com', '金融业', '重点客户', '', '北京市,朝阳区', '望京东园615号', 2, 29, 1674899545, 0);
INSERT INTO `customer` (`id`, `name`, `source`, `phone`, `email`, `industry`, `level`, `remarks`, `region`, `address`, `status`, `creator`, `created`, `updated`) VALUES (24, '北京文化有限公司24', '电话咨询', '13050803360', 'bjwenhua@gmail.com', '房地产', '重点客户', '', '北京市,朝阳区', '望京东园615号', 1, 29, 1674899545, 1674899914);
INSERT INTO `customer` (`id`, `name`, `source`, `phone`, `email`, `industry`, `level`, `remarks`, `region`, `address`, `status`, `creator`, `created`, `updated`) VALUES (25, '北京文化有限公司25', '电话咨询', '13050803360', 'bjwenhua@gmail.com', '金融业', '重点客户', '', '北京市,朝阳区', '望京东园615号', 1, 29, 1674899545, 0);
COMMIT;
-- ----------------------------
-- Table structure for mail_config
-- ----------------------------
DROP TABLE IF EXISTS `mail_config`;
CREATE TABLE `mail_config` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '编号',
`stmp` char(50) DEFAULT NULL COMMENT 'ip地址或域名',
`port` int DEFAULT NULL COMMENT '端口号',
`auth_code` char(80) DEFAULT NULL COMMENT '授权码',
`email` char(80) NOT NULL COMMENT '邮箱账号',
`status` tinyint DEFAULT NULL COMMENT '服务状态',
`creator` bigint DEFAULT NULL COMMENT '创建人',
`created` bigint DEFAULT NULL COMMENT '创建时间',
`updated` bigint DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`),
KEY `idx_creator` (`creator`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb3;
-- ----------------------------
-- Records of mail_config
-- ----------------------------
BEGIN;
INSERT INTO `mail_config` (`id`, `stmp`, `port`, `auth_code`, `email`, `status`, `creator`, `created`, `updated`) VALUES (11, 'smtp.qq.com', 465, 'zrzxsebacrpfdaeg', '200300666@qq.com', 2, 29, 1674901189, 1674901237);
COMMIT;
-- ----------------------------
-- Table structure for notice
-- ----------------------------
DROP TABLE IF EXISTS `notice`;
CREATE TABLE `notice` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '编号',
`content` varchar(200) DEFAULT NULL COMMENT '通知内容',
`status` tinyint DEFAULT NULL COMMENT '状态,1-已读,2-未读',
`creator` bigint DEFAULT NULL COMMENT '创建者',
`created` bigint DEFAULT NULL COMMENT '创建时间',
`updated` bigint DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`),
KEY `idx_creator` (`creator`)
) ENGINE=InnoDB AUTO_INCREMENT=154 DEFAULT CHARSET=utf8mb3;
-- ----------------------------
-- Records of notice
-- ----------------------------
BEGIN;
INSERT INTO `notice` (`id`, `content`, `status`, `creator`, `created`, `updated`) VALUES (133, '你订阅了专业版', 2, 0, 1674803772, 0);
INSERT INTO `notice` (`id`, `content`, `status`, `creator`, `created`, `updated`) VALUES (142, '你登录了账号', 2, 29, 1674819114, 0);
INSERT INTO `notice` (`id`, `content`, `status`, `creator`, `created`, `updated`) VALUES (143, '你登录了账号', 2, 29, 1674821501, 0);
INSERT INTO `notice` (`id`, `content`, `status`, `creator`, `created`, `updated`) VALUES (144, '你登录了账号', 2, 29, 1674821522, 0);
INSERT INTO `notice` (`id`, `content`, `status`, `creator`, `created`, `updated`) VALUES (145, '你登录了账号', 2, 29, 1674821570, 0);
INSERT INTO `notice` (`id`, `content`, `status`, `creator`, `created`, `updated`) VALUES (146, '你登录了账号', 2, 29, 1674821584, 0);
INSERT INTO `notice` (`id`, `content`, `status`, `creator`, `created`, `updated`) VALUES (147, '你登录了账号', 2, 29, 1674821635, 0);
INSERT INTO `notice` (`id`, `content`, `status`, `creator`, `created`, `updated`) VALUES (148, '你登录了账号', 2, 29, 1674821669, 0);
INSERT INTO `notice` (`id`, `content`, `status`, `creator`, `created`, `updated`) VALUES (149, '你登录了账号', 2, 29, 1674872716, 0);
INSERT INTO `notice` (`id`, `content`, `status`, `creator`, `created`, `updated`) VALUES (150, '你登录了账号', 2, 29, 1674872767, 0);
INSERT INTO `notice` (`id`, `content`, `status`, `creator`, `created`, `updated`) VALUES (151, '你登录了账号', 2, 29, 1674874711, 0);
INSERT INTO `notice` (`id`, `content`, `status`, `creator`, `created`, `updated`) VALUES (152, '你登录了账号', 2, 29, 1674899094, 0);
INSERT INTO `notice` (`id`, `content`, `status`, `creator`, `created`, `updated`) VALUES (153, '你登录了账号', 2, 29, 1674904112, 0);
COMMIT;
-- ----------------------------
-- Table structure for product
-- ----------------------------
DROP TABLE IF EXISTS `product`;
CREATE TABLE `product` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '编号',
`name` varchar(50) DEFAULT NULL COMMENT '名称',
`type` tinyint(1) DEFAULT NULL COMMENT '类型',
`unit` char(5) DEFAULT NULL COMMENT '单位',
`code` varchar(80) DEFAULT NULL COMMENT '编码',
`price` decimal(10,2) DEFAULT NULL COMMENT '价格',
`description` varchar(200) DEFAULT NULL COMMENT '描述',
`status` tinyint(1) DEFAULT NULL COMMENT '状态,1-上架,2-下架',
`creator` bigint DEFAULT NULL COMMENT '创建人',
`created` bigint DEFAULT NULL COMMENT '创建时间',
`updated` bigint DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`),
KEY `idx_creator` (`creator`)
) ENGINE=InnoDB AUTO_INCREMENT=102 DEFAULT CHARSET=utf8mb3;
-- ----------------------------
-- Records of product
-- ----------------------------
BEGIN;
INSERT INTO `product` (`id`, `name`, `type`, `unit`, `code`, `price`, `description`, `status`, `creator`, `created`, `updated`) VALUES (1, '电动车1', 1, '台', '004', 1498.00, '代驾折叠电动车电动自行车成人代步外卖锂电池小型轻便电瓶车迷你便携电单车 G2/汽车电芯-能量回收-6Ah约60km', 1, 29, 1671191995, 0);
INSERT INTO `product` (`id`, `name`, `type`, `unit`, `code`, `price`, `description`, `status`, `creator`, `created`, `updated`) VALUES (2, '电动车2', 1, '台', '004', 1498.00, '代驾折叠电动车电动自行车成人代步外卖锂电池小型轻便电瓶车迷你便携电单车 G2/汽车电芯-能量回收-6Ah约60km', 1, 29, 1671191995, 0);
INSERT INTO `product` (`id`, `name`, `type`, `unit`, `code`, `price`, `description`, `status`, `creator`, `created`, `updated`) VALUES (3, '电动车3', 1, '台', '004', 1498.00, '代驾折叠电动车电动自行车成人代步外卖锂电池小型轻便电瓶车迷你便携电单车 G2/汽车电芯-能量回收-6Ah约60km', 2, 29, 1671191995, 0);
INSERT INTO `product` (`id`, `name`, `type`, `unit`, `code`, `price`, `description`, `status`, `creator`, `created`, `updated`) VALUES (4, '电动车4', 1, '台', '004', 1498.00, '代驾折叠电动车电动自行车成人代步外卖锂电池小型轻便电瓶车迷你便携电单车 G2/汽车电芯-能量回收-6Ah约60km', 2, 29, 1671191995, 0);
INSERT INTO `product` (`id`, `name`, `type`, `unit`, `code`, `price`, `description`, `status`, `creator`, `created`, `updated`) VALUES (5, '电动车5', 1, '台', '004', 1498.00, '代驾折叠电动车电动自行车成人代步外卖锂电池小型轻便电瓶车迷你便携电单车 G2/汽车电芯-能量回收-6Ah约60km', 1, 29, 1671191995, 0);
INSERT INTO `product` (`id`, `name`, `type`, `unit`, `code`, `price`, `description`, `status`, `creator`, `created`, `updated`) VALUES (6, '电动车6', 1, '台', '004', 1498.00, '代驾折叠电动车电动自行车成人代步外卖锂电池小型轻便电瓶车迷你便携电单车 G2/汽车电芯-能量回收-6Ah约60km', 1, 29, 1671191995, 0);
COMMIT;
-- ----------------------------
-- Table structure for subscribe
-- ----------------------------
DROP TABLE IF EXISTS `subscribe`;
CREATE TABLE `subscribe` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '编号',
`uid` bigint DEFAULT NULL COMMENT '用户编号',
`version` tinyint DEFAULT NULL COMMENT '版本,1-免费版,2-专业版,3-高级版',
`expired` bigint DEFAULT NULL COMMENT '到期时间',
`created` bigint DEFAULT NULL COMMENT '创建时间',
`updated` bigint DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`),
KEY `idx_uid` (`uid`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb3;
-- ----------------------------
-- Records of subscribe
-- ----------------------------
BEGIN;
INSERT INTO `subscribe` (`id`, `uid`, `version`, `expired`, `created`, `updated`) VALUES (4, 29, 2, 1701895772, 1674803772, 0);
COMMIT;
-- ----------------------------
-- Table structure for user
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '编号',
`email` char(30) DEFAULT NULL COMMENT '邮箱',
`password` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '密码',
`name` char(10) DEFAULT NULL COMMENT '名称',
`status` tinyint DEFAULT '1' COMMENT '状态,1-正常,2-注销',
`created` bigint DEFAULT NULL COMMENT '创建时间',
`updated` bigint DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=utf8mb3;
-- ----------------------------
-- Records of user
-- ----------------------------
BEGIN;
INSERT INTO `user` (`id`, `email`, `password`, `name`, `status`, `created`, `updated`) VALUES (29, '1655064994@qq.com', '$2a$10$62yO.fxSfNlstacxZfTtdO2uuR9YKG6hykuVTBIMc06CEJ3BWW/Ny', '', 1, 1671191625, 0);
COMMIT;
SET FOREIGN_KEY_CHECKS = 1;
================================================
FILE: server/global/global.go
================================================
package global
import (
"crm/config"
"github.com/go-pay/gopay/alipay"
"github.com/go-redis/redis/v9"
"gorm.io/gorm"
)
var (
Config config.Config
Db *gorm.DB
Rdb *redis.Client
Alipay *alipay.Client
)
================================================
FILE: server/go.mod
================================================
module crm
go 1.19
require (
github.com/gin-gonic/gin v1.8.1
github.com/go-pay/gopay v1.5.88
github.com/go-redis/redis/v9 v9.0.0-rc.1
github.com/golang-jwt/jwt/v4 v4.4.2
github.com/onsi/ginkgo v1.16.5
github.com/spf13/viper v1.13.0
github.com/xuri/excelize/v2 v2.6.1
gorm.io/driver/mysql v1.4.3
gorm.io/gorm v1.24.1
)
require (
github.com/gofrs/uuid v4.4.0+incompatible // indirect
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect
github.com/richardlehane/mscfb v1.0.4 // indirect
github.com/richardlehane/msoleps v1.0.3 // indirect
github.com/xuri/efp v0.0.0-20220603152613-6918739fd470 // indirect
github.com/xuri/nfp v0.0.0-20220409054826-5e722a1d9e22 // indirect
)
require (
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
github.com/fsnotify/fsnotify v1.5.4 // indirect
github.com/gin-contrib/sse v0.1.0 // indirect
github.com/go-playground/locales v0.14.0 // indirect
github.com/go-playground/universal-translator v0.18.0 // indirect
github.com/go-playground/validator/v10 v10.11.1 // indirect
github.com/go-sql-driver/mysql v1.6.0 // indirect
github.com/goccy/go-json v0.9.11 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/jinzhu/inflection v1.0.0 // indirect
github.com/jinzhu/now v1.1.5 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/leodido/go-urn v1.2.1 // indirect
github.com/magiconair/properties v1.8.6 // indirect
github.com/mattn/go-isatty v0.0.16 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/pelletier/go-toml/v2 v2.0.5 // indirect
github.com/spf13/afero v1.8.2 // indirect
github.com/spf13/cast v1.5.0 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/subosito/gotenv v1.4.1 // indirect
github.com/ugorji/go/codec v1.2.7 // indirect
golang.org/x/crypto v0.4.0
golang.org/x/net v0.3.0 // indirect
golang.org/x/sys v0.3.0 // indirect
golang.org/x/text v0.5.0 // indirect
google.golang.org/protobuf v1.28.1 // indirect
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect
gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
================================================
FILE: server/go.sum
================================================
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU=
cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU=
cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY=
cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY=
cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc=
cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0=
cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To=
cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4=
cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M=
cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc=
cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk=
cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs=
cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc=
cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY=
cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI=
cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk=
cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY=
cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o=
cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE=
cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc=
cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg=
cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc=
cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ=
cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE=
cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk=
cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I=
cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw=
cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA=
cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU=
cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw=
cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos=
cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk=
cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs=
cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0=
cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo=
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE=
github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po=
github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI=
github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU=
github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE=
github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI=
github.com/gin-gonic/gin v1.8.1 h1:4+fr/el88TOO3ewCmQr8cx/CtZ/umlIRIs5M4NTNjf8=
github.com/gin-gonic/gin v1.8.1/go.mod h1:ji8BvRH1azfM+SYow9zQ6SZMvR8qOMZHmsCuWR9tTTk=
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
github.com/go-pay/gopay v1.5.88 h1:I31a8OtzlzuuYQM3KYx5OoH1TCBgqJi+6eHVUtYlVkQ=
github.com/go-pay/gopay v1.5.88/go.mod h1:nBkvAhqQ07jpBGvqGYOu2EiUVEJX+afchNPqhOcicPs=
github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A=
github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
github.com/go-playground/locales v0.14.0 h1:u50s323jtVGugKlcYeyzC0etD1HifMjqmJqb8WugfUU=
github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs=
github.com/go-playground/universal-translator v0.18.0 h1:82dyy6p4OuJq4/CByFNOn/jYrnRPArHwAcmLoJZxyho=
github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA=
github.com/go-playground/validator/v10 v10.11.1 h1:prmOlTVv+YjZjmRmNSF3VmspqJIxJWXmqUsHwfTRRkQ=
github.com/go-playground/validator/v10 v10.11.1/go.mod h1:i+3WkQ1FvaUjjxh1kSvIA4dMGDBiPU55YFDl0WbKdWU=
github.com/go-redis/redis/v9 v9.0.0-rc.1 h1:/+bS+yeUnanqAbuD3QwlejzQZ+4eqgfUtFTG4b+QnXs=
github.com/go-redis/redis/v9 v9.0.0-rc.1/go.mod h1:8et+z03j0l8N+DvsVnclzjf3Dl/pFHgRk+2Ct1qw66A=
github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE=
github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
github.com/goccy/go-json v0.9.11 h1:/pAaQDLHEoCq/5FFmSKBswWmK6H0e8g4159Kc/X/nqk=
github.com/goccy/go-json v0.9.11/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
github.com/gofrs/uuid v4.4.0+incompatible h1:3qXRTX8/NbyulANqlc0lchS1gqAVxRgsuW1YrTJupqA=
github.com/gofrs/uuid v4.4.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
github.com/golang-jwt/jwt/v4 v4.4.2 h1:rcc4lwaZgFMCZ5jxF9ABolDcIHdBytAFgqFPbSJQAYs=
github.com/golang-jwt/jwt/v4 v4.4.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y=
github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk=
github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g=
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E=
github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc=
github.com/jinzhu/now v1.1.4/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ=
github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0=
github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w=
github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY=
github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo=
github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60=
github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ=
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 h1:RWengNIwukTxcDr9M+97sNutRR1RKhG96O6jWumTTnw=
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8=
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU=
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
github.com/onsi/gomega v1.21.1 h1:OB/euWYIExnPBohllTicTHmGTrMaqJ67nIu80j0/uEM=
github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8=
github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c=
github.com/pelletier/go-toml/v2 v2.0.5 h1:ipoSadvV8oGUjnUbMub59IDPPwfxF694nG/jwbMiyQg=
github.com/pelletier/go-toml/v2 v2.0.5/go.mod h1:OMHamSCAODeSsVrwwvcJOaoN0LIUIaFVNZzmWyNfXas=
github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
github.com/richardlehane/mscfb v1.0.4 h1:WULscsljNPConisD5hR0+OyZjwK46Pfyr6mPu5ZawpM=
github.com/richardlehane/mscfb v1.0.4/go.mod h1:YzVpcZg9czvAuhk9T+a3avCpcFPMUWm7gK3DypaEsUk=
github.com/richardlehane/msoleps v1.0.1/go.mod h1:BWev5JBpU9Ko2WAgmZEuiz4/u3ZYTKbjLycmwiWUfWg=
github.com/richardlehane/msoleps v1.0.3 h1:aznSZzrwYRl3rLKRT3gUk9am7T/mLNSnJINvN0AQoVM=
github.com/richardlehane/msoleps v1.0.3/go.mod h1:BWev5JBpU9Ko2WAgmZEuiz4/u3ZYTKbjLycmwiWUfWg=
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
github.com/rogpeppe/go-internal v1.8.0 h1:FCbCCtXNOY3UtUuHUYaghJg4y7Fd14rXifAYUAtL9R8=
github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE=
github.com/spf13/afero v1.8.2 h1:xehSyVa0YnHWsJ49JFljMpg1HX19V6NDZ1fkm1Xznbo=
github.com/spf13/afero v1.8.2/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo=
github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w=
github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU=
github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk=
github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo=
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/spf13/viper v1.13.0 h1:BWSJ/M+f+3nmdz9bxB+bWX28kkALN2ok11D0rSo8EJU=
github.com/spf13/viper v1.13.0/go.mod h1:Icm2xNL3/8uyh/wFuB1jI7TiTNKp8632Nwegu+zgdYw=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/subosito/gotenv v1.4.1 h1:jyEFiXpy21Wm81FBN71l9VoMMV8H8jG+qIK3GCpY6Qs=
github.com/subosito/gotenv v1.4.1/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0=
github.com/ugorji/go v1.2.7/go.mod h1:nF9osbDWLy6bDVv/Rtoh6QgnvNDpmCalQV5urGCCS6M=
github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0=
github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY=
github.com/xuri/efp v0.0.0-20220603152613-6918739fd470 h1:6932x8ltq1w4utjmfMPVj09jdMlkY0aiA6+Skbtl3/c=
github.com/xuri/efp v0.0.0-20220603152613-6918739fd470/go.mod h1:ybY/Jr0T0GTCnYjKqmdwxyxn2BQf2RcQIIvex5QldPI=
github.com/xuri/excelize/v2 v2.6.1 h1:ICBdtw803rmhLN3zfvyEGH3cwSmZv+kde7LhTDT659k=
github.com/xuri/excelize/v2 v2.6.1/go.mod h1:tL+0m6DNwSXj/sILHbQTYsLi9IF4TW59H2EF3Yrx1AU=
github.com/xuri/nfp v0.0.0-20220409054826-5e722a1d9e22 h1:OAmKAfT06//esDdpi/DZ8Qsdt4+M5+ltca05dA5bG2M=
github.com/xuri/nfp v0.0.0-20220409054826-5e722a1d9e22/go.mod h1:WwHg+CVyzlv/TX9xqBFXEZAuxOPxn2k1GNHwG41IIUQ=
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.0.0-20220817201139-bc19a97f63c8/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.4.0 h1:UVQgzMY87xqpKNgb+kDsll2Igd33HszWHFLmpaRMq/8=
golang.org/x/crypto v0.4.0/go.mod h1:3quD/ATkf6oY+rnes5c3ExXTbLc8mueNue5/DoinL80=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek=
golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY=
golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM=
golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU=
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
golang.org/x/image v0.0.0-20220413100746-70e8d0d3baa9 h1:LRtI4W37N+KFebI/qV0OFiLUv4GLOWeEW5hn/KEJvxE=
golang.org/x/image v0.0.0-20220413100746-70e8d0d3baa9/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM=
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs=
golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE=
golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o=
golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=
golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY=
golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.0.0-20220812174116-3211cb980234/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk=
golang.org/x/net v0.3.0 h1:VWL6FNY2bEEmsGVKabSlHu5Irp34xmMRoqb/9lF9lxk=
golang.org/x/net v0.3.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.3.0 h1:w8ZOecv6NaNa/zC8944JTU3vz4u6Lagfk4RPQxv92NQ=
golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.5.0 h1:OLmvp0KP+FVG99Ct/qFiL/Fhk4zp4QQnZ7b2U+5piUM=
golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw=
golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw=
golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8=
golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE=
golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M=
google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=
google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=
google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=
google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=
google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=
google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE=
google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE=
google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM=
google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc=
google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg=
google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE=
google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0=
google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8=
google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA=
google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U=
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA=
google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60=
google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk=
google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc=
google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8=
google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4=
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w=
google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc h1:2gGKlE2+asNV9m7xrywl36YYNnBG5ZQ0r/BOOxqPpmk=
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc/go.mod h1:m7x9LTH6d71AHyAX77c9yqWCCa3UKHcVEj9y7hAtKDk=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df h1:n7WqCuqOuCbNr617RXOY0AWRXxgwEyPp2z+p0+hgMuE=
gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df/go.mod h1:LRQQ+SO6ZHR7tOkpBDuZnXENFzX8qRjMDMyPD6BRkCw=
gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA=
gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gorm.io/driver/mysql v1.4.3 h1:/JhWJhO2v17d8hjApTltKNADm7K7YI2ogkR7avJUL3k=
gorm.io/driver/mysql v1.4.3/go.mod h1:sSIebwZAVPiT+27jK9HIwvsqOGKx3YMPmrA3mBJR10c=
gorm.io/gorm v1.23.8/go.mod h1:l2lP/RyAtc1ynaTjFksBde/O8v9oOGIApu2/xRitmZk=
gorm.io/gorm v1.24.1 h1:CgvzRniUdG67hBAzsxDGOAuq4Te1osVMYsa1eQbd4fs=
gorm.io/gorm v1.24.1/go.mod h1:DVrVomtaYTbqs7gB/x2uVvqnXzv0nqjB396B8cG4dBA=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
================================================
FILE: server/initialize/alipay.go
================================================
package initialize
import (
"crm/global"
"log"
"github.com/go-pay/gopay/alipay"
"github.com/go-pay/gopay/pkg/xlog"
)
func Alipay() {
pay := global.Config.Alipay
client, err := alipay.NewClient(pay.AppId, pay.PrivateKey, false)
if err != nil {
xlog.Error(err)
return
}
// 设置支付宝请求、公钥证书模式
client.SetReturnUrl(pay.ReturnURL).SetNotifyUrl(pay.NotifyURL)
err = client.SetCertSnByPath(pay.AppPublicCert, pay.AlipayRootCert, pay.AlipayPublicCert)
if err != nil {
log.Printf("init alipay cert error: %s", err)
return
}
global.Alipay = client
}
================================================
FILE: server/initialize/gorm.go
================================================
package initialize
import (
"crm/global"
"fmt"
"time"
"gorm.io/driver/mysql"
"gorm.io/gorm"
"gorm.io/gorm/schema"
)
// 初始化MySQl数据库
func Mysql() {
m := global.Config.Mysql
s := "%s:%s@tcp(%s:%v)/%s?charset=utf8&parseTime=True&loc=Local"
var dsn = fmt.Sprintf(s, m.Username, m.Password, m.Host, m.Port, m.Dbname)
db, err := gorm.Open(mysql.Open(dsn), &gorm.Config{
NamingStrategy: schema.NamingStrategy{SingularTable: true},
})
if err != nil {
fmt.Printf("mysql error: %s", err)
return
}
sqlDb, err := db.DB()
if err != nil {
fmt.Printf("mysql error: %s", err)
}
sqlDb.SetMaxIdleConns(m.MaxIdleConns)
sqlDb.SetMaxOpenConns(m.MaxOpenConns)
sqlDb.SetConnMaxLifetime(time.Duration(m.ConnMaxLifetime))
global.Db = db
}
================================================
FILE: server/initialize/load.go
================================================
package initialize
import (
"crm/global"
"fmt"
"github.com/spf13/viper"
)
// 加载配置文件
func LoadConfig() {
viper.AddConfigPath("./")
viper.SetConfigName("config")
viper.SetConfigType("yaml")
if err := viper.ReadInConfig(); err != nil {
fmt.Printf("Fatal error resources file: %s \n", err.Error())
}
if err := viper.Unmarshal(&global.Config); err != nil {
fmt.Printf("unable to decode into struct %s \n", err.Error())
}
}
================================================
FILE: server/initialize/redis.go
================================================
package initialize
import (
"crm/global"
"fmt"
"github.com/go-redis/redis/v9"
)
// 初始化Redis数据库
func Redis() {
r := global.Config.Redis
rdb := redis.NewClient(&redis.Options{
Addr: fmt.Sprintf("%s:%v", r.Host, r.Port),
Password: r.Password,
DB: r.Database,
})
global.Rdb = rdb
}
================================================
FILE: server/initialize/router.go
================================================
package initialize
import (
"crm/api"
"crm/global"
"crm/middleware"
"fmt"
"github.com/gin-gonic/gin"
)
func Router() {
engine := gin.Default()
// 开启跨域
engine.Use(middleware.Cors())
route := engine.Group("/api")
{
// 用户模块,订阅模块
route.GET("/user/verifycode", api.NewUserApi().GetVerifyCode)
route.GET("/user/info", api.NewUserApi().GetInfo)
route.POST("/user/login", api.NewUserApi().Login)
route.POST("/user/register", api.NewUserApi().Register)
route.POST("/user/pass", api.NewUserApi().ForgotPass)
route.DELETE("/user/delete", api.NewUserApi().Delete)
route.POST("/subscribe/payback", api.NewSubscribeApi().PayBack)
// 通用接口
route.POST("/common/database/init", api.NewCommonApi().InitDatabase)
route.POST("/common/file/upload", api.NewCommonApi().FileUpload)
route.DELETE("/common/file/remove", api.NewCommonApi().FileRemove)
// Jwt中间件
route.Use(middleware.JwtAuth())
// 客户模块
route.GET("/customer/list", api.NewCustomerApi().GetList)
route.GET("/customer/info", api.NewCustomerApi().GetInfo)
route.GET("/customer/option", api.NewCustomerApi().GetOption)
route.GET("/customer/export", api.NewCustomerApi().Export)
route.POST("/customer/create", api.NewCustomerApi().Create)
route.POST("/customer/send", api.NewCustomerApi().SendMail)
route.PUT("/customer/update", api.NewCustomerApi().Update)
route.DELETE("/customer/delete", api.NewCustomerApi().Delete)
// 合同模块
route.GET("/contract/list", api.NewContractApi().GetList)
route.GET("/contract/info", api.NewContractApi().GetInfo)
route.GET("/contract/export", api.NewContractApi().Export)
route.POST("/contract/plist", api.NewContractApi().GetProductList)
route.PUT("/contract/update", api.NewContractApi().Update)
route.POST("/contract/create", api.NewContractApi().Create)
route.DELETE("/contract/delete", api.NewContractApi().Delete)
// 产品模块
route.GET("/product/list", api.NewProductApi().GetList)
route.GET("/product/info", api.NewProductApi().GetInfo)
route.GET("/product/export", api.NewProductApi().Export)
route.POST("/product/create", api.NewProductApi().Create)
route.PUT("/product/update", api.NewProductApi().Update)
route.DELETE("/product/delete", api.NewProductApi().Delete)
// 仪表盘模块
route.GET("/dashboard/sum", api.NewDashboardApi().Summary)
// 配置模块
route.GET("/config/info", api.NewMailConfigApi().GetInfo)
route.GET("/config/check", api.NewMailConfigApi().Check)
route.PUT("/config/save", api.NewMailConfigApi().Save)
route.PUT("/config/status", api.NewMailConfigApi().UpdateStatus)
route.DELETE("/config/delete", api.NewMailConfigApi().Delete)
// 订阅模块
route.GET("/subscribe/info", api.NewSubscribeApi().GetInfo)
route.POST("/subscribe/pay", api.NewSubscribeApi().Pay)
// 通知模块
route.GET("/notice/list", api.NewNoticeApi().GetList)
route.GET("/notice/count", api.NewNoticeApi().GetUnReadCount)
route.PUT("/notice/update", api.NewNoticeApi().Update)
route.DELETE("/notice/delete", api.NewNoticeApi().Delete)
}
// 启动、监听端口
_ = engine.Run(fmt.Sprintf(":%v", global.Config.Server.Port))
}
================================================
FILE: server/initialize/run.go
================================================
package initialize
func Run() {
LoadConfig()
Mysql()
Redis()
Alipay()
Router()
}
================================================
FILE: server/main.go
================================================
package main
import "crm/initialize"
func main() {
initialize.Run()
}
================================================
FILE: server/middleware/cors.go
================================================
package middleware
import (
"net/http"
"github.com/gin-gonic/gin"
)
// Cors 处理跨域请求
func Cors() gin.HandlerFunc {
return func(c *gin.Context) {
method := c.Request.Method
origin := c.Request.Header.Get("Origin")
c.Header("Access-Control-Allow-Origin", origin)
c.Header("Access-Control-Allow-Headers", "Content-Type,AccessToken,X-CSRF-Token, Authorization, Token,X-Token,X-User-Id, Uid, Ver")
c.Header("Access-Control-Allow-Methods", "POST, GET, OPTIONS,DELETE,PUT")
c.Header("Access-Control-Expose-Headers", "Content-Length, Access-Control-Allow-Origin, Access-Control-Allow-Headers, Content-Type")
c.Header("Access-Control-Allow-Credentials", "true")
// 放行所有OPTIONS方法
if method == "OPTIONS" {
c.AbortWithStatus(http.StatusNoContent)
}
// 处理请求
c.Next()
}
}
================================================
FILE: server/middleware/jwt.go
================================================
package middleware
import (
"crm/common"
"crm/response"
"strconv"
"github.com/gin-gonic/gin"
)
// JWT认证中间件
func JwtAuth() gin.HandlerFunc {
return func(c *gin.Context) {
uid, _ := strconv.Atoi(c.Request.Header.Get("uid"))
token := c.Request.Header.Get("token")
if token == "" {
response.Result(response.ErrCodeNoLogin, nil, c)
c.Abort()
return
}
userid, err := common.VerifyToken(token)
if userid != int64(uid) || err != nil {
response.Result(response.ErrCodeTokenExpire, nil, c)
c.Abort()
return
}
c.Next()
}
}
================================================
FILE: server/models/common.go
================================================
package models
// 分页参数模型
type Page struct {
PageNum int `form:"pageNum" json:"pageNum"`
PageSize int `form:"pageSize" json:"pageSize"`
}
// 发送邮件参数模型
type MailParam struct {
Smtp string
Port int
AuthCode string
Sender string
Subject string
Content string
Attachment string
Receiver string
}
// 文件参数模型
type FileParam struct {
Name string `json:"name" binding:"required,gt=0"`
}
// 文件信息
type FileInfo struct {
Url string `json:"url"`
Name string `json:"name"`
}
================================================
FILE: server/models/config.go
================================================
package models
type MailConfig struct {
Id int64 `gorm:"primaryKey"`
Stmp string `gorm:"stmp"`
Port int `gorm:"port"`
AuthCode string `gorm:"auth_code"`
Email string `gorm:"email"`
Status int `gorm:"status"`
Creator int64 `gorm:"creator"`
Created int64 `gorm:"created"`
Updated int64 `gorm:"updated"`
}
type MailConfigSaveParam struct {
Id int64 `json:"id" binding:"omitempty,gt=0"`
Stmp string `json:"stmp" binding:"required,ip|hostname"`
Port int `json:"port" binding:"required,gt=0"`
AuthCode string `json:"authCode" binding:"required,gt=0"`
Email string `json:"email" binding:"required,email"`
Status int `json:"status" binding:"omitempty,oneof=1 2"`
Creator int64 `json:"creator" binding:"omitempty"`
}
type MailConfigStatusParam struct {
Id int64 `json:"id" binding:"omitempty,gt=0"`
Status int `json:"status" binding:"required,oneof=1 2"`
Creator int64 `json:"creator" binding:"omitempty"`
}
type MailConfigDeleteParam struct {
Id int64 `json:"id" binding:"required,gt=0"`
}
type MailConfigInfo struct {
Id int64 `json:"id"`
Stmp string `json:"stmp"`
Port int `json:"port"`
AuthCode string `json:"authCode"`
Email string `json:"email"`
Status int `json:"status"`
Usability int `json:"usability"`
}
================================================
FILE: server/models/contract.go
================================================
package models
import (
"database/sql/driver"
"encoding/json"
)
type Contract struct {
Id int64 `gorm:"primaryKey"`
Name string `gorm:"name"`
Amount float64 `gorm:"amount"`
BeginTime string `gorm:"begin_time"`
OverTime string `gorm:"over_time"`
Remarks string `gorm:"remarks"`
Cid int64 `gorm:"cid"`
Productlist *Productlist `gorm:"type:json"`
Status int `gorm:"status"`
Creator int64 `gorm:"creator"`
Created int64 `gorm:"created"`
Updated int64 `gorm:"updated"`
}
type ContractCreateParam struct {
Name string `json:"name" binding:"required"`
Amount float64 `json:"amount" binding:"required,gt=0"`
BeginTime string `json:"beginTime" binding:"-"`
OverTime string `json:"overTime" binding:"-"`
Remarks string `json:"remarks" binding:"-"`
Cid int64 `json:"cid" binding:"required,gt=0"`
Productlist *Productlist `json:"productlist"`
Status int `json:"status" binding:"required,oneof=1 2"`
Creator int64 `json:"creator,omitempty" binding:"-"`
}
type ContractUpdateParam struct {
Id int64 `json:"id" binding:"required,gt=0"`
Name string `json:"name" binding:"required"`
Amount float64 `json:"amount" binding:"omitempty,gt=0"`
BeginTime string `json:"beginTime" binding:"-"`
OverTime string `json:"overTime" binding:"-"`
Remarks string `json:"remarks" binding:"-"`
Cid int64 `json:"cid" binding:"required,gt=0"`
Productlist *Productlist `json:"productlist"`
Status int `json:"status" binding:"required,oneof=1 2"`
}
type ContractDeleteParam struct {
Ids []int64 `json:"ids" binding:"required"`
}
type ContractQueryParam struct {
Id int64 `form:"id" binding:"omitempty,gt=0"`
Pids []int64 `form:"pids" json:"pids" binding:"-"`
Name string `form:"name" binding:"-"`
Status int `form:"status" binding:"omitempty,oneof=1 2"`
Creator int64 `form:"creator,omitempty" binding:"-"`
Page Page
}
type ContractList struct {
Id int64 `json:"id"`
Name string `json:"name"`
Amount float64 `json:"amount"`
BeginTime string `json:"beginTime"`
OverTime string `json:"overTime"`
Remarks string `json:"remarks"`
Cname string `json:"cname"`
Status int `json:"status"`
Created int64 `json:"created"`
Updated int64 `json:"updated"`
}
type ContractInfo struct {
Id int64 `json:"id"`
Name string `json:"name"`
Cid int64 `json:"cid"`
Amount float64 `json:"amount"`
BeginTime string `json:"beginTime"`
OverTime string `json:"overTime"`
Remarks string `json:"remarks"`
Productlist *Productlist `json:"productlist"`
Status int `json:"status"`
}
type Products struct {
Id int64 `json:"id"`
Name string `json:"name"`
Type int `json:"type"`
Unit string `json:"unit"`
Price float64 `json:"price"`
Count int `json:"count"`
Total float64 `json:"total"`
}
type ContractExcelRow struct {
Name string `json:"name"`
Cname string `json:"cname"`
Amount float64 `json:"amount"`
BeginTime string `json:"beginTime"`
OverTime string `json:"overTime"`
Remarks string `json:"remarks"`
Status string `json:"status"`
Created string `json:"created"`
Updated string `json:"updated"`
}
type Productlist []*Products
func (p *Productlist) Value() (driver.Value, error) {
b, err := json.Marshal(p)
return string(b), err
}
func (p *Productlist) Scan(src any) error {
return json.Unmarshal(src.([]byte), p)
}
================================================
FILE: server/models/customer.go
================================================
package models
type Customer struct {
Id int64 `gorm:"primaryKey"`
Name string `gorm:"name"`
Source string `gorm:"source"`
Phone string `gorm:"phone"`
Email string `gorm:"email"`
Industry string `gorm:"industry"`
Level string `gorm:"level"`
Remarks string `gorm:"remarks"`
Region string `gorm:"region"`
Address string `gorm:"address"`
Status int `gorm:"status"`
Creator int64 `gorm:"creator"`
Created int64 `gorm:"created"`
Updated int64 `gorm:"updated"`
}
type CustomerCreateParam struct {
Name string `json:"name" binding:"required"`
Source string `json:"source" binding:"-"`
Phone string `json:"phone" binding:"omitempty,len=11"`
Email string `json:"email" binding:"omitempty,email"`
Industry string `json:"industry" binding:"-"`
Level string `json:"level" binding:"-"`
Remarks string `json:"remarks" binding:"-"`
Region string `json:"region" binding:"-"`
Address string `json:"address" binding:"-"`
Status int `json:"status" binding:"-"`
Creator int64 `json:"creator,omitempty" binding:"-"`
}
type CustomerUpdateParam struct {
Id int64 `json:"id" binding:"required"`
Name string `json:"name" binding:"-"`
Source string `json:"source" binding:"-"`
Phone string `json:"phone" binding:"omitempty,len=11"`
Email string `json:"email" binding:"omitempty,email"`
Industry string `json:"industry" binding:"-"`
Level string `json:"level" binding:"-"`
Remarks string `json:"remarks" binding:"-"`
Region string `json:"region" binding:"-"`
Address string `json:"address" binding:"-"`
Status int `json:"status" binding:"-"`
}
type CustomerSendMailParam struct {
Uid int64 `json:"uid" binding:"-"`
Receiver string `json:"receiver" binding:"required,email"`
Subject string `json:"subject" binding:"omitempty,gt=0"`
Content string `json:"content" binding:"required,gt=0"`
Attachment string `json:"attachment" binding:"omitempty,gt=0"`
}
type CustomerDeleteParam struct {
Ids []int64 `json:"ids" binding:"required"`
}
type CustomerQueryParam struct {
Id int64 `form:"id" binding:"omitempty,gt=0"`
Name string `form:"name" binding:"omitempty,gt=0"`
Source string `form:"source" binding:"omitempty,gt=0"`
Industry string `form:"industry" binding:"omitempty,gt=0"`
Level string `form:"level" binding:"omitempty,gt=0"`
Status int `form:"status" binding:"omitempty,oneof=1 2"`
Creator int64 `form:"creator,omitempty" binding:"-"`
Page Page
}
type CustomerList struct {
Id int64 `json:"id"`
Name string `json:"name"`
Source string `json:"source"`
Phone string `json:"phone"`
Email string `json:"email"`
Industry string `json:"industry"`
Level string `json:"level"`
Remarks string `json:"remarks"`
Region string `json:"region"`
Address string `json:"address"`
Status int `json:"status"`
Created int64 `json:"created"`
Updated int64 `json:"updated"`
}
type CustomerInfo struct {
Id int64 `json:"id"`
Name string `json:"name"`
Source string `json:"source"`
Phone string `json:"phone"`
Email string `json:"email"`
Industry string `json:"industry"`
Level string `json:"level"`
Remarks string `json:"remarks"`
Region string `json:"region"`
Address string `json:"address"`
Status int `json:"status"`
}
type CustomerOption struct {
Id int64 `json:"id"`
Name string `json:"name"`
}
type CustomerExcelRow struct {
Name string `json:"name"`
Source string `json:"source"`
Phone string `json:"phone"`
Email string `json:"email"`
Industry string `json:"industry"`
Level string `json:"level"`
Remarks string `json:"remarks"`
Region string `json:"region"`
Address string `json:"address"`
Status string `json:"status"`
Creator int64 `json:"creator"`
Created string `json:"created"`
Updated string `json:"updated"`
}
================================================
FILE: server/models/dashboard.go
================================================
package models
type DashboardSum struct {
Customers int `json:"customers"`
Contracts int `json:"contracts"`
ContractAmount float64 `json:"contractAmount"`
Products int `json:"products"`
Date []string `json:"date"`
Amount []float64 `json:"amount"`
CustomerIndustry []*CustomerIndustry `json:"customerIndustry"`
}
type CustomerIndustry struct {
Name string `json:"name"`
Value int `json:"value"`
}
================================================
FILE: server/models/notice.go
================================================
package models
type Notice struct {
Id int64 `gorm:"primaryKey"`
Content string `gorm:"content"`
Status int `gorm:"status"`
Creator int64 `gorm:"creator"`
Created int64 `gorm:"created"`
Updated int64 `gorm:"updated"`
}
type NoticeCreateParam struct {
Content string `json:"content"`
Creator int64 `gorm:"creator"`
}
type NoticeUpdateParam struct {
Id int64 `json:"id" binding:"required,gt=0"`
}
type NoticeDeleteParam struct {
Ids []int64 `json:"ids" binding:"required"`
}
type UnReadNotice struct {
Count int `json:"count"`
}
type NoticeList struct {
Id int64 `json:"id"`
Content string `json:"content"`
Status int `json:"status"`
Created int64 `json:"created"`
}
================================================
FILE: server/models/product.go
================================================
package models
type Product struct {
Id int64 `gorm:"primaryKey"`
Name string `gorm:"name"`
Type int `gorm:"type"`
Unit string `gorm:"unit"`
Code string `gorm:"code"`
Price float64 `gorm:"price"`
Description string `gorm:"description"`
Status int `gorm:"status"`
Creator int64 `gorm:"creator"`
Created int64 `gorm:"created"`
Updated int64 `gorm:"updated"`
}
type ProductCreateParam struct {
Name string `json:"name" binding:"required"`
Type int `json:"type" binding:"required,len=1"`
Unit string `json:"unit" binding:"-"`
Code string `json:"code" binding:"-"`
Price float64 `json:"price" binding:"required,gt=0"`
Description string `json:"description" binding:"-"`
Status int `json:"status" binding:"required,oneof=1 2"`
Creator int64 `json:"creator,omitempty" binding:"-"`
}
type ProductUpdateParam struct {
Id int64 `json:"id" binding:"required,gt=0"`
Name string `json:"name" binding:"required"`
Type int `json:"type" binding:"required,len=1"`
Unit string `json:"unit" binding:"-"`
Code string `json:"code" binding:"-"`
Price float64 `json:"price" binding:"required,gt=0"`
Description string `json:"description" binding:"-"`
Status int `json:"status" binding:"required,oneof=1 2"`
Creator int64 `json:"creator,omitempty" binding:"-"`
}
type ProductDeleteParam struct {
Ids []int64 `json:"ids" binding:"required"`
}
type ProductQueryParam struct {
Id int64 `form:"id" binding:"omitempty,gt=0"`
Ids []int64 `form:"ids" json:"ids" binding:"-"`
Name string `form:"name" binding:"-"`
Status int `form:"status" binding:"omitempty,oneof=1 2"`
Creator int64 `form:"creator,omitempty" binding:"-"`
Page Page
}
type ProductList struct {
Id int64 `json:"id"`
Name string `json:"name"`
Type int `json:"type"`
Unit string `json:"unit"`
Code string `json:"code"`
Price float64 `json:"price"`
Description string `json:"description"`
Status int `json:"status"`
Created int64 `json:"created"`
Updated int64 `json:"updated"`
}
type ProductInfo struct {
Id int64 `json:"id"`
Name string `json:"name"`
Type int `json:"type"`
Unit string `json:"unit"`
Code string `json:"code"`
Price float64 `json:"price"`
Description string `json:"description"`
Status int `json:"status"`
}
type ProductExcelRow struct {
Name string `json:"name"`
Type string `json:"type"`
Unit string `json:"unit"`
Code string `json:"code"`
Price float64 `json:"price"`
Description string `json:"description"`
Status string `json:"status"`
Created string `json:"created"`
Updated string `json:"updated"`
}
================================================
FILE: server/models/subscribe.go
================================================
package models
type Subscribe struct {
Id int64 `gorm:"primaryKey"`
Uid int64 `gorm:"uid"`
Version int `gorm:"version"`
Expired int64 `gorm:"expired"`
Created int64 `gorm:"created"`
Updated int64 `gorm:"updated"`
}
type SubscribeCreateParam struct {
Uid int64 `json:"uid"`
Version int `json:"version"`
Expired int64 `json:"expired"`
}
type SubscribeUpdateParam struct {
Id int64 `json:"id"`
Uid int64 `json:"uid"`
Version int `json:"version"`
Expired int64 `json:"expired"`
}
type SubscribePayParam struct {
Uid int64 `json:"uid" binding:"-"`
Duration int64 `json:"duration" binding:"required,oneof=30 90 180 365 730"`
}
type SubscribePayOrder struct {
Uid int64 `json:"uid"`
TradeNo string `json:"tradeNo"`
Duration int64 `json:"duration"`
}
type SubscribePayUrl struct {
PayUrl string `json:"payUrl"`
}
type SubscribeInfo struct {
Version int `json:"version"`
Expired int64 `json:"expired"`
}
================================================
FILE: server/models/user.go
================================================
package models
type User struct {
Id int64 `gorm:"primaryKey"`
Email string `gorm:"email"`
Password string `gorm:"password"`
Name string `gorm:"name"`
Status int `gorm:"status"`
Created int64 `gorm:"created"`
Updated int64 `gorm:"updated"`
}
type UserCreateParam struct {
Email string `json:"email" binding:"required,email"`
Code string `json:"code" binding:"required,len=6"`
Password string `json:"password" binding:"required"`
}
type UserDeleteParam struct {
Id int64 `json:"id,omitempty" binding:"-"`
Email string `json:"email" binding:"required,email"`
Code string `json:"code" binding:"required,len=6"`
}
type UserLoginParam struct {
Email string `json:"email" binding:"required,email"`
Password string `json:"password" binding:"required"`
}
type UserVerifyCodeParam struct {
Email string `form:"email" binding:"required,email"`
}
type UserPassParam struct {
Email string `json:"email" binding:"required,email"`
Code string `json:"code" binding:"required,len=6"`
Password string `json:"password" binding:"required"`
}
type UserInfo struct {
Uid int64 `json:"uid"`
Token string `json:"token"`
}
type UserPersonInfo struct {
Name string `json:"name"`
Email string `json:"email"`
Version int `json:"version"`
}
================================================
FILE: server/response/errcode.go
================================================
package response
const (
ErrCodeSuccess = 0 // 成功
ErrCodeFailed = 1 // 失败
ErrCodeParamInvalid = 2 // 请求参数无效
ErrCodeNoLogin = 3 // 未登录或非法访问
ErrCodeTokenExpire = 4 // Token过期
ErrCodeInitDataFailed = 10 // 初始化数据失败
ErrCodeFileUploadFailed = 11 // 文件上传失败
ErrCodeFileRemoveFailed = 12 // 文件移除失败
ErrCodeUserHasExist = 10001 // 用户已经存在
ErrCodeUserNotExist = 10002 // 用户不存在
ErrCOdeUserEmailOrPass = 10003 // 用户邮箱或密码错误
ErrCodeVerityCodeSendFailed = 10004 // 验证码发送失败
ErrCodeVerityCodeInvalid = 10005 // 验证码无效
ErrCodeEmailFormatInvalid = 10008 // 邮箱格式无效
ErrCodeUserPassResetFailed = 10009 // 用户密码重置失败
ErrCodeCustomerHasExist = 20001 // 客户名称已经存在
ErrCodePayFailed = 20001 // 支付宝支付失败
ErrCodeFileExportFailed = 30001 // 文件导出失败
ErrCodeProductHasExist = 40001 // 产品名称已经存在
ErrCodeMailConfigInvalid = 50001 // 邮件服务配置无效
ErrCodeMailSendFailed = 50002 // 邮件发送失败
ErrCodeMailSendUnEnable = 50003 // 邮件服务未开启
ErrCodeMailConfigUnSet = 50004 // 邮件服务未配置
)
var msg = map[int]string{
ErrCodeSuccess: "success",
ErrCodeFailed: "failed",
ErrCodeParamInvalid: "param invalid",
ErrCodeNoLogin: "no login",
ErrCodeTokenExpire: "token expire",
ErrCodeInitDataFailed: "data init failed",
ErrCodeFileUploadFailed: "file upload failed",
ErrCodeUserHasExist: "user has exist",
ErrCodeUserNotExist: "user not exist",
ErrCOdeUserEmailOrPass: "user email or password error",
ErrCodeVerityCodeSendFailed: "verify code send failed",
ErrCodeVerityCodeInvalid: "verify code invalid",
ErrCodeEmailFormatInvalid: "email format invalid",
ErrCodeUserPassResetFailed: "user password reset failed",
ErrCodeFileExportFailed: "file export failed",
ErrCodeProductHasExist: "product has exist",
ErrCodeMailConfigInvalid: "mail config invalid",
ErrCodeMailSendFailed: "mail send failed",
ErrCodeMailSendUnEnable: "mail send server unEnable",
ErrCodeMailConfigUnSet: "mail config un set",
}
================================================
FILE: server/response/response.go
================================================
package response
import (
"net/http"
"github.com/gin-gonic/gin"
)
type Response struct {
Code int `json:"code"`
Message string `json:"message"`
Data interface{} `json:"data,omitempty"`
}
type Page struct {
Total int64 `json:"total"`
List interface{} `json:"list"`
}
// 响应结果
func Result(code int, data interface{}, c *gin.Context) {
message := msg[code]
c.JSON(http.StatusOK, Response{code, message, data})
}
// 响应分页结果
func PageResult(code int, data interface{}, rows int64, c *gin.Context) {
message := msg[code]
page := &Page{Total: rows, List: data}
c.JSON(http.StatusOK, Response{code, message, page})
}
================================================
FILE: server/service/common.go
================================================
package service
import (
"crm/dao"
"crm/models"
"crm/response"
"mime/multipart"
)
const (
// 数据库表名
USER = "user"
CUSTOMER = "customer"
CONTRACT = "contract"
PRODUCT = "product"
SUBSCRIBE = "subscribe"
NOTICE = "notice"
)
const (
NumberNull = 0
StringNull = ""
)
const (
Dev = "dev"
Prod = "prod"
)
const (
REGISTER_NOTICE_TEMPLATE = "你注册了账号"
LOGIN_NOTICE_TEMPLATE = "你登录了账号"
SUBSCRIBE_NOTICE_TEMPLATE1 = "你订阅了专业版"
SUBSCRIBE_NOTICE_TEMPLATE2 = "你订阅了高级版"
)
type CommonService struct {
commonDao *dao.CommonDao
}
func NewCommonService() *CommonService {
return &CommonService{
commonDao: dao.NewCommonDao(),
}
}
// 初始化数据库
func (c *CommonService) InitDatabase() int {
if err := c.commonDao.InitDatabase(); err != nil {
return response.ErrCodeInitDataFailed
}
return response.ErrCodeSuccess
}
// 文件上传
func (c *CommonService) FileUpload(file *multipart.FileHeader) (*models.FileInfo, int) {
fileInfo, err := c.commonDao.FileUpload(file)
if err != nil {
return nil, response.ErrCodeFileUploadFailed
}
return fileInfo, response.ErrCodeSuccess
}
// 文件移除
func (c *CommonService) FileRemove(param *models.FileParam) int {
if err := c.commonDao.FileRemove(param.Name); err != nil {
return response.ErrCodeFileUploadFailed
}
return response.ErrCodeSuccess
}
================================================
FILE: server/service/config.go
================================================
package service
import (
"crm/common"
"crm/dao"
"crm/models"
"crm/response"
)
type MailConfigService struct {
mailConfigDao *dao.MailConfigDao
}
func NewMailConfigService() *MailConfigService {
return &MailConfigService{
mailConfigDao: dao.NewMailConfigDao(),
}
}
// 保存邮件服务配置
func (m *MailConfigService) Save(param *models.MailConfigSaveParam) int {
if err := m.mailConfigDao.Save(param); err != nil {
return response.ErrCodeFailed
}
return response.ErrCodeSuccess
}
// 删除邮件服务配置
func (m *MailConfigService) Delete(param *models.MailConfigDeleteParam) int {
if err := m.mailConfigDao.Delete(param); err != nil {
return response.ErrCodeFailed
}
return response.ErrCodeSuccess
}
// 开启或关闭邮件服务
func (m *MailConfigService) UpdateStatus(param *models.MailConfigStatusParam) int {
if !m.mailConfigDao.IsExists(param.Creator) {
return response.ErrCodeMailConfigUnSet
}
if err := m.mailConfigDao.UpdateStatus(param); err != nil {
return response.ErrCodeFailed
}
return response.ErrCodeSuccess
}
// 获取邮件配置信息
func (m *MailConfigService) GetInfo(uid int64) (*models.MailConfigInfo, int) {
if !m.mailConfigDao.IsExists(uid) {
return nil, response.ErrCodeMailConfigUnSet
}
mc, err := m.mailConfigDao.GetInfo(uid)
if err != nil {
return nil, response.ErrCodeFailed
}
mailConfig := models.MailConfigInfo{
Id: mc.Id,
Stmp: mc.Stmp,
Port: mc.Port,
AuthCode: mc.AuthCode,
Email: mc.Email,
Status: mc.Status,
}
return &mailConfig, response.ErrCodeSuccess
}
// 检查邮件配置的有效性
func (m *MailConfigService) Check(uid int64) int {
mc, err := m.mailConfigDao.GetInfo(uid)
if err != nil {
return response.ErrCodeMailConfigInvalid
}
if err = common.DialMail(mc.Stmp, mc.Port, mc.Email, mc.AuthCode); err != nil {
return response.ErrCodeMailConfigInvalid
}
return response.ErrCodeSuccess
}
================================================
FILE: server/service/contract.go
================================================
package service
import (
"crm/common"
"crm/dao"
"crm/models"
"crm/response"
"strconv"
"time"
)
type ContractService struct {
contractDao *dao.ContractDao
productDao *dao.ProductDao
}
func NewContractService() *ContractService {
return &ContractService{
contractDao: dao.NewContractDao(),
productDao: dao.NewProductDao(),
}
}
// 创建合同
func (c *ContractService) Create(param *models.ContractCreateParam) int {
if err := c.contractDao.Create(param); err != nil {
return response.ErrCodeFailed
}
return response.ErrCodeSuccess
}
// 更新合同
func (c *ContractService) Update(param *models.ContractUpdateParam) int {
if err := c.contractDao.Update(param); err != nil {
return response.ErrCodeFailed
}
return response.ErrCodeSuccess
}
// 删除合同
func (c *ContractService) Delete(param *models.ContractDeleteParam) int {
if err := c.contractDao.Delete(param); err != nil {
return response.ErrCodeFailed
}
return response.ErrCodeSuccess
}
// 查询合同列表
func (c *ContractService) GetList(param *models.ContractQueryParam) ([]*models.ContractList, int64, int) {
contractList, rows, err := c.contractDao.GetList(param)
if err != nil {
return nil, NumberNull, response.ErrCodeFailed
}
return contractList, rows, response.ErrCodeSuccess
}
// 查询合同信息
func (c *ContractService) GetInfo(param *models.ContractQueryParam) (*models.ContractInfo, int) {
contractInfo, err := c.contractDao.GetInfo(param)
if err != nil {
return nil, response.ErrCodeFailed
}
return contractInfo, response.ErrCodeSuccess
}
// 在编辑合同中,添加产品后,返回已添加的产品列表
func (c *ContractService) GetProductList(param *models.ContractQueryParam) ([]*models.Products, int) {
if param.Id == 0 {
products, err := c.productDao.GetListByIds(param.Pids)
if err != nil {
return nil, response.ErrCodeFailed
}
return products, response.ErrCodeSuccess
}
// 默认已添加的产品列表
contract, err := c.contractDao.GetAddedPList(param.Id)
if err != nil {
return nil, response.ErrCodeFailed
}
// 最终已添加的产品列表
addedProductList := make([]*models.Products, 0)
if len(param.Pids) == 0 {
return addedProductList, response.ErrCodeSuccess
}
addedPids := make([]int64, 0)
for _, pid := range param.Pids {
if len(*contract.Productlist) == 0 {
addedPids = param.Pids
break
}
for _, product := range *contract.Productlist {
if pid == product.Id {
addedProductList = append(addedProductList, product)
continue
}
addedPids = append(addedPids, pid)
}
}
products, err := c.productDao.GetListByIds(addedPids)
if err != nil {
return nil, response.ErrCodeFailed
}
addedProductList = append(addedProductList, products...)
return addedProductList, response.ErrCodeSuccess
}
// 导出Excel文件
func (c *ContractService) Export(uid int64) (string, int) {
contracts, err := c.contractDao.GetListByUid(uid)
if err != nil {
return StringNull, response.ErrCodeFailed
}
excelRows := make([]models.ContractExcelRow, 0)
var row models.ContractExcelRow
for _, c := range contracts {
row.Name = c.Name
row.Cname = c.Cname
row.Amount = c.Amount
row.BeginTime = c.BeginTime
row.OverTime = c.OverTime
row.Remarks = c.Remarks
if c.Status == 1 {
row.Status = "已签约"
}
if c.Status == 2 {
row.Status = "未签约"
}
row.Created = time.Unix(c.Created, 0).Format("2006-01-02")
if c.Updated != 0 {
row.Updated = time.Unix(c.Updated, 0).Format("2006-01-02")
}
excelRows = append(excelRows, row)
}
sheet := "合同信息"
columns := []string{"合同名称", "客户名称", "合同金额", "合同开始时间", "合同结束时间", "备注", "签约状态", "创建时间", "更新时间"}
fileName := "contract_" + strconv.FormatInt(uid, 10)
file, err := common.GenExcelFile(sheet, columns, excelRows, fileName)
if err != nil {
return StringNull, response.ErrCodeFailed
}
return file, response.ErrCodeSuccess
}
================================================
FILE: server/service/customer.go
================================================
package service
import (
"crm/common"
"crm/dao"
"crm/models"
"crm/response"
"strconv"
"time"
)
const (
Open = 1
Close = 2
)
type CustomerService struct {
customerDao *dao.CustomerDao
mailConfigDao *dao.MailConfigDao
}
func NewCustomerService() *CustomerService {
return &CustomerService{
customerDao: dao.NewCustomerDao(),
mailConfigDao: dao.NewMailConfigDao(),
}
}
// 创建客户
func (c *CustomerService) Create(param *models.CustomerCreateParam) int {
if c.customerDao.IsExists(param.Name, param.Creator) {
return response.ErrCodeCustomerHasExist
}
if err := c.customerDao.Create(param); err != nil {
return response.ErrCodeFailed
}
return response.ErrCodeSuccess
}
// 更新客户
func (c *CustomerService) Update(param *models.CustomerUpdateParam) int {
if err := c.customerDao.Update(param); err != nil {
return response.ErrCodeFailed
}
return response.ErrCodeSuccess
}
// 发送邮件给客户
func (c *CustomerService) SendMail(param *models.CustomerSendMailParam) int {
mc, err := c.mailConfigDao.GetInfo(param.Uid)
if err != nil {
return response.ErrCodeMailSendFailed
}
if mc.Status == Close {
return response.ErrCodeMailSendUnEnable
}
mail := models.MailParam{
Smtp: mc.Stmp,
Port: mc.Port,
AuthCode: mc.AuthCode,
Sender: mc.Email,
Subject: param.Subject,
Content: param.Content,
Attachment: param.Attachment,
Receiver: param.Receiver,
}
if err := common.SendMailToCustomer(mail); err != nil {
return response.ErrCodeMailSendFailed
}
return response.ErrCodeSuccess
}
// 删除客户
func (c *CustomerService) Delete(param *models.CustomerDeleteParam) int {
if err := c.customerDao.Delete(param); err != nil {
return response.ErrCodeFailed
}
return response.ErrCodeSuccess
}
// 查询客户列表
func (c *CustomerService) GetList(param *models.CustomerQueryParam) ([]*models.CustomerList, int64, int) {
customerList, rows, err := c.customerDao.GetList(param)
if err != nil {
return nil, NumberNull, response.ErrCodeFailed
}
return customerList, rows, response.ErrCodeSuccess
}
// 查询客户信息
func (c *CustomerService) GetInfo(param *models.CustomerQueryParam) (*models.CustomerInfo, int) {
customerInfo, err := c.customerDao.GetInfo(param)
if err != nil {
return nil, response.ErrCodeFailed
}
return customerInfo, response.ErrCodeSuccess
}
// 查询客户选项
func (c *CustomerService) GetOption(uid int64) ([]*models.CustomerOption, int) {
option, err := c.customerDao.GetOption(uid)
if err != nil {
return nil, response.ErrCodeFailed
}
return option, response.ErrCodeSuccess
}
// 导出Excel文件
func (c *CustomerService) Export(uid int64) (string, int) {
customers, err := c.customerDao.GetListByUid(uid)
if err != nil {
return StringNull, response.ErrCodeFailed
}
excelRows := make([]models.CustomerExcelRow, 0)
var row models.CustomerExcelRow
for _, c := range customers {
row.Name = c.Name
row.Source = c.Source
row.Phone = c.Phone
row.Email = c.Email
row.Industry = c.Industry
row.Level = c.Level
row.Remarks = c.Remarks
row.Region = c.Region
row.Address = c.Address
if c.Status == 1 {
row.Status = "已签约"
}
if c.Status == 2 {
row.Status = "未签约"
}
row.Created = time.Unix(c.Created, 0).Format("2006-01-02")
if c.Updated != 0 {
row.Updated = time.Unix(c.Updated, 0).Format("2006-01-02")
}
excelRows = append(excelRows, row)
}
sheet := "客户信息"
columns := []string{"名称", "客户来源", "手机号", "邮箱", "客户行业", "客户级别", "备注", "地区", "详细地址", "成交状态", "创建时间", "更新时间"}
fileName := "customer_" + strconv.FormatInt(uid, 10)
file, err := common.GenExcelFile(sheet, columns, excelRows, fileName)
if err != nil {
return StringNull, response.ErrCodeFailed
}
return file, response.ErrCodeSuccess
}
================================================
FILE: server/service/dashboard.go
================================================
package service
import (
"crm/dao"
"crm/models"
"time"
)
type DashboardService struct {
dashboardDao *dao.DashboardDao
}
func NewDashboardService() *DashboardService {
return &DashboardService{
dashboardDao: dao.NewDashboardDao(),
}
}
// 数据汇总
func (d *DashboardService) Summary(uid int64, days int) models.DashboardSum {
ds := d.dashboardDao.Count(uid, days)
now := time.Now().Unix()
ds.Amount = make([]float64, days)
ds.Date = make([]string, days)
for i, dd := 0, days; i < days; i++ {
day := now - (int64(dd) * 24 * 60 * 60)
start, end := dayRange(day)
ds.Amount[i] = d.dashboardDao.AmountSum(start, end, uid)
ds.Date[i] = time.Unix(day, 0).Format("01-02")
dd--
}
return ds
}
// 获取某一天的时间范围
func dayRange(day int64) (int64, int64) {
t := time.Unix(day, 0)
start := time.Date(t.Year(), t.Month(), t.Day(), 0, 0, 0, 0, t.Location())
end := start.AddDate(0, 0, 1)
return start.Unix(), end.Unix()
}
================================================
FILE: server/service/notice.go
================================================
package service
import (
"crm/dao"
"crm/models"
"crm/response"
)
type NoticeService struct {
noticeDao *dao.NoticeDao
}
func NewNoticeService() *NoticeService {
return &NoticeService{
noticeDao: dao.NewNoticeDao(),
}
}
// 新建通知
func (n *NoticeService) Create(param *models.NoticeCreateParam) int {
if err := n.noticeDao.Create(param); err != nil {
return response.ErrCodeFailed
}
return response.ErrCodeSuccess
}
// 更新通知
func (n *NoticeService) Update(param *models.NoticeUpdateParam) int {
if err := n.noticeDao.Update(param); err != nil {
return response.ErrCodeFailed
}
return response.ErrCodeSuccess
}
// 获取未读通知数量
func (n *NoticeService) GetUnReadCount(uid int64) (models.UnReadNotice, int) {
unReadCount, err := n.noticeDao.GetUnReadCountByUid(uid)
if err != nil {
return unReadCount, response.ErrCodeFailed
}
return unReadCount, response.ErrCodeSuccess
}
// 删除通知
func (n *NoticeService) Delete(param *models.NoticeDeleteParam) int {
if err := n.noticeDao.Delete(param); err != nil {
return response.ErrCodeFailed
}
return response.ErrCodeSuccess
}
// 获取通知列表
func (n *NoticeService) GetList(uid int64) ([]*models.NoticeList, int) {
noticeList, err := n.noticeDao.GetList(uid)
if err != nil {
return nil, response.ErrCodeFailed
}
return noticeList, response.ErrCodeSuccess
}
================================================
FILE: server/service/product.go
================================================
package service
import (
"crm/common"
"crm/dao"
"crm/models"
"crm/response"
"strconv"
"time"
)
type ProductService struct {
productDao *dao.ProductDao
}
func NewProductService() *ProductService {
return &ProductService{
productDao: dao.NewProductDao(),
}
}
// 创建产品
func (p *ProductService) Create(param *models.ProductCreateParam) int {
if p.productDao.IsExists(param.Name, param.Creator) {
return response.ErrCodeProductHasExist
}
if err := p.productDao.Create(param); err != nil {
return response.ErrCodeFailed
}
return response.ErrCodeSuccess
}
// 更新产品
func (p *ProductService) Update(param *models.ProductUpdateParam) int {
if err := p.productDao.Update(param); err != nil {
return response.ErrCodeFailed
}
return response.ErrCodeSuccess
}
// 删除产品
func (p *ProductService) Delete(param *models.ProductDeleteParam) int {
if err := p.productDao.Delete(param); err != nil {
return response.ErrCodeFailed
}
return response.ErrCodeSuccess
}
// 查询产品列表
func (p *ProductService) GetList(param *models.ProductQueryParam) ([]*models.ProductList, int64, int) {
productList, rows, err := p.productDao.GetList(param)
if err != nil {
return nil, NumberNull, response.ErrCodeFailed
}
return productList, rows, response.ErrCodeSuccess
}
// 查询产品信息
func (p *ProductService) GetInfo(param *models.ProductQueryParam) (*models.ProductInfo, int) {
productInfo, err := p.productDao.GetInfo(param)
if err != nil {
return nil, response.ErrCodeFailed
}
return productInfo, response.ErrCodeSuccess
}
// 导出Excel文件
func (p *ProductService) Export(uid int64) (string, int) {
products, err := p.productDao.GetListByUid(uid)
if err != nil {
return StringNull, response.ErrCodeFileExportFailed
}
excelRows := make([]models.ProductExcelRow, 0)
var row models.ProductExcelRow
for _, p := range products {
row.Name = p.Name
if p.Status == 1 {
row.Status = "已上架"
}
if p.Status == 2 {
row.Status = "已下架"
}
if p.Type == 1 {
row.Type = "默认"
}
row.Unit = p.Unit
row.Code = p.Code
row.Price = p.Price
row.Description = p.Description
row.Created = time.Unix(p.Created, 0).Format("2006-01-02")
if p.Updated != 0 {
row.Updated = time.Unix(p.Updated, 0).Format("2006-01-02")
}
excelRows = append(excelRows, row)
}
sheet := "产品信息"
columns := []string{"名称", "是否上下架", "类型", "单位", "编码", "价格", "描述", "创建时间", "更新时间"}
fileName := "product_" + strconv.FormatInt(uid, 10)
file, err := common.GenExcelFile(sheet, columns, excelRows, fileName)
if err != nil {
return StringNull, response.ErrCodeFileExportFailed
}
return file, response.ErrCodeSuccess
}
================================================
FILE: server/service/subscribe.go
================================================
package service
import (
"crm/common"
"crm/dao"
"crm/models"
"crm/response"
"encoding/json"
"time"
)
type SubscribeService struct {
subscribeDao *dao.SubscribeDao
noticeDao *dao.NoticeDao
}
func NewSubscribeService() *SubscribeService {
subscribeService := SubscribeService{
subscribeDao: dao.NewSubscribeDao(),
noticeDao: dao.NewNoticeDao(),
}
return &subscribeService
}
// 订阅专业版,发起支付
func (s *SubscribeService) Pay(param models.SubscribePayParam) (*models.SubscribePayUrl, int) {
// 构建订单支付信息
tradeNo := common.GetAlipay().GenTradeNo()
totalAmount := float64(param.Duration) * 0.6
payUrl, err := common.GetAlipay().PagePay(tradeNo, totalAmount)
if err != nil {
return nil, response.ErrCodeFailed
}
order := models.SubscribePayOrder{
Uid: param.Uid,
TradeNo: tradeNo,
Duration: param.Duration,
}
if err := s.subscribeDao.SetOrder(tradeNo, &order); err != nil {
return nil, response.ErrCodeFailed
}
subscribePayUrl := models.SubscribePayUrl{
PayUrl: payUrl,
}
return &subscribePayUrl, response.ErrCodeSuccess
}
// 支付成功回调
func (s *SubscribeService) PayBack(outTradeNo string) int {
// 获取订单信息
var order models.SubscribePayOrder
orderJson, err := s.subscribeDao.GetOrder(outTradeNo)
if err != nil {
return response.ErrCodeFailed
}
if err := json.Unmarshal([]byte(orderJson), &order); err != nil {
return response.ErrCodeFailed
}
// 创建订阅信息
duration := order.Duration * 24 * 60 * 60
if !s.subscribeDao.IsExists(order.Uid) {
subscribe := models.SubscribeCreateParam{
Uid: order.Uid,
Version: 2,
Expired: time.Now().Unix() + duration,
}
if err := s.subscribeDao.Create(&subscribe); err != nil {
return response.ErrCodeFailed
}
} else {
si, err := s.subscribeDao.GetInfo(order.Uid)
if err != nil {
return response.ErrCodeFailed
}
subscribe := models.SubscribeUpdateParam{
Uid: order.Uid,
Version: 2,
Expired: si.Expired + duration,
}
if err := s.subscribeDao.Update(&subscribe); err != nil {
return response.ErrCodeFailed
}
}
// 订阅通知
s.noticeDao.Create(&models.NoticeCreateParam{
Content: SUBSCRIBE_NOTICE_TEMPLATE1,
Creator: order.Uid,
})
return response.ErrCodeSuccess
}
// 获取订阅信息
func (s *SubscribeService) GetInfo(uid int64) (*models.SubscribeInfo, int) {
si, err := s.subscribeDao.GetInfo(uid)
if err != nil {
return nil, response.ErrCodeFailed
}
// 判断用户订阅是否过期
if si.Version == 2 && time.Now().Unix() > int64(si.Expired) {
if err := s.subscribeDao.UpdateVersion(uid, 1); err != nil {
return nil, response.ErrCodeFailed
}
}
subscribeInfo, err := s.subscribeDao.GetInfo(uid)
if err != nil {
return nil, response.ErrCodeFailed
}
return subscribeInfo, response.ErrCodeSuccess
}
================================================
FILE: server/service/user.go
================================================
package service
import (
"crm/common"
"crm/dao"
"crm/models"
"crm/response"
"fmt"
"log"
"golang.org/x/crypto/bcrypt"
)
const (
TOKEN_MAX_EXPIRE_TIME = 7 * 24 // Token最长有效期
)
type UserService struct {
userDao *dao.UserDao
subscribeDao *dao.SubscribeDao
noticeDao *dao.NoticeDao
}
func NewUserService() *UserService {
userService := UserService{
userDao: dao.NewUserDao(),
subscribeDao: dao.NewSubscribeDao(),
noticeDao: dao.NewNoticeDao(),
}
return &userService
}
// 用户注册
func (u *UserService) Register(param *models.UserCreateParam) int {
// 判断用户是否存在
if u.userDao.IsExists(param.Email) {
return response.ErrCodeUserHasExist
}
// 校验验证码是否正确
code := u.userDao.GetCode(param.Email)
if code != param.Code {
return response.ErrCodeVerityCodeInvalid
}
// 对密码进行加密
password, err := bcrypt.GenerateFromPassword([]byte(param.Password), bcrypt.DefaultCost)
if err != nil {
return response.ErrCodeFailed
}
param.Password = string(password)
// 创建用户
if err := u.userDao.Create(param); err != nil {
return response.ErrCodeFailed
}
// 获取UID
uid, err := u.userDao.GetUid(param.Email)
if err != nil {
return response.ErrCodeFailed
}
// 新用户默认订阅免费版
if !u.subscribeDao.IsExists(uid) {
subscribe := models.SubscribeCreateParam{
Uid: uid,
Version: 1,
}
if err := u.subscribeDao.Create(&subscribe); err != nil {
return response.ErrCodeFailed
}
} else {
subscribe := models.SubscribeUpdateParam{
Uid: uid,
Version: 1,
}
if err := u.subscribeDao.Update(&subscribe); err != nil {
return response.ErrCodeFailed
}
}
// 注册通知
u.noticeDao.Create(&models.NoticeCreateParam{
Content: REGISTER_NOTICE_TEMPLATE,
Creator: uid,
})
return response.ErrCodeSuccess
}
// 用户登录
func (u *UserService) Login(param *models.UserLoginParam) (*models.UserInfo, int) {
// 判断用户是否存在
if !u.userDao.IsExists(param.Email) {
return nil, response.ErrCodeUserNotExist
}
// 获取用户信息
user, err := u.userDao.GetUser(param.Email)
if err != nil {
return nil, response.ErrCodeFailed
}
// 校验账号密码
err = bcrypt.CompareHashAndPassword([]byte(user.Password), []byte(param.Password))
if err != nil {
return nil, response.ErrCOdeUserEmailOrPass
}
// 生成并保存Token
token, err := common.GenToken(user.Id)
if err != nil {
log.Printf("[error]Login:GenerateToken:%s", err)
return nil, response.ErrCodeFailed
}
userInfo := models.UserInfo{
Uid: user.Id,
Token: token,
}
// 登录通知
u.noticeDao.Create(&models.NoticeCreateParam{
Content: LOGIN_NOTICE_TEMPLATE,
Creator: userInfo.Uid,
})
return &userInfo, response.ErrCodeSuccess
}
// 获取验证码
func (u *UserService) GetVerifyCode(email string) int {
// 生成6位随机数
code := common.RandInt(100000, 999998)
// 保存验证码
if err := u.userDao.SetCode(code, email); err != nil {
return response.ErrCodeFailed
}
// 发送验证码
content := fmt.Sprintf("验证码%v,您正在找回密码,切勿向他人泄露。", code)
err := common.SendMail(email, content)
if err != nil {
return response.ErrCodeVerityCodeSendFailed
}
return response.ErrCodeSuccess
}
// 忘记密码
func (u *UserService) ForgotPass(param *models.UserPassParam) int {
// 判断用户是否存在
if !u.userDao.IsExists(param.Email) {
return response.ErrCodeUserNotExist
}
// 校验验证码是否正确
code := u.userDao.GetCode(param.Email)
if code != param.Code {
return response.ErrCodeVerityCodeInvalid
}
// 对密码进行加密,更新密码
password, err := bcrypt.GenerateFromPassword([]byte(param.Password), bcrypt.DefaultCost)
if err != nil {
return response.ErrCodeFailed
}
if err := u.userDao.UpdatePass(param.Email, string(password)); err != nil {
return response.ErrCodeUserPassResetFailed
}
return response.ErrCodeSuccess
}
// 注销账号
func (u *UserService) Delete(param models.UserDeleteParam) int {
// 校验验证码是否正确
code := u.userDao.GetCode(param.Email)
if code != param.Code {
return response.ErrCodeVerityCodeInvalid
}
// 删除用户所有数据
if err := u.userDao.DeleteData(param); err != nil {
return response.ErrCodeFailed
}
return response.ErrCodeSuccess
}
// 获取用户信息
func (u *UserService) GetInfo(uid int64) (*models.UserPersonInfo, int) {
userInfo, err := u.userDao.GetInfo(uid)
if err != nil {
return nil, response.ErrCodeFailed
}
return userInfo, response.ErrCodeSuccess
}
================================================
FILE: web/index.html
================================================
ZOCRM
================================================
FILE: web/package.json
================================================
{
"name": "web",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite --mode dev",
"build": "vite build --mode prod",
"preview": "vite preview"
},
"dependencies": {
"ant-design-vue": "^3.2.13",
"axios": "^1.1.3",
"echarts": "^5.4.0",
"less": "^4.1.3",
"moment": "^2.29.4",
"nprogress": "^0.2.0",
"pinia": "^2.0.23",
"vue": "^3.2.41",
"vue-router": "^4.1.6"
},
"devDependencies": {
"@vitejs/plugin-vue": "^3.2.0",
"vite": "^3.2.0"
}
}
================================================
FILE: web/src/App.vue
================================================
================================================
FILE: web/src/api/common.js
================================================
import request from '../axios/index'
// 初始化数据库
export function initDatabase(param) {
return request({
url: '/common/database/init',
method: 'post',
data: param,
})
}
// 文件移除
export function fileRemove(param) {
return request({
url: '/common/file/remove',
method: 'delete',
data: param,
})
}
================================================
FILE: web/src/api/config.js
================================================
import request from '../axios/index'
// 保存邮件服务配置
export function saveMailConfig(param) {
return request({
url: '/config/save',
method: 'put',
data: param,
})
}
// 删除邮件服务配置
export function deleteMailConfig(param) {
return request({
url: '/config/delete',
method: 'delete',
data: param,
})
}
// 开启或关闭邮件服务
export function updateMailConfigStmpStatus(param) {
return request({
url: '/config/status',
method: 'put',
data: param,
})
}
// 获取邮件服务配置信息
export function getMailConfig(param) {
return request({
url: '/config/info',
method: 'get',
data: param,
})
}
// 检查邮件配置的有效性
export function checkMailConfig(param) {
return request({
url: '/config/check',
method: 'get',
data: param,
})
}
================================================
FILE: web/src/api/contract.js
================================================
import request from '../axios/index'
// 新建合同
export function createContract(param) {
return request({
url: '/contract/create',
method: 'post',
data: param,
})
}
// 更新合同
export function updateContract(param) {
return request({
url: '/contract/update',
method: 'put',
data: param,
})
}
// 删除合同
export function deleteContract(param) {
return request({
url: '/contract/delete',
method: 'delete',
data: param,
})
}
// 查询合同列表
export function queryContractList(param) {
return request({
url: '/contract/list',
method: 'get',
params: param,
})
}
// 查询合同信息
export function queryContractInfo(param) {
return request({
url: '/contract/info',
method: 'get',
params: param,
})
}
// 查询添加的产品列表
export function queryContractPlist(param) {
return request({
url: '/contract/plist',
method: 'post',
data: param,
})
}
// 导出Excel表格
export function contractExport(param) {
return request({
url: '/contract/export',
method: 'get',
responseType: 'blob',
params: param,
})
}
================================================
FILE: web/src/api/customer.js
================================================
import request from '../axios/index'
// 新建客户
export function createCustomer(param) {
return request({
url: '/customer/create',
method: 'post',
data: param,
})
}
// 更新客户
export function updateCustomer(param) {
return request({
url: '/customer/update',
method: 'put',
data: param,
})
}
// 发送邮件给客户
export function sendMailToCustomer(param) {
return request({
url: '/customer/send',
method: 'post',
data: param,
})
}
// 删除客户
export function deleteCustomer(param) {
return request({
url: '/customer/delete',
method: 'delete',
data: param,
})
}
// 查询客户列表
export function queryCustomerList(param) {
return request({
url: '/customer/list',
method: 'get',
params: param,
})
}
// 查询客户信息
export function queryCustomerInfo(param) {
return request({
url: '/customer/info',
method: 'get',
params: param,
})
}
// 查询客户信息
export function queryCustomerOption(param) {
return request({
url: '/customer/option',
method: 'get',
params: param,
})
}
// 导出Excel表格
export function customerExport(param) {
return request({
url: '/customer/export',
method: 'get',
responseType: 'blob',
params: param,
})
}
================================================
FILE: web/src/api/dashboard.js
================================================
import request from '../axios/index'
// 获取数据汇总
export function getSummary(param) {
return request({
url: '/dashboard/sum',
method: 'get',
params: param,
})
}
================================================
FILE: web/src/api/notice.js
================================================
import request from '../axios/index'
// 获取通知列表
export function updateNotice(param) {
return request({
url: '/notice/update',
method: 'put',
data: param,
})
}
// 获取通知列表
export function getNoticeCount(param) {
return request({
url: '/notice/count',
method: 'get',
params: param,
})
}
// 删除全部通知
export function deleteNotice(param) {
return request({
url: '/notice/delete',
method: 'delete',
data: param,
})
}
// 获取通知列表
export function getNoticeList(param) {
return request({
url: '/notice/list',
method: 'get',
params: param,
})
}
================================================
FILE: web/src/api/product.js
================================================
import request from '../axios/index'
// 新建产品
export function createProduct(param) {
return request({
url: '/product/create',
method: 'post',
data: param,
})
}
// 更新产品
export function updateProduct(param) {
return request({
url: '/product/update',
method: 'put',
data: param,
})
}
// 删除产品
export function deleteProduct(param) {
return request({
url: '/product/delete',
method: 'delete',
data: param,
})
}
// 查询产品信息
export function queryProductInfo(param) {
return request({
url: '/product/info',
method: 'get',
params: param,
})
}
// 查询产品列表
export function queryProductList(param) {
return request({
url: '/product/list',
method: 'get',
params: param,
})
}
// 导出Excel表格
export function productExport(param) {
return request({
url: '/product/export',
method: 'get',
responseType: 'blob',
params: param,
})
}
================================================
FILE: web/src/api/subscribe.js
================================================
import request from '../axios/index'
// 订阅专业版
export function subscribePay(param) {
return request({
url: '/subscribe/pay',
method: 'post',
data: param,
})
}
// 获取订阅信息
export function getSubscribeInfo(param) {
return request({
url: '/subscribe/info',
method: 'get',
params: param,
})
}
================================================
FILE: web/src/api/user.js
================================================
import request from '../axios/index'
// 用户登录
export function userLogin(param) {
return request({
url: '/user/login',
method: 'post',
data: param,
})
}
// 用户注册
export function userRegister(param) {
return request({
url: '/user/register',
method: 'post',
data: param,
})
}
// 获取验证码
export function getVerifyCode(param) {
return request({
url: '/user/verifycode',
method: 'get',
params: param,
})
}
// 忘记密码
export function userForgotPass(param) {
return request({
url: '/user/pass',
method: 'post',
data: param,
})
}
// 注销账号
export function userDelete(param) {
return request({
url: '/user/delete',
method: 'delete',
data: param,
})
}
// 获取用户信息
export function getUserInfo(param) {
return request({
url: '/user/info',
method: 'get',
params: param,
})
}
================================================
FILE: web/src/assets/region.js
================================================
const regionData = [
{
"code": "110000",
"value": "北京市",
"label": "北京市",
"children": [
{
"code": "110101",
"value": "东城区",
"label": "东城区"
},
{
"code": "110102",
"value": "西城区",
"label": "西城区"
},
{
"code": "110105",
"value": "朝阳区",
"label": "朝阳区"
},
{
"code": "110106",
"value": "丰台区",
"label": "丰台区"
},
{
"code": "110107",
"value": "石景山区",
"label": "石景山区"
},
{
"code": "110108",
"value": "海淀区",
"label": "海淀区"
},
{
"code": "110109",
"value": "门头沟区",
"label": "门头沟区"
},
{
"code": "110111",
"value": "房山区",
"label": "房山区"
},
{
"code": "110112",
"value": "通州区",
"label": "通州区"
},
{
"code": "110113",
"value": "顺义区",
"label": "顺义区"
},
{
"code": "110114",
"value": "昌平区",
"label": "昌平区"
},
{
"code": "110115",
"value": "大兴区",
"label": "大兴区"
},
{
"code": "110116",
"value": "怀柔区",
"label": "怀柔区"
},
{
"code": "110117",
"value": "平谷区",
"label": "平谷区"
},
{
"code": "110118",
"value": "密云区",
"label": "密云区"
},
{
"code": "110119",
"value": "延庆区",
"label": "延庆区"
}
]
},
{
"code": "120000",
"value": "天津市",
"label": "天津市",
"children": [
{
"code": "120101",
"value": "和平区",
"label": "和平区"
},
{
"code": "120102",
"value": "河东区",
"label": "河东区"
},
{
"code": "120103",
"value": "河西区",
"label": "河西区"
},
{
"code": "120104",
"value": "南开区",
"label": "南开区"
},
{
"code": "120105",
"value": "河北区",
"label": "河北区"
},
{
"code": "120106",
"value": "红桥区",
"label": "红桥区"
},
{
"code": "120110",
"value": "东丽区",
"label": "东丽区"
},
{
"code": "120111",
"value": "西青区",
"label": "西青区"
},
{
"code": "120112",
"value": "津南区",
"label": "津南区"
},
{
"code": "120113",
"value": "北辰区",
"label": "北辰区"
},
{
"code": "120114",
"value": "武清区",
"label": "武清区"
},
{
"code": "120115",
"value": "宝坻区",
"label": "宝坻区"
},
{
"code": "120116",
"value": "滨海新区",
"label": "滨海新区"
},
{
"code": "120117",
"value": "宁河区",
"label": "宁河区"
},
{
"code": "120118",
"value": "静海区",
"label": "静海区"
},
{
"code": "120119",
"value": "蓟州区",
"label": "蓟州区"
}
]
},
{
"code": "130000",
"value": "河北省",
"label": "河北省",
"children": [
{
"code": "130100",
"value": "石家庄市",
"label": "石家庄市",
"children": [
{
"code": "130102",
"value": "长安区",
"label": "长安区"
},
{
"code": "130104",
"value": "桥西区",
"label": "桥西区"
},
{
"code": "130105",
"value": "新华区",
"label": "新华区"
},
{
"code": "130107",
"value": "井陉矿区",
"label": "井陉矿区"
},
{
"code": "130108",
"value": "裕华区",
"label": "裕华区"
},
{
"code": "130109",
"value": "藁城区",
"label": "藁城区"
},
{
"code": "130110",
"value": "鹿泉区",
"label": "鹿泉区"
},
{
"code": "130111",
"value": "栾城区",
"label": "栾城区"
},
{
"code": "130121",
"value": "井陉县",
"label": "井陉县"
},
{
"code": "130123",
"value": "正定县",
"label": "正定县"
},
{
"code": "130125",
"value": "行唐县",
"label": "行唐县"
},
{
"code": "130126",
"value": "灵寿县",
"label": "灵寿县"
},
{
"code": "130127",
"value": "高邑县",
"label": "高邑县"
},
{
"code": "130128",
"value": "深泽县",
"label": "深泽县"
},
{
"code": "130129",
"value": "赞皇县",
"label": "赞皇县"
},
{
"code": "130130",
"value": "无极县",
"label": "无极县"
},
{
"code": "130131",
"value": "平山县",
"label": "平山县"
},
{
"code": "130132",
"value": "元氏县",
"label": "元氏县"
},
{
"code": "130133",
"value": "赵县",
"label": "赵县"
},
{
"code": "130181",
"value": "辛集市",
"label": "辛集市"
},
{
"code": "130183",
"value": "晋州市",
"label": "晋州市"
},
{
"code": "130184",
"value": "新乐市",
"label": "新乐市"
}
]
},
{
"code": "130200",
"value": "唐山市",
"label": "唐山市",
"children": [
{
"code": "130202",
"value": "路南区",
"label": "路南区"
},
{
"code": "130203",
"value": "路北区",
"label": "路北区"
},
{
"code": "130204",
"value": "古冶区",
"label": "古冶区"
},
{
"code": "130205",
"value": "开平区",
"label": "开平区"
},
{
"code": "130207",
"value": "丰南区",
"label": "丰南区"
},
{
"code": "130208",
"value": "丰润区",
"label": "丰润区"
},
{
"code": "130209",
"value": "曹妃甸区",
"label": "曹妃甸区"
},
{
"code": "130224",
"value": "滦南县",
"label": "滦南县"
},
{
"code": "130225",
"value": "乐亭县",
"label": "乐亭县"
},
{
"code": "130227",
"value": "迁西县",
"label": "迁西县"
},
{
"code": "130229",
"value": "玉田县",
"label": "玉田县"
},
{
"code": "130281",
"value": "遵化市",
"label": "遵化市"
},
{
"code": "130283",
"value": "迁安市",
"label": "迁安市"
},
{
"code": "130284",
"value": "滦州市",
"label": "滦州市"
}
]
},
{
"code": "130300",
"value": "秦皇岛市",
"label": "秦皇岛市",
"children": [
{
"code": "130302",
"value": "海港区",
"label": "海港区"
},
{
"code": "130303",
"value": "山海关区",
"label": "山海关区"
},
{
"code": "130304",
"value": "北戴河区",
"label": "北戴河区"
},
{
"code": "130306",
"value": "抚宁区",
"label": "抚宁区"
},
{
"code": "130321",
"value": "青龙满族自治县",
"label": "青龙满族自治县"
},
{
"code": "130322",
"value": "昌黎县",
"label": "昌黎县"
},
{
"code": "130324",
"value": "卢龙县",
"label": "卢龙县"
}
]
},
{
"code": "130400",
"value": "邯郸市",
"label": "邯郸市",
"children": [
{
"code": "130402",
"value": "邯山区",
"label": "邯山区"
},
{
"code": "130403",
"value": "丛台区",
"label": "丛台区"
},
{
"code": "130404",
"value": "复兴区",
"label": "复兴区"
},
{
"code": "130406",
"value": "峰峰矿区",
"label": "峰峰矿区"
},
{
"code": "130407",
"value": "肥乡区",
"label": "肥乡区"
},
{
"code": "130408",
"value": "永年区",
"label": "永年区"
},
{
"code": "130423",
"value": "临漳县",
"label": "临漳县"
},
{
"code": "130424",
"value": "成安县",
"label": "成安县"
},
{
"code": "130425",
"value": "大名县",
"label": "大名县"
},
{
"code": "130426",
"value": "涉县",
"label": "涉县"
},
{
"code": "130427",
"value": "磁县",
"label": "磁县"
},
{
"code": "130430",
"value": "邱县",
"label": "邱县"
},
{
"code": "130431",
"value": "鸡泽县",
"label": "鸡泽县"
},
{
"code": "130432",
"value": "广平县",
"label": "广平县"
},
{
"code": "130433",
"value": "馆陶县",
"label": "馆陶县"
},
{
"code": "130434",
"value": "魏县",
"label": "魏县"
},
{
"code": "130435",
"value": "曲周县",
"label": "曲周县"
},
{
"code": "130481",
"value": "武安市",
"label": "武安市"
}
]
},
{
"code": "130500",
"value": "邢台市",
"label": "邢台市",
"children": [
{
"code": "130502",
"value": "襄都区",
"label": "襄都区"
},
{
"code": "130503",
"value": "信都区",
"label": "信都区"
},
{
"code": "130505",
"value": "任泽区",
"label": "任泽区"
},
{
"code": "130506",
"value": "南和区",
"label": "南和区"
},
{
"code": "130522",
"value": "临城县",
"label": "临城县"
},
{
"code": "130523",
"value": "内丘县",
"label": "内丘县"
},
{
"code": "130524",
"value": "柏乡县",
"label": "柏乡县"
},
{
"code": "130525",
"value": "隆尧县",
"label": "隆尧县"
},
{
"code": "130528",
"value": "宁晋县",
"label": "宁晋县"
},
{
"code": "130529",
"value": "巨鹿县",
"label": "巨鹿县"
},
{
"code": "130530",
"value": "新河县",
"label": "新河县"
},
{
"code": "130531",
"value": "广宗县",
"label": "广宗县"
},
{
"code": "130532",
"value": "平乡县",
"label": "平乡县"
},
{
"code": "130533",
"value": "威县",
"label": "威县"
},
{
"code": "130534",
"value": "清河县",
"label": "清河县"
},
{
"code": "130535",
"value": "临西县",
"label": "临西县"
},
{
"code": "130581",
"value": "南宫市",
"label": "南宫市"
},
{
"code": "130582",
"value": "沙河市",
"label": "沙河市"
}
]
},
{
"code": "130600",
"value": "保定市",
"label": "保定市",
"children": [
{
"code": "130602",
"value": "竞秀区",
"label": "竞秀区"
},
{
"code": "130606",
"value": "莲池区",
"label": "莲池区"
},
{
"code": "130607",
"value": "满城区",
"label": "满城区"
},
{
"code": "130608",
"value": "清苑区",
"label": "清苑区"
},
{
"code": "130609",
"value": "徐水区",
"label": "徐水区"
},
{
"code": "130623",
"value": "涞水县",
"label": "涞水县"
},
{
"code": "130624",
"value": "阜平县",
"label": "阜平县"
},
{
"code": "130626",
"value": "定兴县",
"label": "定兴县"
},
{
"code": "130627",
"value": "唐县",
"label": "唐县"
},
{
"code": "130628",
"value": "高阳县",
"label": "高阳县"
},
{
"code": "130629",
"value": "容城县",
"label": "容城县"
},
{
"code": "130630",
"value": "涞源县",
"label": "涞源县"
},
{
"code": "130631",
"value": "望都县",
"label": "望都县"
},
{
"code": "130632",
"value": "安新县",
"label": "安新县"
},
{
"code": "130633",
"value": "易县",
"label": "易县"
},
{
"code": "130634",
"value": "曲阳县",
"label": "曲阳县"
},
{
"code": "130635",
"value": "蠡县",
"label": "蠡县"
},
{
"code": "130636",
"value": "顺平县",
"label": "顺平县"
},
{
"code": "130637",
"value": "博野县",
"label": "博野县"
},
{
"code": "130638",
"value": "雄县",
"label": "雄县"
},
{
"code": "130681",
"value": "涿州市",
"label": "涿州市"
},
{
"code": "130682",
"value": "定州市",
"label": "定州市"
},
{
"code": "130683",
"value": "安国市",
"label": "安国市"
},
{
"code": "130684",
"value": "高碑店市",
"label": "高碑店市"
}
]
},
{
"code": "130700",
"value": "张家口市",
"label": "张家口市",
"children": [
{
"code": "130702",
"value": "桥东区",
"label": "桥东区"
},
{
"code": "130703",
"value": "桥西区",
"label": "桥西区"
},
{
"code": "130705",
"value": "宣化区",
"label": "宣化区"
},
{
"code": "130706",
"value": "下花园区",
"label": "下花园区"
},
{
"code": "130708",
"value": "万全区",
"label": "万全区"
},
{
"code": "130709",
"value": "崇礼区",
"label": "崇礼区"
},
{
"code": "130722",
"value": "张北县",
"label": "张北县"
},
{
"code": "130723",
"value": "康保县",
"label": "康保县"
},
{
"code": "130724",
"value": "沽源县",
"label": "沽源县"
},
{
"code": "130725",
"value": "尚义县",
"label": "尚义县"
},
{
"code": "130726",
"value": "蔚县",
"label": "蔚县"
},
{
"code": "130727",
"value": "阳原县",
"label": "阳原县"
},
{
"code": "130728",
"value": "怀安县",
"label": "怀安县"
},
{
"code": "130730",
"value": "怀来县",
"label": "怀来县"
},
{
"code": "130731",
"value": "涿鹿县",
"label": "涿鹿县"
},
{
"code": "130732",
"value": "赤城县",
"label": "赤城县"
}
]
},
{
"code": "130800",
"value": "承德市",
"label": "承德市",
"children": [
{
"code": "130802",
"value": "双桥区",
"label": "双桥区"
},
{
"code": "130803",
"value": "双滦区",
"label": "双滦区"
},
{
"code": "130804",
"value": "鹰手营子矿区",
"label": "鹰手营子矿区"
},
{
"code": "130821",
"value": "承德县",
"label": "承德县"
},
{
"code": "130822",
"value": "兴隆县",
"label": "兴隆县"
},
{
"code": "130824",
"value": "滦平县",
"label": "滦平县"
},
{
"code": "130825",
"value": "隆化县",
"label": "隆化县"
},
{
"code": "130826",
"value": "丰宁满族自治县",
"label": "丰宁满族自治县"
},
{
"code": "130827",
"value": "宽城满族自治县",
"label": "宽城满族自治县"
},
{
"code": "130828",
"value": "围场满族蒙古族自治县",
"label": "围场满族蒙古族自治县"
},
{
"code": "130881",
"value": "平泉市",
"label": "平泉市"
}
]
},
{
"code": "130900",
"value": "沧州市",
"label": "沧州市",
"children": [
{
"code": "130902",
"value": "新华区",
"label": "新华区"
},
{
"code": "130903",
"value": "运河区",
"label": "运河区"
},
{
"code": "130921",
"value": "沧县",
"label": "沧县"
},
{
"code": "130922",
"value": "青县",
"label": "青县"
},
{
"code": "130923",
"value": "东光县",
"label": "东光县"
},
{
"code": "130924",
"value": "海兴县",
"label": "海兴县"
},
{
"code": "130925",
"value": "盐山县",
"label": "盐山县"
},
{
"code": "130926",
"value": "肃宁县",
"label": "肃宁县"
},
{
"code": "130927",
"value": "南皮县",
"label": "南皮县"
},
{
"code": "130928",
"value": "吴桥县",
"label": "吴桥县"
},
{
"code": "130929",
"value": "献县",
"label": "献县"
},
{
"code": "130930",
"value": "孟村回族自治县",
"label": "孟村回族自治县"
},
{
"code": "130981",
"value": "泊头市",
"label": "泊头市"
},
{
"code": "130982",
"value": "任丘市",
"label": "任丘市"
},
{
"code": "130983",
"value": "黄骅市",
"label": "黄骅市"
},
{
"code": "130984",
"value": "河间市",
"label": "河间市"
}
]
},
{
"code": "131000",
"value": "廊坊市",
"label": "廊坊市",
"children": [
{
"code": "131002",
"value": "安次区",
"label": "安次区"
},
{
"code": "131003",
"value": "广阳区",
"label": "广阳区"
},
{
"code": "131022",
"value": "固安县",
"label": "固安县"
},
{
"code": "131023",
"value": "永清县",
"label": "永清县"
},
{
"code": "131024",
"value": "香河县",
"label": "香河县"
},
{
"code": "131025",
"value": "大城县",
"label": "大城县"
},
{
"code": "131026",
"value": "文安县",
"label": "文安县"
},
{
"code": "131028",
"value": "大厂回族自治县",
"label": "大厂回族自治县"
},
{
"code": "131081",
"value": "霸州市",
"label": "霸州市"
},
{
"code": "131082",
"value": "三河市",
"label": "三河市"
}
]
},
{
"code": "131100",
"value": "衡水市",
"label": "衡水市",
"children": [
{
"code": "131102",
"value": "桃城区",
"label": "桃城区"
},
{
"code": "131103",
"value": "冀州区",
"label": "冀州区"
},
{
"code": "131121",
"value": "枣强县",
"label": "枣强县"
},
{
"code": "131122",
"value": "武邑县",
"label": "武邑县"
},
{
"code": "131123",
"value": "武强县",
"label": "武强县"
},
{
"code": "131124",
"value": "饶阳县",
"label": "饶阳县"
},
{
"code": "131125",
"value": "安平县",
"label": "安平县"
},
{
"code": "131126",
"value": "故城县",
"label": "故城县"
},
{
"code": "131127",
"value": "景县",
"label": "景县"
},
{
"code": "131128",
"value": "阜城县",
"label": "阜城县"
},
{
"code": "131182",
"value": "深州市",
"label": "深州市"
}
]
}
]
},
{
"code": "140000",
"value": "山西省",
"label": "山西省",
"children": [
{
"code": "140100",
"value": "太原市",
"label": "太原市",
"children": [
{
"code": "140105",
"value": "小店区",
"label": "小店区"
},
{
"code": "140106",
"value": "迎泽区",
"label": "迎泽区"
},
{
"code": "140107",
"value": "杏花岭区",
"label": "杏花岭区"
},
{
"code": "140108",
"value": "尖草坪区",
"label": "尖草坪区"
},
{
"code": "140109",
"value": "万柏林区",
"label": "万柏林区"
},
{
"code": "140110",
"value": "晋源区",
"label": "晋源区"
},
{
"code": "140121",
"value": "清徐县",
"label": "清徐县"
},
{
"code": "140122",
"value": "阳曲县",
"label": "阳曲县"
},
{
"code": "140123",
"value": "娄烦县",
"label": "娄烦县"
},
{
"code": "140181",
"value": "古交市",
"label": "古交市"
}
]
},
{
"code": "140200",
"value": "大同市",
"label": "大同市",
"children": [
{
"code": "140212",
"value": "新荣区",
"label": "新荣区"
},
{
"code": "140213",
"value": "平城区",
"label": "平城区"
},
{
"code": "140214",
"value": "云冈区",
"label": "云冈区"
},
{
"code": "140215",
"value": "云州区",
"label": "云州区"
},
{
"code": "140221",
"value": "阳高县",
"label": "阳高县"
},
{
"code": "140222",
"value": "天镇县",
"label": "天镇县"
},
{
"code": "140223",
"value": "广灵县",
"label": "广灵县"
},
{
"code": "140224",
"value": "灵丘县",
"label": "灵丘县"
},
{
"code": "140225",
"value": "浑源县",
"label": "浑源县"
},
{
"code": "140226",
"value": "左云县",
"label": "左云县"
}
]
},
{
"code": "140300",
"value": "阳泉市",
"label": "阳泉市",
"children": [
{
"code": "140302",
"value": "城区",
"label": "城区"
},
{
"code": "140303",
"value": "矿区",
"label": "矿区"
},
{
"code": "140311",
"value": "郊区",
"label": "郊区"
},
{
"code": "140321",
"value": "平定县",
"label": "平定县"
},
{
"code": "140322",
"value": "盂县",
"label": "盂县"
}
]
},
{
"code": "140400",
"value": "长治市",
"label": "长治市",
"children": [
{
"code": "140403",
"value": "潞州区",
"label": "潞州区"
},
{
"code": "140404",
"value": "上党区",
"label": "上党区"
},
{
"code": "140405",
"value": "屯留区",
"label": "屯留区"
},
{
"code": "140406",
"value": "潞城区",
"label": "潞城区"
},
{
"code": "140423",
"value": "襄垣县",
"label": "襄垣县"
},
{
"code": "140425",
"value": "平顺县",
"label": "平顺县"
},
{
"code": "140426",
"value": "黎城县",
"label": "黎城县"
},
{
"code": "140427",
"value": "壶关县",
"label": "壶关县"
},
{
"code": "140428",
"value": "长子县",
"label": "长子县"
},
{
"code": "140429",
"value": "武乡县",
"label": "武乡县"
},
{
"code": "140430",
"value": "沁县",
"label": "沁县"
},
{
"code": "140431",
"value": "沁源县",
"label": "沁源县"
}
]
},
{
"code": "140500",
"value": "晋城市",
"label": "晋城市",
"children": [
{
"code": "140502",
"value": "城区",
"label": "城区"
},
{
"code": "140521",
"value": "沁水县",
"label": "沁水县"
},
{
"code": "140522",
"value": "阳城县",
"label": "阳城县"
},
{
"code": "140524",
"value": "陵川县",
"label": "陵川县"
},
{
"code": "140525",
"value": "泽州县",
"label": "泽州县"
},
{
"code": "140581",
"value": "高平市",
"label": "高平市"
}
]
},
{
"code": "140600",
"value": "朔州市",
"label": "朔州市",
"children": [
{
"code": "140602",
"value": "朔城区",
"label": "朔城区"
},
{
"code": "140603",
"value": "平鲁区",
"label": "平鲁区"
},
{
"code": "140621",
"value": "山阴县",
"label": "山阴县"
},
{
"code": "140622",
"value": "应县",
"label": "应县"
},
{
"code": "140623",
"value": "右玉县",
"label": "右玉县"
},
{
"code": "140681",
"value": "怀仁市",
"label": "怀仁市"
}
]
},
{
"code": "140700",
"value": "晋中市",
"label": "晋中市",
"children": [
{
"code": "140702",
"value": "榆次区",
"label": "榆次区"
},
{
"code": "140703",
"value": "太谷区",
"label": "太谷区"
},
{
"code": "140721",
"value": "榆社县",
"label": "榆社县"
},
{
"code": "140722",
"value": "左权县",
"label": "左权县"
},
{
"code": "140723",
"value": "和顺县",
"label": "和顺县"
},
{
"code": "140724",
"value": "昔阳县",
"label": "昔阳县"
},
{
"code": "140725",
"value": "寿阳县",
"label": "寿阳县"
},
{
"code": "140727",
"value": "祁县",
"label": "祁县"
},
{
"code": "140728",
"value": "平遥县",
"label": "平遥县"
},
{
"code": "140729",
"value": "灵石县",
"label": "灵石县"
},
{
"code": "140781",
"value": "介休市",
"label": "介休市"
}
]
},
{
"code": "140800",
"value": "运城市",
"label": "运城市",
"children": [
{
"code": "140802",
"value": "盐湖区",
"label": "盐湖区"
},
{
"code": "140821",
"value": "临猗县",
"label": "临猗县"
},
{
"code": "140822",
"value": "万荣县",
"label": "万荣县"
},
{
"code": "140823",
"value": "闻喜县",
"label": "闻喜县"
},
{
"code": "140824",
"value": "稷山县",
"label": "稷山县"
},
{
"code": "140825",
"value": "新绛县",
"label": "新绛县"
},
{
"code": "140826",
"value": "绛县",
"label": "绛县"
},
{
"code": "140827",
"value": "垣曲县",
"label": "垣曲县"
},
{
"code": "140828",
"value": "夏县",
"label": "夏县"
},
{
"code": "140829",
"value": "平陆县",
"label": "平陆县"
},
{
"code": "140830",
"value": "芮城县",
"label": "芮城县"
},
{
"code": "140881",
"value": "永济市",
"label": "永济市"
},
{
"code": "140882",
"value": "河津市",
"label": "河津市"
}
]
},
{
"code": "140900",
"value": "忻州市",
"label": "忻州市",
"children": [
{
"code": "140902",
"value": "忻府区",
"label": "忻府区"
},
{
"code": "140921",
"value": "定襄县",
"label": "定襄县"
},
{
"code": "140922",
"value": "五台县",
"label": "五台县"
},
{
"code": "140923",
"value": "代县",
"label": "代县"
},
{
"code": "140924",
"value": "繁峙县",
"label": "繁峙县"
},
{
"code": "140925",
"value": "宁武县",
"label": "宁武县"
},
{
"code": "140926",
"value": "静乐县",
"label": "静乐县"
},
{
"code": "140927",
"value": "神池县",
"label": "神池县"
},
{
"code": "140928",
"value": "五寨县",
"label": "五寨县"
},
{
"code": "140929",
"value": "岢岚县",
"label": "岢岚县"
},
{
"code": "140930",
"value": "河曲县",
"label": "河曲县"
},
{
"code": "140931",
"value": "保德县",
"label": "保德县"
},
{
"code": "140932",
"value": "偏关县",
"label": "偏关县"
},
{
"code": "140981",
"value": "原平市",
"label": "原平市"
}
]
},
{
"code": "141000",
"value": "临汾市",
"label": "临汾市",
"children": [
{
"code": "141002",
"value": "尧都区",
"label": "尧都区"
},
{
"code": "141021",
"value": "曲沃县",
"label": "曲沃县"
},
{
"code": "141022",
"value": "翼城县",
"label": "翼城县"
},
{
"code": "141023",
"value": "襄汾县",
"label": "襄汾县"
},
{
"code": "141024",
"value": "洪洞县",
"label": "洪洞县"
},
{
"code": "141025",
"value": "古县",
"label": "古县"
},
{
"code": "141026",
"value": "安泽县",
"label": "安泽县"
},
{
"code": "141027",
"value": "浮山县",
"label": "浮山县"
},
{
"code": "141028",
"value": "吉县",
"label": "吉县"
},
{
"code": "141029",
"value": "乡宁县",
"label": "乡宁县"
},
{
"code": "141030",
"value": "大宁县",
"label": "大宁县"
},
{
"code": "141031",
"value": "隰县",
"label": "隰县"
},
{
"code": "141032",
"value": "永和县",
"label": "永和县"
},
{
"code": "141033",
"value": "蒲县",
"label": "蒲县"
},
{
"code": "141034",
"value": "汾西县",
"label": "汾西县"
},
{
"code": "141081",
"value": "侯马市",
"label": "侯马市"
},
{
"code": "141082",
"value": "霍州市",
"label": "霍州市"
}
]
},
{
"code": "141100",
"value": "吕梁市",
"label": "吕梁市",
"children": [
{
"code": "141102",
"value": "离石区",
"label": "离石区"
},
{
"code": "141121",
"value": "文水县",
"label": "文水县"
},
{
"code": "141122",
"value": "交城县",
"label": "交城县"
},
{
"code": "141123",
"value": "兴县",
"label": "兴县"
},
{
"code": "141124",
"value": "临县",
"label": "临县"
},
{
"code": "141125",
"value": "柳林县",
"label": "柳林县"
},
{
"code": "141126",
"value": "石楼县",
"label": "石楼县"
},
{
"code": "141127",
"value": "岚县",
"label": "岚县"
},
{
"code": "141128",
"value": "方山县",
"label": "方山县"
},
{
"code": "141129",
"value": "中阳县",
"label": "中阳县"
},
{
"code": "141130",
"value": "交口县",
"label": "交口县"
},
{
"code": "141181",
"value": "孝义市",
"label": "孝义市"
},
{
"code": "141182",
"value": "汾阳市",
"label": "汾阳市"
}
]
}
]
},
{
"code": "150000",
"value": "内蒙古自治区",
"label": "内蒙古自治区",
"children": [
{
"code": "150100",
"value": "呼和浩特市",
"label": "呼和浩特市",
"children": [
{
"code": "150102",
"value": "新城区",
"label": "新城区"
},
{
"code": "150103",
"value": "回民区",
"label": "回民区"
},
{
"code": "150104",
"value": "玉泉区",
"label": "玉泉区"
},
{
"code": "150105",
"value": "赛罕区",
"label": "赛罕区"
},
{
"code": "150121",
"value": "土默特左旗",
"label": "土默特左旗"
},
{
"code": "150122",
"value": "托克托县",
"label": "托克托县"
},
{
"code": "150123",
"value": "和林格尔县",
"label": "和林格尔县"
},
{
"code": "150124",
"value": "清水河县",
"label": "清水河县"
},
{
"code": "150125",
"value": "武川县",
"label": "武川县"
}
]
},
{
"code": "150200",
"value": "包头市",
"label": "包头市",
"children": [
{
"code": "150202",
"value": "东河区",
"label": "东河区"
},
{
"code": "150203",
"value": "昆都仑区",
"label": "昆都仑区"
},
{
"code": "150204",
"value": "青山区",
"label": "青山区"
},
{
"code": "150205",
"value": "石拐区",
"label": "石拐区"
},
{
"code": "150206",
"value": "白云鄂博矿区",
"label": "白云鄂博矿区"
},
{
"code": "150207",
"value": "九原区",
"label": "九原区"
},
{
"code": "150221",
"value": "土默特右旗",
"label": "土默特右旗"
},
{
"code": "150222",
"value": "固阳县",
"label": "固阳县"
},
{
"code": "150223",
"value": "达尔罕茂明安联合旗",
"label": "达尔罕茂明安联合旗"
}
]
},
{
"code": "150300",
"value": "乌海市",
"label": "乌海市",
"children": [
{
"code": "150302",
"value": "海勃湾区",
"label": "海勃湾区"
},
{
"code": "150303",
"value": "海南区",
"label": "海南区"
},
{
"code": "150304",
"value": "乌达区",
"label": "乌达区"
}
]
},
{
"code": "150400",
"value": "赤峰市",
"label": "赤峰市",
"children": [
{
"code": "150402",
"value": "红山区",
"label": "红山区"
},
{
"code": "150403",
"value": "元宝山区",
"label": "元宝山区"
},
{
"code": "150404",
"value": "松山区",
"label": "松山区"
},
{
"code": "150421",
"value": "阿鲁科尔沁旗",
"label": "阿鲁科尔沁旗"
},
{
"code": "150422",
"value": "巴林左旗",
"label": "巴林左旗"
},
{
"code": "150423",
"value": "巴林右旗",
"label": "巴林右旗"
},
{
"code": "150424",
"value": "林西县",
"label": "林西县"
},
{
"code": "150425",
"value": "克什克腾旗",
"label": "克什克腾旗"
},
{
"code": "150426",
"value": "翁牛特旗",
"label": "翁牛特旗"
},
{
"code": "150428",
"value": "喀喇沁旗",
"label": "喀喇沁旗"
},
{
"code": "150429",
"value": "宁城县",
"label": "宁城县"
},
{
"code": "150430",
"value": "敖汉旗",
"label": "敖汉旗"
}
]
},
{
"code": "150500",
"value": "通辽市",
"label": "通辽市",
"children": [
{
"code": "150502",
"value": "科尔沁区",
"label": "科尔沁区"
},
{
"code": "150521",
"value": "科尔沁左翼中旗",
"label": "科尔沁左翼中旗"
},
{
"code": "150522",
"value": "科尔沁左翼后旗",
"label": "科尔沁左翼后旗"
},
{
"code": "150523",
"value": "开鲁县",
"label": "开鲁县"
},
{
"code": "150524",
"value": "库伦旗",
"label": "库伦旗"
},
{
"code": "150525",
"value": "奈曼旗",
"label": "奈曼旗"
},
{
"code": "150526",
"value": "扎鲁特旗",
"label": "扎鲁特旗"
},
{
"code": "150581",
"value": "霍林郭勒市",
"label": "霍林郭勒市"
}
]
},
{
"code": "150600",
"value": "鄂尔多斯市",
"label": "鄂尔多斯市",
"children": [
{
"code": "150602",
"value": "东胜区",
"label": "东胜区"
},
{
"code": "150603",
"value": "康巴什区",
"label": "康巴什区"
},
{
"code": "150621",
"value": "达拉特旗",
"label": "达拉特旗"
},
{
"code": "150622",
"value": "准格尔旗",
"label": "准格尔旗"
},
{
"code": "150623",
"value": "鄂托克前旗",
"label": "鄂托克前旗"
},
{
"code": "150624",
"value": "鄂托克旗",
"label": "鄂托克旗"
},
{
"code": "150625",
"value": "杭锦旗",
"label": "杭锦旗"
},
{
"code": "150626",
"value": "乌审旗",
"label": "乌审旗"
},
{
"code": "150627",
"value": "伊金霍洛旗",
"label": "伊金霍洛旗"
}
]
},
{
"code": "150700",
"value": "呼伦贝尔市",
"label": "呼伦贝尔市",
"children": [
{
"code": "150702",
"value": "海拉尔区",
"label": "海拉尔区"
},
{
"code": "150703",
"value": "扎赉诺尔区",
"label": "扎赉诺尔区"
},
{
"code": "150721",
"value": "阿荣旗",
"label": "阿荣旗"
},
{
"code": "150722",
"value": "莫力达瓦达斡尔族自治旗",
"label": "莫力达瓦达斡尔族自治旗"
},
{
"code": "150723",
"value": "鄂伦春自治旗",
"label": "鄂伦春自治旗"
},
{
"code": "150724",
"value": "鄂温克族自治旗",
"label": "鄂温克族自治旗"
},
{
"code": "150725",
"value": "陈巴尔虎旗",
"label": "陈巴尔虎旗"
},
{
"code": "150726",
"value": "新巴尔虎左旗",
"label": "新巴尔虎左旗"
},
{
"code": "150727",
"value": "新巴尔虎右旗",
"label": "新巴尔虎右旗"
},
{
"code": "150781",
"value": "满洲里市",
"label": "满洲里市"
},
{
"code": "150782",
"value": "牙克石市",
"label": "牙克石市"
},
{
"code": "150783",
"value": "扎兰屯市",
"label": "扎兰屯市"
},
{
"code": "150784",
"value": "额尔古纳市",
"label": "额尔古纳市"
},
{
"code": "150785",
"value": "根河市",
"label": "根河市"
}
]
},
{
"code": "150800",
"value": "巴彦淖尔市",
"label": "巴彦淖尔市",
"children": [
{
"code": "150802",
"value": "临河区",
"label": "临河区"
},
{
"code": "150821",
"value": "五原县",
"label": "五原县"
},
{
"code": "150822",
"value": "磴口县",
"label": "磴口县"
},
{
"code": "150823",
"value": "乌拉特前旗",
"label": "乌拉特前旗"
},
{
"code": "150824",
"value": "乌拉特中旗",
"label": "乌拉特中旗"
},
{
"code": "150825",
"value": "乌拉特后旗",
"label": "乌拉特后旗"
},
{
"code": "150826",
"value": "杭锦后旗",
"label": "杭锦后旗"
}
]
},
{
"code": "150900",
"value": "乌兰察布市",
"label": "乌兰察布市",
"children": [
{
"code": "150902",
"value": "集宁区",
"label": "集宁区"
},
{
"code": "150921",
"value": "卓资县",
"label": "卓资县"
},
{
"code": "150922",
"value": "化德县",
"label": "化德县"
},
{
"code": "150923",
"value": "商都县",
"label": "商都县"
},
{
"code": "150924",
"value": "兴和县",
"label": "兴和县"
},
{
"code": "150925",
"value": "凉城县",
"label": "凉城县"
},
{
"code": "150926",
"value": "察哈尔右翼前旗",
"label": "察哈尔右翼前旗"
},
{
"code": "150927",
"value": "察哈尔右翼中旗",
"label": "察哈尔右翼中旗"
},
{
"code": "150928",
"value": "察哈尔右翼后旗",
"label": "察哈尔右翼后旗"
},
{
"code": "150929",
"value": "四子王旗",
"label": "四子王旗"
},
{
"code": "150981",
"value": "丰镇市",
"label": "丰镇市"
}
]
},
{
"code": "152200",
"value": "兴安盟",
"label": "兴安盟",
"children": [
{
"code": "152201",
"value": "乌兰浩特市",
"label": "乌兰浩特市"
},
{
"code": "152202",
"value": "阿尔山市",
"label": "阿尔山市"
},
{
"code": "152221",
"value": "科尔沁右翼前旗",
"label": "科尔沁右翼前旗"
},
{
"code": "152222",
"value": "科尔沁右翼中旗",
"label": "科尔沁右翼中旗"
},
{
"code": "152223",
"value": "扎赉特旗",
"label": "扎赉特旗"
},
{
"code": "152224",
"value": "突泉县",
"label": "突泉县"
}
]
},
{
"code": "152500",
"value": "锡林郭勒盟",
"label": "锡林郭勒盟",
"children": [
{
"code": "152501",
"value": "二连浩特市",
"label": "二连浩特市"
},
{
"code": "152502",
"value": "锡林浩特市",
"label": "锡林浩特市"
},
{
"code": "152522",
"value": "阿巴嘎旗",
"label": "阿巴嘎旗"
},
{
"code": "152523",
"value": "苏尼特左旗",
"label": "苏尼特左旗"
},
{
"code": "152524",
"value": "苏尼特右旗",
"label": "苏尼特右旗"
},
{
"code": "152525",
"value": "东乌珠穆沁旗",
"label": "东乌珠穆沁旗"
},
{
"code": "152526",
"value": "西乌珠穆沁旗",
"label": "西乌珠穆沁旗"
},
{
"code": "152527",
"value": "太仆寺旗",
"label": "太仆寺旗"
},
{
"code": "152528",
"value": "镶黄旗",
"label": "镶黄旗"
},
{
"code": "152529",
"value": "正镶白旗",
"label": "正镶白旗"
},
{
"code": "152530",
"value": "正蓝旗",
"label": "正蓝旗"
},
{
"code": "152531",
"value": "多伦县",
"label": "多伦县"
}
]
},
{
"code": "152900",
"value": "阿拉善盟",
"label": "阿拉善盟",
"children": [
{
"code": "152921",
"value": "阿拉善左旗",
"label": "阿拉善左旗"
},
{
"code": "152922",
"value": "阿拉善右旗",
"label": "阿拉善右旗"
},
{
"code": "152923",
"value": "额济纳旗",
"label": "额济纳旗"
}
]
}
]
},
{
"code": "210000",
"value": "辽宁省",
"label": "辽宁省",
"children": [
{
"code": "210100",
"value": "沈阳市",
"label": "沈阳市",
"children": [
{
"code": "210102",
"value": "和平区",
"label": "和平区"
},
{
"code": "210103",
"value": "沈河区",
"label": "沈河区"
},
{
"code": "210104",
"value": "大东区",
"label": "大东区"
},
{
"code": "210105",
"value": "皇姑区",
"label": "皇姑区"
},
{
"code": "210106",
"value": "铁西区",
"label": "铁西区"
},
{
"code": "210111",
"value": "苏家屯区",
"label": "苏家屯区"
},
{
"code": "210112",
"value": "浑南区",
"label": "浑南区"
},
{
"code": "210113",
"value": "沈北新区",
"label": "沈北新区"
},
{
"code": "210114",
"value": "于洪区",
"label": "于洪区"
},
{
"code": "210115",
"value": "辽中区",
"label": "辽中区"
},
{
"code": "210123",
"value": "康平县",
"label": "康平县"
},
{
"code": "210124",
"value": "法库县",
"label": "法库县"
},
{
"code": "210181",
"value": "新民市",
"label": "新民市"
}
]
},
{
"code": "210200",
"value": "大连市",
"label": "大连市",
"children": [
{
"code": "210202",
"value": "中山区",
"label": "中山区"
},
{
"code": "210203",
"value": "西岗区",
"label": "西岗区"
},
{
"code": "210204",
"value": "沙河口区",
"label": "沙河口区"
},
{
"code": "210211",
"value": "甘井子区",
"label": "甘井子区"
},
{
"code": "210212",
"value": "旅顺口区",
"label": "旅顺口区"
},
{
"code": "210213",
"value": "金州区",
"label": "金州区"
},
{
"code": "210214",
"value": "普兰店区",
"label": "普兰店区"
},
{
"code": "210224",
"value": "长海县",
"label": "长海县"
},
{
"code": "210281",
"value": "瓦房店市",
"label": "瓦房店市"
},
{
"code": "210283",
"value": "庄河市",
"label": "庄河市"
}
]
},
{
"code": "210300",
"value": "鞍山市",
"label": "鞍山市",
"children": [
{
"code": "210302",
"value": "铁东区",
"label": "铁东区"
},
{
"code": "210303",
"value": "铁西区",
"label": "铁西区"
},
{
"code": "210304",
"value": "立山区",
"label": "立山区"
},
{
"code": "210311",
"value": "千山区",
"label": "千山区"
},
{
"code": "210321",
"value": "台安县",
"label": "台安县"
},
{
"code": "210323",
"value": "岫岩满族自治县",
"label": "岫岩满族自治县"
},
{
"code": "210381",
"value": "海城市",
"label": "海城市"
}
]
},
{
"code": "210400",
"value": "抚顺市",
"label": "抚顺市",
"children": [
{
"code": "210402",
"value": "新抚区",
"label": "新抚区"
},
{
"code": "210403",
"value": "东洲区",
"label": "东洲区"
},
{
"code": "210404",
"value": "望花区",
"label": "望花区"
},
{
"code": "210411",
"value": "顺城区",
"label": "顺城区"
},
{
"code": "210421",
"value": "抚顺县",
"label": "抚顺县"
},
{
"code": "210422",
"value": "新宾满族自治县",
"label": "新宾满族自治县"
},
{
"code": "210423",
"value": "清原满族自治县",
"label": "清原满族自治县"
}
]
},
{
"code": "210500",
"value": "本溪市",
"label": "本溪市",
"children": [
{
"code": "210502",
"value": "平山区",
"label": "平山区"
},
{
"code": "210503",
"value": "溪湖区",
"label": "溪湖区"
},
{
"code": "210504",
"value": "明山区",
"label": "明山区"
},
{
"code": "210505",
"value": "南芬区",
"label": "南芬区"
},
{
"code": "210521",
"value": "本溪满族自治县",
"label": "本溪满族自治县"
},
{
"code": "210522",
"value": "桓仁满族自治县",
"label": "桓仁满族自治县"
}
]
},
{
"code": "210600",
"value": "丹东市",
"label": "丹东市",
"children": [
{
"code": "210602",
"value": "元宝区",
"label": "元宝区"
},
{
"code": "210603",
"value": "振兴区",
"label": "振兴区"
},
{
"code": "210604",
"value": "振安区",
"label": "振安区"
},
{
"code": "210624",
"value": "宽甸满族自治县",
"label": "宽甸满族自治县"
},
{
"code": "210681",
"value": "东港市",
"label": "东港市"
},
{
"code": "210682",
"value": "凤城市",
"label": "凤城市"
}
]
},
{
"code": "210700",
"value": "锦州市",
"label": "锦州市",
"children": [
{
"code": "210702",
"value": "古塔区",
"label": "古塔区"
},
{
"code": "210703",
"value": "凌河区",
"label": "凌河区"
},
{
"code": "210711",
"value": "太和区",
"label": "太和区"
},
{
"code": "210726",
"value": "黑山县",
"label": "黑山县"
},
{
"code": "210727",
"value": "义县",
"label": "义县"
},
{
"code": "210781",
"value": "凌海市",
"label": "凌海市"
},
{
"code": "210782",
"value": "北镇市",
"label": "北镇市"
}
]
},
{
"code": "210800",
"value": "营口市",
"label": "营口市",
"children": [
{
"code": "210802",
"value": "站前区",
"label": "站前区"
},
{
"code": "210803",
"value": "西市区",
"label": "西市区"
},
{
"code": "210804",
"value": "鲅鱼圈区",
"label": "鲅鱼圈区"
},
{
"code": "210811",
"value": "老边区",
"label": "老边区"
},
{
"code": "210881",
"value": "盖州市",
"label": "盖州市"
},
{
"code": "210882",
"value": "大石桥市",
"label": "大石桥市"
}
]
},
{
"code": "210900",
"value": "阜新市",
"label": "阜新市",
"children": [
{
"code": "210902",
"value": "海州区",
"label": "海州区"
},
{
"code": "210903",
"value": "新邱区",
"label": "新邱区"
},
{
"code": "210904",
"value": "太平区",
"label": "太平区"
},
{
"code": "210905",
"value": "清河门区",
"label": "清河门区"
},
{
"code": "210911",
"value": "细河区",
"label": "细河区"
},
{
"code": "210921",
"value": "阜新蒙古族自治县",
"label": "阜新蒙古族自治县"
},
{
"code": "210922",
"value": "彰武县",
"label": "彰武县"
}
]
},
{
"code": "211000",
"value": "辽阳市",
"label": "辽阳市",
"children": [
{
"code": "211002",
"value": "白塔区",
"label": "白塔区"
},
{
"code": "211003",
"value": "文圣区",
"label": "文圣区"
},
{
"code": "211004",
"value": "宏伟区",
"label": "宏伟区"
},
{
"code": "211005",
"value": "弓长岭区",
"label": "弓长岭区"
},
{
"code": "211011",
"value": "太子河区",
"label": "太子河区"
},
{
"code": "211021",
"value": "辽阳县",
"label": "辽阳县"
},
{
"code": "211081",
"value": "灯塔市",
"label": "灯塔市"
}
]
},
{
"code": "211100",
"value": "盘锦市",
"label": "盘锦市",
"children": [
{
"code": "211102",
"value": "双台子区",
"label": "双台子区"
},
{
"code": "211103",
"value": "兴隆台区",
"label": "兴隆台区"
},
{
"code": "211104",
"value": "大洼区",
"label": "大洼区"
},
{
"code": "211122",
"value": "盘山县",
"label": "盘山县"
}
]
},
{
"code": "211200",
"value": "铁岭市",
"label": "铁岭市",
"children": [
{
"code": "211202",
"value": "银州区",
"label": "银州区"
},
{
"code": "211204",
"value": "清河区",
"label": "清河区"
},
{
"code": "211221",
"value": "铁岭县",
"label": "铁岭县"
},
{
"code": "211223",
"value": "西丰县",
"label": "西丰县"
},
{
"code": "211224",
"value": "昌图县",
"label": "昌图县"
},
{
"code": "211281",
"value": "调兵山市",
"label": "调兵山市"
},
{
"code": "211282",
"value": "开原市",
"label": "开原市"
}
]
},
{
"code": "211300",
"value": "朝阳市",
"label": "朝阳市",
"children": [
{
"code": "211302",
"value": "双塔区",
"label": "双塔区"
},
{
"code": "211303",
"value": "龙城区",
"label": "龙城区"
},
{
"code": "211321",
"value": "朝阳县",
"label": "朝阳县"
},
{
"code": "211322",
"value": "建平县",
"label": "建平县"
},
{
"code": "211324",
"value": "喀喇沁左翼蒙古族自治县",
"label": "喀喇沁左翼蒙古族自治县"
},
{
"code": "211381",
"value": "北票市",
"label": "北票市"
},
{
"code": "211382",
"value": "凌源市",
"label": "凌源市"
}
]
},
{
"code": "211400",
"value": "葫芦岛市",
"label": "葫芦岛市",
"children": [
{
"code": "211402",
"value": "连山区",
"label": "连山区"
},
{
"code": "211403",
"value": "龙港区",
"label": "龙港区"
},
{
"code": "211404",
"value": "南票区",
"label": "南票区"
},
{
"code": "211421",
"value": "绥中县",
"label": "绥中县"
},
{
"code": "211422",
"value": "建昌县",
"label": "建昌县"
},
{
"code": "211481",
"value": "兴城市",
"label": "兴城市"
}
]
}
]
},
{
"code": "220000",
"value": "吉林省",
"label": "吉林省",
"children": [
{
"code": "220100",
"value": "长春市",
"label": "长春市",
"children": [
{
"code": "220102",
"value": "南关区",
"label": "南关区"
},
{
"code": "220103",
"value": "宽城区",
"label": "宽城区"
},
{
"code": "220104",
"value": "朝阳区",
"label": "朝阳区"
},
{
"code": "220105",
"value": "二道区",
"label": "二道区"
},
{
"code": "220106",
"value": "绿园区",
"label": "绿园区"
},
{
"code": "220112",
"value": "双阳区",
"label": "双阳区"
},
{
"code": "220113",
"value": "九台区",
"label": "九台区"
},
{
"code": "220122",
"value": "农安县",
"label": "农安县"
},
{
"code": "220182",
"value": "榆树市",
"label": "榆树市"
},
{
"code": "220183",
"value": "德惠市",
"label": "德惠市"
},
{
"code": "220184",
"value": "公主岭市",
"label": "公主岭市"
}
]
},
{
"code": "220200",
"value": "吉林市",
"label": "吉林市",
"children": [
{
"code": "220202",
"value": "昌邑区",
"label": "昌邑区"
},
{
"code": "220203",
"value": "龙潭区",
"label": "龙潭区"
},
{
"code": "220204",
"value": "船营区",
"label": "船营区"
},
{
"code": "220211",
"value": "丰满区",
"label": "丰满区"
},
{
"code": "220221",
"value": "永吉县",
"label": "永吉县"
},
{
"code": "220281",
"value": "蛟河市",
"label": "蛟河市"
},
{
"code": "220282",
"value": "桦甸市",
"label": "桦甸市"
},
{
"code": "220283",
"value": "舒兰市",
"label": "舒兰市"
},
{
"code": "220284",
"value": "磐石市",
"label": "磐石市"
}
]
},
{
"code": "220300",
"value": "四平市",
"label": "四平市",
"children": [
{
"code": "220302",
"value": "铁西区",
"label": "铁西区"
},
{
"code": "220303",
"value": "铁东区",
"label": "铁东区"
},
{
"code": "220322",
"value": "梨树县",
"label": "梨树县"
},
{
"code": "220323",
"value": "伊通满族自治县",
"label": "伊通满族自治县"
},
{
"code": "220382",
"value": "双辽市",
"label": "双辽市"
}
]
},
{
"code": "220400",
"value": "辽源市",
"label": "辽源市",
"children": [
{
"code": "220402",
"value": "龙山区",
"label": "龙山区"
},
{
"code": "220403",
"value": "西安区",
"label": "西安区"
},
{
"code": "220421",
"value": "东丰县",
"label": "东丰县"
},
{
"code": "220422",
"value": "东辽县",
"label": "东辽县"
}
]
},
{
"code": "220500",
"value": "通化市",
"label": "通化市",
"children": [
{
"code": "220502",
"value": "东昌区",
"label": "东昌区"
},
{
"code": "220503",
"value": "二道江区",
"label": "二道江区"
},
{
"code": "220521",
"value": "通化县",
"label": "通化县"
},
{
"code": "220523",
"value": "辉南县",
"label": "辉南县"
},
{
"code": "220524",
"value": "柳河县",
"label": "柳河县"
},
{
"code": "220581",
"value": "梅河口市",
"label": "梅河口市"
},
{
"code": "220582",
"value": "集安市",
"label": "集安市"
}
]
},
{
"code": "220600",
"value": "白山市",
"label": "白山市",
"children": [
{
"code": "220602",
"value": "浑江区",
"label": "浑江区"
},
{
"code": "220605",
"value": "江源区",
"label": "江源区"
},
{
"code": "220621",
"value": "抚松县",
"label": "抚松县"
},
{
"code": "220622",
"value": "靖宇县",
"label": "靖宇县"
},
{
"code": "220623",
"value": "长白朝鲜族自治县",
"label": "长白朝鲜族自治县"
},
{
"code": "220681",
"value": "临江市",
"label": "临江市"
}
]
},
{
"code": "220700",
"value": "松原市",
"label": "松原市",
"children": [
{
"code": "220702",
"value": "宁江区",
"label": "宁江区"
},
{
"code": "220721",
"value": "前郭尔罗斯蒙古族自治县",
"label": "前郭尔罗斯蒙古族自治县"
},
{
"code": "220722",
"value": "长岭县",
"label": "长岭县"
},
{
"code": "220723",
"value": "乾安县",
"label": "乾安县"
},
{
"code": "220781",
"value": "扶余市",
"label": "扶余市"
}
]
},
{
"code": "220800",
"value": "白城市",
"label": "白城市",
"children": [
{
"code": "220802",
"value": "洮北区",
"label": "洮北区"
},
{
"code": "220821",
"value": "镇赉县",
"label": "镇赉县"
},
{
"code": "220822",
"value": "通榆县",
"label": "通榆县"
},
{
"code": "220881",
"value": "洮南市",
"label": "洮南市"
},
{
"code": "220882",
"value": "大安市",
"label": "大安市"
}
]
},
{
"code": "222400",
"value": "延边朝鲜族自治州",
"label": "延边朝鲜族自治州",
"children": [
{
"code": "222401",
"value": "延吉市",
"label": "延吉市"
},
{
"code": "222402",
"value": "图们市",
"label": "图们市"
},
{
"code": "222403",
"value": "敦化市",
"label": "敦化市"
},
{
"code": "222404",
"value": "珲春市",
"label": "珲春市"
},
{
"code": "222405",
"value": "龙井市",
"label": "龙井市"
},
{
"code": "222406",
"value": "和龙市",
"label": "和龙市"
},
{
"code": "222424",
"value": "汪清县",
"label": "汪清县"
},
{
"code": "222426",
"value": "安图县",
"label": "安图县"
}
]
}
]
},
{
"code": "230000",
"value": "黑龙江省",
"label": "黑龙江省",
"children": [
{
"code": "230100",
"value": "哈尔滨市",
"label": "哈尔滨市",
"children": [
{
"code": "230102",
"value": "道里区",
"label": "道里区"
},
{
"code": "230103",
"value": "南岗区",
"label": "南岗区"
},
{
"code": "230104",
"value": "道外区",
"label": "道外区"
},
{
"code": "230108",
"value": "平房区",
"label": "平房区"
},
{
"code": "230109",
"value": "松北区",
"label": "松北区"
},
{
"code": "230110",
"value": "香坊区",
"label": "香坊区"
},
{
"code": "230111",
"value": "呼兰区",
"label": "呼兰区"
},
{
"code": "230112",
"value": "阿城区",
"label": "阿城区"
},
{
"code": "230113",
"value": "双城区",
"label": "双城区"
},
{
"code": "230123",
"value": "依兰县",
"label": "依兰县"
},
{
"code": "230124",
"value": "方正县",
"label": "方正县"
},
{
"code": "230125",
"value": "宾县",
"label": "宾县"
},
{
"code": "230126",
"value": "巴彦县",
"label": "巴彦县"
},
{
"code": "230127",
"value": "木兰县",
"label": "木兰县"
},
{
"code": "230128",
"value": "通河县",
"label": "通河县"
},
{
"code": "230129",
"value": "延寿县",
"label": "延寿县"
},
{
"code": "230183",
"value": "尚志市",
"label": "尚志市"
},
{
"code": "230184",
"value": "五常市",
"label": "五常市"
}
]
},
{
"code": "230200",
"value": "齐齐哈尔市",
"label": "齐齐哈尔市",
"children": [
{
"code": "230202",
"value": "龙沙区",
"label": "龙沙区"
},
{
"code": "230203",
"value": "建华区",
"label": "建华区"
},
{
"code": "230204",
"value": "铁锋区",
"label": "铁锋区"
},
{
"code": "230205",
"value": "昂昂溪区",
"label": "昂昂溪区"
},
{
"code": "230206",
"value": "富拉尔基区",
"label": "富拉尔基区"
},
{
"code": "230207",
"value": "碾子山区",
"label": "碾子山区"
},
{
"code": "230208",
"value": "梅里斯达斡尔族区",
"label": "梅里斯达斡尔族区"
},
{
"code": "230221",
"value": "龙江县",
"label": "龙江县"
},
{
"code": "230223",
"value": "依安县",
"label": "依安县"
},
{
"code": "230224",
"value": "泰来县",
"label": "泰来县"
},
{
"code": "230225",
"value": "甘南县",
"label": "甘南县"
},
{
"code": "230227",
"value": "富裕县",
"label": "富裕县"
},
{
"code": "230229",
"value": "克山县",
"label": "克山县"
},
{
"code": "230230",
"value": "克东县",
"label": "克东县"
},
{
"code": "230231",
"value": "拜泉县",
"label": "拜泉县"
},
{
"code": "230281",
"value": "讷河市",
"label": "讷河市"
}
]
},
{
"code": "230300",
"value": "鸡西市",
"label": "鸡西市",
"children": [
{
"code": "230302",
"value": "鸡冠区",
"label": "鸡冠区"
},
{
"code": "230303",
"value": "恒山区",
"label": "恒山区"
},
{
"code": "230304",
"value": "滴道区",
"label": "滴道区"
},
{
"code": "230305",
"value": "梨树区",
"label": "梨树区"
},
{
"code": "230306",
"value": "城子河区",
"label": "城子河区"
},
{
"code": "230307",
"value": "麻山区",
"label": "麻山区"
},
{
"code": "230321",
"value": "鸡东县",
"label": "鸡东县"
},
{
"code": "230381",
"value": "虎林市",
"label": "虎林市"
},
{
"code": "230382",
"value": "密山市",
"label": "密山市"
}
]
},
{
"code": "230400",
"value": "鹤岗市",
"label": "鹤岗市",
"children": [
{
"code": "230402",
"value": "向阳区",
"label": "向阳区"
},
{
"code": "230403",
"value": "工农区",
"label": "工农区"
},
{
"code": "230404",
"value": "南山区",
"label": "南山区"
},
{
"code": "230405",
"value": "兴安区",
"label": "兴安区"
},
{
"code": "230406",
"value": "东山区",
"label": "东山区"
},
{
"code": "230407",
"value": "兴山区",
"label": "兴山区"
},
{
"code": "230421",
"value": "萝北县",
"label": "萝北县"
},
{
"code": "230422",
"value": "绥滨县",
"label": "绥滨县"
}
]
},
{
"code": "230500",
"value": "双鸭山市",
"label": "双鸭山市",
"children": [
{
"code": "230502",
"value": "尖山区",
"label": "尖山区"
},
{
"code": "230503",
"value": "岭东区",
"label": "岭东区"
},
{
"code": "230505",
"value": "四方台区",
"label": "四方台区"
},
{
"code": "230506",
"value": "宝山区",
"label": "宝山区"
},
{
"code": "230521",
"value": "集贤县",
"label": "集贤县"
},
{
"code": "230522",
"value": "友谊县",
"label": "友谊县"
},
{
"code": "230523",
"value": "宝清县",
"label": "宝清县"
},
{
"code": "230524",
"value": "饶河县",
"label": "饶河县"
}
]
},
{
"code": "230600",
"value": "大庆市",
"label": "大庆市",
"children": [
{
"code": "230602",
"value": "萨尔图区",
"label": "萨尔图区"
},
{
"code": "230603",
"value": "龙凤区",
"label": "龙凤区"
},
{
"code": "230604",
"value": "让胡路区",
"label": "让胡路区"
},
{
"code": "230605",
"value": "红岗区",
"label": "红岗区"
},
{
"code": "230606",
"value": "大同区",
"label": "大同区"
},
{
"code": "230621",
"value": "肇州县",
"label": "肇州县"
},
{
"code": "230622",
"value": "肇源县",
"label": "肇源县"
},
{
"code": "230623",
"value": "林甸县",
"label": "林甸县"
},
{
"code": "230624",
"value": "杜尔伯特蒙古族自治县",
"label": "杜尔伯特蒙古族自治县"
}
]
},
{
"code": "230700",
"value": "伊春市",
"label": "伊春市",
"children": [
{
"code": "230717",
"value": "伊美区",
"label": "伊美区"
},
{
"code": "230718",
"value": "乌翠区",
"label": "乌翠区"
},
{
"code": "230719",
"value": "友好区",
"label": "友好区"
},
{
"code": "230722",
"value": "嘉荫县",
"label": "嘉荫县"
},
{
"code": "230723",
"value": "汤旺县",
"label": "汤旺县"
},
{
"code": "230724",
"value": "丰林县",
"label": "丰林县"
},
{
"code": "230725",
"value": "大箐山县",
"label": "大箐山县"
},
{
"code": "230726",
"value": "南岔县",
"label": "南岔县"
},
{
"code": "230751",
"value": "金林区",
"label": "金林区"
},
{
"code": "230781",
"value": "铁力市",
"label": "铁力市"
}
]
},
{
"code": "230800",
"value": "佳木斯市",
"label": "佳木斯市",
"children": [
{
"code": "230803",
"value": "向阳区",
"label": "向阳区"
},
{
"code": "230804",
"value": "前进区",
"label": "前进区"
},
{
"code": "230805",
"value": "东风区",
"label": "东风区"
},
{
"code": "230811",
"value": "郊区",
"label": "郊区"
},
{
"code": "230822",
"value": "桦南县",
"label": "桦南县"
},
{
"code": "230826",
"value": "桦川县",
"label": "桦川县"
},
{
"code": "230828",
"value": "汤原县",
"label": "汤原县"
},
{
"code": "230881",
"value": "同江市",
"label": "同江市"
},
{
"code": "230882",
"value": "富锦市",
"label": "富锦市"
},
{
"code": "230883",
"value": "抚远市",
"label": "抚远市"
}
]
},
{
"code": "230900",
"value": "七台河市",
"label": "七台河市",
"children": [
{
"code": "230902",
"value": "新兴区",
"label": "新兴区"
},
{
"code": "230903",
"value": "桃山区",
"label": "桃山区"
},
{
"code": "230904",
"value": "茄子河区",
"label": "茄子河区"
},
{
"code": "230921",
"value": "勃利县",
"label": "勃利县"
}
]
},
{
"code": "231000",
"value": "牡丹江市",
"label": "牡丹江市",
"children": [
{
"code": "231002",
"value": "东安区",
"label": "东安区"
},
{
"code": "231003",
"value": "阳明区",
"label": "阳明区"
},
{
"code": "231004",
"value": "爱民区",
"label": "爱民区"
},
{
"code": "231005",
"value": "西安区",
"label": "西安区"
},
{
"code": "231025",
"value": "林口县",
"label": "林口县"
},
{
"code": "231081",
"value": "绥芬河市",
"label": "绥芬河市"
},
{
"code": "231083",
"value": "海林市",
"label": "海林市"
},
{
"code": "231084",
"value": "宁安市",
"label": "宁安市"
},
{
"code": "231085",
"value": "穆棱市",
"label": "穆棱市"
},
{
"code": "231086",
"value": "东宁市",
"label": "东宁市"
}
]
},
{
"code": "231100",
"value": "黑河市",
"label": "黑河市",
"children": [
{
"code": "231102",
"value": "爱辉区",
"label": "爱辉区"
},
{
"code": "231123",
"value": "逊克县",
"label": "逊克县"
},
{
"code": "231124",
"value": "孙吴县",
"label": "孙吴县"
},
{
"code": "231181",
"value": "北安市",
"label": "北安市"
},
{
"code": "231182",
"value": "五大连池市",
"label": "五大连池市"
},
{
"code": "231183",
"value": "嫩江市",
"label": "嫩江市"
}
]
},
{
"code": "231200",
"value": "绥化市",
"label": "绥化市",
"children": [
{
"code": "231202",
"value": "北林区",
"label": "北林区"
},
{
"code": "231221",
"value": "望奎县",
"label": "望奎县"
},
{
"code": "231222",
"value": "兰西县",
"label": "兰西县"
},
{
"code": "231223",
"value": "青冈县",
"label": "青冈县"
},
{
"code": "231224",
"value": "庆安县",
"label": "庆安县"
},
{
"code": "231225",
"value": "明水县",
"label": "明水县"
},
{
"code": "231226",
"value": "绥棱县",
"label": "绥棱县"
},
{
"code": "231281",
"value": "安达市",
"label": "安达市"
},
{
"code": "231282",
"value": "肇东市",
"label": "肇东市"
},
{
"code": "231283",
"value": "海伦市",
"label": "海伦市"
}
]
},
{
"code": "232700",
"value": "大兴安岭地区",
"label": "大兴安岭地区",
"children": [
{
"code": "232701",
"value": "漠河市",
"label": "漠河市"
},
{
"code": "232721",
"value": "呼玛县",
"label": "呼玛县"
},
{
"code": "232722",
"value": "塔河县",
"label": "塔河县"
}
]
}
]
},
{
"code": "310000",
"value": "上海市",
"label": "上海市",
"children": [
{
"code": "310101",
"value": "黄浦区",
"label": "黄浦区"
},
{
"code": "310104",
"value": "徐汇区",
"label": "徐汇区"
},
{
"code": "310105",
"value": "长宁区",
"label": "长宁区"
},
{
"code": "310106",
"value": "静安区",
"label": "静安区"
},
{
"code": "310107",
"value": "普陀区",
"label": "普陀区"
},
{
"code": "310109",
"value": "虹口区",
"label": "虹口区"
},
{
"code": "310110",
"value": "杨浦区",
"label": "杨浦区"
},
{
"code": "310112",
"value": "闵行区",
"label": "闵行区"
},
{
"code": "310113",
"value": "宝山区",
"label": "宝山区"
},
{
"code": "310114",
"value": "嘉定区",
"label": "嘉定区"
},
{
"code": "310115",
"value": "浦东新区",
"label": "浦东新区"
},
{
"code": "310116",
"value": "金山区",
"label": "金山区"
},
{
"code": "310117",
"value": "松江区",
"label": "松江区"
},
{
"code": "310118",
"value": "青浦区",
"label": "青浦区"
},
{
"code": "310120",
"value": "奉贤区",
"label": "奉贤区"
},
{
"code": "310151",
"value": "崇明区",
"label": "崇明区"
}
]
},
{
"code": "320000",
"value": "江苏省",
"label": "江苏省",
"children": [
{
"code": "320100",
"value": "南京市",
"label": "南京市",
"children": [
{
"code": "320102",
"value": "玄武区",
"label": "玄武区"
},
{
"code": "320104",
"value": "秦淮区",
"label": "秦淮区"
},
{
"code": "320105",
"value": "建邺区",
"label": "建邺区"
},
{
"code": "320106",
"value": "鼓楼区",
"label": "鼓楼区"
},
{
"code": "320111",
"value": "浦口区",
"label": "浦口区"
},
{
"code": "320113",
"value": "栖霞区",
"label": "栖霞区"
},
{
"code": "320114",
"value": "雨花台区",
"label": "雨花台区"
},
{
"code": "320115",
"value": "江宁区",
"label": "江宁区"
},
{
"code": "320116",
"value": "六合区",
"label": "六合区"
},
{
"code": "320117",
"value": "溧水区",
"label": "溧水区"
},
{
"code": "320118",
"value": "高淳区",
"label": "高淳区"
}
]
},
{
"code": "320200",
"value": "无锡市",
"label": "无锡市",
"children": [
{
"code": "320205",
"value": "锡山区",
"label": "锡山区"
},
{
"code": "320206",
"value": "惠山区",
"label": "惠山区"
},
{
"code": "320211",
"value": "滨湖区",
"label": "滨湖区"
},
{
"code": "320213",
"value": "梁溪区",
"label": "梁溪区"
},
{
"code": "320214",
"value": "新吴区",
"label": "新吴区"
},
{
"code": "320281",
"value": "江阴市",
"label": "江阴市"
},
{
"code": "320282",
"value": "宜兴市",
"label": "宜兴市"
}
]
},
{
"code": "320300",
"value": "徐州市",
"label": "徐州市",
"children": [
{
"code": "320302",
"value": "鼓楼区",
"label": "鼓楼区"
},
{
"code": "320303",
"value": "云龙区",
"label": "云龙区"
},
{
"code": "320305",
"value": "贾汪区",
"label": "贾汪区"
},
{
"code": "320311",
"value": "泉山区",
"label": "泉山区"
},
{
"code": "320312",
"value": "铜山区",
"label": "铜山区"
},
{
"code": "320321",
"value": "丰县",
"label": "丰县"
},
{
"code": "320322",
"value": "沛县",
"label": "沛县"
},
{
"code": "320324",
"value": "睢宁县",
"label": "睢宁县"
},
{
"code": "320381",
"value": "新沂市",
"label": "新沂市"
},
{
"code": "320382",
"value": "邳州市",
"label": "邳州市"
}
]
},
{
"code": "320400",
"value": "常州市",
"label": "常州市",
"children": [
{
"code": "320402",
"value": "天宁区",
"label": "天宁区"
},
{
"code": "320404",
"value": "钟楼区",
"label": "钟楼区"
},
{
"code": "320411",
"value": "新北区",
"label": "新北区"
},
{
"code": "320412",
"value": "武进区",
"label": "武进区"
},
{
"code": "320413",
"value": "金坛区",
"label": "金坛区"
},
{
"code": "320481",
"value": "溧阳市",
"label": "溧阳市"
}
]
},
{
"code": "320500",
"value": "苏州市",
"label": "苏州市",
"children": [
{
"code": "320505",
"value": "虎丘区",
"label": "虎丘区"
},
{
"code": "320506",
"value": "吴中区",
"label": "吴中区"
},
{
"code": "320507",
"value": "相城区",
"label": "相城区"
},
{
"code": "320508",
"value": "姑苏区",
"label": "姑苏区"
},
{
"code": "320509",
"value": "吴江区",
"label": "吴江区"
},
{
"code": "320581",
"value": "常熟市",
"label": "常熟市"
},
{
"code": "320582",
"value": "张家港市",
"label": "张家港市"
},
{
"code": "320583",
"value": "昆山市",
"label": "昆山市"
},
{
"code": "320585",
"value": "太仓市",
"label": "太仓市"
}
]
},
{
"code": "320600",
"value": "南通市",
"label": "南通市",
"children": [
{
"code": "320602",
"value": "崇川区",
"label": "崇川区"
},
{
"code": "320611",
"value": "港闸区",
"label": "港闸区"
},
{
"code": "320612",
"value": "通州区",
"label": "通州区"
},
{
"code": "320623",
"value": "如东县",
"label": "如东县"
},
{
"code": "320681",
"value": "启东市",
"label": "启东市"
},
{
"code": "320682",
"value": "如皋市",
"label": "如皋市"
},
{
"code": "320684",
"value": "海门市",
"label": "海门市"
},
{
"code": "320685",
"value": "海安市",
"label": "海安市"
}
]
},
{
"code": "320700",
"value": "连云港市",
"label": "连云港市",
"children": [
{
"code": "320703",
"value": "连云区",
"label": "连云区"
},
{
"code": "320706",
"value": "海州区",
"label": "海州区"
},
{
"code": "320707",
"value": "赣榆区",
"label": "赣榆区"
},
{
"code": "320722",
"value": "东海县",
"label": "东海县"
},
{
"code": "320723",
"value": "灌云县",
"label": "灌云县"
},
{
"code": "320724",
"value": "灌南县",
"label": "灌南县"
}
]
},
{
"code": "320800",
"value": "淮安市",
"label": "淮安市",
"children": [
{
"code": "320803",
"value": "淮安区",
"label": "淮安区"
},
{
"code": "320804",
"value": "淮阴区",
"label": "淮阴区"
},
{
"code": "320812",
"value": "清江浦区",
"label": "清江浦区"
},
{
"code": "320813",
"value": "洪泽区",
"label": "洪泽区"
},
{
"code": "320826",
"value": "涟水县",
"label": "涟水县"
},
{
"code": "320830",
"value": "盱眙县",
"label": "盱眙县"
},
{
"code": "320831",
"value": "金湖县",
"label": "金湖县"
}
]
},
{
"code": "320900",
"value": "盐城市",
"label": "盐城市",
"children": [
{
"code": "320902",
"value": "亭湖区",
"label": "亭湖区"
},
{
"code": "320903",
"value": "盐都区",
"label": "盐都区"
},
{
"code": "320904",
"value": "大丰区",
"label": "大丰区"
},
{
"code": "320921",
"value": "响水县",
"label": "响水县"
},
{
"code": "320922",
"value": "滨海县",
"label": "滨海县"
},
{
"code": "320923",
"value": "阜宁县",
"label": "阜宁县"
},
{
"code": "320924",
"value": "射阳县",
"label": "射阳县"
},
{
"code": "320925",
"value": "建湖县",
"label": "建湖县"
},
{
"code": "320981",
"value": "东台市",
"label": "东台市"
}
]
},
{
"code": "321000",
"value": "扬州市",
"label": "扬州市",
"children": [
{
"code": "321002",
"value": "广陵区",
"label": "广陵区"
},
{
"code": "321003",
"value": "邗江区",
"label": "邗江区"
},
{
"code": "321012",
"value": "江都区",
"label": "江都区"
},
{
"code": "321023",
"value": "宝应县",
"label": "宝应县"
},
{
"code": "321081",
"value": "仪征市",
"label": "仪征市"
},
{
"code": "321084",
"value": "高邮市",
"label": "高邮市"
}
]
},
{
"code": "321100",
"value": "镇江市",
"label": "镇江市",
"children": [
{
"code": "321102",
"value": "京口区",
"label": "京口区"
},
{
"code": "321111",
"value": "润州区",
"label": "润州区"
},
{
"code": "321112",
"value": "丹徒区",
"label": "丹徒区"
},
{
"code": "321181",
"value": "丹阳市",
"label": "丹阳市"
},
{
"code": "321182",
"value": "扬中市",
"label": "扬中市"
},
{
"code": "321183",
"value": "句容市",
"label": "句容市"
}
]
},
{
"code": "321200",
"value": "泰州市",
"label": "泰州市",
"children": [
{
"code": "321202",
"value": "海陵区",
"label": "海陵区"
},
{
"code": "321203",
"value": "高港区",
"label": "高港区"
},
{
"code": "321204",
"value": "姜堰区",
"label": "姜堰区"
},
{
"code": "321281",
"value": "兴化市",
"label": "兴化市"
},
{
"code": "321282",
"value": "靖江市",
"label": "靖江市"
},
{
"code": "321283",
"value": "泰兴市",
"label": "泰兴市"
}
]
},
{
"code": "321300",
"value": "宿迁市",
"label": "宿迁市",
"children": [
{
"code": "321302",
"value": "宿城区",
"label": "宿城区"
},
{
"code": "321311",
"value": "宿豫区",
"label": "宿豫区"
},
{
"code": "321322",
"value": "沭阳县",
"label": "沭阳县"
},
{
"code": "321323",
"value": "泗阳县",
"label": "泗阳县"
},
{
"code": "321324",
"value": "泗洪县",
"label": "泗洪县"
}
]
}
]
},
{
"code": "330000",
"value": "浙江省",
"label": "浙江省",
"children": [
{
"code": "330100",
"value": "杭州市",
"label": "杭州市",
"children": [
{
"code": "330102",
"value": "上城区",
"label": "上城区"
},
{
"code": "330103",
"value": "下城区",
"label": "下城区"
},
{
"code": "330104",
"value": "江干区",
"label": "江干区"
},
{
"code": "330105",
"value": "拱墅区",
"label": "拱墅区"
},
{
"code": "330106",
"value": "西湖区",
"label": "西湖区"
},
{
"code": "330108",
"value": "滨江区",
"label": "滨江区"
},
{
"code": "330109",
"value": "萧山区",
"label": "萧山区"
},
{
"code": "330110",
"value": "余杭区",
"label": "余杭区"
},
{
"code": "330111",
"value": "富阳区",
"label": "富阳区"
},
{
"code": "330112",
"value": "临安区",
"label": "临安区"
},
{
"code": "330122",
"value": "桐庐县",
"label": "桐庐县"
},
{
"code": "330127",
"value": "淳安县",
"label": "淳安县"
},
{
"code": "330182",
"value": "建德市",
"label": "建德市"
}
]
},
{
"code": "330200",
"value": "宁波市",
"label": "宁波市",
"children": [
{
"code": "330203",
"value": "海曙区",
"label": "海曙区"
},
{
"code": "330205",
"value": "江北区",
"label": "江北区"
},
{
"code": "330206",
"value": "北仑区",
"label": "北仑区"
},
{
"code": "330211",
"value": "镇海区",
"label": "镇海区"
},
{
"code": "330212",
"value": "鄞州区",
"label": "鄞州区"
},
{
"code": "330213",
"value": "奉化区",
"label": "奉化区"
},
{
"code": "330225",
"value": "象山县",
"label": "象山县"
},
{
"code": "330226",
"value": "宁海县",
"label": "宁海县"
},
{
"code": "330281",
"value": "余姚市",
"label": "余姚市"
},
{
"code": "330282",
"value": "慈溪市",
"label": "慈溪市"
}
]
},
{
"code": "330300",
"value": "温州市",
"label": "温州市",
"children": [
{
"code": "330302",
"value": "鹿城区",
"label": "鹿城区"
},
{
"code": "330303",
"value": "龙湾区",
"label": "龙湾区"
},
{
"code": "330304",
"value": "瓯海区",
"label": "瓯海区"
},
{
"code": "330305",
"value": "洞头区",
"label": "洞头区"
},
{
"code": "330324",
"value": "永嘉县",
"label": "永嘉县"
},
{
"code": "330326",
"value": "平阳县",
"label": "平阳县"
},
{
"code": "330327",
"value": "苍南县",
"label": "苍南县"
},
{
"code": "330328",
"value": "文成县",
"label": "文成县"
},
{
"code": "330329",
"value": "泰顺县",
"label": "泰顺县"
},
{
"code": "330381",
"value": "瑞安市",
"label": "瑞安市"
},
{
"code": "330382",
"value": "乐清市",
"label": "乐清市"
},
{
"code": "330383",
"value": "龙港市",
"label": "龙港市"
}
]
},
{
"code": "330400",
"value": "嘉兴市",
"label": "嘉兴市",
"children": [
{
"code": "330402",
"value": "南湖区",
"label": "南湖区"
},
{
"code": "330411",
"value": "秀洲区",
"label": "秀洲区"
},
{
"code": "330421",
"value": "嘉善县",
"label": "嘉善县"
},
{
"code": "330424",
"value": "海盐县",
"label": "海盐县"
},
{
"code": "330481",
"value": "海宁市",
"label": "海宁市"
},
{
"code": "330482",
"value": "平湖市",
"label": "平湖市"
},
{
"code": "330483",
"value": "桐乡市",
"label": "桐乡市"
}
]
},
{
"code": "330500",
"value": "湖州市",
"label": "湖州市",
"children": [
{
"code": "330502",
"value": "吴兴区",
"label": "吴兴区"
},
{
"code": "330503",
"value": "南浔区",
"label": "南浔区"
},
{
"code": "330521",
"value": "德清县",
"label": "德清县"
},
{
"code": "330522",
"value": "长兴县",
"label": "长兴县"
},
{
"code": "330523",
"value": "安吉县",
"label": "安吉县"
}
]
},
{
"code": "330600",
"value": "绍兴市",
"label": "绍兴市",
"children": [
{
"code": "330602",
"value": "越城区",
"label": "越城区"
},
{
"code": "330603",
"value": "柯桥区",
"label": "柯桥区"
},
{
"code": "330604",
"value": "上虞区",
"label": "上虞区"
},
{
"code": "330624",
"value": "新昌县",
"label": "新昌县"
},
{
"code": "330681",
"value": "诸暨市",
"label": "诸暨市"
},
{
"code": "330683",
"value": "嵊州市",
"label": "嵊州市"
}
]
},
{
"code": "330700",
"value": "金华市",
"label": "金华市",
"children": [
{
"code": "330702",
"value": "婺城区",
"label": "婺城区"
},
{
"code": "330703",
"value": "金东区",
"label": "金东区"
},
{
"code": "330723",
"value": "武义县",
"label": "武义县"
},
{
"code": "330726",
"value": "浦江县",
"label": "浦江县"
},
{
"code": "330727",
"value": "磐安县",
"label": "磐安县"
},
{
"code": "330781",
"value": "兰溪市",
"label": "兰溪市"
},
{
"code": "330782",
"value": "义乌市",
"label": "义乌市"
},
{
"code": "330783",
"value": "东阳市",
"label": "东阳市"
},
{
"code": "330784",
"value": "永康市",
"label": "永康市"
}
]
},
{
"code": "330800",
"value": "衢州市",
"label": "衢州市",
"children": [
{
"code": "330802",
"value": "柯城区",
"label": "柯城区"
},
{
"code": "330803",
"value": "衢江区",
"label": "衢江区"
},
{
"code": "330822",
"value": "常山县",
"label": "常山县"
},
{
"code": "330824",
"value": "开化县",
"label": "开化县"
},
{
"code": "330825",
"value": "龙游县",
"label": "龙游县"
},
{
"code": "330881",
"value": "江山市",
"label": "江山市"
}
]
},
{
"code": "330900",
"value": "舟山市",
"label": "舟山市",
"children": [
{
"code": "330902",
"value": "定海区",
"label": "定海区"
},
{
"code": "330903",
"value": "普陀区",
"label": "普陀区"
},
{
"code": "330921",
"value": "岱山县",
"label": "岱山县"
},
{
"code": "330922",
"value": "嵊泗县",
"label": "嵊泗县"
}
]
},
{
"code": "331000",
"value": "台州市",
"label": "台州市",
"children": [
{
"code": "331002",
"value": "椒江区",
"label": "椒江区"
},
{
"code": "331003",
"value": "黄岩区",
"label": "黄岩区"
},
{
"code": "331004",
"value": "路桥区",
"label": "路桥区"
},
{
"code": "331022",
"value": "三门县",
"label": "三门县"
},
{
"code": "331023",
"value": "天台县",
"label": "天台县"
},
{
"code": "331024",
"value": "仙居县",
"label": "仙居县"
},
{
"code": "331081",
"value": "温岭市",
"label": "温岭市"
},
{
"code": "331082",
"value": "临海市",
"label": "临海市"
},
{
"code": "331083",
"value": "玉环市",
"label": "玉环市"
}
]
},
{
"code": "331100",
"value": "丽水市",
"label": "丽水市",
"children": [
{
"code": "331102",
"value": "莲都区",
"label": "莲都区"
},
{
"code": "331121",
"value": "青田县",
"label": "青田县"
},
{
"code": "331122",
"value": "缙云县",
"label": "缙云县"
},
{
"code": "331123",
"value": "遂昌县",
"label": "遂昌县"
},
{
"code": "331124",
"value": "松阳县",
"label": "松阳县"
},
{
"code": "331125",
"value": "云和县",
"label": "云和县"
},
{
"code": "331126",
"value": "庆元县",
"label": "庆元县"
},
{
"code": "331127",
"value": "景宁畲族自治县",
"label": "景宁畲族自治县"
},
{
"code": "331181",
"value": "龙泉市",
"label": "龙泉市"
}
]
}
]
},
{
"code": "340000",
"value": "安徽省",
"label": "安徽省",
"children": [
{
"code": "340100",
"value": "合肥市",
"label": "合肥市",
"children": [
{
"code": "340102",
"value": "瑶海区",
"label": "瑶海区"
},
{
"code": "340103",
"value": "庐阳区",
"label": "庐阳区"
},
{
"code": "340104",
"value": "蜀山区",
"label": "蜀山区"
},
{
"code": "340111",
"value": "包河区",
"label": "包河区"
},
{
"code": "340121",
"value": "长丰县",
"label": "长丰县"
},
{
"code": "340122",
"value": "肥东县",
"label": "肥东县"
},
{
"code": "340123",
"value": "肥西县",
"label": "肥西县"
},
{
"code": "340124",
"value": "庐江县",
"label": "庐江县"
},
{
"code": "340181",
"value": "巢湖市",
"label": "巢湖市"
}
]
},
{
"code": "340200",
"value": "芜湖市",
"label": "芜湖市",
"children": [
{
"code": "340202",
"value": "镜湖区",
"label": "镜湖区"
},
{
"code": "340203",
"value": "弋江区",
"label": "弋江区"
},
{
"code": "340207",
"value": "鸠江区",
"label": "鸠江区"
},
{
"code": "340208",
"value": "三山区",
"label": "三山区"
},
{
"code": "340221",
"value": "芜湖县",
"label": "芜湖县"
},
{
"code": "340222",
"value": "繁昌县",
"label": "繁昌县"
},
{
"code": "340223",
"value": "南陵县",
"label": "南陵县"
},
{
"code": "340281",
"value": "无为市",
"label": "无为市"
}
]
},
{
"code": "340300",
"value": "蚌埠市",
"label": "蚌埠市",
"children": [
{
"code": "340302",
"value": "龙子湖区",
"label": "龙子湖区"
},
{
"code": "340303",
"value": "蚌山区",
"label": "蚌山区"
},
{
"code": "340304",
"value": "禹会区",
"label": "禹会区"
},
{
"code": "340311",
"value": "淮上区",
"label": "淮上区"
},
{
"code": "340321",
"value": "怀远县",
"label": "怀远县"
},
{
"code": "340322",
"value": "五河县",
"label": "五河县"
},
{
"code": "340323",
"value": "固镇县",
"label": "固镇县"
}
]
},
{
"code": "340400",
"value": "淮南市",
"label": "淮南市",
"children": [
{
"code": "340402",
"value": "大通区",
"label": "大通区"
},
{
"code": "340403",
"value": "田家庵区",
"label": "田家庵区"
},
{
"code": "340404",
"value": "谢家集区",
"label": "谢家集区"
},
{
"code": "340405",
"value": "八公山区",
"label": "八公山区"
},
{
"code": "340406",
"value": "潘集区",
"label": "潘集区"
},
{
"code": "340421",
"value": "凤台县",
"label": "凤台县"
},
{
"code": "340422",
"value": "寿县",
"label": "寿县"
}
]
},
{
"code": "340500",
"value": "马鞍山市",
"label": "马鞍山市",
"children": [
{
"code": "340503",
"value": "花山区",
"label": "花山区"
},
{
"code": "340504",
"value": "雨山区",
"label": "雨山区"
},
{
"code": "340506",
"value": "博望区",
"label": "博望区"
},
{
"code": "340521",
"value": "当涂县",
"label": "当涂县"
},
{
"code": "340522",
"value": "含山县",
"label": "含山县"
},
{
"code": "340523",
"value": "和县",
"label": "和县"
}
]
},
{
"code": "340600",
"value": "淮北市",
"label": "淮北市",
"children": [
{
"code": "340602",
"value": "杜集区",
"label": "杜集区"
},
{
"code": "340603",
"value": "相山区",
"label": "相山区"
},
{
"code": "340604",
"value": "烈山区",
"label": "烈山区"
},
{
"code": "340621",
"value": "濉溪县",
"label": "濉溪县"
}
]
},
{
"code": "340700",
"value": "铜陵市",
"label": "铜陵市",
"children": [
{
"code": "340705",
"value": "铜官区",
"label": "铜官区"
},
{
"code": "340706",
"value": "义安区",
"label": "义安区"
},
{
"code": "340711",
"value": "郊区",
"label": "郊区"
},
{
"code": "340722",
"value": "枞阳县",
"label": "枞阳县"
}
]
},
{
"code": "340800",
"value": "安庆市",
"label": "安庆市",
"children": [
{
"code": "340802",
"value": "迎江区",
"label": "迎江区"
},
{
"code": "340803",
"value": "大观区",
"label": "大观区"
},
{
"code": "340811",
"value": "宜秀区",
"label": "宜秀区"
},
{
"code": "340822",
"value": "怀宁县",
"label": "怀宁县"
},
{
"code": "340825",
"value": "太湖县",
"label": "太湖县"
},
{
"code": "340826",
"value": "宿松县",
"label": "宿松县"
},
{
"code": "340827",
"value": "望江县",
"label": "望江县"
},
{
"code": "340828",
"value": "岳西县",
"label": "岳西县"
},
{
"code": "340881",
"value": "桐城市",
"label": "桐城市"
},
{
"code": "340882",
"value": "潜山市",
"label": "潜山市"
}
]
},
{
"code": "341000",
"value": "黄山市",
"label": "黄山市",
"children": [
{
"code": "341002",
"value": "屯溪区",
"label": "屯溪区"
},
{
"code": "341003",
"value": "黄山区",
"label": "黄山区"
},
{
"code": "341004",
"value": "徽州区",
"label": "徽州区"
},
{
"code": "341021",
"value": "歙县",
"label": "歙县"
},
{
"code": "341022",
"value": "休宁县",
"label": "休宁县"
},
{
"code": "341023",
"value": "黟县",
"label": "黟县"
},
{
"code": "341024",
"value": "祁门县",
"label": "祁门县"
}
]
},
{
"code": "341100",
"value": "滁州市",
"label": "滁州市",
"children": [
{
"code": "341102",
"value": "琅琊区",
"label": "琅琊区"
},
{
"code": "341103",
"value": "南谯区",
"label": "南谯区"
},
{
"code": "341122",
"value": "来安县",
"label": "来安县"
},
{
"code": "341124",
"value": "全椒县",
"label": "全椒县"
},
{
"code": "341125",
"value": "定远县",
"label": "定远县"
},
{
"code": "341126",
"value": "凤阳县",
"label": "凤阳县"
},
{
"code": "341181",
"value": "天长市",
"label": "天长市"
},
{
"code": "341182",
"value": "明光市",
"label": "明光市"
}
]
},
{
"code": "341200",
"value": "阜阳市",
"label": "阜阳市",
"children": [
{
"code": "341202",
"value": "颍州区",
"label": "颍州区"
},
{
"code": "341203",
"value": "颍东区",
"label": "颍东区"
},
{
"code": "341204",
"value": "颍泉区",
"label": "颍泉区"
},
{
"code": "341221",
"value": "临泉县",
"label": "临泉县"
},
{
"code": "341222",
"value": "太和县",
"label": "太和县"
},
{
"code": "341225",
"value": "阜南县",
"label": "阜南县"
},
{
"code": "341226",
"value": "颍上县",
"label": "颍上县"
},
{
"code": "341282",
"value": "界首市",
"label": "界首市"
}
]
},
{
"code": "341300",
"value": "宿州市",
"label": "宿州市",
"children": [
{
"code": "341302",
"value": "埇桥区",
"label": "埇桥区"
},
{
"code": "341321",
"value": "砀山县",
"label": "砀山县"
},
{
"code": "341322",
"value": "萧县",
"label": "萧县"
},
{
"code": "341323",
"value": "灵璧县",
"label": "灵璧县"
},
{
"code": "341324",
"value": "泗县",
"label": "泗县"
}
]
},
{
"code": "341500",
"value": "六安市",
"label": "六安市",
"children": [
{
"code": "341502",
"value": "金安区",
"label": "金安区"
},
{
"code": "341503",
"value": "裕安区",
"label": "裕安区"
},
{
"code": "341504",
"value": "叶集区",
"label": "叶集区"
},
{
"code": "341522",
"value": "霍邱县",
"label": "霍邱县"
},
{
"code": "341523",
"value": "舒城县",
"label": "舒城县"
},
{
"code": "341524",
"value": "金寨县",
"label": "金寨县"
},
{
"code": "341525",
"value": "霍山县",
"label": "霍山县"
}
]
},
{
"code": "341600",
"value": "亳州市",
"label": "亳州市",
"children": [
{
"code": "341602",
"value": "谯城区",
"label": "谯城区"
},
{
"code": "341621",
"value": "涡阳县",
"label": "涡阳县"
},
{
"code": "341622",
"value": "蒙城县",
"label": "蒙城县"
},
{
"code": "341623",
"value": "利辛县",
"label": "利辛县"
}
]
},
{
"code": "341700",
"value": "池州市",
"label": "池州市",
"children": [
{
"code": "341702",
"value": "贵池区",
"label": "贵池区"
},
{
"code": "341721",
"value": "东至县",
"label": "东至县"
},
{
"code": "341722",
"value": "石台县",
"label": "石台县"
},
{
"code": "341723",
"value": "青阳县",
"label": "青阳县"
}
]
},
{
"code": "341800",
"value": "宣城市",
"label": "宣城市",
"children": [
{
"code": "341802",
"value": "宣州区",
"label": "宣州区"
},
{
"code": "341821",
"value": "郎溪县",
"label": "郎溪县"
},
{
"code": "341823",
"value": "泾县",
"label": "泾县"
},
{
"code": "341824",
"value": "绩溪县",
"label": "绩溪县"
},
{
"code": "341825",
"value": "旌德县",
"label": "旌德县"
},
{
"code": "341881",
"value": "宁国市",
"label": "宁国市"
},
{
"code": "341882",
"value": "广德市",
"label": "广德市"
}
]
}
]
},
{
"code": "350000",
"value": "福建省",
"label": "福建省",
"children": [
{
"code": "350100",
"value": "福州市",
"label": "福州市",
"children": [
{
"code": "350102",
"value": "鼓楼区",
"label": "鼓楼区"
},
{
"code": "350103",
"value": "台江区",
"label": "台江区"
},
{
"code": "350104",
"value": "仓山区",
"label": "仓山区"
},
{
"code": "350105",
"value": "马尾区",
"label": "马尾区"
},
{
"code": "350111",
"value": "晋安区",
"label": "晋安区"
},
{
"code": "350112",
"value": "长乐区",
"label": "长乐区"
},
{
"code": "350121",
"value": "闽侯县",
"label": "闽侯县"
},
{
"code": "350122",
"value": "连江县",
"label": "连江县"
},
{
"code": "350123",
"value": "罗源县",
"label": "罗源县"
},
{
"code": "350124",
"value": "闽清县",
"label": "闽清县"
},
{
"code": "350125",
"value": "永泰县",
"label": "永泰县"
},
{
"code": "350128",
"value": "平潭县",
"label": "平潭县"
},
{
"code": "350181",
"value": "福清市",
"label": "福清市"
}
]
},
{
"code": "350200",
"value": "厦门市",
"label": "厦门市",
"children": [
{
"code": "350203",
"value": "思明区",
"label": "思明区"
},
{
"code": "350205",
"value": "海沧区",
"label": "海沧区"
},
{
"code": "350206",
"value": "湖里区",
"label": "湖里区"
},
{
"code": "350211",
"value": "集美区",
"label": "集美区"
},
{
"code": "350212",
"value": "同安区",
"label": "同安区"
},
{
"code": "350213",
"value": "翔安区",
"label": "翔安区"
}
]
},
{
"code": "350300",
"value": "莆田市",
"label": "莆田市",
"children": [
{
"code": "350302",
"value": "城厢区",
"label": "城厢区"
},
{
"code": "350303",
"value": "涵江区",
"label": "涵江区"
},
{
"code": "350304",
"value": "荔城区",
"label": "荔城区"
},
{
"code": "350305",
"value": "秀屿区",
"label": "秀屿区"
},
{
"code": "350322",
"value": "仙游县",
"label": "仙游县"
}
]
},
{
"code": "350400",
"value": "三明市",
"label": "三明市",
"children": [
{
"code": "350402",
"value": "梅列区",
"label": "梅列区"
},
{
"code": "350403",
"value": "三元区",
"label": "三元区"
},
{
"code": "350421",
"value": "明溪县",
"label": "明溪县"
},
{
"code": "350423",
"value": "清流县",
"label": "清流县"
},
{
"code": "350424",
"value": "宁化县",
"label": "宁化县"
},
{
"code": "350425",
"value": "大田县",
"label": "大田县"
},
{
"code": "350426",
"value": "尤溪县",
"label": "尤溪县"
},
{
"code": "350427",
"value": "沙县",
"label": "沙县"
},
{
"code": "350428",
"value": "将乐县",
"label": "将乐县"
},
{
"code": "350429",
"value": "泰宁县",
"label": "泰宁县"
},
{
"code": "350430",
"value": "建宁县",
"label": "建宁县"
},
{
"code": "350481",
"value": "永安市",
"label": "永安市"
}
]
},
{
"code": "350500",
"value": "泉州市",
"label": "泉州市",
"children": [
{
"code": "350502",
"value": "鲤城区",
"label": "鲤城区"
},
{
"code": "350503",
"value": "丰泽区",
"label": "丰泽区"
},
{
"code": "350504",
"value": "洛江区",
"label": "洛江区"
},
{
"code": "350505",
"value": "泉港区",
"label": "泉港区"
},
{
"code": "350521",
"value": "惠安县",
"label": "惠安县"
},
{
"code": "350524",
"value": "安溪县",
"label": "安溪县"
},
{
"code": "350525",
"value": "永春县",
"label": "永春县"
},
{
"code": "350526",
"value": "德化县",
"label": "德化县"
},
{
"code": "350527",
"value": "金门县",
"label": "金门县"
},
{
"code": "350581",
"value": "石狮市",
"label": "石狮市"
},
{
"code": "350582",
"value": "晋江市",
"label": "晋江市"
},
{
"code": "350583",
"value": "南安市",
"label": "南安市"
}
]
},
{
"code": "350600",
"value": "漳州市",
"label": "漳州市",
"children": [
{
"code": "350602",
"value": "芗城区",
"label": "芗城区"
},
{
"code": "350603",
"value": "龙文区",
"label": "龙文区"
},
{
"code": "350622",
"value": "云霄县",
"label": "云霄县"
},
{
"code": "350623",
"value": "漳浦县",
"label": "漳浦县"
},
{
"code": "350624",
"value": "诏安县",
"label": "诏安县"
},
{
"code": "350625",
"value": "长泰县",
"label": "长泰县"
},
{
"code": "350626",
"value": "东山县",
"label": "东山县"
},
{
"code": "350627",
"value": "南靖县",
"label": "南靖县"
},
{
"code": "350628",
"value": "平和县",
"label": "平和县"
},
{
"code": "350629",
"value": "华安县",
"label": "华安县"
},
{
"code": "350681",
"value": "龙海市",
"label": "龙海市"
}
]
},
{
"code": "350700",
"value": "南平市",
"label": "南平市",
"children": [
{
"code": "350702",
"value": "延平区",
"label": "延平区"
},
{
"code": "350703",
"value": "建阳区",
"label": "建阳区"
},
{
"code": "350721",
"value": "顺昌县",
"label": "顺昌县"
},
{
"code": "350722",
"value": "浦城县",
"label": "浦城县"
},
{
"code": "350723",
"value": "光泽县",
"label": "光泽县"
},
{
"code": "350724",
"value": "松溪县",
"label": "松溪县"
},
{
"code": "350725",
"value": "政和县",
"label": "政和县"
},
{
"code": "350781",
"value": "邵武市",
"label": "邵武市"
},
{
"code": "350782",
"value": "武夷山市",
"label": "武夷山市"
},
{
"code": "350783",
"value": "建瓯市",
"label": "建瓯市"
}
]
},
{
"code": "350800",
"value": "龙岩市",
"label": "龙岩市",
"children": [
{
"code": "350802",
"value": "新罗区",
"label": "新罗区"
},
{
"code": "350803",
"value": "永定区",
"label": "永定区"
},
{
"code": "350821",
"value": "长汀县",
"label": "长汀县"
},
{
"code": "350823",
"value": "上杭县",
"label": "上杭县"
},
{
"code": "350824",
"value": "武平县",
"label": "武平县"
},
{
"code": "350825",
"value": "连城县",
"label": "连城县"
},
{
"code": "350881",
"value": "漳平市",
"label": "漳平市"
}
]
},
{
"code": "350900",
"value": "宁德市",
"label": "宁德市",
"children": [
{
"code": "350902",
"value": "蕉城区",
"label": "蕉城区"
},
{
"code": "350921",
"value": "霞浦县",
"label": "霞浦县"
},
{
"code": "350922",
"value": "古田县",
"label": "古田县"
},
{
"code": "350923",
"value": "屏南县",
"label": "屏南县"
},
{
"code": "350924",
"value": "寿宁县",
"label": "寿宁县"
},
{
"code": "350925",
"value": "周宁县",
"label": "周宁县"
},
{
"code": "350926",
"value": "柘荣县",
"label": "柘荣县"
},
{
"code": "350981",
"value": "福安市",
"label": "福安市"
},
{
"code": "350982",
"value": "福鼎市",
"label": "福鼎市"
}
]
}
]
},
{
"code": "360000",
"value": "江西省",
"label": "江西省",
"children": [
{
"code": "360100",
"value": "南昌市",
"label": "南昌市",
"children": [
{
"code": "360102",
"value": "东湖区",
"label": "东湖区"
},
{
"code": "360103",
"value": "西湖区",
"label": "西湖区"
},
{
"code": "360104",
"value": "青云谱区",
"label": "青云谱区"
},
{
"code": "360111",
"value": "青山湖区",
"label": "青山湖区"
},
{
"code": "360112",
"value": "新建区",
"label": "新建区"
},
{
"code": "360113",
"value": "红谷滩区",
"label": "红谷滩区"
},
{
"code": "360121",
"value": "南昌县",
"label": "南昌县"
},
{
"code": "360123",
"value": "安义县",
"label": "安义县"
},
{
"code": "360124",
"value": "进贤县",
"label": "进贤县"
}
]
},
{
"code": "360200",
"value": "景德镇市",
"label": "景德镇市",
"children": [
{
"code": "360202",
"value": "昌江区",
"label": "昌江区"
},
{
"code": "360203",
"value": "珠山区",
"label": "珠山区"
},
{
"code": "360222",
"value": "浮梁县",
"label": "浮梁县"
},
{
"code": "360281",
"value": "乐平市",
"label": "乐平市"
}
]
},
{
"code": "360300",
"value": "萍乡市",
"label": "萍乡市",
"children": [
{
"code": "360302",
"value": "安源区",
"label": "安源区"
},
{
"code": "360313",
"value": "湘东区",
"label": "湘东区"
},
{
"code": "360321",
"value": "莲花县",
"label": "莲花县"
},
{
"code": "360322",
"value": "上栗县",
"label": "上栗县"
},
{
"code": "360323",
"value": "芦溪县",
"label": "芦溪县"
}
]
},
{
"code": "360400",
"value": "九江市",
"label": "九江市",
"children": [
{
"code": "360402",
"value": "濂溪区",
"label": "濂溪区"
},
{
"code": "360403",
"value": "浔阳区",
"label": "浔阳区"
},
{
"code": "360404",
"value": "柴桑区",
"label": "柴桑区"
},
{
"code": "360423",
"value": "武宁县",
"label": "武宁县"
},
{
"code": "360424",
"value": "修水县",
"label": "修水县"
},
{
"code": "360425",
"value": "永修县",
"label": "永修县"
},
{
"code": "360426",
"value": "德安县",
"label": "德安县"
},
{
"code": "360428",
"value": "都昌县",
"label": "都昌县"
},
{
"code": "360429",
"value": "湖口县",
"label": "湖口县"
},
{
"code": "360430",
"value": "彭泽县",
"label": "彭泽县"
},
{
"code": "360481",
"value": "瑞昌市",
"label": "瑞昌市"
},
{
"code": "360482",
"value": "共青城市",
"label": "共青城市"
},
{
"code": "360483",
"value": "庐山市",
"label": "庐山市"
}
]
},
{
"code": "360500",
"value": "新余市",
"label": "新余市",
"children": [
{
"code": "360502",
"value": "渝水区",
"label": "渝水区"
},
{
"code": "360521",
"value": "分宜县",
"label": "分宜县"
}
]
},
{
"code": "360600",
"value": "鹰潭市",
"label": "鹰潭市",
"children": [
{
"code": "360602",
"value": "月湖区",
"label": "月湖区"
},
{
"code": "360603",
"value": "余江区",
"label": "余江区"
},
{
"code": "360681",
"value": "贵溪市",
"label": "贵溪市"
}
]
},
{
"code": "360700",
"value": "赣州市",
"label": "赣州市",
"children": [
{
"code": "360702",
"value": "章贡区",
"label": "章贡区"
},
{
"code": "360703",
"value": "南康区",
"label": "南康区"
},
{
"code": "360704",
"value": "赣县区",
"label": "赣县区"
},
{
"code": "360722",
"value": "信丰县",
"label": "信丰县"
},
{
"code": "360723",
"value": "大余县",
"label": "大余县"
},
{
"code": "360724",
"value": "上犹县",
"label": "上犹县"
},
{
"code": "360725",
"value": "崇义县",
"label": "崇义县"
},
{
"code": "360726",
"value": "安远县",
"label": "安远县"
},
{
"code": "360728",
"value": "定南县",
"label": "定南县"
},
{
"code": "360729",
"value": "全南县",
"label": "全南县"
},
{
"code": "360730",
"value": "宁都县",
"label": "宁都县"
},
{
"code": "360731",
"value": "于都县",
"label": "于都县"
},
{
"code": "360732",
"value": "兴国县",
"label": "兴国县"
},
{
"code": "360733",
"value": "会昌县",
"label": "会昌县"
},
{
"code": "360734",
"value": "寻乌县",
"label": "寻乌县"
},
{
"code": "360735",
"value": "石城县",
"label": "石城县"
},
{
"code": "360781",
"value": "瑞金市",
"label": "瑞金市"
},
{
"code": "360783",
"value": "龙南市",
"label": "龙南市"
}
]
},
{
"code": "360800",
"value": "吉安市",
"label": "吉安市",
"children": [
{
"code": "360802",
"value": "吉州区",
"label": "吉州区"
},
{
"code": "360803",
"value": "青原区",
"label": "青原区"
},
{
"code": "360821",
"value": "吉安县",
"label": "吉安县"
},
{
"code": "360822",
"value": "吉水县",
"label": "吉水县"
},
{
"code": "360823",
"value": "峡江县",
"label": "峡江县"
},
{
"code": "360824",
"value": "新干县",
"label": "新干县"
},
{
"code": "360825",
"value": "永丰县",
"label": "永丰县"
},
{
"code": "360826",
"value": "泰和县",
"label": "泰和县"
},
{
"code": "360827",
"value": "遂川县",
"label": "遂川县"
},
{
"code": "360828",
"value": "万安县",
"label": "万安县"
},
{
"code": "360829",
"value": "安福县",
"label": "安福县"
},
{
"code": "360830",
"value": "永新县",
"label": "永新县"
},
{
"code": "360881",
"value": "井冈山市",
"label": "井冈山市"
}
]
},
{
"code": "360900",
"value": "宜春市",
"label": "宜春市",
"children": [
{
"code": "360902",
"value": "袁州区",
"label": "袁州区"
},
{
"code": "360921",
"value": "奉新县",
"label": "奉新县"
},
{
"code": "360922",
"value": "万载县",
"label": "万载县"
},
{
"code": "360923",
"value": "上高县",
"label": "上高县"
},
{
"code": "360924",
"value": "宜丰县",
"label": "宜丰县"
},
{
"code": "360925",
"value": "靖安县",
"label": "靖安县"
},
{
"code": "360926",
"value": "铜鼓县",
"label": "铜鼓县"
},
{
"code": "360981",
"value": "丰城市",
"label": "丰城市"
},
{
"code": "360982",
"value": "樟树市",
"label": "樟树市"
},
{
"code": "360983",
"value": "高安市",
"label": "高安市"
}
]
},
{
"code": "361000",
"value": "抚州市",
"label": "抚州市",
"children": [
{
"code": "361002",
"value": "临川区",
"label": "临川区"
},
{
"code": "361003",
"value": "东乡区",
"label": "东乡区"
},
{
"code": "361021",
"value": "南城县",
"label": "南城县"
},
{
"code": "361022",
"value": "黎川县",
"label": "黎川县"
},
{
"code": "361023",
"value": "南丰县",
"label": "南丰县"
},
{
"code": "361024",
"value": "崇仁县",
"label": "崇仁县"
},
{
"code": "361025",
"value": "乐安县",
"label": "乐安县"
},
{
"code": "361026",
"value": "宜黄县",
"label": "宜黄县"
},
{
"code": "361027",
"value": "金溪县",
"label": "金溪县"
},
{
"code": "361028",
"value": "资溪县",
"label": "资溪县"
},
{
"code": "361030",
"value": "广昌县",
"label": "广昌县"
}
]
},
{
"code": "361100",
"value": "上饶市",
"label": "上饶市",
"children": [
{
"code": "361102",
"value": "信州区",
"label": "信州区"
},
{
"code": "361103",
"value": "广丰区",
"label": "广丰区"
},
{
"code": "361104",
"value": "广信区",
"label": "广信区"
},
{
"code": "361123",
"value": "玉山县",
"label": "玉山县"
},
{
"code": "361124",
"value": "铅山县",
"label": "铅山县"
},
{
"code": "361125",
"value": "横峰县",
"label": "横峰县"
},
{
"code": "361126",
"value": "弋阳县",
"label": "弋阳县"
},
{
"code": "361127",
"value": "余干县",
"label": "余干县"
},
{
"code": "361128",
"value": "鄱阳县",
"label": "鄱阳县"
},
{
"code": "361129",
"value": "万年县",
"label": "万年县"
},
{
"code": "361130",
"value": "婺源县",
"label": "婺源县"
},
{
"code": "361181",
"value": "德兴市",
"label": "德兴市"
}
]
}
]
},
{
"code": "370000",
"value": "山东省",
"label": "山东省",
"children": [
{
"code": "370100",
"value": "济南市",
"label": "济南市",
"children": [
{
"code": "370102",
"value": "历下区",
"label": "历下区"
},
{
"code": "370103",
"value": "市中区",
"label": "市中区"
},
{
"code": "370104",
"value": "槐荫区",
"label": "槐荫区"
},
{
"code": "370105",
"value": "天桥区",
"label": "天桥区"
},
{
"code": "370112",
"value": "历城区",
"label": "历城区"
},
{
"code": "370113",
"value": "长清区",
"label": "长清区"
},
{
"code": "370114",
"value": "章丘区",
"label": "章丘区"
},
{
"code": "370115",
"value": "济阳区",
"label": "济阳区"
},
{
"code": "370116",
"value": "莱芜区",
"label": "莱芜区"
},
{
"code": "370117",
"value": "钢城区",
"label": "钢城区"
},
{
"code": "370124",
"value": "平阴县",
"label": "平阴县"
},
{
"code": "370126",
"value": "商河县",
"label": "商河县"
}
]
},
{
"code": "370200",
"value": "青岛市",
"label": "青岛市",
"children": [
{
"code": "370202",
"value": "市南区",
"label": "市南区"
},
{
"code": "370203",
"value": "市北区",
"label": "市北区"
},
{
"code": "370211",
"value": "黄岛区",
"label": "黄岛区"
},
{
"code": "370212",
"value": "崂山区",
"label": "崂山区"
},
{
"code": "370213",
"value": "李沧区",
"label": "李沧区"
},
{
"code": "370214",
"value": "城阳区",
"label": "城阳区"
},
{
"code": "370215",
"value": "即墨区",
"label": "即墨区"
},
{
"code": "370281",
"value": "胶州市",
"label": "胶州市"
},
{
"code": "370283",
"value": "平度市",
"label": "平度市"
},
{
"code": "370285",
"value": "莱西市",
"label": "莱西市"
}
]
},
{
"code": "370300",
"value": "淄博市",
"label": "淄博市",
"children": [
{
"code": "370302",
"value": "淄川区",
"label": "淄川区"
},
{
"code": "370303",
"value": "张店区",
"label": "张店区"
},
{
"code": "370304",
"value": "博山区",
"label": "博山区"
},
{
"code": "370305",
"value": "临淄区",
"label": "临淄区"
},
{
"code": "370306",
"value": "周村区",
"label": "周村区"
},
{
"code": "370321",
"value": "桓台县",
"label": "桓台县"
},
{
"code": "370322",
"value": "高青县",
"label": "高青县"
},
{
"code": "370323",
"value": "沂源县",
"label": "沂源县"
}
]
},
{
"code": "370400",
"value": "枣庄市",
"label": "枣庄市",
"children": [
{
"code": "370402",
"value": "市中区",
"label": "市中区"
},
{
"code": "370403",
"value": "薛城区",
"label": "薛城区"
},
{
"code": "370404",
"value": "峄城区",
"label": "峄城区"
},
{
"code": "370405",
"value": "台儿庄区",
"label": "台儿庄区"
},
{
"code": "370406",
"value": "山亭区",
"label": "山亭区"
},
{
"code": "370481",
"value": "滕州市",
"label": "滕州市"
}
]
},
{
"code": "370500",
"value": "东营市",
"label": "东营市",
"children": [
{
"code": "370502",
"value": "东营区",
"label": "东营区"
},
{
"code": "370503",
"value": "河口区",
"label": "河口区"
},
{
"code": "370505",
"value": "垦利区",
"label": "垦利区"
},
{
"code": "370522",
"value": "利津县",
"label": "利津县"
},
{
"code": "370523",
"value": "广饶县",
"label": "广饶县"
}
]
},
{
"code": "370600",
"value": "烟台市",
"label": "烟台市",
"children": [
{
"code": "370602",
"value": "芝罘区",
"label": "芝罘区"
},
{
"code": "370611",
"value": "福山区",
"label": "福山区"
},
{
"code": "370612",
"value": "牟平区",
"label": "牟平区"
},
{
"code": "370613",
"value": "莱山区",
"label": "莱山区"
},
{
"code": "370614",
"value": "蓬莱区",
"label": "蓬莱区"
},
{
"code": "370681",
"value": "龙口市",
"label": "龙口市"
},
{
"code": "370682",
"value": "莱阳市",
"label": "莱阳市"
},
{
"code": "370683",
"value": "莱州市",
"label": "莱州市"
},
{
"code": "370685",
"value": "招远市",
"label": "招远市"
},
{
"code": "370686",
"value": "栖霞市",
"label": "栖霞市"
},
{
"code": "370687",
"value": "海阳市",
"label": "海阳市"
}
]
},
{
"code": "370700",
"value": "潍坊市",
"label": "潍坊市",
"children": [
{
"code": "370702",
"value": "潍城区",
"label": "潍城区"
},
{
"code": "370703",
"value": "寒亭区",
"label": "寒亭区"
},
{
"code": "370704",
"value": "坊子区",
"label": "坊子区"
},
{
"code": "370705",
"value": "奎文区",
"label": "奎文区"
},
{
"code": "370724",
"value": "临朐县",
"label": "临朐县"
},
{
"code": "370725",
"value": "昌乐县",
"label": "昌乐县"
},
{
"code": "370781",
"value": "青州市",
"label": "青州市"
},
{
"code": "370782",
"value": "诸城市",
"label": "诸城市"
},
{
"code": "370783",
"value": "寿光市",
"label": "寿光市"
},
{
"code": "370784",
"value": "安丘市",
"label": "安丘市"
},
{
"code": "370785",
"value": "高密市",
"label": "高密市"
},
{
"code": "370786",
"value": "昌邑市",
"label": "昌邑市"
}
]
},
{
"code": "370800",
"value": "济宁市",
"label": "济宁市",
"children": [
{
"code": "370811",
"value": "任城区",
"label": "任城区"
},
{
"code": "370812",
"value": "兖州区",
"label": "兖州区"
},
{
"code": "370826",
"value": "微山县",
"label": "微山县"
},
{
"code": "370827",
"value": "鱼台县",
"label": "鱼台县"
},
{
"code": "370828",
"value": "金乡县",
"label": "金乡县"
},
{
"code": "370829",
"value": "嘉祥县",
"label": "嘉祥县"
},
{
"code": "370830",
"value": "汶上县",
"label": "汶上县"
},
{
"code": "370831",
"value": "泗水县",
"label": "泗水县"
},
{
"code": "370832",
"value": "梁山县",
"label": "梁山县"
},
{
"code": "370881",
"value": "曲阜市",
"label": "曲阜市"
},
{
"code": "370883",
"value": "邹城市",
"label": "邹城市"
}
]
},
{
"code": "370900",
"value": "泰安市",
"label": "泰安市",
"children": [
{
"code": "370902",
"value": "泰山区",
"label": "泰山区"
},
{
"code": "370911",
"value": "岱岳区",
"label": "岱岳区"
},
{
"code": "370921",
"value": "宁阳县",
"label": "宁阳县"
},
{
"code": "370923",
"value": "东平县",
"label": "东平县"
},
{
"code": "370982",
"value": "新泰市",
"label": "新泰市"
},
{
"code": "370983",
"value": "肥城市",
"label": "肥城市"
}
]
},
{
"code": "371000",
"value": "威海市",
"label": "威海市",
"children": [
{
"code": "371002",
"value": "环翠区",
"label": "环翠区"
},
{
"code": "371003",
"value": "文登区",
"label": "文登区"
},
{
"code": "371082",
"value": "荣成市",
"label": "荣成市"
},
{
"code": "371083",
"value": "乳山市",
"label": "乳山市"
}
]
},
{
"code": "371100",
"value": "日照市",
"label": "日照市",
"children": [
{
"code": "371102",
"value": "东港区",
"label": "东港区"
},
{
"code": "371103",
"value": "岚山区",
"label": "岚山区"
},
{
"code": "371121",
"value": "五莲县",
"label": "五莲县"
},
{
"code": "371122",
"value": "莒县",
"label": "莒县"
}
]
},
{
"code": "371300",
"value": "临沂市",
"label": "临沂市",
"children": [
{
"code": "371302",
"value": "兰山区",
"label": "兰山区"
},
{
"code": "371311",
"value": "罗庄区",
"label": "罗庄区"
},
{
"code": "371312",
"value": "河东区",
"label": "河东区"
},
{
"code": "371321",
"value": "沂南县",
"label": "沂南县"
},
{
"code": "371322",
"value": "郯城县",
"label": "郯城县"
},
{
"code": "371323",
"value": "沂水县",
"label": "沂水县"
},
{
"code": "371324",
"value": "兰陵县",
"label": "兰陵县"
},
{
"code": "371325",
"value": "费县",
"label": "费县"
},
{
"code": "371326",
"value": "平邑县",
"label": "平邑县"
},
{
"code": "371327",
"value": "莒南县",
"label": "莒南县"
},
{
"code": "371328",
"value": "蒙阴县",
"label": "蒙阴县"
},
{
"code": "371329",
"value": "临沭县",
"label": "临沭县"
}
]
},
{
"code": "371400",
"value": "德州市",
"label": "德州市",
"children": [
{
"code": "371402",
"value": "德城区",
"label": "德城区"
},
{
"code": "371403",
"value": "陵城区",
"label": "陵城区"
},
{
"code": "371422",
"value": "宁津县",
"label": "宁津县"
},
{
"code": "371423",
"value": "庆云县",
"label": "庆云县"
},
{
"code": "371424",
"value": "临邑县",
"label": "临邑县"
},
{
"code": "371425",
"value": "齐河县",
"label": "齐河县"
},
{
"code": "371426",
"value": "平原县",
"label": "平原县"
},
{
"code": "371427",
"value": "夏津县",
"label": "夏津县"
},
{
"code": "371428",
"value": "武城县",
"label": "武城县"
},
{
"code": "371481",
"value": "乐陵市",
"label": "乐陵市"
},
{
"code": "371482",
"value": "禹城市",
"label": "禹城市"
}
]
},
{
"code": "371500",
"value": "聊城市",
"label": "聊城市",
"children": [
{
"code": "371502",
"value": "东昌府区",
"label": "东昌府区"
},
{
"code": "371503",
"value": "茌平区",
"label": "茌平区"
},
{
"code": "371521",
"value": "阳谷县",
"label": "阳谷县"
},
{
"code": "371522",
"value": "莘县",
"label": "莘县"
},
{
"code": "371524",
"value": "东阿县",
"label": "东阿县"
},
{
"code": "371525",
"value": "冠县",
"label": "冠县"
},
{
"code": "371526",
"value": "高唐县",
"label": "高唐县"
},
{
"code": "371581",
"value": "临清市",
"label": "临清市"
}
]
},
{
"code": "371600",
"value": "滨州市",
"label": "滨州市",
"children": [
{
"code": "371602",
"value": "滨城区",
"label": "滨城区"
},
{
"code": "371603",
"value": "沾化区",
"label": "沾化区"
},
{
"code": "371621",
"value": "惠民县",
"label": "惠民县"
},
{
"code": "371622",
"value": "阳信县",
"label": "阳信县"
},
{
"code": "371623",
"value": "无棣县",
"label": "无棣县"
},
{
"code": "371625",
"value": "博兴县",
"label": "博兴县"
},
{
"code": "371681",
"value": "邹平市",
"label": "邹平市"
}
]
},
{
"code": "371700",
"value": "菏泽市",
"label": "菏泽市",
"children": [
{
"code": "371702",
"value": "牡丹区",
"label": "牡丹区"
},
{
"code": "371703",
"value": "定陶区",
"label": "定陶区"
},
{
"code": "371721",
"value": "曹县",
"label": "曹县"
},
{
"code": "371722",
"value": "单县",
"label": "单县"
},
{
"code": "371723",
"value": "成武县",
"label": "成武县"
},
{
"code": "371724",
"value": "巨野县",
"label": "巨野县"
},
{
"code": "371725",
"value": "郓城县",
"label": "郓城县"
},
{
"code": "371726",
"value": "鄄城县",
"label": "鄄城县"
},
{
"code": "371728",
"value": "东明县",
"label": "东明县"
}
]
}
]
},
{
"code": "410000",
"value": "河南省",
"label": "河南省",
"children": [
{
"code": "410100",
"value": "郑州市",
"label": "郑州市",
"children": [
{
"code": "410102",
"value": "中原区",
"label": "中原区"
},
{
"code": "410103",
"value": "二七区",
"label": "二七区"
},
{
"code": "410104",
"value": "管城回族区",
"label": "管城回族区"
},
{
"code": "410105",
"value": "金水区",
"label": "金水区"
},
{
"code": "410106",
"value": "上街区",
"label": "上街区"
},
{
"code": "410108",
"value": "惠济区",
"label": "惠济区"
},
{
"code": "410122",
"value": "中牟县",
"label": "中牟县"
},
{
"code": "410181",
"value": "巩义市",
"label": "巩义市"
},
{
"code": "410182",
"value": "荥阳市",
"label": "荥阳市"
},
{
"code": "410183",
"value": "新密市",
"label": "新密市"
},
{
"code": "410184",
"value": "新郑市",
"label": "新郑市"
},
{
"code": "410185",
"value": "登封市",
"label": "登封市"
}
]
},
{
"code": "410200",
"value": "开封市",
"label": "开封市",
"children": [
{
"code": "410202",
"value": "龙亭区",
"label": "龙亭区"
},
{
"code": "410203",
"value": "顺河回族区",
"label": "顺河回族区"
},
{
"code": "410204",
"value": "鼓楼区",
"label": "鼓楼区"
},
{
"code": "410205",
"value": "禹王台区",
"label": "禹王台区"
},
{
"code": "410212",
"value": "祥符区",
"label": "祥符区"
},
{
"code": "410221",
"value": "杞县",
"label": "杞县"
},
{
"code": "410222",
"value": "通许县",
"label": "通许县"
},
{
"code": "410223",
"value": "尉氏县",
"label": "尉氏县"
},
{
"code": "410225",
"value": "兰考县",
"label": "兰考县"
}
]
},
{
"code": "410300",
"value": "洛阳市",
"label": "洛阳市",
"children": [
{
"code": "410302",
"value": "老城区",
"label": "老城区"
},
{
"code": "410303",
"value": "西工区",
"label": "西工区"
},
{
"code": "410304",
"value": "瀍河回族区",
"label": "瀍河回族区"
},
{
"code": "410305",
"value": "涧西区",
"label": "涧西区"
},
{
"code": "410306",
"value": "吉利区",
"label": "吉利区"
},
{
"code": "410311",
"value": "洛龙区",
"label": "洛龙区"
},
{
"code": "410322",
"value": "孟津县",
"label": "孟津县"
},
{
"code": "410323",
"value": "新安县",
"label": "新安县"
},
{
"code": "410324",
"value": "栾川县",
"label": "栾川县"
},
{
"code": "410325",
"value": "嵩县",
"label": "嵩县"
},
{
"code": "410326",
"value": "汝阳县",
"label": "汝阳县"
},
{
"code": "410327",
"value": "宜阳县",
"label": "宜阳县"
},
{
"code": "410328",
"value": "洛宁县",
"label": "洛宁县"
},
{
"code": "410329",
"value": "伊川县",
"label": "伊川县"
},
{
"code": "410381",
"value": "偃师市",
"label": "偃师市"
}
]
},
{
"code": "410400",
"value": "平顶山市",
"label": "平顶山市",
"children": [
{
"code": "410402",
"value": "新华区",
"label": "新华区"
},
{
"code": "410403",
"value": "卫东区",
"label": "卫东区"
},
{
"code": "410404",
"value": "石龙区",
"label": "石龙区"
},
{
"code": "410411",
"value": "湛河区",
"label": "湛河区"
},
{
"code": "410421",
"value": "宝丰县",
"label": "宝丰县"
},
{
"code": "410422",
"value": "叶县",
"label": "叶县"
},
{
"code": "410423",
"value": "鲁山县",
"label": "鲁山县"
},
{
"code": "410425",
"value": "郏县",
"label": "郏县"
},
{
"code": "410481",
"value": "舞钢市",
"label": "舞钢市"
},
{
"code": "410482",
"value": "汝州市",
"label": "汝州市"
}
]
},
{
"code": "410500",
"value": "安阳市",
"label": "安阳市",
"children": [
{
"code": "410502",
"value": "文峰区",
"label": "文峰区"
},
{
"code": "410503",
"value": "北关区",
"label": "北关区"
},
{
"code": "410505",
"value": "殷都区",
"label": "殷都区"
},
{
"code": "410506",
"value": "龙安区",
"label": "龙安区"
},
{
"code": "410522",
"value": "安阳县",
"label": "安阳县"
},
{
"code": "410523",
"value": "汤阴县",
"label": "汤阴县"
},
{
"code": "410526",
"value": "滑县",
"label": "滑县"
},
{
"code": "410527",
"value": "内黄县",
"label": "内黄县"
},
{
"code": "410581",
"value": "林州市",
"label": "林州市"
}
]
},
{
"code": "410600",
"value": "鹤壁市",
"label": "鹤壁市",
"children": [
{
"code": "410602",
"value": "鹤山区",
"label": "鹤山区"
},
{
"code": "410603",
"value": "山城区",
"label": "山城区"
},
{
"code": "410611",
"value": "淇滨区",
"label": "淇滨区"
},
{
"code": "410621",
"value": "浚县",
"label": "浚县"
},
{
"code": "410622",
"value": "淇县",
"label": "淇县"
}
]
},
{
"code": "410700",
"value": "新乡市",
"label": "新乡市",
"children": [
{
"code": "410702",
"value": "红旗区",
"label": "红旗区"
},
{
"code": "410703",
"value": "卫滨区",
"label": "卫滨区"
},
{
"code": "410704",
"value": "凤泉区",
"label": "凤泉区"
},
{
"code": "410711",
"value": "牧野区",
"label": "牧野区"
},
{
"code": "410721",
"value": "新乡县",
"label": "新乡县"
},
{
"code": "410724",
"value": "获嘉县",
"label": "获嘉县"
},
{
"code": "410725",
"value": "原阳县",
"label": "原阳县"
},
{
"code": "410726",
"value": "延津县",
"label": "延津县"
},
{
"code": "410727",
"value": "封丘县",
"label": "封丘县"
},
{
"code": "410781",
"value": "卫辉市",
"label": "卫辉市"
},
{
"code": "410782",
"value": "辉县市",
"label": "辉县市"
},
{
"code": "410783",
"value": "长垣市",
"label": "长垣市"
}
]
},
{
"code": "410800",
"value": "焦作市",
"label": "焦作市",
"children": [
{
"code": "410802",
"value": "解放区",
"label": "解放区"
},
{
"code": "410803",
"value": "中站区",
"label": "中站区"
},
{
"code": "410804",
"value": "马村区",
"label": "马村区"
},
{
"code": "410811",
"value": "山阳区",
"label": "山阳区"
},
{
"code": "410821",
"value": "修武县",
"label": "修武县"
},
{
"code": "410822",
"value": "博爱县",
"label": "博爱县"
},
{
"code": "410823",
"value": "武陟县",
"label": "武陟县"
},
{
"code": "410825",
"value": "温县",
"label": "温县"
},
{
"code": "410882",
"value": "沁阳市",
"label": "沁阳市"
},
{
"code": "410883",
"value": "孟州市",
"label": "孟州市"
}
]
},
{
"code": "410900",
"value": "濮阳市",
"label": "濮阳市",
"children": [
{
"code": "410902",
"value": "华龙区",
"label": "华龙区"
},
{
"code": "410922",
"value": "清丰县",
"label": "清丰县"
},
{
"code": "410923",
"value": "南乐县",
"label": "南乐县"
},
{
"code": "410926",
"value": "范县",
"label": "范县"
},
{
"code": "410927",
"value": "台前县",
"label": "台前县"
},
{
"code": "410928",
"value": "濮阳县",
"label": "濮阳县"
}
]
},
{
"code": "411000",
"value": "许昌市",
"label": "许昌市",
"children": [
{
"code": "411002",
"value": "魏都区",
"label": "魏都区"
},
{
"code": "411003",
"value": "建安区",
"label": "建安区"
},
{
"code": "411024",
"value": "鄢陵县",
"label": "鄢陵县"
},
{
"code": "411025",
"value": "襄城县",
"label": "襄城县"
},
{
"code": "411081",
"value": "禹州市",
"label": "禹州市"
},
{
"code": "411082",
"value": "长葛市",
"label": "长葛市"
}
]
},
{
"code": "411100",
"value": "漯河市",
"label": "漯河市",
"children": [
{
"code": "411102",
"value": "源汇区",
"label": "源汇区"
},
{
"code": "411103",
"value": "郾城区",
"label": "郾城区"
},
{
"code": "411104",
"value": "召陵区",
"label": "召陵区"
},
{
"code": "411121",
"value": "舞阳县",
"label": "舞阳县"
},
{
"code": "411122",
"value": "临颍县",
"label": "临颍县"
}
]
},
{
"code": "411200",
"value": "三门峡市",
"label": "三门峡市",
"children": [
{
"code": "411202",
"value": "湖滨区",
"label": "湖滨区"
},
{
"code": "411203",
"value": "陕州区",
"label": "陕州区"
},
{
"code": "411221",
"value": "渑池县",
"label": "渑池县"
},
{
"code": "411224",
"value": "卢氏县",
"label": "卢氏县"
},
{
"code": "411281",
"value": "义马市",
"label": "义马市"
},
{
"code": "411282",
"value": "灵宝市",
"label": "灵宝市"
}
]
},
{
"code": "411300",
"value": "南阳市",
"label": "南阳市",
"children": [
{
"code": "411302",
"value": "宛城区",
"label": "宛城区"
},
{
"code": "411303",
"value": "卧龙区",
"label": "卧龙区"
},
{
"code": "411321",
"value": "南召县",
"label": "南召县"
},
{
"code": "411322",
"value": "方城县",
"label": "方城县"
},
{
"code": "411323",
"value": "西峡县",
"label": "西峡县"
},
{
"code": "411324",
"value": "镇平县",
"label": "镇平县"
},
{
"code": "411325",
"value": "内乡县",
"label": "内乡县"
},
{
"code": "411326",
"value": "淅川县",
"label": "淅川县"
},
{
"code": "411327",
"value": "社旗县",
"label": "社旗县"
},
{
"code": "411328",
"value": "唐河县",
"label": "唐河县"
},
{
"code": "411329",
"value": "新野县",
"label": "新野县"
},
{
"code": "411330",
"value": "桐柏县",
"label": "桐柏县"
},
{
"code": "411381",
"value": "邓州市",
"label": "邓州市"
}
]
},
{
"code": "411400",
"value": "商丘市",
"label": "商丘市",
"children": [
{
"code": "411402",
"value": "梁园区",
"label": "梁园区"
},
{
"code": "411403",
"value": "睢阳区",
"label": "睢阳区"
},
{
"code": "411421",
"value": "民权县",
"label": "民权县"
},
{
"code": "411422",
"value": "睢县",
"label": "睢县"
},
{
"code": "411423",
"value": "宁陵县",
"label": "宁陵县"
},
{
"code": "411424",
"value": "柘城县",
"label": "柘城县"
},
{
"code": "411425",
"value": "虞城县",
"label": "虞城县"
},
{
"code": "411426",
"value": "夏邑县",
"label": "夏邑县"
},
{
"code": "411481",
"value": "永城市",
"label": "永城市"
}
]
},
{
"code": "411500",
"value": "信阳市",
"label": "信阳市",
"children": [
{
"code": "411502",
"value": "浉河区",
"label": "浉河区"
},
{
"code": "411503",
"value": "平桥区",
"label": "平桥区"
},
{
"code": "411521",
"value": "罗山县",
"label": "罗山县"
},
{
"code": "411522",
"value": "光山县",
"label": "光山县"
},
{
"code": "411523",
"value": "新县",
"label": "新县"
},
{
"code": "411524",
"value": "商城县",
"label": "商城县"
},
{
"code": "411525",
"value": "固始县",
"label": "固始县"
},
{
"code": "411526",
"value": "潢川县",
"label": "潢川县"
},
{
"code": "411527",
"value": "淮滨县",
"label": "淮滨县"
},
{
"code": "411528",
"value": "息县",
"label": "息县"
}
]
},
{
"code": "411600",
"value": "周口市",
"label": "周口市",
"children": [
{
"code": "411602",
"value": "川汇区",
"label": "川汇区"
},
{
"code": "411603",
"value": "淮阳区",
"label": "淮阳区"
},
{
"code": "411621",
"value": "扶沟县",
"label": "扶沟县"
},
{
"code": "411622",
"value": "西华县",
"label": "西华县"
},
{
"code": "411623",
"value": "商水县",
"label": "商水县"
},
{
"code": "411624",
"value": "沈丘县",
"label": "沈丘县"
},
{
"code": "411625",
"value": "郸城县",
"label": "郸城县"
},
{
"code": "411627",
"value": "太康县",
"label": "太康县"
},
{
"code": "411628",
"value": "鹿邑县",
"label": "鹿邑县"
},
{
"code": "411681",
"value": "项城市",
"label": "项城市"
}
]
},
{
"code": "411700",
"value": "驻马店市",
"label": "驻马店市",
"children": [
{
"code": "411702",
"value": "驿城区",
"label": "驿城区"
},
{
"code": "411721",
"value": "西平县",
"label": "西平县"
},
{
"code": "411722",
"value": "上蔡县",
"label": "上蔡县"
},
{
"code": "411723",
"value": "平舆县",
"label": "平舆县"
},
{
"code": "411724",
"value": "正阳县",
"label": "正阳县"
},
{
"code": "411725",
"value": "确山县",
"label": "确山县"
},
{
"code": "411726",
"value": "泌阳县",
"label": "泌阳县"
},
{
"code": "411727",
"value": "汝南县",
"label": "汝南县"
},
{
"code": "411728",
"value": "遂平县",
"label": "遂平县"
},
{
"code": "411729",
"value": "新蔡县",
"label": "新蔡县"
}
]
}
]
},
{
"code": "420000",
"value": "湖北省",
"label": "湖北省",
"children": [
{
"code": "420100",
"value": "武汉市",
"label": "武汉市",
"children": [
{
"code": "420102",
"value": "江岸区",
"label": "江岸区"
},
{
"code": "420103",
"value": "江汉区",
"label": "江汉区"
},
{
"code": "420104",
"value": "硚口区",
"label": "硚口区"
},
{
"code": "420105",
"value": "汉阳区",
"label": "汉阳区"
},
{
"code": "420106",
"value": "武昌区",
"label": "武昌区"
},
{
"code": "420107",
"value": "青山区",
"label": "青山区"
},
{
"code": "420111",
"value": "洪山区",
"label": "洪山区"
},
{
"code": "420112",
"value": "东西湖区",
"label": "东西湖区"
},
{
"code": "420113",
"value": "汉南区",
"label": "汉南区"
},
{
"code": "420114",
"value": "蔡甸区",
"label": "蔡甸区"
},
{
"code": "420115",
"value": "江夏区",
"label": "江夏区"
},
{
"code": "420116",
"value": "黄陂区",
"label": "黄陂区"
},
{
"code": "420117",
"value": "新洲区",
"label": "新洲区"
}
]
},
{
"code": "420200",
"value": "黄石市",
"label": "黄石市",
"children": [
{
"code": "420202",
"value": "黄石港区",
"label": "黄石港区"
},
{
"code": "420203",
"value": "西塞山区",
"label": "西塞山区"
},
{
"code": "420204",
"value": "下陆区",
"label": "下陆区"
},
{
"code": "420205",
"value": "铁山区",
"label": "铁山区"
},
{
"code": "420222",
"value": "阳新县",
"label": "阳新县"
},
{
"code": "420281",
"value": "大冶市",
"label": "大冶市"
}
]
},
{
"code": "420300",
"value": "十堰市",
"label": "十堰市",
"children": [
{
"code": "420302",
"value": "茅箭区",
"label": "茅箭区"
},
{
"code": "420303",
"value": "张湾区",
"label": "张湾区"
},
{
"code": "420304",
"value": "郧阳区",
"label": "郧阳区"
},
{
"code": "420322",
"value": "郧西县",
"label": "郧西县"
},
{
"code": "420323",
"value": "竹山县",
"label": "竹山县"
},
{
"code": "420324",
"value": "竹溪县",
"label": "竹溪县"
},
{
"code": "420325",
"value": "房县",
"label": "房县"
},
{
"code": "420381",
"value": "丹江口市",
"label": "丹江口市"
}
]
},
{
"code": "420500",
"value": "宜昌市",
"label": "宜昌市",
"children": [
{
"code": "420502",
"value": "西陵区",
"label": "西陵区"
},
{
"code": "420503",
"value": "伍家岗区",
"label": "伍家岗区"
},
{
"code": "420504",
"value": "点军区",
"label": "点军区"
},
{
"code": "420505",
"value": "猇亭区",
"label": "猇亭区"
},
{
"code": "420506",
"value": "夷陵区",
"label": "夷陵区"
},
{
"code": "420525",
"value": "远安县",
"label": "远安县"
},
{
"code": "420526",
"value": "兴山县",
"label": "兴山县"
},
{
"code": "420527",
"value": "秭归县",
"label": "秭归县"
},
{
"code": "420528",
"value": "长阳土家族自治县",
"label": "长阳土家族自治县"
},
{
"code": "420529",
"value": "五峰土家族自治县",
"label": "五峰土家族自治县"
},
{
"code": "420581",
"value": "宜都市",
"label": "宜都市"
},
{
"code": "420582",
"value": "当阳市",
"label": "当阳市"
},
{
"code": "420583",
"value": "枝江市",
"label": "枝江市"
}
]
},
{
"code": "420600",
"value": "襄阳市",
"label": "襄阳市",
"children": [
{
"code": "420602",
"value": "襄城区",
"label": "襄城区"
},
{
"code": "420606",
"value": "樊城区",
"label": "樊城区"
},
{
"code": "420607",
"value": "襄州区",
"label": "襄州区"
},
{
"code": "420624",
"value": "南漳县",
"label": "南漳县"
},
{
"code": "420625",
"value": "谷城县",
"label": "谷城县"
},
{
"code": "420626",
"value": "保康县",
"label": "保康县"
},
{
"code": "420682",
"value": "老河口市",
"label": "老河口市"
},
{
"code": "420683",
"value": "枣阳市",
"label": "枣阳市"
},
{
"code": "420684",
"value": "宜城市",
"label": "宜城市"
}
]
},
{
"code": "420700",
"value": "鄂州市",
"label": "鄂州市",
"children": [
{
"code": "420702",
"value": "梁子湖区",
"label": "梁子湖区"
},
{
"code": "420703",
"value": "华容区",
"label": "华容区"
},
{
"code": "420704",
"value": "鄂城区",
"label": "鄂城区"
}
]
},
{
"code": "420800",
"value": "荆门市",
"label": "荆门市",
"children": [
{
"code": "420802",
"value": "东宝区",
"label": "东宝区"
},
{
"code": "420804",
"value": "掇刀区",
"label": "掇刀区"
},
{
"code": "420822",
"value": "沙洋县",
"label": "沙洋县"
},
{
"code": "420881",
"value": "钟祥市",
"label": "钟祥市"
},
{
"code": "420882",
"value": "京山市",
"label": "京山市"
}
]
},
{
"code": "420900",
"value": "孝感市",
"label": "孝感市",
"children": [
{
"code": "420902",
"value": "孝南区",
"label": "孝南区"
},
{
"code": "420921",
"value": "孝昌县",
"label": "孝昌县"
},
{
"code": "420922",
"value": "大悟县",
"label": "大悟县"
},
{
"code": "420923",
"value": "云梦县",
"label": "云梦县"
},
{
"code": "420981",
"value": "应城市",
"label": "应城市"
},
{
"code": "420982",
"value": "安陆市",
"label": "安陆市"
},
{
"code": "420984",
"value": "汉川市",
"label": "汉川市"
}
]
},
{
"code": "421000",
"value": "荆州市",
"label": "荆州市",
"children": [
{
"code": "421002",
"value": "沙市区",
"label": "沙市区"
},
{
"code": "421003",
"value": "荆州区",
"label": "荆州区"
},
{
"code": "421022",
"value": "公安县",
"label": "公安县"
},
{
"code": "421023",
"value": "监利县",
"label": "监利县"
},
{
"code": "421024",
"value": "江陵县",
"label": "江陵县"
},
{
"code": "421081",
"value": "石首市",
"label": "石首市"
},
{
"code": "421083",
"value": "洪湖市",
"label": "洪湖市"
},
{
"code": "421087",
"value": "松滋市",
"label": "松滋市"
}
]
},
{
"code": "421100",
"value": "黄冈市",
"label": "黄冈市",
"children": [
{
"code": "421102",
"value": "黄州区",
"label": "黄州区"
},
{
"code": "421121",
"value": "团风县",
"label": "团风县"
},
{
"code": "421122",
"value": "红安县",
"label": "红安县"
},
{
"code": "421123",
"value": "罗田县",
"label": "罗田县"
},
{
"code": "421124",
"value": "英山县",
"label": "英山县"
},
{
"code": "421125",
"value": "浠水县",
"label": "浠水县"
},
{
"code": "421126",
"value": "蕲春县",
"label": "蕲春县"
},
{
"code": "421127",
"value": "黄梅县",
"label": "黄梅县"
},
{
"code": "421181",
"value": "麻城市",
"label": "麻城市"
},
{
"code": "421182",
"value": "武穴市",
"label": "武穴市"
}
]
},
{
"code": "421200",
"value": "咸宁市",
"label": "咸宁市",
"children": [
{
"code": "421202",
"value": "咸安区",
"label": "咸安区"
},
{
"code": "421221",
"value": "嘉鱼县",
"label": "嘉鱼县"
},
{
"code": "421222",
"value": "通城县",
"label": "通城县"
},
{
"code": "421223",
"value": "崇阳县",
"label": "崇阳县"
},
{
"code": "421224",
"value": "通山县",
"label": "通山县"
},
{
"code": "421281",
"value": "赤壁市",
"label": "赤壁市"
}
]
},
{
"code": "421300",
"value": "随州市",
"label": "随州市",
"children": [
{
"code": "421303",
"value": "曾都区",
"label": "曾都区"
},
{
"code": "421321",
"value": "随县",
"label": "随县"
},
{
"code": "421381",
"value": "广水市",
"label": "广水市"
}
]
},
{
"code": "422800",
"value": "恩施土家族苗族自治州",
"label": "恩施土家族苗族自治州",
"children": [
{
"code": "422801",
"value": "恩施市",
"label": "恩施市"
},
{
"code": "422802",
"value": "利川市",
"label": "利川市"
},
{
"code": "422822",
"value": "建始县",
"label": "建始县"
},
{
"code": "422823",
"value": "巴东县",
"label": "巴东县"
},
{
"code": "422825",
"value": "宣恩县",
"label": "宣恩县"
},
{
"code": "422826",
"value": "咸丰县",
"label": "咸丰县"
},
{
"code": "422827",
"value": "来凤县",
"label": "来凤县"
},
{
"code": "422828",
"value": "鹤峰县",
"label": "鹤峰县"
}
]
}
]
},
{
"code": "430000",
"value": "湖南省",
"label": "湖南省",
"children": [
{
"code": "430100",
"value": "长沙市",
"label": "长沙市",
"children": [
{
"code": "430102",
"value": "芙蓉区",
"label": "芙蓉区"
},
{
"code": "430103",
"value": "天心区",
"label": "天心区"
},
{
"code": "430104",
"value": "岳麓区",
"label": "岳麓区"
},
{
"code": "430105",
"value": "开福区",
"label": "开福区"
},
{
"code": "430111",
"value": "雨花区",
"label": "雨花区"
},
{
"code": "430112",
"value": "望城区",
"label": "望城区"
},
{
"code": "430121",
"value": "长沙县",
"label": "长沙县"
},
{
"code": "430181",
"value": "浏阳市",
"label": "浏阳市"
},
{
"code": "430182",
"value": "宁乡市",
"label": "宁乡市"
}
]
},
{
"code": "430200",
"value": "株洲市",
"label": "株洲市",
"children": [
{
"code": "430202",
"value": "荷塘区",
"label": "荷塘区"
},
{
"code": "430203",
"value": "芦淞区",
"label": "芦淞区"
},
{
"code": "430204",
"value": "石峰区",
"label": "石峰区"
},
{
"code": "430211",
"value": "天元区",
"label": "天元区"
},
{
"code": "430212",
"value": "渌口区",
"label": "渌口区"
},
{
"code": "430223",
"value": "攸县",
"label": "攸县"
},
{
"code": "430224",
"value": "茶陵县",
"label": "茶陵县"
},
{
"code": "430225",
"value": "炎陵县",
"label": "炎陵县"
},
{
"code": "430281",
"value": "醴陵市",
"label": "醴陵市"
}
]
},
{
"code": "430300",
"value": "湘潭市",
"label": "湘潭市",
"children": [
{
"code": "430302",
"value": "雨湖区",
"label": "雨湖区"
},
{
"code": "430304",
"value": "岳塘区",
"label": "岳塘区"
},
{
"code": "430321",
"value": "湘潭县",
"label": "湘潭县"
},
{
"code": "430381",
"value": "湘乡市",
"label": "湘乡市"
},
{
"code": "430382",
"value": "韶山市",
"label": "韶山市"
}
]
},
{
"code": "430400",
"value": "衡阳市",
"label": "衡阳市",
"children": [
{
"code": "430405",
"value": "珠晖区",
"label": "珠晖区"
},
{
"code": "430406",
"value": "雁峰区",
"label": "雁峰区"
},
{
"code": "430407",
"value": "石鼓区",
"label": "石鼓区"
},
{
"code": "430408",
"value": "蒸湘区",
"label": "蒸湘区"
},
{
"code": "430412",
"value": "南岳区",
"label": "南岳区"
},
{
"code": "430421",
"value": "衡阳县",
"label": "衡阳县"
},
{
"code": "430422",
"value": "衡南县",
"label": "衡南县"
},
{
"code": "430423",
"value": "衡山县",
"label": "衡山县"
},
{
"code": "430424",
"value": "衡东县",
"label": "衡东县"
},
{
"code": "430426",
"value": "祁东县",
"label": "祁东县"
},
{
"code": "430481",
"value": "耒阳市",
"label": "耒阳市"
},
{
"code": "430482",
"value": "常宁市",
"label": "常宁市"
}
]
},
{
"code": "430500",
"value": "邵阳市",
"label": "邵阳市",
"children": [
{
"code": "430502",
"value": "双清区",
"label": "双清区"
},
{
"code": "430503",
"value": "大祥区",
"label": "大祥区"
},
{
"code": "430511",
"value": "北塔区",
"label": "北塔区"
},
{
"code": "430522",
"value": "新邵县",
"label": "新邵县"
},
{
"code": "430523",
"value": "邵阳县",
"label": "邵阳县"
},
{
"code": "430524",
"value": "隆回县",
"label": "隆回县"
},
{
"code": "430525",
"value": "洞口县",
"label": "洞口县"
},
{
"code": "430527",
"value": "绥宁县",
"label": "绥宁县"
},
{
"code": "430528",
"value": "新宁县",
"label": "新宁县"
},
{
"code": "430529",
"value": "城步苗族自治县",
"label": "城步苗族自治县"
},
{
"code": "430581",
"value": "武冈市",
"label": "武冈市"
},
{
"code": "430582",
"value": "邵东市",
"label": "邵东市"
}
]
},
{
"code": "430600",
"value": "岳阳市",
"label": "岳阳市",
"children": [
{
"code": "430602",
"value": "岳阳楼区",
"label": "岳阳楼区"
},
{
"code": "430603",
"value": "云溪区",
"label": "云溪区"
},
{
"code": "430611",
"value": "君山区",
"label": "君山区"
},
{
"code": "430621",
"value": "岳阳县",
"label": "岳阳县"
},
{
"code": "430623",
"value": "华容县",
"label": "华容县"
},
{
"code": "430624",
"value": "湘阴县",
"label": "湘阴县"
},
{
"code": "430626",
"value": "平江县",
"label": "平江县"
},
{
"code": "430681",
"value": "汨罗市",
"label": "汨罗市"
},
{
"code": "430682",
"value": "临湘市",
"label": "临湘市"
}
]
},
{
"code": "430700",
"value": "常德市",
"label": "常德市",
"children": [
{
"code": "430702",
"value": "武陵区",
"label": "武陵区"
},
{
"code": "430703",
"value": "鼎城区",
"label": "鼎城区"
},
{
"code": "430721",
"value": "安乡县",
"label": "安乡县"
},
{
"code": "430722",
"value": "汉寿县",
"label": "汉寿县"
},
{
"code": "430723",
"value": "澧县",
"label": "澧县"
},
{
"code": "430724",
"value": "临澧县",
"label": "临澧县"
},
{
"code": "430725",
"value": "桃源县",
"label": "桃源县"
},
{
"code": "430726",
"value": "石门县",
"label": "石门县"
},
{
"code": "430781",
"value": "津市市",
"label": "津市市"
}
]
},
{
"code": "430800",
"value": "张家界市",
"label": "张家界市",
"children": [
{
"code": "430802",
"value": "永定区",
"label": "永定区"
},
{
"code": "430811",
"value": "武陵源区",
"label": "武陵源区"
},
{
"code": "430821",
"value": "慈利县",
"label": "慈利县"
},
{
"code": "430822",
"value": "桑植县",
"label": "桑植县"
}
]
},
{
"code": "430900",
"value": "益阳市",
"label": "益阳市",
"children": [
{
"code": "430902",
"value": "资阳区",
"label": "资阳区"
},
{
"code": "430903",
"value": "赫山区",
"label": "赫山区"
},
{
"code": "430921",
"value": "南县",
"label": "南县"
},
{
"code": "430922",
"value": "桃江县",
"label": "桃江县"
},
{
"code": "430923",
"value": "安化县",
"label": "安化县"
},
{
"code": "430981",
"value": "沅江市",
"label": "沅江市"
}
]
},
{
"code": "431000",
"value": "郴州市",
"label": "郴州市",
"children": [
{
"code": "431002",
"value": "北湖区",
"label": "北湖区"
},
{
"code": "431003",
"value": "苏仙区",
"label": "苏仙区"
},
{
"code": "431021",
"value": "桂阳县",
"label": "桂阳县"
},
{
"code": "431022",
"value": "宜章县",
"label": "宜章县"
},
{
"code": "431023",
"value": "永兴县",
"label": "永兴县"
},
{
"code": "431024",
"value": "嘉禾县",
"label": "嘉禾县"
},
{
"code": "431025",
"value": "临武县",
"label": "临武县"
},
{
"code": "431026",
"value": "汝城县",
"label": "汝城县"
},
{
"code": "431027",
"value": "桂东县",
"label": "桂东县"
},
{
"code": "431028",
"value": "安仁县",
"label": "安仁县"
},
{
"code": "431081",
"value": "资兴市",
"label": "资兴市"
}
]
},
{
"code": "431100",
"value": "永州市",
"label": "永州市",
"children": [
{
"code": "431102",
"value": "零陵区",
"label": "零陵区"
},
{
"code": "431103",
"value": "冷水滩区",
"label": "冷水滩区"
},
{
"code": "431121",
"value": "祁阳县",
"label": "祁阳县"
},
{
"code": "431122",
"value": "东安县",
"label": "东安县"
},
{
"code": "431123",
"value": "双牌县",
"label": "双牌县"
},
{
"code": "431124",
"value": "道县",
"label": "道县"
},
{
"code": "431125",
"value": "江永县",
"label": "江永县"
},
{
"code": "431126",
"value": "宁远县",
"label": "宁远县"
},
{
"code": "431127",
"value": "蓝山县",
"label": "蓝山县"
},
{
"code": "431128",
"value": "新田县",
"label": "新田县"
},
{
"code": "431129",
"value": "江华瑶族自治县",
"label": "江华瑶族自治县"
}
]
},
{
"code": "431200",
"value": "怀化市",
"label": "怀化市",
"children": [
{
"code": "431202",
"value": "鹤城区",
"label": "鹤城区"
},
{
"code": "431221",
"value": "中方县",
"label": "中方县"
},
{
"code": "431222",
"value": "沅陵县",
"label": "沅陵县"
},
{
"code": "431223",
"value": "辰溪县",
"label": "辰溪县"
},
{
"code": "431224",
"value": "溆浦县",
"label": "溆浦县"
},
{
"code": "431225",
"value": "会同县",
"label": "会同县"
},
{
"code": "431226",
"value": "麻阳苗族自治县",
"label": "麻阳苗族自治县"
},
{
"code": "431227",
"value": "新晃侗族自治县",
"label": "新晃侗族自治县"
},
{
"code": "431228",
"value": "芷江侗族自治县",
"label": "芷江侗族自治县"
},
{
"code": "431229",
"value": "靖州苗族侗族自治县",
"label": "靖州苗族侗族自治县"
},
{
"code": "431230",
"value": "通道侗族自治县",
"label": "通道侗族自治县"
},
{
"code": "431281",
"value": "洪江市",
"label": "洪江市"
}
]
},
{
"code": "431300",
"value": "娄底市",
"label": "娄底市",
"children": [
{
"code": "431302",
"value": "娄星区",
"label": "娄星区"
},
{
"code": "431321",
"value": "双峰县",
"label": "双峰县"
},
{
"code": "431322",
"value": "新化县",
"label": "新化县"
},
{
"code": "431381",
"value": "冷水江市",
"label": "冷水江市"
},
{
"code": "431382",
"value": "涟源市",
"label": "涟源市"
}
]
},
{
"code": "433100",
"value": "湘西土家族苗族自治州",
"label": "湘西土家族苗族自治州",
"children": [
{
"code": "433101",
"value": "吉首市",
"label": "吉首市"
},
{
"code": "433122",
"value": "泸溪县",
"label": "泸溪县"
},
{
"code": "433123",
"value": "凤凰县",
"label": "凤凰县"
},
{
"code": "433124",
"value": "花垣县",
"label": "花垣县"
},
{
"code": "433125",
"value": "保靖县",
"label": "保靖县"
},
{
"code": "433126",
"value": "古丈县",
"label": "古丈县"
},
{
"code": "433127",
"value": "永顺县",
"label": "永顺县"
},
{
"code": "433130",
"value": "龙山县",
"label": "龙山县"
}
]
}
]
},
{
"code": "440000",
"value": "广东省",
"label": "广东省",
"children": [
{
"code": "440100",
"value": "广州市",
"label": "广州市",
"children": [
{
"code": "440103",
"value": "荔湾区",
"label": "荔湾区"
},
{
"code": "440104",
"value": "越秀区",
"label": "越秀区"
},
{
"code": "440105",
"value": "海珠区",
"label": "海珠区"
},
{
"code": "440106",
"value": "天河区",
"label": "天河区"
},
{
"code": "440111",
"value": "白云区",
"label": "白云区"
},
{
"code": "440112",
"value": "黄埔区",
"label": "黄埔区"
},
{
"code": "440113",
"value": "番禺区",
"label": "番禺区"
},
{
"code": "440114",
"value": "花都区",
"label": "花都区"
},
{
"code": "440115",
"value": "南沙区",
"label": "南沙区"
},
{
"code": "440117",
"value": "从化区",
"label": "从化区"
},
{
"code": "440118",
"value": "增城区",
"label": "增城区"
}
]
},
{
"code": "440200",
"value": "韶关市",
"label": "韶关市",
"children": [
{
"code": "440203",
"value": "武江区",
"label": "武江区"
},
{
"code": "440204",
"value": "浈江区",
"label": "浈江区"
},
{
"code": "440205",
"value": "曲江区",
"label": "曲江区"
},
{
"code": "440222",
"value": "始兴县",
"label": "始兴县"
},
{
"code": "440224",
"value": "仁化县",
"label": "仁化县"
},
{
"code": "440229",
"value": "翁源县",
"label": "翁源县"
},
{
"code": "440232",
"value": "乳源瑶族自治县",
"label": "乳源瑶族自治县"
},
{
"code": "440233",
"value": "新丰县",
"label": "新丰县"
},
{
"code": "440281",
"value": "乐昌市",
"label": "乐昌市"
},
{
"code": "440282",
"value": "南雄市",
"label": "南雄市"
}
]
},
{
"code": "440300",
"value": "深圳市",
"label": "深圳市",
"children": [
{
"code": "440303",
"value": "罗湖区",
"label": "罗湖区"
},
{
"code": "440304",
"value": "福田区",
"label": "福田区"
},
{
"code": "440305",
"value": "南山区",
"label": "南山区"
},
{
"code": "440306",
"value": "宝安区",
"label": "宝安区"
},
{
"code": "440307",
"value": "龙岗区",
"label": "龙岗区"
},
{
"code": "440308",
"value": "盐田区",
"label": "盐田区"
},
{
"code": "440309",
"value": "龙华区",
"label": "龙华区"
},
{
"code": "440310",
"value": "坪山区",
"label": "坪山区"
},
{
"code": "440311",
"value": "光明区",
"label": "光明区"
}
]
},
{
"code": "440400",
"value": "珠海市",
"label": "珠海市",
"children": [
{
"code": "440402",
"value": "香洲区",
"label": "香洲区"
},
{
"code": "440403",
"value": "斗门区",
"label": "斗门区"
},
{
"code": "440404",
"value": "金湾区",
"label": "金湾区"
}
]
},
{
"code": "440500",
"value": "汕头市",
"label": "汕头市",
"children": [
{
"code": "440507",
"value": "龙湖区",
"label": "龙湖区"
},
{
"code": "440511",
"value": "金平区",
"label": "金平区"
},
{
"code": "440512",
"value": "濠江区",
"label": "濠江区"
},
{
"code": "440513",
"value": "潮阳区",
"label": "潮阳区"
},
{
"code": "440514",
"value": "潮南区",
"label": "潮南区"
},
{
"code": "440515",
"value": "澄海区",
"label": "澄海区"
},
{
"code": "440523",
"value": "南澳县",
"label": "南澳县"
}
]
},
{
"code": "440600",
"value": "佛山市",
"label": "佛山市",
"children": [
{
"code": "440604",
"value": "禅城区",
"label": "禅城区"
},
{
"code": "440605",
"value": "南海区",
"label": "南海区"
},
{
"code": "440606",
"value": "顺德区",
"label": "顺德区"
},
{
"code": "440607",
"value": "三水区",
"label": "三水区"
},
{
"code": "440608",
"value": "高明区",
"label": "高明区"
}
]
},
{
"code": "440700",
"value": "江门市",
"label": "江门市",
"children": [
{
"code": "440703",
"value": "蓬江区",
"label": "蓬江区"
},
{
"code": "440704",
"value": "江海区",
"label": "江海区"
},
{
"code": "440705",
"value": "新会区",
"label": "新会区"
},
{
"code": "440781",
"value": "台山市",
"label": "台山市"
},
{
"code": "440783",
"value": "开平市",
"label": "开平市"
},
{
"code": "440784",
"value": "鹤山市",
"label": "鹤山市"
},
{
"code": "440785",
"value": "恩平市",
"label": "恩平市"
}
]
},
{
"code": "440800",
"value": "湛江市",
"label": "湛江市",
"children": [
{
"code": "440802",
"value": "赤坎区",
"label": "赤坎区"
},
{
"code": "440803",
"value": "霞山区",
"label": "霞山区"
},
{
"code": "440804",
"value": "坡头区",
"label": "坡头区"
},
{
"code": "440811",
"value": "麻章区",
"label": "麻章区"
},
{
"code": "440823",
"value": "遂溪县",
"label": "遂溪县"
},
{
"code": "440825",
"value": "徐闻县",
"label": "徐闻县"
},
{
"code": "440881",
"value": "廉江市",
"label": "廉江市"
},
{
"code": "440882",
"value": "雷州市",
"label": "雷州市"
},
{
"code": "440883",
"value": "吴川市",
"label": "吴川市"
}
]
},
{
"code": "440900",
"value": "茂名市",
"label": "茂名市",
"children": [
{
"code": "440902",
"value": "茂南区",
"label": "茂南区"
},
{
"code": "440904",
"value": "电白区",
"label": "电白区"
},
{
"code": "440981",
"value": "高州市",
"label": "高州市"
},
{
"code": "440982",
"value": "化州市",
"label": "化州市"
},
{
"code": "440983",
"value": "信宜市",
"label": "信宜市"
}
]
},
{
"code": "441200",
"value": "肇庆市",
"label": "肇庆市",
"children": [
{
"code": "441202",
"value": "端州区",
"label": "端州区"
},
{
"code": "441203",
"value": "鼎湖区",
"label": "鼎湖区"
},
{
"code": "441204",
"value": "高要区",
"label": "高要区"
},
{
"code": "441223",
"value": "广宁县",
"label": "广宁县"
},
{
"code": "441224",
"value": "怀集县",
"label": "怀集县"
},
{
"code": "441225",
"value": "封开县",
"label": "封开县"
},
{
"code": "441226",
"value": "德庆县",
"label": "德庆县"
},
{
"code": "441284",
"value": "四会市",
"label": "四会市"
}
]
},
{
"code": "441300",
"value": "惠州市",
"label": "惠州市",
"children": [
{
"code": "441302",
"value": "惠城区",
"label": "惠城区"
},
{
"code": "441303",
"value": "惠阳区",
"label": "惠阳区"
},
{
"code": "441322",
"value": "博罗县",
"label": "博罗县"
},
{
"code": "441323",
"value": "惠东县",
"label": "惠东县"
},
{
"code": "441324",
"value": "龙门县",
"label": "龙门县"
}
]
},
{
"code": "441400",
"value": "梅州市",
"label": "梅州市",
"children": [
{
"code": "441402",
"value": "梅江区",
"label": "梅江区"
},
{
"code": "441403",
"value": "梅县区",
"label": "梅县区"
},
{
"code": "441422",
"value": "大埔县",
"label": "大埔县"
},
{
"code": "441423",
"value": "丰顺县",
"label": "丰顺县"
},
{
"code": "441424",
"value": "五华县",
"label": "五华县"
},
{
"code": "441426",
"value": "平远县",
"label": "平远县"
},
{
"code": "441427",
"value": "蕉岭县",
"label": "蕉岭县"
},
{
"code": "441481",
"value": "兴宁市",
"label": "兴宁市"
}
]
},
{
"code": "441500",
"value": "汕尾市",
"label": "汕尾市",
"children": [
{
"code": "441502",
"value": "城区",
"label": "城区"
},
{
"code": "441521",
"value": "海丰县",
"label": "海丰县"
},
{
"code": "441523",
"value": "陆河县",
"label": "陆河县"
},
{
"code": "441581",
"value": "陆丰市",
"label": "陆丰市"
}
]
},
{
"code": "441600",
"value": "河源市",
"label": "河源市",
"children": [
{
"code": "441602",
"value": "源城区",
"label": "源城区"
},
{
"code": "441621",
"value": "紫金县",
"label": "紫金县"
},
{
"code": "441622",
"value": "龙川县",
"label": "龙川县"
},
{
"code": "441623",
"value": "连平县",
"label": "连平县"
},
{
"code": "441624",
"value": "和平县",
"label": "和平县"
},
{
"code": "441625",
"value": "东源县",
"label": "东源县"
}
]
},
{
"code": "441700",
"value": "阳江市",
"label": "阳江市",
"children": [
{
"code": "441702",
"value": "江城区",
"label": "江城区"
},
{
"code": "441704",
"value": "阳东区",
"label": "阳东区"
},
{
"code": "441721",
"value": "阳西县",
"label": "阳西县"
},
{
"code": "441781",
"value": "阳春市",
"label": "阳春市"
}
]
},
{
"code": "441800",
"value": "清远市",
"label": "清远市",
"children": [
{
"code": "441802",
"value": "清城区",
"label": "清城区"
},
{
"code": "441803",
"value": "清新区",
"label": "清新区"
},
{
"code": "441821",
"value": "佛冈县",
"label": "佛冈县"
},
{
"code": "441823",
"value": "阳山县",
"label": "阳山县"
},
{
"code": "441825",
"value": "连山壮族瑶族自治县",
"label": "连山壮族瑶族自治县"
},
{
"code": "441826",
"value": "连南瑶族自治县",
"label": "连南瑶族自治县"
},
{
"code": "441881",
"value": "英德市",
"label": "英德市"
},
{
"code": "441882",
"value": "连州市",
"label": "连州市"
}
]
},
{
"code": "441900",
"value": "东莞市",
"label": "东莞市",
"children": []
},
{
"code": "442000",
"value": "中山市",
"label": "中山市",
"children": []
},
{
"code": "445100",
"value": "潮州市",
"label": "潮州市",
"children": [
{
"code": "445102",
"value": "湘桥区",
"label": "湘桥区"
},
{
"code": "445103",
"value": "潮安区",
"label": "潮安区"
},
{
"code": "445122",
"value": "饶平县",
"label": "饶平县"
}
]
},
{
"code": "445200",
"value": "揭阳市",
"label": "揭阳市",
"children": [
{
"code": "445202",
"value": "榕城区",
"label": "榕城区"
},
{
"code": "445203",
"value": "揭东区",
"label": "揭东区"
},
{
"code": "445222",
"value": "揭西县",
"label": "揭西县"
},
{
"code": "445224",
"value": "惠来县",
"label": "惠来县"
},
{
"code": "445281",
"value": "普宁市",
"label": "普宁市"
}
]
},
{
"code": "445300",
"value": "云浮市",
"label": "云浮市",
"children": [
{
"code": "445302",
"value": "云城区",
"label": "云城区"
},
{
"code": "445303",
"value": "云安区",
"label": "云安区"
},
{
"code": "445321",
"value": "新兴县",
"label": "新兴县"
},
{
"code": "445322",
"value": "郁南县",
"label": "郁南县"
},
{
"code": "445381",
"value": "罗定市",
"label": "罗定市"
}
]
}
]
},
{
"code": "450000",
"value": "广西壮族自治区",
"label": "广西壮族自治区",
"children": [
{
"code": "450100",
"value": "南宁市",
"label": "南宁市",
"children": [
{
"code": "450102",
"value": "兴宁区",
"label": "兴宁区"
},
{
"code": "450103",
"value": "青秀区",
"label": "青秀区"
},
{
"code": "450105",
"value": "江南区",
"label": "江南区"
},
{
"code": "450107",
"value": "西乡塘区",
"label": "西乡塘区"
},
{
"code": "450108",
"value": "良庆区",
"label": "良庆区"
},
{
"code": "450109",
"value": "邕宁区",
"label": "邕宁区"
},
{
"code": "450110",
"value": "武鸣区",
"label": "武鸣区"
},
{
"code": "450123",
"value": "隆安县",
"label": "隆安县"
},
{
"code": "450124",
"value": "马山县",
"label": "马山县"
},
{
"code": "450125",
"value": "上林县",
"label": "上林县"
},
{
"code": "450126",
"value": "宾阳县",
"label": "宾阳县"
},
{
"code": "450127",
"value": "横县",
"label": "横县"
}
]
},
{
"code": "450200",
"value": "柳州市",
"label": "柳州市",
"children": [
{
"code": "450202",
"value": "城中区",
"label": "城中区"
},
{
"code": "450203",
"value": "鱼峰区",
"label": "鱼峰区"
},
{
"code": "450204",
"value": "柳南区",
"label": "柳南区"
},
{
"code": "450205",
"value": "柳北区",
"label": "柳北区"
},
{
"code": "450206",
"value": "柳江区",
"label": "柳江区"
},
{
"code": "450222",
"value": "柳城县",
"label": "柳城县"
},
{
"code": "450223",
"value": "鹿寨县",
"label": "鹿寨县"
},
{
"code": "450224",
"value": "融安县",
"label": "融安县"
},
{
"code": "450225",
"value": "融水苗族自治县",
"label": "融水苗族自治县"
},
{
"code": "450226",
"value": "三江侗族自治县",
"label": "三江侗族自治县"
}
]
},
{
"code": "450300",
"value": "桂林市",
"label": "桂林市",
"children": [
{
"code": "450302",
"value": "秀峰区",
"label": "秀峰区"
},
{
"code": "450303",
"value": "叠彩区",
"label": "叠彩区"
},
{
"code": "450304",
"value": "象山区",
"label": "象山区"
},
{
"code": "450305",
"value": "七星区",
"label": "七星区"
},
{
"code": "450311",
"value": "雁山区",
"label": "雁山区"
},
{
"code": "450312",
"value": "临桂区",
"label": "临桂区"
},
{
"code": "450321",
"value": "阳朔县",
"label": "阳朔县"
},
{
"code": "450323",
"value": "灵川县",
"label": "灵川县"
},
{
"code": "450324",
"value": "全州县",
"label": "全州县"
},
{
"code": "450325",
"value": "兴安县",
"label": "兴安县"
},
{
"code": "450326",
"value": "永福县",
"label": "永福县"
},
{
"code": "450327",
"value": "灌阳县",
"label": "灌阳县"
},
{
"code": "450328",
"value": "龙胜各族自治县",
"label": "龙胜各族自治县"
},
{
"code": "450329",
"value": "资源县",
"label": "资源县"
},
{
"code": "450330",
"value": "平乐县",
"label": "平乐县"
},
{
"code": "450381",
"value": "荔浦市",
"label": "荔浦市"
},
{
"code": "450332",
"value": "恭城瑶族自治县",
"label": "恭城瑶族自治县"
}
]
},
{
"code": "450400",
"value": "梧州市",
"label": "梧州市",
"children": [
{
"code": "450403",
"value": "万秀区",
"label": "万秀区"
},
{
"code": "450405",
"value": "长洲区",
"label": "长洲区"
},
{
"code": "450406",
"value": "龙圩区",
"label": "龙圩区"
},
{
"code": "450421",
"value": "苍梧县",
"label": "苍梧县"
},
{
"code": "450422",
"value": "藤县",
"label": "藤县"
},
{
"code": "450423",
"value": "蒙山县",
"label": "蒙山县"
},
{
"code": "450481",
"value": "岑溪市",
"label": "岑溪市"
}
]
},
{
"code": "450500",
"value": "北海市",
"label": "北海市",
"children": [
{
"code": "450502",
"value": "海城区",
"label": "海城区"
},
{
"code": "450503",
"value": "银海区",
"label": "银海区"
},
{
"code": "450512",
"value": "铁山港区",
"label": "铁山港区"
},
{
"code": "450521",
"value": "合浦县",
"label": "合浦县"
}
]
},
{
"code": "450600",
"value": "防城港市",
"label": "防城港市",
"children": [
{
"code": "450602",
"value": "港口区",
"label": "港口区"
},
{
"code": "450603",
"value": "防城区",
"label": "防城区"
},
{
"code": "450621",
"value": "上思县",
"label": "上思县"
},
{
"code": "450681",
"value": "东兴市",
"label": "东兴市"
}
]
},
{
"code": "450700",
"value": "钦州市",
"label": "钦州市",
"children": [
{
"code": "450702",
"value": "钦南区",
"label": "钦南区"
},
{
"code": "450703",
"value": "钦北区",
"label": "钦北区"
},
{
"code": "450721",
"value": "灵山县",
"label": "灵山县"
},
{
"code": "450722",
"value": "浦北县",
"label": "浦北县"
}
]
},
{
"code": "450800",
"value": "贵港市",
"label": "贵港市",
"children": [
{
"code": "450802",
"value": "港北区",
"label": "港北区"
},
{
"code": "450803",
"value": "港南区",
"label": "港南区"
},
{
"code": "450804",
"value": "覃塘区",
"label": "覃塘区"
},
{
"code": "450821",
"value": "平南县",
"label": "平南县"
},
{
"code": "450881",
"value": "桂平市",
"label": "桂平市"
}
]
},
{
"code": "450900",
"value": "玉林市",
"label": "玉林市",
"children": [
{
"code": "450902",
"value": "玉州区",
"label": "玉州区"
},
{
"code": "450903",
"value": "福绵区",
"label": "福绵区"
},
{
"code": "450921",
"value": "容县",
"label": "容县"
},
{
"code": "450922",
"value": "陆川县",
"label": "陆川县"
},
{
"code": "450923",
"value": "博白县",
"label": "博白县"
},
{
"code": "450924",
"value": "兴业县",
"label": "兴业县"
},
{
"code": "450981",
"value": "北流市",
"label": "北流市"
}
]
},
{
"code": "451000",
"value": "百色市",
"label": "百色市",
"children": [
{
"code": "451002",
"value": "右江区",
"label": "右江区"
},
{
"code": "451003",
"value": "田阳区",
"label": "田阳区"
},
{
"code": "451022",
"value": "田东县",
"label": "田东县"
},
{
"code": "451024",
"value": "德保县",
"label": "德保县"
},
{
"code": "451026",
"value": "那坡县",
"label": "那坡县"
},
{
"code": "451027",
"value": "凌云县",
"label": "凌云县"
},
{
"code": "451028",
"value": "乐业县",
"label": "乐业县"
},
{
"code": "451029",
"value": "田林县",
"label": "田林县"
},
{
"code": "451030",
"value": "西林县",
"label": "西林县"
},
{
"code": "451031",
"value": "隆林各族自治县",
"label": "隆林各族自治县"
},
{
"code": "451081",
"value": "靖西市",
"label": "靖西市"
},
{
"code": "451082",
"value": "平果市",
"label": "平果市"
}
]
},
{
"code": "451100",
"value": "贺州市",
"label": "贺州市",
"children": [
{
"code": "451102",
"value": "八步区",
"label": "八步区"
},
{
"code": "451103",
"value": "平桂区",
"label": "平桂区"
},
{
"code": "451121",
"value": "昭平县",
"label": "昭平县"
},
{
"code": "451122",
"value": "钟山县",
"label": "钟山县"
},
{
"code": "451123",
"value": "富川瑶族自治县",
"label": "富川瑶族自治县"
}
]
},
{
"code": "451200",
"value": "河池市",
"label": "河池市",
"children": [
{
"code": "451202",
"value": "金城江区",
"label": "金城江区"
},
{
"code": "451203",
"value": "宜州区",
"label": "宜州区"
},
{
"code": "451221",
"value": "南丹县",
"label": "南丹县"
},
{
"code": "451222",
"value": "天峨县",
"label": "天峨县"
},
{
"code": "451223",
"value": "凤山县",
"label": "凤山县"
},
{
"code": "451224",
"value": "东兰县",
"label": "东兰县"
},
{
"code": "451225",
"value": "罗城仫佬族自治县",
"label": "罗城仫佬族自治县"
},
{
"code": "451226",
"value": "环江毛南族自治县",
"label": "环江毛南族自治县"
},
{
"code": "451227",
"value": "巴马瑶族自治县",
"label": "巴马瑶族自治县"
},
{
"code": "451228",
"value": "都安瑶族自治县",
"label": "都安瑶族自治县"
},
{
"code": "451229",
"value": "大化瑶族自治县",
"label": "大化瑶族自治县"
}
]
},
{
"code": "451300",
"value": "来宾市",
"label": "来宾市",
"children": [
{
"code": "451302",
"value": "兴宾区",
"label": "兴宾区"
},
{
"code": "451321",
"value": "忻城县",
"label": "忻城县"
},
{
"code": "451322",
"value": "象州县",
"label": "象州县"
},
{
"code": "451323",
"value": "武宣县",
"label": "武宣县"
},
{
"code": "451324",
"value": "金秀瑶族自治县",
"label": "金秀瑶族自治县"
},
{
"code": "451381",
"value": "合山市",
"label": "合山市"
}
]
},
{
"code": "451400",
"value": "崇左市",
"label": "崇左市",
"children": [
{
"code": "451402",
"value": "江州区",
"label": "江州区"
},
{
"code": "451421",
"value": "扶绥县",
"label": "扶绥县"
},
{
"code": "451422",
"value": "宁明县",
"label": "宁明县"
},
{
"code": "451423",
"value": "龙州县",
"label": "龙州县"
},
{
"code": "451424",
"value": "大新县",
"label": "大新县"
},
{
"code": "451425",
"value": "天等县",
"label": "天等县"
},
{
"code": "451481",
"value": "凭祥市",
"label": "凭祥市"
}
]
}
]
},
{
"code": "460000",
"value": "海南省",
"label": "海南省",
"children": [
{
"code": "460100",
"value": "海口市",
"label": "海口市",
"children": [
{
"code": "460105",
"value": "秀英区",
"label": "秀英区"
},
{
"code": "460106",
"value": "龙华区",
"label": "龙华区"
},
{
"code": "460107",
"value": "琼山区",
"label": "琼山区"
},
{
"code": "460108",
"value": "美兰区",
"label": "美兰区"
}
]
},
{
"code": "460200",
"value": "三亚市",
"label": "三亚市",
"children": [
{
"code": "460202",
"value": "海棠区",
"label": "海棠区"
},
{
"code": "460203",
"value": "吉阳区",
"label": "吉阳区"
},
{
"code": "460204",
"value": "天涯区",
"label": "天涯区"
},
{
"code": "460205",
"value": "崖州区",
"label": "崖州区"
}
]
},
{
"code": "460300",
"value": "三沙市",
"label": "三沙市",
"children": []
},
{
"code": "460400",
"value": "儋州市",
"label": "儋州市",
"children": []
}
]
},
{
"code": "500000",
"value": "重庆市",
"label": "重庆市",
"children": [
{
"code": "500101",
"value": "万州区",
"label": "万州区"
},
{
"code": "500102",
"value": "涪陵区",
"label": "涪陵区"
},
{
"code": "500103",
"value": "渝中区",
"label": "渝中区"
},
{
"code": "500104",
"value": "大渡口区",
"label": "大渡口区"
},
{
"code": "500105",
"value": "江北区",
"label": "江北区"
},
{
"code": "500106",
"value": "沙坪坝区",
"label": "沙坪坝区"
},
{
"code": "500107",
"value": "九龙坡区",
"label": "九龙坡区"
},
{
"code": "500108",
"value": "南岸区",
"label": "南岸区"
},
{
"code": "500109",
"value": "北碚区",
"label": "北碚区"
},
{
"code": "500110",
"value": "綦江区",
"label": "綦江区"
},
{
"code": "500111",
"value": "大足区",
"label": "大足区"
},
{
"code": "500112",
"value": "渝北区",
"label": "渝北区"
},
{
"code": "500113",
"value": "巴南区",
"label": "巴南区"
},
{
"code": "500114",
"value": "黔江区",
"label": "黔江区"
},
{
"code": "500115",
"value": "长寿区",
"label": "长寿区"
},
{
"code": "500116",
"value": "江津区",
"label": "江津区"
},
{
"code": "500117",
"value": "合川区",
"label": "合川区"
},
{
"code": "500118",
"value": "永川区",
"label": "永川区"
},
{
"code": "500119",
"value": "南川区",
"label": "南川区"
},
{
"code": "500120",
"value": "璧山区",
"label": "璧山区"
},
{
"code": "500151",
"value": "铜梁区",
"label": "铜梁区"
},
{
"code": "500152",
"value": "潼南区",
"label": "潼南区"
},
{
"code": "500153",
"value": "荣昌区",
"label": "荣昌区"
},
{
"code": "500154",
"value": "开州区",
"label": "开州区"
},
{
"code": "500155",
"value": "梁平区",
"label": "梁平区"
},
{
"code": "500156",
"value": "武隆区",
"label": "武隆区"
},
{
"code": "500229",
"value": "城口县",
"label": "城口县"
},
{
"code": "500230",
"value": "丰都县",
"label": "丰都县"
},
{
"code": "500231",
"value": "垫江县",
"label": "垫江县"
},
{
"code": "500233",
"value": "忠县",
"label": "忠县"
},
{
"code": "500235",
"value": "云阳县",
"label": "云阳县"
},
{
"code": "500236",
"value": "奉节县",
"label": "奉节县"
},
{
"code": "500237",
"value": "巫山县",
"label": "巫山县"
},
{
"code": "500238",
"value": "巫溪县",
"label": "巫溪县"
},
{
"code": "500240",
"value": "石柱土家族自治县",
"label": "石柱土家族自治县"
},
{
"code": "500241",
"value": "秀山土家族苗族自治县",
"label": "秀山土家族苗族自治县"
},
{
"code": "500242",
"value": "酉阳土家族苗族自治县",
"label": "酉阳土家族苗族自治县"
},
{
"code": "500243",
"value": "彭水苗族土家族自治县",
"label": "彭水苗族土家族自治县"
}
]
},
{
"code": "510000",
"value": "四川省",
"label": "四川省",
"children": [
{
"code": "510100",
"value": "成都市",
"label": "成都市",
"children": [
{
"code": "510104",
"value": "锦江区",
"label": "锦江区"
},
{
"code": "510105",
"value": "青羊区",
"label": "青羊区"
},
{
"code": "510106",
"value": "金牛区",
"label": "金牛区"
},
{
"code": "510107",
"value": "武侯区",
"label": "武侯区"
},
{
"code": "510108",
"value": "成华区",
"label": "成华区"
},
{
"code": "510112",
"value": "龙泉驿区",
"label": "龙泉驿区"
},
{
"code": "510113",
"value": "青白江区",
"label": "青白江区"
},
{
"code": "510114",
"value": "新都区",
"label": "新都区"
},
{
"code": "510115",
"value": "温江区",
"label": "温江区"
},
{
"code": "510116",
"value": "双流区",
"label": "双流区"
},
{
"code": "510117",
"value": "郫都区",
"label": "郫都区"
},
{
"code": "510118",
"value": "新津区",
"label": "新津区"
},
{
"code": "510121",
"value": "金堂县",
"label": "金堂县"
},
{
"code": "510129",
"value": "大邑县",
"label": "大邑县"
},
{
"code": "510131",
"value": "蒲江县",
"label": "蒲江县"
},
{
"code": "510181",
"value": "都江堰市",
"label": "都江堰市"
},
{
"code": "510182",
"value": "彭州市",
"label": "彭州市"
},
{
"code": "510183",
"value": "邛崃市",
"label": "邛崃市"
},
{
"code": "510184",
"value": "崇州市",
"label": "崇州市"
},
{
"code": "510185",
"value": "简阳市",
"label": "简阳市"
}
]
},
{
"code": "510300",
"value": "自贡市",
"label": "自贡市",
"children": [
{
"code": "510302",
"value": "自流井区",
"label": "自流井区"
},
{
"code": "510303",
"value": "贡井区",
"label": "贡井区"
},
{
"code": "510304",
"value": "大安区",
"label": "大安区"
},
{
"code": "510311",
"value": "沿滩区",
"label": "沿滩区"
},
{
"code": "510321",
"value": "荣县",
"label": "荣县"
},
{
"code": "510322",
"value": "富顺县",
"label": "富顺县"
}
]
},
{
"code": "510400",
"value": "攀枝花市",
"label": "攀枝花市",
"children": [
{
"code": "510402",
"value": "东区",
"label": "东区"
},
{
"code": "510403",
"value": "西区",
"label": "西区"
},
{
"code": "510411",
"value": "仁和区",
"label": "仁和区"
},
{
"code": "510421",
"value": "米易县",
"label": "米易县"
},
{
"code": "510422",
"value": "盐边县",
"label": "盐边县"
}
]
},
{
"code": "510500",
"value": "泸州市",
"label": "泸州市",
"children": [
{
"code": "510502",
"value": "江阳区",
"label": "江阳区"
},
{
"code": "510503",
"value": "纳溪区",
"label": "纳溪区"
},
{
"code": "510504",
"value": "龙马潭区",
"label": "龙马潭区"
},
{
"code": "510521",
"value": "泸县",
"label": "泸县"
},
{
"code": "510522",
"value": "合江县",
"label": "合江县"
},
{
"code": "510524",
"value": "叙永县",
"label": "叙永县"
},
{
"code": "510525",
"value": "古蔺县",
"label": "古蔺县"
}
]
},
{
"code": "510600",
"value": "德阳市",
"label": "德阳市",
"children": [
{
"code": "510603",
"value": "旌阳区",
"label": "旌阳区"
},
{
"code": "510604",
"value": "罗江区",
"label": "罗江区"
},
{
"code": "510623",
"value": "中江县",
"label": "中江县"
},
{
"code": "510681",
"value": "广汉市",
"label": "广汉市"
},
{
"code": "510682",
"value": "什邡市",
"label": "什邡市"
},
{
"code": "510683",
"value": "绵竹市",
"label": "绵竹市"
}
]
},
{
"code": "510700",
"value": "绵阳市",
"label": "绵阳市",
"children": [
{
"code": "510703",
"value": "涪城区",
"label": "涪城区"
},
{
"code": "510704",
"value": "游仙区",
"label": "游仙区"
},
{
"code": "510705",
"value": "安州区",
"label": "安州区"
},
{
"code": "510722",
"value": "三台县",
"label": "三台县"
},
{
"code": "510723",
"value": "盐亭县",
"label": "盐亭县"
},
{
"code": "510725",
"value": "梓潼县",
"label": "梓潼县"
},
{
"code": "510726",
"value": "北川羌族自治县",
"label": "北川羌族自治县"
},
{
"code": "510727",
"value": "平武县",
"label": "平武县"
},
{
"code": "510781",
"value": "江油市",
"label": "江油市"
}
]
},
{
"code": "510800",
"value": "广元市",
"label": "广元市",
"children": [
{
"code": "510802",
"value": "利州区",
"label": "利州区"
},
{
"code": "510811",
"value": "昭化区",
"label": "昭化区"
},
{
"code": "510812",
"value": "朝天区",
"label": "朝天区"
},
{
"code": "510821",
"value": "旺苍县",
"label": "旺苍县"
},
{
"code": "510822",
"value": "青川县",
"label": "青川县"
},
{
"code": "510823",
"value": "剑阁县",
"label": "剑阁县"
},
{
"code": "510824",
"value": "苍溪县",
"label": "苍溪县"
}
]
},
{
"code": "510900",
"value": "遂宁市",
"label": "遂宁市",
"children": [
{
"code": "510903",
"value": "船山区",
"label": "船山区"
},
{
"code": "510904",
"value": "安居区",
"label": "安居区"
},
{
"code": "510921",
"value": "蓬溪县",
"label": "蓬溪县"
},
{
"code": "510923",
"value": "大英县",
"label": "大英县"
},
{
"code": "510981",
"value": "射洪市",
"label": "射洪市"
}
]
},
{
"code": "511000",
"value": "内江市",
"label": "内江市",
"children": [
{
"code": "511002",
"value": "市中区",
"label": "市中区"
},
{
"code": "511011",
"value": "东兴区",
"label": "东兴区"
},
{
"code": "511024",
"value": "威远县",
"label": "威远县"
},
{
"code": "511025",
"value": "资中县",
"label": "资中县"
},
{
"code": "511083",
"value": "隆昌市",
"label": "隆昌市"
}
]
},
{
"code": "511100",
"value": "乐山市",
"label": "乐山市",
"children": [
{
"code": "511102",
"value": "市中区",
"label": "市中区"
},
{
"code": "511111",
"value": "沙湾区",
"label": "沙湾区"
},
{
"code": "511112",
"value": "五通桥区",
"label": "五通桥区"
},
{
"code": "511113",
"value": "金口河区",
"label": "金口河区"
},
{
"code": "511123",
"value": "犍为县",
"label": "犍为县"
},
{
"code": "511124",
"value": "井研县",
"label": "井研县"
},
{
"code": "511126",
"value": "夹江县",
"label": "夹江县"
},
{
"code": "511129",
"value": "沐川县",
"label": "沐川县"
},
{
"code": "511132",
"value": "峨边彝族自治县",
"label": "峨边彝族自治县"
},
{
"code": "511133",
"value": "马边彝族自治县",
"label": "马边彝族自治县"
},
{
"code": "511181",
"value": "峨眉山市",
"label": "峨眉山市"
}
]
},
{
"code": "511300",
"value": "南充市",
"label": "南充市",
"children": [
{
"code": "511302",
"value": "顺庆区",
"label": "顺庆区"
},
{
"code": "511303",
"value": "高坪区",
"label": "高坪区"
},
{
"code": "511304",
"value": "嘉陵区",
"label": "嘉陵区"
},
{
"code": "511321",
"value": "南部县",
"label": "南部县"
},
{
"code": "511322",
"value": "营山县",
"label": "营山县"
},
{
"code": "511323",
"value": "蓬安县",
"label": "蓬安县"
},
{
"code": "511324",
"value": "仪陇县",
"label": "仪陇县"
},
{
"code": "511325",
"value": "西充县",
"label": "西充县"
},
{
"code": "511381",
"value": "阆中市",
"label": "阆中市"
}
]
},
{
"code": "511400",
"value": "眉山市",
"label": "眉山市",
"children": [
{
"code": "511402",
"value": "东坡区",
"label": "东坡区"
},
{
"code": "511403",
"value": "彭山区",
"label": "彭山区"
},
{
"code": "511421",
"value": "仁寿县",
"label": "仁寿县"
},
{
"code": "511423",
"value": "洪雅县",
"label": "洪雅县"
},
{
"code": "511424",
"value": "丹棱县",
"label": "丹棱县"
},
{
"code": "511425",
"value": "青神县",
"label": "青神县"
}
]
},
{
"code": "511500",
"value": "宜宾市",
"label": "宜宾市",
"children": [
{
"code": "511502",
"value": "翠屏区",
"label": "翠屏区"
},
{
"code": "511503",
"value": "南溪区",
"label": "南溪区"
},
{
"code": "511504",
"value": "叙州区",
"label": "叙州区"
},
{
"code": "511523",
"value": "江安县",
"label": "江安县"
},
{
"code": "511524",
"value": "长宁县",
"label": "长宁县"
},
{
"code": "511525",
"value": "高县",
"label": "高县"
},
{
"code": "511526",
"value": "珙县",
"label": "珙县"
},
{
"code": "511527",
"value": "筠连县",
"label": "筠连县"
},
{
"code": "511528",
"value": "兴文县",
"label": "兴文县"
},
{
"code": "511529",
"value": "屏山县",
"label": "屏山县"
}
]
},
{
"code": "511600",
"value": "广安市",
"label": "广安市",
"children": [
{
"code": "511602",
"value": "广安区",
"label": "广安区"
},
{
"code": "511603",
"value": "前锋区",
"label": "前锋区"
},
{
"code": "511621",
"value": "岳池县",
"label": "岳池县"
},
{
"code": "511622",
"value": "武胜县",
"label": "武胜县"
},
{
"code": "511623",
"value": "邻水县",
"label": "邻水县"
},
{
"code": "511681",
"value": "华蓥市",
"label": "华蓥市"
}
]
},
{
"code": "511700",
"value": "达州市",
"label": "达州市",
"children": [
{
"code": "511702",
"value": "通川区",
"label": "通川区"
},
{
"code": "511703",
"value": "达川区",
"label": "达川区"
},
{
"code": "511722",
"value": "宣汉县",
"label": "宣汉县"
},
{
"code": "511723",
"value": "开江县",
"label": "开江县"
},
{
"code": "511724",
"value": "大竹县",
"label": "大竹县"
},
{
"code": "511725",
"value": "渠县",
"label": "渠县"
},
{
"code": "511781",
"value": "万源市",
"label": "万源市"
}
]
},
{
"code": "511800",
"value": "雅安市",
"label": "雅安市",
"children": [
{
"code": "511802",
"value": "雨城区",
"label": "雨城区"
},
{
"code": "511803",
"value": "名山区",
"label": "名山区"
},
{
"code": "511822",
"value": "荥经县",
"label": "荥经县"
},
{
"code": "511823",
"value": "汉源县",
"label": "汉源县"
},
{
"code": "511824",
"value": "石棉县",
"label": "石棉县"
},
{
"code": "511825",
"value": "天全县",
"label": "天全县"
},
{
"code": "511826",
"value": "芦山县",
"label": "芦山县"
},
{
"code": "511827",
"value": "宝兴县",
"label": "宝兴县"
}
]
},
{
"code": "511900",
"value": "巴中市",
"label": "巴中市",
"children": [
{
"code": "511902",
"value": "巴州区",
"label": "巴州区"
},
{
"code": "511903",
"value": "恩阳区",
"label": "恩阳区"
},
{
"code": "511921",
"value": "通江县",
"label": "通江县"
},
{
"code": "511922",
"value": "南江县",
"label": "南江县"
},
{
"code": "511923",
"value": "平昌县",
"label": "平昌县"
}
]
},
{
"code": "512000",
"value": "资阳市",
"label": "资阳市",
"children": [
{
"code": "512002",
"value": "雁江区",
"label": "雁江区"
},
{
"code": "512021",
"value": "安岳县",
"label": "安岳县"
},
{
"code": "512022",
"value": "乐至县",
"label": "乐至县"
}
]
},
{
"code": "513200",
"value": "阿坝藏族羌族自治州",
"label": "阿坝藏族羌族自治州",
"children": [
{
"code": "513201",
"value": "马尔康市",
"label": "马尔康市"
},
{
"code": "513221",
"value": "汶川县",
"label": "汶川县"
},
{
"code": "513222",
"value": "理县",
"label": "理县"
},
{
"code": "513223",
"value": "茂县",
"label": "茂县"
},
{
"code": "513224",
"value": "松潘县",
"label": "松潘县"
},
{
"code": "513225",
"value": "九寨沟县",
"label": "九寨沟县"
},
{
"code": "513226",
"value": "金川县",
"label": "金川县"
},
{
"code": "513227",
"value": "小金县",
"label": "小金县"
},
{
"code": "513228",
"value": "黑水县",
"label": "黑水县"
},
{
"code": "513230",
"value": "壤塘县",
"label": "壤塘县"
},
{
"code": "513231",
"value": "阿坝县",
"label": "阿坝县"
},
{
"code": "513232",
"value": "若尔盖县",
"label": "若尔盖县"
},
{
"code": "513233",
"value": "红原县",
"label": "红原县"
}
]
},
{
"code": "513300",
"value": "甘孜藏族自治州",
"label": "甘孜藏族自治州",
"children": [
{
"code": "513301",
"value": "康定市",
"label": "康定市"
},
{
"code": "513322",
"value": "泸定县",
"label": "泸定县"
},
{
"code": "513323",
"value": "丹巴县",
"label": "丹巴县"
},
{
"code": "513324",
"value": "九龙县",
"label": "九龙县"
},
{
"code": "513325",
"value": "雅江县",
"label": "雅江县"
},
{
"code": "513326",
"value": "道孚县",
"label": "道孚县"
},
{
"code": "513327",
"value": "炉霍县",
"label": "炉霍县"
},
{
"code": "513328",
"value": "甘孜县",
"label": "甘孜县"
},
{
"code": "513329",
"value": "新龙县",
"label": "新龙县"
},
{
"code": "513330",
"value": "德格县",
"label": "德格县"
},
{
"code": "513331",
"value": "白玉县",
"label": "白玉县"
},
{
"code": "513332",
"value": "石渠县",
"label": "石渠县"
},
{
"code": "513333",
"value": "色达县",
"label": "色达县"
},
{
"code": "513334",
"value": "理塘县",
"label": "理塘县"
},
{
"code": "513335",
"value": "巴塘县",
"label": "巴塘县"
},
{
"code": "513336",
"value": "乡城县",
"label": "乡城县"
},
{
"code": "513337",
"value": "稻城县",
"label": "稻城县"
},
{
"code": "513338",
"value": "得荣县",
"label": "得荣县"
}
]
},
{
"code": "513400",
"value": "凉山彝族自治州",
"label": "凉山彝族自治州",
"children": [
{
"code": "513401",
"value": "西昌市",
"label": "西昌市"
},
{
"code": "513422",
"value": "木里藏族自治县",
"label": "木里藏族自治县"
},
{
"code": "513423",
"value": "盐源县",
"label": "盐源县"
},
{
"code": "513424",
"value": "德昌县",
"label": "德昌县"
},
{
"code": "513425",
"value": "会理县",
"label": "会理县"
},
{
"code": "513426",
"value": "会东县",
"label": "会东县"
},
{
"code": "513427",
"value": "宁南县",
"label": "宁南县"
},
{
"code": "513428",
"value": "普格县",
"label": "普格县"
},
{
"code": "513429",
"value": "布拖县",
"label": "布拖县"
},
{
"code": "513430",
"value": "金阳县",
"label": "金阳县"
},
{
"code": "513431",
"value": "昭觉县",
"label": "昭觉县"
},
{
"code": "513432",
"value": "喜德县",
"label": "喜德县"
},
{
"code": "513433",
"value": "冕宁县",
"label": "冕宁县"
},
{
"code": "513434",
"value": "越西县",
"label": "越西县"
},
{
"code": "513435",
"value": "甘洛县",
"label": "甘洛县"
},
{
"code": "513436",
"value": "美姑县",
"label": "美姑县"
},
{
"code": "513437",
"value": "雷波县",
"label": "雷波县"
}
]
}
]
},
{
"code": "520000",
"value": "贵州省",
"label": "贵州省",
"children": [
{
"code": "520100",
"value": "贵阳市",
"label": "贵阳市",
"children": [
{
"code": "520102",
"value": "南明区",
"label": "南明区"
},
{
"code": "520103",
"value": "云岩区",
"label": "云岩区"
},
{
"code": "520111",
"value": "花溪区",
"label": "花溪区"
},
{
"code": "520112",
"value": "乌当区",
"label": "乌当区"
},
{
"code": "520113",
"value": "白云区",
"label": "白云区"
},
{
"code": "520115",
"value": "观山湖区",
"label": "观山湖区"
},
{
"code": "520121",
"value": "开阳县",
"label": "开阳县"
},
{
"code": "520122",
"value": "息烽县",
"label": "息烽县"
},
{
"code": "520123",
"value": "修文县",
"label": "修文县"
},
{
"code": "520181",
"value": "清镇市",
"label": "清镇市"
}
]
},
{
"code": "520200",
"value": "六盘水市",
"label": "六盘水市",
"children": [
{
"code": "520201",
"value": "钟山区",
"label": "钟山区"
},
{
"code": "520203",
"value": "六枝特区",
"label": "六枝特区"
},
{
"code": "520221",
"value": "水城县",
"label": "水城县"
},
{
"code": "520281",
"value": "盘州市",
"label": "盘州市"
}
]
},
{
"code": "520300",
"value": "遵义市",
"label": "遵义市",
"children": [
{
"code": "520302",
"value": "红花岗区",
"label": "红花岗区"
},
{
"code": "520303",
"value": "汇川区",
"label": "汇川区"
},
{
"code": "520304",
"value": "播州区",
"label": "播州区"
},
{
"code": "520322",
"value": "桐梓县",
"label": "桐梓县"
},
{
"code": "520323",
"value": "绥阳县",
"label": "绥阳县"
},
{
"code": "520324",
"value": "正安县",
"label": "正安县"
},
{
"code": "520325",
"value": "道真仡佬族苗族自治县",
"label": "道真仡佬族苗族自治县"
},
{
"code": "520326",
"value": "务川仡佬族苗族自治县",
"label": "务川仡佬族苗族自治县"
},
{
"code": "520327",
"value": "凤冈县",
"label": "凤冈县"
},
{
"code": "520328",
"value": "湄潭县",
"label": "湄潭县"
},
{
"code": "520329",
"value": "余庆县",
"label": "余庆县"
},
{
"code": "520330",
"value": "习水县",
"label": "习水县"
},
{
"code": "520381",
"value": "赤水市",
"label": "赤水市"
},
{
"code": "520382",
"value": "仁怀市",
"label": "仁怀市"
}
]
},
{
"code": "520400",
"value": "安顺市",
"label": "安顺市",
"children": [
{
"code": "520402",
"value": "西秀区",
"label": "西秀区"
},
{
"code": "520403",
"value": "平坝区",
"label": "平坝区"
},
{
"code": "520422",
"value": "普定县",
"label": "普定县"
},
{
"code": "520423",
"value": "镇宁布依族苗族自治县",
"label": "镇宁布依族苗族自治县"
},
{
"code": "520424",
"value": "关岭布依族苗族自治县",
"label": "关岭布依族苗族自治县"
},
{
"code": "520425",
"value": "紫云苗族布依族自治县",
"label": "紫云苗族布依族自治县"
}
]
},
{
"code": "520500",
"value": "毕节市",
"label": "毕节市",
"children": [
{
"code": "520502",
"value": "七星关区",
"label": "七星关区"
},
{
"code": "520521",
"value": "大方县",
"label": "大方县"
},
{
"code": "520522",
"value": "黔西县",
"label": "黔西县"
},
{
"code": "520523",
"value": "金沙县",
"label": "金沙县"
},
{
"code": "520524",
"value": "织金县",
"label": "织金县"
},
{
"code": "520525",
"value": "纳雍县",
"label": "纳雍县"
},
{
"code": "520526",
"value": "威宁彝族回族苗族自治县",
"label": "威宁彝族回族苗族自治县"
},
{
"code": "520527",
"value": "赫章县",
"label": "赫章县"
}
]
},
{
"code": "520600",
"value": "铜仁市",
"label": "铜仁市",
"children": [
{
"code": "520602",
"value": "碧江区",
"label": "碧江区"
},
{
"code": "520603",
"value": "万山区",
"label": "万山区"
},
{
"code": "520621",
"value": "江口县",
"label": "江口县"
},
{
"code": "520622",
"value": "玉屏侗族自治县",
"label": "玉屏侗族自治县"
},
{
"code": "520623",
"value": "石阡县",
"label": "石阡县"
},
{
"code": "520624",
"value": "思南县",
"label": "思南县"
},
{
"code": "520625",
"value": "印江土家族苗族自治县",
"label": "印江土家族苗族自治县"
},
{
"code": "520626",
"value": "德江县",
"label": "德江县"
},
{
"code": "520627",
"value": "沿河土家族自治县",
"label": "沿河土家族自治县"
},
{
"code": "520628",
"value": "松桃苗族自治县",
"label": "松桃苗族自治县"
}
]
},
{
"code": "522300",
"value": "黔西南布依族苗族自治州",
"label": "黔西南布依族苗族自治州",
"children": [
{
"code": "522301",
"value": "兴义市",
"label": "兴义市"
},
{
"code": "522302",
"value": "兴仁市",
"label": "兴仁市"
},
{
"code": "522323",
"value": "普安县",
"label": "普安县"
},
{
"code": "522324",
"value": "晴隆县",
"label": "晴隆县"
},
{
"code": "522325",
"value": "贞丰县",
"label": "贞丰县"
},
{
"code": "522326",
"value": "望谟县",
"label": "望谟县"
},
{
"code": "522327",
"value": "册亨县",
"label": "册亨县"
},
{
"code": "522328",
"value": "安龙县",
"label": "安龙县"
}
]
},
{
"code": "522600",
"value": "黔东南苗族侗族自治州",
"label": "黔东南苗族侗族自治州",
"children": [
{
"code": "522601",
"value": "凯里市",
"label": "凯里市"
},
{
"code": "522622",
"value": "黄平县",
"label": "黄平县"
},
{
"code": "522623",
"value": "施秉县",
"label": "施秉县"
},
{
"code": "522624",
"value": "三穗县",
"label": "三穗县"
},
{
"code": "522625",
"value": "镇远县",
"label": "镇远县"
},
{
"code": "522626",
"value": "岑巩县",
"label": "岑巩县"
},
{
"code": "522627",
"value": "天柱县",
"label": "天柱县"
},
{
"code": "522628",
"value": "锦屏县",
"label": "锦屏县"
},
{
"code": "522629",
"value": "剑河县",
"label": "剑河县"
},
{
"code": "522630",
"value": "台江县",
"label": "台江县"
},
{
"code": "522631",
"value": "黎平县",
"label": "黎平县"
},
{
"code": "522632",
"value": "榕江县",
"label": "榕江县"
},
{
"code": "522633",
"value": "从江县",
"label": "从江县"
},
{
"code": "522634",
"value": "雷山县",
"label": "雷山县"
},
{
"code": "522635",
"value": "麻江县",
"label": "麻江县"
},
{
"code": "522636",
"value": "丹寨县",
"label": "丹寨县"
}
]
},
{
"code": "522700",
"value": "黔南布依族苗族自治州",
"label": "黔南布依族苗族自治州",
"children": [
{
"code": "522701",
"value": "都匀市",
"label": "都匀市"
},
{
"code": "522702",
"value": "福泉市",
"label": "福泉市"
},
{
"code": "522722",
"value": "荔波县",
"label": "荔波县"
},
{
"code": "522723",
"value": "贵定县",
"label": "贵定县"
},
{
"code": "522725",
"value": "瓮安县",
"label": "瓮安县"
},
{
"code": "522726",
"value": "独山县",
"label": "独山县"
},
{
"code": "522727",
"value": "平塘县",
"label": "平塘县"
},
{
"code": "522728",
"value": "罗甸县",
"label": "罗甸县"
},
{
"code": "522729",
"value": "长顺县",
"label": "长顺县"
},
{
"code": "522730",
"value": "龙里县",
"label": "龙里县"
},
{
"code": "522731",
"value": "惠水县",
"label": "惠水县"
},
{
"code": "522732",
"value": "三都水族自治县",
"label": "三都水族自治县"
}
]
}
]
},
{
"code": "530000",
"value": "云南省",
"label": "云南省",
"children": [
{
"code": "530100",
"value": "昆明市",
"label": "昆明市",
"children": [
{
"code": "530102",
"value": "五华区",
"label": "五华区"
},
{
"code": "530103",
"value": "盘龙区",
"label": "盘龙区"
},
{
"code": "530111",
"value": "官渡区",
"label": "官渡区"
},
{
"code": "530112",
"value": "西山区",
"label": "西山区"
},
{
"code": "530113",
"value": "东川区",
"label": "东川区"
},
{
"code": "530114",
"value": "呈贡区",
"label": "呈贡区"
},
{
"code": "530115",
"value": "晋宁区",
"label": "晋宁区"
},
{
"code": "530124",
"value": "富民县",
"label": "富民县"
},
{
"code": "530125",
"value": "宜良县",
"label": "宜良县"
},
{
"code": "530126",
"value": "石林彝族自治县",
"label": "石林彝族自治县"
},
{
"code": "530127",
"value": "嵩明县",
"label": "嵩明县"
},
{
"code": "530128",
"value": "禄劝彝族苗族自治县",
"label": "禄劝彝族苗族自治县"
},
{
"code": "530129",
"value": "寻甸回族彝族自治县",
"label": "寻甸回族彝族自治县"
},
{
"code": "530181",
"value": "安宁市",
"label": "安宁市"
}
]
},
{
"code": "530300",
"value": "曲靖市",
"label": "曲靖市",
"children": [
{
"code": "530302",
"value": "麒麟区",
"label": "麒麟区"
},
{
"code": "530303",
"value": "沾益区",
"label": "沾益区"
},
{
"code": "530304",
"value": "马龙区",
"label": "马龙区"
},
{
"code": "530322",
"value": "陆良县",
"label": "陆良县"
},
{
"code": "530323",
"value": "师宗县",
"label": "师宗县"
},
{
"code": "530324",
"value": "罗平县",
"label": "罗平县"
},
{
"code": "530325",
"value": "富源县",
"label": "富源县"
},
{
"code": "530326",
"value": "会泽县",
"label": "会泽县"
},
{
"code": "530381",
"value": "宣威市",
"label": "宣威市"
}
]
},
{
"code": "530400",
"value": "玉溪市",
"label": "玉溪市",
"children": [
{
"code": "530402",
"value": "红塔区",
"label": "红塔区"
},
{
"code": "530403",
"value": "江川区",
"label": "江川区"
},
{
"code": "530423",
"value": "通海县",
"label": "通海县"
},
{
"code": "530424",
"value": "华宁县",
"label": "华宁县"
},
{
"code": "530425",
"value": "易门县",
"label": "易门县"
},
{
"code": "530426",
"value": "峨山彝族自治县",
"label": "峨山彝族自治县"
},
{
"code": "530427",
"value": "新平彝族傣族自治县",
"label": "新平彝族傣族自治县"
},
{
"code": "530428",
"value": "元江哈尼族彝族傣族自治县",
"label": "元江哈尼族彝族傣族自治县"
},
{
"code": "530481",
"value": "澄江市",
"label": "澄江市"
}
]
},
{
"code": "530500",
"value": "保山市",
"label": "保山市",
"children": [
{
"code": "530502",
"value": "隆阳区",
"label": "隆阳区"
},
{
"code": "530521",
"value": "施甸县",
"label": "施甸县"
},
{
"code": "530523",
"value": "龙陵县",
"label": "龙陵县"
},
{
"code": "530524",
"value": "昌宁县",
"label": "昌宁县"
},
{
"code": "530581",
"value": "腾冲市",
"label": "腾冲市"
}
]
},
{
"code": "530600",
"value": "昭通市",
"label": "昭通市",
"children": [
{
"code": "530602",
"value": "昭阳区",
"label": "昭阳区"
},
{
"code": "530621",
"value": "鲁甸县",
"label": "鲁甸县"
},
{
"code": "530622",
"value": "巧家县",
"label": "巧家县"
},
{
"code": "530623",
"value": "盐津县",
"label": "盐津县"
},
{
"code": "530624",
"value": "大关县",
"label": "大关县"
},
{
"code": "530625",
"value": "永善县",
"label": "永善县"
},
{
"code": "530626",
"value": "绥江县",
"label": "绥江县"
},
{
"code": "530627",
"value": "镇雄县",
"label": "镇雄县"
},
{
"code": "530628",
"value": "彝良县",
"label": "彝良县"
},
{
"code": "530629",
"value": "威信县",
"label": "威信县"
},
{
"code": "530681",
"value": "水富市",
"label": "水富市"
}
]
},
{
"code": "530700",
"value": "丽江市",
"label": "丽江市",
"children": [
{
"code": "530702",
"value": "古城区",
"label": "古城区"
},
{
"code": "530721",
"value": "玉龙纳西族自治县",
"label": "玉龙纳西族自治县"
},
{
"code": "530722",
"value": "永胜县",
"label": "永胜县"
},
{
"code": "530723",
"value": "华坪县",
"label": "华坪县"
},
{
"code": "530724",
"value": "宁蒗彝族自治县",
"label": "宁蒗彝族自治县"
}
]
},
{
"code": "530800",
"value": "普洱市",
"label": "普洱市",
"children": [
{
"code": "530802",
"value": "思茅区",
"label": "思茅区"
},
{
"code": "530821",
"value": "宁洱哈尼族彝族自治县",
"label": "宁洱哈尼族彝族自治县"
},
{
"code": "530822",
"value": "墨江哈尼族自治县",
"label": "墨江哈尼族自治县"
},
{
"code": "530823",
"value": "景东彝族自治县",
"label": "景东彝族自治县"
},
{
"code": "530824",
"value": "景谷傣族彝族自治县",
"label": "景谷傣族彝族自治县"
},
{
"code": "530825",
"value": "镇沅彝族哈尼族拉祜族自治县",
"label": "镇沅彝族哈尼族拉祜族自治县"
},
{
"code": "530826",
"value": "江城哈尼族彝族自治县",
"label": "江城哈尼族彝族自治县"
},
{
"code": "530827",
"value": "孟连傣族拉祜族佤族自治县",
"label": "孟连傣族拉祜族佤族自治县"
},
{
"code": "530828",
"value": "澜沧拉祜族自治县",
"label": "澜沧拉祜族自治县"
},
{
"code": "530829",
"value": "西盟佤族自治县",
"label": "西盟佤族自治县"
}
]
},
{
"code": "530900",
"value": "临沧市",
"label": "临沧市",
"children": [
{
"code": "530902",
"value": "临翔区",
"label": "临翔区"
},
{
"code": "530921",
"value": "凤庆县",
"label": "凤庆县"
},
{
"code": "530922",
"value": "云县",
"label": "云县"
},
{
"code": "530923",
"value": "永德县",
"label": "永德县"
},
{
"code": "530924",
"value": "镇康县",
"label": "镇康县"
},
{
"code": "530925",
"value": "双江拉祜族佤族布朗族傣族自治县",
"label": "双江拉祜族佤族布朗族傣族自治县"
},
{
"code": "530926",
"value": "耿马傣族佤族自治县",
"label": "耿马傣族佤族自治县"
},
{
"code": "530927",
"value": "沧源佤族自治县",
"label": "沧源佤族自治县"
}
]
},
{
"code": "532300",
"value": "楚雄彝族自治州",
"label": "楚雄彝族自治州",
"children": [
{
"code": "532301",
"value": "楚雄市",
"label": "楚雄市"
},
{
"code": "532322",
"value": "双柏县",
"label": "双柏县"
},
{
"code": "532323",
"value": "牟定县",
"label": "牟定县"
},
{
"code": "532324",
"value": "南华县",
"label": "南华县"
},
{
"code": "532325",
"value": "姚安县",
"label": "姚安县"
},
{
"code": "532326",
"value": "大姚县",
"label": "大姚县"
},
{
"code": "532327",
"value": "永仁县",
"label": "永仁县"
},
{
"code": "532328",
"value": "元谋县",
"label": "元谋县"
},
{
"code": "532329",
"value": "武定县",
"label": "武定县"
},
{
"code": "532331",
"value": "禄丰县",
"label": "禄丰县"
}
]
},
{
"code": "532500",
"value": "红河哈尼族彝族自治州",
"label": "红河哈尼族彝族自治州",
"children": [
{
"code": "532501",
"value": "个旧市",
"label": "个旧市"
},
{
"code": "532502",
"value": "开远市",
"label": "开远市"
},
{
"code": "532503",
"value": "蒙自市",
"label": "蒙自市"
},
{
"code": "532504",
"value": "弥勒市",
"label": "弥勒市"
},
{
"code": "532523",
"value": "屏边苗族自治县",
"label": "屏边苗族自治县"
},
{
"code": "532524",
"value": "建水县",
"label": "建水县"
},
{
"code": "532525",
"value": "石屏县",
"label": "石屏县"
},
{
"code": "532527",
"value": "泸西县",
"label": "泸西县"
},
{
"code": "532528",
"value": "元阳县",
"label": "元阳县"
},
{
"code": "532529",
"value": "红河县",
"label": "红河县"
},
{
"code": "532530",
"value": "金平苗族瑶族傣族自治县",
"label": "金平苗族瑶族傣族自治县"
},
{
"code": "532531",
"value": "绿春县",
"label": "绿春县"
},
{
"code": "532532",
"value": "河口瑶族自治县",
"label": "河口瑶族自治县"
}
]
},
{
"code": "532600",
"value": "文山壮族苗族自治州",
"label": "文山壮族苗族自治州",
"children": [
{
"code": "532601",
"value": "文山市",
"label": "文山市"
},
{
"code": "532622",
"value": "砚山县",
"label": "砚山县"
},
{
"code": "532623",
"value": "西畴县",
"label": "西畴县"
},
{
"code": "532624",
"value": "麻栗坡县",
"label": "麻栗坡县"
},
{
"code": "532625",
"value": "马关县",
"label": "马关县"
},
{
"code": "532626",
"value": "丘北县",
"label": "丘北县"
},
{
"code": "532627",
"value": "广南县",
"label": "广南县"
},
{
"code": "532628",
"value": "富宁县",
"label": "富宁县"
}
]
},
{
"code": "532800",
"value": "西双版纳傣族自治州",
"label": "西双版纳傣族自治州",
"children": [
{
"code": "532801",
"value": "景洪市",
"label": "景洪市"
},
{
"code": "532822",
"value": "勐海县",
"label": "勐海县"
},
{
"code": "532823",
"value": "勐腊县",
"label": "勐腊县"
}
]
},
{
"code": "532900",
"value": "大理白族自治州",
"label": "大理白族自治州",
"children": [
{
"code": "532901",
"value": "大理市",
"label": "大理市"
},
{
"code": "532922",
"value": "漾濞彝族自治县",
"label": "漾濞彝族自治县"
},
{
"code": "532923",
"value": "祥云县",
"label": "祥云县"
},
{
"code": "532924",
"value": "宾川县",
"label": "宾川县"
},
{
"code": "532925",
"value": "弥渡县",
"label": "弥渡县"
},
{
"code": "532926",
"value": "南涧彝族自治县",
"label": "南涧彝族自治县"
},
{
"code": "532927",
"value": "巍山彝族回族自治县",
"label": "巍山彝族回族自治县"
},
{
"code": "532928",
"value": "永平县",
"label": "永平县"
},
{
"code": "532929",
"value": "云龙县",
"label": "云龙县"
},
{
"code": "532930",
"value": "洱源县",
"label": "洱源县"
},
{
"code": "532931",
"value": "剑川县",
"label": "剑川县"
},
{
"code": "532932",
"value": "鹤庆县",
"label": "鹤庆县"
}
]
},
{
"code": "533100",
"value": "德宏傣族景颇族自治州",
"label": "德宏傣族景颇族自治州",
"children": [
{
"code": "533102",
"value": "瑞丽市",
"label": "瑞丽市"
},
{
"code": "533103",
"value": "芒市",
"label": "芒市"
},
{
"code": "533122",
"value": "梁河县",
"label": "梁河县"
},
{
"code": "533123",
"value": "盈江县",
"label": "盈江县"
},
{
"code": "533124",
"value": "陇川县",
"label": "陇川县"
}
]
},
{
"code": "533300",
"value": "怒江傈僳族自治州",
"label": "怒江傈僳族自治州",
"children": [
{
"code": "533301",
"value": "泸水市",
"label": "泸水市"
},
{
"code": "533323",
"value": "福贡县",
"label": "福贡县"
},
{
"code": "533324",
"value": "贡山独龙族怒族自治县",
"label": "贡山独龙族怒族自治县"
},
{
"code": "533325",
"value": "兰坪白族普米族自治县",
"label": "兰坪白族普米族自治县"
}
]
},
{
"code": "533400",
"value": "迪庆藏族自治州",
"label": "迪庆藏族自治州",
"children": [
{
"code": "533401",
"value": "香格里拉市",
"label": "香格里拉市"
},
{
"code": "533422",
"value": "德钦县",
"label": "德钦县"
},
{
"code": "533423",
"value": "维西傈僳族自治县",
"label": "维西傈僳族自治县"
}
]
}
]
},
{
"code": "540000",
"value": "西藏自治区",
"label": "西藏自治区",
"children": [
{
"code": "540100",
"value": "拉萨市",
"label": "拉萨市",
"children": [
{
"code": "540102",
"value": "城关区",
"label": "城关区"
},
{
"code": "540103",
"value": "堆龙德庆区",
"label": "堆龙德庆区"
},
{
"code": "540104",
"value": "达孜区",
"label": "达孜区"
},
{
"code": "540121",
"value": "林周县",
"label": "林周县"
},
{
"code": "540122",
"value": "当雄县",
"label": "当雄县"
},
{
"code": "540123",
"value": "尼木县",
"label": "尼木县"
},
{
"code": "540124",
"value": "曲水县",
"label": "曲水县"
},
{
"code": "540127",
"value": "墨竹工卡县",
"label": "墨竹工卡县"
}
]
},
{
"code": "540200",
"value": "日喀则市",
"label": "日喀则市",
"children": [
{
"code": "540202",
"value": "桑珠孜区",
"label": "桑珠孜区"
},
{
"code": "540221",
"value": "南木林县",
"label": "南木林县"
},
{
"code": "540222",
"value": "江孜县",
"label": "江孜县"
},
{
"code": "540223",
"value": "定日县",
"label": "定日县"
},
{
"code": "540224",
"value": "萨迦县",
"label": "萨迦县"
},
{
"code": "540225",
"value": "拉孜县",
"label": "拉孜县"
},
{
"code": "540226",
"value": "昂仁县",
"label": "昂仁县"
},
{
"code": "540227",
"value": "谢通门县",
"label": "谢通门县"
},
{
"code": "540228",
"value": "白朗县",
"label": "白朗县"
},
{
"code": "540229",
"value": "仁布县",
"label": "仁布县"
},
{
"code": "540230",
"value": "康马县",
"label": "康马县"
},
{
"code": "540231",
"value": "定结县",
"label": "定结县"
},
{
"code": "540232",
"value": "仲巴县",
"label": "仲巴县"
},
{
"code": "540233",
"value": "亚东县",
"label": "亚东县"
},
{
"code": "540234",
"value": "吉隆县",
"label": "吉隆县"
},
{
"code": "540235",
"value": "聂拉木县",
"label": "聂拉木县"
},
{
"code": "540236",
"value": "萨嘎县",
"label": "萨嘎县"
},
{
"code": "540237",
"value": "岗巴县",
"label": "岗巴县"
}
]
},
{
"code": "540300",
"value": "昌都市",
"label": "昌都市",
"children": [
{
"code": "540302",
"value": "卡若区",
"label": "卡若区"
},
{
"code": "540321",
"value": "江达县",
"label": "江达县"
},
{
"code": "540322",
"value": "贡觉县",
"label": "贡觉县"
},
{
"code": "540323",
"value": "类乌齐县",
"label": "类乌齐县"
},
{
"code": "540324",
"value": "丁青县",
"label": "丁青县"
},
{
"code": "540325",
"value": "察雅县",
"label": "察雅县"
},
{
"code": "540326",
"value": "八宿县",
"label": "八宿县"
},
{
"code": "540327",
"value": "左贡县",
"label": "左贡县"
},
{
"code": "540328",
"value": "芒康县",
"label": "芒康县"
},
{
"code": "540329",
"value": "洛隆县",
"label": "洛隆县"
},
{
"code": "540330",
"value": "边坝县",
"label": "边坝县"
}
]
},
{
"code": "540400",
"value": "林芝市",
"label": "林芝市",
"children": [
{
"code": "540402",
"value": "巴宜区",
"label": "巴宜区"
},
{
"code": "540421",
"value": "工布江达县",
"label": "工布江达县"
},
{
"code": "540422",
"value": "米林县",
"label": "米林县"
},
{
"code": "540423",
"value": "墨脱县",
"label": "墨脱县"
},
{
"code": "540424",
"value": "波密县",
"label": "波密县"
},
{
"code": "540425",
"value": "察隅县",
"label": "察隅县"
},
{
"code": "540426",
"value": "朗县",
"label": "朗县"
}
]
},
{
"code": "540500",
"value": "山南市",
"label": "山南市",
"children": [
{
"code": "540502",
"value": "乃东区",
"label": "乃东区"
},
{
"code": "540521",
"value": "扎囊县",
"label": "扎囊县"
},
{
"code": "540522",
"value": "贡嘎县",
"label": "贡嘎县"
},
{
"code": "540523",
"value": "桑日县",
"label": "桑日县"
},
{
"code": "540524",
"value": "琼结县",
"label": "琼结县"
},
{
"code": "540525",
"value": "曲松县",
"label": "曲松县"
},
{
"code": "540526",
"value": "措美县",
"label": "措美县"
},
{
"code": "540527",
"value": "洛扎县",
"label": "洛扎县"
},
{
"code": "540528",
"value": "加查县",
"label": "加查县"
},
{
"code": "540529",
"value": "隆子县",
"label": "隆子县"
},
{
"code": "540530",
"value": "错那县",
"label": "错那县"
},
{
"code": "540531",
"value": "浪卡子县",
"label": "浪卡子县"
}
]
},
{
"code": "540600",
"value": "那曲市",
"label": "那曲市",
"children": [
{
"code": "540602",
"value": "色尼区",
"label": "色尼区"
},
{
"code": "540621",
"value": "嘉黎县",
"label": "嘉黎县"
},
{
"code": "540622",
"value": "比如县",
"label": "比如县"
},
{
"code": "540623",
"value": "聂荣县",
"label": "聂荣县"
},
{
"code": "540624",
"value": "安多县",
"label": "安多县"
},
{
"code": "540625",
"value": "申扎县",
"label": "申扎县"
},
{
"code": "540626",
"value": "索县",
"label": "索县"
},
{
"code": "540627",
"value": "班戈县",
"label": "班戈县"
},
{
"code": "540628",
"value": "巴青县",
"label": "巴青县"
},
{
"code": "540629",
"value": "尼玛县",
"label": "尼玛县"
},
{
"code": "540630",
"value": "双湖县",
"label": "双湖县"
}
]
},
{
"code": "542500",
"value": "阿里地区",
"label": "阿里地区",
"children": [
{
"code": "542521",
"value": "普兰县",
"label": "普兰县"
},
{
"code": "542522",
"value": "札达县",
"label": "札达县"
},
{
"code": "542523",
"value": "噶尔县",
"label": "噶尔县"
},
{
"code": "542524",
"value": "日土县",
"label": "日土县"
},
{
"code": "542525",
"value": "革吉县",
"label": "革吉县"
},
{
"code": "542526",
"value": "改则县",
"label": "改则县"
},
{
"code": "542527",
"value": "措勤县",
"label": "措勤县"
}
]
}
]
},
{
"code": "610000",
"value": "陕西省",
"label": "陕西省",
"children": [
{
"code": "610100",
"value": "西安市",
"label": "西安市",
"children": [
{
"code": "610102",
"value": "新城区",
"label": "新城区"
},
{
"code": "610103",
"value": "碑林区",
"label": "碑林区"
},
{
"code": "610104",
"value": "莲湖区",
"label": "莲湖区"
},
{
"code": "610111",
"value": "灞桥区",
"label": "灞桥区"
},
{
"code": "610112",
"value": "未央区",
"label": "未央区"
},
{
"code": "610113",
"value": "雁塔区",
"label": "雁塔区"
},
{
"code": "610114",
"value": "阎良区",
"label": "阎良区"
},
{
"code": "610115",
"value": "临潼区",
"label": "临潼区"
},
{
"code": "610116",
"value": "长安区",
"label": "长安区"
},
{
"code": "610117",
"value": "高陵区",
"label": "高陵区"
},
{
"code": "610118",
"value": "鄠邑区",
"label": "鄠邑区"
},
{
"code": "610122",
"value": "蓝田县",
"label": "蓝田县"
},
{
"code": "610124",
"value": "周至县",
"label": "周至县"
}
]
},
{
"code": "610200",
"value": "铜川市",
"label": "铜川市",
"children": [
{
"code": "610202",
"value": "王益区",
"label": "王益区"
},
{
"code": "610203",
"value": "印台区",
"label": "印台区"
},
{
"code": "610204",
"value": "耀州区",
"label": "耀州区"
},
{
"code": "610222",
"value": "宜君县",
"label": "宜君县"
}
]
},
{
"code": "610300",
"value": "宝鸡市",
"label": "宝鸡市",
"children": [
{
"code": "610302",
"value": "渭滨区",
"label": "渭滨区"
},
{
"code": "610303",
"value": "金台区",
"label": "金台区"
},
{
"code": "610304",
"value": "陈仓区",
"label": "陈仓区"
},
{
"code": "610322",
"value": "凤翔县",
"label": "凤翔县"
},
{
"code": "610323",
"value": "岐山县",
"label": "岐山县"
},
{
"code": "610324",
"value": "扶风县",
"label": "扶风县"
},
{
"code": "610326",
"value": "眉县",
"label": "眉县"
},
{
"code": "610327",
"value": "陇县",
"label": "陇县"
},
{
"code": "610328",
"value": "千阳县",
"label": "千阳县"
},
{
"code": "610329",
"value": "麟游县",
"label": "麟游县"
},
{
"code": "610330",
"value": "凤县",
"label": "凤县"
},
{
"code": "610331",
"value": "太白县",
"label": "太白县"
}
]
},
{
"code": "610400",
"value": "咸阳市",
"label": "咸阳市",
"children": [
{
"code": "610402",
"value": "秦都区",
"label": "秦都区"
},
{
"code": "610403",
"value": "杨陵区",
"label": "杨陵区"
},
{
"code": "610404",
"value": "渭城区",
"label": "渭城区"
},
{
"code": "610422",
"value": "三原县",
"label": "三原县"
},
{
"code": "610423",
"value": "泾阳县",
"label": "泾阳县"
},
{
"code": "610424",
"value": "乾县",
"label": "乾县"
},
{
"code": "610425",
"value": "礼泉县",
"label": "礼泉县"
},
{
"code": "610426",
"value": "永寿县",
"label": "永寿县"
},
{
"code": "610428",
"value": "长武县",
"label": "长武县"
},
{
"code": "610429",
"value": "旬邑县",
"label": "旬邑县"
},
{
"code": "610430",
"value": "淳化县",
"label": "淳化县"
},
{
"code": "610431",
"value": "武功县",
"label": "武功县"
},
{
"code": "610481",
"value": "兴平市",
"label": "兴平市"
},
{
"code": "610482",
"value": "彬州市",
"label": "彬州市"
}
]
},
{
"code": "610500",
"value": "渭南市",
"label": "渭南市",
"children": [
{
"code": "610502",
"value": "临渭区",
"label": "临渭区"
},
{
"code": "610503",
"value": "华州区",
"label": "华州区"
},
{
"code": "610522",
"value": "潼关县",
"label": "潼关县"
},
{
"code": "610523",
"value": "大荔县",
"label": "大荔县"
},
{
"code": "610524",
"value": "合阳县",
"label": "合阳县"
},
{
"code": "610525",
"value": "澄城县",
"label": "澄城县"
},
{
"code": "610526",
"value": "蒲城县",
"label": "蒲城县"
},
{
"code": "610527",
"value": "白水县",
"label": "白水县"
},
{
"code": "610528",
"value": "富平县",
"label": "富平县"
},
{
"code": "610581",
"value": "韩城市",
"label": "韩城市"
},
{
"code": "610582",
"value": "华阴市",
"label": "华阴市"
}
]
},
{
"code": "610600",
"value": "延安市",
"label": "延安市",
"children": [
{
"code": "610602",
"value": "宝塔区",
"label": "宝塔区"
},
{
"code": "610603",
"value": "安塞区",
"label": "安塞区"
},
{
"code": "610621",
"value": "延长县",
"label": "延长县"
},
{
"code": "610622",
"value": "延川县",
"label": "延川县"
},
{
"code": "610625",
"value": "志丹县",
"label": "志丹县"
},
{
"code": "610626",
"value": "吴起县",
"label": "吴起县"
},
{
"code": "610627",
"value": "甘泉县",
"label": "甘泉县"
},
{
"code": "610628",
"value": "富县",
"label": "富县"
},
{
"code": "610629",
"value": "洛川县",
"label": "洛川县"
},
{
"code": "610630",
"value": "宜川县",
"label": "宜川县"
},
{
"code": "610631",
"value": "黄龙县",
"label": "黄龙县"
},
{
"code": "610632",
"value": "黄陵县",
"label": "黄陵县"
},
{
"code": "610681",
"value": "子长市",
"label": "子长市"
}
]
},
{
"code": "610700",
"value": "汉中市",
"label": "汉中市",
"children": [
{
"code": "610702",
"value": "汉台区",
"label": "汉台区"
},
{
"code": "610703",
"value": "南郑区",
"label": "南郑区"
},
{
"code": "610722",
"value": "城固县",
"label": "城固县"
},
{
"code": "610723",
"value": "洋县",
"label": "洋县"
},
{
"code": "610724",
"value": "西乡县",
"label": "西乡县"
},
{
"code": "610725",
"value": "勉县",
"label": "勉县"
},
{
"code": "610726",
"value": "宁强县",
"label": "宁强县"
},
{
"code": "610727",
"value": "略阳县",
"label": "略阳县"
},
{
"code": "610728",
"value": "镇巴县",
"label": "镇巴县"
},
{
"code": "610729",
"value": "留坝县",
"label": "留坝县"
},
{
"code": "610730",
"value": "佛坪县",
"label": "佛坪县"
}
]
},
{
"code": "610800",
"value": "榆林市",
"label": "榆林市",
"children": [
{
"code": "610802",
"value": "榆阳区",
"label": "榆阳区"
},
{
"code": "610803",
"value": "横山区",
"label": "横山区"
},
{
"code": "610822",
"value": "府谷县",
"label": "府谷县"
},
{
"code": "610824",
"value": "靖边县",
"label": "靖边县"
},
{
"code": "610825",
"value": "定边县",
"label": "定边县"
},
{
"code": "610826",
"value": "绥德县",
"label": "绥德县"
},
{
"code": "610827",
"value": "米脂县",
"label": "米脂县"
},
{
"code": "610828",
"value": "佳县",
"label": "佳县"
},
{
"code": "610829",
"value": "吴堡县",
"label": "吴堡县"
},
{
"code": "610830",
"value": "清涧县",
"label": "清涧县"
},
{
"code": "610831",
"value": "子洲县",
"label": "子洲县"
},
{
"code": "610881",
"value": "神木市",
"label": "神木市"
}
]
},
{
"code": "610900",
"value": "安康市",
"label": "安康市",
"children": [
{
"code": "610902",
"value": "汉滨区",
"label": "汉滨区"
},
{
"code": "610921",
"value": "汉阴县",
"label": "汉阴县"
},
{
"code": "610922",
"value": "石泉县",
"label": "石泉县"
},
{
"code": "610923",
"value": "宁陕县",
"label": "宁陕县"
},
{
"code": "610924",
"value": "紫阳县",
"label": "紫阳县"
},
{
"code": "610925",
"value": "岚皋县",
"label": "岚皋县"
},
{
"code": "610926",
"value": "平利县",
"label": "平利县"
},
{
"code": "610927",
"value": "镇坪县",
"label": "镇坪县"
},
{
"code": "610928",
"value": "旬阳县",
"label": "旬阳县"
},
{
"code": "610929",
"value": "白河县",
"label": "白河县"
}
]
},
{
"code": "611000",
"value": "商洛市",
"label": "商洛市",
"children": [
{
"code": "611002",
"value": "商州区",
"label": "商州区"
},
{
"code": "611021",
"value": "洛南县",
"label": "洛南县"
},
{
"code": "611022",
"value": "丹凤县",
"label": "丹凤县"
},
{
"code": "611023",
"value": "商南县",
"label": "商南县"
},
{
"code": "611024",
"value": "山阳县",
"label": "山阳县"
},
{
"code": "611025",
"value": "镇安县",
"label": "镇安县"
},
{
"code": "611026",
"value": "柞水县",
"label": "柞水县"
}
]
}
]
},
{
"code": "620000",
"value": "甘肃省",
"label": "甘肃省",
"children": [
{
"code": "620100",
"value": "兰州市",
"label": "兰州市",
"children": [
{
"code": "620102",
"value": "城关区",
"label": "城关区"
},
{
"code": "620103",
"value": "七里河区",
"label": "七里河区"
},
{
"code": "620104",
"value": "西固区",
"label": "西固区"
},
{
"code": "620105",
"value": "安宁区",
"label": "安宁区"
},
{
"code": "620111",
"value": "红古区",
"label": "红古区"
},
{
"code": "620121",
"value": "永登县",
"label": "永登县"
},
{
"code": "620122",
"value": "皋兰县",
"label": "皋兰县"
},
{
"code": "620123",
"value": "榆中县",
"label": "榆中县"
}
]
},
{
"code": "620200",
"value": "嘉峪关市",
"label": "嘉峪关市",
"children": []
},
{
"code": "620300",
"value": "金昌市",
"label": "金昌市",
"children": [
{
"code": "620302",
"value": "金川区",
"label": "金川区"
},
{
"code": "620321",
"value": "永昌县",
"label": "永昌县"
}
]
},
{
"code": "620400",
"value": "白银市",
"label": "白银市",
"children": [
{
"code": "620402",
"value": "白银区",
"label": "白银区"
},
{
"code": "620403",
"value": "平川区",
"label": "平川区"
},
{
"code": "620421",
"value": "靖远县",
"label": "靖远县"
},
{
"code": "620422",
"value": "会宁县",
"label": "会宁县"
},
{
"code": "620423",
"value": "景泰县",
"label": "景泰县"
}
]
},
{
"code": "620500",
"value": "天水市",
"label": "天水市",
"children": [
{
"code": "620502",
"value": "秦州区",
"label": "秦州区"
},
{
"code": "620503",
"value": "麦积区",
"label": "麦积区"
},
{
"code": "620521",
"value": "清水县",
"label": "清水县"
},
{
"code": "620522",
"value": "秦安县",
"label": "秦安县"
},
{
"code": "620523",
"value": "甘谷县",
"label": "甘谷县"
},
{
"code": "620524",
"value": "武山县",
"label": "武山县"
},
{
"code": "620525",
"value": "张家川回族自治县",
"label": "张家川回族自治县"
}
]
},
{
"code": "620600",
"value": "武威市",
"label": "武威市",
"children": [
{
"code": "620602",
"value": "凉州区",
"label": "凉州区"
},
{
"code": "620621",
"value": "民勤县",
"label": "民勤县"
},
{
"code": "620622",
"value": "古浪县",
"label": "古浪县"
},
{
"code": "620623",
"value": "天祝藏族自治县",
"label": "天祝藏族自治县"
}
]
},
{
"code": "620700",
"value": "张掖市",
"label": "张掖市",
"children": [
{
"code": "620702",
"value": "甘州区",
"label": "甘州区"
},
{
"code": "620721",
"value": "肃南裕固族自治县",
"label": "肃南裕固族自治县"
},
{
"code": "620722",
"value": "民乐县",
"label": "民乐县"
},
{
"code": "620723",
"value": "临泽县",
"label": "临泽县"
},
{
"code": "620724",
"value": "高台县",
"label": "高台县"
},
{
"code": "620725",
"value": "山丹县",
"label": "山丹县"
}
]
},
{
"code": "620800",
"value": "平凉市",
"label": "平凉市",
"children": [
{
"code": "620802",
"value": "崆峒区",
"label": "崆峒区"
},
{
"code": "620821",
"value": "泾川县",
"label": "泾川县"
},
{
"code": "620822",
"value": "灵台县",
"label": "灵台县"
},
{
"code": "620823",
"value": "崇信县",
"label": "崇信县"
},
{
"code": "620825",
"value": "庄浪县",
"label": "庄浪县"
},
{
"code": "620826",
"value": "静宁县",
"label": "静宁县"
},
{
"code": "620881",
"value": "华亭市",
"label": "华亭市"
}
]
},
{
"code": "620900",
"value": "酒泉市",
"label": "酒泉市",
"children": [
{
"code": "620902",
"value": "肃州区",
"label": "肃州区"
},
{
"code": "620921",
"value": "金塔县",
"label": "金塔县"
},
{
"code": "620922",
"value": "瓜州县",
"label": "瓜州县"
},
{
"code": "620923",
"value": "肃北蒙古族自治县",
"label": "肃北蒙古族自治县"
},
{
"code": "620924",
"value": "阿克塞哈萨克族自治县",
"label": "阿克塞哈萨克族自治县"
},
{
"code": "620981",
"value": "玉门市",
"label": "玉门市"
},
{
"code": "620982",
"value": "敦煌市",
"label": "敦煌市"
}
]
},
{
"code": "621000",
"value": "庆阳市",
"label": "庆阳市",
"children": [
{
"code": "621002",
"value": "西峰区",
"label": "西峰区"
},
{
"code": "621021",
"value": "庆城县",
"label": "庆城县"
},
{
"code": "621022",
"value": "环县",
"label": "环县"
},
{
"code": "621023",
"value": "华池县",
"label": "华池县"
},
{
"code": "621024",
"value": "合水县",
"label": "合水县"
},
{
"code": "621025",
"value": "正宁县",
"label": "正宁县"
},
{
"code": "621026",
"value": "宁县",
"label": "宁县"
},
{
"code": "621027",
"value": "镇原县",
"label": "镇原县"
}
]
},
{
"code": "621100",
"value": "定西市",
"label": "定西市",
"children": [
{
"code": "621102",
"value": "安定区",
"label": "安定区"
},
{
"code": "621121",
"value": "通渭县",
"label": "通渭县"
},
{
"code": "621122",
"value": "陇西县",
"label": "陇西县"
},
{
"code": "621123",
"value": "渭源县",
"label": "渭源县"
},
{
"code": "621124",
"value": "临洮县",
"label": "临洮县"
},
{
"code": "621125",
"value": "漳县",
"label": "漳县"
},
{
"code": "621126",
"value": "岷县",
"label": "岷县"
}
]
},
{
"code": "621200",
"value": "陇南市",
"label": "陇南市",
"children": [
{
"code": "621202",
"value": "武都区",
"label": "武都区"
},
{
"code": "621221",
"value": "成县",
"label": "成县"
},
{
"code": "621222",
"value": "文县",
"label": "文县"
},
{
"code": "621223",
"value": "宕昌县",
"label": "宕昌县"
},
{
"code": "621224",
"value": "康县",
"label": "康县"
},
{
"code": "621225",
"value": "西和县",
"label": "西和县"
},
{
"code": "621226",
"value": "礼县",
"label": "礼县"
},
{
"code": "621227",
"value": "徽县",
"label": "徽县"
},
{
"code": "621228",
"value": "两当县",
"label": "两当县"
}
]
},
{
"code": "622900",
"value": "临夏回族自治州",
"label": "临夏回族自治州",
"children": [
{
"code": "622901",
"value": "临夏市",
"label": "临夏市"
},
{
"code": "622921",
"value": "临夏县",
"label": "临夏县"
},
{
"code": "622922",
"value": "康乐县",
"label": "康乐县"
},
{
"code": "622923",
"value": "永靖县",
"label": "永靖县"
},
{
"code": "622924",
"value": "广河县",
"label": "广河县"
},
{
"code": "622925",
"value": "和政县",
"label": "和政县"
},
{
"code": "622926",
"value": "东乡族自治县",
"label": "东乡族自治县"
},
{
"code": "622927",
"value": "积石山保安族东乡族撒拉族自治县",
"label": "积石山保安族东乡族撒拉族自治县"
}
]
},
{
"code": "623000",
"value": "甘南藏族自治州",
"label": "甘南藏族自治州",
"children": [
{
"code": "623001",
"value": "合作市",
"label": "合作市"
},
{
"code": "623021",
"value": "临潭县",
"label": "临潭县"
},
{
"code": "623022",
"value": "卓尼县",
"label": "卓尼县"
},
{
"code": "623023",
"value": "舟曲县",
"label": "舟曲县"
},
{
"code": "623024",
"value": "迭部县",
"label": "迭部县"
},
{
"code": "623025",
"value": "玛曲县",
"label": "玛曲县"
},
{
"code": "623026",
"value": "碌曲县",
"label": "碌曲县"
},
{
"code": "623027",
"value": "夏河县",
"label": "夏河县"
}
]
}
]
},
{
"code": "630000",
"value": "青海省",
"label": "青海省",
"children": [
{
"code": "630100",
"value": "西宁市",
"label": "西宁市",
"children": [
{
"code": "630102",
"value": "城东区",
"label": "城东区"
},
{
"code": "630103",
"value": "城中区",
"label": "城中区"
},
{
"code": "630104",
"value": "城西区",
"label": "城西区"
},
{
"code": "630105",
"value": "城北区",
"label": "城北区"
},
{
"code": "630106",
"value": "湟中区",
"label": "湟中区"
},
{
"code": "630121",
"value": "大通回族土族自治县",
"label": "大通回族土族自治县"
},
{
"code": "630123",
"value": "湟源县",
"label": "湟源县"
}
]
},
{
"code": "630200",
"value": "海东市",
"label": "海东市",
"children": [
{
"code": "630202",
"value": "乐都区",
"label": "乐都区"
},
{
"code": "630203",
"value": "平安区",
"label": "平安区"
},
{
"code": "630222",
"value": "民和回族土族自治县",
"label": "民和回族土族自治县"
},
{
"code": "630223",
"value": "互助土族自治县",
"label": "互助土族自治县"
},
{
"code": "630224",
"value": "化隆回族自治县",
"label": "化隆回族自治县"
},
{
"code": "630225",
"value": "循化撒拉族自治县",
"label": "循化撒拉族自治县"
}
]
},
{
"code": "632200",
"value": "海北藏族自治州",
"label": "海北藏族自治州",
"children": [
{
"code": "632221",
"value": "门源回族自治县",
"label": "门源回族自治县"
},
{
"code": "632222",
"value": "祁连县",
"label": "祁连县"
},
{
"code": "632223",
"value": "海晏县",
"label": "海晏县"
},
{
"code": "632224",
"value": "刚察县",
"label": "刚察县"
}
]
},
{
"code": "632300",
"value": "黄南藏族自治州",
"label": "黄南藏族自治州",
"children": [
{
"code": "632301",
"value": "同仁市",
"label": "同仁市"
},
{
"code": "632322",
"value": "尖扎县",
"label": "尖扎县"
},
{
"code": "632323",
"value": "泽库县",
"label": "泽库县"
},
{
"code": "632324",
"value": "河南蒙古族自治县",
"label": "河南蒙古族自治县"
}
]
},
{
"code": "632500",
"value": "海南藏族自治州",
"label": "海南藏族自治州",
"children": [
{
"code": "632521",
"value": "共和县",
"label": "共和县"
},
{
"code": "632522",
"value": "同德县",
"label": "同德县"
},
{
"code": "632523",
"value": "贵德县",
"label": "贵德县"
},
{
"code": "632524",
"value": "兴海县",
"label": "兴海县"
},
{
"code": "632525",
"value": "贵南县",
"label": "贵南县"
}
]
},
{
"code": "632600",
"value": "果洛藏族自治州",
"label": "果洛藏族自治州",
"children": [
{
"code": "632621",
"value": "玛沁县",
"label": "玛沁县"
},
{
"code": "632622",
"value": "班玛县",
"label": "班玛县"
},
{
"code": "632623",
"value": "甘德县",
"label": "甘德县"
},
{
"code": "632624",
"value": "达日县",
"label": "达日县"
},
{
"code": "632625",
"value": "久治县",
"label": "久治县"
},
{
"code": "632626",
"value": "玛多县",
"label": "玛多县"
}
]
},
{
"code": "632700",
"value": "玉树藏族自治州",
"label": "玉树藏族自治州",
"children": [
{
"code": "632701",
"value": "玉树市",
"label": "玉树市"
},
{
"code": "632722",
"value": "杂多县",
"label": "杂多县"
},
{
"code": "632723",
"value": "称多县",
"label": "称多县"
},
{
"code": "632724",
"value": "治多县",
"label": "治多县"
},
{
"code": "632725",
"value": "囊谦县",
"label": "囊谦县"
},
{
"code": "632726",
"value": "曲麻莱县",
"label": "曲麻莱县"
}
]
},
{
"code": "632800",
"value": "海西蒙古族藏族自治州",
"label": "海西蒙古族藏族自治州",
"children": [
{
"code": "632801",
"value": "格尔木市",
"label": "格尔木市"
},
{
"code": "632802",
"value": "德令哈市",
"label": "德令哈市"
},
{
"code": "632803",
"value": "茫崖市",
"label": "茫崖市"
},
{
"code": "632821",
"value": "乌兰县",
"label": "乌兰县"
},
{
"code": "632822",
"value": "都兰县",
"label": "都兰县"
},
{
"code": "632823",
"value": "天峻县",
"label": "天峻县"
}
]
}
]
},
{
"code": "640000",
"value": "宁夏回族自治区",
"label": "宁夏回族自治区",
"children": [
{
"code": "640100",
"value": "银川市",
"label": "银川市",
"children": [
{
"code": "640104",
"value": "兴庆区",
"label": "兴庆区"
},
{
"code": "640105",
"value": "西夏区",
"label": "西夏区"
},
{
"code": "640106",
"value": "金凤区",
"label": "金凤区"
},
{
"code": "640121",
"value": "永宁县",
"label": "永宁县"
},
{
"code": "640122",
"value": "贺兰县",
"label": "贺兰县"
},
{
"code": "640181",
"value": "灵武市",
"label": "灵武市"
}
]
},
{
"code": "640200",
"value": "石嘴山市",
"label": "石嘴山市",
"children": [
{
"code": "640202",
"value": "大武口区",
"label": "大武口区"
},
{
"code": "640205",
"value": "惠农区",
"label": "惠农区"
},
{
"code": "640221",
"value": "平罗县",
"label": "平罗县"
}
]
},
{
"code": "640300",
"value": "吴忠市",
"label": "吴忠市",
"children": [
{
"code": "640302",
"value": "利通区",
"label": "利通区"
},
{
"code": "640303",
"value": "红寺堡区",
"label": "红寺堡区"
},
{
"code": "640323",
"value": "盐池县",
"label": "盐池县"
},
{
"code": "640324",
"value": "同心县",
"label": "同心县"
},
{
"code": "640381",
"value": "青铜峡市",
"label": "青铜峡市"
}
]
},
{
"code": "640400",
"value": "固原市",
"label": "固原市",
"children": [
{
"code": "640402",
"value": "原州区",
"label": "原州区"
},
{
"code": "640422",
"value": "西吉县",
"label": "西吉县"
},
{
"code": "640423",
"value": "隆德县",
"label": "隆德县"
},
{
"code": "640424",
"value": "泾源县",
"label": "泾源县"
},
{
"code": "640425",
"value": "彭阳县",
"label": "彭阳县"
}
]
},
{
"code": "640500",
"value": "中卫市",
"label": "中卫市",
"children": [
{
"code": "640502",
"value": "沙坡头区",
"label": "沙坡头区"
},
{
"code": "640521",
"value": "中宁县",
"label": "中宁县"
},
{
"code": "640522",
"value": "海原县",
"label": "海原县"
}
]
}
]
},
{
"code": "650000",
"value": "新疆维吾尔自治区",
"label": "新疆维吾尔自治区",
"children": [
{
"code": "650100",
"value": "乌鲁木齐市",
"label": "乌鲁木齐市",
"children": [
{
"code": "650102",
"value": "天山区",
"label": "天山区"
},
{
"code": "650103",
"value": "沙依巴克区",
"label": "沙依巴克区"
},
{
"code": "650104",
"value": "新市区",
"label": "新市区"
},
{
"code": "650105",
"value": "水磨沟区",
"label": "水磨沟区"
},
{
"code": "650106",
"value": "头屯河区",
"label": "头屯河区"
},
{
"code": "650107",
"value": "达坂城区",
"label": "达坂城区"
},
{
"code": "650109",
"value": "米东区",
"label": "米东区"
},
{
"code": "650121",
"value": "乌鲁木齐县",
"label": "乌鲁木齐县"
}
]
},
{
"code": "650200",
"value": "克拉玛依市",
"label": "克拉玛依市",
"children": [
{
"code": "650202",
"value": "独山子区",
"label": "独山子区"
},
{
"code": "650203",
"value": "克拉玛依区",
"label": "克拉玛依区"
},
{
"code": "650204",
"value": "白碱滩区",
"label": "白碱滩区"
},
{
"code": "650205",
"value": "乌尔禾区",
"label": "乌尔禾区"
}
]
},
{
"code": "650400",
"value": "吐鲁番市",
"label": "吐鲁番市",
"children": [
{
"code": "650402",
"value": "高昌区",
"label": "高昌区"
},
{
"code": "650421",
"value": "鄯善县",
"label": "鄯善县"
},
{
"code": "650422",
"value": "托克逊县",
"label": "托克逊县"
}
]
},
{
"code": "650500",
"value": "哈密市",
"label": "哈密市",
"children": [
{
"code": "650502",
"value": "伊州区",
"label": "伊州区"
},
{
"code": "650521",
"value": "巴里坤哈萨克自治县",
"label": "巴里坤哈萨克自治县"
},
{
"code": "650522",
"value": "伊吾县",
"label": "伊吾县"
}
]
},
{
"code": "652300",
"value": "昌吉回族自治州",
"label": "昌吉回族自治州",
"children": [
{
"code": "652301",
"value": "昌吉市",
"label": "昌吉市"
},
{
"code": "652302",
"value": "阜康市",
"label": "阜康市"
},
{
"code": "652323",
"value": "呼图壁县",
"label": "呼图壁县"
},
{
"code": "652324",
"value": "玛纳斯县",
"label": "玛纳斯县"
},
{
"code": "652325",
"value": "奇台县",
"label": "奇台县"
},
{
"code": "652327",
"value": "吉木萨尔县",
"label": "吉木萨尔县"
},
{
"code": "652328",
"value": "木垒哈萨克自治县",
"label": "木垒哈萨克自治县"
}
]
},
{
"code": "652700",
"value": "博尔塔拉蒙古自治州",
"label": "博尔塔拉蒙古自治州",
"children": [
{
"code": "652701",
"value": "博乐市",
"label": "博乐市"
},
{
"code": "652702",
"value": "阿拉山口市",
"label": "阿拉山口市"
},
{
"code": "652722",
"value": "精河县",
"label": "精河县"
},
{
"code": "652723",
"value": "温泉县",
"label": "温泉县"
}
]
},
{
"code": "652800",
"value": "巴音郭楞蒙古自治州",
"label": "巴音郭楞蒙古自治州",
"children": [
{
"code": "652801",
"value": "库尔勒市",
"label": "库尔勒市"
},
{
"code": "652822",
"value": "轮台县",
"label": "轮台县"
},
{
"code": "652823",
"value": "尉犁县",
"label": "尉犁县"
},
{
"code": "652824",
"value": "若羌县",
"label": "若羌县"
},
{
"code": "652825",
"value": "且末县",
"label": "且末县"
},
{
"code": "652826",
"value": "焉耆回族自治县",
"label": "焉耆回族自治县"
},
{
"code": "652827",
"value": "和静县",
"label": "和静县"
},
{
"code": "652828",
"value": "和硕县",
"label": "和硕县"
},
{
"code": "652829",
"value": "博湖县",
"label": "博湖县"
}
]
},
{
"code": "652900",
"value": "阿克苏地区",
"label": "阿克苏地区",
"children": [
{
"code": "652901",
"value": "阿克苏市",
"label": "阿克苏市"
},
{
"code": "652902",
"value": "库车市",
"label": "库车市"
},
{
"code": "652922",
"value": "温宿县",
"label": "温宿县"
},
{
"code": "652924",
"value": "沙雅县",
"label": "沙雅县"
},
{
"code": "652925",
"value": "新和县",
"label": "新和县"
},
{
"code": "652926",
"value": "拜城县",
"label": "拜城县"
},
{
"code": "652927",
"value": "乌什县",
"label": "乌什县"
},
{
"code": "652928",
"value": "阿瓦提县",
"label": "阿瓦提县"
},
{
"code": "652929",
"value": "柯坪县",
"label": "柯坪县"
}
]
},
{
"code": "653000",
"value": "克孜勒苏柯尔克孜自治州",
"label": "克孜勒苏柯尔克孜自治州",
"children": [
{
"code": "653001",
"value": "阿图什市",
"label": "阿图什市"
},
{
"code": "653022",
"value": "阿克陶县",
"label": "阿克陶县"
},
{
"code": "653023",
"value": "阿合奇县",
"label": "阿合奇县"
},
{
"code": "653024",
"value": "乌恰县",
"label": "乌恰县"
}
]
},
{
"code": "653100",
"value": "喀什地区",
"label": "喀什地区",
"children": [
{
"code": "653101",
"value": "喀什市",
"label": "喀什市"
},
{
"code": "653121",
"value": "疏附县",
"label": "疏附县"
},
{
"code": "653122",
"value": "疏勒县",
"label": "疏勒县"
},
{
"code": "653123",
"value": "英吉沙县",
"label": "英吉沙县"
},
{
"code": "653124",
"value": "泽普县",
"label": "泽普县"
},
{
"code": "653125",
"value": "莎车县",
"label": "莎车县"
},
{
"code": "653126",
"value": "叶城县",
"label": "叶城县"
},
{
"code": "653127",
"value": "麦盖提县",
"label": "麦盖提县"
},
{
"code": "653128",
"value": "岳普湖县",
"label": "岳普湖县"
},
{
"code": "653129",
"value": "伽师县",
"label": "伽师县"
},
{
"code": "653130",
"value": "巴楚县",
"label": "巴楚县"
},
{
"code": "653131",
"value": "塔什库尔干塔吉克自治县",
"label": "塔什库尔干塔吉克自治县"
}
]
},
{
"code": "653200",
"value": "和田地区",
"label": "和田地区",
"children": [
{
"code": "653201",
"value": "和田市",
"label": "和田市"
},
{
"code": "653221",
"value": "和田县",
"label": "和田县"
},
{
"code": "653222",
"value": "墨玉县",
"label": "墨玉县"
},
{
"code": "653223",
"value": "皮山县",
"label": "皮山县"
},
{
"code": "653224",
"value": "洛浦县",
"label": "洛浦县"
},
{
"code": "653225",
"value": "策勒县",
"label": "策勒县"
},
{
"code": "653226",
"value": "于田县",
"label": "于田县"
},
{
"code": "653227",
"value": "民丰县",
"label": "民丰县"
}
]
},
{
"code": "654000",
"value": "伊犁哈萨克自治州",
"label": "伊犁哈萨克自治州",
"children": [
{
"code": "654002",
"value": "伊宁市",
"label": "伊宁市"
},
{
"code": "654003",
"value": "奎屯市",
"label": "奎屯市"
},
{
"code": "654004",
"value": "霍尔果斯市",
"label": "霍尔果斯市"
},
{
"code": "654021",
"value": "伊宁县",
"label": "伊宁县"
},
{
"code": "654022",
"value": "察布查尔锡伯自治县",
"label": "察布查尔锡伯自治县"
},
{
"code": "654023",
"value": "霍城县",
"label": "霍城县"
},
{
"code": "654024",
"value": "巩留县",
"label": "巩留县"
},
{
"code": "654025",
"value": "新源县",
"label": "新源县"
},
{
"code": "654026",
"value": "昭苏县",
"label": "昭苏县"
},
{
"code": "654027",
"value": "特克斯县",
"label": "特克斯县"
},
{
"code": "654028",
"value": "尼勒克县",
"label": "尼勒克县"
}
]
},
{
"code": "654200",
"value": "塔城地区",
"label": "塔城地区",
"children": [
{
"code": "654201",
"value": "塔城市",
"label": "塔城市"
},
{
"code": "654202",
"value": "乌苏市",
"label": "乌苏市"
},
{
"code": "654221",
"value": "额敏县",
"label": "额敏县"
},
{
"code": "654223",
"value": "沙湾县",
"label": "沙湾县"
},
{
"code": "654224",
"value": "托里县",
"label": "托里县"
},
{
"code": "654225",
"value": "裕民县",
"label": "裕民县"
},
{
"code": "654226",
"value": "和布克赛尔蒙古自治县",
"label": "和布克赛尔蒙古自治县"
}
]
},
{
"code": "654300",
"value": "阿勒泰地区",
"label": "阿勒泰地区",
"children": [
{
"code": "654301",
"value": "阿勒泰市",
"label": "阿勒泰市"
},
{
"code": "654321",
"value": "布尔津县",
"label": "布尔津县"
},
{
"code": "654322",
"value": "富蕴县",
"label": "富蕴县"
},
{
"code": "654323",
"value": "福海县",
"label": "福海县"
},
{
"code": "654324",
"value": "哈巴河县",
"label": "哈巴河县"
},
{
"code": "654325",
"value": "青河县",
"label": "青河县"
},
{
"code": "654326",
"value": "吉木乃县",
"label": "吉木乃县"
}
]
}
]
},
{
"code": "710000",
"value": "台湾省",
"label": "台湾省",
"children": []
},
{
"code": "810000",
"value": "香港特别行政区",
"label": "香港特别行政区",
"children": []
},
{
"code": "820000",
"value": "澳门特别行政区",
"label": "澳门特别行政区",
"children": []
}
]
export default regionData
================================================
FILE: web/src/axios/index.js
================================================
import axios from 'axios';
import { message } from 'ant-design-vue';
axios.defaults.baseURL = import.meta.env.VITE_API_BASE_URL
const request = axios.create({
// timeout: 5000,`
headers: {
'Content-Type': 'application/json;charset=UTF-8'
}
})
request.interceptors.request.use(config => {
config.headers['uid'] = localStorage.getItem('uid')
config.headers['token'] = localStorage.getItem('token')
return config
})
request.interceptors.response.use(response => {
console.log(response)
if (response.data.code == 1) {
message.error('服务器异常!')
}
return response;
}, error => {
console.log(error)
return Promise.reject(error)
})
export default request;
================================================
FILE: web/src/components/Spot.vue
================================================
{{ title }}
================================================
FILE: web/src/main.js
================================================
import { createApp } from 'vue'
import App from './App.vue'
import Antd from 'ant-design-vue';
import 'ant-design-vue/dist/antd.less';
import router from './router/index';
import { createPinia } from 'pinia'
const pinia = createPinia()
const app = createApp(App)
app.use(Antd).use(router).use(pinia).mount('#app')
================================================
FILE: web/src/router/index.js
================================================
import { createRouter, createWebHashHistory } from 'vue-router';
import NProgress from 'nprogress';
import 'nprogress/nprogress.css';
import Index from '../views/Index.vue'
import Home from '../views/Home.vue'
import Error from '../views/Error.vue'
import Login from '../views/Login.vue'
import Register from '../views/Register.vue'
import Pass from '../views/Pass.vue'
import Dashboard from '../views/Dashboard.vue'
import Customer from '../views/Customer.vue'
import Contract from '../views/Contract.vue'
import Product from '../views/Product.vue'
import Config from '../views/Config.vue'
import Subscribe from '../views/Subscribe.vue'
import Result from '../views/Result.vue'
const routes = [
{
path: '/',
component: Index,
redirect: '/login',
children: [
{
path: '/login',
component: Login,
},
{
path: '/register',
component: Register,
},
{
path: '/pass',
component: Pass,
},
],
},
{
path: '/home',
component: Home,
redirect: '/dashboard',
children: [
{
path: '/dashboard',
name: 'dashboard',
component: Dashboard,
},
{
path: '/customer',
name: 'customer',
component: Customer,
},
{
path: '/contract',
name: 'contract',
component: Contract,
},
{
path: '/product',
name: 'product',
component: Product,
},
{
path: '/config',
name: 'config',
component: Config,
},
{
path: '/subscribe',
name: 'subscribe',
component: Subscribe,
},
{
path: '/result',
name: 'result',
component: Result,
}
],
},
{
path: '/error',
name: 'error',
component: Error,
},
]
const router = createRouter({
history: createWebHashHistory(), routes
})
NProgress.configure({ easing: 'ease', speed: 500, showSpinner: false });
router.beforeEach((to, from, next) => {
NProgress.start() // 进度条开始
next()
})
router.afterEach(() => {
NProgress.done() // 进度条结束
})
export default router;
================================================
FILE: web/src/store/index.js
================================================
import { defineStore } from 'pinia'
import { ref } from 'vue'
export const useStore = defineStore('main', () => {
const selectedKeys = ref('dashboard')
return { selectedKeys }
})
================================================
FILE: web/src/views/Config.vue
================================================
================================================
FILE: web/src/views/Contract.vue
================================================
{{ text }}
{{ text }}
已生效
未生效
添加产品
默认
{{ text }}
{{ record.total = record.price * record.count }}
删除
已选择产品:{{ data.addedProductList.length }}种 总金额:
================================================
FILE: web/src/views/Customer.vue
================================================
{{ text }}
{{ record.region + " " + record.address }}
================================================
FILE: web/src/views/Dashboard.vue
================================================
全部客户
客户数量,单位(人)
全部合同
合同数量,单位(份)
合同金额
实际完成合同金额,单位(元)
全部产品
产品数量,单位(个)
================================================
FILE: web/src/views/Error.vue
================================================
================================================
FILE: web/src/views/Home.vue
================================================
{{ item.name }}
================================================
FILE: web/src/views/Index.vue
================================================
================================================
FILE: web/src/views/Login.vue
================================================
账号登录
记住我
忘记密码?
登录
还没有账号? 立即注册
================================================
FILE: web/src/views/Pass.vue
================================================
密码重置
{{ buttonText }}
确定
已想起密码? 直接登录
================================================
FILE: web/src/views/Product.vue
================================================
================================================
FILE: web/src/views/Register.vue
================================================
账号注册
{{ buttonText }}
注册
已有账号? 直接登录
================================================
FILE: web/src/views/Result.vue
================================================
================================================
FILE: web/src/views/Subscribe.vue
================================================
基础版
免费
满足基础功能需求,永久免费
{{ item }}
免费使用
专业版
按订阅时长付费
能力不设限,新功能优先体验
{{ item }}
{{ item }}
立即购买
立即续费
专业版于 {{
expired
}} 到期
1个月
3个月
6个月
一年
两年
支付宝
微信
¥{{
subscribe.duration *
0.6
}}
================================================
FILE: web/vite.config.js
================================================
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
// https://vitejs.dev/config/
export default defineConfig({
server: {
host: '127.0.0.1',
port: 8060
},
plugins: [vue()],
css: {
preprocessorOptions: {
less: {
modifyVars: {
'primary-color': '#476FFF',
'link-color': '#476FFF',
'border-radius-base': '5px'
},
javascriptEnabled: true
}
}
},
})