Commit 396f5baa authored by 罗超's avatar 罗超

适配支付宝小程序

parent 6d7df0a9
<template>
<div class="mynav" :style="{'background':bg}">
<swiper
:autoplay="false"
:style="{'height': height + 'rpx' }"
>
<div class="mynav" :style="{ background: bg }">
<swiper :autoplay="false" :style="{ height: height + 'rpx' }">
<swiper-item v-for="(item, index) in cols" :key="index">
<view :style="[formatStyle]">
<!-- #ifdef MP-WEIXIN -->
<u-grid :col="navs.columns" align="left" :border="false">
<u-grid-item
v-for="(c, i) in item"
......@@ -16,11 +14,37 @@
<image
:src="getIconLink(c.icon)"
mode="widthFix"
style="width: 90rpx; height: 90rpx;"
style="width: 90rpx; height: 90rpx"
/>
<text :style="{'color':navs.color}" style="font-size:26rpx;margin-top:10rpx;">{{ c.name }}</text>
<text
:style="{ color: navs.color }"
style="font-size: 26rpx; margin-top: 10rpx"
>{{ c.name }}</text
>
</u-grid-item>
</u-grid>
<!-- #endif -->
<!-- #ifdef MP-ALIPAY -->
<view class="gridnav-box">
<view
v-for="(c, i) in item"
:key="i"
class="grid-text"
@click="clickHandler(c.url)"
>
<image
:src="getIconLink(c.icon)"
mode="widthFix"
style="width: 90rpx; height: 90rpx"
/>
<view
:style="{ color: navs.color }"
style="font-size: 26rpx; margin-top: 10rpx; text-align: center"
>{{ c.name }}</view
>
</view>
</view>
<!-- #endif -->
</view>
</swiper-item>
</swiper>
......@@ -35,7 +59,7 @@ export default {
cols: [],
formatStyle: "",
height: 204,
bg:""
bg: "",
};
},
created() {
......@@ -65,7 +89,7 @@ export default {
}
this.formatStyle = { backgroundColor: this.navs.backgroundColor };
}
this.bg=this.formatStyle.backgroundColor
this.bg = this.formatStyle.backgroundColor;
},
methods: {
clickHandler(url) {
......@@ -83,7 +107,14 @@ export default {
margin-top: 4rpx;
color: "#330330";
}
.grid-text view{
background: transparent!important;
.grid-text view {
background: transparent !important;
}
.gridnav-box {
display: flex;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
padding: 0 30rpx;
}
</style>
<template>
<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="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>
<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 class="box-name">{{ item.name }}</view>
</view>
<view class="row">
<view class="boxtc-b-item" v-if="item.Age>0">{{item.Age}}</view>
<view class="boxtc-b-item" v-if="item.Age > 0"
>{{ item.Age }}</view
>
</view>
</view>
</view>
</view>
</waterfallsFlow>
</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="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-nan2.png" ></image>
<image class="gstyle" v-if="item.SexStr=='女'" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/basic-nv2.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="box-name">{{item.name}}</view>
<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 class="boxtc-b-item">{{item.Education}}</view>
<view class="boxtc-b-item">{{item.Marriage}}</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">
......@@ -39,14 +73,29 @@
</view> -->
</view>
<view class="box-img">
<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
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">
<view class="box-img-two-item" v-for="(x,y) in item.AlbumList" :key='y'>
<image :src="x" mode="aspectFill" style="width: 100%;height: 100%;border-radius: 15px;"></image>
<view v-if="navs.listStyle == 0" class="box-img-two">
<view
class="box-img-two-item"
v-for="(x, y) in item.AlbumList"
:key="y"
>
<image
:src="x"
mode="aspectFill"
style="width: 100%; height: 100%; border-radius: 15px"
></image>
</view>
<view style="width: 1px;height: 10px;"></view>
<view style="width: 1px; height: 10px"></view>
</view>
</view>
</view>
......@@ -54,58 +103,57 @@
</template>
<script>
import waterfallsFlow from './maramlee-waterfalls-flow.vue'
export default {
// import waterfallsFlow from './maramlee-waterfalls-flow.vue'
export default {
props: ["navs"],
components: { waterfallsFlow },
data(){
return{
type:2,
mainColor: '',
secondary: '',
}
// components: { waterfallsFlow },
data() {
return {
type: 2,
mainColor: "",
secondary: "",
};
},
created() {
this.mainColor = this.$uiConfig.mainColor;
this.secondary = this.$uiConfig.secondary;
},
methods:{
goDetail(x){
methods: {
goDetail(x) {
uni.navigateTo({
url: '/pages/blindDate/persondetails?UserId=' + x.id
url: "/pages/blindDate/persondetails?UserId=" + x.id,
});
}
}
}
},
},
};
</script>
<style>
.matchmaking-box{
.matchmaking-box {
display: flex;
flex-direction: column;
padding: 10px 0;
background-color: #fff;
}
.matchmaking .box-top{
}
.matchmaking .box-top {
width: 100%;
padding:0 15px;
padding: 0 15px;
height: 80rpx;
display: flex;
flex-direction: row;
align-items: center;
position: relative;
}
}
.matchmaking .gstyle{
.matchmaking .gstyle {
position: absolute;
left: 78rpx;
bottom: 0;
width: 32rpx;
height: 32rpx;
}
}
.matchmaking .boxt-center{
.matchmaking .boxt-center {
width: 1px;
flex: 1;
height: 80rpx;
......@@ -113,88 +161,91 @@
display: flex;
flex-direction: column;
justify-content: space-between;
}
.matchmaking .boxt-r{
}
.matchmaking .boxt-r {
width: 70px;
font-size: 11px;
color: #888888;
text-align: right;
}
.matchmaking .row{
}
.matchmaking .row {
display: flex;
flex-direction: row;
align-items: center;
}
.matchmaking .boxtc-t-f{
}
.matchmaking .boxtc-t-f {
width: 28px;
height:14px ;
height: 14px;
border-radius: 3px;
font-size: 10px;
background: #B2EEEC;
background: #b2eeec;
display: flex;
align-items: center;
justify-content: center;
}
.matchmaking .box-name{
}
.matchmaking .box-name {
font-size: 14px;
color: #111111;
margin-left: 5px;
width: calc(100vw - 30px - 40px - 28px - 15px - 70px);
overflow: hidden;display: inline-block;white-space: nowrap; text-overflow:ellipsis
}
.matchmaking .boxtc-b-item{
overflow: hidden;
display: inline-block;
white-space: nowrap;
text-overflow: ellipsis;
}
.matchmaking .boxtc-b-item {
font-size: 10px;
color: #858687;
height: 16px;
padding: 0 6px;
border-radius: 8px;
background: #F8F8F8;
background: #f8f8f8;
margin-right: 5px;
}
.matchmaking .box-img{
}
.matchmaking .box-img {
width: 100%;
margin-top: 15px;
}
.matchmaking .box-img-one{
}
.matchmaking .box-img-one {
padding: 0 15px;
border-radius: 15px;
width: 100%;
height: 420rpx;
}
.matchmaking .box-img-two{
}
.matchmaking .box-img-two {
display: -webkit-box;
overflow-x: scroll;
-webkit-overflow-scrolling: touch;
padding: 0 15px;
}
/* 隐藏下方的滚动条 */
.box-img-two::-webkit-scrollbar {
}
/* 隐藏下方的滚动条 */
.box-img-two::-webkit-scrollbar {
background-color: transparent;
}
}
.matchmaking .box-img-two-item{
.matchmaking .box-img-two-item {
width: 323px;
height: 450px;
border-radius: 15px;
margin-right: 10px;
overflow: hidden;
}
}
.matchmaking .pb-box{
.matchmaking .pb-box {
width: 100%;
padding: 10px 5px;
background: #FFF;
background: #fff;
border-bottom-left-radius: 6px;
border-bottom-right-radius: 6px;
display: flex;
align-items: center;
position: relative;
}
.matchmaking .gstyle2{
}
.matchmaking .gstyle2 {
position: absolute;
left: 64rpx;
top: 64rpx;
width: 24rpx;
height: 24rpx;
}
}
</style>
This diff is collapsed.
......@@ -9,7 +9,7 @@
right: 0;
z-index: 99999999;
border-top: 1upx solid #ddd;
padding-top:96rpx;
padding-top: 96rpx;
background: #fff;
}
.tabbarMainIphone {
......@@ -37,9 +37,9 @@
padding-bottom: 64upx;
}
.imgse {
/* width: 48upx; */
height: 48upx;
width: auto;
/* width: auto; */
width: 48upx;
}
.txtBtn {
font-size: 24upx;
......@@ -94,7 +94,6 @@
bottom: 10upx;
border-radius: 150upx;
}
</style>
<template>
<view
......@@ -117,14 +116,14 @@
class="imgse"
:fade-show="false"
v-if="active != i"
mode="heightFix"
mode="aspectFit"
:src="x.icon"
></image>
<image
class="imgse"
:fade-show="false"
v-if="active === i"
mode="heightFix"
mode="aspectFit"
:src="x.active_icon"
></image>
<text
......@@ -150,10 +149,10 @@ export default {
};
},
created() {
console.log('A join...')
console.log("A join...");
},
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 +165,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 +189,21 @@ 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]}`
// #ifdef MP-WEIXIN
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;
// #endif
// #ifdef MP-ALIPAY
this.crtPath = t[t.length - 1].$page.fullPath;
// #endif
this.navs.forEach((x, i) => {
if (x.url == this.crtPath) {
this.active = i;
......
......@@ -52,9 +52,7 @@
// 选项数据,如果传入了默认slot,此参数无效
options: {
type: Array,
default () {
return []
}
default: () =>[]
},
// 是否禁用此菜单项
disabled: {
......
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