Commit 0488df44 by 胡悦

提交活动轮播

1 parent 70dbb42e
.svn/
\ No newline at end of file \ No newline at end of file
.svn/
project.config.json
project.private.config.json
sitemap.json
miniprogram_npm
node_modules
\ No newline at end of file \ No newline at end of file
...@@ -16,7 +16,8 @@ ...@@ -16,7 +16,8 @@
"pages": [ "pages": [
"pages/index/index", "pages/index/index",
"pages/measure/measure/measure", "pages/measure/measure/measure",
"pages/measure/measureResult/measureResult" "pages/measure/measureResult/measureResult",
"pages/activityDetail/activityDetail"
] ]
} }
], ],
......
{
"requires": true,
"lockfileVersion": 1,
"dependencies": {
"glsx-applet-component": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/glsx-applet-component/-/glsx-applet-component-1.0.2.tgz",
"integrity": "sha512-aPIWJLsPl4TIQs7SrMMZy5aLgJGvQ168KpCNhgK0VI/FAsFP6wfsmYOEYslJKBlM3/Gr2efaEV5ZdqY70P14Kw=="
}
}
}
{
"name": "ai-card",
"version": "1.0.0",
"description": "",
"main": "app.js",
"dependencies": {
"glsx-applet-component": "^1.0.2"
},
"devDependencies": {},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "http://huyue@192.168.3.233:8090/saas/mini-program/ai-card.git"
},
"author": "",
"license": "ISC"
}
// packagesList/pages/activityDetail/activityDetail.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file \ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* packagesList/pages/activityDetail/activityDetail.wxss */
\ No newline at end of file \ No newline at end of file
<!--packagesList/pages/activityDetail/activityDetail.wxml-->
<text>packagesList/pages/activityDetail/activityDetail.wxml</text>
/*
* @Description:
* @Author: huyue
* @Date: 2022-12-13 14:26:56
* @LastEditors: huyue
* @LastEditTime: 2022-12-13 19:15:12
*/
// pages/tab/index/components/activity/activity.js
import { componentsMixin } from "../../../../../mixins/index";
Component({
behaviors: [componentsMixin],
/**
* 组件的属性列表
*/
properties: {
},
/**
* 组件的初始数据
*/
data: {
current: 0,
activityList:[{
id: 1,
status: 1,
activityText: '售后直播众筹活动,本月活动进行中100+门店'
},
{
id: 2,
status: 2,
activityText: '众筹活动1234'
}]
},
/**
* 组件的方法列表
*/
methods: {
toActivity(e) {
console.log(this.data.current, e.target.dataset)
const {activityId} = e.target.dataset
wx.$router.go('/packagesList/pages/activityDetail/activityDetail')
}
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* pages/tab/index/components/activity/activity.wxss */
.activity-scroll {
display: flex;
justify-items: center;
background: #FFF4D8;
border-radius: 8rpx;
margin: 12rpx 20rpx 26rpx;
font-weight: 400;
font-size: 26rpx;
color: #F68B0C;
letter-spacing: 0;
// line-height: 32rpx;
padding: 11rpx 12rpx;
height: 36rpx;
.swiper-item {
display: flex;
align-items: center;
}
.bg-activity {
position: relative;
width: 126rpx;
height: 36rpx;
margin-right: 12rpx;
image {
width: 100%;
height: 100%;
}
.activity-status {
position: absolute;
width: 126rpx;
// height: 36rpx;
font-weight: 500;
font-size: 20rpx;
color: #FFFFFF;
letter-spacing: 0;
text-align: center;
line-height: 32rpx;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
}
}
}
\ No newline at end of file \ No newline at end of file
<!--pages/tab/index/components/activity/activity.wxml-->
<view>
<swiper class="activity-scroll" vertical="true" circular="true" autoplay current="{{current}}" interval="3000">
<block wx:for="{{activityList}}" wx:key="index">
<swiper-item class="swiper-item" bindtap="toActivity" data-activityId="{{item.id}}">
<view class="bg-activity">
<image webp src="{{IMGURL}}home/bg-activity.png?v={{img_version}}"></image>
<view class="activity-status">{{item.status == 1 ? '活动进行中' : '活动已结束'}}</view>
</view>
{{item.activityText}}
</swiper-item>
</block>
</swiper>
</view>
...@@ -100,9 +100,6 @@ Page({ ...@@ -100,9 +100,6 @@ Page({
}); });
} }
}, },
toApplication() {
console.log(2323)
},
jump() { jump() {
wx.$router.go('/packagesList/pages/measure/measure/measure') wx.$router.go('/packagesList/pages/measure/measure/measure')
......
{ {
"usingComponents": { "usingComponents": {
"user-info": "../../../components/UserInfo/UserInfo", "user-info": "../../../components/UserInfo/UserInfo",
"company-introduce": "./components/companyIntroduce/companyIntroduce" "company-introduce": "./components/companyIntroduce/companyIntroduce",
"activity-info": "./components/activity/activity",
"glsx-discover": "glsx-applet-component/discover/index"
}, },
"navigationBarTitleText": "广联数科智能名片" "navigationBarTitleText": "广联数科智能名片"
} }
\ No newline at end of file \ No newline at end of file
...@@ -14,7 +14,8 @@ ...@@ -14,7 +14,8 @@
</view> </view>
<view class="main-content"> <view class="main-content">
<block wx:if="{{curTabIndex == 0}}"> <block wx:if="{{curTabIndex == 0}}">
增值转化内容 <activity-info></activity-info>
<glsx-discover></glsx-discover>
<button bindtap="jump">跳转详情</button> <button bindtap="jump">跳转详情</button>
</block> </block>
<block wx:if="{{curTabIndex == 1}}">系统订阅</block> <block wx:if="{{curTabIndex == 1}}">系统订阅</block>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!