Commit bb8c5b9c authored by June's avatar June

styles:处理了玄学问题;fixed:城市联动过滤台湾,澳门,香港;fexture: 首页改版,详情页添加滚动控制

parent 39a1415c
...@@ -161,4 +161,14 @@ export function addRefundTime(order_sn) { ...@@ -161,4 +161,14 @@ export function addRefundTime(order_sn) {
}, },
needMask: true needMask: true
}) })
}
/**
* @desc 查询账户管理订单数量信息
*/
export function orderNum() {
return request({
url: 'zsxcx/getOrderCount.htm',
method: 'post'
})
} }
\ No newline at end of file
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<view v-if="showBack" class="back-icon" :style="backStyle" @click="handleBack"> <view v-if="showBack" class="back-icon" :style="backStyle" @click="handleBack">
<view class="icon"></view> <view class="icon"></view>
</view> </view>
<view class="title-inner">{{title}}</view> <view class="title-inner" :style="{padding: showBack ? ' 0 30px' : 0}">{{title}}</view>
</view> </view>
</view> </view>
</template> </template>
...@@ -31,7 +31,7 @@ export default { ...@@ -31,7 +31,7 @@ export default {
bg: { bg: {
type: String, type: String,
default: '#fff' default: '#fff'
} },
}, },
computed: { computed: {
...mapState(['systemInfo']), ...mapState(['systemInfo']),
...@@ -54,7 +54,6 @@ export default { ...@@ -54,7 +54,6 @@ export default {
const navH = menuButtonInfo.bottom + space const navH = menuButtonInfo.bottom + space
const titleH = navH - systemInfo.statusBarHeight const titleH = navH - systemInfo.statusBarHeight
const lrSpace = systemInfo.windowWidth - menuButtonInfo.right // 左右间距 const lrSpace = systemInfo.windowWidth - menuButtonInfo.right // 左右间距
const v = systemInfo.system.includes('iOS') ? 'center' : 'flex-start' const v = systemInfo.system.includes('iOS') ? 'center' : 'flex-start'
return `height: ${titleH}px;font-size: ${systemInfo.fontSizeSetting}px;padding: 0 ${lrSpace}px;justify-content: ${v};margin-top: ${systemInfo.statusBarHeight}px;` return `height: ${titleH}px;font-size: ${systemInfo.fontSizeSetting}px;padding: 0 ${lrSpace}px;justify-content: ${v};margin-top: ${systemInfo.statusBarHeight}px;`
} }
...@@ -94,7 +93,6 @@ export default { ...@@ -94,7 +93,6 @@ export default {
} }
.title-inner { .title-inner {
box-sizing: border-box; box-sizing: border-box;
padding: 0 30px;
max-width: 260px; max-width: 260px;
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
......
...@@ -62,7 +62,7 @@ export default { ...@@ -62,7 +62,7 @@ export default {
params: this.params, params: this.params,
val: newVal_number val: newVal_number
}) })
}, 500) }, 300)
}, },
methods: { methods: {
clear(e) { clear(e) {
......
...@@ -2,6 +2,6 @@ ...@@ -2,6 +2,6 @@
"extEnable": true, "extEnable": true,
"extAppid": "wx537e892e36fbf79d", "extAppid": "wx537e892e36fbf79d",
"ext": { "ext": {
"appid": "wxd170058f4ad8fecd" "appid": "wx537e892e36fbf79d"
} }
} }
\ No newline at end of file
...@@ -4,9 +4,8 @@ ...@@ -4,9 +4,8 @@
{ {
"path": "pages/home/index", "path": "pages/home/index",
"style": { "style": {
"navigationBarTitleText": " ", "navigationStyle": "custom",
"enablePullDownRefresh": true, "navigationBarTextStyle":"white"
"onReachBottomDistance": 50
} }
}, },
{ {
...@@ -26,7 +25,8 @@ ...@@ -26,7 +25,8 @@
{ {
"path": "pages/mine/index", "path": "pages/mine/index",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom",
"navigationBarTextStyle":"white"
} }
}, },
{ {
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
<!-- 二级分类 --> <!-- 二级分类 -->
<view <view
class="ml-2 mb-2" class="ml-2 second-item"
v-for="(cate_2, cate_idx_2) in cate_1.list" v-for="(cate_2, cate_idx_2) in cate_1.list"
:key="cate_2.cat_id" :key="cate_2.cat_id"
> >
...@@ -90,6 +90,10 @@ ...@@ -90,6 +90,10 @@
/> />
<view class="goods-price flex-1 flex flex-column j-between font-28"> <view class="goods-price flex-1 flex flex-column j-between font-28">
<view class="title">{{good.goods_name}}</view> <view class="title">{{good.goods_name}}</view>
<view class="descColor desc font-24 w-100 flex j-between a-center">
<text class="flex-1">{{good.specification}}</text>
<text class="sale-count text-right">销量:{{good.virtual_quantity_sold}}</text>
</view>
<view class="w-100 flex j-between a-center"> <view class="w-100 flex j-between a-center">
<view class="flex j-start a-center"> <view class="flex j-start a-center">
<price <price
...@@ -314,6 +318,13 @@ export default { ...@@ -314,6 +318,13 @@ export default {
.cate-active { .cate-active {
background-color: #fff; background-color: #fff;
} }
.second-item {
margin-bottom: 20rpx;
&:last-child {
margin-bottom: 0;
}
}
} }
.scroll-right { .scroll-right {
...@@ -347,9 +358,16 @@ export default { ...@@ -347,9 +358,16 @@ export default {
.goods-price { .goods-price {
height: 160rpx; height: 160rpx;
.title { .title {
@include text-ellipsis(2); @include text-ellipsis(1);
color: #343434; color: #343434;
font-weight: 500; }
.desc{
.spec {
@include text-ellipsis(1);
}
.sale-count {
flex: 0 0 200rpx;
}
} }
.price-txt { .price-txt {
color: $primary; color: $primary;
...@@ -357,7 +375,7 @@ export default { ...@@ -357,7 +375,7 @@ export default {
.cart-icon { .cart-icon {
width: 34rpx; width: 34rpx;
height: 32rpx; height: 32rpx;
padding: 5rpx 20rpx; padding: 0 20rpx;
} }
} }
} }
......
<template> <template>
<view class="wrapper w-100"> <scroll-view
<c-nav_bar class="wrapper w-100"
scroll-y
@scroll="scrolling"
>
<c-nav_bar
showBack showBack
title="商品详情" title="商品详情"
bg="rgba(0, 0, 0, 0)" :bg="navBg"
/> />
<!-- <left-menu-button /> --> <!-- <left-menu-button /> -->
...@@ -34,8 +39,8 @@ ...@@ -34,8 +39,8 @@
</view> </view>
<view class="goods-info mb-2"> <view class="goods-info mb-2">
<price :is_inquiry="detail.is_inquiry" :price="detail.shop_price_range" /> <price style="font-weight: bold;" :is_inquiry="detail.is_inquiry" :price="detail.shop_price_range" />
<view class="font-28 font-bold mb-2">{{detail.goods_name}}</view> <view class="font-28 font-bold my-2">{{detail.goods_name}}</view>
<view class="counts w-100 flex j-start a-center"> <view class="counts w-100 flex j-start a-center">
<view class="mr-4">现库存:{{inventory}}</view> <view class="mr-4">现库存:{{inventory}}</view>
<view>总销量:{{detail.virtual_quantity_sold || 0}}</view> <view>总销量:{{detail.virtual_quantity_sold || 0}}</view>
...@@ -50,7 +55,7 @@ ...@@ -50,7 +55,7 @@
raising_open_type 自提方式判断是否开启(1为开启,0为关闭) --> raising_open_type 自提方式判断是否开启(1为开启,0为关闭) -->
<view class="logistics mb-2" v-if="logisticsTab.length > 0"> <view class="logistics mb-2" v-if="logisticsTab.length > 0">
<view class="pb-2 font-28 flex j-start a-center"> <view class="pb-2 font-28 flex j-start a-center">
<view class="name">物流</view> <view class="name">配送方式</view>
<view class="content flex-1 flex j-start a-center text-center"> <view class="content flex-1 flex j-start a-center text-center">
<view <view
v-for="item in logisticsTab" v-for="item in logisticsTab"
...@@ -146,7 +151,7 @@ ...@@ -146,7 +151,7 @@
<!-- 购物弹窗 --> <!-- 购物弹窗 -->
<goods-popup ref="popup" /> <goods-popup ref="popup" />
</view> </scroll-view>
</template> </template>
<script> <script>
...@@ -173,7 +178,9 @@ export default { ...@@ -173,7 +178,9 @@ export default {
inventory: 0, // 总库存 inventory: 0, // 总库存
logistics_cur: 0, // 切换物流 logistics_cur: 0, // 切换物流
showMoreArea: false, showMoreArea: false,
skuData: [] skuData: [],
navBg: "rgba(255, 255, 255, 0)"
} }
}, },
components: { components: {
...@@ -203,15 +210,14 @@ export default { ...@@ -203,15 +210,14 @@ export default {
if(delivery_open_type && raising_open_type) { if(delivery_open_type && raising_open_type) {
this.logistics_cur = 0 this.logistics_cur = 0
return [{id: 0, title: '物流派送'}, {id: 1, title: '买家自提'}] return [{id: 0, title: '商家派送'}, {id: 1, title: '买家自提'}]
} else if (delivery_open_type && !raising_open_type) { } else if (delivery_open_type && !raising_open_type) {
this.logistics_cur = 0 this.logistics_cur = 0
return [{id: 0, title: '物流派送'}] return [{id: 0, title: '商家派送'}]
} else if (!delivery_open_type && raising_open_type){ } else if (!delivery_open_type && raising_open_type){
this.logistics_cur = 1 this.logistics_cur = 1
return [{id: 1, title: '买家自提'}] return [{id: 1, title: '买家自提'}]
} else { } else {
console.log('EEE')
return [] return []
} }
}, },
...@@ -226,6 +232,10 @@ export default { ...@@ -226,6 +232,10 @@ export default {
} }
}, },
methods: { methods: {
scrolling: throttle(function(e) {
const opacity = (e.detail.scrollTop / 375).toFixed(1)
this.navBg = `rgba(255, 255, 255, ${opacity})`
}, 300),
// 富文本预览事件 // 富文本预览事件
preview(src, e) { preview(src, e) {
// do something // do something
...@@ -327,6 +337,7 @@ export default { ...@@ -327,6 +337,7 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
@import url("/components/parse/parse.css"); @import url("/components/parse/parse.css");
.wrapper { .wrapper {
height: 100vh;
margin-bottom: 98rpx; margin-bottom: 98rpx;
.swiper-wrap { .swiper-wrap {
position: relative; position: relative;
......
...@@ -109,14 +109,14 @@ export default { ...@@ -109,14 +109,14 @@ export default {
} }
.goods-info { .goods-info {
@include borderBox(0, 20rpx); @include borderBox(0, 20rpx);
height: 150rpx; height: 160rpx;
.title { .title {
@include text-ellipsis(2) @include text-ellipsis(2)
} }
.cart-btn { .cart-btn {
width: 34rpx; width: 34rpx;
height: 32rpx; height: 32rpx;
padding: 5rpx 20rpx; padding: 0 20rpx;
} }
} }
} }
......
...@@ -50,8 +50,34 @@ function checkShowAll(Obj) { ...@@ -50,8 +50,34 @@ function checkShowAll(Obj) {
} }
} }
// 上拉加载更多
function scrolltolower() {
console.log('触底')
const cate_data = this.cate_data
if(this.checkShowAll(cate_data)) {
console.log('pass')
this.searchData()
}
}
function refresherrefresh() {
uni.showLoading({
title: '加载中...'
})
this.refresherTriggered = true
this.getStoreInfo()
this.getHomeCate()
let timer = setTimeout(() => {
this.refresherTriggered = false
uni.hideLoading()
timer = null
},500)
}
export default { export default {
searchData, searchData,
getHomeCate, getHomeCate,
checkShowAll checkShowAll,
scrolltolower,
refresherrefresh
} }
\ No newline at end of file
This diff is collapsed.
...@@ -43,7 +43,8 @@ ...@@ -43,7 +43,8 @@
> >
<image class="icon mb-2" src="/static/images/mine/unpay.png" mode="aspectFit"></image> <image class="icon mb-2" src="/static/images/mine/unpay.png" mode="aspectFit"></image>
<view>待付款</view> <view>待付款</view>
<view v-if="false" class="badge"></view> <!-- -->
<view v-if="orderNum.wait_pay > 0" class="badge">{{orderNum.wait_pay}}</view>
</view> </view>
<view <view
class="order-menu_item flex flex-column j-center a-center" class="order-menu_item flex flex-column j-center a-center"
...@@ -51,7 +52,7 @@ ...@@ -51,7 +52,7 @@
> >
<image class="icon mb-2" src="/static/images/mine/unrecieve.png" mode="aspectFit"></image> <image class="icon mb-2" src="/static/images/mine/unrecieve.png" mode="aspectFit"></image>
<view>待收货</view> <view>待收货</view>
<view v-if="false" class="badge"></view> <view v-if="orderNum.wait_receive > 0" class="badge">{{orderNum.wait_receive > 99 ? '99+' : orderNum.wait_receive}}</view>
</view> </view>
<view <view
class="order-menu_item flex flex-column j-center a-center" class="order-menu_item flex flex-column j-center a-center"
...@@ -59,7 +60,7 @@ ...@@ -59,7 +60,7 @@
> >
<image class="icon mb-2" src="/static/images/mine/recieved.png" mode="aspectFit"></image> <image class="icon mb-2" src="/static/images/mine/recieved.png" mode="aspectFit"></image>
<view>已收货</view> <view>已收货</view>
<view v-if="false" class="badge"></view> <view v-if="orderNum.wait_send > 0" class="badge">{{orderNum.wait_send > 99 ? '99+' : orderNum.wait_send}}</view>
</view> </view>
<view <view
class="order-menu_item flex flex-column j-center a-center" class="order-menu_item flex flex-column j-center a-center"
...@@ -67,7 +68,6 @@ ...@@ -67,7 +68,6 @@
> >
<image class="icon mb-2" src="/static/images/mine/unneed.png" mode="aspectFit"></image> <image class="icon mb-2" src="/static/images/mine/unneed.png" mode="aspectFit"></image>
<view>退款售后</view> <view>退款售后</view>
<view v-if="false" class="badge"></view>
</view> </view>
<view <view
class="order-menu_item flex flex-column j-center a-center" class="order-menu_item flex flex-column j-center a-center"
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
> >
<image class="icon mb-2" src="/static/images/mine/close.png" mode="aspectFit"></image> <image class="icon mb-2" src="/static/images/mine/close.png" mode="aspectFit"></image>
<view>交易关闭</view> <view>交易关闭</view>
<view v-if="false" class="badge"></view>
</view> </view>
</view> </view>
</view> </view>
...@@ -114,10 +114,16 @@ import { mapState, mapActions } from 'vuex' ...@@ -114,10 +114,16 @@ import { mapState, mapActions } from 'vuex'
import { checkLogin } from '@/utils/modules/login.js' import { checkLogin } from '@/utils/modules/login.js'
import { baseUrl } from '@/config/index.js' import { baseUrl } from '@/config/index.js'
import { makePhoneCall } from '@/utils/common.js' import { makePhoneCall } from '@/utils/common.js'
import { orderNum } from '@/apis/order.js'
export default { export default {
data() { data() {
return { return {
baseUrl baseUrl,
orderNum: {
wait_pay: 0,
wait_receive: 0,
wait_send: 0
}
} }
}, },
computed: { computed: {
...@@ -134,6 +140,7 @@ export default { ...@@ -134,6 +140,7 @@ export default {
onShow() { // 获取更新用户信息 onShow() { // 获取更新用户信息
if(this.token) { if(this.token) {
this.setUserInfo() this.setUserInfo()
this.getOrderNum()
} }
}, },
methods: { methods: {
...@@ -179,6 +186,13 @@ export default { ...@@ -179,6 +186,13 @@ export default {
// 拨打电话 // 拨打电话
phoneCall() { phoneCall() {
this.$checkLogin(makePhoneCall) this.$checkLogin(makePhoneCall)
},
async getOrderNum() {
const { status, data } = await orderNum()
if(status) {
this.orderNum = data
}
} }
} }
} }
...@@ -240,15 +254,16 @@ export default { ...@@ -240,15 +254,16 @@ export default {
} }
.badge { .badge {
position: absolute; position: absolute;
right: -20rpx; right: 0;
top: -20rpx; top: -12rpx;
width: 40rpx; width: 24rpx;
height: 40rpx; height: 24rpx;
line-height: 40rpx; line-height: 24rpx;
text-align: center; text-align: center;
color: #fff; color: #fff;
font-size: 20rpx;
background-color: $primary; background-color: $primary;
border: 1rpx solid $primary;
font-size: 20rpx;
border-radius: 50%; border-radius: 50%;
} }
} }
......
...@@ -35,18 +35,18 @@ ...@@ -35,18 +35,18 @@
<view class="address-store" v-show="current_tab === 2"> <view class="address-store" v-show="current_tab === 2">
<view class="item"> <view class="item">
<view class="left">自提地址</view> <view class="left">自提地址:</view>
<view>{{orderDetail.shop.pickup_address}}</view> <view>{{orderDetail.shop.pickup_address}}</view>
</view> </view>
<view class="item"> <view class="item">
<view class="left">自提时间</view> <view class="left">自提时间:</view>
<view v-if="orderDetail.shop"> <view v-if="orderDetail.shop">
<text class="mr-2">{{orderDetail.shop.pickup_start_day | parseWeek}}{{orderDetail.shop.pickup_end_day | parseWeek}}</text> <text class="mr-2">{{orderDetail.shop.pickup_start_day | parseWeek}}{{orderDetail.shop.pickup_end_day | parseWeek}}</text>
<text>{{orderDetail.shop.pickup_hours}}</text> <text>{{orderDetail.shop.pickup_hours}}</text>
</view> </view>
</view> </view>
<view class="item"> <view class="item">
<view class="left">联系电话</view> <view class="left">联系电话:</view>
<view>{{orderDetail.shop.pickup_phone}}</view> <view>{{orderDetail.shop.pickup_phone}}</view>
</view> </view>
<view class="tips py-2"> <view class="tips py-2">
......
...@@ -248,20 +248,33 @@ export default { ...@@ -248,20 +248,33 @@ export default {
.order-wrap { .order-wrap {
height: 100vh; height: 100vh;
.tab-wrap { .tab-wrap {
position: relative;
height: 88rpx; height: 88rpx;
white-space:nowrap; white-space:nowrap;
border-top: 1rpx solid $line; // border-bottom: 1rpx solid #d9d9d9;
border-bottom: 1rpx solid $line;
background-color: #fff; background-color: #fff;
&::after {
display: block;
content: '';
position: absolute;
left: 0;
bottom: 0;
z-index: 1;
width: 100%;
height: 1rpx;
background-color: $line;
}
.tab-item { .tab-item {
position: relative;
display: inline-block;
width: 198rpx; width: 198rpx;
height: 88rpx; height: 88rpx;
line-height: 88rpx; line-height: 88rpx;
text-align: center; text-align: center;
position: relative;
display: inline-block;
} }
.tab_active { .tab_active {
width: 198rpx;
height: 88rpx;
color: $primary; color: $primary;
font-weight: 600; font-weight: 600;
&::after { &::after {
...@@ -269,11 +282,11 @@ export default { ...@@ -269,11 +282,11 @@ export default {
content: ""; content: "";
position: absolute; position: absolute;
left: 50%; left: 50%;
bottom: 2rpx; bottom: 0;
transform: translateX(-50%); transform: translateX(-50%);
z-index: 5; z-index: 5;
width: 198rpx; width: 198rpx;
height: 4rpx; height: 3rpx;
background-color: $primary; background-color: $primary;
} }
} }
...@@ -306,7 +319,7 @@ export default { ...@@ -306,7 +319,7 @@ export default {
.goods-info { .goods-info {
height: 160rpx; height: 160rpx;
.title { .title {
@include text-ellipsis(2); @include text-ellipsis(1);
} }
.desc { .desc {
color: $desc; color: $desc;
......
...@@ -98,9 +98,9 @@ ...@@ -98,9 +98,9 @@
/> />
<view class="information flex-1 flex flex-column j-between a-start"> <view class="information flex-1 flex flex-column j-between a-start">
<view class="title font-bold font-28">{{good.goods_name}}</view> <view class="title font-bold font-28">{{good.goods_name}}</view>
<view class="font-24 counts"> <view class="font-24 w-100 counts flex j-between a-center">
<text class="mr-2">规格:{{good.specification}}</text> <text class="mr-2 flex-1 spec">{{good.specification}}</text>
<text>销量:{{good.virtual_quantity_sold}}</text> <text class="sale-count text-right">销量:{{good.virtual_quantity_sold}}</text>
</view> </view>
<view class="font-28 flex w-100 j-between a-center"> <view class="font-28 flex w-100 j-between a-center">
<view class="flex j-start a-center"> <view class="flex j-start a-center">
...@@ -378,10 +378,16 @@ export default { ...@@ -378,10 +378,16 @@ export default {
.information { .information {
height: 160rpx; height: 160rpx;
.title { .title {
@include text-ellipsis(2); @include text-ellipsis(1);
} }
.counts { .counts {
color: $desc; color: $desc;
.spec {
@include text-ellipsis(1);
}
.sale-count {
flex: 0 0 200rpx;
}
} }
.cart-icon { .cart-icon {
width: 44rpx; width: 44rpx;
......
static/images/common/icon-order.png

755 Bytes | W: | H:

static/images/common/icon-order.png

1 KB | W: | H:

static/images/common/icon-order.png
static/images/common/icon-order.png
static/images/common/icon-order.png
static/images/common/icon-order.png
  • 2-up
  • Swipe
  • Onion skin
static/images/common/icon-share.png

1013 Bytes | W: | H:

static/images/common/icon-share.png

1.26 KB | W: | H:

static/images/common/icon-share.png
static/images/common/icon-share.png
static/images/common/icon-share.png
static/images/common/icon-share.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -19,6 +19,9 @@ const actions = { ...@@ -19,6 +19,9 @@ const actions = {
const pages = getCurrentPages() const pages = getCurrentPages()
const curPage = whitePage.find(item => item === pages[pages.length - 1].__route__) const curPage = whitePage.find(item => item === pages[pages.length - 1].__route__)
if(curPage) { if(curPage) {
if(count === 0) return uni.removeTabBarBadge({
index: 2
})
uni.setTabBarBadge({ uni.setTabBarBadge({
index: 2, index: 2,
text: count > 99 ? '99+' : String(count), text: count > 99 ? '99+' : String(count),
......
<template> <template>
<picker <picker
class="w-100"
mode="multiSelector" mode="multiSelector"
@columnchange="cityChange" @columnchange="cityChange"
@change="confirm" @change="confirm"
:value="cityIndex" :value="cityIndex"
:range="cities" :range="cities"
> >
<view class="flex j-between a-center" v-if="!result" style="color: #999"> <view class="flex w-100 j-between a-center" v-if="!result" style="color: #999">
省/市/区 省/市/区
<icon class="right-arrow"></icon> <icon class="right-arrow"></icon>
</view> </view>
<view class="flex j-between a-center" v-else> <view class="flex w-100 j-between a-center" v-else>
<!-- 可能没有第四级 --> <!-- 可能没有第四级 -->
<text>{{cities[0][cityIndex[0]] || ''}} {{cities[1][cityIndex[1]] || ''}} {{cities[2][cityIndex[2]] || ''}} {{ cities[3][cityIndex[3]] || ''}}</text> <text>{{cities[0][cityIndex[0]] || ''}} {{cities[1][cityIndex[1]] || ''}} {{cities[2][cityIndex[2]] || ''}} {{ cities[3][cityIndex[3]] || ''}}</text>
<icon class="right-arrow"></icon> <icon class="right-arrow"></icon>
...@@ -93,6 +94,8 @@ export default { ...@@ -93,6 +94,8 @@ export default {
} }
} else { // 编辑地址时 } else { // 编辑地址时
while(i <= 4) { while(i <= 4) {
console.log(cityData)
if(i !== 1 && cityCode[i] === 0) return // 澳门
const cityData = await this.getCityData(cityCode[i]) const cityData = await this.getCityData(cityCode[i])
cacheList[i - 1] = cityData cacheList[i - 1] = cityData
this.cityIndex[i - 1] = cityData ? cityData.findIndex(item => item.area_id === cityAreaIdIdx[i]) : 0 // 当前列的当前地区下标 第四级可能会为空 this.cityIndex[i - 1] = cityData ? cityData.findIndex(item => item.area_id === cityAreaIdIdx[i]) : 0 // 当前列的当前地区下标 第四级可能会为空
...@@ -116,8 +119,8 @@ export default { ...@@ -116,8 +119,8 @@ export default {
async getCityData(code) { async getCityData(code) {
try{ try{
const { status, data } = await queryCity(code) const { status, data } = await queryCity(code)
if(!status) return null if(!status ) return null
return data return code !== 1 ? data : data.filter(item => item.code !== '71' && item.code !== '81' && item.code !== '82')
}catch(e){ }catch(e){
console.log(e) console.log(e)
this.$toast({title: e.msg || '程序错误'}) this.$toast({title: e.msg || '程序错误'})
...@@ -127,7 +130,7 @@ export default { ...@@ -127,7 +130,7 @@ export default {
// idx 获取第几列的数据 // idx 获取第几列的数据
async get_city(idx) { async get_city(idx) {
try{ try{
const { status, data } = await queryCity(cityCode[idx - 1]) const { status, data } = await queryCity(cityCode[idx - 1])
if(status) { if(status) {
if(data === null) { if(data === null) {
cityCode[idx] = 0 cityCode[idx] = 0
......
...@@ -4,8 +4,9 @@ ...@@ -4,8 +4,9 @@
<view class="item"> <view class="item">
<view class="hd"><text class="must_text">*</text>收货人:</view> <view class="hd"><text class="must_text">*</text>收货人:</view>
<input <input
class="flex-1" class="flex-1 input"
type="text" type="text"
placeholder-class="input"
placeholder="请输入收件人姓名" placeholder="请输入收件人姓名"
v-model="form.consignee" v-model="form.consignee"
/> />
...@@ -14,7 +15,7 @@ ...@@ -14,7 +15,7 @@
<view class="item"> <view class="item">
<view class="hd"><text class="must_text">*</text>手机号:</view> <view class="hd"><text class="must_text">*</text>手机号:</view>
<input <input
class="flex-1" class="flex-1 input"
type="number" type="number"
maxlength="11" maxlength="11"
placeholder="请输入手机号" placeholder="请输入手机号"
...@@ -37,7 +38,7 @@ ...@@ -37,7 +38,7 @@
<view class="item"> <view class="item">
<view class="hd"><text class="must_text">*</text>详细地址:</view> <view class="hd"><text class="must_text">*</text>详细地址:</view>
<input <input
class="flex-1" class="flex-1 input"
type="text" type="text"
placeholder="请输入详细地址" placeholder="请输入详细地址"
v-model="form.address" v-model="form.address"
...@@ -47,7 +48,7 @@ ...@@ -47,7 +48,7 @@
<view class="item"> <view class="item">
<view class="hd">公司名称:</view> <view class="hd">公司名称:</view>
<input <input
class="flex-1" class="flex-1 input"
type="text" type="text"
placeholder="请输入您的公司名称" placeholder="请输入您的公司名称"
v-model="form.corporate_name" v-model="form.corporate_name"
...@@ -172,13 +173,21 @@ export default { ...@@ -172,13 +173,21 @@ export default {
.info-wrap { .info-wrap {
background-color: #fff; background-color: #fff;
.item { .item {
@include borderBox(30rpx, 30rpx); @include borderBox(0, 30rpx);
width: 100%; width: 100%;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
padding: 20rpx 30rpx; padding: 30rpx 30rpx;
border-bottom: 1rpx solid $line; border-bottom: 1rpx solid $line;
.input {
display: flex;
align-items: center;
box-sizing: border-box;
height: 40rpx;
font-weight: normal;
min-height: 40rpx;
}
&:last-child { &:last-child {
border-bottom: none; border-bottom: none;
} }
...@@ -193,10 +202,12 @@ export default { ...@@ -193,10 +202,12 @@ export default {
} }
.default-wrap { .default-wrap {
@include borderBox(0, 30rpx);
background-color: #fff; background-color: #fff;
.item { .item {
@include borderBox(20rpx, 30rpx);
width: 100%; width: 100%;
height: 30rpx;
padding: 30rpx 0;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
</view> </view>
<!-- list --> <!-- list -->
<swiper class="list-wrap" :current="tab_current"> <swiper class="list-wrap" :current="tab_current" @change="swiperChange">
<swiper-item> <swiper-item>
<template v-if="collect_list.length === 0"> <template v-if="collect_list.length === 0">
<empty-view text="暂无收藏"></empty-view> <empty-view text="暂无收藏"></empty-view>
...@@ -283,6 +283,10 @@ export default { ...@@ -283,6 +283,10 @@ export default {
this.$toast({title: '删除失败'}) this.$toast({title: '删除失败'})
//TODO handle the exception //TODO handle the exception
} }
},
swiperChange(e) {
this.tab_current = e.detail.current
} }
} }
} }
...@@ -293,26 +297,40 @@ export default { ...@@ -293,26 +297,40 @@ export default {
background-color: #fff; background-color: #fff;
overflow: hidden; overflow: hidden;
.tab-wrap { .tab-wrap {
position: relative;
width: 690rpx; width: 690rpx;
height: 98rpx; height: 98rpx;
line-height: 98rpx; line-height: 98rpx;
margin: 0 auto; margin: 0 auto;
border-bottom: 2rpx solid $line; &::after {
display: block;
content: '';
position: absolute;
left: 0;
bottom: 0;
z-index: 1;
width: 100%;
height: 1rpx;
background-color: $line;
}
.tab-item { .tab-item {
flex: 1; flex: 1;
} }
.tab-active { .tab-active {
position: relative; position: relative;
height: 98rpx;
color: $primary; color: $primary;
&::after { &::after {
display: inline-block;
content: "";
position: absolute; position: absolute;
bottom: 0;
left: 50%; left: 50%;
bottom: 0;
transform: translateX(-50%); transform: translateX(-50%);
display: inline-block; z-index: 5;
content: '';
width: 180rpx; width: 180rpx;
height: 2rpx; height: 1rpx;
background-color: $primary; background-color: $primary;
} }
} }
......
...@@ -32,7 +32,10 @@ ...@@ -32,7 +32,10 @@
</view> </view>
<view class="store-item py-3 font-28"> <view class="store-item py-3 font-28">
<text class="hd">营业时间</text> <text class="hd">营业时间</text>
<text class="flex-1">{{startT + '' + endT}}</text> <text class="flex-1">
<text v-if="!startT || !endT">——</text>
<text v-else>{{startT + '' + endT}}</text>
</text>
</view> </view>
<view class="store-item py-3 font-28"> <view class="store-item py-3 font-28">
<text class="hd">自提时间</text> <text class="hd">自提时间</text>
......
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