Browse Source

Merge branch 'master' of ssh://8.134.10.79:222/Leadfyy.co/ec.uniapp-master

master
邓平艺 4 years ago
parent
commit
305fbea82e
  1. 6
      manifest.json
  2. 5
      pages/business/order/list.vue
  3. 10
      pages/index/activity/confirm.vue
  4. 12
      pages/index/index/index.vue
  5. 2
      pages/index/onlineMall/onlineMall.vue
  6. 77
      pages/order/cashier/cashier.vue
  7. 12
      pages/order/confirm/confirm.vue
  8. 11
      pages/order/pointconfirm/confirm.vue
  9. 2
      pages/user/my/center.vue
  10. 78
      uview-ui/components/u-column-notice/u-column-notice.vue
  11. 2
      uview-ui/components/u-notice-bar/u-notice-bar.vue

6
manifest.json

@ -124,6 +124,12 @@
}, },
"usingComponents" : true, "usingComponents" : true,
"permission" : {} "permission" : {}
// "plugins" : {
// "live-player-plugin" : {
// "version" : "1.3.2", //
// "provider" : "wx2b03c6e691cd7370" //appid
// }
// }
}, },
"mp-alipay" : { "mp-alipay" : {
"usingComponents" : true "usingComponents" : true

5
pages/business/order/list.vue

@ -21,6 +21,7 @@
<view class="lf-font-26 lf-color-333 lf-line-2">{{ item.items[0].item_name }}</view> <view class="lf-font-26 lf-color-333 lf-line-2">{{ item.items[0].item_name }}</view>
<view class="lf-row-between" style="line-height: 1;"> <view class="lf-row-between" style="line-height: 1;">
<text class="lf-font-24 lf-color-777">{{ item.count }}{{ item.items[0].item_meta.specs_text }}</text> <text class="lf-font-24 lf-color-777">{{ item.count }}{{ item.items[0].item_meta.specs_text }}</text>
<!-- <text class="lf-font-32 lf-font-bold" style="color: #F63434;" v-if="item.payment != null">¥{{ item.payment.amount_yuan }}</text> -->
<text class="lf-font-32 lf-font-bold" style="color: #F63434;">¥{{ item.payment.amount_yuan || item.total }}</text> <text class="lf-font-32 lf-font-bold" style="color: #F63434;">¥{{ item.payment.amount_yuan || item.total }}</text>
</view> </view>
</view> </view>
@ -28,7 +29,7 @@
<view class="order-num"> <view class="order-num">
<view class="deliver" v-if="item.status_text == '待发货'" @click="deliver(item.order_no)">发货</view> <view class="deliver" v-if="item.status_text == '待发货'" @click="deliver(item.order_no)">发货</view>
<view v-else>{{ item.status_text }}</view> <view v-else>{{ item.status_text }}</view>
<view style="color: #F63434;" @click="removeOrder(item.order_no, tab_index, index)">删除订单</view>
<view style="color: #F63434;" @click="removeOrder(item.order_no, tab_index, index)">取消订单</view>
</view> </view>
</view> </view>
<lf-nocontent src="/static/images/empty.png" v-if="tab_item.list.length <= 0"></lf-nocontent> <lf-nocontent src="/static/images/empty.png" v-if="tab_item.list.length <= 0"></lf-nocontent>
@ -213,7 +214,7 @@
removeOrder(order_no, parentIndex, childIndex){ removeOrder(order_no, parentIndex, childIndex){
uni.showModal({ uni.showModal({
title: '温馨提示', title: '温馨提示',
content: '确定删除该订单吗?',
content: '确定取消该订单吗?',
success: result => { success: result => {
if(result.confirm){ if(result.confirm){
this.$http.post({ this.$http.post({

10
pages/index/activity/confirm.vue

@ -22,7 +22,8 @@
return { return {
name: '', name: '',
phone: '', phone: '',
activity_id: 0
activity_id: 0,
clickContinue: true
} }
}, },
onLoad(e){ onLoad(e){
@ -31,6 +32,8 @@
}, },
methods: { methods: {
confirm(){ confirm(){
if(this.clickContinue == true) {
this.clickContinue = false;
if(!this.name || !this.phone) return this.$msg('请将信息补充完整'); if(!this.name || !this.phone) return this.$msg('请将信息补充完整');
this.$http this.$http
@ -48,10 +51,12 @@
.then(res => { .then(res => {
if (res.data.code == 200) { if (res.data.code == 200) {
if (res.data.status) { if (res.data.status) {
this.clickContinue = true;
this.$msg('报名成功').then(() => { this.$msg('报名成功').then(() => {
this.$toBack(); this.$toBack();
}) })
} else { } else {
this.clickContinue = true;
wx.showModal({ wx.showModal({
content: res.data.message || '人数爆满,请稍后重试!', content: res.data.message || '人数爆满,请稍后重试!',
showCancel: false, showCancel: false,
@ -61,6 +66,7 @@
}); });
} }
} else { } else {
this.clickContinue = true;
wx.showModal({ wx.showModal({
content: res.data.message || '人数爆满,请稍后重试!', content: res.data.message || '人数爆满,请稍后重试!',
showCancel: false, showCancel: false,
@ -72,6 +78,7 @@
wx.hideLoading(); wx.hideLoading();
}) })
.catch(() => { .catch(() => {
this.clickContinue = true;
wx.hideLoading(); wx.hideLoading();
wx.showModal({ wx.showModal({
content: '请求失败', content: '请求失败',
@ -81,6 +88,7 @@
} }
} }
} }
}
</script> </script>
<style lang="scss" scoped="scoped"> <style lang="scss" scoped="scoped">

12
pages/index/index/index.vue

@ -28,8 +28,9 @@
<!-- 今日头条 --> <!-- 今日头条 -->
<view class="fuwu-tips" v-if="item.name == 'micro_page_componet_article_-' || item.name == 'micro_page_componet_article_|'"> <view class="fuwu-tips" v-if="item.name == 'micro_page_componet_article_-' || item.name == 'micro_page_componet_article_|'">
<view class="fuwu-tips-title">今日头条</view> <view class="fuwu-tips-title">今日头条</view>
<view>
<text class="fuwu-tips-desc1">{{ item.title }}</text>
<view style="width: 100%;height: 100%;">
<!-- <text class="fuwu-tips-desc1">{{ item.title }}</text> -->
<u-notice-bar type="none" :volume-icon="false" mode="vertical" :list="item.value"></u-notice-bar>
<!-- <text class="fuwu-tips-desc1">线上商城全场限时包邮</text> <!-- <text class="fuwu-tips-desc1">线上商城全场限时包邮</text>
<text class="fuwu-tips-desc2">(部分品牌满额包邮)</text> --> <text class="fuwu-tips-desc2">(部分品牌满额包邮)</text> -->
</view> </view>
@ -73,7 +74,7 @@
</view> </view>
<!-- 悬浮购物车入口 --> <!-- 悬浮购物车入口 -->
<view class="fixed-right"> <view class="fixed-right">
<view class="fixed-cart fixed-live" hover-class="lf-opacity" @click="$msg('敬请期待')">
<view class="fixed-cart fixed-live" hover-class="lf-opacity" @click="goLive()">
<text class="lf-iconfont icon-zhibo icon-text"></text> <text class="lf-iconfont icon-zhibo icon-text"></text>
<text class="tips">直播间</text> <text class="tips">直播间</text>
</view> </view>
@ -268,6 +269,11 @@
}, },
// //
methods: { methods: {
goLive() {
wx.navigateTo({
url: `plugin-private://wx2b03c6e691cd7370/pages/live-player-plugin?room_id=1`
})
},
getAlertAd(){ getAlertAd(){
this.$http.get({ this.$http.get({
api: '/api/ad' api: '/api/ad'

2
pages/index/onlineMall/onlineMall.vue

@ -59,7 +59,7 @@
<view style="height: 104rpx;"></view> <view style="height: 104rpx;"></view>
<scroll-view :style="{height: autoHeight}" :scroll-y="true" @scrolltolower="scrolltolower"> <scroll-view :style="{height: autoHeight}" :scroll-y="true" @scrolltolower="scrolltolower">
<view class="scroll-content"> <view class="scroll-content">
<lf-waterfall :list="list"></lf-waterfall>
<lf-waterfall :ifsale="false" :list="list"></lf-waterfall>
<lf-nocontent src="/static/images/empty.png" v-if="list.length <= 0"></lf-nocontent> <lf-nocontent src="/static/images/empty.png" v-if="list.length <= 0"></lf-nocontent>
</view> </view>
</scroll-view> </scroll-view>

77
pages/order/cashier/cashier.vue

@ -21,14 +21,15 @@
</template> </template>
</countdown-timer> --> </countdown-timer> -->
<countdown-time :minute="last_pay_time[2]" :second="last_pay_time[3]" :showDay="false" :showHour="false" color="#FF9D9D" splitorColor="#FF9D9D"> <countdown-time :minute="last_pay_time[2]" :second="last_pay_time[3]" :showDay="false" :showHour="false" color="#FF9D9D" splitorColor="#FF9D9D">
</countdown-time> </countdown-time>
</view> </view>
</view> </view>
</view> </view>
<label class="card lf-row-between" v-for="(item, index) in pay_list" :key="index" style="padding: 16rpx 40rpx;">
<label class="card lf-row-between" v-for="(item, index) in pay_list" :key="index"
style="padding: 16rpx 40rpx;">
<view> <view>
<text class="lf-iconfont lf-font-50 lf-text-vertical" :class="item.icon" :style="{color: item.color}"></text>
<text class="lf-iconfont lf-font-50 lf-text-vertical" :class="item.icon"
:style="{color: item.color}"></text>
<text class="lf-m-l-10 lf-font-28 lf-color-222">{{ item.name }}</text> <text class="lf-m-l-10 lf-font-28 lf-color-222">{{ item.name }}</text>
</view> </view>
<radio-group @change="checkChange($event, index)"> <radio-group @change="checkChange($event, index)">
@ -50,7 +51,7 @@
countdownTime, countdownTime,
lfPayPassword lfPayPassword
}, },
data(){
data() {
return { return {
pay_list: [{ pay_list: [{
name: '余额支付', name: '余额支付',
@ -58,7 +59,7 @@
type: 'balance', type: 'balance',
checked: false, checked: false,
color: '#15716E' color: '#15716E'
},{
}, {
name: '微信支付', name: '微信支付',
icon: 'icon-weixinzhifu', icon: 'icon-weixinzhifu',
type: 'wx_lite', type: 'wx_lite',
@ -73,10 +74,11 @@
balance_sum: 0, balance_sum: 0,
show_pw: false, show_pw: false,
user_pw: '', user_pw: '',
clickContinue: true,
last_pay_time: [] last_pay_time: []
} }
}, },
onLoad(options){
onLoad(options) {
this.token = this.$cookieStorage.get('user_token'); this.token = this.$cookieStorage.get('user_token');
this.last_pay_time = this.$cookieStorage.get('last_pay_time') || [0,0,29,58]; this.last_pay_time = this.$cookieStorage.get('last_pay_time') || [0,0,29,58];
this.amount = options.amount; this.amount = options.amount;
@ -88,7 +90,7 @@
}, },
methods: { methods: {
// //
getBalanceSum(){
getBalanceSum() {
this.$http.get({ this.$http.get({
api: 'api/users/balance/sum', api: 'api/users/balance/sum',
header: { header: {
@ -99,11 +101,11 @@
}) })
}, },
// //
checkChange(event, current){
checkChange(event, current) {
let list = this.pay_list.map((item, index) => { let list = this.pay_list.map((item, index) => {
if(index == current){
if (index == current) {
item.checked = true; item.checked = true;
}else{
} else {
item.checked = false; item.checked = false;
} }
return item; return item;
@ -111,28 +113,32 @@
this.pay_list = list; this.pay_list = list;
}, },
// //
dateFinish(){
dateFinish() {
console.log("倒计时结束"); console.log("倒计时结束");
this.is_date_finish = true; this.is_date_finish = true;
this.$msg('订单超时', {icon: 'error'}).then(() => {
this.$msg('订单超时', {
icon: 'error'
}).then(() => {
this.$toBack(); this.$toBack();
}) })
}, },
// //
payComfirm(event){
payComfirm(event) {
this.user_pw = event; this.user_pw = event;
this.confirm(); this.confirm();
}, },
// //
confirm(){
if(this.is_date_finish) return this.$msg('订单超时未支付');
confirm() {
if (this.clickContinue == true) {
this.clickContinue = false;
if (this.is_date_finish) return this.$msg('订单超时未支付');
let channel = ''; let channel = '';
this.pay_list.map(item => { this.pay_list.map(item => {
if(item.checked){
if (item.checked) {
channel = item.type; channel = item.type;
} }
}) })
if(channel == 'balance' && !this.user_pw){
if (channel == 'balance' && !this.user_pw) {
this.show_pw = true; this.show_pw = true;
return; return;
} }
@ -144,7 +150,7 @@
order_no: this.order_no, order_no: this.order_no,
balance: 0 balance: 0
}; };
if(channel == 'balance'){
if (channel == 'balance') {
data.pay_pwd = this.user_pw; data.pay_pwd = this.user_pw;
data.balance = Number(this.amount); data.balance = Number(this.amount);
data.channel = 'wx_lite'; data.channel = 'wx_lite';
@ -169,8 +175,10 @@
this.newcharge(false, res.message); this.newcharge(false, res.message);
this.show_pw = false; this.show_pw = false;
} }
this.clickContinue = true;
}) })
}).catch(() => { }).catch(() => {
this.clickContinue = true;
this.show_pw = false; this.show_pw = false;
this.setData({ this.setData({
loading: false loading: false
@ -180,6 +188,7 @@
showCancel: false showCancel: false
}); });
}); });
}
}, },
// openid // openid
getOpenid() { getOpenid() {
@ -235,7 +244,8 @@
// url: `/pages/store/success/success?order_no=${that.order_no}&amount=${that.amount}&channel=${that.channel}&formId=${this.formId}` //&charge_id=${charge.charge_id} charge_id 使 // url: `/pages/store/success/success?order_no=${that.order_no}&amount=${that.amount}&channel=${that.channel}&formId=${this.formId}` //&charge_id=${charge.charge_id} charge_id 使
// }); // });
uni.redirectTo({ uni.redirectTo({
url: '/pages/aboutpay/paystate?payState=1&amount='+ that.amount
url: '/pages/aboutpay/paystate?payState=1&amount=' + that
.amount
}) })
} else { } else {
wx.showModal({ wx.showModal({
@ -285,18 +295,18 @@
// url: `/pages/store/success/success?order_no=${this.order_no}&amount=${this.amount}&channel=${this.channel}&formId=${this.formId}` // url: `/pages/store/success/success?order_no=${this.order_no}&amount=${this.amount}&channel=${this.channel}&formId=${this.formId}`
// }); // });
uni.redirectTo({ uni.redirectTo({
url: '/pages/aboutpay/paystate?payState=1&amount='+ this.amount
url: '/pages/aboutpay/paystate?payState=1&amount=' + this.amount
}) })
}, },
setData: function (obj) {
setData: function(obj) {
let that = this; let that = this;
let keys = []; let keys = [];
let val, data; let val, data;
Object.keys(obj).forEach(function (key) {
Object.keys(obj).forEach(function(key) {
keys = key.split('.'); keys = key.split('.');
val = obj[key]; val = obj[key];
data = that.$data; data = that.$data;
keys.forEach(function (key2, index) {
keys.forEach(function(key2, index) {
if (index + 1 == keys.length) { if (index + 1 == keys.length) {
that.$set(data, key2, val); that.$set(data, key2, val);
} else { } else {
@ -314,35 +324,40 @@
</script> </script>
<style> <style>
page{
page {
background-color: #F8F8F8; background-color: #F8F8F8;
} }
</style> </style>
<style lang="scss" scoped="scoped"> <style lang="scss" scoped="scoped">
.content{
.content {
padding: 30rpx 32rpx; padding: 30rpx 32rpx;
width: 750rpx; width: 750rpx;
height: max-content; height: max-content;
box-sizing: border-box; box-sizing: border-box;
.card{
.card {
width: 100%; width: 100%;
height: max-content; height: max-content;
padding: 30rpx 40rpx; padding: 30rpx 40rpx;
background-color: #FFFFFF; background-color: #FFFFFF;
border-radius: 20rpx; border-radius: 20rpx;
&:nth-child(n+2){
&:nth-child(n+2) {
margin-top: 30rpx; margin-top: 30rpx;
} }
.symbol{
.symbol {
color: #15716E; color: #15716E;
font-size: 32rpx; font-size: 32rpx;
} }
.price{
.price {
font-size: 72rpx; font-size: 72rpx;
color: #15716E; color: #15716E;
font-weight: bold; font-weight: bold;
} }
.tips{
.tips {
font-size: 24rpx; font-size: 24rpx;
color: #FF9D9D; color: #FF9D9D;
display: flex; display: flex;
@ -360,7 +375,7 @@
width: 168rpx; width: 168rpx;
} }
.fixed-btn{
.fixed-btn {
position: fixed; position: fixed;
bottom: 10vh; bottom: 10vh;
left: calc(50% - 275rpx); left: calc(50% - 275rpx);

12
pages/order/confirm/confirm.vue

@ -174,7 +174,8 @@
coupon_index: null, coupon_index: null,
goods_type: 1, goods_type: 1,
itemsPrice: 0, // () itemsPrice: 0, // ()
totalPrice: 0 //
totalPrice: 0 ,//
clickContinue: true
} }
}, },
computed: { computed: {
@ -325,6 +326,8 @@
// //
confirm(){ confirm(){
console.log(this.address) console.log(this.address)
if(this.clickContinue == true) {
this.clickContinue = false;
if(this.address == null) { if(this.address == null) {
this.$msg('请先添加收货地址!'); this.$msg('请先添加收货地址!');
return return
@ -333,8 +336,9 @@
order_no: this.order_detail.order.order_no, order_no: this.order_detail.order.order_no,
pick_self: this.mode, // 0 1 pick_self: this.mode, // 0 1
address_id: this.address.id, address_id: this.address.id,
note: this.value
note: this.value,
} }
// TODO id // TODO id
if(this.coupon_index != null){ if(this.coupon_index != null){
par.coupon_id = this.order_detail.coupons[this.coupon_index].id; par.coupon_id = this.order_detail.coupons[this.coupon_index].id;
@ -347,7 +351,6 @@
Authorization: this.token Authorization: this.token
} }
}).then(res => { }).then(res => {
console.log("`````````", res);
if(res.data.code == 200 || res.data.code == true){ if(res.data.code == 200 || res.data.code == true){
let order = res.data.data.order; let order = res.data.data.order;
let url = '/pages/order/cashier/cashier'; let url = '/pages/order/cashier/cashier';
@ -355,10 +358,13 @@
url += '&order_no='+ order.order_no; url += '&order_no='+ order.order_no;
this.$cookieStorage.set('last_pay_time', order.last_pay_time); this.$cookieStorage.set('last_pay_time', order.last_pay_time);
this.$url(url, {type: 'redirect'}); this.$url(url, {type: 'redirect'});
this.clickContinue = true;
}else{ }else{
this.$msg(res.data.message); this.$msg(res.data.message);
this.clickContinue = true;
} }
}) })
}
}, },
// //
couponChange(event){ couponChange(event){

11
pages/order/pointconfirm/confirm.vue

@ -160,7 +160,8 @@
show_coupon: false, show_coupon: false,
coupon_index: null, coupon_index: null,
goods_type: 0, goods_type: 0,
params: {}
params: {},
clickContinue: true
} }
}, },
computed: { computed: {
@ -267,6 +268,8 @@
}, },
// //
confirm(){ confirm(){
if(this.clickContinue == true) {
this.clickContinue = false;
console.log(this.address) console.log(this.address)
if(this.address == null) { if(this.address == null) {
this.$msg('请先添加收货地址!'); this.$msg('请先添加收货地址!');
@ -282,7 +285,7 @@
note: this.value note: this.value
}, },
header: { header: {
Authorization: this.token
Authorization: this.token,
} }
}).then(res => { }).then(res => {
if(res.data.code == 200 || res.data.code == true){ if(res.data.code == 200 || res.data.code == true){
@ -294,7 +297,9 @@
url += '&order_no='+ order.order_no; url += '&order_no='+ order.order_no;
this.$cookieStorage.set('last_pay_time', order.last_pay_time); this.$cookieStorage.set('last_pay_time', order.last_pay_time);
this.$url(url, {type: 'redirect'}); this.$url(url, {type: 'redirect'});
this.clickContinue = true;
}else { }else {
this.clickContinue = true;
this.$msg('兑换成功') this.$msg('兑换成功')
setTimeout(() => { setTimeout(() => {
this.$toBack() this.$toBack()
@ -302,8 +307,10 @@
} }
}else{ }else{
this.$msg(res.data.message); this.$msg(res.data.message);
this.clickContinue = true;
} }
}) })
}
}, },
// //
couponChange(event){ couponChange(event){

2
pages/user/my/center.vue

@ -82,14 +82,12 @@
</view> </view>
<view class="order-children" @click="$url('/pages/order/index/onlineorder?current=2')"> <view class="order-children" @click="$url('/pages/order/index/onlineorder?current=2')">
<view> <view>
<view class="function-tag" v-if="centerInfo.paidCount != 0 && $isRight(centerInfo)">{{centerInfo.paidCount}}</view>
<view class="lf-iconfont lf-font-50 icon-31daifahuo"></view> <view class="lf-iconfont lf-font-50 icon-31daifahuo"></view>
</view> </view>
<view class="lf-color-black lf-font-28 lf-m-t-20">待发货</view> <view class="lf-color-black lf-font-28 lf-m-t-20">待发货</view>
</view> </view>
<view class="order-children" @click="$url('/pages/order/index/onlineorder?current=3')"> <view class="order-children" @click="$url('/pages/order/index/onlineorder?current=3')">
<view> <view>
<view class="function-tag" v-if="centerInfo.deliveredCount != 0 && $isRight(centerInfo)">{{centerInfo.deliveredCount}}</view>
<view class="lf-iconfont lf-font-50 icon-daishouhuo"></view> <view class="lf-iconfont lf-font-50 icon-daishouhuo"></view>
</view> </view>
<view class="lf-color-black lf-font-28 lf-m-t-20">待收货</view> <view class="lf-color-black lf-font-28 lf-m-t-20">待收货</view>

78
uview-ui/components/u-column-notice/u-column-notice.vue

@ -1,43 +1,39 @@
<template> <template>
<view
class="u-notice-bar"
:style="{
<view class="u-notice-bar" :style="{
background: computeBgColor, background: computeBgColor,
padding: padding padding: padding
}"
:class="[
}" :class="[
type ? `u-type-${type}-light-bg` : '' type ? `u-type-${type}-light-bg` : ''
]"
>
]">
<view class="u-icon-wrap"> <view class="u-icon-wrap">
<u-icon class="u-left-icon" v-if="volumeIcon" name="volume-fill" :size="volumeSize" :color="computeColor"></u-icon>
<u-icon class="u-left-icon" v-if="volumeIcon" name="volume-fill" :size="volumeSize" :color="computeColor">
</u-icon>
</view> </view>
<swiper :disable-touch="disableTouch" @change="change" :autoplay="autoplay && playState == 'play'" :vertical="vertical" circular :interval="duration" class="u-swiper">
<swiper :disable-touch="disableTouch" @change="change" :autoplay="autoplay && playState == 'play'"
:vertical="vertical" circular :interval="duration" class="u-swiper">
<swiper-item v-for="(item, index) in list" :key="index" class="u-swiper-item"> <swiper-item v-for="(item, index) in list" :key="index" class="u-swiper-item">
<view
class="u-news-item u-line-1"
:style="[textStyle]"
@tap="click(index)"
:class="['u-type-' + type]"
>
{{ item }}
<view class="u-news-item u-line-1" :style="[textStyle]" @tap="click(index,item)"
:class="['u-type-' + type]">
{{ item.associate.title }}
</view> </view>
</swiper-item> </swiper-item>
</swiper> </swiper>
<view class="u-icon-wrap"> <view class="u-icon-wrap">
<u-icon @click="getMore" class="u-right-icon" v-if="moreIcon" name="arrow-right" :size="26" :color="computeColor"></u-icon>
<u-icon @click="close" class="u-right-icon" v-if="closeIcon" name="close" :size="24" :color="computeColor"></u-icon>
<u-icon @click="getMore" class="u-right-icon" v-if="moreIcon" name="arrow-right" :size="26"
:color="computeColor"></u-icon>
<u-icon @click="close" class="u-right-icon" v-if="closeIcon" name="close" :size="24" :color="computeColor">
</u-icon>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
export default {
export default {
props: { props: {
// //
list: { list: {
type: Array, type: Array,
default() {
default () {
return []; return [];
} }
}, },
@ -138,26 +134,26 @@ export default {
computeColor() { computeColor() {
if (this.color) return this.color; if (this.color) return this.color;
// 使content-color // 使content-color
else if(this.type == 'none') return '#606266';
else if (this.type == 'none') return '#606266';
else return this.type; else return this.type;
}, },
// //
textStyle() { textStyle() {
let style = {}; let style = {};
if (this.color) style.color = this.color; if (this.color) style.color = this.color;
else if(this.type == 'none') style.color = '#606266';
else if (this.type == 'none') style.color = '#606266';
style.fontSize = this.fontSize + 'rpx'; style.fontSize = this.fontSize + 'rpx';
return style; return style;
}, },
// //
vertical() { vertical() {
if(this.mode == 'horizontal') return false;
if (this.mode == 'horizontal') return false;
else return true; else return true;
}, },
// //
computeBgColor() { computeBgColor() {
if (this.bgColor) return this.bgColor; if (this.bgColor) return this.bgColor;
else if(this.type == 'none') return 'transparent';
else if (this.type == 'none') return 'transparent';
} }
}, },
data() { data() {
@ -167,8 +163,10 @@ export default {
}, },
methods: { methods: {
// //
click(index) {
click(index, item) {
this.$emit('click', index); this.$emit('click', index);
this.$url(item.link)
console.log(item.link)
}, },
// //
close() { close() {
@ -180,18 +178,18 @@ export default {
}, },
change(e) { change(e) {
let index = e.detail.current; let index = e.detail.current;
if(index == this.list.length - 1) {
if (index == this.list.length - 1) {
this.$emit('end'); this.$emit('end');
} }
} }
} }
};
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import "../../libs/css/style.components.scss";
@import "../../libs/css/style.components.scss";
.u-notice-bar {
.u-notice-bar {
width: 100%; width: 100%;
@include vue-flex; @include vue-flex;
align-items: center; align-items: center;
@ -199,39 +197,39 @@ export default {
flex-wrap: nowrap; flex-wrap: nowrap;
padding: 18rpx 24rpx; padding: 18rpx 24rpx;
overflow: hidden; overflow: hidden;
}
}
.u-swiper {
.u-swiper {
font-size: 26rpx; font-size: 26rpx;
height: 32rpx; height: 32rpx;
@include vue-flex; @include vue-flex;
align-items: center; align-items: center;
flex: 1; flex: 1;
margin-left: 12rpx; margin-left: 12rpx;
}
}
.u-swiper-item {
.u-swiper-item {
@include vue-flex; @include vue-flex;
align-items: center; align-items: center;
overflow: hidden; overflow: hidden;
}
}
.u-news-item {
.u-news-item {
overflow: hidden; overflow: hidden;
}
}
.u-right-icon {
.u-right-icon {
margin-left: 12rpx; margin-left: 12rpx;
/* #ifndef APP-NVUE */ /* #ifndef APP-NVUE */
display: inline-flex; display: inline-flex;
/* #endif */ /* #endif */
align-items: center; align-items: center;
}
}
.u-left-icon {
.u-left-icon {
/* #ifndef APP-NVUE */ /* #ifndef APP-NVUE */
display: inline-flex; display: inline-flex;
/* #endif */ /* #endif */
align-items: center; align-items: center;
}
}
</style> </style>

2
uview-ui/components/u-notice-bar/u-notice-bar.vue

@ -131,7 +131,7 @@ export default {
// horizontal-vertical- // horizontal-vertical-
mode: { mode: {
type: String, type: String,
default: 'horizontal'
default: 'vertical'
}, },
// //
show: { show: {

Loading…
Cancel
Save