Commit bdfe9dc3 authored by zhengke's avatar zhengke

修改页面

parent 0f76a221
<template> <template>
<div class="auth-page"> <div class="auth-page">
<u-popup v-model="showDialog" mode="center" custom-style="padding:0;background:none;"> <u-popup v-model="showDialog" mode="center" :mask-close-able="false" custom-style="padding:0;background:none;">
<img :src="pageinfo.pic_url" mode="widthFix" /> <img :src="pageinfo.pic_url" mode="widthFix" />
<button :style="sureStyle" class="hotsopt" open-type="getUserInfo" @getuserinfo="getUserInfo"></button> <button :style="sureStyle" class="hotsopt" open-type="getUserInfo" @getuserinfo="getUserInfo"></button>
<button :style="cancelStyle" class="hotsopt" @click="close"></button> <button :style="cancelStyle" class="hotsopt" @click="close"></button>
...@@ -28,6 +28,7 @@ export default { ...@@ -28,6 +28,7 @@ export default {
methods: { methods: {
getUserInfo(e) { getUserInfo(e) {
var that = this; var that = this;
that.showDialog=true;
uni.getProvider({ uni.getProvider({
service: 'oauth', service: 'oauth',
success: function(res) { success: function(res) {
...@@ -70,6 +71,7 @@ export default { ...@@ -70,6 +71,7 @@ export default {
}); });
}, },
close() { close() {
this.showDialog=false;
this.$emit('gbAuth'); this.$emit('gbAuth');
}, },
//调用获取code //调用获取code
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<view style="flex: 1;"><u-button @click="joinCar" :ripple="true" :hair-line="false" :custom-style="btn1">加入购物车</u-button></view> <view style="flex: 1;"><u-button @click="joinCar" :ripple="true" :hair-line="false" :custom-style="btn1">加入购物车</u-button></view>
<view style="flex: 1;"><u-button @click="buy" :ripple="true" :hair-line="false" :custom-style="btn2">立即购买</u-button></view> <view style="flex: 1;"><u-button @click="buy" :ripple="true" :hair-line="false" :custom-style="btn2">立即购买</u-button></view>
</view> </view>
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth="goback"></auth> <auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth="gbAuth"></auth>
</view> </view>
</template> </template>
...@@ -117,8 +117,9 @@ export default { ...@@ -117,8 +117,9 @@ export default {
this.u = uni.getStorageSync('mall_UserInfo'); this.u = uni.getStorageSync('mall_UserInfo');
this.showAuth = false; this.showAuth = false;
}, },
goback() { //关闭登录窗口
uni.navigateBack(); gbAuth(){
this.showAuth=false;
} }
} }
}; };
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<img :src="u.avatarUrl" /> <img :src="u.avatarUrl" />
<div class="text">{{u.nickName}}</div> <div class="text">{{u.nickName}}</div>
</div> </div>
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo"></auth> <auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth="gbAuth"></auth>
</div> </div>
</template> </template>
...@@ -35,6 +35,10 @@ export default { ...@@ -35,6 +35,10 @@ export default {
reloadUserinfo() { reloadUserinfo() {
this.u = uni.getStorageSync("mall_UserInfo"); this.u = uni.getStorageSync("mall_UserInfo");
this.showAuth=false this.showAuth=false
},
//关闭登录窗口
gbAuth(){
this.showAuth=false;
} }
} }
}; };
......
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
@confirm="confirm" @confirm="confirm"
></u-modal> ></u-modal>
<u-toast ref="uToast" /> <u-toast ref="uToast" />
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth= 'goback'></auth> <auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth= 'gbAuth'></auth>
</view> </view>
</template> </template>
...@@ -167,8 +167,9 @@ export default { ...@@ -167,8 +167,9 @@ export default {
this.showAuth = false; this.showAuth = false;
this.init(); this.init();
}, },
goback(){ //关闭登录窗口
uni.navigateBack() gbAuth(){
this.showAuth=false;
}, },
isdefault(item) { isdefault(item) {
//设置默认地址 //设置默认地址
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
</view> </view>
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo"></auth> <auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth="gbAuth"></auth>
<view class="loading" v-if="load"> <view class="loading" v-if="load">
<u-loading mode="flower" size="48"></u-loading> <u-loading mode="flower" size="48"></u-loading>
<Text style='color: #fff;margin-top: 10rpx;'>加载中...</Text> <Text style='color: #fff;margin-top: 10rpx;'>加载中...</Text>
...@@ -208,6 +208,10 @@ ...@@ -208,6 +208,10 @@
uni.navigateTo({ uni.navigateTo({
url: '/pages/balance/detail?id='+id url: '/pages/balance/detail?id='+id
}) })
},
//关闭登录窗口
gbAuth(){
this.showAuth=false;
} }
} }
} }
......
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
</view> </view>
<!-- 取消提示 --> <!-- 取消提示 -->
<u-toast ref="uToast" /> <u-toast ref="uToast" />
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth= 'goback'></auth> <auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth= 'gbAuth'></auth>
</view> </view>
</template> </template>
...@@ -193,8 +193,9 @@ export default { ...@@ -193,8 +193,9 @@ export default {
this.showAuth=false; this.showAuth=false;
this.init(); this.init();
}, },
goback(){ //关闭登录窗口
uni.navigateBack() gbAuth(){
this.showAuth=false;
}, },
godetails(item){ godetails(item){
if(this.msg.UseState ==0){ if(this.msg.UseState ==0){
......
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
</view> </view>
</template> </template>
<good-sku v-if="showSku" :option-type="2" borderRadius="20" v-model="showSku" :good="sku"></good-sku> <good-sku v-if="showSku" :option-type="2" borderRadius="20" v-model="showSku" :good="sku"></good-sku>
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth= 'goback'></auth> <auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth= 'gbAuth'></auth>
</view> </view>
</template> </template>
...@@ -174,7 +174,6 @@ ...@@ -174,7 +174,6 @@
res => { res => {
uni.hideLoading(); uni.hideLoading();
if(res.resultCode==1){ if(res.resultCode==1){
this.goodslist = this.goodslist.concat(res.data.pageData); this.goodslist = this.goodslist.concat(res.data.pageData);
this.page_count = res.data.pageCount; this.page_count = res.data.pageCount;
if (this.page_count == 1) { if (this.page_count == 1) {
...@@ -199,8 +198,9 @@ ...@@ -199,8 +198,9 @@
this.showAuth=false; this.showAuth=false;
this.init(); this.init();
}, },
goback(){ //关闭登录窗口
uni.navigateBack() gbAuth(){
this.showAuth=false;
}, },
clickHandler(cx) { clickHandler(cx) {
uni.navigateTo({ uni.navigateTo({
......
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
</scroll-view> </scroll-view>
</view> </view>
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth= 'goback'></auth> <auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth= 'gbAuth'></auth>
<view class="loading" v-show="loading"> <view class="loading" v-show="loading">
<u-loading mode="flower" size="48"></u-loading> <u-loading mode="flower" size="48"></u-loading>
<Text style='color: #fff;margin-top: 10rpx;'>加载中...</Text> <Text style='color: #fff;margin-top: 10rpx;'>加载中...</Text>
...@@ -255,8 +255,9 @@ ...@@ -255,8 +255,9 @@
this.showAuth=false; this.showAuth=false;
this.init(); //成功之后调取接口 this.init(); //成功之后调取接口
}, },
goback(){ //关闭登录窗口
uni.navigateBack() gbAuth(){
this.showAuth=false;
}, },
change(index) { change(index) {
this.current = index; this.current = index;
......
...@@ -89,7 +89,7 @@ ...@@ -89,7 +89,7 @@
</view> </view>
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo"></auth> <auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth="gbAuth"></auth>
</view> </view>
</template> </template>
...@@ -239,8 +239,11 @@ ...@@ -239,8 +239,11 @@
uni.navigateTo({ uni.navigateTo({
url: url+'?u='+ amount url: url+'?u='+ amount
}); });
},
//关闭登录窗口
gbAuth(){
this.showAuth=false;
} }
} }
} }
</script> </script>
......
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
<!-- 取消提示 --> <!-- 取消提示 -->
<u-toast ref="uToast" /> <u-toast ref="uToast" />
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth= 'goback'></auth> <auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth= 'gbAuth'></auth>
</view> </view>
</template> </template>
...@@ -173,9 +173,10 @@ export default { ...@@ -173,9 +173,10 @@ export default {
this.showAuth=false; this.showAuth=false;
this.init(); this.init();
}, },
goback(){ //关闭登录窗口
uni.navigateBack() gbAuth(){
}, this.showAuth=false;
}
}, },
}; };
</script> </script>
......
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