Commit 05af6a31 authored by 罗超's avatar 罗超

Merge branch 'master' of http://gitlab.oytour.com/viitto/mallapp

# Conflicts:
#	pages/kotra/news.vue
parents 062d53fe d09a626e
This diff is collapsed.
<template>
<u-popup mode="bottom" border-radius="20" :popup="false" v-model="show" :maskCloseAble="true" length="auto"
:safeAreaInsetBottom="true" @close="popupClose" :z-index="9999" close-icon="cross" :closeable="true">
<view class="coupon">
<scroll-view :scroll-y="true" style="max-height: 70vh;">
<view class="title">储蓄卡</view>
<view class="chosentips">请选择要使用的储蓄卡</view>
<view class="details">
<view class="item" v-for="(x, i) in ts" :key="i" :style="{'margin-bottom':ts.length==i+1?'50px':'10px'}">
<view class="item-left">
<view style="font-weight: bold;width: 100%;overflow: hidden;display: inline-block;white-space: nowrap; text-overflow:ellipsis;">
{{x.Name}}
</view>
<view style="font-size: 11px;color: #818181;margin-top: 9px;">
有效期{{x.EndTime}}
</view>
</view>
<view style="width: 1px;flex: 1;display: flex;align-items: flex-end;color: #FF4544;font-size: 12px;justify-content: flex-end;">
余额¥ <text style="font-size: 20px;">{{x.SurplusPrice}}</text>
</view>
<view class="chosen">
<u-radio-group v-model="value" @change="radioChange" >
<u-radio shape="circle" :name="x.Id" :icon-size="36" :active-color="mc"></u-radio>
</u-radio-group>
</view>
<view class="positop">
储蓄卡
</view>
</view>
</view>
</scroll-view>
<view class="btton-box">
<u-button size="80" :ripple="true" shape="circle" :custom-style="{
backgroundColor: mc,
height: '80rpx',
color: '#FFF',
fontSize: '14px',
margin: '0 3vw',
width: '90vw',
}"
@click="popupClose">确定</u-button>
</view>
</view>
</u-popup>
</template>
<script>
export default {
props: ["list", "current"],
data() {
return {
mc: "",
show: true,
currentChosen: "",
value:'',
ts: []
};
},
mounted() {
this.mc = this.$uiConfig.mainColor;
this.value = this.current;
this.currentChosen = this.current;
this.ts = this.list
this.ts.forEach(x => {
x.EndTime = x.EndTime.split(' ')[0].replace(/-/g, '.')
})
},
methods: {
popupClose() {
if (this.currentChosen != this.current) {
this.$emit('close', this.currentChosen)
} else {
this.$emit('close', -1)
}
},
radioChange(e){
if(this.currentChosen != e){
this.currentChosen = e
}else{
this.currentChosen = 0;
this.value = 0
}
}
},
};
</script>
<style>
.coupon {
max-height: 70vh;
background: #f5f5f5;
/* padding-bottom: 50px; */
text-align: left !important;
border-top-left-radius: 20rpx;
border-top-right-radius: 20rpx;
/* overflow: scroll; */
overflow: hidden;
}
.coupon .title {
font-size: 22px;
color: #000;
padding: 20px;
background: #fff;
}
.coupon .chosentips {
padding: 12px 20px;
border-bottom: 1px solid #f5f5f5;
border-top: 1px solid #f5f5f5;
color: #777;
background: #fff;
font-size: 12px;
}
.coupon .details {
padding: 10px;
display: flex;
flex-direction: column;
}
.coupon .details .item {
display: flex;
margin-bottom: 10px;
padding: 35px 15px 15px;
background: #fff;
position: relative;
align-items: center;
border-radius: 5px;
}
.coupon .details .item .item-left{
width: calc(100vw - 260rpx - 55px);
font-size: 14px;
color: #000000;
}
.coupon .details .item .chosen {
width: 20px;
position: absolute;
right: 10px;
top: 10px;
}
.coupon .positop{
position: absolute;
left: 0;
top: 0;
width: 55px;
height: 21px;
background: linear-gradient(90deg, #FF9966, #E95252);
font-size: 12px;
color: #FFFFFF;
line-height: 21px;
text-align: center;
border-top-left-radius:5px ;
border-bottom-right-radius: 5px;
}
.pesongBox .btton-box {
height: 50px;
display: flex;
padding: 5px 10px;
border-top: 1px solid #f5f5f5;
position: fixed;
bottom: 0;
left: 0;
right: 0;
align-items: center;
background: #fff;
}
</style>
......@@ -24,7 +24,7 @@
<view class="rule">{{x.coupon_data.rule}}</view>
</view>
<view class="chosen">
<u-radio-group v-model="currentChosen">
<u-radio-group v-model="value" @change="radioChange" >
<u-radio shape="circle" :name="x.id" :icon-size="36" :active-color="mc"></u-radio>
</u-radio-group>
</view>
......@@ -55,12 +55,14 @@
mc: "",
show: true,
currentChosen: "",
value:'',
ts: []
};
},
mounted() {
this.mc = this.$uiConfig.mainColor;
this.currentChosen = this.current;
this.value = this.current;
this.ts = this.list
this.ts.forEach(x => {
x.start_time = x.start_time.split(' ')[0].replace(/-/g, '.')
......@@ -74,6 +76,14 @@
} else {
this.$emit('close', -1)
}
},
radioChange(e){
if(this.currentChosen != e){
this.currentChosen = e
}else{
this.currentChosen = 0;
this.value = 0
}
}
},
};
......
<style>
.order-page .box{
width: 520rpx;
height: 700rpx;
position: relative;
}
.order-page .Xbox{
width: 520rpx;
height: 700rpx;
background: #FFF;
border: 3px solid;
border-image: linear-gradient(0deg, #FF7115, #FFE253) 3 3;
box-shadow: 0px 0px 18px 0px rgba(81, 81, 81, 0.78);
position: relative;
}
.Xbox-top{
width: 580rpx;
height: 120rpx;
background: linear-gradient(90deg, #FAA014, #F57019, #FBAA12);
box-shadow: 0px 2px 15px 0px rgba(247, 123, 25, 0.74);
border-radius: 5px;
margin-top: 44rpx;
font-size: 44rpx;
color: #FFF;
display: flex;
align-items: center;
justify-content: center;
margin-left: -35rpx;
}
.Xbox-center{
width: 616rpx;
height: 306rpx;
background: url('https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/orderpopunp.png');
background-repeat: no-repeat;
background-size: 100% 100%;
position: relative;
display: flex;
align-items: center;
justify-content: center;
margin-top: 15px;
margin-left: -49rpx;
font-size: 80rpx;
font-weight: 500;
}
.Xbox-center-text{
color: #FFFFFF;
background: linear-gradient(0deg, #FCEDD9 0%, #FBC86E 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
display: flex;
align-items: flex-end;
}
.xbox-c-posi{
position: absolute;right: 60rpx;bottom: 40rpx;font-size: 18px;color: #FFFFFF;
line-height: 35px;
font-weight: 800;
background: linear-gradient(0deg, #FCEDD9 0%, #FBC86E 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
.xbox-btn{
width: 250rpx;
height: 74rpx;
background: linear-gradient(90deg, #F5A454, #F93836);
box-shadow: 1px 6px 10px 0px rgba(250, 88, 83, 0.36);
border-radius: 19px;
margin-top: 66rpx;
margin-left: 136rpx;
font-size: 34rpx;
color: #FFFFFF;
display: flex;
align-items: center;
justify-content: center;
}
</style>
<template>
<div class="order-page" style='position: relative;'>
<u-popup v-model="showDialog" mode="center" :mask-close-able="false" custom-style="padding:0;background:none;">
<view class="box">
<view style="width: 140rpx;height: 140rpx;position: absolute;right: -50rpx;top: -50rpx;">
<image src="../../static/images/orderyuan.png" style="width: 100%;height: 100%;"></image>
</view>
<view style="width: 90rpx;height: 90rpx;position: absolute;left: -45rpx;bottom: 60rpx;">
<image src="../../static/images/orderyuan.png" style="width: 100%;height: 100%;"></image>
</view>
<view class="Xbox">
<view class="Xbox-top">
恭喜增加 <text style="font-size: 60rpx;margin: 0 3px;">{{orderPopupdata.OrderNum}}</text> 个订单
</view>
<view class="Xbox-center">
<view class="Xbox-center-text">
<text style="line-height: 55px;">
+¥
</text>
<text style="font-size: 120rpx;">{{orderPopupdata.CommissionMoney}}</text>
<text style="line-height: 55px;font-size: 50rpx;">
</text>
</view>
<view class="xbox-c-posi" >收益</view>
</view>
<view class="xbox-btn" @click="gosalesvolume">
马上查看
</view>
<view style="width: 56rpx;height: 56rpx;position: absolute;right: -20rpx;bottom: 134rpx;">
<image src="../../static/images/orderyuan.png" style="width: 100%;height: 100%;"></image>
</view>
<u-icon name="close" style='position: absolute;left: 230rpx;bottom: -100rpx;' color="#FFFFFF" size="60" @click='closeBtn'></u-icon>
</view>
</view>
</u-popup>
</div>
</template>
<script>
export default {
props: {
orderPopupdata: {
type: Object,
default: 0
},
},
data() {
return {
pageinfo: {},
showDialog: true,
};
},
created() {
console.log(this.orderPopupdata,'数据')
},
methods: {
closeBtn() {
this.showDialog = false;
this.$emit('closeBtn');
},
gosalesvolume(){
this.$emit('gosalesvolume');
}
}
};
</script>
......@@ -3,7 +3,7 @@
length="auto" :safeAreaInsetBottom="true" @close="popupClose" :z-index="9999" close-icon="close">
<view class="goodsku">
<view class="goods">
<image :src="goodimage" class="img"></image>
<image :src="goodimage" class="img" @click="previewImage(0,goodimage)"></image>
<view class="chosen-info">
<view class="price" :style="{ color: mc }">
<text class="small"></text>
......@@ -337,7 +337,7 @@
};
good.DetailList.push(g);
uni.navigateTo({
url: '/pages/order-submit/education-submit?formData=' +
url: '/pages/order-submit/neweducation-submit?formData=' +
encodeURIComponent(JSON.stringify(good)) +
'&IsFormShoppingCart=2&ShoppingCartIdList=' +
JSON.stringify(ShoppingCartIdList),
......@@ -478,7 +478,14 @@
if (this.skuObj) {
this.goodprice = (parseFloat(this.skuObj.price) * parseFloat(this.gc)).toFixed(2);
}
}
},
previewImage(index, images) {
images = [images]
uni.previewImage({
urls: images,
current: index,
});
},
}
};
</script>
......
......@@ -18,7 +18,7 @@
mode="widthFix"
style="width: 90rpx; height: 90rpx;"
/>
<text :style="{'color':navs.color}" style="font-size:26rpx;margin-top:20rpx;">{{ c.name }}</text>
<text :style="{'color':navs.color}" style="font-size:26rpx;margin-top:10rpx;">{{ c.name }}</text>
</u-grid-item>
</u-grid>
</view>
......@@ -41,7 +41,6 @@ export default {
created() {
let tempArray = [];
this.height = this.navs.rows * this.height;
console.log(this.navs)
this.navs.navs.forEach((x, i) => {
tempArray.push(x);
if (
......
<template>
<view class="matchmaking" style="margin-bottom:70px;">
<view class="matchmaking-box" v-for="(item,index) in navs.list" :key='index' @click="goDetail(item)">
<view class="matchmaking" style="margin-bottom:10px;">
<view v-if='navs.listStyle == 1' >
<waterfallsFlow :single="true" :list="navs.list" @wapper-lick='goDetail()'>
<view v-for="(item, index) of navs.list" :key="index" slot="slot{{index}}">
<view class="pb-box">
<u-avatar :src="item.Photo" size="72"></u-avatar>
<image class="gstyle2" v-if="item.SexStr=='男'" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/basic-nan2.png" ></image>
<image class="gstyle2" v-if="item.SexStr=='女'" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/basic-nv2.png" ></image>
<view class="boxt-center">
<view class="row">
<view class="box-name">{{item.name}}</view>
</view>
<view class="row">
<view class="boxtc-b-item" v-if="item.Age>0">{{item.Age}}</view>
</view>
</view>
</view>
</view>
</waterfallsFlow>
</view>
<view class="matchmaking-box" v-for="(item,index) in navs.list" :key='index' @click="goDetail(item)" v-if="navs.listStyle==-1 || navs.listStyle==0">
<view class="box-top">
<u-avatar :src="item.Photo" size="80"></u-avatar>
<image class="gstyle" v-if="item.SexStr=='男'" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/basic-nan-b.png" ></image>
<image class="gstyle" v-if="item.SexStr=='女'" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/basic-nv-b.png" ></image>
<image class="gstyle" v-if="item.SexStr=='男'" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/basic-nan2.png" ></image>
<image class="gstyle" v-if="item.SexStr=='女'" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/basic-nv2.png" ></image>
<view class="boxt-center">
<view class="row">
<!-- <view class="boxtc-t-f" :style="{color:mainColor}">
{{item.Score}}
</view> -->
<view class="box-name">{{item.name}}</view>
</view>
<view class="row">
<view class="boxtc-b-item">{{item.Age}}</view>
<view class="boxtc-b-item" v-if="item.Age>0">{{item.Age}}</view>
<view class="boxtc-b-item">{{item.Education}}</view>
<view class="boxtc-b-item">{{item.Marriage}}</view>
</view>
</view>
<view class="boxt-r" v-if="item.MatchingRate>0">
<!-- <view class="boxt-r" v-if="item.MatchingRate>0">
匹配度 {{item.MatchingRate}}%
</view>
</view> -->
</view>
<view class="box-img">
<view v-if="navs.listStyle==-1" class="box-img-one">
<view v-if="navs.listStyle==-1 && item.AlbumList.length>0" class="box-img-one">
<image :src="item.AlbumList[0]" mode="aspectFill" style="width: 100%;height: 100%;border-radius: 15px;"></image>
</view>
<view v-if="navs.listStyle==0" class="box-img-two">
......@@ -38,8 +54,10 @@
</template>
<script>
import waterfallsFlow from './maramlee-waterfalls-flow.vue'
export default {
props: ["navs"],
components: { waterfallsFlow },
data(){
return{
type:2,
......@@ -86,6 +104,7 @@
width: 32rpx;
height: 32rpx;
}
.matchmaking .boxt-center{
width: 1px;
flex: 1;
......@@ -160,4 +179,22 @@
margin-right: 10px;
overflow: hidden;
}
.matchmaking .pb-box{
width: 100%;
padding: 10px 5px;
background: #FFF;
border-bottom-left-radius: 6px;
border-bottom-right-radius: 6px;
display: flex;
align-items: center;
position: relative;
}
.matchmaking .gstyle2{
position: absolute;
left: 64rpx;
top: 64rpx;
width: 24rpx;
height: 24rpx;
}
</style>
<template>
<view class="waterfalls-box" :style="{ height: (height+10) + 'px' }">
<!-- #ifdef MP-WEIXIN -->
<view
v-for="(item, index) of list"
class="waterfalls-list"
:key="item[idKey]"
:id="'waterfalls-list-id-' + item[idKey]"
:ref="'waterfalls-list-id-' + item[idKey]"
:style="{
'--offset': offset + 'px',
'--cols': cols,
top: allPositionArr[index].top || 0,
left: allPositionArr[index].left || 0,
}"
@click="$emit('wapper-lick', item)"
>
<image
class="waterfalls-list-image"
mode="widthFix"
:class="{ single }"
:style="imageStyle"
:src="item[imageSrcKey][0] || ' '"
@load="imageLoadHandle(index)"
@error="imageLoadHandle(index)"
@click="$emit('image-click', item)"
/>
<slot name="slot{{index}}" />
</view>
<!-- #endif -->
<!-- #ifndef MP-WEIXIN -->
<view
v-for="(item, index) of list"
class="waterfalls-list"
:key="item[idKey]"
:id="'waterfalls-list-id-' + item[idKey]"
:ref="'waterfalls-list-id-' + item[idKey]"
:style="{
'--offset': offset + 'px',
'--cols': cols,
...listStyle,
...(allPositionArr[index] || {}),
}"
@click="$emit('wapper-lick', item)"
>
<image
class="waterfalls-list-image"
:class="{ single }"
mode="widthFix"
:style="imageStyle"
:src="item[imageSrcKey] || ' '"
@load="imageLoadHandle(index)"
@error="imageLoadHandle(index)"
@click="$emit('image-click', item)"
/>
<slot v-bind="item" />
</view>
<!-- #endif -->
</view>
</template>
<script>
export default {
props: {
list: { type: Array, required: true },
// offset 间距,单位为 px
offset: { type: Number, default: 10 },
// 列表渲染的 key 的键名,值必须唯一,默认为 id
idKey: { type: String, default: "id" },
// 图片 src 的键名
imageSrcKey: { type: String, default: "AlbumList" },
// 列数
cols: { type: Number, default: 2, validator: (num) => num >= 2 },
imageStyle: { type: Object },
// 是否是单独的渲染图片的样子,只控制图片圆角而已
single: { type: Boolean, default: false },
// #ifndef MP-WEIXIN
listStyle: { type: Object },
// #endif
},
data() {
return {
topArr: [], // left, right 多个时依次表示第几列的数据
allPositionArr: [], // 保存所有的位置信息
allHeightArr: [], // 保存所有的 height 信息
height: 0, // 外层包裹高度
oldNum: 0,
num: 0,
};
},
created() {
this.refresh();
},
methods: {
imageLoadHandle(index) {
const id = "waterfalls-list-id-" + this.list[index][this.idKey],
query = uni.createSelectorQuery().in(this);
query
.select("#" + id)
.fields({ size: true }, (data) => {
this.num++;
this.$set(this.allHeightArr, index, data.height);
if (this.num === this.list.length) {
for (let i = this.oldNum; i < this.num; i++) {
const getTopArrMsg = () => {
let arrtmp = [...this.topArr].sort((a, b) => a - b);
return {
shorterIndex: this.topArr.indexOf(arrtmp[0]),
shorterValue: arrtmp[0],
longerIndex: this.topArr.indexOf(arrtmp[this.cols - 1]),
longerValue: arrtmp[this.cols - 1],
};
};
const { shorterIndex, shorterValue } = getTopArrMsg();
const position = {
top: shorterValue + "px",
left: (data.width + this.offset) * shorterIndex + "px",
};
this.$set(this.allPositionArr, i, position);
this.topArr[shorterIndex] =
shorterValue + this.allHeightArr[i] + this.offset;
this.height = getTopArrMsg().longerValue - this.offset;
}
this.oldNum = this.num;
// 完成渲染 emit `image-load` 事件
this.$emit("image-load");
}
})
.exec();
},
refresh() {
let arr = [];
for (let i = 0; i < this.cols; i++) {
arr.push(0);
}
this.topArr = arr;
this.num = 0;
this.oldNum = 0;
this.height = 0;
},
},
};
</script>
<style lang="scss" scoped>
// 这里可以自行配置
$border-radius: 6px;
.waterfalls-box {
position: relative;
width: 100%;
overflow: hidden;
.waterfalls-list {
margin-left: 15px;
width: calc((100% - var(--offset) * (var(--cols) - 1)) / var(--cols) - 15px);
position: absolute;
background-color: #fff;
border-radius: $border-radius;
// 防止刚开始渲染时堆叠在第一幅图的地方
left: calc(-50% - var(--offset));
box-shadow: 0px 5px 25px 0px rgba(218, 220, 230, 0.85);
// border: 1px solid rgba(218, 220, 230, 0.85);
.waterfalls-list-image {
width: 100%;
will-change: transform;
// border-radius: $border-radius $border-radius 0 0;
border-top-left-radius: $border-radius;
border-top-right-radius: $border-radius;
display: block;
&.single {
// border-radius: $border-radius;
}
}
}
}
</style>
......@@ -14,7 +14,7 @@
</view>
<view class="good-info" v-if="item.name && item.name!=''">
<view class="good-name">{{ item.name }}</view>
<view style="width: 130px;">
<view style="width: 150px;">
<view class="style_five_label"
:style="{background:mainColor}" v-for="(subItem,subIndex) in item.lableNameList" :key="subIndex">
{{subItem}}
......@@ -85,22 +85,23 @@
margin-bottom:0!important;
}
.good-five-stydy .img-box {
width: 110px;
height: 70px;
width: 300rpx;
height: 100px;
border-radius: 4px;
overflow: hidden;
box-shadow: 0 4px 10px 1px #D2D2D2;
}
.good-five-stydy .img-box2 {
width: 278rpx;
height: 144rpx;
width: 300rpx;
height: 100px;
border-radius: 4px;
overflow: hidden;
box-shadow: 0 4px 10px 1px #D2D2D2;
margin-right: 12px;
}
.good-five-stydy .good-info {
height: 70px;
height: 100px;
padding: 0 12px ;
flex: 1;
border: 10rpx;
......@@ -121,7 +122,7 @@
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;
width:130px;
width:300rpx;
}
.good-five-stydy .good-info .good-price-info {
......
......@@ -29,6 +29,7 @@
<!-- 网课列表 -->
<rgoods v-if="subItem.Id == 'educationCustom'" :goods="subItem.data"></rgoods>
<matchmaking v-if="subItem.Id == 'miaiuser'" :navs="subItem.data"></matchmaking>
<pagetitle v-if="subItem.Id == 'link'" :ts="subItem.data" ></pagetitle>
</template>
</template>
</template>
......@@ -68,13 +69,15 @@
import rubik from "@/components/rubik/index";
import rgoods from "@/components/study/index.vue";
import matchmaking from "@/components/matchmaking/index";
import pagetitle from "@/components/pagetitle/index";
export default {
components: {
cats,
activity,
rubik,
rgoods,
matchmaking
matchmaking,
pagetitle
},
props: ["navs"],
data() {
......
......@@ -59,7 +59,7 @@ export default {
this.ts.link.name &&
this.ts.link.name != ""
) {
uni.navigateTo({ url: this.ts.link.name });
uni.navigateTo({ url: this.ts.link.url });
}
}
}
......
This diff is collapsed.
......@@ -27,7 +27,7 @@ export default {
}
},
created() {
console.log(this.ad)
// console.log(this.ad)
this.ad.list.forEach((x) => {
x.formatStyle = {
width: x.width,
......
......@@ -138,6 +138,7 @@
color: #111111;
font-size: 26rpx;
font-weight: bold;
line-height: 36rpx;
}
.good_study_two .good-info .good-price-info {
......@@ -160,6 +161,7 @@
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
line-height: 16px;
}
.good_study_two .good-info .good-price-info .buy {
......
......@@ -9,7 +9,7 @@
right: 0;
z-index: 99999999;
border-top: 1upx solid #ddd;
padding-top:96rpx;
padding-top: 96rpx;
background: #fff;
}
.tabbarMainIphone {
......@@ -94,9 +94,23 @@
bottom: 10upx;
border-radius: 150upx;
}
/* ----------------不显示图标导航样式-------------- */
.txtBtn2 {
font-size: 26rpx;
font-family: PingFang SC;
font-weight: 500;
color: #b2b3b4;
}
.activeTxtBtn2 {
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 800;
/* color: #111111; */
}
</style>
<template>
<view>
<view v-if="isShowIcon === 1">
<view
class="tabbarMain"
:class="[flagTypeInfo ? 'tabbarMainIphone' : '']"
......@@ -135,6 +149,50 @@
</view>
</view>
</view>
</view>
<view v-if="isShowIcon === 0">
<view
class="tabbarMain"
:class="[flagTypeInfo ? 'tabbarMainIphone' : '']"
v-if="navs && navs.length > 0"
>
<view
class="tabBtnMina"
:class="[flagTypeInfo ? 'tabBtnMinaIphone' : '']"
mode=""
>
<view
class="itmMain"
v-for="(x, i) in navs"
:key="i"
@click.stop="goUrl(x.url)"
>
<!-- <image
class="imgse"
:fade-show="false"
v-if="active != i"
mode="heightFix"
:src="x.icon"
></image>
<image
class="imgse"
:fade-show="false"
v-if="active === i"
mode="heightFix"
:src="x.active_icon"
></image> -->
<text
class="txtBtn2"
:class="{ activeTxtBtn2: active == i }"
:style="{ color: active == i ? x.active_color : x.color }"
>{{ x.text }}</text
>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
......@@ -147,13 +205,20 @@ export default {
flagTypeInfo: false,
navs: [],
crtPath: "",
isShowIcon: 1,
};
},
created() {
console.log('A join...')
console.log("A join...");
let data = uni.getStorageSync("basedata");
if (data) {
this.isShowIcon = data.navbar.isShowIcon;
} else {
this.isShowIcon = 1;
}
},
mounted() {
console.log('B join...')
console.log("B join...");
this.flagTypeInfo = this.$uiConfig.is_bang;
let tempSystem = uni.getSystemInfoSync();
this.platforms = tempSystem.platform;
......@@ -166,13 +231,13 @@ export default {
}
// #endif
});
if(uni.getStorageSync("navs")){
this.navs = uni.getStorageSync("navs")??[];
}else{
setTimeout(()=>{
this.navs = uni.getStorageSync("navs")??[];
if (uni.getStorageSync("navs")) {
this.navs = uni.getStorageSync("navs") ?? [];
} else {
setTimeout(() => {
this.navs = uni.getStorageSync("navs") ?? [];
this.activeHandler();
},3000)
}, 3000);
}
this.activeHandler();
},
......@@ -190,16 +255,16 @@ export default {
methods: {
activeHandler() {
let t = getCurrentPages();
let query=t[t.length - 1].__displayReporter.query
let queryString=''
for(var k in query){
queryString+=`&${k}=${query[k]}`
let query = t[t.length - 1].__displayReporter.query;
let queryString = "";
for (var k in query) {
queryString += `&${k}=${query[k]}`;
}
if(queryString!=''){
queryString="?"+queryString.substring(1,queryString.length)
if (queryString != "") {
queryString = "?" + queryString.substring(1, queryString.length);
}
this.crtPath = "/" + t[t.length - 1].route+queryString;
console.log(this.crtPath)
this.crtPath = "/" + t[t.length - 1].route + queryString;
console.log(this.crtPath);
this.navs.forEach((x, i) => {
if (x.url == this.crtPath) {
this.active = i;
......
......@@ -59,6 +59,7 @@
<style lang="scss" scoped>
.u-radio-group {
display: inline-flex;
display: flex;
flex-wrap: wrap;
}
</style>
This diff is collapsed.
......@@ -18,10 +18,10 @@
>
<view class="ftBox" v-if="type==0">
<view class="interDList" v-for="(x, i) in g" :key="i">
<view style="position: relative;">
<view style="position: relative;" @click="goUserinfo(x)">
<u-avatar :src="x.Photo" size="80"></u-avatar>
<image v-if="x.Sex==1" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/basic-nan.png" style="width: 32rpx;height: 32rpx;position: absolute;right: 0;bottom: 0;"></image>
<image v-if="x.Sex==2" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/basic-nv.png" style="width: 32rpx;height: 32rpx;position: absolute;right: 0;bottom: 0;"></image>
<image v-if="x.Sex==1" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/basic-nan2.png" style="width: 32rpx;height: 32rpx;position: absolute;right: 0;bottom: 0;"></image>
<image v-if="x.Sex==2" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/basic-nv2.png" style="width: 32rpx;height: 32rpx;position: absolute;right: 0;bottom: 0;"></image>
</view>
<view :style="{'width':(windowWidth-30-45-20-30)+'px','margin-left':'10px'}">
<view class="teinfo">{{x.UserName}}</view>
......@@ -46,8 +46,8 @@
<view class="interDList" style="border-bottom: none;">
<view style="position: relative;" @click="goUserinfo(x)">
<u-avatar :src="x.Photo" size="80"></u-avatar>
<image v-if="x.Sex==1" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/basic-nan.png" style="width: 32rpx;height: 32rpx;position: absolute;right: 0;bottom: 0;"></image>
<image v-if="x.Sex==2" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/basic-nv.png" style="width: 32rpx;height: 32rpx;position: absolute;right: 0;bottom: 0;"></image>
<image v-if="x.Sex==1" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/basic-nan2.png" style="width: 32rpx;height: 32rpx;position: absolute;right: 0;bottom: 0;"></image>
<image v-if="x.Sex==2" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/basic-nv2.png" style="width: 32rpx;height: 32rpx;position: absolute;right: 0;bottom: 0;"></image>
</view>
<view class="interDList-r" :style="{'width':(windowWidth-30-45-20-30)+'px','margin-left':'10px'}">
<view class="teinfo">{{x.UserName}}</view>
......@@ -257,7 +257,7 @@ export default {
uni.navigateTo({
url: '/pages/blindDate/persondetails?UserId='+ x.UserId
});
innerAudioContext.stop();
}
},
......
......@@ -9,14 +9,14 @@
:style="{ height: '100%' }">
<view class="ftBox" v-if="type==1">
<view class="interDList" v-for="(x, i) in g" :key="i">
<view class="box-top">
<view class="box-top" @click="goUserinfo(x)">
<view class="box-top-l" >
<u-avatar :src="x.Photo" size="80"></u-avatar>
<image class="gstyle" v-if="x.Sex==1"
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/basic-nan-b.png">
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/basic-nan2.png">
</image>
<image class="gstyle" v-if="x.Sex==2"
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/basic-nv-b.png">
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/basic-nv2.png">
</image>
</view>
<view class="box-top-r">
......@@ -67,14 +67,14 @@
</view>
<view class="ftBox" v-if="type==2">
<view class="interDList" v-for="(x, i) in g" :key="i">
<view class="box-top">
<view class="box-top" @click="goUserinfo(x)">
<view class="box-top-l" >
<u-avatar :src="x.Photo" size="80"></u-avatar>
<image class="gstyle" v-if="x.Sex==1"
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/basic-nan-b.png">
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/basic-nan2.png">
</image>
<image class="gstyle" v-if="x.Sex==2"
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/basic-nv-b.png">
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/basic-nv2.png">
</image>
</view>
<view class="box-top-r">
......@@ -141,6 +141,7 @@
nomore: "没有更多了",
},
windowWidth: 0,
showone:true,
msgType: {
}
......@@ -159,10 +160,15 @@
this.loading = false;
this.count = res.data.count;
this.g = this.g.concat(res.data.pageData);
console.log(this.g)
this.page_count = res.data.pageCount;
if (this.page_count == 1) {
this.status = "nomore";
}
if(this.showone == true && this.g.length>0){
this.setAllMsgSee()
this.showone = false
}
}
}
);
......@@ -202,15 +208,21 @@
},
goUserinfo(x){
uni.navigateTo({
url: '/pages/blindDate/persondetails?UserId='+ x.UserId
url: '/pages/blindDate/persondetails?UserId='+ x.CreateBy
});
},
//设置全部消息为已看
setAllMsgSee() {
let ids=""
if(this.msg.SelectType==1){
ids="1,2"
}else if(this.msg.SelectType==2){
ids="3,4,5,6"
}
this.request2({
url: '/api/AppletMiai/DelMiaiMessageInfoBatch',
data: {
TypeIds: this.msg.SelectType
TypeIds: ids
},
},
res => {
......@@ -222,9 +234,7 @@
}
},
onShow() {
if(this.g.length>0){
this.setAllMsgSee()
}
},
created() {
this.mainColor = this.$uiConfig.mainColor;
......@@ -233,6 +243,7 @@
this.windowWidth = this.$utils.SystemInfo().windowWidth;
},
mounted() {
let currentPages = getCurrentPages();
// let u = "/" + currentPages[currentPages.length - 1].route;
// let pages = wx.getStorageSync("basedata") ?
......@@ -247,6 +258,7 @@
title: this.pageTitle,
});
},
onLoad(options) {
this.msg.SelectType = options.pageType;
......
<template>
<view class="range-slider" :style="'width:' + width + 'rpx;height:' + height + 'rpx'">
<view class="range-bar" :style="'width:100%;height:' + barHeight + 'rpx'">
<view class="range-bar-bg" :style="'background-color:' + backgroundColor + ''"></view>
<view class="range-bar-progress" :style="'margin-left:' + progressBarLeft + 'rpx;width:' + progressBarWidth + 'rpx;background-color:' + activeColor + ''"></view>
</view>
<view
class="block"
:class="{ active: isMinActive }"
:style="'width:' + blockSize + 'rpx;height:' + blockSize + 'rpx;margin-left:' + minBlockLeft + 'rpx;'"
@touchstart="_onBlockTouchStart"
@touchmove.stop="_onBlockTouchMove"
@touchend="_onBlockTouchEnd"
:data-left="minBlockLeft"
data-tag="minBlock"
>
<slot name="minBlock"></slot>
</view>
<view
class="block"
:class="{ active: isMaxActive }"
:style="'width:' + blockSize + 'rpx;height:' + blockSize + 'rpx;margin-left:' + maxBlockLeft + 'rpx;'"
@touchstart="_onBlockTouchStart"
@touchmove.stop="_onBlockTouchMove"
@touchend="_onBlockTouchEnd"
:data-left="maxBlockLeft"
data-tag="maxBlock"
>
<slot name="maxBlock"></slot>
</view>
</view>
</template>
<script>
/**
* range-slider v1.0.6
*/
const _windowWidth = uni.getSystemInfoSync().windowWidth;
export default {
data() {
return {
isMinActive: false,
isMaxActive: false,
//#ifdef H5
MAX_LENGTH: 294,
maxBlockLeft: 300,
//#endif
// #ifndef H5
MAX_LENGTH: 700,
maxBlockLeft: 350,
// #endif
minBlockLeft: 0,
progressBarLeft: 0,
progressBarWidth: 350,
originalMinValue: 0,
originalMaxValue: 0
};
},
components: {},
props: {
//组件宽度
width: {
type: Number,
default: 750
},
//组件高度
height: {
type: Number,
default: 100
},
//滑块大小
blockSize: {
type: Number,
default: 50
},
//区间进度条高度
barHeight: {
type: Number,
default: 5
},
//背景条颜色
backgroundColor: {
type: String,
default: '#e9e9e9'
},
//已选择的颜色
activeColor: {
type: String,
default: '#1aad19'
},
//最小值
min: {
type: Number,
default: 0
},
//最大值
max: {
type: Number,
default: 100
},
//设置初始值
values: {
type: Array,
default: function() {
return [0, 100];
}
},
//步长值
step: {
type: Number,
default: 1
},
//live模式,是否动态更新
liveMode: {
type: Boolean,
default: true
}
},
created: function() {
//使用自定义组件编译模式时,支持生命周期为:created
this._refresh();
},
onLoad: function(option) {
//不使用自定义组件编译模式时,支持生命周期为:onload
this._refresh();
},
onUnload: function() {},
watch: {
//组件宽度
width: function(newVal, oldVal, changedPath) {
var that = this;
if (newVal != that.width) {
this._refresh();
}
},
//滑块大小
blockSize: function(newVal, oldVal, changedPath) {
var that = this;
if (newVal != that.blockSize) {
this._refresh();
}
},
//最小值
min: function(newVal, oldVal, changedPath) {
var that = this;
if (newVal != that.min) {
that._refresh();
}
},
//最大值
max: function(newVal, oldVal, changedPath) {
var that = this;
if (newVal != that.max) {
that._refresh();
}
},
//设置初始值
values: function(newVal, oldVal, changedPath) {
var that = this;
var values = that.values;
console.log('refresh', newVal, oldVal);
if (that._isValuesValid(newVal) && that._isValuesValid(values)) {
if (values[0] != oldVal[0] || values[1] != oldVal[1]) that._refresh();
}
}
},
methods: {
//补0
_pad: function(num, n) {
return Array(n - ('' + num).length + 1).join(0) + num;
},
_pxToRpx: function(px) {
return (750 * px) / _windowWidth;
},
_onBlockTouchStart: function(e) {
let tag = e.target.dataset.tag;
if (tag == 'minBlock' || tag == 'maxBlock') {
this.isMinActive = tag == 'minBlock';
this.isMaxActive = tag == 'maxBlock';
//兼容h5平台及某版本微信
if (e.hasOwnProperty('changedTouches')) {
this._blockDownX = e.changedTouches[0].pageX;
} else {
this._blockDownX = e.pageX;
}
//#ifdef H5
this._blockLeft = parseFloat(e.target.dataset.left);
//#endif
// #ifndef H5
this._blockLeft = e.target.dataset.left;
// #endif
this._curBlock = e.target.dataset.tag;
}
},
_onBlockTouchMove: function(e) {
let tag = e.target.dataset.tag;
if (tag == 'minBlock' || tag == 'maxBlock') {
var that = this;
var values = that._calculateValues(e);
that._refreshProgressBar(values[2], values[3]);
that._refreshBlock(values[2], values[3]);
//拖动时也触发事件
var eventDetail = {
minValue: this.formatNumber(values[0], this.step),
maxValue: this.formatNumber(values[1], this.step),
fromUser: true,
originalValue: {
minValue: values[0],
maxValue: values[1]
}
};
this.originalMinValue = values[0];
this.originalMaxValue = values[1];
var eventOption = {};
//
if (this.liveMode) that.$emit('rangechange', eventDetail, eventOption);
}
},
_onBlockTouchEnd: function(e) {
let tag = e.target.dataset.tag;
this.isMinActive = false;
this.isMaxActive = false;
if (tag == 'minBlock' || tag == 'maxBlock') {
var that = this;
var values = that._calculateValues(e.mp.changedTouches[0]);
that._refreshProgressBar(values[2], values[3]);
that._refreshBlock(values[2], values[3]);
var eventDetail = {
minValue: this.formatNumber(values[0], this.step),
maxValue: this.formatNumber(values[1], this.step),
fromUser: true,
originalValue: {
minValue: values[0],
maxValue: values[1]
}
};
this.originalMinValue = values[0];
this.originalMaxValue = values[1];
var eventOption = {};
that.$emit('rangechange', eventDetail, eventOption);
}
},
_isValuesValid: function(values) {
return values != null && values != undefined && values.length == 2;
},
/**
* 根据手势计算相关数据
*/
_calculateValues: function(e) {
var pageX = e.pageX;
//兼容h5平台
if (e.hasOwnProperty('changedTouches')) {
pageX = e.changedTouches[0].pageX;
}
var that = this;
var moveLength = pageX - that._blockDownX;
var left = that._blockLeft + that._pxToRpx(moveLength);
left = Math.max(0, left);
left = Math.min(left, that.MAX_LENGTH);
var minBlockLeft = that.minBlockLeft;
var maxBlockLeft = that.maxBlockLeft;
if (that._curBlock == 'minBlock') {
minBlockLeft = left;
} else {
maxBlockLeft = left;
}
var range = that.max - that.min;
var minLeft = Math.min(minBlockLeft, maxBlockLeft);
var maxLeft = Math.max(minBlockLeft, maxBlockLeft);
var minValue = (minLeft / that.MAX_LENGTH) * range + that.min;
var maxValue = (maxLeft / that.MAX_LENGTH) * range + that.min;
return [minValue, maxValue, minLeft, maxLeft];
},
/**
* 计算滑块坐标
*/
_calculateBlockLeft: function(minValue, maxValue) {
var that = this;
var blockSize = that.blockSize;
var range = that.max - that.min;
var minLeft = ((minValue - that.min) / range) * that.MAX_LENGTH;
var maxLeft = ((maxValue - that.min) / range) * that.MAX_LENGTH;
return [minLeft, maxLeft];
},
/**
* 刷新进度条视图
*/
_refreshProgressBar: function(minBlockLeft, maxBlockLeft) {
var that = this;
var blockSize = that.blockSize;
that.progressBarLeft = minBlockLeft + blockSize / 2;
that.progressBarWidth = Math.abs(maxBlockLeft - minBlockLeft);
},
/**
* 刷新滑块视图
*/
_refreshBlock: function(minBlockLeft, maxBlockLeft) {
var that = this;
that.minBlockLeft = minBlockLeft;
that.maxBlockLeft = maxBlockLeft;
},
/**
* 刷新整个视图
*/
_refresh: function() {
var that = this;
var MAX_LENGTH = that.width - that.blockSize;
that.MAX_LENGTH = MAX_LENGTH;
that.maxBlockLeft = MAX_LENGTH;
that.progressBarWidth = MAX_LENGTH;
var values = that.values;
if (this.originalMinValue && this.originalMinValue) {
values = [this.originalMinValue || values[0], this.originalMaxValue || values[1]];
}
if (that._isValuesValid(values)) {
values[0] = Math.max(that.min, values[0]);
values[0] = Math.min(values[0], that.max);
values[1] = Math.max(that.min, values[1]);
values[1] = Math.min(values[1], that.max);
var leftValues = that._calculateBlockLeft(values[0], values[1]);
that._refreshProgressBar(leftValues[0], leftValues[1]);
that._refreshBlock(leftValues[0], leftValues[1]);
}
},
formatNumber(num, step) {
//格式化数字,保留几位小数
let stepStr = '' + step;
let index = stepStr.indexOf('.');
let len = index > -1 ? stepStr.length - index - 1 : 0;
let offestNum = parseInt(1 + Array(('' + len).length + 1).join(0)) * 0.1;
let tmpNum = num * offestNum;
return ((parseInt(tmpNum / step + (step > 1 ? 1 : step) * 0.5) * step) / offestNum).toFixed(len);
}
}
};
</script>
<style>
.range-slider {
position: relative;
}
.range-bar {
position: absolute;
}
.range-bar {
position: absolute;
top: 50%;
transform: translate(0, -50%);
border-radius: 10000rpx;
}
.range-bar-bg {
position: absolute;
width: 100%;
height: 100%;
border-radius: 10000rpx;
}
.range-bar-progress {
position: absolute;
width: 100%;
height: 100%;
background-color: blueviolet;
}
.block {
position: absolute;
top: 50%;
transform: translate(0, -50%);
background: #fff;
border-radius: 50%;
box-shadow: 0rpx 0rpx 6rpx #ccc;
}
.block.active {
transform: translate(0, -50%) scale(1.5);
}
</style>
This diff is collapsed.
<template>
<u-popup :maskCloseAble="maskCloseAble" mode="bottom" :popup="false" v-model="value" length="auto"
:safeAreaInsetBottom="safeAreaInsetBottom" @close="close" z-index="999">
<view class="u-picker-header" @touchmove.stop.prevent="stop" catchtouchmove="stop">
<view class="u-btn-picker u-btn-picker--tips" hover-class="u-opacity"
:hover-stay-time="150" @tap="getResult('cancel')">取消</view>
<view class="u-btn-picker u-btn-picker--primary" hover-class="u-opacity"
:hover-stay-time="150" @touchmove.stop="" @tap.stop="getResult('confirm')">确定</view>
</view>
<view class="u-picker-body">
<picker-view :value="pickVal" @change="bindChange" class="u-picker-view">
<picker-view-column>
<view class="u-column-item" v-for="(item,index) in districtsObj.provinces" :key="index">
<view class="u-line-1">
{{item.Name}}
</view>
</view>
</picker-view-column>
<picker-view-column>
<view class="u-column-item" v-for="(item,index) in districtsObj.cities" :key="index">
<view class="u-line-1">
{{item.Name}}
</view>
</view>
</picker-view-column>
<picker-view-column>
<view class="u-column-item" v-for="(item,index) in districtsObj.areas" :key="index">
<view class="u-line-1">
{{item.Name}}
</view>
</view>
</picker-view-column>
</picker-view>
</view>
</u-popup>
</template>
<script>
import uPopup from './u-popup'
export default {
props: {
safeAreaInsetBottom: {
type: Boolean,
default: false
},
// 是否允许通过点击遮罩关闭Picker
maskCloseAble: {
type: Boolean,
default: true
},
// 通过双向绑定控制组件的弹出与收起
value: {
type: Boolean,
default: false
},
},
data() {
return {
pickVal:[0, 0, 0],
districtsObj: {
provinces: [],
cities: [],
areas: [],
},
province: 0,
city: 0,
area: 0
}
},
watch: {
// 如果地区发生变化,为了让picker联动起来,必须重置this.citys和this.areas
province(val) {
this.loadCities(this.districtsObj.provinces[this.province].ID);
},
city(val) {
this.loadAreas(this.districtsObj.cities[this.city].ID);
}
},
mounted() {
console.log(this.value)
this.loadDistrict()
},
methods: {
close() {
this.$emit('input', false);
},
async loadDistrict() {
this.loadProvinces()
},
loadProvinces() { // 加载省份
this.request2(
{
url: '/api/Destination/GetChildList',
data: {Id:1}
},
res => {
let data = res.data
this.districtsObj.provinces = data
this.loadCities(data[0].ID)
},
);
},
loadCities(Id) {
this.request2(
{
url: '/api/Destination/GetChildList',
data: {Id:Id}
},
res => {
let data = res.data
this.districtsObj.cities = data
this.loadAreas(data[0].ID)
},
);
},
loadAreas(Id) {
this.request2(
{
url: '/api/Destination/GetChildList',
data: {Id:Id}
},
res => {
let data = res.data
this.districtsObj.areas = data
},
);
},
bindChange(event) {
this.pickVal = event.detail.value;
let i = 0;
this.province = this.pickVal[i++];
this.city = this.pickVal[i++];
this.area = this.pickVal[i++];
},
getResult(event = null) {
let result = {
province: this.districtsObj.provinces[this.province],
city: this.districtsObj.cities[this.city],
area: this.districtsObj.areas[this.area],
}
if (event) this.$emit(event, result);
this.close();
}
},
components:{
uPopup
}
}
</script>
<style lang="scss" scoped>
.u-datetime-picker {
position: relative;
z-index: 999;
}
.u-picker-view {
height: 100%;
box-sizing: border-box;
}
.u-picker-header {
width: 100%;
height: 90rpx;
padding: 0 40rpx;
display: flex;
justify-content: space-between;
align-items: center;
box-sizing: border-box;
font-size: 32rpx;
background: #ddd;
position: relative;
}
.u-picker-header::after {
content: '';
position: absolute;
border-bottom: 1rpx solid #eaeef1;
-webkit-transform: scaleY(0.5);
transform: scaleY(0.5);
bottom: 0;
right: 0;
left: 0;
}
.u-picker-body {
width: 100%;
height: 500rpx;
overflow: hidden;
background-color: #fff;
}
.u-column-item {
display: flex;
align-items: center;
justify-content: center;
font-size: 32rpx;
padding: 0 8rpx;
}
.u-text {
font-size: 24rpx;
padding-left: 8rpx;
}
.u-btn-picker {
padding: 16rpx;
box-sizing: border-box;
text-align: center;
text-decoration: none;
}
.u-opacity {
opacity: 0.5;
}
.u-btn-picker--primary {
}
.u-btn-picker--tips {
}
</style>
<template>
<view class="u-mask" :style="[maskStyle]" :class="[show ? 'u-mask-show' : '']" @tap="click" @touchmove.stop.prevent>
<slot />
</view>
</template>
<script>
/**
* mask 遮罩
* @description 创建一个遮罩层,用于强调特定的页面元素,并阻止用户对遮罩下层的内容进行操作,一般用于弹窗场景
* @tutorial https://www.uviewui.com/components/mask.html
* @property {Boolean} show 是否显示遮罩(默认false)
* @property {String Number} z-index z-index 层级(默认1070)
* @property {Object} custom-style 自定义样式对象,见上方说明
* @property {String Number} duration 动画时长,单位毫秒(默认300)
* @property {Boolean} zoom 是否使用scale对这招进行缩放(默认true)
* @property {Boolean} mask-click-able 遮罩是否可点击,为false时点击不会发送click事件(默认true)
* @event {Function} click mask-click-able为true时,点击遮罩发送此事件
* @example <u-mask :show="show" @click="show = false"></u-mask>
*/
export default {
name: "u-mask",
props: {
// 是否显示遮罩
show: {
type: Boolean,
default: false
},
// 层级z-index
zIndex: {
type: [Number, String],
default: '1'
},
// 用户自定义样式
customStyle: {
type: Object,
default () {
return {}
}
},
// 遮罩的动画样式, 是否使用使用zoom进行scale进行缩放
zoom: {
type: Boolean,
default: true
},
// 遮罩的过渡时间,单位为ms
duration: {
type: [Number, String],
default: 300
},
// 是否可以通过点击遮罩进行关闭
maskClickAble: {
type: Boolean,
default: true
}
},
computed: {
maskStyle() {
let style = {};
style.backgroundColor = "rgba(0, 0, 0, 0.6)";
style.zIndex = this.zIndex ? this.zIndex : this.$u.zIndex.mask;
style.transition = `all ${this.duration / 1000}s ease-in-out`;
// 缩放
if (this.zoom == true) style.transform = 'scale(1.2, 1.2)';
// 判断用户传递的对象是否为空
if (Object.keys(this.customStyle).length) style = { ...style,
...this.customStyle
};
// 合并自定义的样式
//Object.assign(style, customStyle);
return style;
}
},
methods: {
click() {
if (!this.maskClickAble) return;
this.$emit('click');
}
}
}
</script>
<style lang="scss" scoped>
.u-mask {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
opacity: 0;
visibility: hidden;
}
.u-mask-show {
opacity: 1;
visibility: visible;
transform: scale(1);
}
</style>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -20,8 +20,8 @@
<view class="interDList" v-for="(x, i) in g" :key="i">
<view style="position: relative;" @click="goUserinfo(x)">
<u-avatar :src="x.Photo" size="80"></u-avatar>
<image v-if="x.Sex==1" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/basic-nan.png" style="width: 32rpx;height: 32rpx;position: absolute;right: 0;bottom: 0;"></image>
<image v-if="x.Sex==1" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/basic-nv.png" style="width: 32rpx;height: 32rpx;position: absolute;right: 0;bottom: 0;"></image>
<image v-if="x.Sex==1" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/basic-nan2.png" style="width: 32rpx;height: 32rpx;position: absolute;right: 0;bottom: 0;"></image>
<image v-if="x.Sex==1" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/basic-nv2.png" style="width: 32rpx;height: 32rpx;position: absolute;right: 0;bottom: 0;"></image>
</view>
<view :style="{'width':(windowWidth-30-45-20-30)+'px','margin-left':'10px'}">
<view class="teinfo">{{x.Name}}</view>
......
......@@ -20,8 +20,8 @@
<view class="interDList" v-for="(x, i) in g" :key="i">
<view style="position: relative;" @click="goUserinfo(x)">
<u-avatar :src="x.Photo" size="80"></u-avatar>
<image v-if="x.Sex==1" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/basic-nan.png" style="width: 32rpx;height: 32rpx;position: absolute;right: 0;bottom: 0;"></image>
<image v-if="x.Sex==2" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/basic-nv.png" style="width: 32rpx;height: 32rpx;position: absolute;right: 0;bottom: 0;"></image>
<image v-if="x.Sex==1" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/basic-nan2.png" style="width: 32rpx;height: 32rpx;position: absolute;right: 0;bottom: 0;"></image>
<image v-if="x.Sex==2" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/basic-nv2.png" style="width: 32rpx;height: 32rpx;position: absolute;right: 0;bottom: 0;"></image>
</view>
<view :style="{'width':(windowWidth-30-45-20-30)+'px','margin-left':'10px'}">
<view class="teinfo">{{x.Name}}</view>
......
This diff is collapsed.
......@@ -93,7 +93,7 @@ export default {
show:false,
current:0,
list: [
{ name: "不限" },
{ name: "全部" },
{ name: "正常" },
{ name: "取消" },
],
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -9,7 +9,6 @@
<template>
<view class="richtext">
<jinEdit placeholder="开始输入..." @editOk="editOk" :uploadFileUrl="action" :html="Content"></jinEdit>
</view>
</template>
......@@ -48,7 +47,6 @@ export default {
if(option && option.Content){
this.Content = option.Content
}
},
methods: {
editOk(res){
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -228,7 +228,11 @@
</textarea>
<view style="width: 100%;height: 45px;display: flex;align-items: center;font-size: 14px;">
<image src='https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/friend-ht.png' style="width: 35px;height: 35px;margin-right: 10px;" @click="show=true"></image>
<!-- <image src='https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/friend-ht.png' style="width: 35px;height: 35px;margin-right: 10px;" @click="show=true"></image> -->
<view @click="show=true" style="height: 35px;display: flex;align-items: center;padding: 0 5px;border-radius: 4px;margin-right: 10px;">
<image src='https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/friend-ht.png' style="width: 25px;height: 25px;margin-right: 3px;" ></image>
选择话题
</view>
<view :style="{color:mainColor}" v-if="TalkName!=''">#{{TalkName}}#</view>
</view>
<text v-if='addMsg.FileType==1 ' style="font-size: 12px;color: #333333">上传图片<span style='color: ;#A9A9A9'>(图片无上限)</span> </text>
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -399,7 +399,7 @@
});
}else{
uni.navigateTo({
url: '/pages/order-submit/education-submit?formData=' + encodeURIComponent(JSON.stringify(forms)) +
url: '/pages/order-submit/neweducation-submit?formData=' + encodeURIComponent(JSON.stringify(forms)) +
'&IsFormShoppingCart=2&ShoppingCartIdList=' + JSON.stringify(ShoppingCartIdList)
});
}
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment