Browse Source

bug修复

purui 3 days ago
parent
commit
bb959cb56b

+ 4 - 2
packages/app/src/components/drag-img/drag-img.vue

@@ -142,8 +142,10 @@
 			areaHeight() {
 				let height = ''
 				// return '355px'
+				console.log(this.imageList.length)
+				console.log(this.number)
 				if (this.imageList.length < this.number) {
-					height = (Math.ceil((this.imageList.length + 1) / this.colsValue) * this.viewWidth).toFixed() + 'px'
+					height = (Math.ceil((this.imageList.length) / this.colsValue) * this.viewWidth).toFixed() + 'px'
 				} else {
 					height = (Math.ceil(this.imageList.length / this.colsValue) * this.viewWidth).toFixed() + 'px'
 				}
@@ -412,7 +414,7 @@
 					this.delImageHandle(item, index)
 				}
 				console.log("1111")
-				this.$emit("del")
+				this.$emit("del", index)
 			},
 			delImageHandle(item, index) {
 				this.imageList.splice(index, 1)

+ 5 - 1
packages/app/src/composables/permissions.ts

@@ -108,7 +108,7 @@ export const usePermissions = () => {
       { name: 'exchange', meta: { canNotLogin: false, canNotDesigner: false } },
       { name: 'share', meta: { canNotLogin: false, canNotDesigner: false, minLevel: 2 } },
       { name: 'scan', meta: { canNotLogin: false, canNotDesigner: false } },
-      { name: 'task', meta: { canNotLogin: false, canNotDesigner: false } },
+      { name: 'task', meta: { canNotLogin: false, canNotDesigner: false, status:true } },
       { name: 'download', meta: { canNotLogin: false, canNotDesigner: false } },
     ]
     const feature = features.find((item) => item.name === name)
@@ -130,6 +130,10 @@ export const usePermissions = () => {
         uni.showToast({ title: messages.components.toast.levelNotEnough, icon: 'none' }).then()
         return
       }
+	  if (feature.meta.status && userInfo.value.status === 1) {
+	    uni.showToast({ title: '账号被冻结,请联系平台客服/经纪人', icon: 'none' }).then()
+	    return
+	  }
     }
 	console.log("111")
     callback()

+ 3 - 1
packages/app/src/core/libs/actions.ts

@@ -3,9 +3,11 @@ import { cancelCircleReviewUpvote, cancelCircleUpvote, createCircleUpvote } from
 import { useUserStore } from '@/store'
 import { useRouter } from '../utils/router'
 import { Coupon } from './models'
-import { useMessage } from 'wot-design-uni'
+
 import { MessageOptions, MessageResult } from 'wot-design-uni/components/wd-message-box/types'
 import {AgreementType} from "@/core/libs/enums";
+// import { useMessage } from 'wot-design-uni'
+// const { alert } = useMessage()
 
 const toast = (title: string) => uni.showToast({ title, icon: 'none' })
 export const handleUpvoteClick = async (

+ 3 - 3
packages/app/src/pages-sub/home/activity/detail/index.vue

@@ -39,7 +39,7 @@ import mpHtml from 'mp-html/dist/uni-app/components/mp-html/mp-html.vue'
 import { useActivity } from '../../../../composables/activity'
 import ImageEvo from '@/components/image-evo.vue'
 import TooltipEvo from '@/components/tooltip-evo.vue'
-import ActivityAsOf from '../../components/activity-as-of.vue'
+// import ActivityAsOf from '../../components/activity-as-of.vue'
 import images from '@designer-hub/assets/src/libs/assets/images'
 import { usePermissions } from '../../../../composables/permissions'
 import { useAnalysis } from '@/composables/analysis'
@@ -399,7 +399,7 @@ onShareTimeline(() => ({ title: data.value.name, imageUrl: data.value.thumbnailU
         </div>
         <div class="flex-1"></div>
         <div>
-          <div class="relative">
+          <!-- <div class="relative">
             <div class="absolute bottom-3 left-0 right-0 flex flex-col justify-center items-center">
               <div
                 v-if="['waiting', 'registering'].includes(status)"
@@ -412,7 +412,7 @@ onShareTimeline(() => ({ title: data.value.name, imageUrl: data.value.thumbnailU
                 ></ActivityAsOf>
               </div>
             </div>
-          </div>
+          </div> -->
           <TooltipEvo
             placement="top"
             :content="`还差${difference}积分`"

+ 1 - 1
packages/app/src/pages-sub/home/components/activity-count-down.vue

@@ -22,7 +22,7 @@ const time = ref(
 )
 </script>
 <template>
-  <div>
+  <div v-if="status!=='running'">
     <wd-count-down :time="time" @finish="emits('end')">
       <template #default="{ current }">
         <div v-if="time" class="flex items-center gap-1.25 text-black/40 text-sm">

+ 3 - 0
packages/app/src/pages-sub/home/mall/confirm-order/index.vue

@@ -22,6 +22,9 @@ import CouponsSelector from '@/pages-sub/common/components/coupons-selector.vue'
 import { right } from '../../../../core/libs/svgs'
 import ButtonEvo from '@/components/button-evo.vue'
 import { handleClickInstruction } from '../../../../core/libs/actions'
+import { useMessage } from 'wot-design-uni'
+const { alert } = useMessage()
+
 
 const router = useRouter()
 const userStore = useUserStore()

+ 18 - 18
packages/app/src/pages-sub/publish/moment/index.vue

@@ -92,23 +92,22 @@ const tagName = ref('')
 const tagIds = ref([])
 const imgList = ref([])
 const publishing = ref(false)
-const handleImgFail = ({error, file}) =>{
-	// imgList.value = fileList
-	fileList.value.splice(0,1)
+const delImg = (index:number) =>{
+	fileList.value = imgList.value
 }
-const delImg = () =>{
-	console.log('del')
-	fileList.value.splice(0,1)
+const sortChange = () =>{
+	console.log('sort')
+	fileList.value = imgList.value
 }
-const handleChange = ({ fileList: files }) => {
-  // fileList.value = files
+const handleChange = ({ fileList: files }) => {  
   console.log(files)
   let arr = [];
   for(let i in files){	  
 	  if(files[i].status==="success"){
-		  arr.push(JSON.parse(files[i].response).data)
+		  arr.push(files[i])
 	  }
   }
+  fileList.value = arr
   imgList.value = arr
   if(files.length > 0){
 	  useVideo.value = false
@@ -274,7 +273,6 @@ onLoad(async (query: { circleType: '1' | '2' }) => {
 			  :multiple="true"
 			  :limit="String(circleType) === '2' ? 30 : 9"
 			  @change="handleChange"
-			  @fail="handleImgFail"
 			></wd-upload>
 			<div class="text-[24rpx] text-black/60 text-center">上传图片</div>
 		</div>
@@ -290,7 +288,7 @@ onLoad(async (query: { circleType: '1' | '2' }) => {
 			<div class="text-[24rpx] text-black/60 text-center">上传视频</div>
 		</div>
 	</div>
-	<dragImg v-if="imgList.length > 0" v-model="imgList" @del="delImg" :number="String(circleType) === '2' ? 30 : 9"></dragImg>
+	<dragImg keyName='url' v-if="imgList.length > 0" v-model="imgList" @del="delImg" @sortChange="sortChange" :number="String(circleType) === '2' ? 30 : 9"></dragImg>
     <SectionHeading
       title="标签"
       custom-class="my-6"
@@ -316,13 +314,15 @@ onLoad(async (query: { circleType: '1' | '2' }) => {
       </template>
     </SectionHeading>
     <div class="flex-1"></div>
-    <BottomAppBar fixed safe-area-inset-bottom placeholder>
-      <div class="w-full relative z-9">
-        <wd-button type="primary" :round="false" block :loading="publishing" @click="handleSubmit">
-          发布
-        </wd-button>
-      </div>
-    </BottomAppBar>
+    <div class="w-full relative z-9">
+		<BottomAppBar fixed safe-area-inset-bottom placeholder>
+		  <div class="w-full">
+		    <wd-button type="primary" :round="false" block :loading="publishing" @click="handleSubmit">
+		      发布
+		    </wd-button>
+		  </div>
+		</BottomAppBar>
+	</div>
   </div>
 </template>
 <style>

+ 1 - 0
packages/app/src/pages/home/components/home-banner.vue

@@ -52,6 +52,7 @@ const handleEnded = () => {
   emits('ended', props.id)
 }
 const handlePause = () => {
+  videoContext.value?.exitFullScreen()
   playing.value = false
 }
 onMounted(async () => {

+ 8 - 0
packages/app/src/pages/mine/index.vue

@@ -178,9 +178,17 @@ const handleToHomepage = () => {
   uni.navigateTo({ url: `/pages-sub/mine/homepage/index?id=${userInfo.value.userId}` })
 }
 const handleMenuClick = (path) => {
+  if(userInfo.value.status === 1){
+	  uni.showToast({ title: '账号被冻结,请联系平台客服/经纪人', icon: 'none' })
+	  return false
+  }	
   path && router.push(path)
 }
 const handleClickScan = async () => {
+	if(userInfo.value.status === 1){
+		  uni.showToast({ title: '账号被冻结,请联系平台客服/经纪人', icon: 'none' })
+		  return false
+	}	
   const { result } = await uni.scanCode({})
   console.log("result:" + result)
   const { type, options } = qrCodeString2Object(result)