Commit bb8c5b9c authored by June's avatar June

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

parent 39a1415c
......@@ -161,4 +161,14 @@ export function addRefundTime(order_sn) {
},
needMask: true
})
}
/**
* @desc 查询账户管理订单数量信息
*/
export function orderNum() {
return request({
url: 'zsxcx/getOrderCount.htm',
method: 'post'
})
}
\ No newline at end of file
......@@ -7,7 +7,7 @@
<view v-if="showBack" class="back-icon" :style="backStyle" @click="handleBack">
<view class="icon"></view>
</view>
<view class="title-inner">{{title}}</view>
<view class="title-inner" :style="{padding: showBack ? ' 0 30px' : 0}">{{title}}</view>
</view>
</view>
</template>
......@@ -31,7 +31,7 @@ export default {
bg: {
type: String,
default: '#fff'
}
},
},
computed: {
...mapState(['systemInfo']),
......@@ -54,7 +54,6 @@ export default {
const navH = menuButtonInfo.bottom + space
const titleH = navH - systemInfo.statusBarHeight
const lrSpace = systemInfo.windowWidth - menuButtonInfo.right // 左右间距
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;`
}
......@@ -94,7 +93,6 @@ export default {
}
.title-inner {
box-sizing: border-box;
padding: 0 30px;
max-width: 260px;
overflow: hidden;
white-space: nowrap;
......
......@@ -62,7 +62,7 @@ export default {
params: this.params,
val: newVal_number
})
}, 500)
}, 300)
},
methods: {
clear(e) {
......
......@@ -2,6 +2,6 @@
"extEnable": true,
"extAppid": "wx537e892e36fbf79d",
"ext": {
"appid": "wxd170058f4ad8fecd"
"appid": "wx537e892e36fbf79d"
}
}
\ No newline at end of file
......@@ -4,9 +4,8 @@
{
"path": "pages/home/index",
"style": {
"navigationBarTitleText": " ",
"enablePullDownRefresh": true,
"onReachBottomDistance": 50
"navigationStyle": "custom",
"navigationBarTextStyle":"white"
}
},
{
......@@ -26,7 +25,8 @@
{
"path": "pages/mine/index",
"style": {
"navigationStyle": "custom"
"navigationStyle": "custom",
"navigationBarTextStyle":"white"
}
},
{
......
......@@ -54,7 +54,7 @@
<!-- 二级分类 -->
<view
class="ml-2 mb-2"
class="ml-2 second-item"
v-for="(cate_2, cate_idx_2) in cate_1.list"
:key="cate_2.cat_id"
>
......@@ -90,6 +90,10 @@
/>
<view class="goods-price flex-1 flex flex-column j-between font-28">
<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="flex j-start a-center">
<price
......@@ -314,6 +318,13 @@ export default {
.cate-active {
background-color: #fff;
}
.second-item {
margin-bottom: 20rpx;
&:last-child {
margin-bottom: 0;
}
}
}
.scroll-right {
......@@ -347,9 +358,16 @@ export default {
.goods-price {
height: 160rpx;
.title {
@include text-ellipsis(2);
@include text-ellipsis(1);
color: #343434;
font-weight: 500;
}
.desc{
.spec {
@include text-ellipsis(1);
}
.sale-count {
flex: 0 0 200rpx;
}
}
.price-txt {
color: $primary;
......@@ -357,7 +375,7 @@ export default {
.cart-icon {
width: 34rpx;
height: 32rpx;
padding: 5rpx 20rpx;
padding: 0 20rpx;
}
}
}
......
<template>
<view class="wrapper w-100">
<c-nav_bar
<scroll-view
class="wrapper w-100"
scroll-y
@scroll="scrolling"
>
<c-nav_bar
showBack
title="商品详情"
bg="rgba(0, 0, 0, 0)"
:bg="navBg"
/>
<!-- <left-menu-button /> -->
......@@ -34,8 +39,8 @@
</view>
<view class="goods-info mb-2">
<price :is_inquiry="detail.is_inquiry" :price="detail.shop_price_range" />
<view class="font-28 font-bold mb-2">{{detail.goods_name}}</view>
<price style="font-weight: bold;" :is_inquiry="detail.is_inquiry" :price="detail.shop_price_range" />
<view class="font-28 font-bold my-2">{{detail.goods_name}}</view>
<view class="counts w-100 flex j-start a-center">
<view class="mr-4">现库存:{{inventory}}</view>
<view>总销量:{{detail.virtual_quantity_sold || 0}}</view>
......@@ -50,7 +55,7 @@
raising_open_type 自提方式判断是否开启(1为开启,0为关闭) -->
<view class="logistics mb-2" v-if="logisticsTab.length > 0">
<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
v-for="item in logisticsTab"
......@@ -146,7 +151,7 @@
<!-- 购物弹窗 -->
<goods-popup ref="popup" />
</view>
</scroll-view>
</template>
<script>
......@@ -173,7 +178,9 @@ export default {
inventory: 0, // 总库存
logistics_cur: 0, // 切换物流
showMoreArea: false,
skuData: []
skuData: [],
navBg: "rgba(255, 255, 255, 0)"
}
},
components: {
......@@ -203,15 +210,14 @@ export default {
if(delivery_open_type && raising_open_type) {
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) {
this.logistics_cur = 0
return [{id: 0, title: '物流派送'}]
return [{id: 0, title: '商家派送'}]
} else if (!delivery_open_type && raising_open_type){
this.logistics_cur = 1
return [{id: 1, title: '买家自提'}]
} else {
console.log('EEE')
return []
}
},
......@@ -226,6 +232,10 @@ export default {
}
},
methods: {
scrolling: throttle(function(e) {
const opacity = (e.detail.scrollTop / 375).toFixed(1)
this.navBg = `rgba(255, 255, 255, ${opacity})`
}, 300),
// 富文本预览事件
preview(src, e) {
// do something
......@@ -327,6 +337,7 @@ export default {
<style lang="scss" scoped>
@import url("/components/parse/parse.css");
.wrapper {
height: 100vh;
margin-bottom: 98rpx;
.swiper-wrap {
position: relative;
......
......@@ -109,14 +109,14 @@ export default {
}
.goods-info {
@include borderBox(0, 20rpx);
height: 150rpx;
height: 160rpx;
.title {
@include text-ellipsis(2)
}
.cart-btn {
width: 34rpx;
height: 32rpx;
padding: 5rpx 20rpx;
padding: 0 20rpx;
}
}
}
......
......@@ -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 {
searchData,
getHomeCate,
checkShowAll
checkShowAll,
scrolltolower,
refresherrefresh
}
\ No newline at end of file
This diff is collapsed.
......@@ -43,7 +43,8 @@
>
<image class="icon mb-2" src="/static/images/mine/unpay.png" mode="aspectFit"></image>
<view>待付款</view>
<view v-if="false" class="badge"></view>
<!-- -->
<view v-if="orderNum.wait_pay > 0" class="badge">{{orderNum.wait_pay}}</view>
</view>
<view
class="order-menu_item flex flex-column j-center a-center"
......@@ -51,7 +52,7 @@
>
<image class="icon mb-2" src="/static/images/mine/unrecieve.png" mode="aspectFit"></image>
<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
class="order-menu_item flex flex-column j-center a-center"
......@@ -59,7 +60,7 @@
>
<image class="icon mb-2" src="/static/images/mine/recieved.png" mode="aspectFit"></image>
<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
class="order-menu_item flex flex-column j-center a-center"
......@@ -67,7 +68,6 @@
>
<image class="icon mb-2" src="/static/images/mine/unneed.png" mode="aspectFit"></image>
<view>退款售后</view>
<view v-if="false" class="badge"></view>
</view>
<view
class="order-menu_item flex flex-column j-center a-center"
......@@ -75,7 +75,7 @@
>
<image class="icon mb-2" src="/static/images/mine/close.png" mode="aspectFit"></image>
<view>交易关闭</view>
<view v-if="false" class="badge"></view>
</view>
</view>
</view>
......@@ -114,10 +114,16 @@ import { mapState, mapActions } from 'vuex'
import { checkLogin } from '@/utils/modules/login.js'
import { baseUrl } from '@/config/index.js'
import { makePhoneCall } from '@/utils/common.js'
import { orderNum } from '@/apis/order.js'
export default {
data() {
return {
baseUrl
baseUrl,
orderNum: {
wait_pay: 0,
wait_receive: 0,
wait_send: 0
}
}
},
computed: {
......@@ -134,6 +140,7 @@ export default {
onShow() { // 获取更新用户信息
if(this.token) {
this.setUserInfo()
this.getOrderNum()
}
},
methods: {
......@@ -179,6 +186,13 @@ export default {
// 拨打电话
phoneCall() {
this.$checkLogin(makePhoneCall)
},
async getOrderNum() {
const { status, data } = await orderNum()
if(status) {
this.orderNum = data
}
}
}
}
......@@ -240,15 +254,16 @@ export default {
}
.badge {
position: absolute;
right: -20rpx;
top: -20rpx;
width: 40rpx;
height: 40rpx;
line-height: 40rpx;
right: 0;
top: -12rpx;
width: 24rpx;
height: 24rpx;
line-height: 24rpx;
text-align: center;
color: #fff;
font-size: 20rpx;
background-color: $primary;
border: 1rpx solid $primary;
font-size: 20rpx;
border-radius: 50%;
}
}
......
......@@ -35,18 +35,18 @@
<view class="address-store" v-show="current_tab === 2">
<view class="item">
<view class="left">自提地址</view>
<view class="left">自提地址:</view>
<view>{{orderDetail.shop.pickup_address}}</view>
</view>
<view class="item">
<view class="left">自提时间</view>
<view class="left">自提时间:</view>
<view v-if="orderDetail.shop">
<text class="mr-2">{{orderDetail.shop.pickup_start_day | parseWeek}}{{orderDetail.shop.pickup_end_day | parseWeek}}</text>
<text>{{orderDetail.shop.pickup_hours}}</text>
</view>
</view>
<view class="item">
<view class="left">联系电话</view>
<view class="left">联系电话:</view>
<view>{{orderDetail.shop.pickup_phone}}</view>
</view>
<view class="tips py-2">
......
......@@ -248,20 +248,33 @@ export default {
.order-wrap {
height: 100vh;
.tab-wrap {
position: relative;
height: 88rpx;
white-space:nowrap;
border-top: 1rpx solid $line;
border-bottom: 1rpx solid $line;
// border-bottom: 1rpx solid #d9d9d9;
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 {
position: relative;
display: inline-block;
width: 198rpx;
height: 88rpx;
line-height: 88rpx;
text-align: center;
position: relative;
display: inline-block;
}
.tab_active {
width: 198rpx;
height: 88rpx;
color: $primary;
font-weight: 600;
&::after {
......@@ -269,11 +282,11 @@ export default {
content: "";
position: absolute;
left: 50%;
bottom: 2rpx;
bottom: 0;
transform: translateX(-50%);
z-index: 5;
width: 198rpx;
height: 4rpx;
height: 3rpx;
background-color: $primary;
}
}
......@@ -306,7 +319,7 @@ export default {
.goods-info {
height: 160rpx;
.title {
@include text-ellipsis(2);
@include text-ellipsis(1);
}
.desc {
color: $desc;
......
......@@ -98,9 +98,9 @@
/>
<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="font-24 counts">
<text class="mr-2">规格:{{good.specification}}</text>
<text>销量:{{good.virtual_quantity_sold}}</text>
<view class="font-24 w-100 counts flex j-between a-center">
<text class="mr-2 flex-1 spec">{{good.specification}}</text>
<text class="sale-count text-right">销量:{{good.virtual_quantity_sold}}</text>
</view>
<view class="font-28 flex w-100 j-between a-center">
<view class="flex j-start a-center">
......@@ -378,10 +378,16 @@ export default {
.information {
height: 160rpx;
.title {
@include text-ellipsis(2);
@include text-ellipsis(1);
}
.counts {
color: $desc;
.spec {
@include text-ellipsis(1);
}
.sale-count {
flex: 0 0 200rpx;
}
}
.cart-icon {
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 = {
const pages = getCurrentPages()
const curPage = whitePage.find(item => item === pages[pages.length - 1].__route__)
if(curPage) {
if(count === 0) return uni.removeTabBarBadge({
index: 2
})
uni.setTabBarBadge({
index: 2,
text: count > 99 ? '99+' : String(count),
......
<template>
<picker
class="w-100"
mode="multiSelector"
@columnchange="cityChange"
@change="confirm"
:value="cityIndex"
:range="cities"
@change="confirm"
:value="cityIndex"
: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>
</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>
<icon class="right-arrow"></icon>
......@@ -93,6 +94,8 @@ export default {
}
} else { // 编辑地址时
while(i <= 4) {
console.log(cityData)
if(i !== 1 && cityCode[i] === 0) return // 澳门
const cityData = await this.getCityData(cityCode[i])
cacheList[i - 1] = cityData
this.cityIndex[i - 1] = cityData ? cityData.findIndex(item => item.area_id === cityAreaIdIdx[i]) : 0 // 当前列的当前地区下标 第四级可能会为空
......@@ -116,8 +119,8 @@ export default {
async getCityData(code) {
try{
const { status, data } = await queryCity(code)
if(!status) return null
return data
if(!status ) return null
return code !== 1 ? data : data.filter(item => item.code !== '71' && item.code !== '81' && item.code !== '82')
}catch(e){
console.log(e)
this.$toast({title: e.msg || '程序错误'})
......@@ -127,7 +130,7 @@ export default {
// idx 获取第几列的数据
async get_city(idx) {
try{
const { status, data } = await queryCity(cityCode[idx - 1])
const { status, data } = await queryCity(cityCode[idx - 1])
if(status) {
if(data === null) {
cityCode[idx] = 0
......
......@@ -4,8 +4,9 @@
<view class="item">
<view class="hd"><text class="must_text">*</text>收货人:</view>
<input
class="flex-1"
class="flex-1 input"
type="text"
placeholder-class="input"
placeholder="请输入收件人姓名"
v-model="form.consignee"
/>
......@@ -14,7 +15,7 @@
<view class="item">
<view class="hd"><text class="must_text">*</text>手机号:</view>
<input
class="flex-1"
class="flex-1 input"
type="number"
maxlength="11"
placeholder="请输入手机号"
......@@ -37,7 +38,7 @@
<view class="item">
<view class="hd"><text class="must_text">*</text>详细地址:</view>
<input
class="flex-1"
class="flex-1 input"
type="text"
placeholder="请输入详细地址"
v-model="form.address"
......@@ -47,7 +48,7 @@
<view class="item">
<view class="hd">公司名称:</view>
<input
class="flex-1"
class="flex-1 input"
type="text"
placeholder="请输入您的公司名称"
v-model="form.corporate_name"
......@@ -172,13 +173,21 @@ export default {
.info-wrap {
background-color: #fff;
.item {
@include borderBox(30rpx, 30rpx);
@include borderBox(0, 30rpx);
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
padding: 20rpx 30rpx;
padding: 30rpx 30rpx;
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 {
border-bottom: none;
}
......@@ -193,10 +202,12 @@ export default {
}
.default-wrap {
@include borderBox(0, 30rpx);
background-color: #fff;
.item {
@include borderBox(20rpx, 30rpx);
width: 100%;
height: 30rpx;
padding: 30rpx 0;
display: flex;
justify-content: space-between;
align-items: center;
......
......@@ -15,7 +15,7 @@
</view>
<!-- list -->
<swiper class="list-wrap" :current="tab_current">
<swiper class="list-wrap" :current="tab_current" @change="swiperChange">
<swiper-item>
<template v-if="collect_list.length === 0">
<empty-view text="暂无收藏"></empty-view>
......@@ -283,6 +283,10 @@ export default {
this.$toast({title: '删除失败'})
//TODO handle the exception
}
},
swiperChange(e) {
this.tab_current = e.detail.current
}
}
}
......@@ -293,26 +297,40 @@ export default {
background-color: #fff;
overflow: hidden;
.tab-wrap {
position: relative;
width: 690rpx;
height: 98rpx;
line-height: 98rpx;
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 {
flex: 1;
}
.tab-active {
position: relative;
height: 98rpx;
color: $primary;
&::after {
display: inline-block;
content: "";
position: absolute;
bottom: 0;
left: 50%;
bottom: 0;
transform: translateX(-50%);
display: inline-block;
content: '';
z-index: 5;
width: 180rpx;
height: 2rpx;
height: 1rpx;
background-color: $primary;
}
}
......
......@@ -32,7 +32,10 @@
</view>
<view class="store-item py-3 font-28">
<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 class="store-item py-3 font-28">
<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