配置微信小程序返回首页按钮
parent
eb11f9dbae
commit
885ccb5006
|
@ -4,7 +4,7 @@
|
|||
<image src="/static/pointTrade/point_bg_1.png" mode=""></image>
|
||||
<image class="point-img" src="/static/pointTrade/tradehall.png" />
|
||||
<view class="position-point">
|
||||
<view class="apply-point" @click="goIntro"><text>积分介绍</text></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="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" />
|
||||
<span>¥{{
|
||||
<span v-else>¥{{
|
||||
orderMessage.priceDetailDTO.freightPrice | unitPrice
|
||||
}}</span>
|
||||
</u-col>
|
||||
|
@ -278,6 +278,7 @@ export default {
|
|||
},
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* 监听返回
|
||||
*/
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
</view>
|
||||
<view class="btns">
|
||||
<button type="primary" bindtap="getUserProfile" @click="getUserProfile()" class="btn-auth">使用微信授权</button>
|
||||
<button @click="backToHome" class="btn-callback">暂不登录</button>
|
||||
</view>
|
||||
</div>
|
||||
</view>
|
||||
|
@ -74,6 +75,11 @@ export default {
|
|||
back() {
|
||||
whetherNavigate("wx");
|
||||
},
|
||||
backToHome(){
|
||||
uni.switchTab({
|
||||
url: `/pages/tabbar/home/index`
|
||||
});
|
||||
},
|
||||
//获取用户信息
|
||||
getUserProfile(e) {
|
||||
let that = this;
|
||||
|
@ -229,8 +235,8 @@ text.shop {
|
|||
|
||||
.btn-auth {
|
||||
width: 92%;
|
||||
margin: 0 auto 100rpx;
|
||||
border-radius: 100px;
|
||||
margin: 0 auto 40rpx;
|
||||
// border-radius: 100px;
|
||||
animation: mymove 5s infinite;
|
||||
-webkit-animation: mymove 5s infinite; /*Safari and Chrome*/
|
||||
animation-direction: alternate; /*轮流反向播放动画。*/
|
||||
|
@ -240,10 +246,15 @@ text.shop {
|
|||
-webkit-animation-direction: alternate; /*轮流反向播放动画。*/
|
||||
-webkit-animation-timing-function: ease-in-out; /*动画的速度曲线*/
|
||||
}
|
||||
.btn-callback {
|
||||
width: 92%;
|
||||
margin: 0 auto 100rpx;
|
||||
}
|
||||
|
||||
.btns {
|
||||
margin-top: 100rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
justify-content: center;
|
||||
}
|
||||
|
|
|
@ -68,10 +68,9 @@
|
|||
</view>
|
||||
</view>
|
||||
</div>
|
||||
|
||||
<!-- 常用工具 -->
|
||||
|
||||
<tool />
|
||||
<tool />
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
@ -79,9 +78,6 @@
|
|||
import tool from "@/pages/tabbar/user/utils/tool.vue";
|
||||
import { getCouponsNum, getFootprintNum } from "@/api/members.js";
|
||||
import { getUserWallet } from "@/api/members";
|
||||
let startY = 0,
|
||||
moveY = 0,
|
||||
pageAtTop = true;
|
||||
export default {
|
||||
components: {
|
||||
tool,
|
||||
|
@ -102,6 +98,8 @@ export default {
|
|||
this.userInfo = this.$options.filters.isLogin();
|
||||
if (this.$options.filters.isLogin("auth")) {
|
||||
this.getUserOrderNum();
|
||||
} else {
|
||||
this.walletNum = 0;
|
||||
}
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
|
@ -133,45 +131,6 @@ export default {
|
|||
? this.navigateTo("/pages/mine/set/personMsg")
|
||||
: 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() {
|
||||
uni.stopPullDownRefresh();
|
||||
|
||||
|
|
Loading…
Reference in New Issue