1. 同步最新 SQL

2. 生成内嵌的页面
pull/2/head
YunaiV 2022-04-30 00:06:49 +08:00
parent 577109cd9c
commit 2367280d83
19 changed files with 1268 additions and 391 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -56,7 +56,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/interopRequireDefault.js */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\").default;\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.replace.js */ \"./node_modules/core-js/modules/es.string.replace.js\");\n\nvar _objectSpread2 = _interopRequireDefault(__webpack_require__(/*! ./node_modules/@babel/runtime/helpers/objectSpread2.js */ \"./node_modules/@babel/runtime/helpers/objectSpread2.js\"));\n\nvar _constants = __webpack_require__(/*! @/utils/constants */ \"./src/utils/constants.js\");\n\nvar _login = __webpack_require__(/*! @/api/login */ \"./src/api/login.js\");\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nvar _default = {\n props: {\n user: {\n type: Object\n },\n getUser: {\n // 刷新用户\n type: Function\n },\n setActiveTab: {\n // 设置激活的\n type: Function\n }\n },\n data: function data() {\n return {};\n },\n computed: {\n socialUsers: function socialUsers() {\n var socialUsers = [];\n\n for (var i in _constants.SystemUserSocialTypeEnum) {\n var socialUser = (0, _objectSpread2.default)({}, _constants.SystemUserSocialTypeEnum[i]);\n socialUsers.push(socialUser);\n\n if (this.user.socialUsers) {\n for (var j in this.user.socialUsers) {\n if (socialUser.type === this.user.socialUsers[j].type) {\n socialUser.unionId = this.user.socialUsers[j].unionId;\n break;\n }\n }\n }\n }\n\n return socialUsers;\n }\n },\n created: function created() {\n var _this = this;\n\n // 社交绑定\n var type = this.$route.query.type;\n var code = this.$route.query.code;\n var state = this.$route.query.state;\n\n if (!code) {\n return;\n }\n\n (0, _login.socialBind)(type, code, state).then(function (resp) {\n _this.$modal.msgSuccess(\"绑定成功\");\n\n _this.$router.replace('/user/profile'); // 调用父组件, 刷新\n\n\n _this.getUser();\n\n _this.setActiveTab('userSocial');\n });\n },\n methods: {\n bind: function bind(socialUser) {\n // 计算 redirectUri\n var redirectUri = location.origin + '/user/profile?type=' + socialUser.type; // 进行跳转\n\n (0, _login.socialAuthRedirect)(socialUser.type, encodeURIComponent(redirectUri)).then(function (res) {\n // console.log(res.url);\n window.location.href = res.data;\n });\n },\n unbind: function unbind(socialUser) {\n var _this2 = this;\n\n (0, _login.socialUnbind)(socialUser.type, socialUser.unionId).then(function (resp) {\n _this2.$modal.msgSuccess(\"解绑成功\");\n\n socialUser.unionId = undefined;\n });\n },\n close: function close() {\n this.$tab.closePage();\n }\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./src/views/system/user/profile/userSocial.vue?./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options");
eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/interopRequireDefault.js */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\").default;\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.replace.js */ \"./node_modules/core-js/modules/es.string.replace.js\");\n\nvar _objectSpread2 = _interopRequireDefault(__webpack_require__(/*! ./node_modules/@babel/runtime/helpers/objectSpread2.js */ \"./node_modules/@babel/runtime/helpers/objectSpread2.js\"));\n\nvar _constants = __webpack_require__(/*! @/utils/constants */ \"./src/utils/constants.js\");\n\nvar _login = __webpack_require__(/*! @/api/login */ \"./src/api/login.js\");\n\nvar _socialUser = __webpack_require__(/*! @/api/system/socialUser */ \"./src/api/system/socialUser.js\");\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nvar _default = {\n props: {\n user: {\n type: Object\n },\n getUser: {\n // 刷新用户\n type: Function\n },\n setActiveTab: {\n // 设置激活的\n type: Function\n }\n },\n data: function data() {\n return {};\n },\n computed: {\n socialUsers: function socialUsers() {\n var socialUsers = [];\n\n for (var i in _constants.SystemUserSocialTypeEnum) {\n var socialUser = (0, _objectSpread2.default)({}, _constants.SystemUserSocialTypeEnum[i]);\n socialUsers.push(socialUser);\n\n if (this.user.socialUsers) {\n for (var j in this.user.socialUsers) {\n if (socialUser.type === this.user.socialUsers[j].type) {\n socialUser.openid = this.user.socialUsers[j].openid;\n break;\n }\n }\n }\n }\n\n return socialUsers;\n }\n },\n created: function created() {\n var _this = this;\n\n // 社交绑定\n var type = this.$route.query.type;\n var code = this.$route.query.code;\n var state = this.$route.query.state;\n\n if (!code) {\n return;\n }\n\n (0, _socialUser.socialBind)(type, code, state).then(function (resp) {\n _this.$modal.msgSuccess(\"绑定成功\");\n\n _this.$router.replace('/user/profile'); // 调用父组件, 刷新\n\n\n _this.getUser();\n\n _this.setActiveTab('userSocial');\n });\n },\n methods: {\n bind: function bind(socialUser) {\n // 计算 redirectUri\n var redirectUri = location.origin + '/user/profile?type=' + socialUser.type; // 进行跳转\n\n (0, _login.socialAuthRedirect)(socialUser.type, encodeURIComponent(redirectUri)).then(function (res) {\n // console.log(res.url);\n window.location.href = res.data;\n });\n },\n unbind: function unbind(socialUser) {\n var _this2 = this;\n\n (0, _socialUser.socialUnbind)(socialUser.type, socialUser.openid).then(function (resp) {\n _this2.$modal.msgSuccess(\"解绑成功\");\n\n socialUser.openid = undefined;\n });\n },\n close: function close() {\n this.$tab.closePage();\n }\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./src/views/system/user/profile/userSocial.vue?./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options");
/***/ }),
@ -116,7 +116,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return render; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return staticRenderFns; });\nvar render = function () {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"el-table\",\n { attrs: { data: _vm.socialUsers, \"show-header\": false } },\n [\n _c(\"el-table-column\", {\n attrs: { label: \"社交平台\", align: \"left\", width: \"120\" },\n scopedSlots: _vm._u([\n {\n key: \"default\",\n fn: function (scope) {\n return [\n _c(\"img\", {\n staticStyle: { height: \"20px\", \"vertical-align\": \"middle\" },\n attrs: { src: scope.row.img },\n }),\n _vm._v(\" \" + _vm._s(scope.row.title) + \" \"),\n ]\n },\n },\n ]),\n }),\n _c(\"el-table-column\", {\n attrs: { label: \"操作\", align: \"left\" },\n scopedSlots: _vm._u([\n {\n key: \"default\",\n fn: function (scope) {\n return [\n scope.row.unionId\n ? _c(\n \"div\",\n [\n _vm._v(\" 已绑定 \"),\n _c(\n \"el-button\",\n {\n attrs: { size: \"large\", type: \"text\" },\n on: {\n click: function ($event) {\n return _vm.unbind(scope.row)\n },\n },\n },\n [_vm._v(\"(解绑)\")]\n ),\n ],\n 1\n )\n : _c(\n \"div\",\n [\n _vm._v(\" 未绑定 \"),\n _c(\n \"el-button\",\n {\n attrs: { size: \"large\", type: \"text\" },\n on: {\n click: function ($event) {\n return _vm.bind(scope.row)\n },\n },\n },\n [_vm._v(\"(绑定)\")]\n ),\n ],\n 1\n ),\n ]\n },\n },\n ]),\n }),\n ],\n 1\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\n\n\n//# sourceURL=webpack:///./src/views/system/user/profile/userSocial.vue?./node_modules/cache-loader/dist/cjs.js?%7B%22cacheDirectory%22:%22node_modules/.cache/vue-loader%22,%22cacheIdentifier%22:%22f587f70a-vue-loader-template%22%7D!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options");
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return render; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return staticRenderFns; });\nvar render = function () {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"el-table\",\n { attrs: { data: _vm.socialUsers, \"show-header\": false } },\n [\n _c(\"el-table-column\", {\n attrs: { label: \"社交平台\", align: \"left\", width: \"120\" },\n scopedSlots: _vm._u([\n {\n key: \"default\",\n fn: function (scope) {\n return [\n _c(\"img\", {\n staticStyle: { height: \"20px\", \"vertical-align\": \"middle\" },\n attrs: { src: scope.row.img },\n }),\n _vm._v(\" \" + _vm._s(scope.row.title) + \" \"),\n ]\n },\n },\n ]),\n }),\n _c(\"el-table-column\", {\n attrs: { label: \"操作\", align: \"left\" },\n scopedSlots: _vm._u([\n {\n key: \"default\",\n fn: function (scope) {\n return [\n scope.row.openid\n ? _c(\n \"div\",\n [\n _vm._v(\" 已绑定 \"),\n _c(\n \"el-button\",\n {\n attrs: { size: \"large\", type: \"text\" },\n on: {\n click: function ($event) {\n return _vm.unbind(scope.row)\n },\n },\n },\n [_vm._v(\"(解绑)\")]\n ),\n ],\n 1\n )\n : _c(\n \"div\",\n [\n _vm._v(\" 未绑定 \"),\n _c(\n \"el-button\",\n {\n attrs: { size: \"large\", type: \"text\" },\n on: {\n click: function ($event) {\n return _vm.bind(scope.row)\n },\n },\n },\n [_vm._v(\"(绑定)\")]\n ),\n ],\n 1\n ),\n ]\n },\n },\n ]),\n }),\n ],\n 1\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\n\n\n//# sourceURL=webpack:///./src/views/system/user/profile/userSocial.vue?./node_modules/cache-loader/dist/cjs.js?%7B%22cacheDirectory%22:%22node_modules/.cache/vue-loader%22,%22cacheIdentifier%22:%22f587f70a-vue-loader-template%22%7D!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options");
/***/ }),
@ -153,6 +153,18 @@ eval("// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// lo
/***/ }),
/***/ "./src/api/system/socialUser.js":
/*!**************************************!*\
!*** ./src/api/system/socialUser.js ***!
\**************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/interopRequireDefault.js */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\").default;\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.socialBind = socialBind;\nexports.socialUnbind = socialUnbind;\n\nvar _request = _interopRequireDefault(__webpack_require__(/*! @/utils/request */ \"./src/utils/request.js\"));\n\n// 社交绑定,使用 code 授权码\nfunction socialBind(type, code, state) {\n return (0, _request.default)({\n url: '/system/social-user/bind',\n method: 'post',\n data: {\n type: type,\n code: code,\n state: state\n }\n });\n} // 取消社交绑定\n\n\nfunction socialUnbind(type, openid) {\n return (0, _request.default)({\n url: '/system/social-user/unbind',\n method: 'delete',\n data: {\n type: type,\n openid: openid\n }\n });\n}\n\n//# sourceURL=webpack:///./src/api/system/socialUser.js?");
/***/ }),
/***/ "./src/api/system/user.js":
/*!********************************!*\
!*** ./src/api/system/user.js ***!

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long