谢杰标 2 anni fa
parent
commit
3e0b4e9f59
2 ha cambiato i file con 585 aggiunte e 474 eliminazioni
  1. 110 80
      pages2/verify/input.vue
  2. 475 394
      pages2/verify/input2.vue

+ 110 - 80
pages2/verify/input.vue

@@ -345,33 +345,35 @@
                 label-position="top"
                 :prop="item.required ? item.fieldKey : ''"
               >
-                <view class="dis_stys">
-                  <text style="color: #999999">请在下方签名区进行签名</text>
-                  <text @click="retDraw" mode="">清空</text>
-                </view>
-                <view class="handCenter">
-                  <canvas
-                    v-if="!form[item.fieldKey]"
-                    class="handWriting"
-                    disable-scroll="true"
-                    :catchtouchmove="true"
-                    @touchstart="uploadScaleStart"
-                    @touchmove="uploadScaleMove"
-                    @touchend="uploadScaleEnd"
-                    canvas-id="handWriting"
-                  ></canvas>
-                  <view
-                    v-else
-                    style="width: 100%; height: 100%; position: relative"
-                  >
-                    <view class="ctoples">图片</view>
-                    <image
-                      style="width: 100%; height: 100%"
-                      :src="$method.splitImgHost(form[item.fieldKey])"
-                      mode=""
-                    ></image>
+                <div style="width:100%">
+                  <view class="dis_stys">
+                    <text style="color: #999999">请在下方签名区进行签名</text>
+                    <text @click="retDraw" mode="">清空</text>
                   </view>
-                </view>
+                  <view class="handCenter">
+                    <canvas
+                      v-if="!form[item.fieldKey]"
+                      class="handWriting"
+                      disable-scroll="true"
+                      :catchtouchmove="true"
+                      @touchstart="uploadScaleStart"
+                      @touchmove="uploadScaleMove"
+                      @touchend="uploadScaleEnd"
+                      canvas-id="handWriting"
+                    ></canvas>
+                    <view
+                      v-else
+                      style="width: 100%; height: 100%; position: relative"
+                    >
+                      <view class="ctoples">图片</view>
+                      <image
+                        style="width: 100%; height: 100%"
+                        :src="$method.splitImgHost(form[item.fieldKey])"
+                        mode=""
+                      ></image>
+                    </view>
+                  </view>
+                </div>
               </u-form-item>
             </view>
             <u-form-item
@@ -394,46 +396,48 @@
                 @click="downDocx(item.url)"
                 >点击下载</text
               >
-              <view class="dis_stys"
-                ><text style="color: #999999"
-                  >下载承诺书进行填写并签名盖章后上传(≤2M)</text
-                ></view
-              >
-              <image
-                v-if="!form[item.fieldKey]"
-                style="width: 169rpx; height: 169rpx"
-                @click="getChast"
-                src="@/static/info_4.png"
-              ></image>
-              <view class="quzw" v-if="form[item.fieldKey]">
-                <view
-                  v-if="
-                    form[item.fieldKey].split('.').splice(-1)[0] == 'docx' ||
-                    form[item.fieldKey].split('.').splice(-1)[0] == 'doc'
-                  "
-                  class="borsrs"
+              <div>
+                <view class="dis_stys"
+                  ><text style="color: #999999"
+                    >下载承诺书进行填写并签名盖章后上传(≤2M)</text
+                  ></view
                 >
+                <image
+                  v-if="!form[item.fieldKey]"
+                  style="width: 169rpx; height: 169rpx"
+                  @click="getChast"
+                  src="@/static/info_4.png"
+                ></image>
+                <view class="quzw" v-if="form[item.fieldKey]">
+                  <view
+                    v-if="
+                      form[item.fieldKey].split('.').splice(-1)[0] == 'docx' ||
+                      form[item.fieldKey].split('.').splice(-1)[0] == 'doc'
+                    "
+                    class="borsrs"
+                  >
+                    <image
+                      src="@/static/icon/jy_icon.png"
+                      style="width: 168rpx; height: 168rpx"
+                    ></image>
+                    <text>{{ titleName }}</text>
+                  </view>
                   <image
-                    src="@/static/icon/jy_icon.png"
-                    style="width: 168rpx; height: 168rpx"
+                    v-else
+                    :src="$method.splitImgHost(form[item.fieldKey])"
+                    style="width: 100%; height: 100%"
+                    mode="aspectFit"
+                    @click="seePhotos(form[item.fieldKey])"
                   ></image>
-                  <text>{{ titleName }}</text>
+                  <u-icon
+                    name="close-circle-fill"
+                    color="red"
+                    size="44"
+                    class="optionsAbs"
+                    @click="clearWord"
+                  ></u-icon>
                 </view>
-                <image
-                  v-else
-                  :src="$method.splitImgHost(form[item.fieldKey])"
-                  style="width: 100%; height: 100%"
-                  mode="aspectFit"
-                  @click="seePhotos(form[item.fieldKey])"
-                ></image>
-                <u-icon
-                  name="close-circle-fill"
-                  color="red"
-                  size="44"
-                  class="optionsAbs"
-                  @click="clearWord"
-                ></u-icon>
-              </view>
+              </div>
             </u-form-item>
           </template>
         </u-form>
@@ -522,7 +526,7 @@ export default {
       isUploading: false,
       form: {
         name: "",
-        sex: "",
+        sex: "",
         idcard: "",
         telphone: "",
         education: "",
@@ -534,9 +538,9 @@ export default {
         apply_post: "",
         major: "",
         working_years: "",
-        recent_photos: "oss/images/avatar/131/1686271592764_1781951949",
-        idcard_face_photo: "oss/images/IDCard/131/1686271688971.jpg",
-        idcard_national_photo: "oss/images/IDCard/131/1686271714573.jpg",
+        recent_photos: "",
+        idcard_face_photo: "",
+        idcard_national_photo: "",
         commitment_electr_signature: "",
         commitment_seal: "",
       },
@@ -864,6 +868,10 @@ export default {
           keyValue: JSON.stringify(arsty),
         })
         .then((res) => {
+          // #ifdef H5
+          window.location.href = this.$method.splitImgHost(res.data.msg);
+          // #endif
+          // #ifdef MP-WEIXIN
           uni.downloadFile({
             url: this.$method.splitImgHost(res.data.msg),
             success: (result) => {
@@ -890,6 +898,7 @@ export default {
               }
             },
           });
+          // #endif
         });
     },
     getGoodsDetail() {
@@ -920,6 +929,8 @@ export default {
         sizeType: ["original", "compressed"], //可以指定是原图还是压缩图,默认二者都有
         success: (res) => {
           if (res.tempFiles[0].size > 2097152) {
+            this.$method.showToast("上传图片不得大于2M");
+            return;
             // this.$method.showToast("上传图片不得大于2M");
             // 需要压缩
             let canvasId = "zipCanvas";
@@ -938,13 +949,32 @@ export default {
             );
             return;
           } else {
-            this.uploadImgsChild(res.tempFiles[0].path);
+            // this.uploadImgsChild(res.tempFiles[0].path);
+            // #ifdef MP-WEIXIN
+            var type = res.tempFiles[0].path.split(".").splice(-1);
+            // #endif
+            // #ifdef H5
+            var type = res.tempFiles[0].type.split("/").splice(-1);
+            // #endif
+            if (type[0] != "jpg" && type[0] != "png" && type[0] != "jpeg") {
+              this.$method.showToast("请上传图片格式");
+              return;
+            }
+            this.$set(this.form, "commitment_seal", res.tempFiles[0].path);
+            this.$nextTick(() => {
+              this.resultForm();
+            });
           }
         },
       });
     },
     uploadImgsChild(path) {
+      // #ifdef MP-WEIXIN
       var type = path.split(".").splice(-1);
+      // #endif
+      // #ifdef H5
+      var type = type.split("/").splice(-1);
+      // #endif
       if (type[0] != "jpg" && type[0] != "png" && type[0] != "jpeg") {
         this.$method.showToast("请上传图片格式");
         return;
@@ -1587,19 +1617,19 @@ export default {
       }
       let { IdName, IdNum } = res.data;
       if (IdName != this.form.name || IdNum != this.form.idcard) {
-        uni.showModal({
-          content:
-            IdName != this.form.name
-              ? "输入的姓名和身份证人像面照片姓名不匹配,请联系客服"
-              : "输入的身份证号和身份证人像面照片身份证号不匹配,请联系客服",
-          showCancel: false,
-          success: (resultst) => {
-            if (resultst.confirm) {
-              uni.navigateBack();
-            }
-          },
-        });
-        return;
+        // uni.showModal({
+        //   content:
+        //     IdName != this.form.name
+        //       ? "输入的姓名和身份证人像面照片姓名不匹配,请联系客服"
+        //       : "输入的身份证号和身份证人像面照片身份证号不匹配,请联系客服",
+        //   showCancel: false,
+        //   success: (resultst) => {
+        //     if (resultst.confirm) {
+        //       uni.navigateBack();
+        //     }
+        //   },
+        // });
+        // return;
       }
       this.$refs[paramType][0].lists = [
         {

+ 475 - 394
pages2/verify/input2.vue

@@ -1,439 +1,520 @@
 <template>
-	<view style="padding: 30rpx;">
-		<nav-bar title="填写审核资料"></nav-bar>
-		<view class="topBox">
-			<view>
-				<u-icon name="error-circle-fill" color="#FF3B30" size="28"></u-icon>
-				<text style="color: #FF3B30;margin-left: 10rpx;">学习前请提交完整审核资料</text>
-			</view>
-			<view style="color: #007AFF;" @click="backPage">稍后再填</view>
-		</view>
-		<u-collapse v-if="remarkStatus" :item-style="itemStyle" event-type="close">
-			<u-collapse-item title="审核结果反馈">
-				<view style="padding-bottom: 30rpx;">
-					<text class="collapse-item">{{ remark }}</text>
-				</view>
-			</u-collapse-item>
-		</u-collapse>
-		<view class="bodyBox" style="margin-top: 30rpx;padding:0 20rpx;">
-			<u-form :model="form" ref="uForm">
-				<template v-for="(item, index) in listData">
-					<u-form-item
-						v-if="item.inputType == 4"
-						:key="index"
-						:label="item.fieldName"
-						:required="item.required"
-						:label-width="auto"
-						:prop="item.required ? item.fieldKey : ''"
-						label-position="top"
-					>
-						<text style="color: #007AFF;position: absolute;top: 20rpx;left: 180rpx;text-decoration: underline;" @click="downDocx(item.url)">点击下载</text>
-						<view class="dis_stys"><text style="color: #999999;">下载承诺书进行填写并签名盖章后上传(≤2M)</text></view>
-						<image v-if="!form[item.fieldKey]" style="width: 169rpx; height: 169rpx;" @click="getChast" src="@/static/info_4.png"></image>
-						<view class="quzw" v-if="form[item.fieldKey]">
-							<view v-if="form[item.fieldKey].split('.').splice(-1)[0] == 'docx' || form[item.fieldKey].split('.').splice(-1)[0] == 'doc'" class="borsrs">
-								<image src="@/static/icon/jy_icon.png" style="width: 168rpx; height: 168rpx;"></image>
-								<text>{{ titleName }}</text>
-							</view>
-							<image v-else :src="form[item.fieldKey]" style="width: 100%; height: 100%;" mode="aspectFit" @click="seePhotos(form[item.fieldKey])"></image>
-							<u-icon name="close-circle-fill" color="red" size="44" class="optionsAbs" @click="clearWord"></u-icon>
-						</view>
-					</u-form-item>
-				</template>
-			</u-form>
-		</view>
-		<view @click="submits" class="submit_btn">提交资料</view>
-		<u-action-sheet :list="list" v-model="showTableDown" @click="clickIndex"></u-action-sheet>
-	</view>
+  <view style="padding: 30rpx">
+    <nav-bar title="填写审核资料"></nav-bar>
+    <view class="topBox">
+      <view>
+        <u-icon name="error-circle-fill" color="#FF3B30" size="28"></u-icon>
+        <text style="color: #ff3b30; margin-left: 10rpx"
+          >学习前请提交完整审核资料</text
+        >
+      </view>
+      <view style="color: #007aff" @click="backPage">稍后再填</view>
+    </view>
+    <u-collapse v-if="remarkStatus" :item-style="itemStyle" event-type="close">
+      <u-collapse-item title="审核结果反馈">
+        <view style="padding-bottom: 30rpx">
+          <text class="collapse-item">{{ remark }}</text>
+        </view>
+      </u-collapse-item>
+    </u-collapse>
+    <view class="bodyBox" style="margin-top: 30rpx; padding: 0 20rpx">
+      <u-form :model="form" ref="uForm">
+        <template v-for="(item, index) in listData">
+          <u-form-item
+            v-if="item.inputType == 4"
+            :key="index"
+            :label="item.fieldName"
+            :required="item.required"
+            :label-width="auto"
+            :prop="item.required ? item.fieldKey : ''"
+            label-position="top"
+          >
+            <text
+              style="
+                color: #007aff;
+                position: absolute;
+                top: 20rpx;
+                left: 180rpx;
+                text-decoration: underline;
+              "
+              @click="downDocx(item.url)"
+              >点击下载</text
+            >
+            <div>
+              <view class="dis_stys">
+                <text style="color: #999999">
+                  下载承诺书进行填写并签名盖章后上传(≤2M)
+                </text>
+              </view>
+              <image
+                v-if="!form[item.fieldKey]"
+                style="width: 169rpx; height: 169rpx"
+                @click="getChast"
+                src="@/static/info_4.png"
+              ></image>
+              <view class="quzw" v-if="form[item.fieldKey]">
+                <view
+                  v-if="
+                    form[item.fieldKey].split('.').splice(-1)[0] == 'docx' ||
+                    form[item.fieldKey].split('.').splice(-1)[0] == 'doc'
+                  "
+                  class="borsrs"
+                >
+                  <image
+                    src="@/static/icon/jy_icon.png"
+                    style="width: 168rpx; height: 168rpx"
+                  ></image>
+                  <text>{{ titleName }}</text>
+                </view>
+                <image
+                  v-else
+                  :src="form[item.fieldKey]"
+                  style="width: 100%; height: 100%"
+                  mode="aspectFit"
+                  @click="seePhotos(form[item.fieldKey])"
+                ></image>
+                <u-icon
+                  name="close-circle-fill"
+                  color="red"
+                  size="44"
+                  class="optionsAbs"
+                  @click="clearWord"
+                ></u-icon>
+              </view>
+            </div>
+          </u-form-item>
+        </template>
+      </u-form>
+    </view>
+    <view @click="submits" class="submit_btn">提交资料</view>
+    <u-action-sheet
+      :list="list"
+      v-model="showTableDown"
+      @click="clickIndex"
+    ></u-action-sheet>
+  </view>
 </template>
 
 <script>
 export default {
-	data() {
-		return {
-			showTableDown: false,
-			list: [
-				{
-					text: '上传图片'
-				},
-				// {
-				// 	text: '上传文件'
-				// }
-			],
-			isUploading:false,
-			itemStyle: {
-				marginTop: '20px',
-				backgroundColor: '#fff',
-				borderRadius: '24rpx',
-				padding: '0rpx 20rpx'
-			},
-			form: {
-				commitment_seal: ''
-			},
-			goodsId: null,
-			fileList1: [],
-			id: null, //id有值的话就是修改页面
-			listData: {}, //页面数据
-			openVerify: false, // 控制是否手动验证
-			nextStatus: false, //是否有下一步
-			titleName: '文件名称居中对齐过长换行', //word名称
-			remark: '', //反馈文本
-			remarkStatus: false, //是否存在审核结果反馈
-			rules: {
-				commitment_seal: [
-					{
-						required: true,
-						message: '请上传承诺书盖章',
-						trigger: ['change', 'blur']
-					}
-				]
-			},
-			orderGoodsId:0
-		};
-	},
-	created() {},
-	onLoad(option) {
-		this.orderGoodsId = Number(option.orderGoodsId)
-		this.goodsId = Number(option.id);
-		this.getInfo();
-	},
-	onReady() {
-		this.$refs.uForm.setRules(this.rules);
-	},
-	methods: {
-		backPage() {
-			uni.navigateBack();
-		},
-		seePhotos(url) {
-			uni.previewImage({
-				urls: [url]
-			});
-		},
-		downDocx(url) {
-			this.$api.addWordbaseprofileStamp({ goodsId: this.goodsId }).then(res => {
-				uni.downloadFile({
-					url: this.$method.splitImgHost(res.data.msg),
-					success: result => {
-						if (result.statusCode === 200) {
-							const filePath = result.tempFilePath
-							console.log(this.$method.splitImgHost(res.data.msg));
-							this.$method.showToast('下载成功');
-							uni.saveImageToPhotosAlbum({
-								filePath: filePath,
-								success: function (errMsg) {
-								uni.showToast({
-								  mask: true,
-								  title: '保存成功'
-								  });
-								},
-								fail:(errMsg)=>{
-									uni.showToast({
-										mask: true,
-										title: '保存失败'
-										});
-									},
-									complete:(errMsg)=>{
-													
-									}
-								});     
-						}
-					}
-				});
-			});
-		},
-		clearWord() {
-			this.$set(this.form, 'commitment_seal', '');
-			this.titleName = '';
-		},
-		clickIndex(inds){
-			if(inds === 0){
-				this.uploadImgs()
-			}
-			if(inds === 1){
-				this.uploadFieds()
-			}
-		},
-		getChast(){
-			this.showTableDown = true;
-		},
-		uploadImgs(){
-			var self = this
-			uni.chooseImage({
-			    count: 1, //默认9
-			    sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
-			    success: function (res) {
-			        if (res.tempFiles[0].size > 2097152) {
-			        	self.$method.showToast('上传图片不得大于2M');
-			        	return;
-			        } else {
-			        	var type = res.tempFiles[0].path.split('.').splice(-1);
-			        	if (type[0] != 'jpg' && type[0] != 'png' && type[0] != 'jpeg') {
-			        		self.$method.showToast('请上传图片格式');
-			        		return;
-			        	}
-			        	self.$set(self.form, 'commitment_seal', res.tempFiles[0].path);
-			        	self.$nextTick(function() {
-			        		this.resultForm();
-			        	});
-			        }
-			    }
-			});
-		},
-		uploadFieds() {
-			var self = this;
-			wx.chooseMessageFile({
-				count: 1,
-				size: 2097152,
-				type: 'file',
-				success(res) {
-					if (res.tempFiles[0].size > 2097152) {
-						self.$method.showToast('上传文件不得大于2M');
-						return;
-					} else {
-						var type = res.tempFiles[0].path.split('.').splice(-1);
-						if (type[0] != 'jpg' && type[0] != 'png' && type[0] != 'jpeg' && type[0] != 'docx' && type[0] != 'doc') {
-							self.$method.showToast('请上传word文档或图片');
-							return;
-						}
-						self.titleName = res.tempFiles[0].name;
-						self.$set(self.form, 'commitment_seal', res.tempFiles[0].path);
-						self.$nextTick(function() {
-							this.resultForm();
-						});
-					}
-				}
-			});
-		},
-		//提交表单
-		async submitApi() {
-			var data = JSON.parse(JSON.stringify(this.form));
-			if (data['commitment_seal']) {
-				data.commitment_seal = await this.$method.uploadFile(data.commitment_seal, 0);
-			}
-			this.optionChanges(data);
-		},
-		optionChanges(data) {
-			var self = this;
-			var objs = {};
-			for (let k in data) {
-				objs[k] = {
-					fieldKey: k,
-					value: data[k],
-					fieldName: (function() {
-						for (let i = 0; i < self.listData.length; i++) {
-							if (self.listData[i].fieldKey == k) {
-								return self.listData[i].fieldName;
-							}
-						}
-					})(),
-					status: self.remarkStatus ? 1 : 0
-				};
-			}
-			var datas = {
-				orderGoodsId:this.orderGoodsId,
-				goodsId: self.goodsId,
-				keyValue: JSON.stringify(objs)
-			};
-			if (self.remarkStatus) {
-				datas.id = self.id;
-				self.$api.editbaseprofileStamp(datas).then(res => {
-					this.isUploading = false;
-					if (res.data.code === 200) {
-						self.$method.showToast('提交成功');
-						setTimeout(() => {
-							console.log('延迟')
-							uni.navigateBack();
-						}, 1500)
-					}
-				});
-			} else {
-				self.$api.addbaseprofileStamp(datas).then(res => {
-					this.isUploading = false;
-					if (res.data.code === 200) {
-						self.$method.showToast('提交成功');
-						setTimeout(() => {
-							console.log('延迟')
-							uni.navigateBack();
-						}, 1500)
-					}
-				});
-			}
-		},
-		//验证表单
-		resultForm(int) {
-			if (this.openVerify) {
-				for (let i = 0; i < this.listData.length; i++) {
-					if (this.listData[i].fieldKey === 'commitment_seal' && !this.listData[i].required) {
-						this.submitApi();
-						return;
-					}
-				}
-				this.$refs.uForm.validate(valid => {
-					if (valid) {
-						if (int === 1) {
-							this.submitApi();
-						}
-					} else {
-						this.isUploading = false;
-						console.log('验证失败');
-					}
-				});
-			}
-		},
-		submits() {
-			if(this.isUploading) {
-				return;
-			}
-			this.isUploading = true;
-			this.openVerify = true;
-			this.resultForm(1);
-		},
-		async changePhotoListHeader1(lists, name) {
-			if (lists.length) {
-				this.fileList1 = lists;
-				this.form.commitment_seal = await this.$method.imageInfos(lists[0].url);
-			} else {
-				this.fileList1 = [];
-				this.$set(this.form, 'commitment_seal', '');
-			}
-			this.$nextTick(function() {
-				this.resultForm();
-			});
-		},
+  data() {
+    return {
+      showTableDown: false,
+      list: [
+        {
+          text: "上传图片",
+        },
+        // {
+        // 	text: '上传文件'
+        // }
+      ],
+      isUploading: false,
+      itemStyle: {
+        marginTop: "20px",
+        backgroundColor: "#fff",
+        borderRadius: "24rpx",
+        padding: "0rpx 20rpx",
+      },
+      form: {
+        commitment_seal: "",
+      },
+      goodsId: null,
+      fileList1: [],
+      id: null, //id有值的话就是修改页面
+      listData: {}, //页面数据
+      openVerify: false, // 控制是否手动验证
+      nextStatus: false, //是否有下一步
+      titleName: "文件名称居中对齐过长换行", //word名称
+      remark: "", //反馈文本
+      remarkStatus: false, //是否存在审核结果反馈
+      rules: {
+        commitment_seal: [
+          {
+            required: true,
+            message: "请上传承诺书盖章",
+            trigger: ["change", "blur"],
+          },
+        ],
+      },
+      orderGoodsId: 0,
+      auto: "180rpx",
+    };
+  },
+  created() {},
+  onLoad(option) {
+    this.orderGoodsId = Number(option.orderGoodsId);
+    this.goodsId = Number(option.id);
+    this.getInfo();
+  },
+  onReady() {
+    this.$refs.uForm.setRules(this.rules);
+  },
+  methods: {
+    backPage() {
+      uni.navigateBack();
+    },
+    seePhotos(url) {
+      uni.previewImage({
+        urls: [url],
+      });
+    },
+    downDocx(url) {
+      this.$api
+        .addWordbaseprofileStamp({ goodsId: this.goodsId })
+        .then((res) => {
+          // #ifdef H5
+          window.location.href = this.$method.splitImgHost(res.data.msg);
+          // #endif
+          // #ifdef MP-WEIXIN
+          uni.downloadFile({
+            url: this.$method.splitImgHost(res.data.msg),
+            success: (result) => {
+              if (result.statusCode === 200) {
+                const filePath = result.tempFilePath;
+                console.log(this.$method.splitImgHost(res.data.msg), 111);
+                this.$method.showToast("下载成功");
+                uni.saveImageToPhotosAlbum({
+                  filePath: filePath,
+                  success: function (errMsg) {
+                    uni.showToast({
+                      mask: true,
+                      title: "保存成功",
+                    });
+                  },
+                  fail: (errMsg) => {
+                    uni.showToast({
+                      mask: true,
+                      title: "保存失败",
+                    });
+                  },
+                  complete: (errMsg) => {},
+                });
+              }
+            },
+          });
+          // #endif
+        });
+    },
+    clearWord() {
+      this.$set(this.form, "commitment_seal", "");
+      this.titleName = "";
+    },
+    clickIndex(inds) {
+      console.log(inds, 789);
+      if (inds === 0) {
+        this.uploadImgs();
+      }
+      if (inds === 1) {
+        this.uploadFieds();
+      }
+    },
+    getChast() {
+      this.showTableDown = true;
+    },
+    uploadImgs() {
+      var self = this;
+      uni.chooseImage({
+        count: 1, //默认9
+        sizeType: ["original", "compressed"], //可以指定是原图还是压缩图,默认二者都有
+        success: function (res) {
+          if (res.tempFiles[0].size > 2097152) {
+            self.$method.showToast("上传图片不得大于2M");
+            return;
+          } else {
+            // #ifdef MP-WEIXIN
+            var type = res.tempFiles[0].path.split(".").splice(-1);
+            // #endif
+            // #ifdef H5
+            var type = res.tempFiles[0].type.split("/").splice(-1);
+            // #endif
+            if (type[0] != "jpg" && type[0] != "png" && type[0] != "jpeg") {
+              self.$method.showToast("请上传图片格式");
+              return;
+            }
+            console.log(res.tempFiles[0].path, "res.tempFiles[0].path");
+            self.$set(self.form, "commitment_seal", res.tempFiles[0].path);
+            self.$nextTick(function () {
+              this.resultForm();
+            });
+          }
+        },
+      });
+    },
+    uploadFieds() {
+      var self = this;
+      wx.chooseMessageFile({
+        count: 1,
+        size: 2097152,
+        type: "file",
+        success(res) {
+          if (res.tempFiles[0].size > 2097152) {
+            self.$method.showToast("上传文件不得大于2M");
+            return;
+          } else {
+            var type = res.tempFiles[0].path.split(".").splice(-1);
+            if (
+              type[0] != "jpg" &&
+              type[0] != "png" &&
+              type[0] != "jpeg" &&
+              type[0] != "docx" &&
+              type[0] != "doc"
+            ) {
+              self.$method.showToast("请上传word文档或图片");
+              return;
+            }
+            self.titleName = res.tempFiles[0].name;
+            self.$set(self.form, "commitment_seal", res.tempFiles[0].path);
+            self.$nextTick(function () {
+              this.resultForm();
+            });
+          }
+        },
+      });
+    },
+    //提交表单
+    async submitApi() {
+      var data = JSON.parse(JSON.stringify(this.form));
+      if (data["commitment_seal"]) {
+        data.commitment_seal = await this.$method.uploadFile(
+          data.commitment_seal,
+          0
+        );
+      }
+      this.optionChanges(data);
+    },
+    optionChanges(data) {
+      var self = this;
+      var objs = {};
+      for (let k in data) {
+        objs[k] = {
+          fieldKey: k,
+          value: data[k],
+          fieldName: (function () {
+            for (let i = 0; i < self.listData.length; i++) {
+              if (self.listData[i].fieldKey == k) {
+                return self.listData[i].fieldName;
+              }
+            }
+          })(),
+          status: self.remarkStatus ? 1 : 0,
+        };
+      }
+      var datas = {
+        orderGoodsId: this.orderGoodsId,
+        goodsId: self.goodsId,
+        keyValue: JSON.stringify(objs),
+      };
+      if (self.remarkStatus) {
+        datas.id = self.id;
+        self.$api.editbaseprofileStamp(datas).then((res) => {
+          this.isUploading = false;
+          if (res.data.code === 200) {
+            self.$method.showToast("提交成功");
+            setTimeout(() => {
+              console.log("延迟");
+              uni.navigateBack();
+            }, 1500);
+          }
+        });
+      } else {
+        self.$api.addbaseprofileStamp(datas).then((res) => {
+          this.isUploading = false;
+          if (res.data.code === 200) {
+            self.$method.showToast("提交成功");
+            setTimeout(() => {
+              console.log("延迟");
+              uni.navigateBack();
+            }, 1500);
+          }
+        });
+      }
+    },
+    //验证表单
+    resultForm(int) {
+      if (this.openVerify) {
+        for (let i = 0; i < this.listData.length; i++) {
+          if (
+            this.listData[i].fieldKey === "commitment_seal" &&
+            !this.listData[i].required
+          ) {
+            this.submitApi();
+            return;
+          }
+        }
+        this.$refs.uForm.validate((valid) => {
+          if (valid) {
+            if (int === 1) {
+              this.submitApi();
+            }
+          } else {
+            this.isUploading = false;
+            console.log("验证失败");
+          }
+        });
+      }
+    },
+    submits() {
+      if (this.isUploading) {
+        return;
+      }
+      this.isUploading = true;
+      this.openVerify = true;
+      this.resultForm(1);
+    },
+    async changePhotoListHeader1(lists, name) {
+      if (lists.length) {
+        this.fileList1 = lists;
+        this.form.commitment_seal = await this.$method.imageInfos(lists[0].url);
+      } else {
+        this.fileList1 = [];
+        this.$set(this.form, "commitment_seal", "");
+      }
+      this.$nextTick(function () {
+        this.resultForm();
+      });
+    },
 
-		getInfo() {
-			var self = this;
-			this.$api.getbaseprofiletpId(this.goodsId).then(res => {
-				var ast = JSON.parse(res.data.data.keyValue2);
-				self.listData = ast;
-				self.$api.getbaseprofileStampgetInfo({ goodsId: self.goodsId,orderGoodsId:self.orderGoodsId }).then(result => {
-					if (result.data.code === 200) {
-						if (result.data.data && result.data.data.status === 3) {
-							self.remark = result.data.data.text;
-							self.remarkStatus = true;
-							self.id = result.data.data.id;
-						} else if (result.data.data && (result.data.data.status === 1 || result.data.data.status === 2)) {
-							uni.showModal({
-								showCancel: false,
-								content:
-									result.data.data.status === 1
-										? '该商品审核资料已通过,不可重复提交资料'
-										: result.data.data.status === 2
-										? '该商品审核资料处于待审核状态,不可重复提交资料'
-										: '请联系管理员',
-								success: function(k) {
-									if (k.confirm) {
-										uni.navigateBack();
-									}
-								}
-							});
-						}
-					}
-				});
-			});
-		}
-	}
+    getInfo() {
+      var self = this;
+      this.$api.getbaseprofiletpId(this.goodsId).then((res) => {
+        var ast = JSON.parse(res.data.data.keyValue2);
+        self.listData = ast;
+        self.$api
+          .getbaseprofileStampgetInfo({
+            goodsId: self.goodsId,
+            orderGoodsId: self.orderGoodsId,
+          })
+          .then((result) => {
+            if (result.data.code === 200) {
+              if (result.data.data && result.data.data.status === 3) {
+                self.remark = result.data.data.text;
+                self.remarkStatus = true;
+                self.id = result.data.data.id;
+              } else if (
+                result.data.data &&
+                (result.data.data.status === 1 || result.data.data.status === 2)
+              ) {
+                uni.showModal({
+                  showCancel: false,
+                  content:
+                    result.data.data.status === 1
+                      ? "该商品审核资料已通过,不可重复提交资料"
+                      : result.data.data.status === 2
+                      ? "该商品审核资料处于待审核状态,不可重复提交资料"
+                      : "请联系管理员",
+                  success: function (k) {
+                    if (k.confirm) {
+                      uni.navigateBack();
+                    }
+                  },
+                });
+              }
+            }
+          });
+      });
+    },
+  },
 };
 </script>
 <style>
 page {
-	background: #eaeef1;
+  background: #eaeef1;
 }
 </style>
-<style scope>
+<style scopelang="scss">
 /deep/ .u-collapse-title {
-	color: #FF3B30;
-	font-size: 24rpx;
+  color: #ff3b30;
+  font-size: 24rpx;
 }
 .collapse-item {
-	color: #666;
-	font-size: 24rpx;
-	padding-bottom: 30rpx;
+  color: #666;
+  font-size: 24rpx;
+  padding-bottom: 30rpx;
 }
 .quzw {
-	width: 638rpx;
-	height: 638rpx;
-	position: relative;
-	border: 2rpx solid #eee;
-	border-radius: 8rpx;
+  width: 638rpx;
+  height: 638rpx;
+  position: relative;
+  border: 2rpx solid #eee;
+  border-radius: 8rpx;
 }
 .borsrs {
-	width: 640rpx;
-	height: 640rpx;
-	display: flex;
-	flex-direction: column;
-	align-items: center;
-	justify-content: center;
+  width: 640rpx;
+  height: 640rpx;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  justify-content: center;
 }
 .optionsAbs {
-	position: absolute;
-	z-index: 99;
-	top: 10rpx;
-	right: 10rpx;
+  position: absolute;
+  z-index: 99;
+  top: 10rpx;
+  right: 10rpx;
 }
 .dis_stys {
-	display: flex;
-	align-items: center;
-	justify-content: space-between;
+  /* display: flex;
+  align-items: center;
+  justify-content: space-between; */
 }
 .handCenter {
-	background: #f7f7f7;
-	border: 2rpx solid #eeeeee;
-	border-radius: 24rpx;
+  background: #f7f7f7;
+  border: 2rpx solid #eeeeee;
+  border-radius: 24rpx;
 }
 .headerSDels {
-	height: 58rpx;
-	padding: 0rpx 24rpx;
-	font-weight: bold;
-	display: flex;
-	align-items: center;
-	flex-direction: row-reverse;
+  height: 58rpx;
+  padding: 0rpx 24rpx;
+  font-weight: bold;
+  display: flex;
+  align-items: center;
+  flex-direction: row-reverse;
 }
 .listBox {
-	margin: 24rpx 32rpx 0rpx;
-	box-shadow: 0rpx 0rpx 16rpx 4rpx rgba(145, 156, 178, 0.1);
-	border-radius: 32rpx;
-	background-color: #fff;
-	overflow: hidden;
+  margin: 24rpx 32rpx 0rpx;
+  box-shadow: 0rpx 0rpx 16rpx 4rpx rgba(145, 156, 178, 0.1);
+  border-radius: 32rpx;
+  background-color: #fff;
+  overflow: hidden;
 }
 .imgBoxs {
-	width: 156rpx;
-	height: 203rpx;
+  width: 156rpx;
+  height: 203rpx;
 }
 .imgBoxs2 {
-	width: 171rpx;
-	height: 108rpx;
+  width: 171rpx;
+  height: 108rpx;
 }
 .submit_btn {
-	width: 526rpx;
-	height: 80rpx;
-	background: #007aff;
-	border-radius: 40rpx;
-	text-align: center;
-	line-height: 80rpx;
-	color: #ffffff;
-	margin: 30rpx auto;
+  width: 526rpx;
+  height: 80rpx;
+  background: #007aff;
+  border-radius: 40rpx;
+  text-align: center;
+  line-height: 80rpx;
+  color: #ffffff;
+  margin: 30rpx auto;
 }
 .picker {
-	text-align: right;
+  text-align: right;
 }
 input {
-	text-align: right;
+  text-align: right;
 }
 .bodyBox {
-	background: #ffffff;
-	border-radius: 24rpx;
-	width: 100%;
+  background: #ffffff;
+  border-radius: 24rpx;
+  width: 100%;
 }
 .topBox {
-	height: 80rpx;
-	background: #ffffff;
-	border-radius: 24rpx;
-	width: 100%;
-	display: flex;
-	justify-content: space-between;
-	line-height: 80rpx;
-	padding: 0 20rpx;
-	font-size: 24rpx;
+  height: 80rpx;
+  background: #ffffff;
+  border-radius: 24rpx;
+  width: 100%;
+  display: flex;
+  justify-content: space-between;
+  line-height: 80rpx;
+  padding: 0 20rpx;
+  font-size: 24rpx;
 }
 </style>