Commit 905d1c7b authored by Mac's avatar Mac

1

parent 93dee415
......@@ -92,6 +92,9 @@
//调用获取code
getCode(obj) {
var that = this;
uni.showLoading({
title: '登录中'
});
uni.getUserInfo({
provider: 'weixin',
success: info => {
......@@ -117,9 +120,7 @@
getLogin(obj) {
var that = this;
that.showLogin =false
uni.showLoading({
title: '登录中'
});
let pid = uni.getStorageSync("pid") ? uni.getStorageSync("pid").pid : 0;
let Up = uni.getStorageSync("Up") ? uni.getStorageSync("Up").Up : 0;
let SmallShopId = uni.getStorageSync("SmallShopId") ? uni.getStorageSync("SmallShopId").SmallShopId : 0;
......
......@@ -572,15 +572,21 @@
</view>
</view>
</u-popup>
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth= 'gbAuth'></auth>
</view>
</template>
<script>
import auth from "@/components/auth/index.vue";
export default{
components: {
auth
},
data(){
return{
pageTitle: "活动详情",
mainColor: "",
showAuth:false,
msg:{
pageIndex:1,
pageSize:20,
......@@ -672,11 +678,21 @@
richtext = richtext.replace(regex, `<img width="100%"`); //图片超出的处理
this.details.Content = richtext
this.init()//评论列表
if(this.details.IsOpenEnroll==1){
this.GetActivityEnrollPageList()//获取招募贴报名列表
//判断是否登录
this.u = uni.getStorageSync("mall_UserInfo");
if (!this.u) {
this.u = {
nickName: "未登录",
avatarUrl: ""
};
// this.showAuth = true;
} else{
if(this.details.IsOpenEnroll==1){
this.GetActivityEnrollPageList()//获取招募贴报名列表
}
}
}
);
},
......@@ -747,71 +763,92 @@
this.showreply = false
},
setSend(type=1){
let Id = this.sendMsg.ParentId
uni.showLoading({
title:'发表中~'
})
this.request2(
{
url: '/api/AppletMiai/SgetActivityDiscussInfo',
data: this.sendMsg
},
res => {
uni.hideLoading()
uni.showToast({
title: '发表成功',
icon: 'none',
})
if(type==1){
if(Id == 0){//回复楼主时
this.init(2)
}else{//回复其他用户时 二级评论
this.request2(
{
url: '/api/AppletMiai/GetActivityDiscussPageList',
data: {pageIndex:1,pageSize:20,ActivityId:this.sendMsg.ActivityId,Id:Id}
},
res => {
if(res.resultCode==1){
for(let i =0;i<this.g.length;i++){
if(this.g[i].Id == res.data.pageData[0].Id){
this.g[i] = res.data.pageData[0]
this.$forceUpdate()
return
this.u = uni.getStorageSync("mall_UserInfo");
if (!this.u) {
this.u = {
nickName: "未登录",
avatarUrl: ""
};
this.showAuth = true;
} else{
let Id = this.sendMsg.ParentId
uni.showLoading({
title:'发表中~'
})
this.request2(
{
url: '/api/AppletMiai/SgetActivityDiscussInfo',
data: this.sendMsg
},
res => {
uni.hideLoading()
uni.showToast({
title: '发表成功',
icon: 'none',
})
if(type==1){
if(Id == 0){//回复楼主时
this.init(2)
}else{//回复其他用户时 二级评论
this.request2(
{
url: '/api/AppletMiai/GetActivityDiscussPageList',
data: {pageIndex:1,pageSize:20,ActivityId:this.sendMsg.ActivityId,Id:Id}
},
res => {
if(res.resultCode==1){
for(let i =0;i<this.g.length;i++){
if(this.g[i].Id == res.data.pageData[0].Id){
this.g[i] = res.data.pageData[0]
this.$forceUpdate()
return
}
}
}
}
}
);
);
}
}else{
this.request2(
{
url: '/api/AppletMiai/GetActivityReplyPageList',
data: {pageIndex:1,pageSize:20,ParentId:this.msg2.ParentId}
},
res => {
if(res.resultCode==1){
this.g2.unshift(res.data.pageData[0])
}
}
);
this.initialize();
this.sendMsg.ParentId = this.twodata.Id
this.ParentName='';
this.sendMsg.Content = ''
}
}else{
this.request2(
{
url: '/api/AppletMiai/GetActivityReplyPageList',
data: {pageIndex:1,pageSize:20,ParentId:this.msg2.ParentId}
},
res => {
if(res.resultCode==1){
this.g2.unshift(res.data.pageData[0])
}
}
);
this.initialize();
this.sendMsg.ParentId = this.twodata.Id
this.ParentName='';
this.sendMsg.Content = ''
this.initialize()
}
this.initialize()
}
);
);
}
},
getimgs(){
let sendMsg = encodeURIComponent(JSON.stringify(this.sendMsg))
uni.navigateTo({
url: '/pages/blindDate/sendimg?sendMsg=' + sendMsg
})
//判断是否登录
this.u = uni.getStorageSync("mall_UserInfo");
if (!this.u) {
this.u = {
nickName: "未登录",
avatarUrl: ""
};
this.showAuth = true;
} else{
let sendMsg = encodeURIComponent(JSON.stringify(this.sendMsg))
uni.navigateTo({
url: '/pages/blindDate/sendimg?sendMsg=' + sendMsg
})
}
},
Children(){
this.initialize()
......@@ -935,10 +972,20 @@
);
},
gosigUp(){//报名页面
this.u = uni.getStorageSync("mall_UserInfo");
if (!this.u) {
this.u = {
nickName: "未登录",
avatarUrl: ""
};
this.showAuth = true;
} else{
let details = encodeURIComponent(JSON.stringify(this.details))
uni.navigateTo({
url: '/pages/blindDate/stickSignUp?details=' + details
})
}
},
gobmlist(){//查看当前活动的报名列表
let type =0
......@@ -950,35 +997,45 @@
})
},
getfollow(x){
let ID=0
if(x.IsFocus!=0){
ID = x.MyFollowId
}
this.request2({
url: '/api/AppletMiai/GetFollowMember',
data: {
ID:ID,
UserId:x.UserId,
}
},
res => {
uni.showToast({
title:res.message,
icon:'none'
})
this.request2(
{
url: '/api/AppletMiai/GetActivityInfo',
data: {ActivityId:this.msg.ActivityId}
},
res => {
this.details = res.data
}
);
this.u = uni.getStorageSync("mall_UserInfo");
if (!this.u) {
this.u = {
nickName: "未登录",
avatarUrl: ""
};
this.showAuth = true;
} else{
let ID=0
if(x.IsFocus!=0){
ID = x.MyFollowId
}
);
this.request2({
url: '/api/AppletMiai/GetFollowMember',
data: {
ID:ID,
UserId:x.UserId,
}
},
res => {
uni.showToast({
title:res.message,
icon:'none'
})
this.request2(
{
url: '/api/AppletMiai/GetActivityInfo',
data: {ActivityId:this.msg.ActivityId}
},
res => {
this.details = res.data
}
);
}
);
}
},
keyboardheightchange(e){
console.log(e.detail.height)
......@@ -986,7 +1043,14 @@
that.oneheight=e.detail.height-1;
that.$forceUpdate()
},
reloadUserinfo() {
this.u = uni.getStorageSync("mall_UserInfo");
// this.showAuth=false;
},
//关闭登录窗口
gbAuth(){
this.showAuth = false;
},
}
}
......
......@@ -144,7 +144,7 @@ export default {
nomore: "没有更多了",
},
forumList:[],
showtype:2,
showtype:2,//好像这里没配置了 直接显示的大图模式
};
},
created() {
......@@ -173,10 +173,11 @@ export default {
nickName: "未登录",
avatarUrl: ""
};
this.showAuth = true;
// this.showAuth = true;
} else{
this.GetForumList()
}
this.GetForumList()
},
methods: {
......@@ -250,9 +251,19 @@ export default {
}
},
gopublishing(){//发帖
this.u = uni.getStorageSync("mall_UserInfo");
if (!this.u) {
this.u = {
nickName: "未登录",
avatarUrl: ""
};
this.showAuth = true;
} else{
uni.navigateTo({
url: '/pages/blindDate/postPublishing'
})
}
},
reloadUserinfo() {
this.u = uni.getStorageSync("mall_UserInfo");
......@@ -261,7 +272,7 @@ export default {
},
//关闭登录窗口
gbAuth(){
uni.navigateBack()
this.showAuth = false;
},
gopostdetails(x){//招募贴的
uni.navigateTo({
......
......@@ -493,17 +493,26 @@
this.u = {
nickName: "未登录",
avatarUrl: ""
};
this.showAuth = true;
};
if(this.IsOpenMiAi ==0){
this.showAuth = true;
}
} else {
this.init();
}
if(this.IsOpenMiAi ==1){
this.init();
}
},
onShow(){
if (!this.u) {
} else {
this.getDMCount();
if(this.IsOpenMiAi ==0){
this.getDMCount();
}
}
},
......@@ -536,7 +545,10 @@
this.status = "nomore";
}
}
this.getDMCount()
if(this.IsOpenMiAi ==0){
this.getDMCount()
}
}
);
},
......@@ -603,9 +615,21 @@
},
//关闭登录窗口
gbAuth() {
uni.navigateBack()
this.showAuth = false
},
getdian(x, i) { //点击点点
this.u = uni.getStorageSync("mall_UserInfo");
if (!this.u) {
this.u = {
nickName: "未登录",
avatarUrl: ""
};
this.showAuth = true;
} else {
if(this.dianindex == i){
this.g[i].dianshow = !this.g[i].dianshow;
this.dianindex = i
......@@ -613,9 +637,11 @@
this.g[this.dianindex].dianshow =false;
this.g[i].dianshow = !this.g[i].dianshow;
this.dianindex = i
}
}
this.$forceUpdate()
}
this.$forceUpdate()
},
dianzan(x, i) { //点赞
this.choiceId = x.id;
......@@ -727,29 +753,42 @@
}
);
},
addComment() {
if (this.commentMsg.Content == '') {
uni.showToast({
title: '请输入评论',
icon: 'none',
duration: 2000
});
return
addComment() {
this.u = uni.getStorageSync("mall_UserInfo");
console.log(this.u)
if (!this.u) {
this.u = {
nickName: "未登录",
avatarUrl: ""
};
this.showAuth = true;
} else {
if (this.commentMsg.Content == '') {
uni.showToast({
title: '请输入评论',
icon: 'none',
duration: 2000
});
return
}
this.request2({
url: '/api/AppletEducation/GetDynamicComment',
data: this.commentMsg
},
res => {
if (res.resultCode == 1) {
this.focu = false;
this.commentMsg.Content = '';
this.placeholder = '评论';
this.init2(2)
}
}
);
}
this.request2({
url: '/api/AppletEducation/GetDynamicComment',
data: this.commentMsg
},
res => {
if (res.resultCode == 1) {
this.focu = false;
this.commentMsg.Content = '';
this.placeholder = '评论';
this.init2(2)
}
}
);
},
init2(type) { //根据id去查询当前的数据 只更新当前数据
......@@ -821,9 +860,18 @@
}
},
btnclick(item) {//跳入发布
uni.navigateTo({
url: '/pages/friendcircle/release'
})
this.u = uni.getStorageSync("mall_UserInfo");
if (!this.u) {
this.u = {
nickName: "未登录",
avatarUrl: ""
};
this.showAuth = true;
} else {
uni.navigateTo({
url: '/pages/friendcircle/release'
})
}
innerAudioContext.stop();
},
......
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