Commit 2d052ddf authored by 罗林杰's avatar 罗林杰

修改互要微信

parent ebdc292d
...@@ -217,7 +217,7 @@ export function noReadMessageAllCount() { ...@@ -217,7 +217,7 @@ export function noReadMessageAllCount() {
method: 'get', method: 'get',
}) })
} }
// 新增访问量 // 发送要微信请求
export function wantWeChatTask(data) { export function wantWeChatTask(data) {
return request({ return request({
url: '/app/memInfo/weChatTask', url: '/app/memInfo/weChatTask',
...@@ -225,3 +225,11 @@ export function wantWeChatTask(data) { ...@@ -225,3 +225,11 @@ export function wantWeChatTask(data) {
data: data data: data
}) })
} }
// 查询要微信请求
export function getWeChatTask(data) {
return request({
url: '/app/memInfo/queryWeChatTaskRecord',
method: 'get',
data: data
})
}
\ No newline at end of file
...@@ -199,6 +199,8 @@ ...@@ -199,6 +199,8 @@
<!-- 向下滑动的箭头--> <!-- 向下滑动的箭头-->
<image v-show="showArrowDown" :src="baseUrl+'/user/arrow_down_sm.png'" mode="aspectFill" class="fixed_down"/> <image v-show="showArrowDown" :src="baseUrl+'/user/arrow_down_sm.png'" mode="aspectFill" class="fixed_down"/>
</view> </view>
<ELM ref="elm" :msg="tipMsg" :isConfirm="isConfirm" @confirm="confirm"></ELM>
</view> </view>
</template> </template>
...@@ -210,10 +212,12 @@ import {addFollow, addMemTraffic, addMessage, deleteFollow, isFollow, likeUser, ...@@ -210,10 +212,12 @@ import {addFollow, addMemTraffic, addMessage, deleteFollow, isFollow, likeUser,
import myPopup from '@/components/myPopup.vue' import myPopup from '@/components/myPopup.vue'
import {getOssUrl} from "../api/article"; import {getOssUrl} from "../api/article";
import {getDict} from "../api/system/dict/data"; import {getDict} from "../api/system/dict/data";
import ELM from '@/components/elm-toast/index.vue';
export default { export default {
components: { components: {
LsSwiper, LsSwiper,
myPopup myPopup,
ELM
}, },
data() { data() {
return { return {
...@@ -243,6 +247,8 @@ import {getDict} from "../api/system/dict/data"; ...@@ -243,6 +247,8 @@ import {getDict} from "../api/system/dict/data";
showArrowDown: true, showArrowDown: true,
isInit: true, isInit: true,
showTabbar: true, showTabbar: true,
tipMsg: '',
isConfirm: false,
scrollTop: 0, scrollTop: 0,
data: [], data: [],
}; };
...@@ -388,6 +394,10 @@ import {getDict} from "../api/system/dict/data"; ...@@ -388,6 +394,10 @@ import {getDict} from "../api/system/dict/data";
} }
if (res.data.code == 200){ if (res.data.code == 200){
this.getIsFollowed(); this.getIsFollowed();
} else {
this.tipMsg = "对方还未回应请求";
this.isConfirm = true;
this.$refs.elm.showDialog();
} }
}) })
}, },
...@@ -483,6 +493,10 @@ import {getDict} from "../api/system/dict/data"; ...@@ -483,6 +493,10 @@ import {getDict} from "../api/system/dict/data";
} }
addMemTraffic(form) addMemTraffic(form)
}, },
confirm() {
this.isConfirm = false;
this.backbar()
},
//返回按钮 //返回按钮
backbar() { backbar() {
uni.navigateBack({ uni.navigateBack({
......
...@@ -9,7 +9,12 @@ ...@@ -9,7 +9,12 @@
:safeAreaInsetBottom="false" :safeAreaInsetBottom="false"
> >
<u-tabbar-item text="拉黑" icon="close-circle-fill" @click="tabbarClick"/> <u-tabbar-item text="拉黑" icon="close-circle-fill" @click="tabbarClick"/>
<view style="margin-top: 5px">
<u-tabbar-item text="互要微信" icon="weixin-fill" @click="tabbarClick"/> <u-tabbar-item text="互要微信" icon="weixin-fill" @click="tabbarClick"/>
<view style="margin-top: -35px;margin-left: 60px">
<u-badge :isDot="true" type="error"></u-badge>
</view>
</view>
<u-tabbar-item text="互要联系方式" icon="phone-fill" @click="tabbarClick"/> <u-tabbar-item text="互要联系方式" icon="phone-fill" @click="tabbarClick"/>
</u-tabbar> </u-tabbar>
</view> </view>
...@@ -63,18 +68,27 @@ ...@@ -63,18 +68,27 @@
</view> </view>
</u-popup> </u-popup>
<u-popup :show="show" mode="bottom" @close="close" @open="open" customStyle="min-height: 20vh;width: 100vh;"> <u-popup :show="show" mode="bottom" @close="close" @open="open" customStyle="min-height: 20vh;width: 400px;">
<view> <view class="popup-content" style="border-bottom: 1px solid #e5e5e5;">
<text>对方微信号:111111111111111111</text> <text style="color: black;font-size: 18px">对方已同意你的请求</text>
</view>
<view style="margin-top: 20px;margin-left: 40px;margin-right:80px ;display: flex;justify-content: space-between">
<text style="color: black;font-size: 18px;margin-bottom: 40px">对方微信号:</text>
<view style="margin-top: 5px ">
<u-tooltip color="black" size="16" text="22222222222222222" overlay bgColor="#e3e4e6"></u-tooltip>
</view>
</view> </view>
</u-popup> </u-popup>
<ELM ref="elm" :msg="tipMsg" :isConfirm="isConfirm" @confirm="confirm"></ELM>
</view> </view>
</template> </template>
<script> <script>
import {addBlack, addMessage, telMessage, wantWeChatTask} from "../../api/user"; import {addBlack, addMessage, getWeChatTask, telMessage, wantWeChatTask} from "../../api/user";
import {getOssUrl} from "../../api/article"; import {getOssUrl} from "../../api/article";
import {getDict} from "../../api/system/dict/data"; import {getDict} from "../../api/system/dict/data";
import ELM from '@/components/elm-toast/index.vue';
export default { export default {
name: "info", name: "info",
...@@ -99,11 +113,20 @@ export default { ...@@ -99,11 +113,20 @@ export default {
leaveMessageOptions:{}, leaveMessageOptions:{},
//金币支付金额 //金币支付金额
payCount: 0, payCount: 0,
tipMsg: '',
isConfirm: false,
applyWxPayment:0,
acceptWxPayment:0,
wxTask:[]
} }
}, },
components: {
ELM
},
onLoad(options) { onLoad(options) {
this.targetId = options.targetId this.targetId = options.targetId
this.getLeaveMessageDict() this.getLeaveMessageDict()
this.getWantWeChatDict()
//导航栏高度 //导航栏高度
this.menuButtonInfo = uni.getMenuButtonBoundingClientRect() this.menuButtonInfo = uni.getMenuButtonBoundingClientRect()
const { const {
...@@ -124,6 +147,7 @@ export default { ...@@ -124,6 +147,7 @@ export default {
}, },
onShow(){ onShow(){
this.userInfo = uni.getStorageSync('userInfo') this.userInfo = uni.getStorageSync('userInfo')
this.getWxTask()
// 滚动到页面底部 // 滚动到页面底部
this.$nextTick(() => { this.$nextTick(() => {
this.pageScrollToBottom() this.pageScrollToBottom()
...@@ -138,7 +162,20 @@ export default { ...@@ -138,7 +162,20 @@ export default {
} }
if (e === 1){ if (e === 1){
//要微信 //要微信
//发送请求
if (this.wxTask.type == '0'){
this.wantWxC() this.wantWxC()
} else if (this.wxTask.type == '1'){
if (this.wxTask.targetId == this.targetId){
this.tipMsg = "对方还未回应请求";
this.isConfirm = true;
this.$refs.elm.showDialog();
} else {
this.openApply()
}
} else if (this.wxTask.type == '2' && this.wxTask.status == '1'){
this.open()
}
} }
}, },
//获取留言字典配置 //获取留言字典配置
...@@ -149,6 +186,15 @@ export default { ...@@ -149,6 +186,15 @@ export default {
this.payCount = this.leaveMessageOptions.find(item => item.dictLabel === 'pay_count').dictValue; this.payCount = this.leaveMessageOptions.find(item => item.dictLabel === 'pay_count').dictValue;
}) })
}, },
//获取互要微信字典配置
getWantWeChatDict(){
getDict('user_config').then(res=> {
this.wantWeChatOptions = res.data.data
//过滤出dictLabel等于pay_count的dictValue
this.applyWxPayment = this.wantWeChatOptions.find(item => item.dictLabel === 'request_exchange_wechat').dictValue;
this.acceptWxPayment = this.wantWeChatOptions.find(item => item.dictLabel === 'accept_exchange_wechat').dictValue;
})
},
//获取留言详情 //获取留言详情
getMessageList(pageNo, pageSize) { getMessageList(pageNo, pageSize) {
const form = { const form = {
...@@ -290,7 +336,7 @@ export default { ...@@ -290,7 +336,7 @@ export default {
wantWxC(){ wantWxC(){
uni.showModal({ uni.showModal({
title: '提示', title: '提示',
content: '是否花费'+ this.payCount +'金币,向对方发起请求', content: '是否花费'+ this.applyWxPayment +'金币,向对方发起请求',
success: (res) => { success: (res) => {
if (res.confirm) { if (res.confirm) {
const form = { const form = {
...@@ -330,7 +376,7 @@ export default { ...@@ -330,7 +376,7 @@ export default {
apply(){ apply(){
uni.showModal({ uni.showModal({
title: '提示', title: '提示',
content: '是否同意花费'+ this.payCount +'金币,接受对方请求', content: '是否同意花费'+ this.acceptWxPayment +'金币,接受对方请求',
success: (res) => { success: (res) => {
if (res.confirm) { if (res.confirm) {
const form = { const form = {
...@@ -389,6 +435,19 @@ export default { ...@@ -389,6 +435,19 @@ export default {
} }
}) })
}, },
getWxTask(){
const form = {
targetId: this.targetId,
}
getWeChatTask(form).then(res=>{
if (res.data.code == 200){
this.wxTask = res.data.data
}
})
},
confirm() {
this.isConfirm = false;
},
backbar() { backbar() {
uni.navigateBack({ uni.navigateBack({
delta: 1, // 返回层数,2则上上页 delta: 1, // 返回层数,2则上上页
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment