|
@@ -98,10 +98,51 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "recyclableRender", function() { return recyclableRender; });
|
|
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "components", function() { return components; });
|
|
|
var components
|
|
|
+try {
|
|
|
+ components = {
|
|
|
+ uniForms: function () {
|
|
|
+ return Promise.all(/*! import() | uni_modules/uni-forms/components/uni-forms/uni-forms */[__webpack_require__.e("common/vendor"), __webpack_require__.e("uni_modules/uni-forms/components/uni-forms/uni-forms")]).then(__webpack_require__.bind(null, /*! @/uni_modules/uni-forms/components/uni-forms/uni-forms.vue */ 341))
|
|
|
+ },
|
|
|
+ uniFormsItem: function () {
|
|
|
+ return __webpack_require__.e(/*! import() | uni_modules/uni-forms/components/uni-forms-item/uni-forms-item */ "uni_modules/uni-forms/components/uni-forms-item/uni-forms-item").then(__webpack_require__.bind(null, /*! @/uni_modules/uni-forms/components/uni-forms-item/uni-forms-item.vue */ 354))
|
|
|
+ },
|
|
|
+ uniDataCheckbox: function () {
|
|
|
+ return Promise.all(/*! import() | uni_modules/uni-data-checkbox/components/uni-data-checkbox/uni-data-checkbox */[__webpack_require__.e("common/vendor"), __webpack_require__.e("uni_modules/uni-data-checkbox/components/uni-data-checkbox/uni-data-checkbox")]).then(__webpack_require__.bind(null, /*! @/uni_modules/uni-data-checkbox/components/uni-data-checkbox/uni-data-checkbox.vue */ 368))
|
|
|
+ },
|
|
|
+ uniEasyinput: function () {
|
|
|
+ return __webpack_require__.e(/*! import() | uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput */ "uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput").then(__webpack_require__.bind(null, /*! @/uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.vue */ 361))
|
|
|
+ },
|
|
|
+ }
|
|
|
+} catch (e) {
|
|
|
+ if (
|
|
|
+ e.message.indexOf("Cannot find module") !== -1 &&
|
|
|
+ e.message.indexOf(".vue") !== -1
|
|
|
+ ) {
|
|
|
+ console.error(e.message)
|
|
|
+ console.error("1. 排查组件名称拼写是否正确")
|
|
|
+ console.error(
|
|
|
+ "2. 排查组件是否符合 easycom 规范,文档:https://uniapp.dcloud.net.cn/collocation/pages?id=easycom"
|
|
|
+ )
|
|
|
+ console.error(
|
|
|
+ "3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件"
|
|
|
+ )
|
|
|
+ } else {
|
|
|
+ throw e
|
|
|
+ }
|
|
|
+}
|
|
|
var render = function () {
|
|
|
var _vm = this
|
|
|
var _h = _vm.$createElement
|
|
|
var _c = _vm._self._c || _h
|
|
|
+ var g0 = _vm.payForm.img_url && _vm.payForm.img_url.length > 0
|
|
|
+ _vm.$mp.data = Object.assign(
|
|
|
+ {},
|
|
|
+ {
|
|
|
+ $root: {
|
|
|
+ g0: g0,
|
|
|
+ },
|
|
|
+ }
|
|
|
+ )
|
|
|
}
|
|
|
var recyclableRender = false
|
|
|
var staticRenderFns = []
|
|
@@ -143,44 +184,27 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
});
|
|
|
exports.default = void 0;
|
|
|
var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 35));
|
|
|
+var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ 18));
|
|
|
var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 37));
|
|
|
-//
|
|
|
-//
|
|
|
-//
|
|
|
-//
|
|
|
-//
|
|
|
-//
|
|
|
-//
|
|
|
-//
|
|
|
-//
|
|
|
-//
|
|
|
-//
|
|
|
-//
|
|
|
-//
|
|
|
-//
|
|
|
-//
|
|
|
-//
|
|
|
-//
|
|
|
-//
|
|
|
-//
|
|
|
-//
|
|
|
-//
|
|
|
-//
|
|
|
-//
|
|
|
-//
|
|
|
-//
|
|
|
-//
|
|
|
-//
|
|
|
-//
|
|
|
-//
|
|
|
-//
|
|
|
-//
|
|
|
-//
|
|
|
-//
|
|
|
-//
|
|
|
+var cDrawer = function cDrawer() {
|
|
|
+ __webpack_require__.e(/*! require.ensure | pagesAccount/components/c-drawer */ "pagesAccount/components/c-drawer").then((function () {
|
|
|
+ return resolve(__webpack_require__(/*! ../components/c-drawer.vue */ 460));
|
|
|
+ }).bind(null, __webpack_require__)).catch(__webpack_require__.oe);
|
|
|
+};
|
|
|
+var upload = function upload() {
|
|
|
+ Promise.all(/*! require.ensure | components/upload/index */[__webpack_require__.e("common/vendor"), __webpack_require__.e("components/upload/index")]).then((function () {
|
|
|
+ return resolve(__webpack_require__(/*! @/components/upload/index.vue */ 319));
|
|
|
+ }).bind(null, __webpack_require__)).catch(__webpack_require__.oe);
|
|
|
+};
|
|
|
var _default = {
|
|
|
+ components: {
|
|
|
+ cDrawer: cDrawer,
|
|
|
+ upload: upload
|
|
|
+ },
|
|
|
data: function data() {
|
|
|
return {
|
|
|
+ // 基本信息
|
|
|
+ basicInfo: {},
|
|
|
// 用户信息
|
|
|
userInfo: {},
|
|
|
// vip信息
|
|
@@ -192,17 +216,73 @@ var _default = {
|
|
|
// 用戶协议
|
|
|
agree: true,
|
|
|
// 修改用户信息
|
|
|
- updateUser: {}
|
|
|
+ updateUser: {},
|
|
|
+ // 抽屉
|
|
|
+ drawer: {
|
|
|
+ title: '支付',
|
|
|
+ show: false,
|
|
|
+ mode: 'right'
|
|
|
+ },
|
|
|
+ // 支付信息
|
|
|
+ payForm: {
|
|
|
+ type: '0',
|
|
|
+ img_url: [],
|
|
|
+ pay_url: []
|
|
|
+ },
|
|
|
+ rules: {
|
|
|
+ pay_no: {
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ errorMessage: '请输入转账单号/订单号'
|
|
|
+ }]
|
|
|
+ },
|
|
|
+ pay_url: {
|
|
|
+ rules: [{
|
|
|
+ required: false,
|
|
|
+ errorMessage: '请上传支付账单明细截图'
|
|
|
+ }]
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 支付方式
|
|
|
+ typeList: [{
|
|
|
+ "value": 0,
|
|
|
+ "text": "微信"
|
|
|
+ }, {
|
|
|
+ "value": 1,
|
|
|
+ "text": "支付宝"
|
|
|
+ }]
|
|
|
};
|
|
|
},
|
|
|
onLoad: function onLoad() {
|
|
|
var that = this;
|
|
|
+ // 查询基本信息
|
|
|
+ that.searchBasic();
|
|
|
// 查询用户信息
|
|
|
that.searchUser();
|
|
|
// 查询其他信息
|
|
|
that.searchOther();
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 查询基本信息
|
|
|
+ searchBasic: function searchBasic() {
|
|
|
+ var that = this;
|
|
|
+ uni.getStorage({
|
|
|
+ key: 'basicInfo',
|
|
|
+ success: function success(res) {
|
|
|
+ var data = res.data;
|
|
|
+ data.account_btn = data.account_btn.sort(function (a, b) {
|
|
|
+ return a.sort - b.sort;
|
|
|
+ });
|
|
|
+ that.$set(that, "basicInfo", data);
|
|
|
+ // 支付方式默认值
|
|
|
+ that.typeChange({
|
|
|
+ detail: {
|
|
|
+ value: '0'
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
// 查询用户信息
|
|
|
searchUser: function searchUser() {
|
|
|
var that = this;
|
|
@@ -304,52 +384,76 @@ var _default = {
|
|
|
}
|
|
|
},
|
|
|
// 支付
|
|
|
- oneBuy: function oneBuy(e) {
|
|
|
+ oneBuy: function oneBuy() {
|
|
|
var that = this;
|
|
|
- // uni.requestPayment--支付
|
|
|
- uni.showModal({
|
|
|
+ that.$set(that, "drawer", {
|
|
|
title: '支付',
|
|
|
- content: "\u60A8\u786E\u8BA4\u8981\u652F\u4ED8".concat(e.money, "\u5143\u5417\uFF1F"),
|
|
|
- success: function success(res) {
|
|
|
- if (res.confirm) {
|
|
|
- console.log('确认支付');
|
|
|
- that.toPay(e);
|
|
|
- } else if (res.cancel) {
|
|
|
- console.log('取消支付');
|
|
|
- }
|
|
|
- }
|
|
|
+ show: true,
|
|
|
+ mode: 'right'
|
|
|
+ });
|
|
|
+ },
|
|
|
+ typeChange: function typeChange(e) {
|
|
|
+ var that = this;
|
|
|
+ var basicInfo = that.basicInfo;
|
|
|
+ var value = e.detail.value;
|
|
|
+ if (value == '0') that.$set(that.payForm, "img_url", basicInfo.pay_info.wx_url);else if (value == '1') that.$set(that.payForm, "img_url", basicInfo.pay_info.zfb_url);
|
|
|
+ },
|
|
|
+ // 图片保存
|
|
|
+ uplSuc: function uplSuc(e) {
|
|
|
+ var that = this;
|
|
|
+ that.$set(that.payForm, "".concat(e.name), [].concat((0, _toConsumableArray2.default)(that.payForm[e.name]), [e.data]));
|
|
|
+ },
|
|
|
+ // 图片删除
|
|
|
+ uplDel: function uplDel(e) {
|
|
|
+ var that = this;
|
|
|
+ var data = that.payForm[e.name];
|
|
|
+ var arr = data.filter(function (i, index) {
|
|
|
+ return index != e.data.index;
|
|
|
+ });
|
|
|
+ that.$set(that.payForm, "".concat(e.name), arr);
|
|
|
+ },
|
|
|
+ // 提交保存
|
|
|
+ toSave: function toSave() {
|
|
|
+ var that = this;
|
|
|
+ that.$refs.payForm.validate().then(function (res) {
|
|
|
+ that.toPay();
|
|
|
+ }).catch(function (err) {
|
|
|
+ console.log('表单错误信息:', err);
|
|
|
});
|
|
|
},
|
|
|
// 确认支付
|
|
|
- toPay: function toPay(e) {
|
|
|
+ toPay: function toPay() {
|
|
|
var _this = this;
|
|
|
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
|
|
|
- var that, updateUser, form, res;
|
|
|
+ var that, updateUser, form, payForm, object, res;
|
|
|
return _regenerator.default.wrap(function _callee2$(_context2) {
|
|
|
while (1) {
|
|
|
switch (_context2.prev = _context2.next) {
|
|
|
case 0:
|
|
|
that = _this; // 支付成功-修改个人信息,创建支付记录
|
|
|
updateUser = that.updateUser;
|
|
|
- form = {
|
|
|
+ form = that.form;
|
|
|
+ payForm = that.payForm;
|
|
|
+ object = {
|
|
|
user_id: that.userInfo._id,
|
|
|
user_name: that.userInfo.nick_name,
|
|
|
money_no: 'NO' + that.$moment().valueOf(),
|
|
|
type: 'VIP',
|
|
|
create_time: that.$moment().format('YYYY-MM-DD HH:mm:ss'),
|
|
|
- money: e.money
|
|
|
+ money: form.money,
|
|
|
+ pay_no: payForm.pay_no
|
|
|
};
|
|
|
- _context2.next = 5;
|
|
|
+ _context2.next = 7;
|
|
|
return that.$api("user/".concat(updateUser.id), 'POST', updateUser);
|
|
|
- case 5:
|
|
|
+ case 7:
|
|
|
res = _context2.sent;
|
|
|
if (!(res.errcode == '0')) {
|
|
|
- _context2.next = 11;
|
|
|
+ _context2.next = 13;
|
|
|
break;
|
|
|
}
|
|
|
- _context2.next = 9;
|
|
|
- return that.$api('moneylog', 'POST', form);
|
|
|
- case 9:
|
|
|
+ _context2.next = 11;
|
|
|
+ return that.$api('moneylog', 'POST', object);
|
|
|
+ case 11:
|
|
|
res = _context2.sent;
|
|
|
if (res.errcode == '0') {
|
|
|
uni.showToast({
|
|
@@ -363,7 +467,7 @@ var _default = {
|
|
|
icon: 'error'
|
|
|
});
|
|
|
}
|
|
|
- case 11:
|
|
|
+ case 13:
|
|
|
case "end":
|
|
|
return _context2.stop();
|
|
|
}
|
|
@@ -371,6 +475,15 @@ var _default = {
|
|
|
}, _callee2);
|
|
|
}))();
|
|
|
},
|
|
|
+ // 关闭弹框
|
|
|
+ toClose: function toClose() {
|
|
|
+ var that = this;
|
|
|
+ that.$set(that, "drawer", {
|
|
|
+ title: '支付',
|
|
|
+ show: false,
|
|
|
+ mode: 'right'
|
|
|
+ });
|
|
|
+ },
|
|
|
// 同意隐私协议
|
|
|
changeAgree: function changeAgree() {
|
|
|
var that = this;
|
|
@@ -409,17 +522,36 @@ var _default = {
|
|
|
money: res.data[0].money,
|
|
|
days: res.data[0].days
|
|
|
};
|
|
|
- console.log(form);
|
|
|
that.$set(that, "form", form);
|
|
|
}
|
|
|
}
|
|
|
- case 5:
|
|
|
+ // 支付方式
|
|
|
+ _context3.next = 7;
|
|
|
+ return that.$api('dictdata', 'GET', {
|
|
|
+ type: 'app_pay_type'
|
|
|
+ });
|
|
|
+ case 7:
|
|
|
+ res = _context3.sent;
|
|
|
+ if (res.errcode == '0') {
|
|
|
+ that.$set(that, "typeList", res.data);
|
|
|
+ }
|
|
|
+ case 9:
|
|
|
case "end":
|
|
|
return _context3.stop();
|
|
|
}
|
|
|
}
|
|
|
}, _callee3);
|
|
|
}))();
|
|
|
+ },
|
|
|
+ // 图片预览
|
|
|
+ imgView: function imgView(e) {
|
|
|
+ var that = this;
|
|
|
+ console.log(e);
|
|
|
+ console.log(e[0].url);
|
|
|
+ uni.previewImage({
|
|
|
+ current: 0,
|
|
|
+ urls: [e[0].url]
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
};
|