1
0

2 コミット d68a75459d ... 0e6d10beab

作者 SHA1 メッセージ 日付
  py 0e6d10beab Merge branch 'master' of http://git.lcpcp.cc/root/lcoco 1 年間 前
  py 1754bc92af no message 1 年間 前
8 ファイル変更187 行追加19 行削除
  1. 2 1
      api/common.js
  2. 10 0
      api/message.js
  3. 10 7
      api/my.js
  4. 7 0
      pages.json
  5. 24 3
      pages/msg/index.vue
  6. 117 0
      pages/msg/model/address-book.vue
  7. 17 8
      pages/my/set/blacklist.vue
  8. BIN
      static/img/msg/jl.png

+ 2 - 1
api/common.js

@@ -1,8 +1,9 @@
 import {request} from '@/service/ajax'
 
-const commonUrl = '/admin/utility/'
+const common = '/admin/common/'
 // 发送短信
 export const commonSend = (data) => request(commonUrl + 'send', 'post', { ...data })
 // 获取sts
 export const getTxySts = (data) => request(commonUrl + 'credential', 'get', { ...data })
 
+

+ 10 - 0
api/message.js

@@ -0,0 +1,10 @@
+import {request} from '@/service/ajax'
+
+const message = '/admin/message/'
+
+// 消息列表
+export const messageList = (data) => request(message + 'list', 'post', { ...data })
+// 发消息
+export const messageSaveMessage = (data) => request(message + 'saveMessage', 'post', { ...data })
+// 获取通讯录
+export const messageGetContacts = (data) => request(message + 'getContacts', 'post', { ...data })

+ 10 - 7
api/my.js

@@ -1,8 +1,10 @@
-import { request } from '@/service/ajax'
+import {
+	request
+} from '@/service/ajax'
 // 商品模块路由
 const goodsUrl = '/admin/'
 // 猜你喜欢
-export const getMemberInfo = (data) => request(goodsUrl + 'myself', 'get', {  })
+export const getMemberInfo = (data) => request(goodsUrl + 'myself', 'get', {})
 export const getMyMoments = (data) => request(goodsUrl + 'myself/myMoments', 'post', data)
 export const getMyLikeMoments = (data) => request(goodsUrl + 'myself/moments', 'post', data)
 //获取充值金额
@@ -15,15 +17,16 @@ export const getCashFlowHistoryPage = (data) => request(goodsUrl + 'myself/getCa
 export const getDailyEarnings = (data) => request(goodsUrl + 'myself/getDailyEarnings', 'post', data)
 //黑名单列表
 export const getBlackList = (data) => request(goodsUrl + 'myself/blacklist', 'post', data)
-export const delBlackItem = (data) => request(goodsUrl + 'myself/blacklist/'+data, 'delete', {})
+//撤销拉黑
+export const operateBlackList = (data) => request(goodsUrl + 'myself/blacklist/' + data, 'delete', {})
+
+export const delBlackItem = (data) => request(goodsUrl + 'myself/blacklist/' + data, 'delete', {})
 //兑换码
 export const exchangeCode = (data) => request(goodsUrl + 'myself/exchangeCode', 'post', data)
-
-
 // 喜欢我的人的列表
 export const likeMeList = (data) => request(goodsUrl + 'utility/likeMe', 'post', data)
-
 // 获取当前客户VIP信息
 export const getUserVip = (data) => request(goodsUrl + 'myself/getUserVip', 'get', data)
 // 购买VIP
-export const buyVip = (data) => request(goodsUrl + 'myself/buyVip', 'post', data)
+export const buyVip = (data) => request(goodsUrl + 'myself/buyVip', 'post', data)
+

+ 7 - 0
pages.json

@@ -451,6 +451,13 @@
 				"enablePullDownRefresh": false,
 				"navigationBarTextStyle": "white"
 			}
+		},
+		{
+			"path": "pages/msg/model/address-book",
+			"style": {
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": false
+			}
 		}
 	],
 	"globalStyle": {

+ 24 - 3
pages/msg/index.vue

@@ -10,7 +10,7 @@
 			<view class="nav-text sys-size-36 sys-weight-600 sys-color-black-3">
 				消息
 			</view>
-			<image class="nav-right" src="@/static/img/msg/tx.png" mode=""></image>
+			<image class="nav-right" src="@/static/img/msg/tx.png" mode="" @click="goToUrl"></image>
 		</view>
 		<view class="msg-content">
 			<view class="xpy-title sys-size-32 sys-weight-600 sys-color-black">
@@ -58,14 +58,35 @@
 </template>
 
 <script>
+	import {
+		messageList
+	} from "@/api/message.js"
 	export default {
 		data() {
 			return {
-
+				page: 1,
 			}
 		},
+		mounted() {
+			this.messageList()
+		},
 		methods: {
-
+			messageList() {
+				messageList({
+					'pageNo': this.page,
+					'pageSize': '',
+				}).then((res) => {
+					console.log(res);
+					if (res.code === 0) {
+						console.log("111111");
+					}
+				})
+			},
+			goToUrl() {
+				uni.navigateTo({
+					url: "/pages/msg/model/address-book"
+				})
+			},
 		}
 	}
 </script>

+ 117 - 0
pages/msg/model/address-book.vue

@@ -0,0 +1,117 @@
+<template>
+	<view class="address-book">
+		<EnNav title="通讯录" title-color="#333333" :rightShow="true" :rightType="2">
+			<view slot="right">
+				<view class="nav-right sys-size-28 sys-weight-600 sys-color-black">
+					<view>
+						距离
+					</view>
+					<image class="jl-img" src="@/static/img/msg/jl.png" mode=""></image>
+				</view>
+			</view>
+		</EnNav>
+		<view class="content">
+			<view class="list-box">
+				<image class="item-img sys-radius-round" src="../../../static/img/login/2.jpg" mode=""></image>
+				<view class="item-right">
+					<view class="item-right-one sys-size-32 sys-weight-600 sys-color-black">
+						古驰古驰古驰古驰古驰古驰...
+					</view>
+					<view class="item-right-two">
+						<view class="sys-size-28 sys-color-gray-9">
+							和他配于4月16日
+						</view>
+						<view class="sys-size-28 sys-color-gray-9">
+							1.01km
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="">
+
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		messageGetContacts
+	} from "@/api/message.js"
+	import EnNav from "@/components/en-utils/en-nav/en-nav";
+	export default {
+		components: {
+			EnNav
+		},
+		data() {
+			return {
+				listData: [],
+				page: 1,
+			};
+		},
+		mounted() {
+			this.messageGetContacts()
+		},
+		methods: {
+			messageGetContacts() {
+				messageGetContacts({
+					'pageNo': this.page,
+					'pageSize': '',
+				}).then((res) => {
+					console.log(res);
+				})
+			},
+		},
+	}
+</script>
+<style scoped lang="scss">
+	.address-book {
+		.nav-right {
+			display: flex;
+			align-items: center;
+
+			.jl-img {
+				width: 13rpx;
+				height: 8rpx;
+				margin: 0 0 0 8rpx;
+			}
+		}
+
+		.content {
+			padding: 40rpx 32rpx 0;
+			box-sizing: border-box;
+
+			.list-box {
+				display: flex;
+				align-items: center;
+				margin: 0 0 40rpx 0;
+
+				.item-img {
+					width: 112rpx;
+					height: 112rpx;
+					flex-shrink: 0;
+					margin: 0 20rpx 0 0;
+				}
+
+				.item-right {
+					width: 100%;
+
+					.item-right-one {
+						margin: 0 0 14rpx 0;
+						max-width: 400rpx;
+						white-space: nowrap;
+						text-overflow: ellipsis;
+						overflow: hidden;
+						word-break: break-all;
+					}
+
+					.item-right-two {
+						display: flex;
+						align-items: center;
+						justify-content: space-between;
+					}
+				}
+			}
+		}
+	}
+</style>

+ 17 - 8
pages/my/set/blacklist.vue

@@ -33,7 +33,8 @@
 	import EnNav from "@/components/en-utils/en-nav/en-nav";
 	import {
 		delBlackItem,
-		getBlackList
+		getBlackList,
+		operateBlackList
 	} from "@/api/my";
 	import tools from "@/service/tools";
 	import EnBlank from "@/components/en-utils/en-blank/en-blank";
@@ -51,6 +52,7 @@
 				page: 1,
 				selectItem: {},
 				selectIndex: 0,
+				targetUserId: '',
 			}
 		},
 		mounted() {
@@ -65,21 +67,30 @@
 				this.$refs.alertDialog.close()
 			},
 			showDel(selectItem, selectIndex) {
+				this.targetUserId = selectItem.userId
 				this.selectItem = selectItem
 				this.selectIndex = selectIndex
 				this.$refs.alertDialog.open()
 			},
 			delBlackItem() {
-				delBlackItem(this.selectItem.id).then((res) => {
+				operateBlackList(this.targetUserId).then((res) => {
 					if (res.code === 1) {
-						tools.success('取消成功')
+						tools.success(res.msg)
 						this.close()
-						this.list.splice(this.selectIndex, 1)
-
+						// this.list.splice(this.selectIndex, 1)
 					} else {
 						tools.error(res.msg)
 					}
 				})
+				// 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) {
@@ -90,8 +101,6 @@
 				this.total = undefined
 				this.page = 1
 				this.getBlackList()
-
-
 			},
 			getBlackList() {
 				if (this.isAjax) {
@@ -101,7 +110,7 @@
 				let that = this
 				getBlackList({
 					'pageNo': this.page,
-					'pageSize': '20'
+					'pageSize': '',
 				}).then((res) => {
 					this.isAjax = false
 					if (res.code === 0) {

BIN
static/img/msg/jl.png