完善 h5 端 前端登录注册页面
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
<template>
|
||||
<view v-if="token" class="gg">
|
||||
<!-- 利用background-image设置导航的线形渐变色彩 -->
|
||||
<u-navbar :background="{ 'background-image': 'linear-gradient(to right, rgb(255,180,61), rgb(255, 101, 0))' }" :border-bottom="false"
|
||||
:is-back="false">
|
||||
<view class="gg-map-slot-wrap u-font-xs u-m-l-20 u-p-l-10 u-p-r-10 u-p-t-5 u-p-b-5" @click="pickUpLocation">
|
||||
<u-icon name="map" size="24"></u-icon>
|
||||
<text class="u-p-l-10 u-p-r-10">{{
|
||||
leaderAddressVo.takeName ? leaderAddressVo.takeName : '请设置提货点'
|
||||
}}
|
||||
</text>
|
||||
<u-icon name="arrow-right" size="20"></u-icon>
|
||||
</view>
|
||||
<u-navbar :background="{ 'background-image': 'linear-gradient(to right, rgb(255,180,61), rgb(255, 101, 0))' }"
|
||||
:border-bottom="false" :is-back="false">
|
||||
<!-- <view class="gg-map-slot-wrap u-font-xs u-m-l-20 u-p-l-10 u-p-r-10 u-p-t-5 u-p-b-5" @click="pickUpLocation">
|
||||
<u-icon name="map" size="24"></u-icon>
|
||||
<text class="u-p-l-10 u-p-r-10">{{
|
||||
leaderAddressVo.takeName ? leaderAddressVo.takeName : '请设置提货点'
|
||||
}}
|
||||
</text>
|
||||
<u-icon name="arrow-right" size="20"></u-icon>
|
||||
</view> -->
|
||||
</u-navbar>
|
||||
|
||||
<!-- 主内容区域-Begin -->
|
||||
@@ -25,18 +25,11 @@
|
||||
-->
|
||||
<view class="gg-notice-search-bar">
|
||||
<u-icon class="gg-notice-search-bar-left-icon" name="search"></u-icon>
|
||||
<u-notice-bar
|
||||
:border-radius="30"
|
||||
:is-circular="false"
|
||||
:list="list"
|
||||
:more-icon="false"
|
||||
:volume-icon="false"
|
||||
class="gg-notice-search-bar-u-notice-bar"
|
||||
mode="vertical"
|
||||
type="none"
|
||||
></u-notice-bar>
|
||||
<u-button :custom-style="ggNoticeSearchBarRightBtnCustomStyle" class="u-m-r-20" shape="square" size="mini"
|
||||
type="error">搜索
|
||||
<u-notice-bar :border-radius="30" :is-circular="false" :list="list" :more-icon="false"
|
||||
:volume-icon="false" class="gg-notice-search-bar-u-notice-bar" mode="vertical"
|
||||
type="none"></u-notice-bar>
|
||||
<u-button :custom-style="ggNoticeSearchBarRightBtnCustomStyle" class="u-m-r-20" shape="square"
|
||||
size="mini" type="error">搜索
|
||||
</u-button>
|
||||
</view>
|
||||
|
||||
@@ -45,16 +38,11 @@
|
||||
<view class="u-font-lg u-content-color">新人专享低价好物</view>
|
||||
<scroll-view class="gg-new-vip-sv" enable-flex scroll-x>
|
||||
<view class="u-flex u-m-t-10">
|
||||
<view v-for="(item, index) in newPersonSkuInfoList" :key="item.id" class="gg-new-vip-sv-item u-p-r-20"
|
||||
@click="gotoProductItem(item.id)">
|
||||
<ListImgItem
|
||||
:showBottom="item.skuType === 0 && item.isNewPerson === 1"
|
||||
:showLeft="item.skuType === 1"
|
||||
:showRight="false"
|
||||
:src="item.imgUrl"
|
||||
height="200rpx"
|
||||
width="200rpx"
|
||||
></ListImgItem>
|
||||
<view v-for="(item, index) in newPersonSkuInfoList" :key="item.id"
|
||||
class="gg-new-vip-sv-item u-p-r-20" @click="gotoProductItem(item.id)">
|
||||
<ListImgItem :showBottom="item.skuType === 0 && item.isNewPerson === 1"
|
||||
:showLeft="item.skuType === 1" :showRight="false" :src="item.imgUrl" height="200rpx"
|
||||
width="200rpx"></ListImgItem>
|
||||
<text class="u-type-error">¥ {{ item.price }}</text>
|
||||
<AddToCart :shopDetail="item" :skuId="item.id"></AddToCart>
|
||||
</view>
|
||||
@@ -67,7 +55,7 @@
|
||||
|
||||
<!-- 小鹿超市规则 -->
|
||||
<view class="u-flex u-row-between u-p-20 u-m-20 gg-border" @click="showRulePopup = true">
|
||||
<u-image height="30rpx" src="/static/logo.png" width="30rpx"></u-image>
|
||||
<!-- <u-image height="30rpx" src="/static/logo-back.png" width="30rpx"></u-image> -->
|
||||
<view>平台资质、法律条款、规则及投诉入口</view>
|
||||
</view>
|
||||
|
||||
@@ -107,10 +95,11 @@
|
||||
<scroll-view enable-flex scroll-x>
|
||||
<view class="u-flex u-p-r-20 u-p-t-20">
|
||||
<!-- 循环滚动内容 -->
|
||||
<view v-for="item in seckillSkuVoList" :key="item.skuId" class="u-p-l-20 u-p-r-20 u-text-center"
|
||||
@click="gotoProductItem(item.skuId)">
|
||||
<view v-for="item in seckillSkuVoList" :key="item.skuId"
|
||||
class="u-p-l-20 u-p-r-20 u-text-center" @click="gotoProductItem(item.skuId)">
|
||||
<text class="u-font-sm u-m-b-5">{{ item.timeName }}</text>
|
||||
<u-image :src="item.imgUrl" border-radius="30rpx" height="200rpx" width="200rpx"></u-image>
|
||||
<u-image :src="item.imgUrl" border-radius="30rpx" height="200rpx"
|
||||
width="200rpx"></u-image>
|
||||
<text class="u-font-sm u-m-t-5">{{ item.skuName }}</text>
|
||||
<AddToCart :shopDetail="item" :skuId="item.skuId"></AddToCart>
|
||||
</view>
|
||||
@@ -119,42 +108,21 @@
|
||||
</view>
|
||||
</block>
|
||||
|
||||
<!-- 如何购买商品 -->
|
||||
<view class="u-p-20 u-m-20 gg-border u-font-xs">
|
||||
<view class="u-m-b-20">如何在[小鹿超市]购买商品</view>
|
||||
<view class="u-flex">
|
||||
<view class="gg-number u-m-r-10">1</view>
|
||||
挑商品
|
||||
<u-icon name="arrow-right-double u-m-l-10 u-tips-color"></u-icon>
|
||||
<u-icon class="u-content-color" name="arrow-right-double"></u-icon>
|
||||
<view class="gg-number gg-number-gray u-m-r-10 u-m-l-10">2</view>
|
||||
选提货点
|
||||
<u-icon name="arrow-right-double u-m-l-10 u-tips-color"></u-icon>
|
||||
<u-icon class="u-content-color" name="arrow-right-double"></u-icon>
|
||||
<view class="gg-number gg-number-gray u-m-r-10 u-m-l-10">3</view>
|
||||
次日16点提货点取货
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 热销好货 -->
|
||||
<view class="u-font-xl u-type-error u-m-20">热销好货</view>
|
||||
<view v-for="(item, index) in hotSkuList" :key="item.id" class="u-p-20 u-m-20 gg-border"
|
||||
@click="gotoProductItem(item.id)">
|
||||
<view class="u-m-b-10 u-m-l-20 u-m-r-20 u-flex gg-product-item">
|
||||
<ListImgItem
|
||||
:showBottom="item.skuType === 0 && item.isNewPerson === 1"
|
||||
:showLeft="item.skuType === 1"
|
||||
:showRight="false"
|
||||
:src="item.imgUrl"
|
||||
height="250rpx"
|
||||
width="250rpx"
|
||||
></ListImgItem>
|
||||
<ListImgItem :showBottom="item.skuType === 0 && item.isNewPerson === 1"
|
||||
:showLeft="item.skuType === 1" :showRight="false" :src="item.imgUrl" height="250rpx"
|
||||
width="250rpx"></ListImgItem>
|
||||
<view class="gg-product-item-msg u-border-bottom u-p-b-20 u-m-l-20">
|
||||
<view class="gg-product-item-msg-title">
|
||||
<view class="u-font-lg">{{ item.title }}</view>
|
||||
<view class="u-type-info u-font-sm">已售{{ item.sale }}/剩余{{ item.stock }}</view>
|
||||
<block v-if="item.ruleList">
|
||||
<view v-for="(rule, ruleIndex) in item.ruleList" :key="ruleIndex" class="u-font-xs u-type-error-dark">
|
||||
<view v-for="(rule, ruleIndex) in item.ruleList" :key="ruleIndex"
|
||||
class="u-font-xs u-type-error-dark">
|
||||
{{ rule }}
|
||||
</view>
|
||||
</block>
|
||||
@@ -198,9 +166,9 @@
|
||||
<view class="u-m-20">
|
||||
<view class="u-font-xl u-m-b-10">
|
||||
<u-icon class="u-m-r-10" color="#dd6161" name="bag" size="28"></u-icon>
|
||||
次日自提
|
||||
极速上门
|
||||
</view>
|
||||
<view class="u-light-color u-font-xs">每日23点前下单,次日16点可到下单门店自提</view>
|
||||
<view class="u-light-color u-font-xs">每日23点前下单,半小时送上门</view>
|
||||
</view>
|
||||
|
||||
<view class="u-m-20">
|
||||
@@ -220,7 +188,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapState, mapGetters, mapActions} from 'vuex';
|
||||
import {mapActions, mapGetters, mapState} from 'vuex';
|
||||
|
||||
let watchTimes = 0;
|
||||
export default {
|
||||
@@ -246,7 +214,9 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
...mapState('indexModule', ['home']),
|
||||
...mapGetters('indexModule', ['categoryList', 'hotSkuList', 'newPersonSkuInfoList', 'seckillTime', 'seckillSkuVoList', 'leaderAddressVo'])
|
||||
...mapGetters('indexModule', ['categoryList', 'hotSkuList', 'newPersonSkuInfoList', 'seckillTime',
|
||||
'seckillSkuVoList', 'leaderAddressVo'
|
||||
])
|
||||
},
|
||||
methods: {
|
||||
...mapActions('indexModule', ['getHomeIndexAction']),
|
||||
@@ -262,12 +232,14 @@ export default {
|
||||
}, 100);
|
||||
},
|
||||
// 跳转至设置提货点
|
||||
pickUpLocation() {
|
||||
this.$u.route('/pagesLocation/myPickUpLocation/myPickUpLocation');
|
||||
},
|
||||
// pickUpLocation() {
|
||||
// this.$u.route('/pagesLocation/myPickUpLocation/myPickUpLocation');
|
||||
// },
|
||||
// 跳转至商品详情页
|
||||
gotoProductItem(skuId) {
|
||||
this.$u.route('/pages/homeItem/homeItem', {skuId});
|
||||
this.$u.route('/pages/homeItem/homeItem', {
|
||||
skuId
|
||||
});
|
||||
},
|
||||
// 跳转至秒杀页
|
||||
gotoSeckill() {
|
||||
@@ -312,16 +284,16 @@ export default {
|
||||
2.等mounted请求结束,数据设置完毕以后再进行数据变化的监控
|
||||
3.不需要进行监控次数的判断
|
||||
------------------------------------------------------------ */
|
||||
'leaderAddressVo.userId': {
|
||||
handler(newVal) {
|
||||
if (!newVal) {
|
||||
uni.redirectTo({
|
||||
url: '/pagesLocation/myPickUpLocation/myPickUpLocation'
|
||||
});
|
||||
}
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
// 'leaderAddressVo.userId': {
|
||||
// handler(newVal) {
|
||||
// if (!newVal) {
|
||||
// uni.redirectTo({
|
||||
// url: '/pagesLocation/myPickUpLocation/myPickUpLocation'
|
||||
// });
|
||||
// }
|
||||
// },
|
||||
// deep: true
|
||||
// }
|
||||
},
|
||||
onShow() {
|
||||
/*
|
||||
@@ -337,7 +309,7 @@ export default {
|
||||
const token = await uni.getStorageSync('token');
|
||||
if (this.$u.test.isEmpty(token)) {
|
||||
uni.reLaunch({
|
||||
url: '/pages/login/login'
|
||||
url: '/pages/loginh5/loginh5'
|
||||
});
|
||||
return;
|
||||
}
|
||||
@@ -353,6 +325,7 @@ export default {
|
||||
利用scss中&-的方式实现层级样式的拼接
|
||||
*/
|
||||
.gg {
|
||||
|
||||
/* navbar 导航中进行地图位置的获取设置 */
|
||||
&-map-slot-wrap {
|
||||
display: flex;
|
||||
@@ -368,9 +341,9 @@ export default {
|
||||
}
|
||||
|
||||
/*
|
||||
notice-bar头部滚动信息搜索区域
|
||||
利用background-image的linear-gradient保持与导航一致的线形渐变色彩
|
||||
*/
|
||||
notice-bar头部滚动信息搜索区域
|
||||
利用background-image的linear-gradient保持与导航一致的线形渐变色彩
|
||||
*/
|
||||
&-header {
|
||||
background-image: linear-gradient(to right, rgb(255, 180, 61), rgb(255, 101, 0));
|
||||
height: 500rpx;
|
||||
@@ -393,6 +366,7 @@ export default {
|
||||
/* 滚动信息搜索框中的字体设置 */
|
||||
&-u-notice-bar {
|
||||
flex: 1;
|
||||
|
||||
/* 深层穿透修改子组件字体颜色样式 */
|
||||
::v-deep .u-news-item {
|
||||
color: $u-light-color !important;
|
||||
@@ -427,7 +401,8 @@ export default {
|
||||
&-border {
|
||||
border-radius: 20rpx;
|
||||
border-bottom: 1rpx solid #f5f5f5;
|
||||
box-shadow: 0px 1px 20px 0px rgba(0, 0, 0, 0.1); /*下边阴影 */
|
||||
box-shadow: 0px 1px 20px 0px rgba(0, 0, 0, 0.1);
|
||||
/*下边阴影 */
|
||||
}
|
||||
|
||||
/* 商品分类 */
|
||||
|
Reference in New Issue
Block a user