From 1fb1e9e3321102d23997551be7a5ad7d91b74015 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期四, 17 七月 2025 15:28:25 +0800
Subject: [PATCH] 对接口,新建富文本页面
---
small-program/unpackage/dist/dev/mp-weixin/pages/sorting/sorting.js | 296 +++++++++++++++++++++++++++++++++++++---------------------
1 files changed, 189 insertions(+), 107 deletions(-)
diff --git a/small-program/unpackage/dist/dev/mp-weixin/pages/sorting/sorting.js b/small-program/unpackage/dist/dev/mp-weixin/pages/sorting/sorting.js
index 84454bf..760a45d 100644
--- a/small-program/unpackage/dist/dev/mp-weixin/pages/sorting/sorting.js
+++ b/small-program/unpackage/dist/dev/mp-weixin/pages/sorting/sorting.js
@@ -105,6 +105,12 @@
uIcon: function () {
return Promise.all(/*! import() | node-modules/uview-ui/components/u-icon/u-icon */[__webpack_require__.e("common/vendor"), __webpack_require__.e("node-modules/uview-ui/components/u-icon/u-icon")]).then(__webpack_require__.bind(null, /*! uview-ui/components/u-icon/u-icon.vue */ 379))
},
+ uCalendar: function () {
+ return Promise.all(/*! import() | node-modules/uview-ui/components/u-calendar/u-calendar */[__webpack_require__.e("common/vendor"), __webpack_require__.e("node-modules/uview-ui/components/u-calendar/u-calendar")]).then(__webpack_require__.bind(null, /*! uview-ui/components/u-calendar/u-calendar.vue */ 542))
+ },
+ uPicker: function () {
+ return Promise.all(/*! import() | node-modules/uview-ui/components/u-picker/u-picker */[__webpack_require__.e("common/vendor"), __webpack_require__.e("node-modules/uview-ui/components/u-picker/u-picker")]).then(__webpack_require__.bind(null, /*! uview-ui/components/u-picker/u-picker.vue */ 581))
+ },
}
} catch (e) {
if (
@@ -127,6 +133,30 @@
var _vm = this
var _h = _vm.$createElement
var _c = _vm._self._c || _h
+ if (!_vm._isMounted) {
+ _vm.e0 = function ($event) {
+ _vm.show = true
+ }
+ _vm.e1 = function ($event) {
+ _vm.show1 = true
+ }
+ _vm.e2 = function ($event, index) {
+ var _temp = arguments[arguments.length - 1].currentTarget.dataset,
+ _temp2 = _temp.eventParams || _temp["event-params"],
+ index = _temp2.index
+ var _temp, _temp2
+ return _vm.form.multifileList.splice(index, 1)
+ }
+ _vm.e3 = function ($event) {
+ _vm.viewStatus = !_vm.viewStatus
+ }
+ _vm.e4 = function ($event) {
+ _vm.show = false
+ }
+ _vm.e5 = function ($event) {
+ _vm.show1 = false
+ }
+ }
}
var recyclableRender = false
var staticRenderFns = []
@@ -160,123 +190,175 @@
/***/ (function(module, exports, __webpack_require__) {
"use strict";
+/* WEBPACK VAR INJECTION */(function(uni) {
-
+var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
+var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
+var _vuex = __webpack_require__(/*! vuex */ 33);
+function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
+function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
var _default = {
+ computed: _objectSpread(_objectSpread({}, (0, _vuex.mapState)(['userInfo'])), {}, {
+ totalPrice: function totalPrice() {
+ return this.form.estimatedAccount / 100;
+ }
+ }),
data: function data() {
- return {};
+ return {
+ show: false,
+ show1: false,
+ form: {
+ days: '',
+ startDate: '',
+ endDate: '',
+ lat: '',
+ lgt: '',
+ location: '',
+ workType: 0,
+ locationRemark: '',
+ categoryId: '',
+ categoryName: '',
+ priceNum1: '',
+ priceNum2: '',
+ price: '',
+ supplement: '',
+ multifileList: [],
+ linkName: '',
+ linkPhone: '',
+ priceUnit: '鍏�/浜�/澶�',
+ estimatedAccount: '',
+ type: 0
+ },
+ cateList: [],
+ viewStatus: false
+ };
+ },
+ onLoad: function onLoad(option) {
+ this.form.linkPhone = this.userInfo.telephone;
+ this.form.priceNum1 = option.days;
+ this.form.startDate = option.startDate;
+ this.form.endDate = option.endDate;
+ this.form.lat = option.latitude;
+ this.form.lgt = option.longitude;
+ this.form.location = option.address;
+ this.form.workType = option.workType;
+ this.getCateList();
+ },
+ methods: {
+ // 鎻愪氦璁㈠崟
+ submit: function submit() {
+ if (!this.form.categoryId) {
+ return uni.showToast({
+ title: '璇烽�夋嫨鍒嗘嫞鍝佺',
+ icon: 'none'
+ });
+ }
+ if (!this.form.priceNum2) {
+ return uni.showToast({
+ title: '璇疯緭鍏ョ敤宸ユ暟閲�',
+ icon: 'none'
+ });
+ }
+ if (!this.form.price) {
+ return uni.showToast({
+ title: '璇疯緭鍏ヨ垂鐢ㄦ爣鍑�',
+ icon: 'none'
+ });
+ }
+ if (!this.form.linkPhone) {
+ return uni.showToast({
+ title: '璇疯緭鍏ヨ仈绯荤數璇�',
+ icon: 'none'
+ });
+ }
+ this.$u.api.release(_objectSpread(_objectSpread({}, this.form), {}, {
+ price: Number(this.form.price) * 100
+ })).then(function (res) {
+ if (res.code == 200) {
+ uni.navigateTo({
+ url: "/pages/success/success?orderId=".concat(res.data)
+ });
+ }
+ });
+ },
+ // 璁$畻閲戦
+ getPrice: function getPrice() {
+ var _this = this;
+ if (this.form.price && this.form.priceNum1 && this.form.priceNum2) {
+ this.$u.api.getTotal({
+ price: Number(this.form.price) * 100,
+ priceUnit: this.form.priceUnit,
+ priceNum1: this.form.priceNum1,
+ priceNum2: this.form.priceNum2,
+ type: this.form.type,
+ workType: this.form.workType
+ }).then(function (res) {
+ _this.form.estimatedAccount = res.data;
+ });
+ }
+ },
+ confirmDate: function confirmDate(e) {
+ this.form.startDate = e[0];
+ this.form.endDate = e[e.length - 1];
+ this.form.days = e.length;
+ this.show = false;
+ },
+ selectAddress: function selectAddress() {
+ var _this2 = this;
+ uni.chooseLocation({
+ success: function success(res) {
+ _this2.form.lat = res.latitude;
+ _this2.form.lgt = res.longitude;
+ _this2.form.address = res.address;
+ }
+ });
+ },
+ confirmCategary: function confirmCategary(e) {
+ this.form.categoryId = e.value[0].id;
+ this.form.categoryName = e.value[0].name;
+ this.show1 = false;
+ },
+ getCateList: function getCateList() {
+ var _this3 = this;
+ this.$u.api.getCategoryList({
+ type: 0
+ }).then(function (res) {
+ _this3.cateList = [res.data];
+ });
+ },
+ uploadImg: function uploadImg() {
+ var _this4 = this;
+ uni.chooseImage({
+ success: function success(chooseImageRes) {
+ var tempFilePaths = chooseImageRes.tempFilePaths;
+ uni.uploadFile({
+ url: _this4.$baseUrl + '/web/public/upload',
+ filePath: tempFilePaths[0],
+ name: 'file',
+ formData: {
+ 'folder': 'orders'
+ },
+ success: function success(uploadFileRes) {
+ var res = JSON.parse(uploadFileRes.data);
+ _this4.form.multifileList.push({
+ fileurl: res.data.imgaddr,
+ name: res.data.originname,
+ url: res.data.url,
+ type: 0
+ });
+ }
+ });
+ }
+ });
+ }
}
};
exports.default = _default;
+/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
/***/ }),
--
Gitblit v1.9.3