Browse Source

订单详情核销码优化/首页banner图判断跳转

test
Enzo 4 years ago
parent
commit
b11f6af1fa
  1. 3
      pages.json
  2. 16
      pages/index/index.vue
  3. 21
      pages/index/urlWeb.vue
  4. 22
      pages/order/order_details.vue

3
pages.json

@ -11,6 +11,9 @@
"enablePullDownRefresh": true "enablePullDownRefresh": true
} }
}, },
{
"path": "pages/index/urlWeb"
},
{ {
"path": "pages/user/user", "path": "pages/user/user",
"style": { "style": {

16
pages/index/index.vue

@ -1,8 +1,8 @@
<template> <template>
<view> <view>
<swiper class="head" :current="banner_current" > <swiper class="head" :current="banner_current" >
<swiper-item @click="clickBanner" v-for="(item,index) of banner" :key="index">
<image :src="item.url" class="swipe-img" mode="aspectFill"></image>
<swiper-item @click="clickBanner(item.type,item.url)" v-for="(item,index) of banner" :key="index">
<image :src="item.picture" class="swipe-img" mode="aspectFill"></image>
</swiper-item> </swiper-item>
</swiper> </swiper>
<view class="content"> <view class="content">
@ -164,13 +164,19 @@
this.current = event.detail.current; this.current = event.detail.current;
}, },
// banner // banner
clickBanner(){
this.$msg('您点击了banner图')
clickBanner(type,url){
if(url) {
if(type == 0) {
this.$url(url);
}else {
this.$url('/pages/index/urlWeb?url='+url);
}
}
}, },
// ad // ad
clickAD(id){ clickAD(id){
// this.$msg('ad广') // this.$msg('ad广')
this.$url('/pages/activityList/index?special_id='+id)
this.$url('/pages/activityList/index?special_id='+id);
} }
}, },
onReachBottom() { onReachBottom() {

21
pages/index/urlWeb.vue

@ -0,0 +1,21 @@
<template>
<view>
<web-view :src="webUrl"></web-view>
</view>
</template>
<script>
export default {
data() {
return {
webUrl: ''
}
},
onLoad(e) {
this.webUrl = e.url;
}
}
</script>
<style>
</style>

22
pages/order/order_details.vue

@ -73,11 +73,12 @@
<view style="margin-top: 10rpx;position: relative;top: 26rpx;"> <view style="margin-top: 10rpx;position: relative;top: 26rpx;">
<view class="lf-font-28 text-black1"> <view class="lf-font-28 text-black1">
{{checkArea}} {{checkArea}}
<text v-if="false" style="position: relative;left: 172rpx;top: -36rpx;display: inherit;" class="lf-color-blue lf-font-28" @tap="copy(checkArea)">复制</text></view>
<text v-if="checkArea" style="position: relative;left: 172rpx;top: -36rpx;display: inherit;" class="lf-color-blue lf-font-28" @tap="copy(checkArea)">复制</text></view>
</view> </view>
<view class="lf-m-t-32" v-if="false">
<view class="lf-m-t-32" v-if="checkArea">
<view class="lf-color-green lf-font-28 lf-flex"> <view class="lf-color-green lf-font-28 lf-flex">
<text>待使用</text>
<text v-if="orderDetails.status == 3">待使用</text>
<text v-else>{{orderDetails.status_text}}</text>
<!-- <text class="lf-iconfont lf-icon-shuaxin1 lf-font-40" <!-- <text class="lf-iconfont lf-icon-shuaxin1 lf-font-40"
style="color: #999;position: relative;left: 84rpx;top: -42rpx;display: inherit;" style="color: #999;position: relative;left: 84rpx;top: -42rpx;display: inherit;"
@tap="refreshCode()"></text> --> @tap="refreshCode()"></text> -->
@ -87,11 +88,11 @@
</image> </image>
</view> </view>
</view> </view>
<view style="margin-top: 44rpx;" v-else>
<!-- <view style="margin-top: 44rpx;" v-else>
<view class="lf-color-999 lf-font-28"> <view class="lf-color-999 lf-font-28">
{{orderDetails.status_text}}
</view>
</view>
</view>
</view> -->
</view> </view>
<view class="padding-lr padding-tb-sm bg-white flex justify-between align-center solid-top1 btn-bottom"> <view class="padding-lr padding-tb-sm bg-white flex justify-between align-center solid-top1 btn-bottom">
<view class="flex align-center"> <view class="flex align-center">
@ -118,6 +119,10 @@
<button class="btn lf-bg-gray" v-if="orderDetails.status == -1"> <button class="btn lf-bg-gray" v-if="orderDetails.status == -1">
<text class="lf-font-32 text-white">已取消</text> <text class="lf-font-32 text-white">已取消</text>
</button> </button>
<button class="btn lf-bg-gray" v-else>
<text class="lf-font-32 text-white">{{orderDetails.status_text}}</text>
</button>
</view> </view>
</view> </view>
</block> </block>
@ -172,10 +177,9 @@
id: this.order_id id: this.order_id
}).then(res => { }).then(res => {
this.orderDetails = res.data this.orderDetails = res.data
this.checkArea = res.data.id
this.checkArea = res.data.verify_code
this.skeletonLoading = false this.skeletonLoading = false
console.log(res.data) console.log(res.data)
}).catch(err => { }).catch(err => {
setTimeout(() => { setTimeout(() => {
this.$toBack() this.$toBack()

Loading…
Cancel
Save