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

适配支付宝小程序

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