更新代码

This commit is contained in:
zhangmanman
2021-09-16 14:00:09 +08:00
parent b12465f611
commit 416724fb7f
14 changed files with 2890 additions and 1921 deletions

View File

@@ -1,6 +1,25 @@
<template>
<view class="staff">
员工
员工
<!-- 员工权限工具 -->
<!-- <view class="tool-flex store">
<view class="store-item" @click="$Router.push({name: 'Verification'})">
<image class="icon" src="@/static/icons/tool_icon_00.png" mode="aspectFill"></image>
<view class="title">扫码验证</view>
</view>
<view class="store-item" @click="$Router.push({name: 'GoodsMag'})">
<image class="icon" src="@/static/icons/tool_icon_01.png" mode="aspectFill"></image>
<view class="title">商品权证</view>
</view>
<view class="store-item" @click="$Router.push({name: 'CouponsMag'})">
<image class="icon" src="@/static/icons/tool_icon_02.png" mode="aspectFill"></image>
<view class="title">优惠券管理</view>
</view>
<view class="store-item" @click="$Router.push({name: 'Collection'})">
<image class="icon" src="@/static/icons/tool_icon_03.png" mode="aspectFill"></image>
<view class="title">收款管理</view>
</view>
</view> -->
</view>
</template>

View File

@@ -17,7 +17,7 @@
<view class="price"><text></text>{{goodsObj.price.show}}</view>
<view class="sales">累计易货{{goodsObj.sales}}</view>
</view>
<view class="coupon">
<view class="coupon" v-if="couponSee.length > 0" @click="couponsOpne">
<view class="coupon-list" v-for="(item, index) in couponSee" :key="index">
<view class="coupon-label">
{{item.title}}
@@ -28,47 +28,54 @@
<view class="title"><view class="title-hot">热卖</view>{{goodsObj.name}}</view>
<!-- <view class="sub-title">{{goodsObj.description}}</view> -->
</view>
<!-- 商家信息 -->
<view class="store">
<!-- 商家信息 -->
<view class="store">
<image class="logo" :src="goodsObj.shop.cover" mode="aspectFill"></image>
<view class="store-cont">
<view class="title">{{goodsObj.shop.name}}</view>
<view class="rate">
<uni-rate
:readonly="true"
color="#ddd"
active-color="#c82626"
:value="2.5"
:size="14"
/>
</view>
<view class="openbtn" @click="onOpenWechat">进店</view>
</view>
<view class="store-cont">
<view class="store-title">{{goodsObj.shop.name}}</view>
<view class="rate">
<uni-rate
:readonly="true"
color="#ddd"
active-color="#c82626"
:value="2.5"
:size="14"
/>
</view>
<view class="openbtn" @click="onOpenWechat">进店<image class="openbtn-img" src="../../static/icons/equity_arrow_right.png" mode="aspectFill"></image></view>
</view>
<view class="tooSee">
<view class="tooSee-label">
区块链证书
<image class="tooSee-label-img" src="../../static/icons/equity_arrow_right.png" mode="aspectFill"></image>
</view>
<view class="tooSee-label">
商品认证
<image class="tooSee-label-img" src="../../static/icons/equity_arrow_right.png" mode="aspectFill"></image>
</view>
<view class="tooSee-label">
商品溯源
<image class="tooSee-label-img" src="../../static/icons/equity_arrow_right.png" mode="aspectFill"></image>
</view>
</view>
</view>
</view>
<!-- 产品规格 -->
<view class="size">
<view class="size-item nowrap">
<label class="title">产品规格</label>
<label class="title">规格</label>
{{goodsObj.skus[0].goods_name}}
</view>
<view class="size-item nowrap">
<label class="title">限制</label>
<label class="title">说明</label>
特价商品不可与优惠券叠加使用
</view>
<view class="size-item nowrap">
<label class="title">服务</label>
易货严选自营30天无忧退换不可用券国内部分地区不可配送
<view class="goods-serve" @click="serveOpne">
<image class="goods-serve-img" src="../../static/icons/goods_buy.png" mode="aspectFill"></image>
<view class="nowrap goods-serve-name"><text v-for="(item, index) in goodsObj.services">{{item.name}}</text></view>
<image class="goods-serve-img" src="../../static/icons/goods_spot.png" mode="aspectFill"></image>
</view>
</view>
</view>
<!-- 产品详情 -->
@@ -82,6 +89,79 @@
<view class="footer">
<button class="btn" size="default" @click="buyGoods">立即购买</button>
</view>
<!-- 优惠券弹出 -->
<uni-popup ref="couponsPopup">
<view class="coupons-popup">
<view class="coupons-header">
<view class="title">优惠券</view>
<image @click="couponsClose" class="close" src="../../static/icons/goods_close.png" mode=""></image>
</view>
<view class="coupons-cont">
<view class="coupons-name">
可领取的优惠券
</view>
<view class="coupons-list" v-for="(item , index) in coupons" :key="index">
<view class="coupons-tips" v-if="item.type">
<!-- value == 1服务券 value == 2代金券 value == 3提货券 -->
<text class="coupons-tips-text" v-if="item.type.value == '1'">服务券</text>
<text class="coupons-tips-text" v-else-if="item.type.value == '2'">代金券</text>
<text class="coupons-tips-text" v-else>提货券</text>
</view>
<view class="coupons-left" v-if="item.type.value == '2'">
<view class="coupons-number">
<text></text>{{item.price}}
</view>
<view class="coupons-full">
{{item.full}}可用
</view>
</view>
<view class="coupons-left" v-else-if="item.type.value == '3'">
<view class="coupons-number coupons-small">
提货券
</view>
</view>
<view class="coupons-center">
<view class="nowrap coupons-title">
{{item.title}}
</view>
<view class="coupons-time" v-if="item.time">
{{item.time.interval}}
</view>
</view>
<view class="coupons-right">
领取
</view>
</view>
</view>
<view class="coupons-true" @click="couponsClose">
确定
</view>
</view>
</uni-popup>
<!-- 服务保障弹出 -->
<uni-popup ref="servePopup">
<view class="coupons-popup">
<view class="coupons-header">
<view class="title">保障</view>
<image @click="serveClose" class="close" src="../../static/icons/goods_close.png" mode=""></image>
</view>
<view class="serve-cont">
<view class="serve-label" v-for="(item, index) in goodsObj.services">
<view class="serve-label-name">
{{item.name}}
</view>
<view class="serve-label-text">
{{item.content}}
</view>
</view>
</view>
<view class="coupons-true" @click="serveClose">
确定
</view>
</view>
</uni-popup>
</view>
</template>
@@ -148,7 +228,27 @@
})
}
})
}
},
// 选择优惠券-显示
couponsOpne(){
this.$refs.couponsPopup.open('bottom')
},
// 选择优惠券-隐藏
couponsClose(){
this.$refs.couponsPopup.close()
},
// 查看保障服务-显示
serveOpne(){
this.$refs.servePopup.open('bottom')
},
// 查看保障服务-隐藏
serveClose() {
this.$refs.servePopup.close()
}
}
}
</script>
@@ -268,12 +368,33 @@
}
}
}
// 新增服务
.goods-serve {
display: flex;
.goods-serve-img {
width: 36rpx;
height: 36rpx;
margin-top: 24rpx;
}
.goods-serve-name {
margin: 0 30rpx 0 20rpx;
width: calc(100% - 122rpx);
text {
padding-right: $padding;
position: relative;
&:last-child {
padding-right: 0;
}
}
}
}
// 店铺
.store{
position: relative;
margin: 0 $margin;
// background: #F8F8F8;
background: #999;
background: #F8F8F8;
border-radius: $radius/2;
padding: $padding;
min-height: 160rpx;
@@ -306,8 +427,8 @@
background-color: #fd683e;
border-radius: 8rpx 4rpx 4rpx 6rpx;
color: #FFFFFF;
height: 52rpx;
line-height: 52rpx;
height: 48rpx;
line-height: 48rpx;
padding: 0 $padding - 15;
box-sizing: border-box;
display: inline-block;
@@ -346,25 +467,44 @@
&:first-child::before {
border-color: #fae2b9;
}
.tooSee-label-img {
position: absolute;
right: -34rpx;
top: 12rpx;
width: 28rpx;
height: 28rpx;
z-index: 9;
}
&:first-child .tooSee-label-img {
filter: brightness(.2)
}
}
}
.title{
.store-title{
font-size: $title-size-lg;
font-weight: bold;
line-height: 60rpx;
color: $text-color;
margin-bottom: 10rpx;
}
// rate
.openbtn{
position: absolute;
right: $margin;
top: $margin * 3;
right: $margin - 10;
top: $margin * 3.5;
color: #848484;
height: 60rpx;
line-height: 60rpx;
text-align: center;
font-size: $title-size-m;
margin-top: -30rpx;
display: flex;
.openbtn-img {
width: 32rpx;
height: 32rpx;
filter: brightness(.5);
margin-top: 14rpx;
}
}
}
// 产品规格
@@ -374,7 +514,7 @@
border-bottom: solid 20rpx #F8F8F8;
.size-item{
position: relative;
padding: 0 $padding 0 ($padding + 150);
padding: 0 $padding 0 ($padding + 100);
line-height: 90rpx;
font-size: $title-size-m;
&::after{
@@ -430,4 +570,126 @@
margin-bottom: calc(constant(safe-area-inset-bottom) / 2);
}
}
// 优惠券弹出样式
.coupons-popup {
background-color: #FFFFFF;
border-radius: 40rpx 40rpx 0 0;
padding: $padding;
box-sizing: border-box;
.coupons-header {
text-align: center;
position: relative;
margin-bottom: $margin*1.5;
.title {
font-weight: 700;
}
.close {
position: absolute;
right: 0;
top: 0;
z-index: 2;
width: 38rpx;
height: 38rpx;
}
}
.coupons-cont {
.coupons-name {
color: #616065;
font-size: 30rpx;
}
.coupons-list {
border: 2rpx solid #d6b9be;
border-radius: 10rpx;
overflow: hidden;
position: relative;
margin-top: $margin;
.coupons-tips {
background-color: #211e17;
color: #efe8d8;
position: absolute;
border-radius: 0 0 20rpx 0;
padding: 0 8rpx;
height: 34rpx;
line-height: 34rpx;
left: 0;
top: 0;
.coupons-tips-text {
font-size: 24rpx;
transform:scale(.85);
display: block;
}
}
.coupons-left {
background-color: #fdedee;
color: #e1293f;
width: 190rpx;
text-align: center;
padding: $padding - 10 0;
border-right: 2rpx dashed #eccdd4;
.coupons-number {
font-size: 40rpx;
font-weight: 600;
text {
font-size: 24rpx;
}
&.coupons-small {
font-size: 32rpx;
padding: 20rpx 0;
}
}
.coupons-full {
font-size: 24rpx;
}
}
.coupons-center {
position: absolute;
width: 100%;
left: 0;
top: 0;
padding: $padding - 10 130rpx 0 220rpx;
box-sizing: border-box;
font-size: 28rpx;
.coupons-time {
font-size: 24rpx;
margin-top: 10rpx;
color: #514c51;
}
}
.coupons-right {
position: absolute;
right: 20rpx;
top: 36rpx;
width: 110rpx;
text-align: center;
background-color: #e1293f;
color: #FFFFFF;
border-radius: 80rpx;
font-size: 24rpx;
line-height: 52rpx;
}
}
}
.coupons-true {
background-image: linear-gradient(to right, #e1293f, #fd275d);
color: #FFFFFF;
border-radius: 80rpx;
line-height: 84rpx;
text-align: center;
margin-top: $margin*5;
}
}
// 新增服务保障样式
.serve-label {
margin-top: $margin + 10;
font-size: 28rpx;
.serve-label-name {
font-weight: 700;
margin-bottom: $margin - 10;
}
.serve-label-text {
line-height: 44rpx;
}
}
</style>

View File

@@ -47,7 +47,6 @@
mobileNo: this.phone,
code : this.code
}).then(res => {
console.log(res)
this.$store.commit('setToken', res.token_type + ' ' + res.access_token)
if(!res.is_company){
this.$Router.replace({name: "Registered"})

View File

@@ -96,7 +96,7 @@
<view class="item-title">我的优惠券</view>
</view>
<view class="item">
<image class="item-cover" src="@/static/icons/user_icon_04.png" mode="aspectFill"></image>
<image class="item-cover" @click="outLogin" src="@/static/icons/user_icon_04.png" mode="aspectFill"></image>
<view class="item-title">地址管理</view>
</view>
</view>
@@ -172,9 +172,9 @@
}
},
methods: {
// outLogin(){
// this.$store.commit('setToken', '')
// }
outLogin(){
this.$store.commit('setToken', '')
},
selectedBanner(item, index) {
console.log('🥒', item, index)
}

View File

@@ -89,6 +89,7 @@
return
}
index().then(res => {
if(!res.is_certification){
this.getAppliesQuery()
return

View File

@@ -1,11 +1,30 @@
<template>
<view class="content" v-if="!loding">
<!-- v-if="!loding" -->
<view class="content">
<swiper class="vip-container" previous-margin="45rpx" next-margin="45rpx" circular @change="swiperChange">
<swiper-item class="vip-item">
<view>
VIP企业会员
</view>
</swiper-item>
<swiper-item class="vip-item">
<view>
普通会员
</view>
</swiper-item>
<swiper-item class="vip-item">
<view>
超级会员
</view>
</swiper-item>
</swiper>
<!-- 会员类型 -->
<view class="tabs">
<!-- <view class="tabs">
<view class="item" :class="{'show': index === tabsIndex}" v-for="(item, index) in identities" :key="index" @click="onTabs(index)">{{item.name}}</view>
</view>
</view> -->
<!-- 会员信息 -->
<view class="cards">
<!-- <view class="cards">
<view class="card">
<view class="card-content">
<image class="cover" src="@/static/dev/good_cover_01.png" mode="aspectFill"></image>
@@ -16,9 +35,9 @@
</view>
<view class="cards-back"></view>
<image class="cards-angle" src="@/static/imgs/vip-angle-back.png" mode="widthFix"></image>
</view>
</view> -->
<!-- 会员权限 -->
<view class="privilege">
<!-- <view class="privilege">
<view class="title">开通会员享特权</view>
<view class="privilege-box">
<view class="item" v-for="(item, index) in rights" :key="index" @click="showRemark(item.name, item.remark)">
@@ -26,18 +45,18 @@
<view class="text">{{item.name}}</view>
</view>
</view>
</view>
</view> -->
<!-- 会员 -->
<view class="footer">
<!-- <view class="footer">
<button class="footer-btn" type="default" @click="openOrder">{{identities[tabsIndex].price}}/&nbsp;开通</button>
</view>
</view> -->
<!-- 会员服务信息 -->
<view class="notice">
<!-- <view class="notice">
<view class="title">开通须知</view>
<view class="item">
<text>{{description}}</text>
</view>
</view>
</view> -->
</view>
</template>
@@ -55,18 +74,18 @@
}
},
created() {
identities().then(res => {
this.loding = false
this.user = res.user
this.description= res.description
this.identities = res.identities
this.rights = res.identities[0].rights
}).catch(err =>{
uni.showToast({
title: err.message,
icon : 'none'
})
})
// identities().then(res => {
// this.loding = false
// this.user = res.user
// this.description= res.description
// this.identities = res.identities
// this.rights = res.identities[0].rights
// }).catch(err =>{
// uni.showToast({
// title: err.message,
// icon : 'none'
// })
// })
},
methods: {
// 切换开通身份
@@ -141,6 +160,20 @@
</script>
<style lang="scss" scoped>
page {
background-color: #FFFFFF;
}
// 新增样式
.vip-container {
width: 750rpx;
height: 350rpx;
.vip-item {
background-color: #c8c8c8;
border-radius: 20rpx;
}
}
.content{
min-height: 100vh;
background: #fefaef;

BIN
static/icons/goods_buy.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 558 B

BIN
static/icons/goods_spot.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 558 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB