|
|
@@ -3,7 +3,7 @@
|
|
|
<view class="supplyInfo">
|
|
|
<view class="update_photo">
|
|
|
<view>问题说明:</view>
|
|
|
- <textarea v-model="supplyInfo.msg" class="area card"
|
|
|
+ <textarea v-model="content" class="area card"
|
|
|
minlength="5" placeholder="您反映的内容要体现一下几个重点信息:事情有关的地址,具体事情概述以及您的期望是什么?内容不少于5个字。"></textarea>
|
|
|
</view>
|
|
|
<view class="update_photo">
|
|
|
@@ -41,11 +41,11 @@
|
|
|
</view>
|
|
|
<view class="tel flex">
|
|
|
<label>联系人:</label>
|
|
|
- <input type="text" class="card input" v-model="company.tel" />
|
|
|
+ <input type="text" class="card input" v-model="supplyInfo.name" />
|
|
|
</view>
|
|
|
<view class="tel flex">
|
|
|
<label>联系方式:</label>
|
|
|
- <input type="text" class="card input" v-model="company.tel" />
|
|
|
+ <input type="text" class="card input" v-model="supplyInfo.phone" />
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
@@ -59,22 +59,24 @@ export default {
|
|
|
return {
|
|
|
index: 0,
|
|
|
supplyInfo: {
|
|
|
- title: "",
|
|
|
- msg: "",
|
|
|
+ name : "",
|
|
|
+ phone : "",
|
|
|
+ content : "",
|
|
|
},
|
|
|
+
|
|
|
uploadList: [],
|
|
|
imgIdList: [],
|
|
|
+ pic_id : 0,
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
submit() {
|
|
|
if (
|
|
|
- this.company.name === "" ||
|
|
|
- this.company.code === "" ||
|
|
|
- this.company.tel === ""
|
|
|
+ this.supplyInfo.name === "" ||
|
|
|
+ this.supplyInfo.phone === ""
|
|
|
) {
|
|
|
uni.showToast({
|
|
|
- title: "企业信息不完善",
|
|
|
+ title: "报修信息不完善",
|
|
|
icon: "error",
|
|
|
});
|
|
|
return;
|
|
|
@@ -82,7 +84,7 @@ export default {
|
|
|
|
|
|
let md5Sign = md5(
|
|
|
"method=" +
|
|
|
- "need" +
|
|
|
+ "user" +
|
|
|
"×tamp=" +
|
|
|
getApp().globalData.globalTimestamp +
|
|
|
"&secret=" +
|
|
|
@@ -91,18 +93,15 @@ export default {
|
|
|
let url =
|
|
|
getApp().globalData.shareUrl +
|
|
|
"api/api.php" +
|
|
|
- "?method=need&source=need&action=add×tamp=" +
|
|
|
+ "?method=user&source=repair&action=post_repair×tamp=" +
|
|
|
getApp().globalData.globalTimestamp +
|
|
|
"&sign=" +
|
|
|
md5Sign;
|
|
|
let postData = {
|
|
|
- title: this.supplyInfo.title,
|
|
|
- type: +this.index == 0 ? 2 : 1,
|
|
|
- content: this.supplyInfo.msg,
|
|
|
- company_name: this.company.name,
|
|
|
- company_code: this.company.code,
|
|
|
- phone: this.company.tel,
|
|
|
- attach_ids: this.imgIdList.join(),
|
|
|
+ name: this.supplyInfo.name,
|
|
|
+ phone: this.supplyInfo.phone,
|
|
|
+ content: this.supplyInfo.content,
|
|
|
+ pic_id: this.pic_id,
|
|
|
openId: getApp().globalData.open_id,
|
|
|
};
|
|
|
uni.request({
|
|
|
@@ -115,22 +114,20 @@ export default {
|
|
|
success: (res) => {
|
|
|
if (res.data.code === 200) {
|
|
|
uni.showToast({
|
|
|
- title: "发布供需成功",
|
|
|
+ title: "报修信息上传成功!",
|
|
|
icon: "none",
|
|
|
duration: 2000,
|
|
|
});
|
|
|
- uni.setStorageSync("supply_name", this.company.name);
|
|
|
- uni.setStorageSync("supply_code", this.company.code);
|
|
|
- uni.setStorageSync("supply_tel", this.company.tel);
|
|
|
- setTimeout(() => {
|
|
|
- uni.navigateBack({});
|
|
|
- }, 1500);
|
|
|
+ uni.navigateTo({
|
|
|
+ url: "/pages/selfCenter/pay?my_fix",
|
|
|
+ });
|
|
|
} else {
|
|
|
uni.showToast({
|
|
|
title: res.data.msg,
|
|
|
icon: "none",
|
|
|
duration: 2500,
|
|
|
});
|
|
|
+
|
|
|
}
|
|
|
},
|
|
|
fail: () => {
|
|
|
@@ -143,9 +140,9 @@ export default {
|
|
|
},
|
|
|
getImage(type) {
|
|
|
let that = this;
|
|
|
- if (that.uploadList.length >= 3) {
|
|
|
+ if (that.uploadList.length >= 1) {
|
|
|
uni.showToast({
|
|
|
- title: "最多上传3张图片",
|
|
|
+ title: "最多上传1张图片",
|
|
|
icon: "none",
|
|
|
duration: 2500,
|
|
|
});
|
|
|
@@ -153,7 +150,7 @@ export default {
|
|
|
}
|
|
|
uni.chooseImage({
|
|
|
sourceType: [type],
|
|
|
- count: 3 - that.uploadList.length,
|
|
|
+ count: 1 - that.uploadList.length,
|
|
|
sizeType: ["original", "compressed"], //可以指定是原图还是压缩图,默认二者都有
|
|
|
success: (res) => {
|
|
|
for (let i = 0; i < res.tempFilePaths.length; i++) {
|