Commit d77ac75e authored by zhangjianguo's avatar zhangjianguo

1

parent bcad63e4
......@@ -60,7 +60,7 @@
@confirm="confirm"
></u-modal>
<u-toast ref="uToast" />
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo"></auth>
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth= 'goback'></auth>
</view>
</template>
......@@ -116,18 +116,20 @@ export default {
});
},
onLoad(option) {
this.u = wx.getStorageSync("mall_UserInfo");
if (!this.u) {
this.u = {
nickName: "未登录",
avatarUrl: ""
};
this.showAuth = true;
}
this.u = uni.getStorageSync("mall_UserInfo");
if (!this.u) {
this.u = {
nickName: "未登录",
avatarUrl: ""
};
this.showAuth = true;
} else{
this.init();
}
if (option && option.form) {
(this.source = option.form), (this.defaultId = option.id);
}
this.init();
},
methods: {
chosenHandler(item){
......@@ -163,7 +165,11 @@ export default {
reloadUserinfo() {
this.u = uni.getStorageSync("mall_UserInfo");
this.showAuth = false;
this.init();
},
goback(){
uni.navigateBack()
},
isdefault(item) {
//设置默认地址
uni.showNavigationBarLoading();
......
......@@ -78,20 +78,20 @@
</view>
<!-- 取消提示 -->
<u-toast ref="uToast" />
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth= 'goback'></auth>
</view>
</template>
<script>
import auth from "../../../components/auth/index.vue";
export default {
components: {
auth
},
data() {
return {
pageTitle: "我的优惠券",
showAuth:false,
list: [
{ name: "未使用" },
{ name: "已使用" },
......@@ -136,8 +136,16 @@ export default {
});
},
onLoad: function (option) {
this.loading = true;
this.init();
this.u = uni.getStorageSync("mall_UserInfo");
if (!this.u) {
this.u = {
nickName: "未登录",
avatarUrl: ""
};
this.showAuth = true;
} else{
this.init();
}
},
methods: {
change(index) {
......@@ -180,6 +188,14 @@ export default {
this.status = "nomore";
}
},
reloadUserinfo() {
this.u = uni.getStorageSync("mall_UserInfo");
this.showAuth=false;
this.init();
},
goback(){
uni.navigateBack()
},
godetails(item){
if(this.msg.UseState ==0){
uni.navigateTo({
......
......@@ -65,7 +65,7 @@
</view>
</template>
<good-sku v-if="showSku" :option-type="2" borderRadius="20" v-model="showSku" :good="sku"></good-sku>
<!-- <auth v-if="showAuth" @changeuserinfo="reloadUserinfo"></auth> -->
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth= 'goback'></auth>
</view>
</template>
......@@ -110,7 +110,7 @@
created(){
this.contentHeight = this.$utils.calcContentHeight(-40)+'px';
this.mainColor = this.$uiConfig.mainColor;
this.init()
},
mounted() {
let currentPages = getCurrentPages();
......@@ -135,7 +135,11 @@
avatarUrl: ""
};
this.showAuth = true;
}
} else{
this.init();
}
},
methods: {
......@@ -192,7 +196,11 @@
},
reloadUserinfo() {
this.u = uni.getStorageSync("mall_UserInfo");
this.showAuth=false
this.showAuth=false;
this.init();
},
goback(){
uni.navigateBack()
},
clickHandler(cx) {
uni.navigateTo({
......
......@@ -75,7 +75,7 @@
</scroll-view>
</view>
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo"></auth>
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth= 'goback'></auth>
<view class="loading" v-show="loading">
<u-loading mode="flower" size="48"></u-loading>
<Text style='color: #fff;margin-top: 10rpx;'>加载中...</Text>
......@@ -136,9 +136,7 @@
data() {
return {
pageTitle:"我的足迹",
isloading:true,
loading:false,
loading2:false,
showAuth:false,
contentHeight:0,
mainColor: "",
......@@ -184,7 +182,7 @@
created(){
this.contentHeight = this.$utils.calcContentHeight(-40)+'px';
this.mainColor = this.$uiConfig.mainColor;
this.fun_date(0)
},
mounted() {
......@@ -210,7 +208,9 @@
avatarUrl: ""
};
this.showAuth = true;
}
} else{
this.fun_date(0)
}
},
methods: {
init(){
......@@ -250,8 +250,13 @@
}
},
reloadUserinfo() {
this.u = uni.getStorageSync("mall_UserInfo");
this.showAuth=false
this.showAuth=false;
this.init(); //成功之后调取接口
},
goback(){
uni.navigateBack()
},
change(index) {
this.current = index;
......
......@@ -52,15 +52,16 @@
<!-- 取消提示 -->
<u-toast ref="uToast" />
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth= 'goback'></auth>
</view>
</template>
<script>
import auth from "../../../components/auth/index.vue";
export default {
components: {
auth
},
data() {
return {
......@@ -71,7 +72,7 @@ export default {
{ name: "支出" },
],
showAuth:false,
msg:{
pageIndex: 1,
pageSize:10,
......@@ -112,10 +113,20 @@ export default {
uni.setNavigationBarTitle({
title: this.pageTitle,
});
this.loading = true;
this.init();
},
onLoad(){
this.u = uni.getStorageSync("mall_UserInfo");
if (!this.u) {
this.u = {
nickName: "未登录",
avatarUrl: ""
};
this.showAuth = true;
} else{
this.init();
}
},
methods: {
change(index) {
......@@ -127,7 +138,7 @@ export default {
this.init();
},
init() {
this.loading = true;
this.msg.Type = this.current+1
this.request2(
{
......@@ -157,6 +168,14 @@ export default {
this.status = "nomore";
}
},
reloadUserinfo() {
this.u = uni.getStorageSync("mall_UserInfo");
this.showAuth=false;
this.init();
},
goback(){
uni.navigateBack()
},
},
};
</script>
......
......@@ -130,13 +130,13 @@ export default {
onLoad() {
this.navHeight = this.$navHeight - 2;
this.u = wx.getStorageSync('basedata').user_info;
if (!this.u) {
this.u = {
nickname: '未登录',
avatarUrl: ''
};
this.showAuth = true;
}
// if (!this.u) {
// this.u = {
// nickname: '未登录',
// avatarUrl: ''
// };
// this.showAuth = true;
// }
},
mounted() {
let currentPages = getCurrentPages();
......
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