|
@@ -5,15 +5,8 @@
|
|
<view class="list-scroll-view">
|
|
<view class="list-scroll-view">
|
|
<view class="main">
|
|
<view class="main">
|
|
<view class="zero one">
|
|
<view class="zero one">
|
|
- <view class="one_1">
|
|
|
|
- <input type="text" placeholder="搜索商品" @tap="toCommon('pagesHome/market/search')"
|
|
|
|
- placeholder-class="placss">
|
|
|
|
- </view>
|
|
|
|
- <view class="one_2" @tap="toNotice()">
|
|
|
|
- <uni-badge :text="notice_total" absolute="rightTop" size="normal">
|
|
|
|
- <text class="iconfont icon-xiaoxitongzhi"></text>
|
|
|
|
- </uni-badge>
|
|
|
|
- </view>
|
|
|
|
|
|
+ <input type="text" placeholder="搜索商品" @tap="toCommon('pagesHome/market/search')"
|
|
|
|
+ placeholder-class="placss">
|
|
</view>
|
|
</view>
|
|
<view class="zero two">
|
|
<view class="zero two">
|
|
<swiper class="swiper" circular :indicator-dots="true" indicator-color="#ffffff"
|
|
<swiper class="swiper" circular :indicator-dots="true" indicator-color="#ffffff"
|
|
@@ -127,8 +120,6 @@
|
|
skip: 0,
|
|
skip: 0,
|
|
limit: 10,
|
|
limit: 10,
|
|
page: 0,
|
|
page: 0,
|
|
- // 未读消息
|
|
|
|
- notice_total: 0,
|
|
|
|
// 返回顶部
|
|
// 返回顶部
|
|
scrollTop: 0,
|
|
scrollTop: 0,
|
|
old_scrollTop: 0
|
|
old_scrollTop: 0
|
|
@@ -137,7 +128,6 @@
|
|
onLoad: async function() {
|
|
onLoad: async function() {
|
|
const that = this;
|
|
const that = this;
|
|
await that.search();
|
|
await that.search();
|
|
- await that.notice();
|
|
|
|
},
|
|
},
|
|
onPullDownRefresh: async function() {
|
|
onPullDownRefresh: async function() {
|
|
const that = this;
|
|
const that = this;
|
|
@@ -146,23 +136,6 @@
|
|
uni.stopPullDownRefresh();
|
|
uni.stopPullDownRefresh();
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- // 消息通知
|
|
|
|
- notice() {
|
|
|
|
- const that = this;
|
|
|
|
- uni.getStorage({
|
|
|
|
- key: 'token',
|
|
|
|
- success: async (res) => {
|
|
|
|
- let user = that.$jwt(res.data);
|
|
|
|
- if (user && user._id) {
|
|
|
|
- let res = await that.$api(`/notice`, 'GET', {
|
|
|
|
- customer: user._id,
|
|
|
|
- status: '0'
|
|
|
|
- });
|
|
|
|
- if (res.errcode == '0') that.$set(that, `notice_total`, res.total);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
async search() {
|
|
async search() {
|
|
const that = this;
|
|
const that = this;
|
|
let res;
|
|
let res;
|
|
@@ -213,12 +186,6 @@
|
|
that.$set(that, `total`, res.total)
|
|
that.$set(that, `total`, res.total)
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- // 系统消息页
|
|
|
|
- toNotice() {
|
|
|
|
- uni.navigateTo({
|
|
|
|
- url: `/pagesHome/notice/index`
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
// 公共跳转
|
|
// 公共跳转
|
|
toCommon(e) {
|
|
toCommon(e) {
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
@@ -337,36 +304,20 @@
|
|
}
|
|
}
|
|
|
|
|
|
.one {
|
|
.one {
|
|
- display: flex;
|
|
|
|
- justify-content: center;
|
|
|
|
- align-items: center;
|
|
|
|
-
|
|
|
|
- .one_1 {
|
|
|
|
- width: 88vw;
|
|
|
|
- background-color: var(--fFB1Color);
|
|
|
|
- border-radius: 20px;
|
|
|
|
- padding: 0 2vw;
|
|
|
|
-
|
|
|
|
- input {
|
|
|
|
- font-size: var(--font15Size);
|
|
|
|
- color: var(--fffColor);
|
|
|
|
- border-radius: 14px;
|
|
|
|
- width: 100%;
|
|
|
|
- padding: 1.5vw 0;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- .placss {
|
|
|
|
- color: var(--fffColor);
|
|
|
|
- }
|
|
|
|
|
|
+ background-color: var(--fFB1Color);
|
|
|
|
+ border-radius: 20px;
|
|
|
|
+ padding: 0 2vw;
|
|
|
|
+
|
|
|
|
+ input {
|
|
|
|
+ font-size: var(--font15Size);
|
|
|
|
+ color: var(--fffColor);
|
|
|
|
+ border-radius: 14px;
|
|
|
|
+ width: 100%;
|
|
|
|
+ padding: 1.5vw 0;
|
|
}
|
|
}
|
|
|
|
|
|
- .one_2 {
|
|
|
|
- width: 12vw;
|
|
|
|
- text-align: center;
|
|
|
|
-
|
|
|
|
- .iconfont {
|
|
|
|
- font-size: 24px;
|
|
|
|
- }
|
|
|
|
|
|
+ .placss {
|
|
|
|
+ color: var(--fffColor);
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|