feat: 打卡页面按钮
This commit is contained in:
8
dist/base.wxml
vendored
8
dist/base.wxml
vendored
@@ -129,6 +129,14 @@
|
||||
</image>
|
||||
</template>
|
||||
|
||||
<template name="tmpl_0_57">
|
||||
<video src="{{i.p33}}" duration="{{i.p10}}" controls="{{xs.b(i.p6,!0)}}" danmu-list="{{i.p8}}" danmu-btn="{{i.p7}}" enable-danmu="{{i.p12}}" autoplay="{{xs.b(i.p4,!1)}}" loop="{{xs.b(i.p16,!1)}}" muted="{{xs.b(i.p17,!1)}}" initial-time="{{xs.b(i.p15,0)}}" page-gesture="{{xs.b(i.p19,!1)}}" direction="{{i.p9}}" show-progress="{{xs.b(i.p30,!0)}}" show-fullscreen-btn="{{xs.b(i.p27,!0)}}" show-play-btn="{{xs.b(i.p29,!0)}}" show-center-play-btn="{{xs.b(i.p26,!0)}}" enable-progress-gesture="{{xs.b(i.p14,!0)}}" object-fit="{{xs.b(i.p18,'contain')}}" poster="{{i.p22}}" show-mute-btn="{{xs.b(i.p28,!1)}}" bindplay="eh" bindpause="eh" bindended="eh" bindtimeupdate="eh" bindfullscreenchange="eh" bindwaiting="eh" binderror="eh" animation="{{i.p1}}" bindanimationstart="eh" bindanimationiteration="eh" bindanimationend="eh" bindtransitionend="eh" title="{{i.p34}}" play-btn-position="{{xs.b(i.p21,'bottom')}}" enable-play-gesture="{{xs.b(i.p13,false)}}" auto-pause-if-navigate="{{xs.b(i.p2,true)}}" auto-pause-if-open-native="{{xs.b(i.p3,true)}}" vslide-gesture="{{xs.b(i.p35,false)}}" vslide-gesture-in-fullscreen="{{xs.b(i.p36,true)}}" ad-unit-id="{{i.p0}}" poster-for-crawler="{{i.p23}}" show-casting-button="{{xs.b(i.p25,false)}}" picture-in-picture-mode="{{xs.b(i.p20,[])}}" enable-auto-rotation="{{xs.b(i.p11,false)}}" show-screen-lock-button="{{xs.b(i.p31,false)}}" show-snapshot-button="{{xs.b(i.p32,false)}}" show-background-playback-button="{{xs.b(i.p24,false)}}" background-poster="{{i.p5}}" bindprogress="eh" bindloadedmetadata="eh" bindcontrolstoggle="eh" bindenterpictureinpicture="eh" bindleavepictureinpicture="eh" bindseekcomplete="eh" bindadload="eh" bindaderror="eh" bindadclose="eh" bindadplay="eh" style="{{i.st}}" class="{{i.cl}}" bindtap="eh" id="{{i.uid||i.sid}}" data-sid="{{i.sid}}">
|
||||
<block wx:for="{{i.cn}}" wx:key="sid">
|
||||
<template is="{{xs.e(cid+1)}}" data="{{i:item,l:l}}" />
|
||||
</block>
|
||||
</video>
|
||||
</template>
|
||||
|
||||
<template name="tmpl_0_8">
|
||||
<block>{{i.v}}</block>
|
||||
</template>
|
||||
|
||||
2
dist/pages/home/index.js
vendored
2
dist/pages/home/index.js
vendored
File diff suppressed because one or more lines are too long
2
dist/pages/home/index.js.LICENSE.txt
vendored
2
dist/pages/home/index.js.LICENSE.txt
vendored
@@ -38,6 +38,8 @@
|
||||
|
||||
/*! ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js */
|
||||
|
||||
/*! ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js */
|
||||
|
||||
/*! ./node_modules/@babel/runtime/helpers/typeof.js */
|
||||
|
||||
/*! ./swiper */
|
||||
|
||||
2
dist/taro.js
vendored
2
dist/taro.js
vendored
@@ -1,2 +1,2 @@
|
||||
/*! For license information please see taro.js.LICENSE.txt */
|
||||
"use strict";(wx.webpackJsonp=wx.webpackJsonp||[]).push([["taro"],{"./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js":function(t,n,e){e.d(n,{Button:function(){return a},Form:function(){return i},Image:function(){return m},Input:function(){return c},Navigator:function(){return s},RichText:function(){return o},Text:function(){return u},Textarea:function(){return p},View:function(){return r}});var r="view",o="rich-text",u="text",a="button",i="form",c="input",p="textarea",s="navigator",m="image"},"./node_modules/@tarojs/webpack5-runner/dist/template/comp.js":function(t,n,e){var r=e("webpack/container/remote/@tarojs/runtime");Component((0,r.createRecursiveComponentConfig)())},"./node_modules/@tarojs/webpack5-runner/dist/template/custom-wrapper.js":function(t,n,e){var r=e("webpack/container/remote/@tarojs/runtime");Component((0,r.createRecursiveComponentConfig)("custom-wrapper"))}}]);
|
||||
"use strict";(wx.webpackJsonp=wx.webpackJsonp||[]).push([["taro"],{"./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js":function(t,n,e){e.d(n,{Button:function(){return a},Form:function(){return i},Image:function(){return m},Input:function(){return c},Navigator:function(){return s},RichText:function(){return o},Text:function(){return u},Textarea:function(){return p},Video:function(){return f},View:function(){return r}});var r="view",o="rich-text",u="text",a="button",i="form",c="input",p="textarea",s="navigator",m="image",f="video"},"./node_modules/@tarojs/webpack5-runner/dist/template/comp.js":function(t,n,e){var r=e("webpack/container/remote/@tarojs/runtime");Component((0,r.createRecursiveComponentConfig)())},"./node_modules/@tarojs/webpack5-runner/dist/template/custom-wrapper.js":function(t,n,e){var r=e("webpack/container/remote/@tarojs/runtime");Component((0,r.createRecursiveComponentConfig)("custom-wrapper"))}}]);
|
||||
2
dist/vendors.js
vendored
2
dist/vendors.js
vendored
File diff suppressed because one or more lines are too long
@@ -157,9 +157,10 @@ const Home = () => {
|
||||
id: res?.data?.[0]?._id,
|
||||
objData: {
|
||||
checkInArr: [
|
||||
// ...(res?.data?.[0]?.checkInArr ?? []),
|
||||
...(res?.data?.[0]?.checkInArr ?? []),
|
||||
{
|
||||
imageUrl: data?.imageUrl,
|
||||
checkTime :new Date().valueOf(),//打卡时间
|
||||
// remark: fieldValues?.remark,
|
||||
// location: address,
|
||||
},
|
||||
|
||||
@@ -1,10 +1,16 @@
|
||||
.CheckinDetail{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 20px;
|
||||
// padding: 20px;
|
||||
padding: 60px;
|
||||
|
||||
.checkCom{
|
||||
margin-top: 20px;
|
||||
margin-top: 40px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
}
|
||||
|
||||
--uploader-size{
|
||||
// size: 260px;
|
||||
}
|
||||
@@ -1,17 +1,28 @@
|
||||
import { View } from "@tarojs/components";
|
||||
import { Button, View } from "@tarojs/components";
|
||||
import react, { useEffect, useState } from "react";
|
||||
import { Image } from "@antmjs/vantui";
|
||||
import { Image, Uploader } from "@antmjs/vantui";
|
||||
|
||||
import "./index.scss";
|
||||
import Taro from "@tarojs/taro";
|
||||
import { getTable } from "../../../../utils/index";
|
||||
import moment from "moment";
|
||||
|
||||
const CheckinDetail = () => {
|
||||
const [checkArr, setcheckArr] = useState([]);
|
||||
|
||||
const [value, setValue] = react.useState([
|
||||
{
|
||||
url: "https://img.yzcdn.cn/vant/leaf.jpg",
|
||||
name: "图片1",
|
||||
},
|
||||
{
|
||||
url: "https://img.yzcdn.cn/vant/tree.jpg",
|
||||
},
|
||||
]);
|
||||
|
||||
useEffect(() => {
|
||||
// 设置标题
|
||||
definePageConfig({
|
||||
// 设置标题
|
||||
definePageConfig({
|
||||
navigationBarTitleText: "打卡记录",
|
||||
});
|
||||
getcheckArr();
|
||||
@@ -28,12 +39,12 @@ const CheckinDetail = () => {
|
||||
openId: openid,
|
||||
},
|
||||
okFun: (res: any) => {
|
||||
console.log('res',res)
|
||||
console.log("res", res);
|
||||
let _id = res?.data?._id;
|
||||
setcheckArr(res?.data?.[0]?.checkInArr ?? []);
|
||||
},
|
||||
};
|
||||
getTable({...postData})
|
||||
getTable({ ...postData });
|
||||
},
|
||||
});
|
||||
};
|
||||
@@ -42,18 +53,45 @@ const CheckinDetail = () => {
|
||||
return checkArr.map((item: any) => {
|
||||
return (
|
||||
<View className="checkCom">
|
||||
<View>{item?.remark}</View>
|
||||
{/* 备注 */}
|
||||
{item?.remark && <View>{item?.remark}</View>}
|
||||
|
||||
{/* 图片展示 */}
|
||||
<View>
|
||||
<Image
|
||||
width="100%"
|
||||
height="150px"
|
||||
fit="cover"
|
||||
src={item.imageUrl}
|
||||
<Uploader
|
||||
fileList={[
|
||||
{
|
||||
url: item?.imageUrl,
|
||||
name: "",
|
||||
},
|
||||
]}
|
||||
// onAfterRead={() => {}}
|
||||
// onDelete={() => {}}
|
||||
deletable={false}
|
||||
disabled={true}
|
||||
showUpload={false}
|
||||
previewSize={300} //预览大小
|
||||
/>
|
||||
{/* <Image
|
||||
width="80%"
|
||||
height="80px"
|
||||
fit="cover"
|
||||
src={item?.imageUrl}
|
||||
/> */}
|
||||
</View>
|
||||
|
||||
<View>
|
||||
{/* 打卡日期 */}
|
||||
{item?.checkTime && (
|
||||
<View>
|
||||
{moment(item?.checkTime).format("YYYY-MM-DD HH:mm:ss")}
|
||||
</View>
|
||||
)}
|
||||
{/* lbs定位 */}
|
||||
{item?.location && <View>{item?.location}</View>}
|
||||
{/* 删除按钮 */}
|
||||
<View><Button>删除</Button></View>
|
||||
</View>
|
||||
{/* 打卡日期 */}
|
||||
<View>{item?.checkTime}</View>
|
||||
{location&& <View>{item?.location}</View>}
|
||||
</View>
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user