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

修改互要微信

parent ebdc292d
......@@ -217,7 +217,7 @@ export function noReadMessageAllCount() {
method: 'get',
})
}
// 新增访问量
// 发送要微信请求
export function wantWeChatTask(data) {
return request({
url: '/app/memInfo/weChatTask',
......@@ -225,3 +225,11 @@ export function wantWeChatTask(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 @@
<!-- 向下滑动的箭头-->
<image v-show="showArrowDown" :src="baseUrl+'/user/arrow_down_sm.png'" mode="aspectFill" class="fixed_down"/>
</view>
<ELM ref="elm" :msg="tipMsg" :isConfirm="isConfirm" @confirm="confirm"></ELM>
</view>
</template>
......@@ -210,10 +212,12 @@ import {addFollow, addMemTraffic, addMessage, deleteFollow, isFollow, likeUser,
import myPopup from '@/components/myPopup.vue'
import {getOssUrl} from "../api/article";
import {getDict} from "../api/system/dict/data";
import ELM from '@/components/elm-toast/index.vue';
export default {
components: {
LsSwiper,
myPopup
myPopup,
ELM
},
data() {
return {
......@@ -243,6 +247,8 @@ import {getDict} from "../api/system/dict/data";
showArrowDown: true,
isInit: true,
showTabbar: true,
tipMsg: '',
isConfirm: false,
scrollTop: 0,
data: [],
};
......@@ -388,6 +394,10 @@ import {getDict} from "../api/system/dict/data";
}
if (res.data.code == 200){
this.getIsFollowed();
} else {
this.tipMsg = "对方还未回应请求";
this.isConfirm = true;
this.$refs.elm.showDialog();
}
})
},
......@@ -483,6 +493,10 @@ import {getDict} from "../api/system/dict/data";
}
addMemTraffic(form)
},
confirm() {
this.isConfirm = false;
this.backbar()
},
//返回按钮
backbar() {
uni.navigateBack({
......
......@@ -9,7 +9,12 @@
:safeAreaInsetBottom="false"
>
<u-tabbar-item text="拉黑" icon="close-circle-fill" @click="tabbarClick"/>
<view style="margin-top: 5px">
<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>
</view>
......@@ -63,18 +68,27 @@
</view>
</u-popup>
<u-popup :show="show" mode="bottom" @close="close" @open="open" customStyle="min-height: 20vh;width: 100vh;">
<view>
<text>对方微信号:111111111111111111</text>
<u-popup :show="show" mode="bottom" @close="close" @open="open" customStyle="min-height: 20vh;width: 400px;">
<view class="popup-content" style="border-bottom: 1px solid #e5e5e5;">
<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>
</u-popup>
<ELM ref="elm" :msg="tipMsg" :isConfirm="isConfirm" @confirm="confirm"></ELM>
</view>
</template>
<script>
import {addBlack, addMessage, telMessage, wantWeChatTask} from "../../api/user";
import {addBlack, addMessage, getWeChatTask, telMessage, wantWeChatTask} from "../../api/user";
import {getOssUrl} from "../../api/article";
import {getDict} from "../../api/system/dict/data";
import ELM from '@/components/elm-toast/index.vue';
export default {
name: "info",
......@@ -99,11 +113,20 @@ export default {
leaveMessageOptions:{},
//金币支付金额
payCount: 0,
tipMsg: '',
isConfirm: false,
applyWxPayment:0,
acceptWxPayment:0,
wxTask:[]
}
},
components: {
ELM
},
onLoad(options) {
this.targetId = options.targetId
this.getLeaveMessageDict()
this.getWantWeChatDict()
//导航栏高度
this.menuButtonInfo = uni.getMenuButtonBoundingClientRect()
const {
......@@ -124,6 +147,7 @@ export default {
},
onShow(){
this.userInfo = uni.getStorageSync('userInfo')
this.getWxTask()
// 滚动到页面底部
this.$nextTick(() => {
this.pageScrollToBottom()
......@@ -138,7 +162,20 @@ export default {
}
if (e === 1){
//要微信
//发送请求
if (this.wxTask.type == '0'){
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 {
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) {
const form = {
......@@ -290,7 +336,7 @@ export default {
wantWxC(){
uni.showModal({
title: '提示',
content: '是否花费'+ this.payCount +'金币,向对方发起请求',
content: '是否花费'+ this.applyWxPayment +'金币,向对方发起请求',
success: (res) => {
if (res.confirm) {
const form = {
......@@ -330,7 +376,7 @@ export default {
apply(){
uni.showModal({
title: '提示',
content: '是否同意花费'+ this.payCount +'金币,接受对方请求',
content: '是否同意花费'+ this.acceptWxPayment +'金币,接受对方请求',
success: (res) => {
if (res.confirm) {
const form = {
......@@ -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() {
uni.navigateBack({
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