食品券

This commit is contained in:
Mr.jiang 2024-07-23 22:45:12 +08:00
parent a1632cf726
commit 10ee602aae
6 changed files with 65 additions and 33 deletions

View File

@ -232,7 +232,7 @@
</view> </view>
<view class="box" @click="goNav('/pages/video/index')"> <view class="box" @click="goNav('/pages/video/index')">
<image src="../../static/index/function4.png"></image> <image src="../../static/index/function4.png"></image>
<view class="box_text">视频</view> <view class="box_text">视频</view>
</view> </view>
<!-- <view class="box" v-if="renzheng == 0 && XCXIsSelect != '否'" @click="goNav('/my/renzheng/rzType')"> <!-- <view class="box" v-if="renzheng == 0 && XCXIsSelect != '否'" @click="goNav('/my/renzheng/rzType')">
<image src="../../static/images/my/renzheng.png"></image> <image src="../../static/images/my/renzheng.png"></image>

View File

@ -7,7 +7,7 @@
</view> </view>
<view class="page-head-mian"> <view class="page-head-mian">
<view class="page-head__title"> <view class="page-head__title">
商家信息 视频
</view> </view>
<view class="page-head-ft"> <view class="page-head-ft">
<view class="page-head-xuan" @click="xuanzhe"> <view class="page-head-xuan" @click="xuanzhe">
@ -49,6 +49,7 @@
:show-center-play-btn='false' :show-center-play-btn='false'
@click="jieshu" @click="jieshu"
:src="filePath"></video> :src="filePath"></video>
<view class="videoConten">{{contentVideo}}</view>
<view class="videoHover" v-if="playShow==true" @click="kaishi"> <view class="videoHover" v-if="playShow==true" @click="kaishi">
<image class="playState" src="@/static/play.png"></image> <image class="playState" src="@/static/play.png"></image>
</view> </view>
@ -75,7 +76,8 @@
filePath:'', filePath:'',
playShow:false, playShow:false,
videoId:0, videoId:0,
couponId:'' couponId:'',
contentVideo:''
} }
}, },
onLoad() { onLoad() {
@ -99,6 +101,7 @@
} }
this.$Request.get("/app/shipinquan/delete",data).then(res => { this.$Request.get("/app/shipinquan/delete",data).then(res => {
if (res.code == 0) { if (res.code == 0) {
this.page=1;
this.get() this.get()
uni.showToast({ uni.showToast({
title:'删除成功!', title:'删除成功!',
@ -120,18 +123,29 @@
this.checkboxShow=!this.checkboxShow this.checkboxShow=!this.checkboxShow
}, },
guanbi(){ guanbi(){
this.playShow=false;
const videoContext = uni.createVideoContext('myVideo', this);
videoContext.pause(); //
this.$refs.pinglun.close("center") this.$refs.pinglun.close("center")
}, },
jieshu(){ jieshu(){
this.playShow=true;
const videoContext = uni.createVideoContext('myVideo', this); const videoContext = uni.createVideoContext('myVideo', this);
videoContext.pause(); // videoContext.pause(); //
this.playShow=true
}, },
kaishi(){ kaishi(){
this.playShow=false;
const videoContext = uni.createVideoContext('myVideo', this); const videoContext = uni.createVideoContext('myVideo', this);
videoContext.src = this.filePath; // videoContext.src = this.filePath; //
videoContext.play(); // videoContext.play(); //
this.playShow=false },
towxh5Video(item){
this.playShow=false;
console.log(" this.playShow", this.playShow)
this.filePath=item.filePath;
this.contentVideo=item.content
this.videoId=item.id
this.$refs.pinglun.open("center")
}, },
setVideo(){// setVideo(){//
uni.navigateTo({ uni.navigateTo({
@ -143,11 +157,7 @@
url:'/pages/my/index' url:'/pages/my/index'
}) })
}, },
towxh5Video(item){
this.filePath=item.filePath;
this.videoId=item.id
this.$refs.pinglun.open("center")
},
towxh5Videos(index){ towxh5Videos(index){
let list = [] let list = []
let videoNumber = 36;// 6 DOM let videoNumber = 36;// 6 DOM
@ -199,12 +209,13 @@
// //
this.page++; this.page++;
var data={ var data={
createBy:uni.getStorageSync('userId'),
page: this.page, page: this.page,
limit:this.limit, limit:this.limit,
} }
this.$Request.get("/app/shipinquan/list", data).then(res => { this.$Request.get("/app/shipinquan/list", data).then(res => {
if (res.code == 0) { if (res.code == 0) {
var msg = res.data.records var msg = res.data.list
for (let i = 0; i < msg.length; i++) { for (let i = 0; i < msg.length; i++) {
this.dataList.push(msg[i]) this.dataList.push(msg[i])
} }
@ -231,12 +242,13 @@
}, },
get(){ get(){
var data={ var data={
createBy:uni.getStorageSync('userId'),
page: this.page, page: this.page,
limit:this.limit, limit:this.limit,
} }
this.$Request.get("/app/shipinquan/list", data).then(res => { this.$Request.get("/app/shipinquan/list", data).then(res => {
if (res.code == 0) { if (res.code == 0) {
this.dataList=res.data.records this.dataList=res.data.list
} else { } else {
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
@ -314,6 +326,21 @@
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
} }
.videoConten{
width: 70%;
position: absolute;
bottom: 0px;
margin-bottom: 60px;
height: 30px;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2; /* 定义文本的行数 */
overflow: hidden;
text-overflow: ellipsis;
word-break: break-all;
margin-left: 15px;
}
.videoHover{ .videoHover{
width: 76px; width: 76px;
height: 76px; height: 76px;

View File

@ -132,8 +132,8 @@
icon: 'none' icon: 'none'
}) })
setTimeout(function() { setTimeout(function() {
uni.switchTab({ uni.navigateTo({
url: '/pages/my/index' url: '/pages/video/index'
}) })
}, 1000) }, 1000)
} else { } else {

View File

@ -1,3 +1,5 @@
## 1.2.32024-02-20
- 新增 支持控制小时分钟的显隐showHour showMinute
## 1.2.22022-01-19 ## 1.2.22022-01-19
- 修复 在微信小程序中样式不生效的bug - 修复 在微信小程序中样式不生效的bug
## 1.2.12022-01-18 ## 1.2.12022-01-18

View File

@ -2,10 +2,10 @@
<view class="uni-countdown"> <view class="uni-countdown">
<text v-if="showDay" :style="[timeStyle]" class="uni-countdown__number">{{ d }}</text> <text v-if="showDay" :style="[timeStyle]" class="uni-countdown__number">{{ d }}</text>
<text v-if="showDay" :style="[splitorStyle]" class="uni-countdown__splitor">{{dayText}}</text> <text v-if="showDay" :style="[splitorStyle]" class="uni-countdown__splitor">{{dayText}}</text>
<text :style="[timeStyle]" class="uni-countdown__number">{{ h }}</text> <text v-if="showHour" :style="[timeStyle]" class="uni-countdown__number">{{ h }}</text>
<text :style="[splitorStyle]" class="uni-countdown__splitor">{{ showColon ? ':' : hourText }}</text> <text v-if="showHour" :style="[splitorStyle]" class="uni-countdown__splitor">{{ showColon ? ':' : hourText }}</text>
<text :style="[timeStyle]" class="uni-countdown__number">{{ i }}</text> <text v-if="showMinute" :style="[timeStyle]" class="uni-countdown__number">{{ i }}</text>
<text :style="[splitorStyle]" class="uni-countdown__splitor">{{ showColon ? ':' : minuteText }}</text> <text v-if="showMinute" :style="[splitorStyle]" class="uni-countdown__splitor">{{ showColon ? ':' : minuteText }}</text>
<text :style="[timeStyle]" class="uni-countdown__number">{{ s }}</text> <text :style="[timeStyle]" class="uni-countdown__number">{{ s }}</text>
<text v-if="!showColon" :style="[splitorStyle]" class="uni-countdown__splitor">{{secondText}}</text> <text v-if="!showColon" :style="[splitorStyle]" class="uni-countdown__splitor">{{secondText}}</text>
</view> </view>
@ -30,6 +30,8 @@
* @property {Number} second * @property {Number} second
* @property {Number} timestamp 时间戳 * @property {Number} timestamp 时间戳
* @property {Boolean} showDay = [true|false] 是否显示天数 * @property {Boolean} showDay = [true|false] 是否显示天数
* @property {Boolean} showHour = [true|false] 是否显示小时
* @property {Boolean} showMinute = [true|false] 是否显示分钟
* @property {Boolean} show-colon = [true|false] 是否以冒号为分隔符 * @property {Boolean} show-colon = [true|false] 是否以冒号为分隔符
* @property {String} splitorColor 分割符号颜色 * @property {String} splitorColor 分割符号颜色
* @event {Function} timeup 倒计时时间到触发事件 * @event {Function} timeup 倒计时时间到触发事件
@ -43,6 +45,14 @@
type: Boolean, type: Boolean,
default: true default: true
}, },
showHour: {
type: Boolean,
default: true
},
showMinute: {
type: Boolean,
default: true
},
showColon: { showColon: {
type: Boolean, type: Boolean,
default: true default: true
@ -124,16 +134,12 @@
backgroundColor, backgroundColor,
fontSize: `${fontSize}px`, fontSize: `${fontSize}px`,
width: `${fontSize * 22 / 14}px`, // 14px width: `${fontSize * 22 / 14}px`, // 14px
lineHeight: `${fontSize * 20 / 14}px`, lineHeight: `${fontSize * 20 / 14}px`,
borderRadius: `${fontSize * 3 / 14}px`, borderRadius: `${fontSize * 3 / 14}px`,
} }
}, },
splitorStyle() { splitorStyle() {
const { const { splitorColor, fontSize, backgroundColor } = this
splitorColor,
fontSize,
backgroundColor
} = this
return { return {
color: splitorColor, color: splitorColor,
fontSize: `${fontSize * 12 / 14}px`, fontSize: `${fontSize * 12 / 14}px`,
@ -238,7 +244,7 @@
this.countDown() this.countDown()
}, 1000) }, 1000)
}, },
update() { update(){
this.startData(); this.startData();
}, },
changeFlag() { changeFlag() {
@ -272,4 +278,4 @@
font-size: $font-size; font-size: $font-size;
} }
} }
</style> </style>

View File

@ -1,7 +1,7 @@
{ {
"id": "uni-countdown", "id": "uni-countdown",
"displayName": "uni-countdown 倒计时", "displayName": "uni-countdown 倒计时",
"version": "1.2.2", "version": "1.2.3",
"description": "CountDown 倒计时组件", "description": "CountDown 倒计时组件",
"keywords": [ "keywords": [
"uni-ui", "uni-ui",
@ -16,11 +16,7 @@
"directories": { "directories": {
"example": "../../temps/example_temps" "example": "../../temps/example_temps"
}, },
"dcloudext": { "dcloudext": {
"category": [
"前端组件",
"通用组件"
],
"sale": { "sale": {
"regular": { "regular": {
"price": "0.00" "price": "0.00"
@ -37,7 +33,8 @@
"data": "无", "data": "无",
"permissions": "无" "permissions": "无"
}, },
"npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui" "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
"type": "component-vue"
}, },
"uni_modules": { "uni_modules": {
"dependencies": ["uni-scss"], "dependencies": ["uni-scss"],