Browse Source

no message

sys 1 year ago
parent
commit
4a02d56013

+ 1 - 0
api/my.js

@@ -15,4 +15,5 @@ export const getCashFlowHistoryPage = (data) => request(goodsUrl + 'myself/getCa
 export const getDailyEarnings = (data) => request(goodsUrl + 'myself/getDailyEarnings', 'get', data)
 //黑名单列表
 export const getBlackList = (data) => request(goodsUrl + 'myself/blacklist', 'get', data)
+export const delBlackItem = (data) => request(goodsUrl + 'myself/blacklist/'+data, 'delete', {})
 

+ 33 - 3
pages/my/set/blacklist.vue

@@ -2,14 +2,14 @@
   <view class="blacklist-box">
     <en-nav title="黑名单" :title-color="'#333'"   @navHeight="setNavHeight"></en-nav>
     <scroll-view  class="blacklist-list" :scroll-y="true"  :scroll-x="true" :style="{'height':'calc(100% - '+navHeight+'rpx)'}">
-      <view class="blacklist-item" v-for="i in 12">
+      <view class="blacklist-item" v-for="(item,i) in 12">
         <view class="blacklist-left">
           <image class="blacklist-img" src="/static/img/temporary/4.png" mode="aspectFill"></image>
         </view>
         <view class="blacklist-right">
           <view class="blacklist-title">
             <view class="title-text sys-color-black sys-weight-600 sys-height-44">江小明</view>
-            <view class="title-icon">
+            <view class="title-icon" @click.stop="showDel(item,i)">
               <text class="iconfont sys-height-44 sys-color-black">&#xe74b;</text>
             </view>
           </view>
@@ -20,12 +20,19 @@
         </view>
       </view>
     </scroll-view>
+    <uni-popup ref="alertDialog" type="dialog">
+      <uni-popup-dialog type="center" cancelText="取消"
+                        confirmText="确定" title="移除黑名单" content="是否移除黑名单"
+                        @confirm="delBlackItem()"
+                        @close="close()"></uni-popup-dialog>
+    </uni-popup>
   </view>
 </template>
 
 <script>
 import EnNav from "@/components/en-utils/en-nav/en-nav";
-import {getBlackList} from "@/api/my";
+import {delBlackItem, getBlackList} from "@/api/my";
+import tools from "@/service/tools";
 export default {
   components: {EnNav},
   data() {
@@ -35,6 +42,8 @@ export default {
       isAjax:false,
       total:undefined,
       page:1,
+      selectItem:{},
+      selectIndex:0,
     }
   },
   mounted() {
@@ -44,6 +53,27 @@ export default {
     setNavHeight(navHeight){
       this.navHeight=navHeight
     },
+    close(){
+      this.isPop = false;
+      this.$refs.alertDialog.close()
+    },
+    showDel(selectItem,selectIndex){
+      this.selectItem=selectItem
+      this.selectIndex=selectIndex
+      this.$refs.alertDialog.open()
+    },
+    delBlackItem(){
+      delBlackItem(this.selectItem.id).then((res)=>{
+        if(res.code===1){
+          tools.success('取消成功')
+          this.close()
+          this.list.splice(this.selectIndex,1)
+
+        }else {
+          tools.error(res.msg)
+        }
+      })
+    },
     startList(){
       if(this.userId<=0){
         // return false

+ 8 - 0
uni_modules/uni-popup/changelog.md

@@ -1,3 +1,11 @@
+## 1.8.3(2023-04-17)
+- 修复 uni-popup 重复打开时的 bug
+## 1.8.2(2023-02-02)
+- uni-popup-dialog 组件新增 inputType 属性
+## 1.8.1(2022-12-01)
+- 修复 nvue 下 v-show 报错
+## 1.8.0(2022-11-29)
+- 优化 主题样式
 ## 1.7.9(2022-04-02)
 - 修复 弹出层内部无法滚动的bug
 ## 1.7.8(2022-03-28)

+ 5 - 1
uni_modules/uni-popup/components/uni-popup-dialog/uni-popup-dialog.vue

@@ -10,7 +10,7 @@
 		</view>
 		<view v-else class="uni-dialog-content">
 			<slot>
-				<input class="uni-dialog-input" v-model="val" type="text" :placeholder="placeholderText" :focus="focus" >
+				<input class="uni-dialog-input" v-model="val" :type="inputType" :placeholder="placeholderText" :focus="focus" >
 			</slot>
 		</view>
 		<view class="uni-dialog-button-group">
@@ -57,6 +57,10 @@
 		mixins: [popup],
 		emits:['confirm','close'],
 		props: {
+			inputType:{
+				type: String,
+				default: 'text'
+			},
 			value: {
 				type: [String, Number],
 				default: ''

+ 2 - 4
uni_modules/uni-popup/components/uni-popup/uni-popup.vue

@@ -195,8 +195,7 @@
 					this.safeAreaInsets = screenHeight - safeArea.bottom
 					// #endif
 					// #ifndef MP-WEIXIN
-					// this.safeAreaInsets = safeAreaInsets.bottom
-					this.safeAreaInsets = 0
+					this.safeAreaInsets = safeAreaInsets.bottom
 					// #endif
 				} else {
 					this.safeAreaInsets = 0
@@ -270,8 +269,7 @@
 			open(direction) {
 				// fix by mehaotian 处理快速打开关闭的情况
 				if (this.showPopup) {
-					clearTimeout(this.timer)
-					this.showPopup = false
+					return
 				}
 				let innerType = ['top', 'center', 'bottom', 'left', 'right', 'message', 'dialog', 'share']
 				if (!(direction && innerType.indexOf(direction) !== -1)) {

+ 5 - 8
uni_modules/uni-popup/package.json

@@ -1,7 +1,7 @@
 {
 	"id": "uni-popup",
 	"displayName": "uni-popup 弹出层",
-	"version": "1.7.9",
+	"version": "1.8.3",
 	"description": " Popup 组件,提供常用的弹层",
 	"keywords": [
         "uni-ui",
@@ -17,12 +17,8 @@
 	"directories": {
 		"example": "../../temps/example_temps"
 	},
-	"dcloudext": {
-		"category": [
-			"前端组件",
-			"通用组件"
-		],
-		"sale": {
+    "dcloudext": {
+        "sale": {
 			"regular": {
 				"price": "0.00"
 			},
@@ -38,7 +34,8 @@
 			"data": "无",
 			"permissions": "无"
 		},
-		"npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
+        "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
+        "type": "component-vue"
 	},
 	"uni_modules": {
 		"dependencies": [

+ 2 - 0
uni_modules/uni-transition/changelog.md

@@ -1,3 +1,5 @@
+## 1.3.2(2023-05-04)
+- 修复 NVUE 平台报错的问题
 ## 1.3.1(2021-11-23)
 - 修复 init 方法初始化问题
 ## 1.3.0(2021-11-19)

+ 4 - 1
uni_modules/uni-transition/components/uni-transition/createAnimation.js

@@ -10,7 +10,10 @@ const nvueAnimation = uni.requireNativePlugin('animation')
 class MPAnimation {
 	constructor(options, _this) {
 		this.options = options
-		this.animation = uni.createAnimation(options)
+		// 在iOS10+QQ小程序平台下,传给原生的对象一定是个普通对象而不是Proxy对象,否则会报parameter should be Object instead of ProxyObject的错误
+		this.animation = uni.createAnimation({
+			...options
+		})
 		this.currentStepAnimates = {}
 		this.next = 0
 		this.$ = _this

+ 11 - 2
uni_modules/uni-transition/components/uni-transition/uni-transition.vue

@@ -1,5 +1,10 @@
 <template>
-	<view v-if="isShow" ref="ani" :animation="animationData" :class="customClass" :style="transformStyles" @click="onClick"><slot></slot></view>
+  <!-- #ifndef APP-NVUE -->
+  <view v-show="isShow" ref="ani" :animation="animationData" :class="customClass" :style="transformStyles" @click="onClick"><slot></slot></view>
+  <!-- #endif -->
+  <!-- #ifdef APP-NVUE -->
+  <view v-if="isShow" ref="ani" :animation="animationData" :class="customClass" :style="transformStyles" @click="onClick"><slot></slot></view>
+  <!-- #endif -->
 </template>
 
 <script>
@@ -48,7 +53,11 @@ export default {
 		customClass:{
 			type: String,
 			default: ''
-		}
+		},
+		onceRender:{
+			type:Boolean,
+			default:false
+		},
 	},
 	data() {
 		return {

+ 4 - 7
uni_modules/uni-transition/package.json

@@ -1,7 +1,7 @@
 {
   "id": "uni-transition",
   "displayName": "uni-transition 过渡动画",
-  "version": "1.3.1",
+  "version": "1.3.2",
   "description": "元素的简单过渡动画",
   "keywords": [
     "uni-ui",
@@ -17,11 +17,7 @@
   "directories": {
     "example": "../../temps/example_temps"
   },
-  "dcloudext": {
-    "category": [
-      "前端组件",
-      "通用组件"
-    ],
+"dcloudext": {
     "sale": {
       "regular": {
         "price": "0.00"
@@ -38,7 +34,8 @@
       "data": "无",
       "permissions": "无"
     },
-    "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
+    "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
+    "type": "component-vue"
   },
   "uni_modules": {
     "dependencies": ["uni-scss"],