Commit 905d1c7b authored by Mac's avatar Mac

1

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