Commit 9a7c4c01 authored by Mac's avatar Mac

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

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