全新UI视觉体验,移动端API优化降低重复调用,提高并发6倍,修复N多Bug
This commit is contained in:
@@ -10,8 +10,7 @@
|
||||
<button class='item grant' @click="setUserInfo">去授权</button>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef MP -->
|
||||
<!-- <button class='item grant' type="primary" open-type="getUserInfo" lang="zh_CN" @getuserinfo="setUserInfo">去授权</button> -->
|
||||
<button hover-class="none" @tap="getUserProfile" class='item grant'>微信登录</button>
|
||||
<button class='item grant' type="primary" open-type="getUserInfo" lang="zh_CN" @getuserinfo="setUserInfo">去授权</button>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
</view>
|
||||
@@ -59,52 +58,6 @@
|
||||
this.setAuthStatus();
|
||||
},
|
||||
methods:{
|
||||
getUserProfile() {
|
||||
let self = this;
|
||||
uni.showLoading({
|
||||
title: '正在登录中'
|
||||
});
|
||||
Routine.getUserProfile()
|
||||
.then(res => {
|
||||
Routine.getCode()
|
||||
.then(code => {
|
||||
self.getWxUser(code, res);
|
||||
})
|
||||
.catch(res => {
|
||||
uni.hideLoading();
|
||||
});
|
||||
})
|
||||
.catch(res => {
|
||||
uni.hideLoading();
|
||||
});
|
||||
},
|
||||
|
||||
getWxUser(code, res) {
|
||||
let self = this
|
||||
let userInfo = res.userInfo;
|
||||
userInfo.code = code;
|
||||
userInfo.spread_spid = app.globalData.spid; //获取推广人ID
|
||||
userInfo.spread_code = app.globalData.code; //获取推广人分享二维码ID
|
||||
userInfo.avatar = userInfo.userInfo.avatarUrl;
|
||||
userInfo.city = userInfo.userInfo.city;
|
||||
userInfo.country = userInfo.userInfo.country;
|
||||
userInfo.nickName = userInfo.userInfo.nickName;
|
||||
userInfo.province = userInfo.userInfo.province;
|
||||
userInfo.sex = userInfo.userInfo.gender;
|
||||
userInfo.type = 'routine'
|
||||
Routine.authUserInfo(code,userInfo).then(res=>{
|
||||
uni.hideLoading();
|
||||
this.$emit('authColse',false);
|
||||
this.$emit('onLoadFun',this.userInfo);
|
||||
}).catch(res=>{
|
||||
uni.hideLoading();
|
||||
uni.showToast({
|
||||
title:res.message,
|
||||
icon:'none',
|
||||
duration:2000
|
||||
});
|
||||
});
|
||||
},
|
||||
setAuthStatus(){
|
||||
Routine.authorize().then(res=>{
|
||||
if(res.islogin === false)
|
||||
@@ -118,7 +71,6 @@
|
||||
},
|
||||
getUserInfo(code){
|
||||
Routine.getUserInfo().then(res=>{
|
||||
console.log('res',res);
|
||||
let userInfo = res.userInfo
|
||||
userInfo.code = code;
|
||||
userInfo.spread_spid = app.globalData.spid;//获取推广人ID
|
||||
@@ -187,7 +139,7 @@
|
||||
.Popup .bottom .item{width:50%;height:80rpx;background-color:#eeeeee;text-align:center;line-height:80rpx;font-size:24rpx;color:#666;margin-top:54rpx;}
|
||||
.Popup .bottom .item.on{width: 100%}
|
||||
.flex{display:flex;}
|
||||
.Popup .bottom .item.grant{font-size:28rpx;color:#fff;font-weight:bold;background-color:#e93323;border-radius:0;padding:0;}
|
||||
.Popup .bottom .item.grant{font-size:28rpx;color:#fff;font-weight:bold;background-color:$theme-color;border-radius:0;padding:0;}
|
||||
.mask{position:fixed;top:0;right:0;left:0;bottom:0;background-color:rgba(0,0,0,0.65);z-index:310;}
|
||||
|
||||
</style>
|
||||
|
||||
@@ -45,21 +45,26 @@
|
||||
isLog: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
active: 0,
|
||||
//地址列表
|
||||
addressList: [],
|
||||
is_loading: true
|
||||
is_loading: true,
|
||||
addressList: []
|
||||
};
|
||||
},
|
||||
|
||||
methods: {
|
||||
tapAddress: function(e, addressid) {
|
||||
this.active = e;
|
||||
this.$emit('OnChangeAddress', addressid);
|
||||
let a = {};
|
||||
for (let i = 0, leng = this.addressList.length; i < leng; i++) {
|
||||
if (this.addressList[i].id == addressid) {
|
||||
a = this.addressList[i];
|
||||
}
|
||||
}
|
||||
this.$emit('OnChangeAddress', a);
|
||||
},
|
||||
close: function() {
|
||||
this.$emit('changeClose');
|
||||
@@ -79,14 +84,18 @@
|
||||
limit: 5
|
||||
}).then(res => {
|
||||
let addressList = res.data.list;
|
||||
that.$set(that, 'addressList', addressList);
|
||||
that.is_loading = false;
|
||||
let defaultAddress = {};
|
||||
//处理默认选中项
|
||||
if(!that.address.addressId) return;
|
||||
for (let i = 0, leng = addressList.length; i < leng; i++) {
|
||||
if (addressList[i].id == that.address.addressId) {
|
||||
that.active = i;
|
||||
defaultAddress = this.addressList[i];
|
||||
}
|
||||
}
|
||||
that.$set(that, 'addressList', addressList);
|
||||
that.is_loading = false;
|
||||
this.$emit('OnDefaultAddress', defaultAddress);
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<template>
|
||||
<view class="time" :style="justifyLeft">
|
||||
<text class="red" v-if="tipText">{{ tipText }}</text>
|
||||
<text class="styleAll" v-if="isDay === true">{{ day }}</text>
|
||||
<text class="timeTxt red" v-if="dayText">{{ dayText }}</text>
|
||||
<text class="styleAll" :class='isCol?"timeCol":""'>{{ hour }}</text>
|
||||
<text class="timeTxt red" v-if="hourText">{{ hourText }}</text>
|
||||
<text class="styleAll" :class='isCol?"timeCol":""'>{{ minute }}</text>
|
||||
<text class="timeTxt red" v-if="minuteText">{{ minuteText }}</text>
|
||||
<text class="styleAll" :class='isCol?"timeCol":""'>{{ second }}</text>
|
||||
<text class="timeTxt red" v-if="secondText">{{ secondText }}</text>
|
||||
<text class="" v-if="tipText">{{ tipText }}</text>
|
||||
<text class="styleAll p6" v-if="isDay === true" :style="{background:bgColor.bgColor,color:bgColor.Color}">{{ day }}{{bgColor.isDay?'天':''}}</text>
|
||||
<text class="timeTxt" v-if="dayText" :style="{width:bgColor.timeTxtwidth,color:bgColor.bgColor}">{{ dayText }}</text>
|
||||
<text class="styleAll" :class='isCol?"timeCol":""' :style="{background:bgColor.bgColor,color:bgColor.Color,width:bgColor.width}">{{ hour }}</text>
|
||||
<text class="timeTxt" v-if="hourText" :class='isCol?"whit":""' :style="{width:bgColor.timeTxtwidth,color:bgColor.bgColor}">{{ hourText }}</text>
|
||||
<text class="styleAll" :class='isCol?"timeCol":""' :style="{background:bgColor.bgColor,color:bgColor.Color,width:bgColor.width}">{{ minute }}</text>
|
||||
<text class="timeTxt" v-if="minuteText" :class='isCol?"whit":""' :style="{width:bgColor.timeTxtwidth,color:bgColor.bgColor}">{{ minuteText }}</text>
|
||||
<text class="styleAll" :class='isCol?"timeCol":""' :style="{background:bgColor.bgColor,color:bgColor.Color,width:bgColor.width}">{{ second }}</text>
|
||||
<text class="timeTxt" v-if="secondText">{{ secondText }}</text>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -52,6 +52,10 @@
|
||||
isCol: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
bgColor: {
|
||||
type: Object,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
data: function() {
|
||||
@@ -112,7 +116,29 @@
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
<style scoped>
|
||||
.p6{
|
||||
padding: 0 8rpx;
|
||||
}
|
||||
.styleAll{
|
||||
/* color: #fff; */
|
||||
font-size: 24rpx;
|
||||
height: 36rpx;
|
||||
line-height: 36rpx;
|
||||
border-radius: 6rpx;
|
||||
text-align: center;
|
||||
/* padding: 0 6rpx; */
|
||||
}
|
||||
.timeTxt{
|
||||
text-align: center;
|
||||
/* width: 16rpx; */
|
||||
height: 36rpx;
|
||||
line-height: 36rpx;
|
||||
display: inline-block;
|
||||
}
|
||||
.whit{
|
||||
color: #fff !important;
|
||||
}
|
||||
.time {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
@@ -124,13 +150,13 @@
|
||||
}
|
||||
|
||||
.timeCol {
|
||||
width: 40rpx;
|
||||
/* width: 40rpx;
|
||||
height: 40rpx;
|
||||
line-height: 40rpx;
|
||||
text-align:center;
|
||||
border-radius: 6px;
|
||||
background: #fff;
|
||||
font-size: 24rpx;
|
||||
font-size: 24rpx; */
|
||||
color: #E93323;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,110 +1,235 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class='coupon-list-window' :class='coupon.coupon==true?"on":""'>
|
||||
<view class='title'>优惠券<text class='iconfont icon-guanbi' @click='close'></text></view>
|
||||
<view class='coupon-list' v-if="coupon.list.length">
|
||||
<view class='item acea-row row-center-wrapper' v-for="(item,index) in coupon.list" @click="getCouponUser(index,item.id)" :key='index'>
|
||||
<view class='money acea-row row-column row-center-wrapper' :class='item.isUse?"moneyGray":""'>
|
||||
<view>¥<text class='num'>{{item.money?Number(item.money):''}}</text></view>
|
||||
<view class="pic-num">满{{item.minPrice}}元可用</view>
|
||||
</view>
|
||||
<view class='text'>
|
||||
<view class='condition line2'>
|
||||
<span class='line-title' :class='item.isUse?"gray":""' v-if='item.useType===1'>通用</span>
|
||||
<span class='line-title' :class='item.isUse?"gray":""' v-else-if='item.useType===3'>品类</span>
|
||||
<span class='line-title' :class='item.isUse?"gray":""' v-else>商品</span>
|
||||
<span>{{item.name}}</span>
|
||||
<view v-if="!orderShow" class="nav acea-row row-around">
|
||||
<view :class="['acea-row', 'row-middle', type === 1 ? 'on' : '']" @click="setType(1)">通用券</view>
|
||||
<view :class="['acea-row', 'row-middle', type === 2 ? 'on' : '']" @click="setType(2)">商品券</view>
|
||||
<view :class="['acea-row', 'row-middle', type === 3 ? 'on' : '']" @click="setType(3)">品类券</view>
|
||||
</view>
|
||||
<!-- <view class="occupy" v-if="!orderShow"></view> -->
|
||||
<!-- <view class='title'>优惠券<text class='iconfont icon-guanbi' @click='close'></text></view> -->
|
||||
<view class='coupon-list' :style="{'margin-top':!orderShow?'0':'50rpx'}">
|
||||
<block v-if="coupon.list.length">
|
||||
<!-- <view class='item acea-row row-center-wrapper' v-for="(item,index) in coupon.list" :key='index'> -->
|
||||
<view class='item acea-row row-center-wrapper' v-for="(item,index) in coupon.list"
|
||||
@click="getCouponUser(index,item.id)" :key='index'>
|
||||
<view class='money acea-row row-column row-center-wrapper' :class='item.isUse?"moneyGray":""'>
|
||||
<view>¥<text class='num'>{{item.money?Number(item.money):''}}</text></view>
|
||||
<view class="pic-num">满{{item.minPrice}}元可用</view>
|
||||
</view>
|
||||
<view class='text'>
|
||||
<view class='condition line2'>
|
||||
<span class='line-title' :class='item.isUse?"gray":""' v-if='item.useType===1'>通用</span>
|
||||
<span class='line-title' :class='item.isUse?"gray":""'
|
||||
v-else-if='item.useType===3'>品类</span>
|
||||
<span class='line-title' :class='item.isUse?"gray":""' v-else>商品</span>
|
||||
<span>{{item.name}}</span>
|
||||
</view>
|
||||
<view class='data acea-row row-between-wrapper'>
|
||||
<view v-if="item.day>0">领取后{{item.day}}天内可用</view>
|
||||
<view v-else>
|
||||
{{ item.useStartTimeStr&& item.useEndTimeStr ? item.useStartTimeStr + " - " + item.useEndTimeStr : ""}}
|
||||
</view>
|
||||
<view class='bnt gray' v-if="item.isUse">{{item.use_title || '已领取'}}</view>
|
||||
<view class='bnt bg-color' v-else>{{coupon.statusTile || '立即领取'}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class='data acea-row row-between-wrapper'>
|
||||
<view v-if="item.day>0">领取后{{item.day}}天内可用</view>
|
||||
<view v-else>{{ item.useStartTimeStr&& item.useEndTimeStr ? item.useStartTimeStr + " - " + item.useEndTimeStr : ""}}</view>
|
||||
<view class='bnt gray' v-if="item.isUse">{{item.use_title || '已领取'}}</view>
|
||||
<view class='bnt bg-color' v-else>{{coupon.statusTile || '立即领取'}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 无优惠券 -->
|
||||
<view class='pictrue' v-else><image src='../../static/images/noCoupon.png'></image></view>
|
||||
</block>
|
||||
<!-- 无优惠券 -->
|
||||
<view class='pictrue' v-else>
|
||||
<image src='../../static/images/noCoupon.png'></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class='mask' catchtouchmove="true" :hidden='coupon.coupon==false' @click='close'></view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { setCouponReceive } from '@/api/api.js';
|
||||
import {
|
||||
setCouponReceive
|
||||
} from '@/api/api.js';
|
||||
export default {
|
||||
props: {
|
||||
//打开状态 0=领取优惠券,1=使用优惠券
|
||||
openType: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
},
|
||||
coupon: {
|
||||
type: Object,
|
||||
default: function(){
|
||||
return {};
|
||||
}
|
||||
}
|
||||
openType: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
},
|
||||
coupon: {
|
||||
type: Object,
|
||||
default: function() {
|
||||
return {};
|
||||
}
|
||||
},
|
||||
//下单页面使用优惠券组件不展示tab切换页
|
||||
orderShow: {
|
||||
type: String,
|
||||
default: function() {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
type: 1
|
||||
};
|
||||
},
|
||||
|
||||
|
||||
methods: {
|
||||
close: function () {
|
||||
this.$emit('ChangCouponsClone');
|
||||
},
|
||||
getCouponUser:function(index,id){
|
||||
let that = this;
|
||||
let list = that.coupon.list;
|
||||
if (list[index].isUse == true && this.openType==0) return true;
|
||||
switch (this.openType){
|
||||
case 0:
|
||||
//领取优惠券
|
||||
let ids = [];
|
||||
ids.push(id);
|
||||
setCouponReceive(id).then(res=>{
|
||||
that.$emit('ChangCouponsUseState', index);
|
||||
that.$util.Tips({title: "领取成功"});
|
||||
that.$emit('ChangCoupons', list[index]);
|
||||
})
|
||||
break;
|
||||
case 1:
|
||||
that.$emit('ChangCoupons',index);
|
||||
break;
|
||||
}
|
||||
}
|
||||
close: function() {
|
||||
this.type = 1
|
||||
this.$emit('ChangCouponsClone');
|
||||
},
|
||||
getCouponUser: function(index, id) {
|
||||
let that = this;
|
||||
let list = that.coupon.list;
|
||||
if (list[index].isUse == true && this.openType == 0) return true;
|
||||
switch (this.openType) {
|
||||
case 0:
|
||||
//领取优惠券
|
||||
let ids = [];
|
||||
ids.push(id);
|
||||
setCouponReceive(id).then(res => {
|
||||
that.$emit('ChangCouponsUseState', index);
|
||||
that.$util.Tips({
|
||||
title: "领取成功"
|
||||
});
|
||||
that.$emit('ChangCoupons', list[index]);
|
||||
})
|
||||
break;
|
||||
case 1:
|
||||
that.$emit('ChangCoupons', index);
|
||||
break;
|
||||
}
|
||||
},
|
||||
setType: function(type) {
|
||||
this.type = type;
|
||||
this.$emit('tabCouponType', type);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.coupon-list-window{position:fixed;bottom:0;left:0;width:100%;background-color:#f5f5f5;border-radius:16rpx 16rpx 0 0;z-index:555;transform:translate3d(0,100%,0);transition:all .3s cubic-bezier(.25,.5,.5,.9);}
|
||||
.coupon-list-window.on{transform:translate3d(0,0,0);}
|
||||
.coupon-list-window .title{height:124rpx;width:100%;text-align:center;line-height:124rpx;font-size:32rpx;font-weight:bold;position:relative;}
|
||||
.coupon-list-window .title .iconfont{position:absolute;right:30rpx;top:50%;transform:translateY(-50%);font-size:35rpx;color:#8a8a8a;font-weight:normal;}
|
||||
.coupon-list-window .coupon-list{margin:0 0 50rpx 0;height:550rpx;overflow:auto;}
|
||||
.coupon-list-window .pictrue{width:414rpx;height:336rpx;margin:0 auto 50rpx auto;}
|
||||
.coupon-list-window .pictrue image{width:100%;height:100%;}
|
||||
.pic-num{color: #fff;font-size: 24rpx;}
|
||||
.line-title{
|
||||
width:90rpx;
|
||||
padding: 0 10rpx;
|
||||
box-sizing: border-box;
|
||||
background:rgba(255,247,247,1);
|
||||
border:1px solid rgba(232,51,35,1);
|
||||
opacity:1;
|
||||
border-radius:20rpx;
|
||||
font-size:20rpx;
|
||||
color: #E83323;
|
||||
margin-right: 12rpx;
|
||||
.coupon-list-window {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
background-color: #f5f5f5;
|
||||
border-radius: 16rpx 16rpx 0 0;
|
||||
z-index: 555;
|
||||
transform: translate3d(0, 100%, 0);
|
||||
transition: all .3s cubic-bezier(.25, .5, .5, .9);
|
||||
}
|
||||
.line-title.gray{
|
||||
border-color:#BBB;
|
||||
color:#bbb;
|
||||
background-color:#F5F5F5;
|
||||
|
||||
.coupon-list-window.on {
|
||||
transform: translate3d(0, 0, 0);
|
||||
}
|
||||
|
||||
.coupon-list-window .title {
|
||||
height: 124rpx;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
line-height: 124rpx;
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.coupon-list-window .title .iconfont {
|
||||
position: absolute;
|
||||
right: 30rpx;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
font-size: 35rpx;
|
||||
color: #8a8a8a;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.coupon-list-window .coupon-list {
|
||||
margin: 0 0 30rpx 0;
|
||||
height: 823rpx;
|
||||
overflow: auto;
|
||||
padding-top: 30rpx;
|
||||
}
|
||||
|
||||
.coupon-list-window .pictrue {
|
||||
width: 414rpx;
|
||||
height: 336rpx;
|
||||
margin: 208rpx auto;
|
||||
}
|
||||
|
||||
.coupon-list-window .pictrue image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.pic-num {
|
||||
color: #fff;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.line-title {
|
||||
width: 90rpx;
|
||||
padding: 0 10rpx;
|
||||
box-sizing: border-box;
|
||||
background: rgba(255, 247, 247, 1);
|
||||
border: 1px solid rgba(232, 51, 35, 1);
|
||||
opacity: 1;
|
||||
border-radius: 20rpx;
|
||||
font-size: 20rpx;
|
||||
color: #E83323;
|
||||
margin-right: 12rpx;
|
||||
}
|
||||
|
||||
.line-title.gray {
|
||||
border-color: #BBB;
|
||||
color: #bbb;
|
||||
background-color: #F5F5F5;
|
||||
}
|
||||
|
||||
.nav {
|
||||
// position: absolute;
|
||||
// top: 0;
|
||||
// left: 0;
|
||||
width: 100%;
|
||||
height: 96rpx;
|
||||
border-bottom: 2rpx solid #F5F5F5;
|
||||
border-top-left-radius: 16rpx;
|
||||
border-top-right-radius: 16rpx;
|
||||
background-color: #FFFFFF;
|
||||
font-size: 30rpx;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.nav .acea-row {
|
||||
border-top: 5rpx solid transparent;
|
||||
border-bottom: 5rpx solid transparent;
|
||||
}
|
||||
|
||||
.nav .acea-row.on {
|
||||
border-bottom-color: #E93323;
|
||||
color: #282828;
|
||||
}
|
||||
|
||||
.nav .acea-row:only-child {
|
||||
border-bottom-color: transparent;
|
||||
}
|
||||
|
||||
.occupy {
|
||||
height: 106rpx;
|
||||
}
|
||||
|
||||
.coupon-list .item {
|
||||
margin-bottom: 20rpx;
|
||||
box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.06);
|
||||
}
|
||||
|
||||
.coupon-list .item .money {
|
||||
font-weight: normal;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-top: 200rpx;
|
||||
padding-bottom: 60rpx;
|
||||
image{
|
||||
width: 414rpx;
|
||||
height: 240rpx;
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
border-radius: 50rpx;
|
||||
opacity: 0;
|
||||
height: 0;
|
||||
color: #e93323;
|
||||
color: $theme-color;
|
||||
width: 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<view v-if="isUp">
|
||||
<view class="mobile-bg" @click="close"></view>
|
||||
<view class="mobile-mask animated" :class="{slideInUp:isUp}">
|
||||
<view class="mobile-bg" v-if="isShow" @click="close"></view>
|
||||
<view class="mobile-mask animated" :class="{slideInUp:isUp}" :style="{position:isPos?'fixed':'static'}">
|
||||
<view class="input-item">
|
||||
<input type="text" v-model="account" placeholder="输入手机号" />
|
||||
</view>
|
||||
@@ -9,7 +9,7 @@
|
||||
<input type="text" v-model="codeNum" placeholder="输入验证码" />
|
||||
<button class="code" :disabled="disabled" @click="code">{{text}}</button>
|
||||
</view>
|
||||
<view class="sub_btn" @click="loginBtn">立即登录</view>
|
||||
<view class="sub_btn" @click="loginBtn">{{(!userInfo.phone && isLogin) || (userInfo.phone && isLogin)?'立即绑定':'立即登录'}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -18,6 +18,7 @@
|
||||
const app = getApp();
|
||||
import sendVerifyCode from "@/mixins/SendVerifyCode";
|
||||
import Routine from '@/libs/routine';
|
||||
import {mapGetters} from "vuex";
|
||||
import {
|
||||
loginMobile,
|
||||
registerVerify,
|
||||
@@ -26,32 +27,59 @@
|
||||
phoneSilenceAuth,
|
||||
phoneWxSilenceAuth
|
||||
} from "@/api/user";
|
||||
import { bindingPhone } from '@/api/api.js'
|
||||
import { getUserPhone } from '@/api/public';
|
||||
export default{
|
||||
name:'login_mobile',
|
||||
props:{
|
||||
isUp:{
|
||||
type:Boolean,
|
||||
default:false,
|
||||
import {
|
||||
bindingPhone
|
||||
} from '@/api/api.js'
|
||||
import {
|
||||
getUserPhone,
|
||||
iosBinding
|
||||
} from '@/api/public';
|
||||
const BACK_URL = "login_back_url";
|
||||
export default {
|
||||
name: 'login_mobile',
|
||||
computed: mapGetters(['userInfo','isLogin']),
|
||||
props: {
|
||||
isUp: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
authKey:{
|
||||
type:String,
|
||||
default:'',
|
||||
authKey: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
isShow: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
isPos: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
appleShow: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
platform: {
|
||||
type: String,
|
||||
default: '',
|
||||
}
|
||||
},
|
||||
data(){
|
||||
data() {
|
||||
return {
|
||||
keyCode:'',
|
||||
account:'',
|
||||
codeNum:''
|
||||
keyCode: '',
|
||||
account: '',
|
||||
codeNum: '',
|
||||
isApp: 0
|
||||
}
|
||||
},
|
||||
mixins: [sendVerifyCode],
|
||||
mounted() {
|
||||
//this.getCode();
|
||||
},
|
||||
methods:{
|
||||
onLoad() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
// 获取验证码
|
||||
async code() {
|
||||
let that = this;
|
||||
@@ -61,12 +89,14 @@
|
||||
if (!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(that.account)) return that.$util.Tips({
|
||||
title: '请输入正确的手机号码'
|
||||
});
|
||||
await registerVerify(that.account).then(res=>{
|
||||
that.$util.Tips({title:res.msg});
|
||||
await registerVerify(that.account).then(res => {
|
||||
that.$util.Tips({
|
||||
title: res.msg
|
||||
});
|
||||
that.sendCode();
|
||||
}).catch(err=>{
|
||||
}).catch(err => {
|
||||
return that.$util.Tips({
|
||||
title:err
|
||||
title: err
|
||||
})
|
||||
})
|
||||
},
|
||||
@@ -81,11 +111,11 @@
|
||||
});
|
||||
});
|
||||
},
|
||||
close(){
|
||||
this.$emit('close',false)
|
||||
close() {
|
||||
this.$emit('close', false)
|
||||
},
|
||||
// 登录
|
||||
loginBtn(){
|
||||
loginBtn() {
|
||||
let that = this
|
||||
if (!that.account) return that.$util.Tips({
|
||||
title: '请填写手机号码'
|
||||
@@ -99,47 +129,66 @@
|
||||
if (!/^[\w\d]+$/i.test(that.codeNum)) return that.$util.Tips({
|
||||
title: '请输入正确的验证码'
|
||||
});
|
||||
uni.showLoading({ title: '正在登录中' });
|
||||
getUserPhone({
|
||||
captcha: that.codeNum,
|
||||
phone: that.account,
|
||||
spid: app.globalData.spid,
|
||||
spread: app.globalData.code,
|
||||
type: 'public',
|
||||
key: this.authKey
|
||||
}).then(res=>{
|
||||
let time = res.data.expires_time - this.$Cache.time();
|
||||
this.$store.commit('LOGIN', {
|
||||
token: res.data.token,
|
||||
time: time
|
||||
});
|
||||
this.getUserInfo();
|
||||
}).catch(error=>{
|
||||
uni.hideLoading()
|
||||
this.$util.Tips({
|
||||
title:error
|
||||
uni.showLoading({
|
||||
title: !this.userInfo.phone && this.isLogin?'正在绑定中':'正在登录中'
|
||||
});
|
||||
if (!this.userInfo.phone && this.isLogin) {
|
||||
iosBinding({
|
||||
captcha: that.codeNum,
|
||||
phone: that.account
|
||||
}).then(res => {
|
||||
that.$util.Tips({
|
||||
title: '绑定手机号成功',
|
||||
icon: 'success'
|
||||
}, {
|
||||
tab: 3
|
||||
})
|
||||
that.isApp = 1;
|
||||
that.getUserInfo();
|
||||
}).catch(error => {
|
||||
uni.hideLoading()
|
||||
that.$util.Tips({
|
||||
title: error
|
||||
})
|
||||
})
|
||||
})
|
||||
} else {
|
||||
getUserPhone({
|
||||
captcha: that.codeNum,
|
||||
phone: that.account,
|
||||
// #ifdef H5
|
||||
type: 'public',
|
||||
// #endif
|
||||
key: that.authKey
|
||||
}).then(res => {
|
||||
that.$store.commit('LOGIN', {
|
||||
token: res.data.token
|
||||
});
|
||||
that.$store.commit("SETUID", res.data.uid);
|
||||
that.getUserInfo();
|
||||
}).catch(error => {
|
||||
uni.hideLoading()
|
||||
that.$util.Tips({
|
||||
title: error
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
// #ifdef MP
|
||||
phoneSilenceAuth(code){
|
||||
phoneSilenceAuth(code) {
|
||||
let self = this
|
||||
phoneSilenceAuth({
|
||||
code:code,
|
||||
code: code,
|
||||
spid: app.globalData.spid,
|
||||
spread: app.globalData.code,
|
||||
phone:this.account,
|
||||
captcha:this.codeNum
|
||||
}).then(res=>{
|
||||
let time = res.data.expires_time - this.$Cache.time();
|
||||
this.$store.commit('LOGIN', {
|
||||
token: res.data.token,
|
||||
time: time
|
||||
});
|
||||
phone: this.account,
|
||||
captcha: this.codeNum
|
||||
}).then(res => {
|
||||
this.$store.commit('LOGIN', res.data.token);
|
||||
this.$store.commit("SETUID", res.data.uid);
|
||||
this.getUserInfo();
|
||||
}).catch(error=>{
|
||||
}).catch(error => {
|
||||
self.$util.Tips({
|
||||
title:error
|
||||
title: error
|
||||
})
|
||||
})
|
||||
},
|
||||
@@ -151,52 +200,56 @@
|
||||
let that = this;
|
||||
getUserInfo().then(res => {
|
||||
uni.hideLoading();
|
||||
that.userInfo = res.data
|
||||
that.$store.commit("SETUID", res.data.uid);
|
||||
that.$store.commit("UPDATE_USERINFO", res.data);
|
||||
// #ifdef MP
|
||||
// #ifdef MP
|
||||
that.$util.Tips({
|
||||
title:'登录成功',
|
||||
icon:'success'
|
||||
},{
|
||||
tab:3
|
||||
title: '登录成功',
|
||||
icon: 'success'
|
||||
}, {
|
||||
tab: 3
|
||||
})
|
||||
that.close()
|
||||
// #endif
|
||||
// #ifdef H5
|
||||
that.$emit('wechatPhone',true)
|
||||
that.$emit('wechatPhone', true)
|
||||
// #endif
|
||||
});
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="stylus">
|
||||
.mobile-bg{
|
||||
<style lang="stylus" scoped>
|
||||
.mobile-bg {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(0,0,0,0.5);
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
.isPos {
|
||||
position: static;
|
||||
}
|
||||
|
||||
.mobile-mask {
|
||||
z-index: 20;
|
||||
position: fixed;
|
||||
// position: fixed;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
padding: 67rpx 30rpx;
|
||||
background: #fff;
|
||||
.input-item{
|
||||
|
||||
.input-item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
height: 86rpx;
|
||||
margin-bottom: 38rpx;
|
||||
input{
|
||||
|
||||
input {
|
||||
flex: 1;
|
||||
display: block;
|
||||
height: 100%;
|
||||
@@ -204,7 +257,8 @@
|
||||
border-radius: 43rpx;
|
||||
border: 1px solid #DCDCDC;
|
||||
}
|
||||
.code{
|
||||
|
||||
.code {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
@@ -213,15 +267,17 @@
|
||||
margin-left: 30rpx;
|
||||
background: rgba(233, 51, 35, 0.05);
|
||||
font-size: 28rpx;
|
||||
color: #E93323;
|
||||
color: $theme-color;
|
||||
border-radius: 43rpx;
|
||||
&[disabled]{
|
||||
|
||||
&[disabled] {
|
||||
background: rgba(0, 0, 0, 0.05);
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
}
|
||||
.sub_btn{
|
||||
|
||||
.sub_btn {
|
||||
width: 690rpx;
|
||||
height: 86rpx;
|
||||
line-height: 86rpx;
|
||||
@@ -233,7 +289,8 @@
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
.animated{
|
||||
animation-duration:.4s
|
||||
|
||||
.animated {
|
||||
animation-duration: .4s
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
getCodeApi,
|
||||
getUserInfo
|
||||
} from "@/api/user";
|
||||
import { getLogo, silenceAuth, getUserPhone } from '@/api/public';
|
||||
import { getLogo, getUserPhone } from '@/api/public';
|
||||
export default{
|
||||
name:'routine_phone',
|
||||
props:{
|
||||
@@ -51,7 +51,6 @@
|
||||
// #ifdef MP
|
||||
// 小程序获取手机号码
|
||||
getphonenumber(e){
|
||||
console.log(e)
|
||||
uni.showLoading({ title: '加载中' });
|
||||
Routine.getCode()
|
||||
.then(code => {
|
||||
@@ -67,22 +66,21 @@
|
||||
encryptedData: encryptedData,
|
||||
iv: iv,
|
||||
code: code,
|
||||
spid: app.globalData.spid,
|
||||
spread: app.globalData.code,
|
||||
key:this.authKey,
|
||||
type: 'routine'
|
||||
})
|
||||
.then(res => {
|
||||
let time = res.data.expires_time - this.$Cache.time();
|
||||
this.$store.commit('LOGIN', {
|
||||
token: res.data.token,
|
||||
time: time
|
||||
token: res.data.token
|
||||
});
|
||||
this.$store.commit("SETUID", res.data.uid);
|
||||
this.getUserInfo();
|
||||
})
|
||||
.catch(res => {
|
||||
console.log(res);
|
||||
uni.hideLoading();
|
||||
this.$util.Tips({
|
||||
title: res
|
||||
});
|
||||
});
|
||||
},
|
||||
/**
|
||||
@@ -93,7 +91,6 @@
|
||||
getUserInfo().then(res => {
|
||||
uni.hideLoading();
|
||||
that.userInfo = res.data
|
||||
that.$store.commit("SETUID", res.data.uid);
|
||||
that.$store.commit("UPDATE_USERINFO", res.data);
|
||||
that.isStatus = true
|
||||
this.close()
|
||||
@@ -150,7 +147,7 @@
|
||||
height: 86rpx;
|
||||
line-height: 86rpx;
|
||||
margin-top: 60rpx;
|
||||
background: #E93323;
|
||||
background: $theme-color;
|
||||
border-radius: 43rpx;
|
||||
color: #fff;
|
||||
font-size: 28rpx;
|
||||
|
||||
@@ -1,26 +1,27 @@
|
||||
<template>
|
||||
<view class="orderGoods">
|
||||
<view class='total'>共{{totalNmu}}件商品</view>
|
||||
<view class='goodWrapper'>
|
||||
<view class='item acea-row row-between-wrapper' v-for="(item,index) in cartInfo" :key="index" @click="jumpCon(item.productId)">
|
||||
<view class="orderGoods borRadius14">
|
||||
<view class='total'>共{{ orderProNum?orderProNum:totalNmu}}件商品</view>
|
||||
<view class='goodWrapper pad30'>
|
||||
<view class='item acea-row row-between-wrapper' v-for="(item,index) in cartInfo" :key="index"
|
||||
@click="jumpCon(item.productId)">
|
||||
<view class='pictrue'>
|
||||
<image :src='item.productInfo.attrInfo.image' v-if="item.productInfo.attrInfo"></image>
|
||||
<image :src='item.productInfo.image' v-else></image>
|
||||
<image :src='item.image'></image>
|
||||
</view>
|
||||
<view class='text'>
|
||||
<view class='acea-row row-between-wrapper'>
|
||||
<view class='name line1'>{{item.productInfo.storeName}}</view>
|
||||
<view class='num'>x {{item.cartNum}}</view>
|
||||
<view class='name line1'>{{item.productName ? item.productName : item.storeName}}</view>
|
||||
<view class='num'>x {{item.payNum ? item.payNum : item.cartNum}}</view>
|
||||
</view>
|
||||
<view class='attr line1' v-if="item.productInfo.attrInfo">{{item.productInfo.attrInfo.suk}}</view>
|
||||
<view class='money font-color' v-if="item.productInfo.attrInfo">¥{{item.productInfo.attrInfo.price}}</view>
|
||||
<view class='money font-color' v-else>¥{{item.productInfo.price}}</view>
|
||||
<view class='evaluate' v-if='item.isReply==0 && evaluate==3' @click.stop="evaluateTap(item.productAttrUnique,orderId,ids)">评价</view>
|
||||
<view class='evaluate' v-else-if="item.isReply==1 && evaluate==3">已评价</view>
|
||||
<view class='attr line1' v-if="item.sku">{{item.sku}}</view>
|
||||
<view class='money font-color'>¥{{item.price}}</view>
|
||||
<view class='evaluate' v-if='item.isReply==0 && evaluate==2' @click.stop="evaluateTap(item)">评价
|
||||
</view>
|
||||
<view class='evaluate' v-else-if="item.isReply==1">已评价</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -47,32 +48,45 @@
|
||||
jump: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
orderProNum: {
|
||||
type: Number,
|
||||
default: function() {
|
||||
return 0;
|
||||
}
|
||||
},
|
||||
productType: {
|
||||
type: Number,
|
||||
default: function() {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
totalNmu:''
|
||||
totalNmu: ''
|
||||
};
|
||||
},
|
||||
watch:{
|
||||
cartInfo:function(nVal,oVal){
|
||||
watch: {
|
||||
cartInfo: function(nVal, oVal) {
|
||||
let num = 0
|
||||
nVal.forEach((item,index)=>{
|
||||
nVal.forEach((item, index) => {
|
||||
num += item.cartNum
|
||||
})
|
||||
this.totalNmu = num
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
evaluateTap:function(unique,orderId,ids){
|
||||
evaluateTap(item) {
|
||||
uni.navigateTo({
|
||||
url:"/pages/users/goods_comment_con/index?unique="+unique+"&uni="+orderId + "&id=" + ids
|
||||
url: "/pages/users/goods_comment_con/index?unique=" + item.attrId + "&orderId=" + this.orderId + '&id=' + this.ids
|
||||
})
|
||||
},
|
||||
jumpCon:function(id){
|
||||
if(this.jump){
|
||||
jumpCon: function(id) {
|
||||
let type = this.productType==0?'normal':'video'
|
||||
if (this.jump) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/goods_details/index?id=${id}`
|
||||
url: `/pages/goods_details/index?id=${id}&type=${type}`
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -83,20 +97,21 @@
|
||||
<style scoped lang="scss">
|
||||
.orderGoods {
|
||||
background-color: #fff;
|
||||
margin-top: 12rpx;
|
||||
margin-top: 15rpx;
|
||||
}
|
||||
|
||||
.orderGoods .total {
|
||||
width: 100%;
|
||||
height: 86rpx;
|
||||
padding: 0 30rpx;
|
||||
padding: 0 24rpx;
|
||||
border-bottom: 2rpx solid #f0f0f0;
|
||||
font-size: 30rpx;
|
||||
color: #282828;
|
||||
line-height: 86rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.pictrue image{
|
||||
|
||||
.pictrue image {
|
||||
background: #f4f4f4;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
<view class="title acea-row row-center-wrapper">
|
||||
选择付款方式<text class="iconfont icon-guanbi" @click='close'></text>
|
||||
</view>
|
||||
<view class="item acea-row row-between-wrapper" @click='goPay(item.number || 0 , item.value)' v-for="(item,index) in payMode"
|
||||
:key="index">
|
||||
<view class="item acea-row row-between-wrapper" @click='goPay(item.number || 0 , item.value)'
|
||||
v-for="(item,index) in payMode" :key="index">
|
||||
<view class="left acea-row row-between-wrapper">
|
||||
<view class="iconfont" :class="item.icon"></view>
|
||||
<view class="text">
|
||||
@@ -26,8 +26,12 @@
|
||||
<script>
|
||||
import {
|
||||
orderPay,
|
||||
wechatOrderPay
|
||||
wechatOrderPay,
|
||||
wechatQueryPayResult
|
||||
} from '@/api/order.js';
|
||||
import {
|
||||
mapGetters
|
||||
} from "vuex";
|
||||
export default {
|
||||
props: {
|
||||
payMode: {
|
||||
@@ -54,6 +58,7 @@
|
||||
|
||||
};
|
||||
},
|
||||
computed: mapGetters(['systemPlatform']),
|
||||
methods: {
|
||||
close: function() {
|
||||
this.$emit('onChangeFun', {
|
||||
@@ -71,18 +76,19 @@
|
||||
});
|
||||
uni.showLoading({
|
||||
title: '支付中'
|
||||
});
|
||||
});
|
||||
wechatOrderPay({
|
||||
orderNo: that.order_id,
|
||||
// #ifdef MP
|
||||
payChannel: 'routine',
|
||||
// #endif
|
||||
// #ifdef H5 || APP-PLUS
|
||||
// #ifdef H5
|
||||
payChannel: that.$wechat.isWeixin() ? 'public' : 'weixinh5',
|
||||
// #endif
|
||||
payType: paytype
|
||||
}).then(res => {
|
||||
let jsConfig = res.data.jsConfig;
|
||||
that.order_id = res.data.orderNo;
|
||||
switch (res.data.payType) {
|
||||
case 'weixin':
|
||||
// #ifdef MP
|
||||
@@ -94,14 +100,22 @@
|
||||
paySign: jsConfig.paySign,
|
||||
success: function(ress) {
|
||||
uni.hideLoading();
|
||||
return that.$util.Tips({
|
||||
title: '支付成功',
|
||||
icon: 'success'
|
||||
}, () => {
|
||||
that.$emit('onChangeFun', {
|
||||
action: 'pay_complete'
|
||||
wechatQueryPayResult(that.order_id).then(res => {
|
||||
uni.hideLoading();
|
||||
return that.$util.Tips({
|
||||
title: "支付成功",
|
||||
icon: 'success'
|
||||
}, () => {
|
||||
that.$emit('onChangeFun', {
|
||||
action: 'pay_complete'
|
||||
});
|
||||
});
|
||||
});
|
||||
}).cache(err => {
|
||||
uni.hideLoading();
|
||||
return that.$util.Tips({
|
||||
title: err
|
||||
});
|
||||
})
|
||||
},
|
||||
fail: function(e) {
|
||||
uni.hideLoading();
|
||||
@@ -115,13 +129,14 @@
|
||||
},
|
||||
complete: function(e) {
|
||||
uni.hideLoading();
|
||||
if (e.errMsg == 'requestPayment:cancel') return that.$util.Tips({
|
||||
title: '取消支付'
|
||||
}, () => {
|
||||
that.$emit('onChangeFun', {
|
||||
action: 'pay_fail'
|
||||
if (e.errMsg == 'requestPayment:cancel') return that.$util
|
||||
.Tips({
|
||||
title: '取消支付'
|
||||
}, () => {
|
||||
that.$emit('onChangeFun', {
|
||||
action: 'pay_fail'
|
||||
});
|
||||
});
|
||||
});
|
||||
},
|
||||
})
|
||||
// #endif
|
||||
@@ -135,13 +150,13 @@
|
||||
};
|
||||
that.$wechat.pay(datas).then(res => {
|
||||
if (res.errMsg == 'chooseWXPay:cancel') {
|
||||
uni.hideLoading();
|
||||
return that.$util.Tips({
|
||||
title: '支付失败'
|
||||
});
|
||||
} else {
|
||||
wechatQueryPayResult({
|
||||
orderNo: that.order_id
|
||||
}).then(res => {
|
||||
wechatQueryPayResult(that.order_id).then(res => {
|
||||
uni.hideLoading();
|
||||
return that.$util.Tips({
|
||||
title: "支付成功",
|
||||
icon: 'success'
|
||||
@@ -150,13 +165,19 @@
|
||||
action: 'pay_complete'
|
||||
});
|
||||
});
|
||||
}).cache(errW => {
|
||||
}).cache(err => {
|
||||
uni.hideLoading();
|
||||
return that.$util.Tips({
|
||||
title: errW
|
||||
title: err
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
}).cache(errW => {
|
||||
uni.hideLoading();
|
||||
return that.$util.Tips({
|
||||
title: errW
|
||||
});
|
||||
})
|
||||
// #endif
|
||||
break;
|
||||
@@ -171,18 +192,19 @@
|
||||
});
|
||||
});
|
||||
break;
|
||||
case 'weixinh5':
|
||||
uni.hideLoading();
|
||||
location.replace(jsConfig.mwebUrl + '&redirect_url=' + window.location.protocol + '//' + window.location.host + goPages + '&status=1');
|
||||
return that.$util.Tips({
|
||||
title: "支付中",
|
||||
icon: 'success'
|
||||
}, () => {
|
||||
that.$emit('onChangeFun', {
|
||||
action: 'pay_complete'
|
||||
});
|
||||
});
|
||||
break;
|
||||
case 'weixinh5':
|
||||
uni.hideLoading();
|
||||
location.replace(jsConfig.mwebUrl + '&redirect_url=' + window.location.protocol +
|
||||
'//' + window.location.host + goPages + '&status=1');
|
||||
return that.$util.Tips({
|
||||
title: "支付中",
|
||||
icon: 'success'
|
||||
}, () => {
|
||||
that.$emit('onChangeFun', {
|
||||
action: 'pay_complete'
|
||||
});
|
||||
});
|
||||
break;
|
||||
}
|
||||
}).catch(err => {
|
||||
uni.hideLoading();
|
||||
|
||||
@@ -1,89 +1,149 @@
|
||||
<template>
|
||||
<!-- <view class='product-bg'>
|
||||
<swiper :indicator-dots="indicatorDots"
|
||||
:autoplay="autoplay" :circular="circular" :interval="interval" :duration="duration" @change="change">
|
||||
<block v-for="(item,index) in imgUrls" :key="index">
|
||||
<swiper-item>
|
||||
<image :src="item" class="slide-image"/>
|
||||
|
||||
</swiper-item>
|
||||
</block>
|
||||
</swiper>
|
||||
<view class='pages'>{{currents}}/{{imgUrls.length || 1}}</view>
|
||||
</view> -->
|
||||
<view class='product-bg'>
|
||||
<swiper :indicator-dots="indicatorDots" indicator-active-color="#e93323"
|
||||
:autoplay="autoplay" :circular="circular" :interval="interval" :duration="duration" @change="change">
|
||||
<swiper-item v-if="videoline">
|
||||
<view class="item">
|
||||
<video id="myVideo" :src='videoline' objectFit="cover" controls style="width:100%;height:100% " show-center-play-btn show-mute-btn="true" auto-pause-if-navigate :custom-cache="false"></video>
|
||||
<view class="poster" v-if="controls">
|
||||
<image class="image" :src="imgUrls[0]"></image>
|
||||
</view>
|
||||
<view class="stop" v-if="controls" @tap="bindPause">
|
||||
<image class="image" src="../../static/images/stop.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
</swiper-item>
|
||||
<block v-for="(item,index) in imgUrls" :key='index'>
|
||||
<swiper-item>
|
||||
<image :src="item" class="slide-image"/>
|
||||
</swiper-item>
|
||||
</block>
|
||||
</swiper>
|
||||
</view>
|
||||
<view class='product-bg'>
|
||||
<swiper :indicator-dots="indicatorDots" indicator-active-color="#e93323" :autoplay="autoplay"
|
||||
:circular="circular" :interval="interval" :duration="duration" @change="change">
|
||||
|
||||
<swiper-item v-if="videoline">
|
||||
<view class="item">
|
||||
<view v-show="!controls" style="width:100%;height:100% ">
|
||||
<video id="myVideo" :src='videoline' objectFit="cover" controls style="width:100%;height:100% "
|
||||
show-center-play-btn show-mute-btn="true" auto-pause-if-navigate :custom-cache="false"
|
||||
:enable-progress-gesture="false" :poster="imgUrls[0]" @pause="videoPause"></video>
|
||||
</view>
|
||||
<view class="poster" v-show="controls">
|
||||
<image class="image" :src="imgUrls[0]"></image>
|
||||
</view>
|
||||
<view class="stop" v-show="controls" @tap="bindPause">
|
||||
<image class="image" src="../../static/images/stop.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
</swiper-item>
|
||||
|
||||
<block v-for="(item,index) in imgUrls" :key='index'>
|
||||
<swiper-item>
|
||||
<image :src="item" class="slide-image" />
|
||||
</swiper-item>
|
||||
</block>
|
||||
</swiper>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
imgUrls: {
|
||||
type: Array,
|
||||
default: function(){
|
||||
return [];
|
||||
}
|
||||
},
|
||||
videoline:
|
||||
{
|
||||
type:String,
|
||||
value:""
|
||||
}
|
||||
imgUrls: {
|
||||
type: Array,
|
||||
default: function() {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
videoline: {
|
||||
type: String,
|
||||
value: ""
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
indicatorDots: true,
|
||||
circular: true,
|
||||
autoplay: false,
|
||||
interval: 3000,
|
||||
duration: 500,
|
||||
currents: "1",
|
||||
controls:true
|
||||
indicatorDots: true,
|
||||
circular: true,
|
||||
autoplay: true,
|
||||
interval: 3000,
|
||||
duration: 500,
|
||||
currents: "1",
|
||||
controls: true,
|
||||
isPlay:true,
|
||||
videoContext:''
|
||||
};
|
||||
},
|
||||
mounted(){
|
||||
//this.videoContext = uni.createVideoContext('myVideo',this);
|
||||
mounted() {
|
||||
if(this.videoline){
|
||||
this.imgUrls.shift()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
bindPause:function(){
|
||||
this.videoContext.play();
|
||||
this.$set(this,'controls',false)
|
||||
},
|
||||
change: function (e) {
|
||||
this.$set(this,'currents',e.detail.current + 1);
|
||||
}
|
||||
videoPause(e){
|
||||
},
|
||||
bindPause: function() {
|
||||
this.videoContext.play();
|
||||
this.$set(this, 'controls', false)
|
||||
this.autoplay = false
|
||||
},
|
||||
change: function(e) {
|
||||
this.$set(this, 'currents', e.detail.current + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.product-bg{width:100%;height:750rpx;position:relative;}
|
||||
.product-bg swiper{width:100%;height:100%;position:relative;}
|
||||
.product-bg .slide-image{width:100%;height:100%;}
|
||||
.product-bg .pages{position:absolute;background-color:#fff;height:34rpx;padding:0 10rpx;border-radius:3rpx;right:30rpx;bottom:30rpx;line-height:34rpx;font-size:24rpx;color:#050505;}
|
||||
#myVideo{width: 100%;height: 100%}
|
||||
.product-bg .item{position:relative;width:100%;height:100%;}
|
||||
.product-bg .item .poster{position:absolute;top:0;left:0;height:750rpx;width:100%;z-index:9;}
|
||||
.product-bg .item .poster .image{width:100%;height:100%;}
|
||||
.product-bg .item .stop{position:absolute;top:50%;left:50%;width:136rpx;height:136rpx;margin-top:-68rpx;margin-left:-68rpx;z-index:9;}
|
||||
.product-bg .item .stop .image{width:100%;height:100%;}
|
||||
.product-bg {
|
||||
width: 100%;
|
||||
height: 750rpx;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.product-bg swiper {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.product-bg .slide-image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.product-bg .pages {
|
||||
position: absolute;
|
||||
background-color: #fff;
|
||||
height: 34rpx;
|
||||
padding: 0 10rpx;
|
||||
border-radius: 3rpx;
|
||||
right: 30rpx;
|
||||
bottom: 30rpx;
|
||||
line-height: 34rpx;
|
||||
font-size: 24rpx;
|
||||
color: #050505;
|
||||
}
|
||||
|
||||
#myVideo {
|
||||
width: 100%;
|
||||
height: 100%
|
||||
}
|
||||
|
||||
.product-bg .item {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.product-bg .item .poster {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 750rpx;
|
||||
width: 100%;
|
||||
z-index: 9;
|
||||
}
|
||||
|
||||
.product-bg .item .poster .image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.product-bg .item .stop {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: 136rpx;
|
||||
height: 136rpx;
|
||||
margin-top: -68rpx;
|
||||
margin-left: -68rpx;
|
||||
z-index: 9;
|
||||
}
|
||||
|
||||
.product-bg .item .stop .image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="product-window" :class="(attr.cartAttr === true ? 'on' : '') + ' ' + (iSbnt?'join':'') + ' ' + (iScart?'joinCart':'')">
|
||||
<view class="product-window"
|
||||
:class="(attr.cartAttr === true ? 'on' : '') + ' ' + (iSbnt?'join':'') + ' ' + (iScart?'joinCart':'')">
|
||||
<view class="textpic acea-row row-between-wrapper">
|
||||
<view class="pictrue">
|
||||
<image :src="attr.productSelect.image"></image>
|
||||
@@ -12,7 +13,7 @@
|
||||
<view class="money font-color">
|
||||
¥<text class="num">{{ attr.productSelect.price }}</text>
|
||||
<text class="stock" v-if='isShow'>库存: {{ attr.productSelect.stock }}</text>
|
||||
<text class='stock' v-if="limitNum">限量: {{attr.productSelect.quotaShow}}</text>
|
||||
<text class='stock' v-if="limitNum">限量: {{attr.productSelect.quota}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="iconfont icon-guanbi" @click="closeAttr"></view>
|
||||
@@ -22,9 +23,10 @@
|
||||
<view class="item" v-for="(item, indexw) in attr.productAttr" :key="indexw">
|
||||
<view class="title">{{ item.attrName }}</view>
|
||||
<view class="listn acea-row row-middle">
|
||||
<view class="itemn" :class="item.index === itemn.attr ? 'on' : ''" v-for="(itemn, indexn) in item.attrValue"
|
||||
@click="tapAttr(indexw, indexn)" :key="indexn">
|
||||
{{ itemn.attr }}
|
||||
<view class="itemn" :class="item.index === itemn ? 'on' : ''"
|
||||
v-for="(itemn, indexn) in item.attrValues" @click="tapAttr(indexw, indexn)"
|
||||
:key="indexn">
|
||||
{{ itemn }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -32,26 +34,32 @@
|
||||
<view class="cart acea-row row-between-wrapper">
|
||||
<view class="title">数量</view>
|
||||
<view class="carnum acea-row row-left">
|
||||
<view class="item reduce" :class="attr.productSelect.cart_num <= 1 ? 'on' : ''" @click="CartNumDes">
|
||||
<view class="item reduce" :class="attr.productSelect.cart_num <= 1 ? 'on' : ''"
|
||||
@click="CartNumDes">
|
||||
-
|
||||
</view>
|
||||
<view class='item num'>
|
||||
<input type="number" v-model="attr.productSelect.cart_num" data-name="productSelect.cart_num" @input="bindCode(attr.productSelect.cart_num)"></input>
|
||||
<input type="number" v-model="attr.productSelect.cart_num"
|
||||
data-name="productSelect.cart_num"
|
||||
@input="bindCode(attr.productSelect.cart_num)"></input>
|
||||
</view>
|
||||
<view v-if="iSplus" class="item plus" :class="
|
||||
attr.productSelect.cart_num >= attr.productSelect.stock
|
||||
? 'on'
|
||||
: ''
|
||||
"
|
||||
@click="CartNumAdd">
|
||||
" @click="CartNumAdd">
|
||||
+
|
||||
</view>
|
||||
<view v-else class='item plus' :class='(attr.productSelect.cart_num >= attr.productSelect.quota) || (attr.productSelect.cart_num >= attr.productSelect.stock) || (attr.productSelect.cart_num >= attr.productSelect.num)? "on":""' @click='CartNumAdd'>+</view>
|
||||
<view v-else class='item plus'
|
||||
:class='(attr.productSelect.cart_num >= attr.productSelect.quota) || (attr.productSelect.cart_num >= attr.productSelect.stock) || (attr.productSelect.cart_num >= attr.productSelect.num)? "on":""'
|
||||
@click='CartNumAdd'>+</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="joinBnt bg-color" v-if="iSbnt && attr.productSelect.stock>0 &&attr.productSelect.quota>0" @click="goCat">我要参团</view>
|
||||
<view class="joinBnt on" v-else-if="(iSbnt && attr.productSelect.quota<=0)||(iSbnt &&attr.productSelect.stock<=0)">已售罄</view>
|
||||
<view class="joinBnt bg-color" v-if="iSbnt && attr.productSelect.stock>0 &&attr.productSelect.quota>0"
|
||||
@click="goCat">我要参团</view>
|
||||
<view class="joinBnt on"
|
||||
v-else-if="(iSbnt && attr.productSelect.quota<=0)||(iSbnt &&attr.productSelect.stock<=0)">已售罄</view>
|
||||
<view class="joinBnt bg-color" v-if="iScart && attr.productSelect.stock" @click="goCat">确定</view>
|
||||
<!-- <view class="joinBnt bg-color" v-if="iSbnt && attr.productSelect.stock && attr.productSelect.quota" @click="goCat">确定</view> -->
|
||||
<view class="joinBnt on" v-else-if="(iScart && !attr.productSelect.stock)">已售罄</view>
|
||||
@@ -68,43 +76,42 @@
|
||||
type: Object,
|
||||
default: () => {}
|
||||
},
|
||||
limitNum:{
|
||||
type: Number,
|
||||
value: 0
|
||||
},
|
||||
isShow:{
|
||||
type: Number,
|
||||
value: 0
|
||||
},
|
||||
iSbnt:{
|
||||
type:Number,
|
||||
value:0
|
||||
},
|
||||
iSplus:{
|
||||
type:Number,
|
||||
value:0
|
||||
},
|
||||
iScart:{
|
||||
type:Number,
|
||||
value:0
|
||||
}
|
||||
limitNum: {
|
||||
type: Number,
|
||||
value: 0
|
||||
},
|
||||
isShow: {
|
||||
type: Number,
|
||||
value: 0
|
||||
},
|
||||
iSbnt: {
|
||||
type: Number,
|
||||
value: 0
|
||||
},
|
||||
iSplus: {
|
||||
type: Number,
|
||||
value: 0
|
||||
},
|
||||
iScart: {
|
||||
type: Number,
|
||||
value: 0
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
goCat:function(){
|
||||
this.$emit('goCat');
|
||||
},
|
||||
/**
|
||||
* 购物车手动输入数量
|
||||
*
|
||||
*/
|
||||
bindCode: function (e) {
|
||||
this.$emit('iptCartNum', this.attr.productSelect.cart_num);
|
||||
},
|
||||
goCat: function() {
|
||||
this.$emit('goCat');
|
||||
},
|
||||
/**
|
||||
* 购物车手动输入数量
|
||||
*
|
||||
*/
|
||||
bindCode: function(e) {
|
||||
this.$emit('iptCartNum', this.attr.productSelect.cart_num);
|
||||
},
|
||||
closeAttr: function() {
|
||||
this.$emit('myevent');
|
||||
},
|
||||
@@ -158,55 +165,57 @@
|
||||
transform: translate3d(0, 100%, 0);
|
||||
transition: all .3s cubic-bezier(.25, .5, .5, .9);
|
||||
}
|
||||
|
||||
|
||||
.product-window.on {
|
||||
transform: translate3d(0, 0, 0);
|
||||
}
|
||||
|
||||
.product-window.join{padding-bottom: 30rpx;}
|
||||
|
||||
.product-window.joinCart{
|
||||
|
||||
.product-window.join {
|
||||
padding-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.product-window.joinCart {
|
||||
padding-bottom: 30rpx;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
|
||||
.product-window .textpic {
|
||||
padding: 0 130rpx 0 30rpx;
|
||||
margin-top: 29rpx;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
|
||||
.product-window .textpic .pictrue {
|
||||
width: 150rpx;
|
||||
height: 150rpx;
|
||||
}
|
||||
|
||||
|
||||
.product-window .textpic .pictrue image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
|
||||
|
||||
.product-window .textpic .text {
|
||||
width: 410rpx;
|
||||
font-size: 32rpx;
|
||||
color: #202020;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
|
||||
.product-window .textpic .text .money {
|
||||
font-size: 24rpx;
|
||||
margin-top: 40rpx;
|
||||
}
|
||||
|
||||
|
||||
.product-window .textpic .text .money .num {
|
||||
font-size: 36rpx;
|
||||
}
|
||||
|
||||
|
||||
.product-window .textpic .text .money .stock {
|
||||
color: #999;
|
||||
margin-left: 18rpx;
|
||||
}
|
||||
|
||||
|
||||
.product-window .textpic .iconfont {
|
||||
position: absolute;
|
||||
right: 30rpx;
|
||||
@@ -214,63 +223,63 @@
|
||||
font-size: 35rpx;
|
||||
color: #8a8a8a;
|
||||
}
|
||||
|
||||
.product-window .rollTop{
|
||||
|
||||
.product-window .rollTop {
|
||||
max-height: 500rpx;
|
||||
overflow: auto;
|
||||
margin-top: 36rpx;
|
||||
}
|
||||
|
||||
|
||||
.product-window .productWinList .item~.item {
|
||||
margin-top: 36rpx;
|
||||
}
|
||||
|
||||
|
||||
.product-window .productWinList .item .title {
|
||||
font-size: 30rpx;
|
||||
color: #999;
|
||||
padding: 0 30rpx;
|
||||
}
|
||||
|
||||
|
||||
.product-window .productWinList .item .listn {
|
||||
padding: 0 30rpx 0 16rpx;
|
||||
}
|
||||
|
||||
|
||||
.product-window .productWinList .item .listn .itemn {
|
||||
border: 1px solid #F2F2F2;
|
||||
font-size: 26rpx;
|
||||
color: #282828;
|
||||
padding: 7rpx 33rpx;
|
||||
border-radius: 25rpx;
|
||||
border-radius: 40rpx;
|
||||
margin: 20rpx 0 0 14rpx;
|
||||
background-color: #F2F2F2;
|
||||
}
|
||||
|
||||
|
||||
.product-window .productWinList .item .listn .itemn.on {
|
||||
color: #E93323;
|
||||
background:rgba(255,244,243,1);
|
||||
border-color: #E93323;
|
||||
color: $theme-color;
|
||||
background: rgba(255, 244, 243, 1);
|
||||
border-color: $theme-color;
|
||||
}
|
||||
|
||||
|
||||
.product-window .productWinList .item .listn .itemn.limit {
|
||||
color: #999;
|
||||
text-decoration:line-through;
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
|
||||
.product-window .cart {
|
||||
margin-top: 36rpx;
|
||||
padding: 0 30rpx;
|
||||
}
|
||||
|
||||
|
||||
.product-window .cart .title {
|
||||
font-size: 30rpx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
|
||||
.product-window .cart .carnum {
|
||||
height: 54rpx;
|
||||
margin-top: 24rpx;
|
||||
}
|
||||
|
||||
|
||||
.product-window .cart .carnum view {
|
||||
// border: 1px solid #a4a4a4;
|
||||
width: 84rpx;
|
||||
@@ -280,35 +289,56 @@
|
||||
color: #282828;
|
||||
font-size: 45rpx;
|
||||
}
|
||||
|
||||
|
||||
.product-window .cart .carnum .reduce {
|
||||
border-right: 0;
|
||||
border-radius: 6rpx 0 0 6rpx;
|
||||
line-height: 48rpx;
|
||||
}
|
||||
|
||||
|
||||
.product-window .cart .carnum .reduce.on {
|
||||
// border-color: #e3e3e3;
|
||||
color: #DEDEDE;
|
||||
font-size: 60rpx;
|
||||
font-size: 44rpx;
|
||||
}
|
||||
|
||||
|
||||
.product-window .cart .carnum .plus {
|
||||
border-left: 0;
|
||||
border-radius: 0 6rpx 6rpx 0;
|
||||
line-height: 46rpx;
|
||||
}
|
||||
|
||||
|
||||
.product-window .cart .carnum .plus.on {
|
||||
border-color: #e3e3e3;
|
||||
color: #dedede;
|
||||
}
|
||||
|
||||
|
||||
.product-window .cart .carnum .num {
|
||||
background:rgba(242,242,242,1);
|
||||
background: rgba(242, 242, 242, 1);
|
||||
color: #282828;
|
||||
font-size: 28rpx;
|
||||
border-radius: 12rpx;
|
||||
line-height: 29px;
|
||||
height: 54rpx;
|
||||
|
||||
input {
|
||||
display: -webkit-inline-box;
|
||||
}
|
||||
}
|
||||
.product-window .joinBnt{font-size: 30rpx;width: 620rpx;height: 86rpx;border-radius: 50rpx;text-align: center;line-height: 86rpx;color: #fff;margin: 21rpx auto 0 auto;}
|
||||
.product-window .joinBnt.on{background-color:#bbb;color:#fff;}
|
||||
</style>
|
||||
|
||||
.product-window .joinBnt {
|
||||
font-size: 30rpx;
|
||||
width: 620rpx;
|
||||
height: 86rpx;
|
||||
border-radius: 50rpx;
|
||||
text-align: center;
|
||||
line-height: 86rpx;
|
||||
color: #fff;
|
||||
margin: 21rpx auto 0 auto;
|
||||
}
|
||||
|
||||
.product-window .joinBnt.on {
|
||||
background-color: #bbb;
|
||||
color: #fff;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -58,6 +58,7 @@
|
||||
|
||||
.recommend .title {
|
||||
height: 135rpx;
|
||||
line-height: 135rpx;
|
||||
font-size: 28rpx;
|
||||
color: #282828;
|
||||
}
|
||||
@@ -96,7 +97,7 @@
|
||||
.recommend .recommendList .item .pictrue image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 6rpx;
|
||||
border-radius: 14rpx;
|
||||
}
|
||||
|
||||
.recommend .recommendList .item .name {
|
||||
@@ -108,6 +109,7 @@
|
||||
.recommend .recommendList .item .money {
|
||||
font-size: 20rpx;
|
||||
margin-top: 8rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.recommend .recommendList .item .money .num {
|
||||
|
||||
@@ -48,5 +48,5 @@
|
||||
.swiper swiper .slide-image{width:100%;height:100%;}
|
||||
.swiper .dots{position:absolute;right:40rpx;bottom:20rpx;}
|
||||
.swiper .dots .dot{width:12rpx;height:12rpx;border:2rpx solid #fff;border-radius:50%;margin-right:15rpx;}
|
||||
.swiper .dots .dot.active{border-color:#e93323;background-color:#e93323;}
|
||||
.swiper .dots .dot.active{border-color:$theme-color;background-color:$theme-color;}
|
||||
</style>
|
||||
|
||||
@@ -1,33 +1,36 @@
|
||||
<template>
|
||||
<!-- v-if="reply.length>0" -->
|
||||
<view class="evaluateWtapper">
|
||||
<view class="evaluateItem" v-for="(item, indexw) in reply" :key="indexw">
|
||||
<view class="pic-text acea-row row-middle">
|
||||
<view class="pic-text acea-row">
|
||||
<view class="pictrue">
|
||||
<image :src="item.avatar"></image>
|
||||
</view>
|
||||
<view class="acea-row row-between-wrapper" style="width: 87%;">
|
||||
<view class="acea-row row-middle">
|
||||
<view class="name line1">{{ item.nickname }}</view>
|
||||
<view class="start" :class="'star' + item.productScore"></view>
|
||||
<view class="content">
|
||||
<view>
|
||||
<view class="acea-row row-between">
|
||||
<view class="acea-row">
|
||||
<view class="name line1">{{ item.nickname }}</view>
|
||||
<view class="start" :class="'star' + item.score"></view>
|
||||
</view>
|
||||
<view class="time">{{ item.createTime }}</view>
|
||||
</view>
|
||||
<view class="sku">规格:{{ item.sku?item.sku:'无' }}</view>
|
||||
</view>
|
||||
|
||||
<view class="evaluate-infor">{{ item.comment }}</view>
|
||||
<view class="imgList acea-row" v-if="item.pics && item.pics.length && item.pics[0]">
|
||||
<view class="pictrue" v-for="(itemn, indexn) in item.pics" :key="indexn">
|
||||
<image :src="itemn" class="image" @click='getpreviewImage(indexw, indexn)'></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="reply" v-if="item.merchantReplyContent">
|
||||
<text class="font-color">店小二</text>:{{ item.merchantReplyContent }}
|
||||
</view>
|
||||
<view class="time">{{ item.createTime }}</view>
|
||||
<!-- <view class="time">{{ item.createTime }}</view>
|
||||
<view class="time">{{ item.suk }}</view> -->
|
||||
<!-- <view class="time">{{ item.createTime }} {{ item.sku }}</view> -->
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="time">规格:{{ item.sku?item.sku:'无' }}</view>
|
||||
<view class="evaluate-infor">{{ item.comment }}</view>
|
||||
<view class="imgList acea-row" v-if="item.pics.length && item.pics[0]">
|
||||
<view class="pictrue" v-for="(itemn, indexn) in item.pics" :key="indexn">
|
||||
<image :src="itemn" class="image" @click='getpreviewImage(indexw, indexn)'></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="reply" v-if="item.merchantReplyContent">
|
||||
<text class="font-color">店小二</text>:{{
|
||||
item.merchantReplyContent
|
||||
}}
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -55,7 +58,9 @@
|
||||
<style scoped lang='scss'>
|
||||
.evaluateWtapper .evaluateItem {
|
||||
background-color: #fff;
|
||||
padding-bottom: 25rpx;
|
||||
padding: 24rpx;
|
||||
border-bottom-left-radius: 14rpx;
|
||||
border-bottom-right-radius: 14rpx;
|
||||
}
|
||||
|
||||
.evaluateWtapper .evaluateItem~.evaluateItem {
|
||||
@@ -65,14 +70,15 @@
|
||||
.evaluateWtapper .evaluateItem .pic-text {
|
||||
font-size: 26rpx;
|
||||
color: #282828;
|
||||
height: 95rpx;
|
||||
padding: 0 30rpx;
|
||||
.content{
|
||||
width: 84%;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.evaluateWtapper .evaluateItem .pic-text .pictrue {
|
||||
width: 56rpx;
|
||||
height: 56rpx;
|
||||
margin-right: 20rpx;
|
||||
width: 62rpx;
|
||||
height: 62rpx;
|
||||
}
|
||||
|
||||
.evaluateWtapper .evaluateItem .pic-text .pictrue image {
|
||||
@@ -87,40 +93,47 @@
|
||||
|
||||
.evaluateWtapper .evaluateItem .time {
|
||||
font-size: 24rpx;
|
||||
color: #82848f;
|
||||
padding: 0 30rpx;
|
||||
color: #999999;
|
||||
|
||||
}
|
||||
.sku{
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
margin: 10rpx 0;
|
||||
}
|
||||
|
||||
.evaluateWtapper .evaluateItem .evaluate-infor {
|
||||
font-size: 28rpx;
|
||||
color: #282828;
|
||||
margin-top: 19rpx;
|
||||
padding: 0 30rpx;
|
||||
color: #333;
|
||||
margin-bottom: 14rpx;
|
||||
}
|
||||
|
||||
.evaluateWtapper .evaluateItem .imgList {
|
||||
padding: 0 30rpx 0 15rpx;
|
||||
margin-top: 25rpx;
|
||||
.evaluateWtapper .evaluateItem .imgList {/*
|
||||
padding: 0 24rpx;
|
||||
margin-top: 16rpx; */
|
||||
}
|
||||
|
||||
.evaluateWtapper .evaluateItem .imgList .pictrue {
|
||||
width: 156rpx;
|
||||
height: 156rpx;
|
||||
margin: 0 0 15rpx 15rpx;
|
||||
width: 102rpx;
|
||||
height: 102rpx;
|
||||
margin-right: 14rpx;
|
||||
border-radius: 14rpx;
|
||||
margin-bottom: 16rpx;
|
||||
/* margin: 0 0 15rpx 15rpx; */
|
||||
}
|
||||
|
||||
.evaluateWtapper .evaluateItem .imgList .pictrue image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #f7f7f7;
|
||||
border-radius: 14rpx;
|
||||
}
|
||||
|
||||
.evaluateWtapper .evaluateItem .reply {
|
||||
font-size: 26rpx;
|
||||
color: #454545;
|
||||
background-color: #f7f7f7;
|
||||
border-radius: 5rpx;
|
||||
margin: 20rpx 30rpx 0 30rpx;
|
||||
border-radius: 14rpx;
|
||||
margin: 20rpx 30rpx 0 0rpx;
|
||||
padding: 20rpx;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user