代码修复

main
123456 2 weeks ago
parent f574466010
commit 7428975885
  1. 23
      App.vue
  2. 4
      manifest.json
  3. 63
      pages/dongtai/detail.vue
  4. 17
      pages/dongtai/index.vue
  5. 45
      pages/index/index.vue
  6. 102
      pages/login/index.vue
  7. 36
      pages/user/index.vue
  8. 103
      pages/users/center/index.vue
  9. 46
      pages/xiaoxi/index.vue
  10. 1934
      unpackage/dist/dev/app-plus/app-service.js
  11. 2077
      unpackage/dist/dev/app-plus/app-view.js

@ -2,11 +2,7 @@
import permision from "@/js_sdk/wa-permission/permission.js"
export default {
onLaunch: () => {
// 1 ,
//#ifdef APP-PLUS
checkNotificationAuthorized();
//#endif
// 2 cid , cid
uni.getPushClientId({
success: (res) => {
@ -39,22 +35,7 @@
}
}
// app
function checkNotificationAuthorized() {
var result = permision.judgeIosPermission("push");
console.log("checkNotificationAuthorized",result)
if (result == false) {
uni.showModal({
title: '通知权限',
content: '您还没有开启通知权限,无法接受到消息通知,请前往设置!',
confirmText: '去设置',
showCancel: false,
success:(res) => {
if (res.confirm) permision.gotoAppPermissionSetting()
}
});
}
}
</script>
<style>
/* #ifdef APP-PLUS || H5 */

@ -2,8 +2,8 @@
"name" : "旅绊",
"appid" : "__UNI__7C06BEE",
"description" : "旅绊交友聊天分享和互动于一体的平台",
"versionName" : "1.0.8",
"versionCode" : 108,
"versionName" : "1.09",
"versionCode" : 109,
"transformPx" : false,
/* 5+App */
"app-plus" : {

@ -10,12 +10,23 @@
<view class="desc">{{info.createTime}}</view>
</view>
</view>
<view class="fr" v-if="info.userid == userInfo.id" @click="openPage(1)">
<image class="del" src="@/static/icon-del.png"></image>
</view>
<view class="fr" v-else @click="openPage(2)">
<image class="jubao" src="@/static/shenglue.png"></image>
</view>
<template v-if="pageType == 2">
<view class="frs" v-if="info.userid == userInfo.id" @click="openPage(1)">
删除
</view>
<view class="fr" v-else @click="openPage(2)">
<image class="jubao" src="@/static/shenglue.png"></image>
</view>
</template>
<template v-else>
<view class="fr" v-if="info.userid == userInfo.id" @click="openPage(1)">
<image class="del" src="@/static/icon-del.png"></image>
</view>
<view class="fr" v-else @click="openPage(2)">
<image class="jubao" src="@/static/shenglue.png"></image>
</view>
</template>
</view>
<view class="b">{{info.content}}</view>
<view class="c">
@ -165,6 +176,12 @@
methods: {
openPage(index,obj){
const that = this;
if(!uni.getStorageSync("userInfo").id){
uni.navigateTo({
url: "/pages/login/index?type=back"
})
return ;
}
if(this.type == 'web'){
return ;
}
@ -230,6 +247,12 @@
},
//
async toDianzanasd(type) {
if(!uni.getStorageSync("userInfo").id){
uni.navigateTo({
url: "/pages/login/index?type=back"
})
return ;
}
const { code, data, msg } = await this.$api.zan({
articleid: type == 1?this.id:this.obj.id,
userId: uni.getStorageSync("userInfo").id,
@ -254,6 +277,12 @@
},
//
async toPinglunasd() {
if(!uni.getStorageSync("userInfo").id){
uni.navigateTo({
url: "/pages/login/index?type=back"
})
return ;
}
const { code, data, msg } = await this.$api.commentReplyasd({
articleid: this.id,
userId: uni.getStorageSync("userInfo").id,
@ -280,6 +309,12 @@
},
//
async toDelasd() {
if(!uni.getStorageSync("userInfo").id){
uni.navigateTo({
url: "/pages/login/index?type=back"
})
return ;
}
const { code, data, msg } = await this.$api.articleDelete({articleId: this.id, userId: uni.getStorageSync("userInfo").id});
if(code == 200){
uni.showToast({
@ -325,6 +360,12 @@
},
//
async toCommentReplyasd(replyId) {
if(!uni.getStorageSync("userInfo").id){
uni.navigateTo({
url: "/pages/login/index?type=back"
})
return ;
}
const {code, data, msg} = await this.$api.commentReplyasd({articleid: this.id, userId: uni.getStorageSync("userInfo").id,content: this.content,replyId});
if(code == 200){
uni.showToast({
@ -343,6 +384,12 @@
},
//
async toZanasd(type,status) {
if(!uni.getStorageSync("userInfo").id){
uni.navigateTo({
url: "/pages/login/index?type=back"
})
return ;
}
const {code, data} = await this.$api.zan({articleid: this.id, userId: uni.getStorageSync("userInfo").id,type, status});
if(code == 200){
uni.showToast({
@ -474,6 +521,10 @@
height: 32rpx;
}
}
.frs{
font-size: 26rpx;
color: #ff0000;
}
}
}
}

@ -182,7 +182,10 @@
}else{
this.pageType = 1
}
this.getUserInfoasd();
if(uni.getStorageSync("userInfo").id){
this.getUserInfoasd();
}
},
onReachBottom() {
const that = this;
@ -265,6 +268,12 @@
url: "/pages/dongtai/detail?id="+id
})
}else if(index == 2){
if(!uni.getStorageSync("userInfo").id){
uni.navigateTo({
url: "/pages/login/index?type=back"
})
return ;
}
if(this.userInfo.realnameFlag == 0 || this.userInfo.faceFlag == 0 || this.userInfo.phoneFlag == 0){
this.isPopup = true
return ;
@ -273,6 +282,12 @@
url: "/pages/dongtai/add"
})
}else if(index == 3){
if(!uni.getStorageSync("userInfo").id){
uni.navigateTo({
url: "/pages/login/index?type=back"
})
return ;
}
if(this.userInfo.realnameFlag == 0 || this.userInfo.faceFlag == 0 || this.userInfo.phoneFlag == 0){
this.isPopup = true
return ;

@ -465,12 +465,12 @@
},2000)
},
onLoad() {
if(!uni.getStorageSync("userInfo").token){
uni.reLaunch({
url: "/pages/login/index"
})
return;
}
// if(!uni.getStorageSync("userInfo").token){
// uni.reLaunch({
// url: "/pages/login/index"
// })
// return;
// }
if(uni.getSystemInfoSync().platform == 'ios') {
this.getLocationsxq();
}
@ -513,25 +513,16 @@
that.show=false
}
})
if(that.pageType == 2){
uni.setTabBarItem({
"index": 1,
"text": "游玩"
})
}else {
uni.setTabBarItem({
"index": 1,
"selectedIconPath": "static/images/home_sel.png",
"text": "陪玩"
})
}
},
onShow() {
if(uni.getSystemInfoSync().platform == 'ios'){
this.getConfigData();
}else{
this.pageType = 1;
this.getUserInfoasd();
if(uni.getStorageSync("userInfo").id){
this.getUserInfoasd();
}
}
if(uni.getStorageSync("userInfo").id){
if(!uni.getStorageSync("isOpen")){
@ -777,8 +768,22 @@
const { code, data} = await this.$api.getConfigData({dictType: 'IOS_FACE_CONFIG'});
if(code == 200){
this.pageType = (data.content == 1?2:1)
this.getUserInfoasd();
if(uni.getStorageSync("userInfo").id){
this.getUserInfoasd();
}
uni.setStorageSync("pageType",this.pageType)
if(this.pageType == 2){
uni.setTabBarItem({
"index": 1,
"text": "游玩"
})
}else {
uni.setTabBarItem({
"index": 1,
"selectedIconPath": "static/images/home_sel.png",
"text": "陪玩"
})
}
}else{
this.pageType = 1;
this.getUserInfoasd();

@ -29,7 +29,8 @@
</view>
</template>
<script>
<script>
import permision from "@/js_sdk/wa-permission/permission.js"
let timer = null;
export default {
data() {
@ -43,30 +44,93 @@
count: 60,
isShow1: true,
id: "",
isDisan: false
pageType: -1,
isDisan: false,
type: ""
};
},
onLoad(o) {
this.id = o.id?o.id:""
uni.setStorageSync("deviceSn",uni.getSystemInfoSync().deviceId)
if(uni.getStorageSync("userInfo").token){
if(uni.getStorageSync("userInfo").sex){
this.isShow1 = false
uni.switchTab({
url:"/pages/index/index"
})
}else{
this.isShow1 = true
uni.switchTab({
url:"/pages/index/sex"
})
}
}else{
this.isShow1 = true
}
this.id = o.id?o.id:""
this.type = o.type?o.type:""
uni.setStorageSync("deviceSn",uni.getSystemInfoSync().deviceId);
this.getConfigData();
this.getDictDataByType();
},
methods: {
// app
checkNotificationAuthorized() {
var result = permision.judgeIosPermission("push");
console.log("checkNotificationAuthorized",result)
if (result == false) {
uni.showModal({
title: '需要通知权限',
content: '您还没有开启通知权限,无法接受到消息通知,请前往设置!',
confirmText: '允许',
cancelText:'取消',
success:(res) => {
if (res.confirm) permision.gotoAppPermissionSetting();
}
});
}
},
async getConfigData() {
// 1 0
const { code, data} = await this.$api.getConfigData({dictType: 'IOS_FACE_CONFIG'});
if(code == 200){
this.pageType = (data.content == 1?2:1)
if(this.pageType == 1){
if(uni.getStorageSync("userInfo").token){
if(uni.getStorageSync("userInfo").sex){
this.isShow1 = false
uni.switchTab({
url:"/pages/index/index"
})
}else{
this.isShow1 = true
uni.switchTab({
url:"/pages/index/sex"
})
}
}else{
// 1 ,
//#ifdef APP-PLUS
this.checkNotificationAuthorized();
//#endif
this.isShow1 = true;
}
}else{
if(!this.type){
this.isShow1 = true
uni.switchTab({
url:"/pages/index/index"
})
}
}
}else{
this.pageType = 1;
if(uni.getStorageSync("userInfo").token){
if(uni.getStorageSync("userInfo").sex){
this.isShow1 = false
uni.switchTab({
url:"/pages/index/index"
})
}else{
this.isShow1 = true
uni.switchTab({
url:"/pages/index/sex"
})
}
}else{
// 1 ,
//#ifdef APP-PLUS
this.checkNotificationAuthorized();
//#endif
this.isShow1 = true;
}
}
},
async getDictDataByType() {
const { code, data } = await this.$api.getConfigData({dictType:'CONFIG_LOGIN_SWITCH'});
if(code == 200){

@ -11,11 +11,14 @@
</view>
<view class="user-info">
<view class="a">
<view class="pic" @click="openPageasd(2)">
<view class="pic" v-if="userInfo.img" @click="openPageasd(2)">
<image v-if="userInfo.faceImage" :src="userInfo.faceImage"></image>
<image v-else :src="userInfo.img"></image>
</view>
<view class="pic" v-else @click="openPageasd(2)">
<image src="@/static/avatar.png"></image>
</view>
<view class="info" @click="openPageasd(2)">
<view class="info" v-if="userInfo.nickname" @click="openPageasd(2)">
<view class="name">{{userInfo.realname?userInfo.realname:userInfo.nickname}}
<view class="vip" v-if="userInfo.memberflag>=1">vip{{userInfo.memberflag}}</view>
<view class="status" v-if="userInfo.acceptStatus == 1"><text></text>接单中</view>
@ -23,15 +26,19 @@
<view class="status" v-if="userInfo.acceptStatus == 0"><text></text>空闲中</view>
</view>
<view class="id">ID:{{userInfo.invitationCode}}</view>
</view>
<view class="info" v-else @click="openPageasd(2)">
<view class="name">登录
</view>
</view>
<view class="sign" @click="openPageasd(3)" v-if="userInfo.isSign == 0">签到</view>
<view class="sign" v-if="userInfo.isSign == 1">已签到</view>
</view>
<view class="b">
<view class="li" @click="openPageasd(5)">{{userInfo.friendNum}}<text>好友</text></view>
<view class="li" @click="openPageasd(6)">{{userInfo.careNum}}<text>关注</text></view>
<view class="li" @click="openPageasd(7)">{{userInfo.fansNum}}<text>粉丝</text></view>
<view class="li" @click="openPageasd(8)">{{userInfo.visitorNum}}<text>访客</text></view>
<view class="li" @click="openPageasd(5)">{{userInfo.friendNum?userInfo.friendNum:0}}<text>好友</text></view>
<view class="li" @click="openPageasd(6)">{{userInfo.careNum?userInfo.careNum:0}}<text>关注</text></view>
<view class="li" @click="openPageasd(7)">{{userInfo.fansNum?userInfo.fansNum:0}}<text>粉丝</text></view>
<view class="li" @click="openPageasd(8)">{{userInfo.visitorNum?userInfo.visitorNum:0}}<text>访客</text></view>
</view>
<view class="c" @click="openPageasd(4)">
<view class="dt">VIP会员中心<text v-if="userInfo.memberflag>=1">{{userInfo.memberEndTime}}到期</text><text v-else>立即开通</text></view>
@ -229,8 +236,13 @@
that.show = true;
})
},
onShow() {
this.getUserInfoasd();
onShow() {
if(uni.getStorageSync("userInfo").id){
this.getUserInfoasd();
}else{
this.userInfo = {}
}
if(uni.getSystemInfoSync().platform == 'ios'){
this.pageType = (uni.getStorageSync("pageType")?uni.getStorageSync("pageType"):1)
}else{
@ -313,7 +325,13 @@
})
}
},
openPageasd(index,id){
openPageasd(index,id){
if(!uni.getStorageSync("userInfo").id){
uni.navigateTo({
url: "/pages/login/index?type=back"
})
return ;
}
if(index == 1){
uni.navigateTo({
url: "/pages/users/edit/index"

@ -72,45 +72,86 @@
</view>
</scroll-view>
<template v-if="pageType == 1">
<view class="title" v-if="list && list.length > 0">会员特权</view>
<view class="content" v-if="list && list.length > 0">
<view class="item">
<view class="a"><view class="btn">特权1</view><view class="txt">文字语音视频聊天折扣{{list[tabIndex].wordVoiceDiscount}}</view></view>
<view class="b">
<image src="@/static/icon-svip.png"></image>
<view class="title" v-if="list && list.length > 0">会员特权</view>
<view class="content" v-if="list && list.length > 0">
<view class="item">
<view class="a"><view class="btn">特权1</view><view class="txt">文字语音视频聊天折扣{{list[tabIndex].wordVoiceDiscount}}</view></view>
<view class="b">
<image src="@/static/icon-svip.png"></image>
</view>
</view>
</view>
<view class="item">
<view class="a"><view class="btn">特权2</view><view class="txt">每天可领金币{{list[tabIndex].receiveCoins}}</view></view>
<view class="b">
<image src="@/static/icon-svip.png"></image>
<view class="item">
<view class="a"><view class="btn">特权2</view><view class="txt">每天可领金币{{list[tabIndex].receiveCoins}}</view></view>
<view class="b">
<image src="@/static/icon-svip.png"></image>
</view>
</view>
</view>
<view class="item">
<view class="a"><view class="btn">特权3</view><view class="txt">可累积领取金币{{list[tabIndex].totalReceiveCoins}}</view></view>
<view class="b">
<image src="@/static/icon-svip.png"></image>
<view class="item">
<view class="a"><view class="btn">特权3</view><view class="txt">可累积领取金币{{list[tabIndex].totalReceiveCoins}}</view></view>
<view class="b">
<image src="@/static/icon-svip.png"></image>
</view>
</view>
</view>
<view class="item">
<view class="a"><view class="btn">特权4</view><view class="txt">每天免费信息数量{{list[tabIndex].freeMsg}}</view></view>
<view class="b">
<image src="@/static/icon-svip.png"></image>
<view class="item">
<view class="a"><view class="btn">特权4</view><view class="txt">每天免费信息数量{{list[tabIndex].freeMsg}}</view></view>
<view class="b">
<image src="@/static/icon-svip.png"></image>
</view>
</view>
</view>
<view class="item">
<view class="a"><view class="btn">特权5</view><view class="txt">每天免费语音时长{{list[tabIndex].freeVoice}}分钟</view></view>
<view class="b">
<image src="@/static/icon-svip.png"></image>
<view class="item">
<view class="a"><view class="btn">特权5</view><view class="txt">每天免费语音时长{{list[tabIndex].freeVoice}}分钟</view></view>
<view class="b">
<image src="@/static/icon-svip.png"></image>
</view>
</view>
<view class="item">
<view class="a"><view class="btn">特权6</view><view class="txt">每天免费视频时长{{list[tabIndex].freeVideo}}分钟</view></view>
<view class="b">
<image src="@/static/icon-svip.png"></image>
</view>
</view>
</view>
<view class="item">
<view class="a"><view class="btn">特权6</view><view class="txt">每天免费视频时长{{list[tabIndex].freeVideo}}分钟</view></view>
<view class="b">
<image src="@/static/icon-svip.png"></image>
</template>
<template v-if="pageType == 2">
<view class="title" v-if="list && list.length > 0">会员特权</view>
<view class="content" v-if="list && list.length > 0">
<view class="item">
<view class="a"><view class="btn">特权1</view><view class="txt">每天免费AI路线5次</view></view>
<view class="b">
<image src="@/static/icon-svip.png"></image>
</view>
</view>
<view class="item">
<view class="a"><view class="btn">特权2</view><view class="txt">每天一对一人工客服5次</view></view>
<view class="b">
<image src="@/static/icon-svip.png"></image>
</view>
</view>
<view class="item">
<view class="a"><view class="btn">特权3</view><view class="txt">可以解锁智能语音</view></view>
<view class="b">
<image src="@/static/icon-svip.png"></image>
</view>
</view>
<view class="item">
<view class="a"><view class="btn">特权4</view><view class="txt">每天推荐最优路线</view></view>
<view class="b">
<image src="@/static/icon-svip.png"></image>
</view>
</view>
<view class="item">
<view class="a"><view class="btn">特权5</view><view class="txt">每天解锁5次视频</view></view>
<view class="b">
<image src="@/static/icon-svip.png"></image>
</view>
</view>
<view class="item">
<view class="a"><view class="btn">特权6</view><view class="txt">每天查询10次路线规划</view></view>
<view class="b">
<image src="@/static/icon-svip.png"></image>
</view>
</view>
</view>
</view>
</template>
<template v-if="platform == 'ios'">
<view class="title" v-if="payTotal >= 2">支付方式</view>

@ -86,10 +86,12 @@
}
},
onShow() {
this.getList();
this.dashaCount();
this.getXiaoxiList();
this.watchSocket();
if(uni.getStorageSync("userInfo").id){
this.getList();
this.dashaCount();
this.getXiaoxiList();
this.watchSocket();
}
if(uni.getSystemInfoSync().platform == 'ios'){
this.pageType = (uni.getStorageSync("pageType")?uni.getStorageSync("pageType"):1)
}else{
@ -134,6 +136,12 @@
}
},
async click(i){
if(!uni.getStorageSync("userInfo").id){
uni.navigateTo({
url: "/pages/login/index?type=back"
})
return ;
}
const { code, data, msg } = await this.$api.cleanOneMsg({
msgId: this.frindList[i].msgId,otherUserStatus: this.frindList[i].otherUserStatus, userId: uni.getStorageSync("userInfo").id
})
@ -178,13 +186,25 @@
}
},
openPage(url) {
if(!uni.getStorageSync("userInfo").id){
uni.navigateTo({
url: "/pages/login/index?type=back"
})
return ;
}
uni.navigateTo({
url
})
},
//
clearInfo() {
const that = this;
const that = this;
if(!uni.getStorageSync("userInfo").id){
uni.navigateTo({
url: "/pages/login/index?type=back"
})
return ;
}
uni.showModal({
title: "提示",
content: "确定要清空所有未读消息吗?",
@ -206,7 +226,13 @@
}
})
},
selectItem(index) {
selectItem(index) {
if(!uni.getStorageSync("userInfo").id){
uni.navigateTo({
url: "/pages/login/index?type=back"
})
return ;
}
this.tabIndex = index;
if(index == 0){
this.type = 5
@ -219,7 +245,13 @@
this.getList();
}
},
changeTabs(index){
changeTabs(index){
if(!uni.getStorageSync("userInfo").id){
uni.navigateTo({
url: "/pages/login/index?type=back"
})
return ;
}
this.current = index
if(index==0){
this.type = 0

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save