Commit 9a7c4c01 authored by Mac's avatar Mac

品牌和载体列表详情 加了登录验证

parent cd2c5b2e
......@@ -6,8 +6,9 @@
box-sizing: border-box;
position: relative;
"
>
<scroll-view scroll-y="true" style="height: 100%" @scroll="scroll">
<scroll-view scroll-y="true" style="height: 100%" @scroll="scroll" v-if='details'>
<view class="bg-red">
<view class="detail-box">
<view class="header flex" style="popsition: relative">
......@@ -643,10 +644,12 @@
:eleId="eleId"
>
</bianmarenTooltip>
<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";
import bianmarenTooltip from "../components/bianmaren-tooltips.vue";
let timer;
......@@ -654,12 +657,15 @@ export default {
components: {
hParse,
bianmarenTooltip,
auth
},
data() {
return {
showAuth:false,
u:{},
rate: 5,
ID: 0,
details: {},
details: null,
typeList: [
{
Id: 0,
......@@ -752,7 +758,17 @@ export default {
let that = this;
if (options && options.id) {
this.ID = options.id;
this.GetBrandDetails();
this.u = uni.getStorageSync("mall_UserInfo");
if (!this.u) {
this.u = {
nickName: "未登录",
avatarUrl: "",
};
this.showAuth = true;
} else {
this.GetBrandDetails();
}
}
uni.getSystemInfo({
......@@ -853,6 +869,14 @@ export default {
};
},
methods: {
reloadUserinfo() {
this.u = uni.getStorageSync("mall_UserInfo");
this.GetBrandDetails();
},
//关闭登录窗口
gbAuth() {
uni.navigateBack()
},
showTips(id, text, showis) {
clearInterval(timer);
if (this.eleId == id && this.tooltipShow == true) {
......
......@@ -118,18 +118,23 @@
<!-- <view style="width: 100%;height: 30px;"></view> -->
</scroll-view>
</view>
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth="gbAuth" ></auth>
<tabbars></tabbars>
</div>
</template>
<script>
import auth from "@/components/auth/index.vue";
import tabbars from "@/components/tabbar/index";
export default {
components: {
tabbars,
auth
},
data() {
return {
showAuth:false,
u:{},
mainColor: "",
active: 0,
searchKey: "",
......@@ -224,11 +229,23 @@ export default {
if (options && options.id) {
this.msg.BrandClassId = options.id;
}
this.GetBrandClassList();
this.u = uni.getStorageSync("mall_UserInfo");
if (!this.u) {
this.u = {
nickName: "未登录",
avatarUrl: "",
};
this.showAuth = true;
} else {
this.GetBrandClassList();
this.getPrizeList();
}
},
created() {
this.mainColor = this.$uiConfig.mainColor;
this.getPrizeList();
},
mounted() {
uni.setNavigationBarTitle({
......@@ -238,6 +255,16 @@ export default {
this.contentHeight = this.$utils.calcContentHeight(c) + 40;
},
methods: {
reloadUserinfo() {
this.u = uni.getStorageSync("mall_UserInfo");
this.msg.BrandName=''
this.GetBrandClassList();
this.getPrizeList();
},
//关闭登录窗口
gbAuth() {
this.showAuth = false
},
GetBrandClassList() {
this.request2(
{
......@@ -307,10 +334,20 @@ export default {
});
},
searchHandler(val) {
this.msg.BrandName = val;
this.msg.pageIndex = 1;
this.g = [];
this.init();
this.u = uni.getStorageSync("mall_UserInfo");
if (!this.u) {
this.u = {
nickName: "未登录",
avatarUrl: "",
};
this.showAuth = true;
} else {
this.msg.BrandName = val;
this.msg.pageIndex = 1;
this.g = [];
this.init();
}
},
getPrizeList() {
this.request2(
......
......@@ -786,12 +786,21 @@
</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,
u:{},
id: 0,
imgsList: [],
typeList: [
......@@ -903,6 +912,17 @@ export default {
onLoad(options) {
this.id = options.id;
// this.ProjectType = options.type;
this.u = uni.getStorageSync("mall_UserInfo");
if (!this.u) {
this.u = {
nickName: "未登录",
avatarUrl: "",
};
this.showAuth = true;
} else {
this.getDetail();
}
let that = this;
uni.getSystemInfo({
success(res) {
......@@ -916,6 +936,14 @@ export default {
this.mainColor = this.$uiConfig.mainColor;
},
methods: {
reloadUserinfo() {
this.u = uni.getStorageSync("mall_UserInfo");
this.getDetail();
},
//关闭登录窗口
gbAuth() {
uni.navigateBack()
},
changeHandler(i) {
this.active = i;
},
......@@ -1045,7 +1073,7 @@ export default {
},
},
mounted() {
this.getDetail();
},
};
</script>
......
......@@ -3,7 +3,7 @@
style="background-color: #f6f6f6; overflow: hidden"
:style="{ height: contentHeight + 'px' }"
>
<view style="padding: 5px 10px">
<view style="padding: 5px 10px" v-if="isauth">
<u-search
placeholder="搜索载体名称"
:focus="false"
......@@ -39,7 +39,7 @@
<u-icon name="wap-nav" color="#111" size="42"></u-icon>
</div> -->
</view>
<view class="carrierScreen">
<view class="carrierScreen" v-if="isauth">
<view class="statusBox">
<picker @change="statusChange" :range="kystatus" range-key="name">
<view class="curStatusName"
......@@ -169,18 +169,24 @@
<u-loading mode="flower" size="48"></u-loading>
<Text style="color: #f6f6f6; margin-top: 10rpx">加载中...</Text>
</view>
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth="gbAuth" ></auth>
<tabbars></tabbars>
</div>
</template>
<script>
import auth from "@/components/auth/index.vue";
import tabbars from "@/components/tabbar/index";
export default {
components: {
tabbars,
auth
},
data() {
return {
showAuth:false,
u:{},
isauth:false,
mainColor: "",
active: 0,
searchKey: "",
......@@ -300,7 +306,20 @@ export default {
if (options && options.FirstStoreTest) {
this.msg.FirstStoreTest = parseInt(options.FirstStoreTest);
}
this.getTypeList();
this.u = uni.getStorageSync("mall_UserInfo");
if (!this.u) {
this.u = {
nickName: "未登录",
avatarUrl: "",
};
this.showAuth = true;
} else {
this.getTypeList();
this.isauth = true
}
},
created() {
this.mainColor = this.$uiConfig.mainColor;
......@@ -311,6 +330,15 @@ export default {
});
},
methods: {
reloadUserinfo() {
this.u = uni.getStorageSync("mall_UserInfo");
this.isauth = true;//成都登录 就显示
this.getTypeList();
},
//关闭登录窗口
gbAuth() {
this.showAuth = false
},
// 获取载体列表
getTypeList() {
let parms = {
......@@ -367,10 +395,21 @@ export default {
});
},
searchHandler(val) {
this.msg.CarrierName = val;
this.msg.pageIndex = 1;
this.dataList = [];
this.getCarrierPageList();
this.u = uni.getStorageSync("mall_UserInfo");
if (!this.u) {
this.u = {
nickName: "未登录",
avatarUrl: "",
};
this.showAuth = true;
} else {
this.msg.CarrierName = val;
this.msg.pageIndex = 1;
this.dataList = [];
this.getCarrierPageList();
}
},
//触底事件
lower(e) {
......
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