Commit ebdc292d authored by 罗林杰's avatar 罗林杰

修改互要微信

parent 6b3f08cd
...@@ -217,3 +217,11 @@ export function noReadMessageAllCount() { ...@@ -217,3 +217,11 @@ export function noReadMessageAllCount() {
method: 'get', method: 'get',
}) })
} }
// 新增访问量
export function wantWeChatTask(data) {
return request({
url: '/app/memInfo/weChatTask',
method: 'post',
data: data
})
}
\ No newline at end of file
...@@ -9,7 +9,8 @@ ...@@ -9,7 +9,8 @@
:safeAreaInsetBottom="false" :safeAreaInsetBottom="false"
> >
<u-tabbar-item text="拉黑" icon="close-circle-fill" @click="tabbarClick"/> <u-tabbar-item text="拉黑" icon="close-circle-fill" @click="tabbarClick"/>
<u-tabbar-item text="要微信" icon="weixin-fill" @click="tabbarClick"/> <u-tabbar-item text="互要微信" icon="weixin-fill" @click="tabbarClick"/>
<u-tabbar-item text="互要联系方式" icon="phone-fill" @click="tabbarClick"/>
</u-tabbar> </u-tabbar>
</view> </view>
<z-paging ref="paging" v-model="dataList" @query="getMessageList" :fixed="true" :auto-show-back-to-top="true" :back-to-top-with-animate="false"> <z-paging ref="paging" v-model="dataList" @query="getMessageList" :fixed="true" :auto-show-back-to-top="true" :back-to-top-with-animate="false">
...@@ -45,11 +46,33 @@ ...@@ -45,11 +46,33 @@
</view> </view>
</view> </view>
</z-paging> </z-paging>
<u-popup
:show="showApply"
mode="center"
@close="closeApply"
@open="openApply"
customStyle="min-height: 20vh; width: 400px;"
class="custom-popup"
>
<view class="popup-content">
<text>是否接受对方的请求</text>
</view>
<view class="u-popup__footer">
<u-button type="primary" @click="apply">确定</u-button>
<u-button type="default" @click="refuse">拒绝</u-button>
</view>
</u-popup>
<u-popup :show="show" mode="bottom" @close="close" @open="open" customStyle="min-height: 20vh;width: 100vh;">
<view>
<text>对方微信号:111111111111111111</text>
</view>
</u-popup>
</view> </view>
</template> </template>
<script> <script>
import {addBlack, addMessage, deleteFollow, telMessage} from "../../api/user"; import {addBlack, addMessage, 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";
...@@ -66,6 +89,9 @@ export default { ...@@ -66,6 +89,9 @@ export default {
inputTemp: '', inputTemp: '',
//目标id //目标id
targetId: '', targetId: '',
//弹出层
show:false,
showApply:false,
//导航栏高度 //导航栏高度
menuButtonInfo:'', menuButtonInfo:'',
navHeight:0, navHeight:0,
...@@ -112,17 +138,7 @@ export default { ...@@ -112,17 +138,7 @@ export default {
} }
if (e === 1){ if (e === 1){
//要微信 //要微信
uni.showModal({ this.wantWxC()
title: '提示',
content: '是否花费'+ this.payCount +'金币,向对方发起请求',
success: (res) => {
if (res.confirm) {
console.log('11111111')
} else if (res.cancel) {
}
}
});
} }
}, },
//获取留言字典配置 //获取留言字典配置
...@@ -271,6 +287,108 @@ export default { ...@@ -271,6 +287,108 @@ export default {
} }
}).exec() }).exec()
}, },
wantWxC(){
uni.showModal({
title: '提示',
content: '是否花费'+ this.payCount +'金币,向对方发起请求',
success: (res) => {
if (res.confirm) {
const form = {
targetId: this.targetId,
type: '1',
wxOpenid: this.userInfo.wxOpenid
}
wantWeChatTask(form).then(res=>{
if (res.data.code == 200){
uni.showToast({
title: '已发送请求',
icon: 'none'
})
} else {
uni.showToast({
title: res.data.message,
icon: 'none'
})
}
})
}
}
})
},
close() {
this.show = false
},
open(){
this.show = true
},
closeApply(){
this.showApply = false
},
openApply(){
this.showApply = true
},
apply(){
uni.showModal({
title: '提示',
content: '是否同意花费'+ this.payCount +'金币,接受对方请求',
success: (res) => {
if (res.confirm) {
const form = {
targetId: this.targetId,
status: '1',
type: '2',
wxOpenid: this.userInfo.wxOpenid
}
wantWeChatTask(form).then(res=>{
if (res.data.code == 200){
uni.showToast({
title: '已接受请求',
icon: 'none'
})
this.showApply = false
} else {
uni.showToast({
title: res.data.message,
icon: 'none'
})
this.showApply = false
}
})
}
}
})
},
refuse(){
uni.showModal({
title: '提示',
content: '是否确认拒绝对方请求',
success: (res) => {
if (res.confirm) {
const form = {
targetId: this.targetId,
status: '2',
type: '2',
wxOpenid: this.userInfo.wxOpenid
}
wantWeChatTask(form).then(res=>{
if (res.data.code == 200){
uni.showToast({
title: '已拒绝请求',
icon: 'none'
})
this.showApply = false
} else {
uni.showToast({
title: res.data.message,
icon: 'none'
})
this.showApply = false
}
})
}
}
})
},
backbar() { backbar() {
uni.navigateBack({ uni.navigateBack({
delta: 1, // 返回层数,2则上上页 delta: 1, // 返回层数,2则上上页
...@@ -442,4 +560,29 @@ export default { ...@@ -442,4 +560,29 @@ export default {
background-color: #cbcbcb; background-color: #cbcbcb;
color: black; color: black;
} }
.custom-popup {
border-radius: 16px;
background-color: #ffffff;
box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
}
.popup-content {
padding: 20px;
text-align: center;
font-size: 16px;
color: #333333;
}
.u-popup__footer {
display: flex;
justify-content: space-between;
padding: 60px 20px;
border-top: 1px solid #e5e5e5;
}
.u-popup__footer u-button {
flex: 1;
padding-right: 20px;
}
</style> </style>
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