Browse Source

消息数提示

codeMan 1 year ago
parent
commit
441e882433
3 changed files with 108 additions and 25 deletions
  1. 12 1
      cloud/commodityAdjustment/detail.vue
  2. 34 13
      pages/index/cloud/workbench.vue
  3. 62 11
      pages/index/index/userCenter.vue

+ 12 - 1
cloud/commodityAdjustment/detail.vue

@@ -83,11 +83,11 @@ export default {
             // if (is) return this.loading = false
             this.$refs.form.submit().then(data => {
                 let form = Object.assign({},that.detail,data)
+                form.sys_enterpriseid = uni.getStorageSync('shop').sys_enterpriseid
                 this.$Http.basic({
                     "id": 20240428154102,
                     "content": form
                 }).then(async res => {
-                    this.loading = false;
                     console.log("修改信息", res)
                     if (this.cutoff(res.msg)) return;
                     that.getDetail()
@@ -96,6 +96,7 @@ export default {
                     })
                     this.$Http.editProduct()
                     setTimeout(() => {
+                        this.loading = false;
                         uni.navigateBack()
                     },400)
                 })
@@ -192,6 +193,16 @@ export default {
                     value: "",
                     paddingBottom:15,
                     descript:'官方指导价:',
+                },{
+                    key: "tag",
+                    type: "text",
+                    inputmode:'text',
+                    label: "标签",
+                    isMust: false,//是否必填
+                    value: "",
+                    paddingBottom:15,
+                    borderRadius:true,
+                    descript:'官方建议:'
                 },{
                     key: "isonsale",
                     type: "radio",

+ 34 - 13
pages/index/cloud/workbench.vue

@@ -35,6 +35,7 @@
                     <view class="box">
                         <text class="left">{{ item.remark }}</text>
                         <view class="right">
+                            <view class="tag">{{ item.count }}</view>
                             <u-icon name="arrow-right" color="#999999"></u-icon>
                         </view>
                     </view>
@@ -94,23 +95,42 @@ export default {
                 delete this.$Http.refreshUserInfoData
             }.bind(this)
         },
-        init(callBack) {
-            callBack()
-            this.list = Object.values(uni.getStorageSync('authList').工作台)
-            this.list2 = Object.values(uni.getStorageSync('authList').工作台导航)
-            this.list = this.dye(this.list, this.colors, 1)
-            this.getUserInfo()
+        async init(callBack) {
+            this.getUserInfo().then(() => {
+                callBack()
+            })
             this.updatePage = false;
         },
         async getUserInfo() {
-            let res = await this.$Http.basic({
-                "id": "20240510104102",
-                "content": {}
+            return new Promise(async (resolve) => {
+                let res = await this.$Http.basic({
+                    "id": "20240510104102",
+                    "content": {}
+                })
+                if (this.cutoff(res.msg)) return;
+                this.userInfoValue = res.data
+                this.userInfoValue.headpic = this.userInfoValue.attinfos.find(v => v.usetype == "headportrait") && this.userInfoValue.attinfos.find(v => v.usetype == "headportrait").url || '';
+
+                await this.$Http.basic({
+                    "id": 20240510104102,
+                    "content": {
+                    }
+                }).then(res => {
+                    let data = res.data
+                    let temp = uni.getStorageSync('authList').工作台导航
+                    temp.中奖明细.count = data.count_awardmx
+                    temp.通讯录.count = data.count_addressbook
+                    temp.我的预约.count = data.count_appointment
+                    temp.我的收藏.count = data.count_collect
+                    temp.考试成绩.count = data.count_coursewaretest
+                    temp.意见反馈.count = data.count_feedback
+                    this.list2 = Object.values(temp)
+                    resolve()
+                })
+                this.list = Object.values(uni.getStorageSync('authList').工作台)
+                this.list = this.dye(this.list, this.colors, 1)
             })
-            if (this.cutoff(res.msg)) return;
-            this.userInfoValue = res.data
-            this.userInfoValue.headpic = this.userInfoValue.attinfos.find(v => v.usetype == "headportrait") && this.userInfoValue.attinfos.find(v => v.usetype == "headportrait").url || '';
-            console.log(this.userInfoValue, '用户信息')
+            
         },
         toDailyYttendance() {
             this.$Http.updateUserInfo = this.getUserInfo.bind(this)
@@ -260,6 +280,7 @@ export default {
                         font-weight: 400;
                         font-size: 10px;
                         color: #FFFFFF;
+                        margin-right: 10px;
                     }
                 }
             }

+ 62 - 11
pages/index/index/userCenter.vue

@@ -8,13 +8,23 @@
 				<view class="text-style">
 					我的访问店铺
 				</view>
-				<view class="iconfont icon-a-wodetiaozhuan icon-style-long"></view>
+				<view class="right">
+					<view class="tag">
+						{{ countObj.count_historystore }}
+					</view>
+					<view class="iconfont icon-a-wodetiaozhuan icon-style-long"></view>
+				</view>
 			</navigator>
 			<navigator class="border-list-content" url="/cloud/mySubscription/index" hover-class="navigator-hover">
 				<view class="text-style">
 					我的预约
 				</view>
-				<view class="iconfont icon-a-wodetiaozhuan icon-style"></view>
+				<view class="right">
+					<view class="tag">
+						{{ countObj.count_appointment }}
+					</view>
+					<view class="iconfont icon-a-wodetiaozhuan icon-style"></view>
+				</view>
 			</navigator>
 			<!--        <navigator class="border-list-content" url="" hover-class="navigator-hover">
           <view class="text-style">优惠券</view>
@@ -22,16 +32,31 @@
         </navigator> -->
 			<navigator class="border-list-content" url="/store/deliveryAddress/index" hover-class="navigator-hover">
 				<view class="text-style">收货地址</view>
-				<view class="iconfont icon-a-wodetiaozhuan icon-style"></view>
+				<view class="right">
+					<view class="tag">
+						{{ countObj.count_address }}
+					</view>
+					<view class="iconfont icon-a-wodetiaozhuan icon-style"></view>
+				</view>
 			</navigator>
 			<navigator class="border-list-content" url="/cloud/winningNews/index" hover-class="navigator-hover"
 				v-if="isWinning">
 				<view class="text-style">中奖信息</view>
-				<view class="iconfont icon-a-wodetiaozhuan icon-style"></view>
+				<view class="right">
+					<view class="tag">
+						{{ countObj.count_awardmx }}
+					</view>
+					<view class="iconfont icon-a-wodetiaozhuan icon-style"></view>
+				</view>
 			</navigator>
 			<navigator class="border-list-content" url="/cloud/collect/mylist" hover-class="navigator-hover">
 				<view class="text-style">我的收藏</view>
-				<view class="iconfont icon-a-wodetiaozhuan icon-style"></view>
+				<view class="right">
+					<view class="tag">
+						{{ countObj.count_collect }}
+					</view>
+					<view class="iconfont icon-a-wodetiaozhuan icon-style"></view>
+				</view>
 			</navigator>
 			<!-- <navigator class="border-list-bottom" url="" hover-class="navigator-hover">
 				<view class="text-style">活动订单</view>
@@ -49,7 +74,8 @@ export default {
 		return {
 			updatePage: true,
 			isWinning: true,
-			userInfoValue: {}
+			userInfoValue: {},
+			countObj:{}
 		}
 	},
 	methods: {
@@ -66,9 +92,17 @@ export default {
 					"id": "20240510104102",
 					"content": {}
 				})
-				resolve()
+                if (this.cutoff(res.msg)) return;
+				await this.$Http.basic({
+                    "id": 20240510104102,
+                    "content": {
+                    }
+                }).then(res => {
+					this.countObj = res.data
+					console.log(this.countObj,'数据');
+                    resolve()
+                })
 				this.userInfoValue = res.data
-				console.log(this.userInfoValue, '用户信息')
 			})
 
 		},
@@ -102,6 +136,7 @@ export default {
 	background: #FFFFFF;
 	border-bottom: 1px solid #F7F7F7;
 	display: flex;
+	justify-content: space-between;
 	margin-left: 10px;
 }
 
@@ -109,12 +144,14 @@ export default {
 	background: #FFFFFF;
 	border-bottom: 1px solid #F7F7F7;
 	display: flex;
+	justify-content: space-between;
 	margin-left: 10px;
 }
 
 .border-list-bottom {
 	background: #FFFFFF;
 	display: flex;
+	justify-content: space-between;
 	margin-left: 10px;
 }
 
@@ -134,13 +171,27 @@ export default {
 
 .icon-style-long {
 	color: #999999;
-	margin-left: 200px;
 	padding: 15px 15px 15px 10px;
 }
 
 .icon-style {
 	color: #999999;
-	margin-left: 227px;
-	padding: 15px 15px 15px 10px;
+	padding: 15px 10px 15px 10px;
+}
+
+.right {
+	display: flex;
+	align-items: center;
+	align-content: center;
+
+	.tag {
+		background: #BBBBBB;
+		border-radius: 50px 50px 50px 50px;
+		padding: 3px 12px;
+		font-family: PingFang SC, PingFang SC;
+		font-weight: 400;
+		font-size: 10px;
+		color: #FFFFFF;
+	}
 }
 </style>