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,10 +678,20 @@ ...@@ -672,10 +678,20 @@
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()//评论列表
//判断是否登录
this.u = uni.getStorageSync("mall_UserInfo");
if (!this.u) {
this.u = {
nickName: "未登录",
avatarUrl: ""
};
// this.showAuth = true;
} else{
if(this.details.IsOpenEnroll==1){ if(this.details.IsOpenEnroll==1){
this.GetActivityEnrollPageList()//获取招募贴报名列表 this.GetActivityEnrollPageList()//获取招募贴报名列表
} }
}
} }
); );
...@@ -747,6 +763,14 @@ ...@@ -747,6 +763,14 @@
this.showreply = false this.showreply = false
}, },
setSend(type=1){ setSend(type=1){
this.u = uni.getStorageSync("mall_UserInfo");
if (!this.u) {
this.u = {
nickName: "未登录",
avatarUrl: ""
};
this.showAuth = true;
} else{
let Id = this.sendMsg.ParentId let Id = this.sendMsg.ParentId
uni.showLoading({ uni.showLoading({
title:'发表中~' title:'发表中~'
...@@ -806,12 +830,25 @@ ...@@ -806,12 +830,25 @@
this.initialize() this.initialize()
} }
); );
}
}, },
getimgs(){ getimgs(){
//判断是否登录
this.u = uni.getStorageSync("mall_UserInfo");
if (!this.u) {
this.u = {
nickName: "未登录",
avatarUrl: ""
};
this.showAuth = true;
} else{
let sendMsg = encodeURIComponent(JSON.stringify(this.sendMsg)) let sendMsg = encodeURIComponent(JSON.stringify(this.sendMsg))
uni.navigateTo({ uni.navigateTo({
url: '/pages/blindDate/sendimg?sendMsg=' + sendMsg 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,6 +997,14 @@ ...@@ -950,6 +997,14 @@
}) })
}, },
getfollow(x){ getfollow(x){
this.u = uni.getStorageSync("mall_UserInfo");
if (!this.u) {
this.u = {
nickName: "未登录",
avatarUrl: ""
};
this.showAuth = true;
} else{
let ID=0 let ID=0
if(x.IsFocus!=0){ if(x.IsFocus!=0){
ID = x.MyFollowId ID = x.MyFollowId
...@@ -979,6 +1034,8 @@ ...@@ -979,6 +1034,8 @@
} }
); );
}
}, },
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({
......
...@@ -494,16 +494,25 @@ ...@@ -494,16 +494,25 @@
nickName: "未登录", nickName: "未登录",
avatarUrl: "" avatarUrl: ""
}; };
if(this.IsOpenMiAi ==0){
this.showAuth = true; 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 {
if(this.IsOpenMiAi ==0){
this.getDMCount(); this.getDMCount();
}
} }
}, },
...@@ -536,8 +545,11 @@ ...@@ -536,8 +545,11 @@
this.status = "nomore"; this.status = "nomore";
} }
} }
if(this.IsOpenMiAi ==0){
this.getDMCount() this.getDMCount()
} }
}
); );
}, },
getDMCount(){ 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
...@@ -616,6 +640,8 @@ ...@@ -616,6 +640,8 @@
} }
this.$forceUpdate() this.$forceUpdate()
}
}, },
dianzan(x, i) { //点赞 dianzan(x, i) { //点赞
this.choiceId = x.id; this.choiceId = x.id;
...@@ -728,6 +754,17 @@ ...@@ -728,6 +754,17 @@
); );
}, },
addComment() { 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 == '') { if (this.commentMsg.Content == '') {
uni.showToast({ uni.showToast({
title: '请输入评论', title: '请输入评论',
...@@ -750,6 +787,8 @@ ...@@ -750,6 +787,8 @@
} }
} }
); );
}
}, },
init2(type) { //根据id去查询当前的数据 只更新当前数据 init2(type) { //根据id去查询当前的数据 只更新当前数据
...@@ -821,9 +860,18 @@ ...@@ -821,9 +860,18 @@
} }
}, },
btnclick(item) {//跳入发布 btnclick(item) {//跳入发布
this.u = uni.getStorageSync("mall_UserInfo");
if (!this.u) {
this.u = {
nickName: "未登录",
avatarUrl: ""
};
this.showAuth = true;
} else {
uni.navigateTo({ uni.navigateTo({
url: '/pages/friendcircle/release' 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