Переглянути джерело

Merge branch 'master' of ssh://gogs.zfire.top:2222/zfire-front/recycle-mobile

* 'master' of ssh://gogs.zfire.top:2222/zfire-front/recycle-mobile:
  feat:售后
  feat: 修改
  feat:发布
Moss 1 рік тому
батько
коміт
a27c3a82c8

+ 3 - 3
package-lock.json

@@ -4920,7 +4920,7 @@
     },
     "charenc": {
       "version": "0.0.2",
-      "resolved": "https://registry.npmmirror.com/charenc/-/charenc-0.0.2.tgz",
+      "resolved": "http://121.41.110.30:4873/charenc/-/charenc-0.0.2.tgz",
       "integrity": "sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA=="
     },
     "check-types": {
@@ -5753,7 +5753,7 @@
     },
     "crypt": {
       "version": "0.0.2",
-      "resolved": "https://registry.npmmirror.com/crypt/-/crypt-0.0.2.tgz",
+      "resolved": "http://121.41.110.30:4873/crypt/-/crypt-0.0.2.tgz",
       "integrity": "sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow=="
     },
     "crypto-browserify": {
@@ -11159,7 +11159,7 @@
     },
     "md5": {
       "version": "2.3.0",
-      "resolved": "https://registry.npmmirror.com/md5/-/md5-2.3.0.tgz",
+      "resolved": "http://121.41.110.30:4873/md5/-/md5-2.3.0.tgz",
       "integrity": "sha512-T1GITYmFaKuO91vxyoQMFETst+O71VUPEU3ze5GNzDm0OWdP8v1ziTaAEPUr/3kLsY3Sftgz242A1SetQiDL7g==",
       "requires": {
         "charenc": "0.0.2",

+ 1 - 0
package.json

@@ -104,6 +104,7 @@
     "js-base64": "^3.7.2",
     "js-perform-lock": "^1.0.5",
     "jweixin-module": "^1.6.0",
+    "md5": "^2.3.0",
     "regenerator-runtime": "^0.12.1",
     "uni-read-pages": "^1.0.5",
     "uni-simple-router": "2.0.7",

+ 46 - 1
src/common/utils/navPag.js

@@ -6,6 +6,8 @@ import {
 } from "./common.js"
 import store from '@/store/index.js'
 
+import md5 from "md5"
+
 export function webViewHref(url, pam = {}) {
 
   var defaultPam = {
@@ -103,4 +105,47 @@ export const navToPage = (function() {
     })
     // #endif
   }
-})()
+})()
+
+// export const crossPage = (function() {
+//   var funs = {}
+//   var funco = {
+//     $emit(name, data) {
+//       if (funs[name]) {
+//         Object.keys(funs[name]).map(key => {
+//           funs[name][key](data)
+//         })
+//       }
+//       uni.setStorageSync(name, data);
+//     },
+
+//     $on(name, fun) {
+//       if (!funs[name]) {
+//         funs[name] = {}
+//       }
+//       funs[name][md5(fun.toString())] = fun
+//     },
+
+//     $off(name, fun) {
+//       var skey = md5(fun.toString())
+//       if (funs[name] && funs[name][skey]) {
+//         delete funs[name][skey]
+//       }
+//     }
+//   }
+//   (function tiemID(){
+//     Object.keys(funs).map(name=>{
+//       var data = uni.getStorageSync(name);
+//       if (funs[name]) {
+//         Object.keys(funs[name]).map(key => {
+//           funs[name][key](data)
+//         })
+//       }
+//     })
+    
+
+
+//     setTimeout(tiemID,300)
+//   })()
+//   return funco
+// })()

+ 19 - 12
src/components/zj-upload/index.vue

@@ -8,14 +8,18 @@
           <view class="mack" @tap.stop="() => {}"></view>
           <image @tap.stop="() => {}" class="uploadImg" mode="aspectFit" src="/static/upload/loading.png"> </image>
         </template>
-        <image class="delImg" mode="aspectFit" src="/static/upload/del.png" @tap.stop="del(index)"> </image>
+        <template v-if="!disabled">
+          <image class="delImg" mode="aspectFit" src="/static/upload/del.png" @tap.stop="del(index)"> </image>
+        </template>
       </view>
     </view>
-    <view v-if="count === 0 ? true : count - files.length" class="file-upload-view" @click="upload">
-      <view class="file-upload-ckick">
-        <image class="uploadImg" mode="aspectFit" src="/static/upload/upload.png"> </image>
+    <template v-if="!disabled">
+      <view v-if="count === 0 ? true : count - files.length" class="file-upload-view" @click="upload">
+        <view class="file-upload-ckick">
+          <image class="uploadImg" mode="aspectFit" src="/static/upload/upload.png"> </image>
+        </view>
       </view>
-    </view>
+    </template>
   </view>
 </template>
 
@@ -27,6 +31,10 @@ import { b64_md5 } from '@/common/utils/md5.js'
 import loadingImg from './loading.png'
 export default {
   props: {
+    disabled: {
+      type: Boolean,
+      default: false
+    },
     count: {
       type: Number,
       default: 0
@@ -59,7 +67,7 @@ export default {
     }
   },
   methods: {
-     // 检查文件类型
+    // 检查文件类型
     checkFileType(url) {
       if (!url) return ''
       const fileSuffix = url.substring(url.lastIndexOf('.') + 1)
@@ -81,7 +89,7 @@ export default {
         return 'pdf'
       }
     },
-    
+
     setFileVal(arr) {
       return arr.map(item => {
         if (typeof item == 'string') {
@@ -98,14 +106,14 @@ export default {
       uni.chooseImage({
         count: this.count === 0 ? 0 : this.count - this.files.length,
         success: async res => {
-          let pathType =  this.checkFileType(res.tempFiles[0].name)
-          if(pathType !== 'image'){
+          let pathType = this.checkFileType(res.tempFiles[0].name)
+          if (pathType !== 'image') {
             return this.$toast('当前格式仅支持jpg, jpeg, png,请检查')
           }
           //  #ifdef H5
-          uploadImgs(res.tempFiles[0]).then(res=>{
+          uploadImgs(res.tempFiles[0]).then(res => {
             this.files.push({
-              url:res.url
+              url: res.url
             })
           })
           //  #endif
@@ -113,7 +121,6 @@ export default {
           // #ifdef MP-WEIXIN
 
           // #endif
-          
         },
         fail: err => {
           console.log(err)

+ 2 - 1
src/pages/goods/detail.vue

@@ -364,7 +364,8 @@
         else if(e.value === 4) {
           uni.setStorageSync('issuePageParam', {
             goodsId: this.id,
-            type: 1
+            type: 1,
+            isLoad:true
           });
           this.$navToPage({
             url: `/pages/issue/index`

+ 11 - 4
src/pages/issue/index.vue

@@ -110,17 +110,24 @@ export default {
   data(){
     return {
       isShow:false,
-      pam:{}
+      pam:{},
+      init:true
     }
   },
 
   onShow(){
     this.pam = uni.getStorageSync('issuePageParam')
     uni.removeStorageSync('issuePageParam');
+
+    if(this.pam.isLoad || this.init){
+      this.init=false
+      delete this.pam.isLoad
       this.isShow = false
-        this.$nextTick(()=>{
-          this.isShow = true
-        })
+      this.$nextTick(()=>{
+        this.isShow = true
+      })
+    }
+      
   }
   // #endif
 

+ 2 - 2
src/pages/mine/myBuy/return.vue

@@ -40,10 +40,10 @@
         <view class="label">上传图片(最多9张)</view>
       </view>
       <br />
-      <zj-upload key="cp" @getFiles="getFiles" :fileList="fileList" :count="9" />
+      <zj-upload :disabled="showDisable" key="cp" @getFiles="getFiles" :fileList="fileList" :count="9" />
     </view>
 
-    <view v-if="['AFTER_WAIT', 'REFUND', 'NO_REFUND'].indexOf(form.status)" class="form-container">
+    <view v-if="['REFUND', 'NO_REFUND'].indexOf(form.status) != -1" class="form-container">
       <view class="title">处理结果</view>
       <view class="row">
         <view class="label">处理状态:</view>