This commit is contained in:
zmr900709 2020-07-09 16:35:23 +08:00
parent 3d8cfd23d4
commit 10bbccc2bd
7 changed files with 139 additions and 37 deletions

View File

@ -222,6 +222,30 @@ export default {
getOrderInfo({ order_id }) { getOrderInfo({ order_id }) {
return vm.$u.post('Goods/orderInfo', { order_id }); return vm.$u.post('Goods/orderInfo', { order_id });
}, },
// 信息模块
messageIndex({ }) {
return vm.$u.post('Message/messageIndex', { });
},
// 公告咨询列表
informationList({ }) {
return vm.$u.post('Message/informationList', { });
},
// 关注列表
snsfriendList({ }) {
return vm.$u.post('message/snsfriendList', { });
},
// 公告消息列表
informationInfo({ }) {
return vm.$u.post('message/informationInfo', { });
},
// 活动消息列表
messageactivityList({ }) {
return vm.$u.post('message/messageactivityList', { });
},
// 全部已读接口
delMessage({ type }) {
return vm.$u.post('message/delMessage', { type });
},
} }
} }
} }

View File

@ -53,6 +53,7 @@
</style> </style>
<script> <script>
export default { export default {
props:['information'],
name: "info_title", name: "info_title",
data() { data() {
@ -110,6 +111,11 @@
default: default:
break; break;
} }
},
//
messageIndex(){
console.log("333")
} }
} }
} }

View File

@ -4,11 +4,11 @@
<view class="activity" v-for="(item, index) in actives" :key="index"> <view class="activity" v-for="(item, index) in actives" :key="index">
<view class="times">{{item.type}}</view> <view class="times">{{item.type}}</view>
<view class="content"> <view class="content">
<view class="title">{{item.name}}</view> <view class="title">{{item.title}}</view>
<view class="images_about"> <view class="images_about">
<image :src="item.url"></image> <image :src="item.goods_image"></image>
<view> <view>
<text>{{item.about}}</text> <text>{{item.summary}}</text>
</view> </view>
</view> </view>
</view> </view>
@ -21,43 +21,23 @@
data() { data() {
return { return {
actives: [ actives: [
{
url: '../../pageE/static/mine/1.png',
name: '百元趋势新品',
type: '2020-05-14 20:11',
about: '百搭休闲格纹裙!你值得有用!'
},
{
url: '../../pageE/static/mine/1.png',
name: '百元趋势新品',
type: '2020-05-14 20:11',
about: '百搭休闲格纹裙!你值得有用!'
},
{
url: '../../pageE/static/mine/1.png',
name: '百元趋势新品',
type: '2020-05-14 20:11',
about: '百搭休闲格纹裙!你值得有用!'
},
{
url: '../../pageE/static/mine/1.png',
name: '百元趋势新品',
type: '2020-05-14 20:11',
about: '百搭休闲格纹裙!你值得有用!'
},
{
url: '../../pageE/static/mine/1.png',
name: '百元趋势新品',
type: '2020-05-14 20:11',
about: '百搭休闲格纹裙!你值得有用!'
},
] ]
}; };
}, },
onLoad(){
this.messageactivityList()
},
methods: { methods: {
titletext(){ titletext(){
console.log("22345") console.log("22345")
},
//
messageactivityList(){
this.$u.api.messageactivityList({}).then((res)=>{
console.log(res)
this.actives = res.data
})
} }
}, },
components:{ components:{
@ -66,6 +46,9 @@
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
uni-page-body{
height: 100%;
}
#actives{ #actives{
background: #ECECEC; background: #ECECEC;
height: 100%; height: 100%;
@ -106,6 +89,10 @@
width: 400rpx; width: 400rpx;
padding-left: 15rpx; padding-left: 15rpx;
line-height: 36rpx; line-height: 36rpx;
display: block;
overflow:hidden; //
text-overflow:ellipsis; //
white-space:nowrap; //
} }
view{ view{
display: inline-block; display: inline-block;

View File

@ -52,6 +52,9 @@
] ]
}; };
}, },
onLoad(){
this.snsfriendList()
},
methods: { methods: {
// //
tapClick(index) { tapClick(index) {
@ -63,6 +66,12 @@
this.rSelect.splice(this.rSelect.indexOf(index), 1); // this.rSelect.splice(this.rSelect.indexOf(index), 1); //
} }
},
snsfriendList(){
this.$u.api.snsfriendList({}).then((res)=>{
console.log(res)
// this.attention = res.data
})
} }
}, },
components: { components: {

View File

@ -12,9 +12,17 @@
return { return {
}; };
}, },
onLoad(){
this.informationList()
},
methods: { methods: {
titletext(){ titletext(){
console.log("22345") console.log("22345")
},
informationList(){
this.$u.api.informationList({}).then((res)=>{
console.log(res)
})
} }
}, },
components:{ components:{

View File

@ -2,7 +2,7 @@
<view> <view>
<u-navbar :is-back="false" :title-size="36" title="消息"> <u-navbar :is-back="false" :title-size="36" title="消息">
<view class="slot-wrap"> <view class="slot-wrap">
<image src="../../static/pageD/info(3).png"></image> <image src="../../static/pageD/info(3).png" @click="delMessage()"></image>
<image src="../../static/pageD/info(2).png"></image> <image src="../../static/pageD/info(2).png"></image>
</view> </view>
</u-navbar> </u-navbar>
@ -11,7 +11,7 @@
</view> </view>
<view class="sousuo"></view> <view class="sousuo"></view>
<view class="backes"> <view class="backes">
<titles></titles> <titles :information="information_dles"></titles>
</view> </view>
<!-- 消息通知 --> <!-- 消息通知 -->
<view class="backes"> <view class="backes">
@ -20,12 +20,13 @@
<view> <view>
<image :src="item.url"></image> <image :src="item.url"></image>
</view> </view>
<view class="title">{{item.text}}</view> <view class="title">{{item.title}}</view>
<view class="contentes">{{item.contentes}}</view> <view class="contentes">{{item.contentes}}</view>
<view class="times">{{item.title}}</view> <view class="times">{{item.title}}</view>
</view> </view>
</view> </view>
</view> </view>
<u-toast ref="uToast" />
</view> </view>
</template> </template>
@ -34,6 +35,29 @@
export default { export default {
data() { data() {
return { return {
information_dles : [{
id: 0,
url: '../../static/pageD/info(11).png',
text: '公告/资讯'
},
{
id: 0,
url: '../../static/pageD/info(6).png',
text: '活动消息'
},
{
id: 0,
url: '../../static/pageD/info(14).png',
text: '交易物流'
},
{
id: 0,
url: '../../static/pageD/info(15).png',
text: '关注消息'
},
],
// //
information_dl: [{ information_dl: [{
id: 0, id: 0,
@ -63,6 +87,10 @@
show: false show: false
}; };
}, },
onLoad() {
// /
this.messageIndex()
},
methods: { methods: {
// checkbox // checkbox
checkboxChange(e) { checkboxChange(e) {
@ -75,6 +103,46 @@
mask_u() { mask_u() {
this.show = !this.show this.show = !this.show
}, },
//
messageIndex(){
console.log("消息模块的读取消息模块的读取消息模块的读取")
this.$u.api.messageIndex({}).then((res)=>{
console.log(res)
let data = res.data.allMessages;
for(let i in data){
var type = data[i].type;
console.log(data[i].type)
var array = []
array.push(type)
}
console.log( array)
//
for(let j = 0; j < this.information_dles.length; j++ ){
console.log()
// this.information_dles[j].type = type;
for(let k = 0; k < array.length; k++ ){
this.information_dles[j].type = array[k];
console.log( array[k])
}
}
console.log(this.information_dles)
})
},
//
delMessage(){
this.$u.api.delMessage({
type : "all"
}).then((res)=>{
console.log(res)
if(res.errCode == 0){
this.$refs.uToast.show({
title: '清除成功',
type: 'success'
})
}
})
}
}, },
components: { components: {