Commit 033b1315 authored by 罗超's avatar 罗超

Merge branch 'master' of http://gitlab.oytour.com/viitto/mallapp

parents fb7cf354 e0e3a40f
...@@ -168,18 +168,21 @@ ...@@ -168,18 +168,21 @@
</view> </view>
</view> </view>
</scroll-view> </scroll-view>
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth= 'gbAuth'></auth>
</view> </view>
</template> </template>
<script> <script>
import auth from "../../../components/auth/index.vue";
import hParse from "@/components/u-parse/parse.vue"; import hParse from "@/components/u-parse/parse.vue";
export default { export default {
components: { components: {
auth,
hParse hParse
}, },
data() { data() {
return { return {
showAuth:false,
ID:0, ID:0,
details:{}, details:{},
typeList: [{ typeList: [{
...@@ -311,6 +314,14 @@ ...@@ -311,6 +314,14 @@
} }
}, },
getlove(){ getlove(){
this.u = uni.getStorageSync("mall_UserInfo");
if (!this.u) {
this.u = {
nickName: "未登录",
avatarUrl: ""
};
this.showAuth = true;
} else{
this.request2( this.request2(
{ {
url: '/api/AppletTrade/GetCollect', url: '/api/AppletTrade/GetCollect',
...@@ -327,6 +338,17 @@ ...@@ -327,6 +338,17 @@
} }
); );
} }
},
reloadUserinfo() {
this.u = uni.getStorageSync("mall_UserInfo");
this.showAuth=false;
this.getlove();
},
//关闭登录窗口
gbAuth(){
this.showAuth=false
},
} }
} }
......
...@@ -167,13 +167,20 @@ ...@@ -167,13 +167,20 @@
</view> </view>
</view> </view>
</scroll-view> </scroll-view>
<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 {
showAuth:false,
id:0, id:0,
imgsList: [], imgsList: [],
typeList: [{ typeList: [{
...@@ -329,7 +336,14 @@ ...@@ -329,7 +336,14 @@
}, },
// 关注与取消关注 // 关注与取消关注
follow(){ follow(){
console.log("follow") this.u = uni.getStorageSync("mall_UserInfo");
if (!this.u) {
this.u = {
nickName: "未登录",
avatarUrl: ""
};
this.showAuth = true;
} else{
let that=this let that=this
let parms = { let parms = {
url: "/api/AppletTrade/GetCollect", url: "/api/AppletTrade/GetCollect",
...@@ -346,6 +360,18 @@ ...@@ -346,6 +360,18 @@
} }
}) })
} }
},
reloadUserinfo() {
this.u = uni.getStorageSync("mall_UserInfo");
this.showAuth=false;
this.follow();
},
//关闭登录窗口
gbAuth(){
this.showAuth=false
},
}, },
mounted() { mounted() {
this.getDetail() this.getDetail()
......
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