提交最新代码

zw-dev
lsl 3 years ago
parent 44c8a3cb34
commit 25c037b274

@ -30,7 +30,9 @@
"pages/home/xx/hy/hx/hx",
"pages/home/xx/hy/xz/zt",
"pages/home/xx/hy/zt/zt",
"pages/home/xx/lindex/lindex"
"pages/home/xx/lindex/lindex",
"pages/home/xx/lindex/xz/xz",
"pages/home/xx/lindex/lxz/lxz"
],
"window": {
"backgroundTextStyle": "light",

@ -0,0 +1,40 @@
Component({
relations: {
'./popover': {
type: 'parent'
}
},
/**
* 组件的属性列表
*/
properties: {
// 是否有底线
hasline: {
type: Boolean,
value: false
}
},
/**
* 组件的初始数据
*/
data: {
// 每项的高度
height: 40
},
/**
* 组件的方法列表
*/
methods: {
onClick: function() {
let { index } = this.properties;
let eventDetail = {
index: index
};
let eventOption = {};
this.triggerEvent('tap', eventDetail, eventOption);
}
}
})

@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}

@ -0,0 +1,3 @@
<view class='popover-item {{hasline ? "underline" : ""}}' hover-class='popover-item-hover' catchtap='onClick' style='height:{{height}}px;line-height:{{height}}px;'>
<slot/>
</view>

@ -0,0 +1,14 @@
.popover-item {
width: 100%;
font-size: 14px;
text-align: center;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.popover-item-hover {
background-color: #EEE;
}
.underline{
border-bottom:1px #EEE solid;
}

@ -0,0 +1,99 @@
const { windowWidth, windowHeight } = wx.getSystemInfoSync();
// 三角形箭头的高度
const trangleHeight = 12;
Component({
relations: {
'./popover-item': {
type: 'child'
}
},
data: {
// 当前显隐状态
visible: false,
// popover 宽
pw: 100,
// popover 高
ph: 120,
// popover 距左距离
px: 0,
// popover 距上距离
py: 0,
// 垂直方向 top/bottom
vertical: '',
// 水平方向 left/center/right
align: ''
},
methods: {
onDisplay: function(e) {
let self = this;
if (self.last && self.last === e.id) {
self.setData({
visible: !self.data.visible
});
} else {
wx.createSelectorQuery().selectViewport().scrollOffset(view => {
let { pw, ph, px, py, vertical, align } = self.data;
let pOverW = (pw - e.width) / 2;
let offsetL = e.left,
offsetR = windowWidth - e.right,
offsetB = windowHeight - e.bottom;
if (offsetL >= pOverW && offsetR >= pOverW) {
align = 'center';
px = e.left - pOverW;
} else if (offsetL > pOverW && offsetR < pOverW) {
align = 'left';
px = windowWidth - (offsetR + pw);
// 如果向右贴边了,设置一点距离
if ((windowWidth - pw) == px) px -= 5;
} else if (offsetL < pOverW && offsetR > pOverW) {
align = 'right';
px = e.left;
// 如果向左贴边了,设置一点距离
if (px == 0) px += 5;
}
if (offsetB >= (ph + trangleHeight)) {
vertical = 'bottom';
py = view.scrollTop + e.bottom + trangleHeight;
} else {
vertical = 'top';
py = view.scrollTop + e.top - ph - trangleHeight;
}
self.setData({
visible: true,
px: px,
py: py,
ph: self.getItemsHeight(),
vertical: vertical,
align: align
});
}).exec();
}
// 记录上一次点击的元素
self.last = e.id;
},
onHide: function() {
this.setData({
visible: false
});
},
// 获取所有子元素
getItems: function() {
return this.getRelationNodes('./popover-item');
},
// 获取所有子元素的总高度
getItemsHeight() {
return this.getItems().map(item => item.data.height).reduce((a, b) => a + b, 0);
}
}
})

@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}

@ -0,0 +1,6 @@
<view
wx:if='{{visible}}'
class='popover-view {{vertical}} {{align}}'
style='width:{{pw}}px;height:{{ph}}px;left:{{px}}px;top:{{py}}px;'>
<slot />
</view>

@ -0,0 +1,40 @@
.popover-view {
position: absolute;
background-color: white;
box-shadow: 0 0 2px 2px #ddd;
border-radius: 6rpx;
}
/* 实现三角形 */
.popover-view::before {
position: absolute;
display: inline-block;
width: 0;
height: 0px;
content: '';
border-style: solid;
border-width: 6px;
border-color: #fff #fff transparent transparent;
box-shadow: 2px -2px 2px #ddd;
}
/* 上 */
.popover-view.top::before {
bottom: -6px;
transform: rotate(135deg);
}
/* 下 */
.popover-view.bottom::before {
top: -6px;
transform: rotate(-45deg);
}
/* 左 */
.popover-view.left::before {
right: 20px;
}
/* 中 */
.popover-view.center::before {
left: 47px;
}
/* 右 */
.popover-view.right::before {
left: 20px;
}

@ -25,20 +25,16 @@ Page({
req.getRequest('/api/user/curt/message/lover',{}).then((res)=>{
if(res.data.code==200){
this.setData({messages:res.data.data.records})
console.log("这是打印,。。。。")
console.log(this.data.messages)
}
}).catch((err)=>{
console.log(err);
})
},
doQueryInit(){
console.log('查询。。。。')
req.getRequest('/api/user/curt',{}).then((res)=>{
if(res.data.code==200){
this.setData({hasLover:res.data.data.hasLover})
this.setData({userInfo:res.data.data})
console.log(this.data.userInfo)
if(res.data.data.hasLover){
wx.navigateTo({
url: '/pages/home/xx/lindex/lindex'

@ -503,3 +503,20 @@ font-family: SourceHanSansSC-regular;
height: 1624rpx;
z-index: 999;
}
.xzylanbtn{
position: absolute;
top: 396px;
width: 105px;
height: 35px;
line-height: 70rpx;
border-radius: 10px;
background: linear-gradient(222.54deg, rgba(248,99,42,1) 14.03%,rgba(249,135,89,1) 85.21%);
text-align: center;
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4);
border: 3px solid rgba(255, 255, 255, 1);
color: rgba(255, 255, 255, 1);
font-size: 14px;
text-align: center;
font-family: SourceHanSansSC-medium;
}

@ -7,6 +7,27 @@ Page({
* 页面的初始数据
*/
data: {
formats: {},
readOnly: false,
placeholder: '开始输入...',
editorHeight: 300,
keyboardHeight: 0,
isIOS: false,//文本编辑器相关
placeholder:'请输入文字',
xinzhaVisible:false,
luYInRes:'',//点击录音弹出的录音资源
RM:'',
xhCstP:[,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,],
timer:null,
minute: 0, // 分
second: 0 , // 秒
millisecond:0,
dsQTime:'000000',
luYinStatus:0,//录音状态0代表还没开始1代表进行中2代表录音完毕
delId:'',
luyinVisible:false,
imgPicUrl:'',
dkTpVisible:false,
ztDetial:{},//打开纸条弹窗详情
dkZtVisible:false,//打开纸条弹窗
ztText:"",
@ -16,28 +37,333 @@ Page({
hasLover:false,// 是否单身
userInfo:{}
},go2Reback(){
},
//编辑器相关
readOnlyChange() {
this.setData({
readOnly: !this.data.readOnly
})
},
updatePosition(keyboardHeight) {
const toolbarHeight = 50
const { windowHeight, platform } = wx.getSystemInfoSync()
let editorHeight = keyboardHeight > 0 ? (windowHeight - keyboardHeight - toolbarHeight) : windowHeight
this.setData({ editorHeight, keyboardHeight })
},
calNavigationBarAndStatusBar() {
const systemInfo = wx.getSystemInfoSync()
const { statusBarHeight, platform } = systemInfo
const isIOS = platform === 'ios'
const navigationBarHeight = isIOS ? 44 : 48
return statusBarHeight + navigationBarHeight
},
onEditorReady() {
const that = this
wx.createSelectorQuery().select('#editor').context(function (res) {
that.editorCtx = res.context
}).exec()
},
blur() {
this.editorCtx.blur()
},
format(e) {
let { name, value } = e.target.dataset
if (!name) return
// console.log('format', name, value)
this.editorCtx.format(name, value)
},
onStatusChange(e) {
const formats = e.detail
this.setData({ formats })
},
insertDivider() {
this.editorCtx.insertDivider({
success: function () {
console.log('insert divider success')
}
})
},
clear() {
this.editorCtx.clear({
success: function (res) {
console.log("clear success")
}
})
},
removeFormat() {
this.editorCtx.removeFormat()
},
insertDate() {
const date = new Date()
const formatDate = `${date.getFullYear()}/${date.getMonth() + 1}/${date.getDate()}`
this.editorCtx.insertText({
text: formatDate
})
},
insertImage() {
const that = this
wx.chooseImage({
count: 1,
success: function (res) {
that.editorCtx.insertImage({
src: res.tempFilePaths[0],
data: {
id: 'abcd',
role: 'god'
},
width: '80%',
success: function () {
console.log('insert image success')
}
})
}
})
},
do2FsLuyin(){/**发送录音按钮 */
this.data.RM.stop();
console.log('发送录音')
this.setData({luyinVisible:false})
let tt= this
this.data.RM.onStop((res)=>{
//录音时长判断
console.log('发送录音了1111。。')
// 先计算分钟
let fz = 0
let mz = 0
let hm = 0
if(res.duration>=60*1000){
fz = Math.floor(res.duration/(60*1000))
}
if(res.duration>=1000){
mz = Math.floor((res.duration-fz*60*1000)/(60*1000))
}
hm = res.duration - fz*60*1000-mz*1000
let sec = Math.floor(res.duration/1000)
let ssec = fz+'\''+mz+'\'\''+hm+'\'\'\''
console.log(ssec)
wx.uploadFile({
url: 'https://xzjl-api.windymuse.cn/api/resource',
filePath: res.tempFilePath,
name: 'file',
header: {
'Authorization': wx.getStorageSync('token'),
'Content-Type': 'multipart/form-data'
},
formData: {
type: 'audio'
},
success(res){
let data = JSON.parse(res.data);
let id = data.data.id
req.postRequest('/api/user/curt/message/lover',{"type": "audio","resourceId": id,extra:{
ssec:ssec
}}).then((res)=>{
tt.onLoad()
if(res.data.code==200){
console.log(res.data)
}
}).catch((err)=>{
console.log(err);
})
},
fail(res) {
showToast('图片上传失败');
}
})
console.log(res)//这里是必须写完成事件的,因为最后的文件,就在这里面;
res.tempFilePath;//是临时的文件地址
res.duration;//录音的时长
res.fileSize;//文件的大小
})
},
doStopLuyin(){
this.setData({luYinStatus:2})
clearInterval(this.data.timer)
console.log('结束录音')
this.data.RM.pause()
},
doStartLuyin(){
this.setData({RM:wx.getRecorderManager()})
let option = {
duration:10000, //录音的时长之前最大值好像只有1分钟现在最长可以录音10分钟
format:'mp3', //录音的格式有aac和mp3两种
}
this.data.RM.start(option);
console.log(this.data.RM)
this.setData({luYinStatus:1})
console.log('开始录音。。。')
this.setData({
minute:0,
second:0,
millisecond:0
})
this.data.timer = setInterval(this.counter,50)
// 开始定时器
},
counter:function(){
let second = this.data.second
let minute = this.data.minute
let millisecond = this.data.millisecond
this.setData({
millisecond:millisecond+5
})
if(millisecond >=99){
this.setData({
millisecond:0,
second:second+1
})
}
if(second == 60){
this.setData({
second : 0,
minute:minute+1
})
}
if(this.data.minute==3){
this.setData({
dsQTime:'03:00:00'
})
clearInterval(this.data.timer)
}
let tt = '0'+minute
if(second<10){
tt = tt + ":0"+second
}else{
tt = tt + ":"+second
}
if(millisecond<10){
tt = tt + ":0"+millisecond
}else{
tt = tt + ":"+millisecond
}
this.setData({
dsQTime: tt
})
},
DsJs(){
this.data.timer = setInterval(this.Dsq(),1)
},
Dsq(){
console.log('开始执行')
this.setData({second:this.data.second+1})
this.setData({dsQTime:this.data.dsQTime+this.data.second+1})
console.log(this.data.dsQTime)
},
allTap(){
this.popover.onHide();
},
// 响应popover组件中的子元素点击事件
doDelXiaoxi(){
req.deleteRequest('/api/user/curt/message/'+this.data.delId,{}).then((res)=>{
this.popover.onHide();
if(res.data.code==200){
wx.showToast({
title: '删除消息成功',
icon: 'none'
});
this.onLoad()
}else{
wx.showToast({
title: res.data.msg,
icon: 'none'
});
}
}).catch((err)=>{
wx.showToast({
title: '删除消息失败',
icon: 'none'
});
console.log(err);
})
},
onClickA: function (e) {
wx.showToast({
title: '你点击了A',
icon: 'none'
});
// 调用自定义组件 popover 中的 onHide 方法
this.popover.onHide();
},
changAn(e){
if(!this.popover){
this.popover = this.selectComponent('#popover');
}
console.log('执行了长按。。。')// +e.currentTarget.dataset['index']
console.log(e.currentTarget.dataset['id'])
this.setData({delId:e.currentTarget.dataset['id']})
// 获取按钮元素的坐标信息
let id = 'button'// 或者 e.target.id 获取点击元素的 ID 值
console.log(e.currentTarget.dataset['index'])
wx.createSelectorQuery().select('#' + e.currentTarget.dataset['index']).boundingClientRect(res => {
// 调用自定义组件 popover 中的 onDisplay 方法
this.popover.onDisplay(res);
}).exec();
},
go2BcPic(){/**保存图片 */
let that= this;
wx.downloadFile({
url: that.data.imgPicUrl,//图片的地址
success:function(res){
const tempFilePath = res.tempFilePath //通过res中的tempFilePath 得到需要下载的图片地址
wx.saveImageToPhotosAlbum({
filePath: tempFilePath, //设置下载图片的地址
success:function(){
wx.showToast({
title: '保存图片成功',
})
}
})
}
})
},
go2Reback1(){
//wx.navigateBack({ changed: true });
this.setData({dkTpVisible:false})
},
go2Reback(){
wx.switchTab({
url: '/pages/home/xy/index',
})
},
go2SeeHxDetail(e){
this.setData({imgPicUrl:e.currentTarget.dataset.tp})
this.setData({dkTpVisible:true})
console.log(e.currentTarget.dataset.tp)
console.log('查看图片详情')
},
//bindtap="dKztDetial" data-xq="{{item}}"
dKztDetial(e){/**查看详情 */
let detail = e.currentTarget.dataset['xq']
console.log(detail)
if(!detail.isSelf&&detail.status=='unread'){
// 不是自己发的消息,且消息状态为未读,需要设置消息状态为已读
///api/user/curt/message/{id}/read
req.patchRequest('/api/user/curt/message/'+detail.id+'/read',{}).then((res)=>{
if(res.data.code==200){
console.log(this.data.messages)
}
}).catch((err)=>{
console.log(err);
})
}
if(detail.isSelf){
console.log('是自己发的消息,不做操作')
}
this.setData({dkZtVisible:true,tDetial:e.currentTarget.dataset['xq']})
},
@ -62,7 +388,6 @@ Page({
this.onLoad()
if(res.data.code==200){
console.log(this.data.messages)
}
}).catch((err)=>{
console.log(err);
@ -80,8 +405,6 @@ Page({
req.getRequest('/api/user/curt/message/lover',{}).then((res)=>{
if(res.data.code==200){
this.setData({messages:res.data.data.records.reverse()})
console.log("这是打印,。。。。")
console.log(this.data.messages)
}
}).catch((err)=>{
console.log(err);
@ -92,7 +415,6 @@ Page({
if(res.data.code==200){
this.setData({hasLover:res.data.data.hasLover})
this.setData({userInfo:res.data.data})
console.log(this.data.userInfo)
if(!res.data.data.hasLover){
wx.navigateTo({
url: '/pages/home/xx/index'
@ -116,13 +438,86 @@ Page({
},
doClickHx(){
console.log('点击了画像')
let tt = this
wx.chooseImage({
count:1,//默认9
sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
success: res=>{
var tempFilePaths = res.tempFilePaths;
wx.uploadFile({
url: 'https://xzjl-api.windymuse.cn/api/resource',
filePath: tempFilePaths[0],
name: 'file',
header: {
'Authorization': wx.getStorageSync('token'),
'Content-Type': 'multipart/form-data'
},
formData: {
type: 'graphic'
},
success(res){
console.log('执行成功了')
console.log(res)
let data = JSON.parse(res.data);
console.log(data, '111111');
let id = data.data.id
console.log('打印id')
console.log(id)
req.postRequest('/api/user/curt/message/lover',{"type": "graphic","resourceId": id}).then((res)=>{
tt.onLoad()
if(res.data.code==200){
console.log(res.data)
}
}).catch((err)=>{
console.log(err);
})
},
fail(res) {
showToast('图片上传失败');
}
})
}
})
},
doClickYx(){
this.setData({luyinVisible:true,luYinStatus:0,dsQTime:'000000'})
console.log('点击了音讯')
},
quxiaoLuyin(){/**取消录音 */
this.setData({luyinVisible:false})
clearInterval(this.data.timer)
},
fasLuyin(){/**发送录音文件 */
clearInterval(this.data.timer)
this.setData({luyinVisible:false})
},
doClickXz(){
this.setData({xinzhaVisible:true})
console.log('点击了信札')
wx.navigateTo({
url: '/pages/home/xx/lindex/lxz/lxz'
})
},
doCancelXz(){
this.setData({xinzhaVisible:false})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
console.log('开始。。。。')
this.popover = this.selectComponent('#popover');
console.log('结束。。。。')
this.doQueryInit()
this.doMessageInfo()
/**----------------一下为编辑器代码-----------------*/
},
/**
@ -144,14 +539,15 @@ Page({
* 生命周期函数--监听页面隐藏
*/
onHide() {
console.log('隐藏了页面')
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
clearInterval(this.data.timer)
console.log('卸载隐藏了页面')
},
/**

@ -2,6 +2,8 @@
"usingComponents": {
"t-image": "tdesign-miniprogram/image/image",
"t-popup": "tdesign-miniprogram/popup/popup",
"t-textarea": "tdesign-miniprogram/textarea/textarea"
"t-textarea": "tdesign-miniprogram/textarea/textarea",
"popover": "/components/popover",
"popover-item": "/components/popover-item"
}
}

@ -1,28 +1,43 @@
<!--pages/home/xx/lindex/lindex.wxml-->
<view >
<!--聊天内容-可以滑动-->
<view class="ltinfo">
<view class="bkgfs">
<!--pages/home/xx/lindex/lindex.wxml 星讯:非情侣页面-->
<view catchtap="allTap">
<!--聊天内容-可以滑动-->
<view class="ltinfo">
<!--聊天页头部:粉色那一部分-->
<view class="bkgfs" id="button">
<view class="bkgfstxt">
欢迎来到你们的专属情侣树洞
在这里你可以将你的心意传递给ta
所有美好的回忆都将被精灵记录 </view>
所有美好的回忆都将被精灵记录
</view>
</view>
<t-image class="txl" shape="circle" src="{{userInfo.avatar}}"></t-image><!--当前用户头像-->
<t-image class="txr" shape="circle" src="{{loverInfo.avatar}}"></t-image><!--当前用户头像-->
<view class="qlzjt"></view>
<!--最上方的两个头像-->
<t-image class="txl" shape="circle" src="{{userInfo.avatar}}"></t-image><!--当前用户头像-->
<t-image class="txr" shape="circle" src="{{loverInfo.avatar}}"></t-image><!--当前用户头像-->
<!--头像中间的连接图-->
<view class="qlzjt"></view>
<!--聊天内容部分-->
<view class="ltxinxi">
<view class="wchatfor" wx:for="{{messages}}" wx:key="index">
<view class="wchattime">{{item.createdAt}}</view><!--显示时间框-->
<!--循环用户的聊天信息-->
<view class="wchatfor" wx:for="{{messages}}" wx:key="index"><!--messages-->
<!--显示时间框-->
<view class="wchattime">{{item.createdAt}}</view>
<!--自己发的消息-->
<view wx:if="{{item.isSelf}}" >
<!--发送图片消息-->
<view class="zjtableatp1" wx:if="{{item.type=='graphic'}}">
<!--自己的头像框-->
<t-image src="{{userInfo.avatar}}" class="zjtx1" shape="circle" ></t-image>
<!--聊天图片&已读未读-->
<view class="zttp11" data-id="{{item.id}}" id="{{'id001'+index}}" data-index="{{'id001'+index}}"
bindlongpress="changAn">
<view class="zjydwdtp2">{{item.status=='unread'?'未读':'已读'}}</view>
<!--聊天图片-->
<t-image src="{{'https://xzjl-api.windymuse.cn/api/resource/'+item.resourceId+'?k='+userInfo.id}}" class="zjxftp2" mode="heightFix" bindtap="go2SeeHxDetail" data-tp="{{'https://xzjl-api.windymuse.cn/api/resource/'+item.resourceId+'?k='+userInfo.id}}"></t-image>
</view>
</view>
<!--发送信件消息-->
<view class="zjtablea1" wx:if="{{item.type=='graphic'}}">
<view class="zjtablea1" wx:if="{{item.type=='xj'}}">
<t-image src="{{userInfo.avatar}}" class="zjtx1" shape="circle" ></t-image><!--自己的头像框-->
<view class="zjxf1"></view>
<view class="zjydwd1">{{item.status=='unread'?'未读':'已读'}}</view>
@ -38,17 +53,32 @@
<!--发送文字消息-->
<view class="zjtable3" wx:if="{{item.type=='text'}}">
<t-image src="{{userInfo.avatar}}" class="zjtx1" shape="circle" ></t-image><!--自己的头像框-->
<view class="zjxxbox1" bindtap="dKztDetial" data-xq="{{item}}"><view class="zjtextcontent"><text>{{item.content}}</text></view></view>
<view class="zjxxbox1" bindlongpress="changAn" id="{{'idtext001'+index}}" data-index="{{'idtext001'+index}}" data-id="{{item.id}}" bindtap="dKztDetial" data-xq="{{item}}"><view class="zjtextcontent"><text>{{item.content}}</text></view></view>
<view class="zjtextydwd1">{{item.status=='unread'?'未读':'已读'}}</view>
</view>
</view>
<!--对方发的消息-->
<view wx:if="{{!item.isSelf}}" >
<t-image src="{{loverInfo.avatar}}" class="wchattxk1" shape="circle" ></t-image><!--对方的的头像框-->
<!--聊天信息-->
<view wx:if="{{item.type=='graphic'}}" class="zjtableatp1">
<t-image src="{{loverInfo.avatar}}" class="wchattxk11" shape="circle" ></t-image><!--对方的的头像框-->
<view class="zttp12" wx:if="{{item.type=='graphic'}}">
<view class="zjxftp3" >
</view>
<!---->
<t-image bindlongpress="changAn" src="{{'https://xzjl-api.windymuse.cn/api/resource/'+item.resourceId+'?k='+userInfo.id}}" class="zjxftp3" mode="heightFix" bindtap="go2SeeHxDetail" data-tp="{{'https://xzjl-api.windymuse.cn/api/resource/'+item.resourceId+'?k='+userInfo.id}}"></t-image>
<view class="zjydwdtp3">{{item.status=='unread'?'未读':'已读'}}</view>
</view>
</view>
<t-image wx:if="{{item.type!='graphic'}}" src="{{loverInfo.avatar}}" class="wchattxk1" shape="circle" ></t-image><!--对方的的头像框-->
<!--图片-->
<!--信件-->
<view class="dfxf" wx:if="{{item.type=='graphic'}}"></view>
<view class="dfxfydwd" wx:if="{{item.type=='graphic'}}">{{item.status=='unread'?'未读':'已读'}}</view>
<view class="dfxf" wx:if="{{item.type=='xj'}}"></view>
<view class="dfxfydwd" wx:if="{{item.type=='xj'}}">{{item.status=='unread'?'未读':'已读'}}</view>
<!--文本-->
<view bindtap="dKztDetial" data-xq="{{item}}" class="dftext" wx:if="{{item.type=='text'}}"><view class="xjtext">{{item.content}}</view></view>
<view class="dftextwd" wx:if="{{item.type=='text'}}">{{item.status=='unread'?'未读':'已读'}}</view>
@ -74,9 +104,9 @@
</view>
<!--星讯聊天下方菜单栏-->
<view class="xfgjl" wx:if="{{hasLover}}">
<view class="xxqlcd xxqlcd1">信札</view>
<view class="xxqlcd xxqlcd2">音讯</view>
<view class="xxqlcd xxqlcd3">画像</view>
<view class="xxqlcd xxqlcd1" bindtap="doClickXz">信札</view>
<view class="xxqlcd xxqlcd2" bindtap="doClickYx">音讯</view>
<view class="xxqlcd xxqlcd3" bindtap="doClickHx">画像</view>
<view class="xxqlcd xxqlcd4" bindtap="openZtVisible">纸条</view>
</view>
@ -96,3 +126,99 @@
<view class="fan11r" bindtap="doCancelDkZt"></view>
</t-popup>
<t-popup visible="{{dkTpVisible}}" placement="top" class="ztPop1">
<t-image src="{{imgPicUrl}}" mode="widthFix" class="tppp1"></t-image>
<!--返回图标-->
<view class="reback" bindtap="go2Reback1"></view>
<view class="title">画像</view>
<view class="tpBcan1" bindtap="go2BcPic">保存</view>
</t-popup>
<!--录音弹窗-->
<t-popup visible="{{luyinVisible}}" bind:visible-change="onVisibleChange" placement="bottom">
<view class="luyinblock">
<!--计时器-->
<view class="luyinjishiqi">{{dsQTime}}</view>
<!--录音按钮--> <!--还没有开始-->
<view class="weiluyinanniu" wx:if="{{luYinStatus==0}}" bindtap="doStartLuyin">
<view class="wlyan1" ></view>
</view>
<!--录音按钮--> <!--进行中-->
<view class="weiluyinanniu" wx:if="{{luYinStatus==1}}" bindtap="doStopLuyin">
<view class="wlyan2" ></view>
</view>
<!--录音按钮--> <!--已结束-->
<view class="weiluyinanniu" wx:if="{{luYinStatus==2}}" >
<view class="wlyan3" ></view>
</view>
<!--轮播图位置-->
<view class="luyinlbt" wx:if="{{luYinStatus==1}}">
<view class="box2" style="float: left; height: 50rpx; width: 1000px; " >
<image wx:for="{{xhCstP}}" wx:key="index" style="height: 50rpx;width: 50rpx;" src="https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xx/lylbt.png" mode=""/>
</view>
</view>
<view class="luyinlbt1" wx:if="{{luYinStatus!=1}}">
</view>
<view class="lyhx"></view>
<view class="header">
<view class="qxly" aria-role="button" bindtap="quxiaoLuyin">取消</view>
<view class="qrfs qrfs1" aria-role="button" wx:if="{{luYinStatus!=2}}">发送</view>
<view class="qrfs qrfs2" aria-role="button" wx:if="{{luYinStatus==2}}" bindtap="do2FsLuyin">发送</view>
</view>
</view>
</t-popup>
<popover id='popover'>
<popover-item bindtap='doDelXiaoxi'>删除</popover-item>
</popover>
<!--信札写信页面-->
<t-popup visible="{{xinzhaVisible}}">
<view class="xiexinzha">
<view class="xzsfhl"></view><!--信封上方花篮框-->
<!--信件正文-->
<view class="xzxfnr">
<!--信件写给谁的框-->
<view class="xzxjto">
<view class="xzxjto111">
<view class="toText111">To</view>
<view class="xzxjtoipt">
<input type="text" placeholder="" />
</view>
</view>
</view>
<!--信件写给谁的框-->
<view class="xzxjfrom" >
<view class="xzxjto111">
<view class="toText111">From</view>
<view class="xzxjtoiptfrom">
<input type="text" placeholder="" />
</view>
</view>
</view>
<!--聊天文本框-->
<view class="ltwbk">
<editor id="editor" class="ql-container " placeholder="{{placeholder}}" class="editorc" bindstatuschange="onStatusChange" bindready="onEditorReady">
</editor>
</view>
<view class="xzcgk"></view>
</view>
<!--信封下方花篮框&菜单栏-->
<view class="xfxfhl">
<view class="xfzjhz"></view>
<view class="xzylanbtn xzylan1">预览</view>
<view class="xzylanbtn xzylan2">发送</view>
<!--返回按钮-->
<view class="xzfhan xzfhan1"
bindtap="doCancelXz"><view class="fan11r2"></view></view>
<!--音讯按钮-->
<view class="xzfhan xzfhan2" bindtap="insertImage">音讯</view>
<!--画像按钮-->
<view class="xzfhan xzfhan3">画像</view>
</view>
</view>
</t-popup>

@ -562,7 +562,7 @@ top: 568px;
.cqlgd{
width: 750rpx;
height: 230rpx;
height: 530rpx;
}
.fhan11{
border-radius: 58rpx;
@ -591,3 +591,509 @@ background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xx/xtr
.t-textarea{
background-color: transparent!important;
}
.zjtableatp1{
width: 750rpx;
height: 220rpx;
}
.zjxftp1{
float: right;
margin-right:130rpx;
z-index: 9999;
height: 200rpx;
background-repeat: no-repeat;
}
.zjydwdtp1{
position: absolute;
margin-left: 360rpx;
margin-top: 50px;
width: 28px;
height: 20px;
color: rgba(206, 206, 206, 1);
font-size: 12px;
text-align: left;
font-family: SourceHanSansSC-regular;
}
.zjydwdtp2{
display: inline-block;
margin-top: 50px;
width: 28px;
height: 20px;
color: rgba(206, 206, 206, 1);
font-size: 12px;
text-align: left;
font-family: SourceHanSansSC-regular;
}
.zjxftp2{
display: inline-block;
margin-left:10rpx;
height: 200rpx;
background-repeat: no-repeat;
max-width: 500rpx;
}
.zttp11{
float: right;
margin-right: 130rpx;
}
.zttp12{
float: left;
margin-left: 10rpx;
}
.zjydwdtp3{
display: inline-block;
margin-top: 80px;
margin-left: 10rpx;
width: 28px;
height: 20px;
color: rgba(206, 206, 206, 1);
font-size: 12px;
text-align: left;
font-family: SourceHanSansSC-regular;
}
.zjxftp3{
display: inline-block;
margin-left:10rpx;
height: 200rpx;
background-repeat: no-repeat;
max-width: 500rpx;
}
.wchattxk11{
float: left;
margin-left: 19px;
margin-top: 7rpx;
width: 36px;
height: 36px;
background-color: chartreuse;
}
.tppp1{
position: absolute;
width: 750rpx;
height: auto;
top:50%;
margin-top: 300rpx;
}
.ztPop1{
position: absolute;
width:750rpx ;
height: 1624rpx;
margin: 0!important;
padding: 0!important;
display: table-cell;
vertical-align: middle;
}
.tpBcan1{
position: absolute;
left: 304px;
top: 727px;
width: 55px;
height: 35px;
line-height: 70rpx;
border-radius: 10px;
background: linear-gradient(222.54deg, rgba(248,99,42,1) 14.03%,rgba(249,135,89,1) 85.21%);
text-align: center;
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4);
border: 3px solid rgba(255, 255, 255, 1);
color: rgba(255, 255, 255, 1);
font-size: 14px;
text-align: center;
font-family: SourceHanSansSC-medium;
}
.block{
width: 750rpx;
height: 300rpx;
}
.block {
width: 100vw;
height: 240px;
background: #fff;
border-top-left-radius: 16rpx;
border-top-right-radius: 16rpx;
}
.wrapper {
margin: 32rpx;
display: block;
}
.header {
display: flex;
align-items: center;
height: 116rpx;
}
.title {
flex: 1;
text-align: center;
font-weight: 600;
font-size: 36rpx;
}
.btn {
font-size: 32rpx;
padding: 32rpx;
}
.btn--cancel {
color: rgba(0, 0, 0, .6);
}
.btn--confirm {
color: #0052d9;
}
.zjxftp21{
margin-top: -90rpx;
height: 200rpx;
max-width: 500rpx;
}
.luyinblock{
left: 0px;
top: 547px;
width: 375px;
height: 231px;
line-height: 20px;
border-radius: 10px 10px 0px 0px;
background-color: rgba(255, 255, 255, 1);
color: rgba(16, 16, 16, 1);
font-size: 14px;
text-align: center;
font-family: Arial;
}
.qxly{
position: absolute;
left: 16px;
top: 12rpx;
width: 32px;
height: 25px;
color: rgba(108, 108, 108, 1);
font-size: 16px;
text-align: left;
font-family: SourceHanSansSC-regular;
}
.qrfs{
position: absolute;
left: 325px;
top: 12rpx;
width: 32px;
height: 25px;
font-size: 16px;
text-align: left;
font-family: SourceHanSansSC-regular;
}
.qrfs1{
color: rgba(206, 206, 206, 1);
}
.qrfs2{
color: rgba(108, 108, 108, 1);
}
.lyhx{
position: absolute;
left: 0px;
top: 72rpx;
width: 375px;
height: NaNpx;
border: 1px solid rgba(233, 233, 232, 1);
}
.luyinjishiqi{
position: absolute;
left: 143px;
top: 114rpx;
width: 89px;
height: 22px;
color: rgba(108, 108, 108, 1);
font-size: 16px;
text-align: center;
font-family: SourceHanSansSC-regular;
}
.weiluyinanniu{
position: absolute;
left: 158px;
top: 300rpx;
width: 60px;
height: 60px;
border-radius: 60rpx;
line-height: 17px;
background-color: rgba(255, 255, 255, 1);
text-align: center;
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4);
border: 3px solid rgba(255, 255, 255, 1);
}
.wlyan1{
position: absolute;
left: 15rpx;
top: 15rpx;
width: 45px;
height: 45px;
border-radius: 45rpx;
line-height: 17px;
background: linear-gradient(222.54deg, rgba(248,99,42,1) 14.03%,rgba(249,135,89,1) 85.21%);
text-align: center;
}
.luyinlbt{
position: absolute;
width: 750rpx;
height: 50rpx;
top:198rpx;
overflow: hidden;
/* background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xx/lylbt.png); */
/* scroll-snap-type: x mandatory;
scroll-snap-align: start; */
}
.box2{
animation: move 5s infinite linear;
}
/* 定义动画 */
/* 定义和调用动画 */
@keyframes move {
/* 动画的第一个状态和盒子的默认状态相同, 可以省略动画的开始状态代码 */
/* from {
transform: translateX(0);
} */
to {
transform: translateX(-750rpx);
/* transform: translateX(-900px); */
/* transform: translateX(-800px); */
}
}
/* 增加需求: 当用户鼠标移入, 动画暂定 */
/* .box:hover ul {
animation-play-state: paused;
} */
.wlyan2{
position: absolute;
left: 15px;
top: 15px;
width: 30px;
height: 30px;
line-height: 17px;
border-radius: 5px;
background: linear-gradient(222.54deg, rgba(248,99,42,1) 14.03%,rgba(249,135,89,1) 85.21%);
text-align: center;
}
.wlyan3{
position: absolute;
left: 40rpx;
top: 10px;
width: 35px;
height: 35px;
background: linear-gradient(222.54deg, rgba(248,99,42,1) 14.03%,rgba(249,135,89,1) 85.21%);
width: 0;
height: 0;
border-top: 50rpx solid transparent;
border-left: 60rpx solid rgba(248,99,42,1);
border-bottom: 35rpx solid transparent;
}
.luyinlbt1{
position: absolute;
width: 750rpx;
height: 50rpx;
top:198rpx;
overflow: hidden;
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xx/lylbt.png);
}
.xiexinzha{
height: 1624rpx;
width: 750rpx;
}
.xzjcan{
position: fixed;
margin-left: 224px;
top: 727px;
width: 105px;
height: 35px;
border-radius: 10px;
background: linear-gradient(222.54deg, rgba(248,99,42,1) 14.03%,rgba(249,135,89,1) 85.21%);
text-align: center;
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4);
border: 3px solid rgba(255, 255, 255, 1);
}
.xzylanbtn{
position: absolute;
top: 396px;
width: 105px;
height: 35px;
line-height: 70rpx;
border-radius: 10px;
background: linear-gradient(222.54deg, rgba(248,99,42,1) 14.03%,rgba(249,135,89,1) 85.21%);
text-align: center;
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4);
border: 3px solid rgba(255, 255, 255, 1);
color: rgba(255, 255, 255, 1);
font-size: 14px;
text-align: center;
font-family: SourceHanSansSC-medium;
}
.xzylan1{
left: 62px;
}
.xzylan2{
left: 448rpx;
}
.xzsfhl{
position: fixed;
left: 15px;
top: 52px;
width: 345px;
height: 115px;
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xx/xzhlpic.png);
}
.xfxfhl{
z-index: 100;
position: fixed;
left: 0px;
top: 331px;
width: 375px;
height: 462px;
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xx/xfxfhlpic.png);
}
.xzxfnr{
position: absolute;
left: 31px;
top: 64px;
width: 315px;
height: 657px;
overflow: auto;
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xx/xznrpic.png);
}
.xfzjhz{
position: absolute;
left: 154px;
top: 482rpx;
width: 73px;
height: 71px;
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xx/xfzjhzpic.png);
}
.xzfhan{
position: absolute;
width: 55px;
height: 55px;
line-height: 110rpx;
border-radius: 59rpx;
background: linear-gradient(222.54deg, rgba(248,99,42,1) 14.03%,rgba(249,135,89,1) 85.21%);
color: rgba(16, 16, 16, 1);
font-size: 12px;
text-align: center;
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4);
font-family: Arial;
border: 3px solid rgba(255, 255, 255, 1);
color: rgba(255, 255, 255, 1);
font-size: 16px;
text-align: center;
font-family: SourceHanSansSC-medium;
}
.xzfhan1{
left: 16px;
top: 592rpx;
}
.xzfhan2{
left: 608rpx;
top: 440rpx;
}
.xzfhan3{
left: 608rpx;
top: 592rpx;
}
.fan11r2{
position: absolute;
left: 26rpx;
top: 24rpx;
width: 30px;
height: 30px;
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xx/xtreturn.png);
}
.xzxjto{
margin-left: 50rpx;
margin-top: 68rpx;
width: 147px;
height: 21px;
color: rgba(108, 108, 108, 1);
font-size: 14px;
text-align: left;
font-family: SourceHanSansSC-regular;
}
.xzxjto111{
position: absolute;
width: 147px;
height: 21px;
color: rgba(108, 108, 108, 1);
font-size: 14px;
text-align: left;
font-family: SourceHanSansSC-regular;
}
.toText111{
position: absolute;
height: 21px;
line-height: 42rpx;
}
.xzxjfrom{
margin-left: 50rpx;
margin-top: 30rpx;
width: 147px;
height: 21px;
color: rgba(108, 108, 108, 1);
font-size: 14px;
text-align: left;
font-family: SourceHanSansSC-regular;
}
.xzxjtot1{
display: inline-block;
width: 30rpx;
background-color: blue;
}
.xzxjtoipt{
position: absolute;
margin-left: 60rpx;
width: 110px;
height: 21px;
border-bottom: 1rpx solid #000;
}
.xzxjtoiptfrom{
display: inline-block;
position: absolute;
margin-left: 90rpx;
width: 90px;
height: 21px;
border-bottom: 1rpx solid #000;
}
.xzcgk{
height:560rpx;
}
.ltwbk{
margin-left: 52rpx;
margin-top: 20rpx;
width: 264px;
color: rgba(108, 108, 108, 1);
font-size: 14px;
text-align: left;
font-family: SourceHanSansSC-regular;
height: 30rpx;
}
.tttt{
background-color: chocolate;
}
.ql-container{
height: 900rpx!important;
overflow: auto!important;
z-index: 99;
}
.editorc{
color: rgba(108, 108, 108, 1);
font-size: 14px!important;
text-align: left;
font-family: SourceHanSansSC-regular;
}

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

@ -0,0 +1,5 @@
<template name="foot">
<navigator class="page-foot" openType="switchTab" url="/page/component/index" hover-class="none">
<image class="icon-foot" src="../../../../image/icon_foot.png"></image>
</navigator>
</template>

@ -0,0 +1,7 @@
<template name="head">
<view class="page-head">
<view class="page-head-title">{{title}}</view>
<view class="page-head-line"></view>
<view wx:if="{{desc}}" class="page-head-desc">{{desc}}</view>
</view>
</template>

@ -0,0 +1,111 @@
.index-hd {
padding: 80rpx;
text-align: center;
}
.index-bd {
padding: 0 30rpx 40rpx;
}
.index-ft {
padding-bottom: 20rpx;
text-align: center;
}
.index-logo {
width: 86rpx;
height: 86rpx;
}
.index-desc {
margin-top: 20rpx;
color: #888888;
font-size: 28rpx;
}
.navigator-box {
opacity: 0;
position: relative;
background-color: #FFFFFF;
line-height: 1.41176471;
font-size: 34rpx;
transform: translateY(-50%);
transition: .3s;
}
.navigator-box-show {
opacity: 1;
transform: translateY(0);
}
.navigator {
padding: 20rpx 30rpx;
position: relative;
display: flex;
align-items: center;
}
.navigator:before {
content: " ";
position: absolute;
left: 30rpx;
top: 0;
right: 30rpx;
height: 1px;
border-top: 1rpx solid #D8D8D8;
color: #D8D8D8;
}
.navigator:first-child:before {
display: none;
}
.navigator-text {
flex: 1;
}
.navigator-arrow {
padding-right: 26rpx;
position: relative;
}
.navigator-arrow:after {
content: " ";
display: inline-block;
height: 18rpx;
width: 18rpx;
border-width: 2rpx 2rpx 0 0;
border-color: #888888;
border-style: solid;
transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0);
position: absolute;
top: 50%;
margin-top: -8rpx;
right: 28rpx;
}
.kind-list-item {
margin: 20rpx 0;
background-color: #FFFFFF;
border-radius: 4rpx;
overflow: hidden;
}
.kind-list-item:first-child {
margin-top: 0;
}
.kind-list-text{
flex: 1;
}
.kind-list-img {
width: 60rpx;
height: 60rpx;
}
.kind-list-item-hd {
padding: 30rpx;
display: flex;
align-items: center;
transition: opacity .3s;
}
.kind-list-item-hd-show {
opacity: .2;
}
.kind-list-item-bd {
height: 0;
overflow: hidden;
}
.kind-list-item-bd-show {
height: auto;
}

File diff suppressed because it is too large Load Diff

@ -0,0 +1,115 @@
Page({
data: {
formats: {},
readOnly: false,
placeholder: '开始输入...',
editorHeight: 300,
keyboardHeight: 0,
isIOS: false
},
readOnlyChange() {
this.setData({
readOnly: !this.data.readOnly
})
},
onLoad() {
const platform = wx.getSystemInfoSync().platform
const isIOS = platform === 'ios'
this.setData({ isIOS})
const that = this
this.updatePosition(0)
let keyboardHeight = 0
wx.onKeyboardHeightChange(res => {
if (res.height === keyboardHeight) return
const duration = res.height > 0 ? res.duration * 1000 : 0
keyboardHeight = res.height
setTimeout(() => {
wx.pageScrollTo({
scrollTop: 0,
success() {
that.updatePosition(keyboardHeight)
that.editorCtx.scrollIntoView()
}
})
}, duration)
})
},
updatePosition(keyboardHeight) {
const toolbarHeight = 50
const { windowHeight, platform } = wx.getSystemInfoSync()
let editorHeight = keyboardHeight > 0 ? (windowHeight - keyboardHeight - toolbarHeight) : windowHeight
this.setData({ editorHeight, keyboardHeight })
},
calNavigationBarAndStatusBar() {
const systemInfo = wx.getSystemInfoSync()
const { statusBarHeight, platform } = systemInfo
const isIOS = platform === 'ios'
const navigationBarHeight = isIOS ? 44 : 48
return statusBarHeight + navigationBarHeight
},
onEditorReady() {
const that = this
wx.createSelectorQuery().select('#editor').context(function (res) {
that.editorCtx = res.context
}).exec()
},
blur() {
this.editorCtx.blur()
},
format(e) {
let { name, value } = e.target.dataset
if (!name) return
// console.log('format', name, value)
this.editorCtx.format(name, value)
},
onStatusChange(e) {
const formats = e.detail
this.setData({ formats })
},
insertDivider() {
this.editorCtx.insertDivider({
success: function () {
console.log('insert divider success')
}
})
},
clear() {
this.editorCtx.clear({
success: function (res) {
console.log("clear success")
}
})
},
removeFormat() {
this.editorCtx.removeFormat()
},
insertDate() {
const date = new Date()
const formatDate = `${date.getFullYear()}/${date.getMonth() + 1}/${date.getDate()}`
this.editorCtx.insertText({
text: formatDate
})
},
insertImage() {
const that = this
wx.chooseImage({
count: 1,
success: function (res) {
that.editorCtx.insertImage({
src: res.tempFilePaths[0],
data: {
id: 'abcd',
role: 'god'
},
width: '100%',
success: function () {
console.log('insert image success')
}
})
}
})
}
})

@ -0,0 +1,7 @@
{
"navigationBarTitleText": "发表文章",
"disableScroll": true,
"usingComponents": {
}
}

@ -0,0 +1,36 @@
<!--pages/home/xx/lindex/lxz/lxz.wxml-->
<view class="container" style="height:{{editorHeight}}px;">
<view class="xzsfhl"></view><!--信封上方花篮框-->
<view class="xzxfnr">
<editor id="editor" class="ql-container" placeholder="{{placeholder}}" bindstatuschange="onStatusChange" bindready="onEditorReady">
</editor>
</view>
</view>
<view class="toolbar" catchtouchend="format" style="bottom: {{isIOS ? keyboardHeight : 0}}px">
<i class="iconfont icon-charutupian" catchtouchend="insertImage"></i>
<i class="iconfont icon-format-header-2 {{formats.header === 2 ? 'ql-active' : ''}}" data-name="header" data-value="{{2}}"></i>
<i class="iconfont icon-format-header-3 {{formats.header === 3 ? 'ql-active' : ''}}" data-name="header" data-value="{{3}}"></i>
<i class="iconfont icon-zitijiacu {{formats.bold ? 'ql-active' : ''}}" data-name="bold"></i>
<i class="iconfont icon-zitixieti {{formats.italic ? 'ql-active' : ''}}" data-name="italic"></i>
<i class="iconfont icon-zitixiahuaxian {{formats.underline ? 'ql-active' : ''}}" data-name="underline"></i>
<i class="iconfont icon--checklist" data-name="list" data-value="check"></i>
<i class="iconfont icon-youxupailie {{formats.list === 'ordered' ? 'ql-active' : ''}}" data-name="list" data-value="ordered"></i>
<i class="iconfont icon-wuxupailie {{formats.list === 'bullet' ? 'ql-active' : ''}}" data-name="list" data-value="bullet"></i>
</view>
<!--信封下方花篮框&菜单栏-->
<view class="xfxfhl">
<view class="xfzjhz"></view>
<view class="xzylanbtn xzylan1">预览</view>
<view class="xzylanbtn xzylan2">发送</view>
<!--返回按钮-->
<view class="xzfhan xzfhan1"
bindtap="doCancelXz"><view class="fan11r2"></view></view>
<!--音讯按钮-->
<view class="xzfhan xzfhan2" >音讯</view>
<!--画像按钮-->
<view class="xzfhan xzfhan3" catchtouchend="insertImage">画像</view>
</view>

@ -0,0 +1,159 @@
/* pages/home/xx/lindex/lxz/lxz.wxss */
@import "./common/lib/weui.wxss";
@import "./assets/iconfont.wxss"
.container {
position: absolute;
top: 0;
left: 0;
width: 100%;
}
.xzsfhl{
position: fixed;
left: 15px;
top: 52px;
width: 345px;
height: 115px;
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xx/xzhlpic.png);
}
.xzxfnr{
position: absolute;
left: 31px;
top: 64px;
width: 315px;
height: 657px;
overflow: auto;
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xx/xznrpic.png);
}
.ql-container {
box-sizing: border-box;
width: 264px;
margin-left: 52rpx;
height: 100%;
font-size: 16px;
line-height: 1.5;
overflow: auto;
padding: 10px 10px 20px 10px;
}
.ql-active {
color: #22C704;
}
.iconfont {
display: inline-block;
width: 30px;
height: 30px;
cursor: pointer;
font-size: 20px;
}
.toolbar {
box-sizing: border-box;
padding: 0 10px;
height: 50px;
width: 100%;
position: fixed;
left: 0;
right: 100%;
bottom: 0;
display: flex;
align-items: center;
justify-content: space-between;
border: 1px solid #ECECEC;
border-left: none;
border-right: none;
}
.xfxfhl{
z-index: 100;
position: fixed;
left: 0px;
top: 331px;
width: 375px;
height: 462px;
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xx/xfxfhlpic.png);
}
.xzxfnr{
position: absolute;
left: 31px;
top: 64px;
width: 315px;
height: 657px;
overflow: auto;
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xx/xznrpic.png);
}
.xfzjhz{
position: absolute;
left: 154px;
top: 482rpx;
width: 73px;
height: 71px;
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xx/xfzjhzpic.png);
}
.xzfhan{
position: absolute;
width: 55px;
height: 55px;
line-height: 110rpx;
border-radius: 59rpx;
background: linear-gradient(222.54deg, rgba(248,99,42,1) 14.03%,rgba(249,135,89,1) 85.21%);
color: rgba(16, 16, 16, 1);
font-size: 12px;
text-align: center;
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4);
font-family: Arial;
border: 3px solid rgba(255, 255, 255, 1);
color: rgba(255, 255, 255, 1);
font-size: 16px;
text-align: center;
font-family: SourceHanSansSC-medium;
}
.xzfhan1{
left: 16px;
top: 592rpx;
}
.xzfhan2{
left: 608rpx;
top: 440rpx;
}
.xzfhan3{
left: 608rpx;
top: 592rpx;
}
.xzylanbtn{
position: absolute;
top: 396px;
width: 105px;
height: 35px;
line-height: 70rpx;
border-radius: 10px;
background: linear-gradient(222.54deg, rgba(248,99,42,1) 14.03%,rgba(249,135,89,1) 85.21%);
text-align: center;
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4);
border: 3px solid rgba(255, 255, 255, 1);
color: rgba(255, 255, 255, 1);
font-size: 14px;
text-align: center;
font-family: SourceHanSansSC-medium;
}
.xzylan1{
left: 62px;
}
.xzylan2{
left: 448rpx;
}
.fan11r2{
position: absolute;
left: 26rpx;
top: 24rpx;
width: 30px;
height: 30px;
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xx/xtreturn.png);
}

@ -0,0 +1,66 @@
// pages/home/xx/lindex/xz/xz.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

@ -0,0 +1,3 @@
{
"usingComponents": {}
}

@ -0,0 +1,2 @@
<!--pages/home/xx/lindex/xz/xz.wxml-->
<text>pages/home/xx/lindex/xz/xz.wxml</text>

@ -0,0 +1 @@
/* pages/home/xx/lindex/xz/xz.wxss */

@ -16,6 +16,11 @@ Page({
onLoad(options) {
if(options&&options.sn&&options.sn!=null&&options.sn!=''){
console.log('有数据'+options.sn)
wx.showToast({
title:options.sn,
icon: 'none',
duration: 5000
})
login('nfc',options.sn)
}else{
console.log('无数据')
@ -73,6 +78,22 @@ Page({
* code为用户码参数用户码为空则代表为扫码登录
*/
login(mode,code){
//如果有token直接进入
if(wx.getStorageSync('token')){
wx.showToast({
title:'有token'+wx.getStorageSync('token'),
icon: 'none',
duration: 5000
})
wx.switchTab({
url: '/pages/home/xy/index'
})
}
wx.showToast({
title:'没有token',
icon: 'none',
duration: 5000
})
console.log('进入登录了!!!')
var DEV_CODE = code
var PUBLIC_KEY = ""

@ -4,5 +4,25 @@
"setting": {
"compileHotReLoad": true,
"urlCheck": false
},
"condition": {
"miniprogram": {
"list": [
{
"name": "",
"pathName": "pages/home/xx/lindex/lindex",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "",
"pathName": "pages/home/xx/lindex/lindex",
"query": "",
"launchMode": "default",
"scene": null
}
]
}
}
}
Loading…
Cancel
Save