配置微信小程序返回首页按钮
parent
eb11f9dbae
commit
885ccb5006
|
@ -4,7 +4,7 @@
|
||||||
<image src="/static/pointTrade/point_bg_1.png" mode=""></image>
|
<image src="/static/pointTrade/point_bg_1.png" mode=""></image>
|
||||||
<image class="point-img" src="/static/pointTrade/tradehall.png" />
|
<image class="point-img" src="/static/pointTrade/tradehall.png" />
|
||||||
<view class="position-point">
|
<view class="position-point">
|
||||||
<view class="apply-point" @click="goIntro"><text>积分介绍</text></view>
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
@ -154,7 +154,7 @@
|
||||||
<u-col v-if="orderMessage.cartTypeEnum != 'VIRTUAL'" :span="7">运费</u-col>
|
<u-col v-if="orderMessage.cartTypeEnum != 'VIRTUAL'" :span="7">运费</u-col>
|
||||||
<u-col v-if="orderMessage.cartTypeEnum != 'VIRTUAL'" :span="5" class="tr tipsColor" textAlign="right">
|
<u-col v-if="orderMessage.cartTypeEnum != 'VIRTUAL'" :span="5" class="tr tipsColor" textAlign="right">
|
||||||
<u-tag v-if="orderMessage.priceDetailDTO.freightPrice == 0" style="margin-right: 20rpx" color="#FF6262" text="包邮" type="warning" size="mini" mode="plain" shape="circle" />
|
<u-tag v-if="orderMessage.priceDetailDTO.freightPrice == 0" style="margin-right: 20rpx" color="#FF6262" text="包邮" type="warning" size="mini" mode="plain" shape="circle" />
|
||||||
<span>¥{{
|
<span v-else>¥{{
|
||||||
orderMessage.priceDetailDTO.freightPrice | unitPrice
|
orderMessage.priceDetailDTO.freightPrice | unitPrice
|
||||||
}}</span>
|
}}</span>
|
||||||
</u-col>
|
</u-col>
|
||||||
|
@ -278,6 +278,7 @@ export default {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 监听返回
|
* 监听返回
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="btns">
|
<view class="btns">
|
||||||
<button type="primary" bindtap="getUserProfile" @click="getUserProfile()" class="btn-auth">使用微信授权</button>
|
<button type="primary" bindtap="getUserProfile" @click="getUserProfile()" class="btn-auth">使用微信授权</button>
|
||||||
|
<button @click="backToHome" class="btn-callback">暂不登录</button>
|
||||||
</view>
|
</view>
|
||||||
</div>
|
</div>
|
||||||
</view>
|
</view>
|
||||||
|
@ -74,6 +75,11 @@ export default {
|
||||||
back() {
|
back() {
|
||||||
whetherNavigate("wx");
|
whetherNavigate("wx");
|
||||||
},
|
},
|
||||||
|
backToHome(){
|
||||||
|
uni.switchTab({
|
||||||
|
url: `/pages/tabbar/home/index`
|
||||||
|
});
|
||||||
|
},
|
||||||
//获取用户信息
|
//获取用户信息
|
||||||
getUserProfile(e) {
|
getUserProfile(e) {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
@ -229,8 +235,8 @@ text.shop {
|
||||||
|
|
||||||
.btn-auth {
|
.btn-auth {
|
||||||
width: 92%;
|
width: 92%;
|
||||||
margin: 0 auto 100rpx;
|
margin: 0 auto 40rpx;
|
||||||
border-radius: 100px;
|
// border-radius: 100px;
|
||||||
animation: mymove 5s infinite;
|
animation: mymove 5s infinite;
|
||||||
-webkit-animation: mymove 5s infinite; /*Safari and Chrome*/
|
-webkit-animation: mymove 5s infinite; /*Safari and Chrome*/
|
||||||
animation-direction: alternate; /*轮流反向播放动画。*/
|
animation-direction: alternate; /*轮流反向播放动画。*/
|
||||||
|
@ -240,10 +246,15 @@ text.shop {
|
||||||
-webkit-animation-direction: alternate; /*轮流反向播放动画。*/
|
-webkit-animation-direction: alternate; /*轮流反向播放动画。*/
|
||||||
-webkit-animation-timing-function: ease-in-out; /*动画的速度曲线*/
|
-webkit-animation-timing-function: ease-in-out; /*动画的速度曲线*/
|
||||||
}
|
}
|
||||||
|
.btn-callback {
|
||||||
|
width: 92%;
|
||||||
|
margin: 0 auto 100rpx;
|
||||||
|
}
|
||||||
|
|
||||||
.btns {
|
.btns {
|
||||||
margin-top: 100rpx;
|
margin-top: 100rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,10 +68,9 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 常用工具 -->
|
<!-- 常用工具 -->
|
||||||
|
|
||||||
<tool />
|
<tool />
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
@ -79,9 +78,6 @@
|
||||||
import tool from "@/pages/tabbar/user/utils/tool.vue";
|
import tool from "@/pages/tabbar/user/utils/tool.vue";
|
||||||
import { getCouponsNum, getFootprintNum } from "@/api/members.js";
|
import { getCouponsNum, getFootprintNum } from "@/api/members.js";
|
||||||
import { getUserWallet } from "@/api/members";
|
import { getUserWallet } from "@/api/members";
|
||||||
let startY = 0,
|
|
||||||
moveY = 0,
|
|
||||||
pageAtTop = true;
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
tool,
|
tool,
|
||||||
|
@ -102,6 +98,8 @@ export default {
|
||||||
this.userInfo = this.$options.filters.isLogin();
|
this.userInfo = this.$options.filters.isLogin();
|
||||||
if (this.$options.filters.isLogin("auth")) {
|
if (this.$options.filters.isLogin("auth")) {
|
||||||
this.getUserOrderNum();
|
this.getUserOrderNum();
|
||||||
|
} else {
|
||||||
|
this.walletNum = 0;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onPullDownRefresh() {
|
onPullDownRefresh() {
|
||||||
|
@ -133,45 +131,6 @@ export default {
|
||||||
? this.navigateTo("/pages/mine/set/personMsg")
|
? this.navigateTo("/pages/mine/set/personMsg")
|
||||||
: this.navigateTo("/pages/passport/login");
|
: this.navigateTo("/pages/passport/login");
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
|
||||||
* 会员卡下拉和回弹
|
|
||||||
* 1.关闭bounce避免ios端下拉冲突
|
|
||||||
* 2.由于touchmove事件的缺陷(以前做小程序就遇到,比如20跳到40,h5反而好很多),下拉的时候会有掉帧的感觉
|
|
||||||
* transition设置0.1秒延迟,让css来过渡这段空窗期
|
|
||||||
* 3.回弹效果可修改曲线值来调整效果,推荐一个好用的bezier生成工具 http://cubic-bezier.com/
|
|
||||||
*/
|
|
||||||
coverTouchstart(e) {
|
|
||||||
if (pageAtTop === false) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.coverTransition = "transform .1s linear";
|
|
||||||
startY = e.touches[0].clientY;
|
|
||||||
},
|
|
||||||
coverTouchmove(e) {
|
|
||||||
moveY = e.touches[0].clientY;
|
|
||||||
let moveDistance = moveY - startY;
|
|
||||||
if (moveDistance < 0) {
|
|
||||||
this.moving = false;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.moving = true;
|
|
||||||
if (moveDistance >= 80 && moveDistance < 100) {
|
|
||||||
moveDistance = 80;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (moveDistance > 0 && moveDistance <= 80) {
|
|
||||||
this.coverTransform = `translateY(${moveDistance}px)`;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
coverTouchend() {
|
|
||||||
if (this.moving === false) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.moving = false;
|
|
||||||
this.coverTransition = "transform 0.3s cubic-bezier(.21,1.93,.53,.64)";
|
|
||||||
this.coverTransform = "translateY(0px)";
|
|
||||||
},
|
|
||||||
async getUserOrderNum() {
|
async getUserOrderNum() {
|
||||||
uni.stopPullDownRefresh();
|
uni.stopPullDownRefresh();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue