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,22 +314,41 @@ ...@@ -311,22 +314,41 @@
} }
}, },
getlove(){ getlove(){
this.request2( this.u = uni.getStorageSync("mall_UserInfo");
{ if (!this.u) {
url: '/api/AppletTrade/GetCollect', this.u = {
data: {Type:2,SourceId:this.ID,Id:this.details.CollectId} nickName: "未登录",
}, avatarUrl: ""
res => { };
if(res.resultCode==1){ this.showAuth = true;
uni.showToast({ } else{
title: res.message, this.request2(
icon:'none' {
}); url: '/api/AppletTrade/GetCollect',
this.GetBrandDetails() data: {Type:2,SourceId:this.ID,Id:this.details.CollectId}
},
res => {
if(res.resultCode==1){
uni.showToast({
title: res.message,
icon:'none'
});
this.GetBrandDetails()
}
} }
} );
); }
}
},
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,23 +336,42 @@ ...@@ -329,23 +336,42 @@
}, },
// 关注与取消关注 // 关注与取消关注
follow(){ follow(){
console.log("follow") this.u = uni.getStorageSync("mall_UserInfo");
let that=this if (!this.u) {
let parms = { this.u = {
url: "/api/AppletTrade/GetCollect", nickName: "未登录",
data:{ avatarUrl: ""
SourceId:this.id, };
Id:this.detailData.CollectId, this.showAuth = true;
Type:1, } else{
let that=this
let parms = {
url: "/api/AppletTrade/GetCollect",
data:{
SourceId:this.id,
Id:this.detailData.CollectId,
Type:1,
}
} }
this.request2(parms, (res) => {
if (res.resultCode == 1) {
that.getDetail()
}
})
} }
this.request2(parms, (res) => {
if (res.resultCode == 1) {
that.getDetail() },
} 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