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

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

parents fb7cf354 e0e3a40f
......@@ -168,18 +168,21 @@
</view>
</view>
</scroll-view>
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth= 'gbAuth'></auth>
</view>
</template>
<script>
import auth from "../../../components/auth/index.vue";
import hParse from "@/components/u-parse/parse.vue";
export default {
components: {
auth,
hParse
},
data() {
return {
showAuth:false,
ID:0,
details:{},
typeList: [{
......@@ -311,22 +314,41 @@
}
},
getlove(){
this.request2(
{
url: '/api/AppletTrade/GetCollect',
data: {Type:2,SourceId:this.ID,Id:this.details.CollectId}
},
res => {
if(res.resultCode==1){
uni.showToast({
title: res.message,
icon:'none'
});
this.GetBrandDetails()
this.u = uni.getStorageSync("mall_UserInfo");
if (!this.u) {
this.u = {
nickName: "未登录",
avatarUrl: ""
};
this.showAuth = true;
} else{
this.request2(
{
url: '/api/AppletTrade/GetCollect',
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 @@
</view>
</view>
</scroll-view>
<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 {
showAuth:false,
id:0,
imgsList: [],
typeList: [{
......@@ -329,23 +336,42 @@
},
// 关注与取消关注
follow(){
console.log("follow")
let that=this
let parms = {
url: "/api/AppletTrade/GetCollect",
data:{
SourceId:this.id,
Id:this.detailData.CollectId,
Type:1,
this.u = uni.getStorageSync("mall_UserInfo");
if (!this.u) {
this.u = {
nickName: "未登录",
avatarUrl: ""
};
this.showAuth = true;
} 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() {
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