|
@@ -135,25 +135,167 @@ __webpack_require__.r(__webpack_exports__);
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
"use strict";
|
|
"use strict";
|
|
|
|
+/* WEBPACK VAR INJECTION */(function(uni) {
|
|
|
|
|
|
-
|
|
|
|
|
|
+var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
|
|
Object.defineProperty(exports, "__esModule", {
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
value: true
|
|
});
|
|
});
|
|
exports.default = void 0;
|
|
exports.default = void 0;
|
|
-//
|
|
|
|
-//
|
|
|
|
-//
|
|
|
|
-//
|
|
|
|
-//
|
|
|
|
-//
|
|
|
|
|
|
+var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 30));
|
|
|
|
+var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 32));
|
|
|
|
+var upload = function upload() {
|
|
|
|
+ __webpack_require__.e(/*! require.ensure | components/upload/index */ "components/upload/index").then((function () {
|
|
|
|
+ return resolve(__webpack_require__(/*! ../../components/upload/index.vue */ 181));
|
|
|
|
+ }).bind(null, __webpack_require__)).catch(__webpack_require__.oe);
|
|
|
|
+};
|
|
var _default = {
|
|
var _default = {
|
|
|
|
+ components: {
|
|
|
|
+ upload: upload
|
|
|
|
+ },
|
|
data: function data() {
|
|
data: function data() {
|
|
- return {};
|
|
|
|
|
|
+ return {
|
|
|
|
+ user: {},
|
|
|
|
+ gender_name: '',
|
|
|
|
+ // 字典表
|
|
|
|
+ genderList: [{
|
|
|
|
+ label: '男',
|
|
|
|
+ value: '男'
|
|
|
|
+ }, {
|
|
|
|
+ label: '女',
|
|
|
|
+ value: '女'
|
|
|
|
+ }]
|
|
|
|
+ };
|
|
},
|
|
},
|
|
- methods: {}
|
|
|
|
|
|
+ onLoad: function () {
|
|
|
|
+ var _onLoad = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
|
|
+ var that;
|
|
|
|
+ return _regenerator.default.wrap(function _callee$(_context) {
|
|
|
|
+ while (1) {
|
|
|
|
+ switch (_context.prev = _context.next) {
|
|
|
|
+ case 0:
|
|
|
|
+ that = this;
|
|
|
|
+ _context.next = 3;
|
|
|
|
+ return that.search();
|
|
|
|
+ case 3:
|
|
|
|
+ case "end":
|
|
|
|
+ return _context.stop();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }, _callee, this);
|
|
|
|
+ }));
|
|
|
|
+ function onLoad() {
|
|
|
|
+ return _onLoad.apply(this, arguments);
|
|
|
|
+ }
|
|
|
|
+ return onLoad;
|
|
|
|
+ }(),
|
|
|
|
+ onShow: function () {
|
|
|
|
+ var _onShow = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(e) {
|
|
|
|
+ var that;
|
|
|
|
+ return _regenerator.default.wrap(function _callee2$(_context2) {
|
|
|
|
+ while (1) {
|
|
|
|
+ switch (_context2.prev = _context2.next) {
|
|
|
|
+ case 0:
|
|
|
|
+ that = this;
|
|
|
|
+ that.searchToken();
|
|
|
|
+ case 2:
|
|
|
|
+ case "end":
|
|
|
|
+ return _context2.stop();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }, _callee2, this);
|
|
|
|
+ }));
|
|
|
|
+ function onShow(_x) {
|
|
|
|
+ return _onShow.apply(this, arguments);
|
|
|
|
+ }
|
|
|
|
+ return onShow;
|
|
|
|
+ }(),
|
|
|
|
+ methods: {
|
|
|
|
+ searchToken: function searchToken() {
|
|
|
|
+ var that = this;
|
|
|
|
+ try {
|
|
|
|
+ var res = uni.getStorageSync('token');
|
|
|
|
+ if (res) that.$set(that, "user", res);
|
|
|
|
+ } catch (e) {
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: err.errmsg,
|
|
|
|
+ icon: 'error',
|
|
|
|
+ duration: 2000
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ // 查询
|
|
|
|
+ search: function search() {
|
|
|
|
+ var _this = this;
|
|
|
|
+ return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
|
|
|
|
+ var that;
|
|
|
|
+ return _regenerator.default.wrap(function _callee3$(_context3) {
|
|
|
|
+ while (1) {
|
|
|
|
+ switch (_context3.prev = _context3.next) {
|
|
|
|
+ case 0:
|
|
|
|
+ that = _this;
|
|
|
|
+ case 1:
|
|
|
|
+ case "end":
|
|
|
|
+ return _context3.stop();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }, _callee3);
|
|
|
|
+ }))();
|
|
|
|
+ },
|
|
|
|
+ // 图片上传
|
|
|
|
+ uplSuc: function uplSuc(e) {
|
|
|
|
+ var that = this;
|
|
|
|
+ that.$set(that.user, "icon", [e.data]);
|
|
|
|
+ },
|
|
|
|
+ // 图片删除
|
|
|
|
+ uplDel: function uplDel(e) {
|
|
|
|
+ var that = this;
|
|
|
|
+ that.$set(that.user, "icon", []);
|
|
|
|
+ },
|
|
|
|
+ // 性别选择
|
|
|
|
+ genderChange: function genderChange(e) {
|
|
|
|
+ var that = this;
|
|
|
|
+ var data = that.genderList[e.detail.value];
|
|
|
|
+ if (data) that.$set(that.user, "gender", data.value);
|
|
|
|
+ },
|
|
|
|
+ // 保存
|
|
|
|
+ onSubmit: function onSubmit() {
|
|
|
|
+ var _this2 = this;
|
|
|
|
+ return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4() {
|
|
|
|
+ var that, form, res;
|
|
|
|
+ return _regenerator.default.wrap(function _callee4$(_context4) {
|
|
|
|
+ while (1) {
|
|
|
|
+ switch (_context4.prev = _context4.next) {
|
|
|
|
+ case 0:
|
|
|
|
+ that = _this2;
|
|
|
|
+ form = that.user;
|
|
|
|
+ _context4.next = 4;
|
|
|
|
+ return that.$api("/doctor/".concat(form._id), 'POST', form);
|
|
|
|
+ case 4:
|
|
|
|
+ res = _context4.sent;
|
|
|
|
+ if (res.errcode == '0') {
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: '维护信息成功',
|
|
|
|
+ icon: 'none'
|
|
|
|
+ });
|
|
|
|
+ } else {
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: res.errmsg,
|
|
|
|
+ icon: 'none'
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ case 6:
|
|
|
|
+ case "end":
|
|
|
|
+ return _context4.stop();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }, _callee4);
|
|
|
|
+ }))();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
};
|
|
};
|
|
exports.default = _default;
|
|
exports.default = _default;
|
|
|
|
+/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
|
|
|
|
|
|
/***/ }),
|
|
/***/ }),
|
|
|
|
|