Commit e5c1bfdf authored by 高宇's avatar 高宇

跳转龙徽小程序

parent 466d9074
......@@ -4,6 +4,29 @@
<view class="tabs">
<u-tabs :list="list" :is-scroll="false" active-color="red" :current="current" @change="change"></u-tabs>
</view>
<view class="activity-list" v-for="item in activityList" @click="gotodetail(item)">
<view class="leftlist">
<image :src="baseURL+item.imgUrl" class="leftlistimage">
</view>
<view class="rightlist">
<view class="rightlist-title">{{item.name}}</view>
<!-- <view class="rightlist-message">活动内容活动内容活动内容活动内容活动内容活动内容</view> -->
<view class="rightlist-time">
<view class="timeicon">
<u-icon name="clock" color="#666666;" size="28"></u-icon>
</view>
<view class="timetext">{{item.activityBeginDate}}</view>
</view>
<view class="rightlist-address">
<view class="addressicon">
<u-icon name="map" color="#D84848;" size="28"></u-icon>
</view>
<view class="addresstext" v-if="item.address">{{item.address}}</view>
<view class="addresstext" v-else>-</view>
</view>
</view>
</view>
<view class="activity-nomore">~ 没有更多啦 ~</view>
</view>
</template>
......@@ -11,6 +34,17 @@
export default{
data(){
return{
isdata: false,
url: 'http://192.144.239.97:20043/file/static/my/zanwushuju.png',
list3: [], // 活动banner图
baseURL: 'http://192.144.239.97:20043/file/',
StatusBarHeight: '',
activityList:[], // 活动列表
queryParams: {
orderBy: 0,
status: 1
},
buttonstatus: 1,
current: 0,
list: [
{name: '全部'},
......@@ -35,5 +69,87 @@
height: 5vh;
background-color: #fff;
}
.activity-list {
display: flex;
margin: 30rpx 34rpx 0 42rpx;
align-items: center;
border-bottom: 1px solid #F1F1F1;
.leftlist {
margin-right: 26rpx;
.leftlistimage {
width: 220rpx;
height: 166rpx;
border-radius: 12px 12px 12px 12px;
}
}
.rightlist {
.rightlist-title {
font-size: 16px;
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
font-weight: 500;
color: #222222;
margin-bottom: 34rpx;
}
.rightlist-message {
font-size: 14px;
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
font-weight: 400;
color: #666666;
margin-bottom: 26rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
width: calc(100vw - 220rpx - 26rpx - 42rpx - 34rpx);
}
.rightlist-time {
display: flex;
margin-bottom: 24rpx;
align-items: center;
.timeicon {
margin-right: 14rpx;
}
.timetext {
font-size: 14px;
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
font-weight: 400;
color: #666666;
}
}
.rightlist-address {
display: flex;
margin-bottom: 30rpx;
align-items: center;
.addressicon {
margin-right: 14rpx;
margin-top: 2rpx;
}
.addresstext {
font-size: 14px;
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
font-weight: 400;
color: #DF6969;
}
}
}
}
.activity-nomore {
height: 88rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 13px;
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
font-weight: 400;
color: #B9B9B9;
}
}
</style>
\ No newline at end of file
......@@ -11,10 +11,9 @@
<u-swiper height="400" :list="list1" @click="toTopic(topic.id)"></u-swiper>
</view>
<view class="card">
<u-grid :border="false" col="4" @click="click">
<u-grid-item v-for="(baseListItem,baseListIndex) in baseList2" :key="baseListIndex">
<u-icon :customStyle="{paddingTop:20+'rpx',paddingBottom:20+'rpx'}" :name="baseListItem.name"
:size="40"></u-icon>
<u-grid :border="false" :col="col" @click="click">
<u-grid-item v-for="(baseListItem,baseListIndex) in baseList2" :key="baseListIndex" @click="handleClick(baseListItem)">
<image src="../../static/icon/wode_icon_daifukuan@2x.png" style="width: 40px;height: 40px;"></image>
<text class="grid-text">{{baseListItem.title}}</text>
</u-grid-item>
</u-grid>
......@@ -56,11 +55,13 @@
activeNav: 0,
list1: [],
newList: [],
col: 4,
hotList: [],
topicList: [],
baseList2: [{
name: 'coupon',
title: '我的卡券'
title: '我的卡券',
},
{
name: 'email',
......@@ -70,6 +71,10 @@
name: 'star',
title: '核销'
},
{
name: 'scan',
title: '会员码'
},
{
name: 'scan',
title: '会员码'
......@@ -79,11 +84,34 @@
},
onLoad() {
this.init()
this.col = this.baseList2.length
console.log("this.col",this.col)
},
onShow() {
this.activeNav = 0;
},
methods: {
// 测试跳转小程序
handleClick(item) {
console.log('item',item)
if(item.name === 'coupon'){
console.log('测试跳转小程序')
uni.navigateToMiniProgram({
appId: 'wx17705d910b8069e5',
path: '/pages/index',
extraData: {
// 可以传递一些额外的数据
},
envVersion: 'trial',
success: () => {
console.log('跳转成功');
},
fail: (error) => {
console.log('跳转失败', error);
}
});
}
},
init() {
this.$u.get('category/list').then(res => {
let navList = res
......
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