Compare commits

..

1 Commits
main ... zw-dev

Author SHA1 Message Date
zengwei 452b0e93e6 修复nfc无法登录的问题
3 years ago

BIN
.DS_Store vendored

Binary file not shown.

@ -9,7 +9,6 @@
"pages/home/jl/index",
"pages/index/index",
"pages/index/out/out",
"pages/xz/index",
"pages/home/xx/xz/xz",
"pages/home/xx/xz/index",
"pages/home/me/manual/manual",
@ -22,7 +21,6 @@
"pages/home/me/mydevice/device",
"pages/home/me/sq/sq",
"pages/home/me/yjfk/yjfk",
"pages/home/me/jcjb/jcjb",
"pages/home/xyc/wdyw/wdyw",
"pages/home/xyc/tdyw/tdyw",
"pages/home/me/grzl/grzl",
@ -30,7 +28,7 @@
"pages/home/jl/jlai/jlai",
"pages/home/xx/hy/index",
"pages/home/xx/hy/hx/hx",
"pages/home/xx/hy/yx/yx",
"pages/home/xx/hy/xz/zt",
"pages/home/xx/hy/zt/zt",
"pages/home/xx/lindex/lindex",
"pages/home/xx/lindex/xz/xz",

@ -7,15 +7,3 @@
padding: 200rpx 0;
box-sizing: border-box;
}
::-webkit-scrollbar {
display: none;
width: 0;
height: 0;
color: transparent;
}
page {
width: 100%;
height: 100%;
}

BIN
icons/.DS_Store vendored

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 758 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

@ -4,13 +4,13 @@ var __DEFINE__ = function(modId, func, req) { var m = { exports: {}, _tempexport
var __REQUIRE__ = function(modId, source) { if(!__MODS__[modId]) return require(source); if(!__MODS__[modId].status) { var m = __MODS__[modId].m; m._exports = m._tempexports; var desp = Object.getOwnPropertyDescriptor(m, "exports"); if (desp && desp.configurable) Object.defineProperty(m, "exports", { set: function (val) { if(typeof val === "object" && val !== m._exports) { m._exports.__proto__ = val.__proto__; Object.keys(val).forEach(function (k) { m._exports[k] = val[k]; }); } m._tempexports = val }, get: function () { return m._tempexports; } }); __MODS__[modId].status = 1; __MODS__[modId].func(__MODS__[modId].req, m, m.exports); } return __MODS__[modId].m.exports; };
var __REQUIRE_WILDCARD__ = function(obj) { if(obj && obj.__esModule) { return obj; } else { var newObj = {}; if(obj != null) { for(var k in obj) { if (Object.prototype.hasOwnProperty.call(obj, k)) newObj[k] = obj[k]; } } newObj.default = obj; return newObj; } };
var __REQUIRE_DEFAULT__ = function(obj) { return obj && obj.__esModule ? obj.default : obj; };
__DEFINE__(1689036503194, function(require, module, exports) {
__DEFINE__(1683383058316, function(require, module, exports) {
var __TEMP__ = require('./JSEncrypt');var JSEncrypt = __TEMP__['JSEncrypt'];
if (!exports.__esModule) Object.defineProperty(exports, "__esModule", { value: true });Object.defineProperty(exports, 'JSEncrypt', { enumerable: true, configurable: true, get: function() { return JSEncrypt; } });
if (!exports.__esModule) Object.defineProperty(exports, "__esModule", { value: true });exports.default = JSEncrypt;
}, function(modId) {var map = {"./JSEncrypt":1689036503195}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1689036503195, function(require, module, exports) {
}, function(modId) {var map = {"./JSEncrypt":1683383058317}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1683383058317, function(require, module, exports) {
var __TEMP__ = require('./lib/jsbn/base64');var b64tohex = __TEMP__['b64tohex'];var hex2b64 = __TEMP__['hex2b64'];
var __TEMP__ = require('./JSEncryptRSAKey');var JSEncryptRSAKey = __TEMP__['JSEncryptRSAKey'];
var __TEMP__ = require('./version.json');var version = __REQUIRE_DEFAULT__(__TEMP__);
@ -217,8 +217,8 @@ var JSEncrypt = /** @class */ (function () {
}());
if (!exports.__esModule) Object.defineProperty(exports, "__esModule", { value: true });Object.defineProperty(exports, 'JSEncrypt', { enumerable: true, configurable: true, get: function() { return JSEncrypt; } });
}, function(modId) { var map = {"./lib/jsbn/base64":1689036503196,"./JSEncryptRSAKey":1689036503198,"./version.json":1689036503209}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1689036503196, function(require, module, exports) {
}, function(modId) { var map = {"./lib/jsbn/base64":1683383058318,"./JSEncryptRSAKey":1683383058320,"./version.json":1683383058331}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1683383058318, function(require, module, exports) {
var __TEMP__ = require('./util');var int2char = __TEMP__['int2char'];
var b64map = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
var b64pad = "=";
@ -296,8 +296,8 @@ if (!exports.__esModule) Object.defineProperty(exports, "__esModule", { value: t
return a;
};exports.b64toBA = b64toBA
}, function(modId) { var map = {"./util":1689036503197}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1689036503197, function(require, module, exports) {
}, function(modId) { var map = {"./util":1683383058319}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1683383058319, function(require, module, exports) {
var BI_RM = "0123456789abcdefghijklmnopqrstuvwxyz";
if (!exports.__esModule) Object.defineProperty(exports, "__esModule", { value: true });function int2char(n) {
return BI_RM.charAt(n);
@ -358,7 +358,7 @@ if (!exports.__esModule) Object.defineProperty(exports, "__esModule", { value: t
//#endregion BIT_OPERATIONS
}, function(modId) { var map = {}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1689036503198, function(require, module, exports) {
__DEFINE__(1683383058320, function(require, module, exports) {
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
@ -675,8 +675,8 @@ var JSEncryptRSAKey = /** @class */ (function (_super) {
}(RSAKey));
if (!exports.__esModule) Object.defineProperty(exports, "__esModule", { value: true });Object.defineProperty(exports, 'JSEncryptRSAKey', { enumerable: true, configurable: true, get: function() { return JSEncryptRSAKey; } });
}, function(modId) { var map = {"./lib/jsbn/base64":1689036503196,"./lib/asn1js/hex":1689036503199,"./lib/asn1js/base64":1689036503200,"./lib/asn1js/asn1":1689036503201,"./lib/jsbn/rsa":1689036503203,"./lib/jsbn/jsbn":1689036503204,"./lib/jsrsasign/asn1-1.0":1689036503207}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1689036503199, function(require, module, exports) {
}, function(modId) { var map = {"./lib/jsbn/base64":1683383058318,"./lib/asn1js/hex":1683383058321,"./lib/asn1js/base64":1683383058322,"./lib/asn1js/asn1":1683383058323,"./lib/jsbn/rsa":1683383058325,"./lib/jsbn/jsbn":1683383058326,"./lib/jsrsasign/asn1-1.0":1683383058329}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1683383058321, function(require, module, exports) {
// Hex JavaScript decoder
// Copyright (c) 2008-2013 Lapo Luchini <lapo@lapo.it>
// Permission to use, copy, modify, and/or distribute this software for any
@ -743,7 +743,7 @@ if (!exports.__esModule) Object.defineProperty(exports, "__esModule", { value: t
};
}, function(modId) { var map = {}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1689036503200, function(require, module, exports) {
__DEFINE__(1683383058322, function(require, module, exports) {
// Base64 JavaScript decoder
// Copyright (c) 2008-2013 Lapo Luchini <lapo@lapo.it>
// Permission to use, copy, modify, and/or distribute this software for any
@ -834,7 +834,7 @@ if (!exports.__esModule) Object.defineProperty(exports, "__esModule", { value: t
};
}, function(modId) { var map = {}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1689036503201, function(require, module, exports) {
__DEFINE__(1683383058323, function(require, module, exports) {
// ASN.1 JavaScript decoder
// Copyright (c) 2008-2014 Lapo Luchini <lapo@lapo.it>
// Permission to use, copy, modify, and/or distribute this software for any
@ -1401,8 +1401,8 @@ var ASN1Tag = /** @class */ (function () {
}());
if (!exports.__esModule) Object.defineProperty(exports, "__esModule", { value: true });Object.defineProperty(exports, 'ASN1Tag', { enumerable: true, configurable: true, get: function() { return ASN1Tag; } });
}, function(modId) { var map = {"./int10":1689036503202}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1689036503202, function(require, module, exports) {
}, function(modId) { var map = {"./int10":1683383058324}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1683383058324, function(require, module, exports) {
// Big integer base-10 printing library
// Copyright (c) 2014 Lapo Luchini <lapo@lapo.it>
// Permission to use, copy, modify, and/or distribute this software for any
@ -1492,7 +1492,7 @@ var Int10 = /** @class */ (function () {
if (!exports.__esModule) Object.defineProperty(exports, "__esModule", { value: true });Object.defineProperty(exports, 'Int10', { enumerable: true, configurable: true, get: function() { return Int10; } });
}, function(modId) { var map = {}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1689036503203, function(require, module, exports) {
__DEFINE__(1683383058325, function(require, module, exports) {
// Depends on jsbn.js and rng.js
// Version 1.1: support utf-8 encoding in pkcs1pad2
// convert a (hex) string to a bignum object
@ -1965,8 +1965,8 @@ function removeDigestHeader(str) {
// public
// RSAKey.prototype.encrypt_b64 = RSAEncryptB64;
}, function(modId) { var map = {"./jsbn":1689036503204,"./rng":1689036503205}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1689036503204, function(require, module, exports) {
}, function(modId) { var map = {"./jsbn":1683383058326,"./rng":1683383058327}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1683383058326, function(require, module, exports) {
// Copyright (c) 2005 Tom Wu
// All Rights Reserved.
// See "LICENSE" for details.
@ -3722,8 +3722,8 @@ if (!exports.__esModule) Object.defineProperty(exports, "__esModule", { value: t
BigInteger.ZERO = nbv(0);
BigInteger.ONE = nbv(1);
}, function(modId) { var map = {"./util":1689036503197}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1689036503205, function(require, module, exports) {
}, function(modId) { var map = {"./util":1683383058319}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1683383058327, function(require, module, exports) {
// Random number generator - requires a PRNG backend, e.g. prng4.js
var __TEMP__ = require('./prng4');var prng_newstate = __TEMP__['prng_newstate'];var rng_psize = __TEMP__['rng_psize'];
var rng_state;
@ -3781,8 +3781,8 @@ var SecureRandom = /** @class */ (function () {
}());
if (!exports.__esModule) Object.defineProperty(exports, "__esModule", { value: true });Object.defineProperty(exports, 'SecureRandom', { enumerable: true, configurable: true, get: function() { return SecureRandom; } });
}, function(modId) { var map = {"./prng4":1689036503206}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1689036503206, function(require, module, exports) {
}, function(modId) { var map = {"./prng4":1683383058328}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1683383058328, function(require, module, exports) {
// prng4.js - uses Arcfour as a PRNG
var Arcfour = /** @class */ (function () {
function Arcfour() {
@ -3831,7 +3831,7 @@ if (!exports.__esModule) Object.defineProperty(exports, "__esModule", { value: t
if (!exports.__esModule) Object.defineProperty(exports, "__esModule", { value: true });var rng_psize = exports.rng_psize = 256;
}, function(modId) { var map = {}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1689036503207, function(require, module, exports) {
__DEFINE__(1683383058329, function(require, module, exports) {
/* asn1-1.0.13.js (c) 2013-2017 Kenji Urushima | kjur.github.com/jsrsasign/license
*/
/*
@ -5426,8 +5426,8 @@ KJUR.asn1.DERTaggedObject = function (params) {
};
YAHOO.lang.extend(KJUR.asn1.DERTaggedObject, KJUR.asn1.ASN1Object);
}, function(modId) { var map = {"../jsbn/jsbn":1689036503204,"./yahoo":1689036503208}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1689036503208, function(require, module, exports) {
}, function(modId) { var map = {"../jsbn/jsbn":1683383058326,"./yahoo":1683383058330}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1683383058330, function(require, module, exports) {
/*!
Copyright (c) 2011, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
@ -5499,13 +5499,13 @@ YAHOO.lang = {
};
}, function(modId) { var map = {}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1689036503209, function(require, module, exports) {
__DEFINE__(1683383058331, function(require, module, exports) {
module.exports = {
"version": "3.2.1"
}
}, function(modId) { var map = {}; return __REQUIRE__(map[modId], modId); })
return __REQUIRE__(1689036503194);
return __REQUIRE__(1683383058316);
})()
//miniprogram-npm-outsideDeps=[]
//# sourceMappingURL=index.js.map

File diff suppressed because one or more lines are too long

5
node_modules/.package-lock.json generated vendored

@ -22,11 +22,6 @@
"resolved": "https://registry.npmjs.org/weapp-qrcode-canvas-2d/-/weapp-qrcode-canvas-2d-1.1.2.tgz",
"integrity": "sha512-HQef+xpZiiWDcq8aLZdXnVdNljoYsEWiEKiBYnAnfgqXTeYfC8ApzoB9pMI5mnPFbhtu5xCi8oId1g/86uUl8Q=="
},
"node_modules/wxml2canvas": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/wxml2canvas/-/wxml2canvas-1.0.1.tgz",
"integrity": "sha512-AdWvxgTjJtW/m6Cki1cwGO0HOERKU8O9V3RcCz8UyqJbrPF7e8Nv27/epYiIs64HlbPTKWTLl7ECjQi6UVducA=="
},
"node_modules/wxmp-rsa": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/wxmp-rsa/-/wxmp-rsa-2.1.0.tgz",

330
node_modules/wxml2canvas/README.md generated vendored

@ -1,330 +0,0 @@
## v1.3.0
优化图片清晰度控制。
`new Wxml2Canvas`时增加`destZoom`属性默认3(建议取值范围2-5),取消`destWidth``destHeight`属性的作用。destZoom值越大图片越大建议不传使用小程序默认值。
## v1.2.0
支持base64图片的转换和绘制基于sdk1.9.9+,将图片存储到本地再绘制。
使用时src或background-image传入base64编码的值然后声明`data-base64="1"`。下图绿框部分为base64图片
![base64图片](https://mmocgame.qpic.cn/wechatgame/duc2TvpEgSSC0vZndxlmTVUYjVzXDV2G25rkpWlH63BOWc5iaUHI39GBcsd4pjjiaJ/0)
## v1.1.0
支持图片的缩放和裁剪,使用时声明如:`data-mode="aspectFill"`mode的13种模式完全支持。效果如下
![图片裁剪和缩放](https://mmocgame.qpic.cn/wechatgame/duc2TvpEgSQCtBianicxcWObMNDWVImPRKIAHSGu9TwQkCslPUZXMmyuwibdzcKtsUl/0)
注意目前开发者工具图片裁剪显示有bug以真机效果为准。
# Wml2Canvas 介绍
## 特性
> * 配置数据绘制基础图形、文字
> * wxml元素转换成canvas元素
## 示例
直接在小程序开发工具里运行项目可看到两种使用方式。真机预览时建议填入有权限的appid然后打开调试否则无法看到网络图片。
## 使用方式
安装:
```
npm install wxml2canvas
```
wxml:
```html
<view class="share__canvas share__canvas1">
<view class="share__canvas1-text draw_canvas"
data-type="text" data-text="这是一段无边距文字">
这是一段无边距文字
</view>
</view>
<canvas canvas-id="canvas1" class="share__canvas"></canvas>
```
js:
```javascript
import Wxml2Canvas from 'wxml2canvas'; // 根据具体路径修改node_modules会被忽略
Page({
drawImage1 () {
let self = this;
this.drawImage1 = new Wxml2Canvas({
width: 340, // 宽, 以iphone6为基准传具体数值其他机型自动适配
height: 210, // 高
element: 'canvas1',
background: '#f0f0f0',
progress (percent) {
},
finish(url) {
let imgs = self.data.imgs;
imgs.push(url);
self.setData({
imgs
})
},
error (res) {
}
});
let data = {
list: [{
type: 'wxml',
class: '.share__canvas1 .draw_canvas', // draw_canvas指定待绘制的元素
limit: '.share__canvas1', // 限定绘制元素的范围,取指定元素与它的相对位置
x: 0,
y: 0
}]
}
this.drawImage1.draw(data);
},
})
```
## 属性
### 初始化属性
`new Wxml2Canvas(options)` 时传入的`options`属性如下:
| 属性名 | 类型 | 默认值 | 是否必填 | 说明 |
| -------- | -------- | -------- | -------- | -------- |
| element | String | '' | 是 | 画布的id |
| width | Number | 0 | 是 | 画布的宽以iphone6的375为基准其他机型按比例自动设置实际宽度 |
| height | Number | 0 | 是 | 画布的高,同上 |
| destZoom | Number | 3 | 否 | 输出的图片的像素密度,不建议传值,如果需要控制图片大小,可以适当减小 |
| zoom | Number | 1 | 否 | 画布整体缩放比例,不建议传值,会覆盖各种机型的适配 |
| translateX | Number | 0 | 否 | 画布整体横向位移 |
| translateY | Number | 0 | 否 | 画布整体纵向位移 |
| height | Number | height * 2 | 否 | 输出的图片的高度 |
| background | String | #ffffff | 否 | 画布的整体背景色 |
| gradientBackground | Object | null | 否 | 画布整体的渐变背景色 |
| finish | Function | null | 否 | 绘制成功后回调函数, 返回值url绘制图片的本地路径 |
| progress | Function | null | 否 | 绘制进度返回值percent0-100 |
| error | Function | null | 否 | 绘制失败后回调函数返回值object包含具体原因 |
绘制失败的原因如下:
| 错误码 | 原因 | 说明 |
| -------- | ----- | ---- |
| errcode | errmsg | e |
| 1000 | save canvas error | 保存图片失败 |
| 1001 | download pic error | 预下载图片失败 |
| 1002 | drawRect error | 绘制矩形失败 |
| 1003 | drawImage error | 绘制图片失败 |
| 1004 | drawText error | 绘制文本失败 |
| 1005 | drawCircle error | 绘制圆形图片失败 |
| 1006 | drawCircleImage error | 绘制圆形失败 |
| 1007 | drawLine error | 绘制线条失败 |
| 1008 | drawWxml error | 绘制Wxml失败 |
| 1009 | drawWxml preLoadImage error | 预下载Wxml图片失败 |
## 数据配置方式支持的格式
代码示例:
```javascript
let data = {
list: [{
type: 'rect',
x: 10,
y: 10,
style: {
width: 150,
height: 80,
fill: '#3762ab',
border: '10px solid #aaaaaa',
}
}
}
```
上述是一个矩形的创建方式,可看代码里的示例。下面是支持的属性:
### 矩形
| 属性 | 类型 | 是否必填 | 说明 |
| -------- | ----- | ---- | --- |
| type | String | 是 | 'rect',声明为绘制矩形 |
| x | Number | 是 | 坐标x |
| y | Number | 是 | 坐标y |
| style |
| width | Number | 是 | 宽 |
| height | Number | 是 | 高 |
| fill | String 或 Object | 否 | 填充颜色,支持渐变色 |
| border | String | 否 | 边框,需要严格遵循 __'10px dashed #540821'__ 格式 |
| boxShadow | String | 否 | 阴影,需要严格遵循 __'10 20 20 rgba(0, 0, 0, 0.4)'__ 格式 |
| dash | Array | 否 | 虚线边框的间距和偏移 |
### 圆形
| 属性 | 类型 | 是否必填 | 说明 |
| -------- | ----- | ---- | --- |
| type | String | 是 | 'circle',声明为绘制圆形 |
| x | Number | 是 | 坐标x |
| y | Number | 是 | 坐标y |
| style |
| r | Number | 是 | 半径 |
| fill | String 或 Object | 否 | 填充颜色,支持渐变色 |
| border | String | 否 | 边框,需要严格遵循 __'10px dashed #540821'__ 格式 |
| boxShadow | String | 否 | 阴影,需要严格遵循 __'10 20 20 rgba(0, 0, 0, 0.4)'__ 格式 |
| dash | Array | 否 | 虚线边框的间距和偏移 |
### 线条
| 属性 | 类型 | 是否必填 | 说明 |
| -------- | ----- | ---- | --- |
| type | String | 是 | 'line',声明为绘制线条 |
| x | Number | 是 | 起始坐标x |
| y | Number | 是 | 起始坐标y |
| x2 | Number | 是 | 终止坐标x |
| y2 | Number | 是 | 终止坐标y |
| style |
| width | Number | 是 | 线条宽度 |
| stroke | String 或 Object | 否 | 填充颜色,支持渐变色 |
| boxShadow | String | 否 | 阴影,需要严格遵循 __'10 20 20 rgba(0, 0, 0, 0.4)'__ 格式 |
| dash | Array | 否 | 有此属性则绘制虚线,传入值为虚线边框的间距和偏移 |
### 图片
| 属性 | 类型 | 是否必填 | 说明 |
| -------- | ----- | ---- | --- |
| type | String | 是 | 'image',声明为绘制图片 |
| x | Number | 是 | 坐标x |
| y | Number | 是 | 坐标y |
| url | String | 是 | 图片链接,支持 http/https 及本地图片域名需要在mp平台加入白名单 |
| style |
| width | Number | 是 | 宽 |
| height | Number | 是 | 高 |
| border | String | 否 | 边框,需要严格遵循 __'10px dashed #540821'__ 格式 |
| boxShadow | String | 否 | 阴影,需要严格遵循 __'10 20 20 rgba(0, 0, 0, 0.4)'__ 格式 |
| dash | Array | 否 | 虚线边框的间距和偏移 |
### 圆形图片
| 属性 | 类型 | 是否必填 | 说明 |
| -------- | ----- | ---- | --- |
| type | String | 是 | 'radius-image',声明为绘制圆形图片 |
| x | Number | 是 | 坐标x |
| y | Number | 是 | 坐标y |
| url | String | 是 | 图片链接,支持 http/https 及本地图片域名需要在mp平台加入白名单 |
| style |
| r | Number | 是 | 半径 |
| border | String | 否 | 边框,需要严格遵循 __'10px dashed #540821'__ 格式 |
| boxShadow | String | 否 | 阴影,需要严格遵循 __'10 20 20 rgba(0, 0, 0, 0.4)'__ 格式 |
| dash | Array | 否 | 虚线边框的间距和偏移 |
### 文本
| 属性 | 类型 | 是否必填 | 说明 |
| -------- | ----- | ---- | --- |
| type | String | 是 | 'text',声明为绘制文本 |
| x | Number | 是 | 坐标x |
| y | Number | 是 | 坐标y |
| text | String | 否 | 文本内容 |
| style |
| width | Number | 否 | 文本最大宽,超过则换行 |
| height | Number | 否 | 文本高度 |
| color | String | 否 | 字体颜色 |
| fontSize | Number | 否 | 字体大小默认14 |
| fontFamily | String | 否 | 字体样式 |
| lineHeight | Number | 否 | 字体行高默认14 * 1.2 |
| fontWeight | String | 否 | 字体粗细默认normal |
| lineClamp | Number | 否 | 文字的最大行数,超出则用 ... 截取 |
| whiteSpace | String | 否 | 是否换行默认wrap如果传入nowrap则不换行 |
| textAlign | String | 否 | 文本的水平对齐方式默认left |
| border | String | 否 | 边框,需要严格遵循 __'10px dashed #540821'__ 格式 |
| background | String | 否 | 字体背景色 |
| boxShadow | String | 否 | 阴影,需要严格遵循 __'10 20 20 rgba(0, 0, 0, 0.4)'__ 格式 |
| dash | Array | 否 | 虚线边框的间距和偏移 |
| padding | String | 否 | 内边距,'10 10 10 10', 与css有区别依次为左、上、右、下可以不带单位 |
此外,上述所有的元素都可以增加 __delay:true__ 属性,来实现延迟绘制。
## wxml转换的方式
如上面的使用示例声明type为wxml时会查询绘制元素节点的样式并绘制。下表是对应属性
| 属性 | 类型 | 是否必填 | 说明 |
| -------- | ----- | ---- | --- |
| type | String | 是 | 'wxml'声明转换wxml |
| x | Number | 是 | 坐标x用于修正位置 |
| y | Number | 是 | 坐标y用于修正位置 |
| class | String | 是 | 待查询绘制的节点类名,会查询所有相同的类名 |
| limit | String | 是 | 限定节点的外围容器,在取坐标时,取与它的相对位置 |
目前支持的wxml类型如下需要声明在节点上
### 图片
| 属性 | 类型 | 是否必填 | 说明 |
| -------- | ----- | ---- | --- |
| data-type | String | 是 | 'image',矩形图片 |
| data-url | String | 是 | 图片链接 |
| data-left | Number | 否 | 修正横坐标位置 |
| data-top | Number | 否 | 修正纵坐标位置 |
### 圆形图片
| 属性 | 类型 | 是否必填 | 说明 |
| -------- | ----- | ---- | --- |
| data-type | String | 是 | 'radius-image',圆形图片 |
| data-url | String | 是 | 图片链接 |
| data-left | Number | 否 | 修正横坐标位置 |
| data-top | Number | 否 | 修正纵坐标位置 |
### 背景图片
| 属性 | 类型 | 是否必填 | 说明 |
| -------- | ----- | ---- | --- |
| data-type | String | 是 | 'background-image',背景图片 |
| data-left | Number | 否 | 修正横坐标位置 |
| data-top | Number | 否 | 修正纵坐标位置 |
### 文本
| 属性 | 类型 | 是否必填 | 说明 |
| -------- | ----- | ---- | --- |
| data-type | String | 是 | 'text',文本 |
| data-text | String | 是 | 文本内容 |
| data-left | Number | 否 | 修正横坐标位置 |
| data-top | Number | 否 | 修正纵坐标位置 |
| data-padding | String | 否 | 内边距与style叠加 |
| data-background | String | 否 | 背景色 |
### 行内文本
| 属性 | 类型 | 是否必填 | 说明 |
| -------- | ----- | ---- | --- |
| data-type | String | 是 | 'inline-text',行内文本 |
| data-text | String | 是 | 文本内容 |
| data-left | Number | 否 | 修正横坐标位置 |
| data-top | Number | 否 | 修正纵坐标位置 |
| data-padding | String | 否 | 内边距与style叠加 |
| data-background | String | 否 | 背景色 |
### 行内图片
| 属性 | 类型 | 是否必填 | 说明 |
| -------- | ----- | ---- | --- |
| data-type | String | 是 | 'inline-image',矩形图片 |
| data-url | String | 是 | 图片链接 |
| data-left | Number | 否 | 修正横坐标位置 |
| data-top | Number | 否 | 修正纵坐标位置 |
行内文本与图片有特殊处理逻辑当top值相同时按照从左到右顺序排列可能会与展现有差异。
此外,上述所有的元素都可以增加 __delay:Number__ 属性,来实现延迟绘制, number范围1-100间接实现层级控制。
## Todo
> * 支持更多文本样式
> * 支持任意角度圆角

5
node_modules/wxml2canvas/app.js generated vendored

@ -1,5 +0,0 @@
App({
onLaunch () {
}
})

27
node_modules/wxml2canvas/app.json generated vendored

@ -1,27 +0,0 @@
{
"pages":[
"pages/wxml/index",
"pages/index/index"
],
"window":{
"backgroundTextStyle":"light",
"navigationBarBackgroundColor": "#fff",
"navigationBarTitleText": "Wxml2Canvas",
"navigationBarTextStyle":"black"
},
"tabBar": {
"color": "#444444",
"selectedColor": "#000000",
"backgroundColor": "#ffffff",
"borderStyle": "black",
"position": "top",
"list": [{
"text": "wxml转canvas",
"pagePath": "pages/wxml/index"
}, {
"text": "配置生成",
"pagePath": "pages/index/index"
}]
}
}

@ -1,3 +0,0 @@
import Wxml2Canvas from './src/index';
export default Wxml2Canvas;

@ -1,16 +0,0 @@
{
"name": "wxml2canvas",
"version": "1.0.1",
"description": "将wxml指定节点转换成canvas元素",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [
"wxml2canvas",
"wxml",
"canvas"
],
"author": "wg",
"license": "ISC"
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

@ -1,411 +0,0 @@
import Wxml2Canvas from '../../src/index';
Page({
data: {
},
onLoad (res) {
this.drawImage1();
this.drawImage2();
this.drawImage3();
this.drawImage4();
this.drawImage5();
this.drawImage6();
this.drawImage7();
this.drawImage8();
},
drawImage1 () {
this.drawImage1 = new Wxml2Canvas({
width: 340,
height: 210,
element: 'canvas1',
gradientBackground: {
color: ['#27326b', '#540821'],
line: [0, 0, 0, 210]
},
finish(url) {
},
error (res) {
}
});
},
drawImage2 () {
this.drawImage2 = new Wxml2Canvas({
width: 340,
height: 210,
element: 'canvas2',
background: '#f0f0f0',
finish(url) {
},
error (res) {
}
});
let data2 = {
list: [{
type: 'rect',
x: 10,
y: 10,
style: {
width: 150,
height: 80,
fill: {
color: ['#27326b', '#540821'],
line: [0, 0, 0, 110]
},
border: '10px solid #aaaaaa',
}
},{
type: 'rect',
x: 170,
y: 100,
style: {
width: 150,
height: 80,
fill: '#3762ab',
border: '10px dashed #540821',
boxShadow: '10 20 20 rgba(0, 0, 0, 0.4)',
// dash: [10, 20, 10]
}
}]
}
this.drawImage2.draw(data2);
},
drawImage3 () {
this.drawImage3 = new Wxml2Canvas({
width: 340,
height: 210,
element: 'canvas3',
background: '#f0f0f0',
finish(url) {
},
error (res) {
}
});
let text = '一行很长很长很长很长很长很长很长很长很长很长的文字';
let data3 = {
list: [{
type: 'text',
text,
x: 0,
y: 0,
style: {
textAlign: 'left',
width: 130,
height: 80,
fontSize: 14,
lineHeight: 16,
fontWeight: 'bold',
boxShadow: '5 5 20 rgba(255, 0, 0, 0.5)',
}
}, {
type: 'text',
text,
x: 170,
y: 0,
style: {
textAlign: 'center',
width: 130,
fontSize: 14,
lineHeight: 16,
color: '#888888',
}
}, {
type: 'text',
text,
x: 0,
y: 70,
style: {
textAlign: 'right',
width: 130,
fontSize: 14,
lineHeight: 16,
fontFamily: 'Serif'
}
}, {
type: 'text',
text,
x: 170,
y: 70,
style: {
textAlign: 'center',
width: 130,
lineClamp: 2,
fontSize: 14,
lineHeight: 16,
}
}, {
type: 'text',
text,
x: 0,
y: 140,
style: {
textAlign: 'left',
width: 130,
fontSize: 14,
lineHeight: 16,
height: 60,
background: 'rgba(0, 111, 255, 0.5)',
color: '#ffffff'
}
}, {
type: 'text',
text,
x: 170,
y: 140,
style: {
textAlign: 'left',
width: 130,
background: 'rgba(255, 0, 0, 0.3)',
fontSize: 14,
lineHeight: 16,
height: 60,
border: '2px solid #000000',
padding: '5 10 0 10'
}
}]
}
this.drawImage3.draw(data3);
},
drawImage4 () {
this.drawImage4 = new Wxml2Canvas({
width: 340,
height: 210,
element: 'canvas4',
background: '#f0f0f0',
finish(url) {
},
error (res) {
}
});
let data4 = {
list: [{
type: 'circle',
x: 30,
y: 30,
style: {
r: 40,
fill: {
color: ['#27326b', '#540821'],
line: [0, 0, 0, 110]
},
border: '10px solid #aaaaaa',
boxShadow: '10 10 20 rgba(0, 0, 0, 0.6)',
}
},{
type: 'circle',
x: 200,
y: 100,
style: {
r: 40,
fill: '#3762ab',
border: '10px dashed #540821',
// dash: [10, 20, 10]
}
}]
}
this.drawImage4.draw(data4);
},
drawImage5 () {
this.drawImage5 = new Wxml2Canvas({
width: 340,
height: 210,
element: 'canvas5',
background: '#f0f0f0',
finish(url) {
},
error (res) {
}
});
let data5 = {
list: [{
type: 'line',
x: 30,
y: 30,
x2: 200,
y2: 30,
style: {
width: 10,
// stroke: '#3762ab',
stroke: {
color: ['#27326b', '#540821'],
line: [0, 0, 200, 10]
},
}
},{
type: 'line',
x: 30,
y: 100,
x2: 200,
y2: 100,
style: {
r: 40,
width: 10,
stroke: '#3762ab',
dash: [10, 10, 0],
boxShadow: '20 20 20 rgba(0, 0, 0, 0.3)',
}
}]
}
this.drawImage5.draw(data5);
},
drawImage6 () {
this.drawImage6 = new Wxml2Canvas({
width: 340,
height: 210,
element: 'canvas6',
background: '#f0f0f0',
finish(url) {
},
error (res) {
}
});
let data6 = {
list: [{
type: 'image',
x: 10,
y: 10,
url: 'https://mmocgame.qpic.cn/wechatgame/duc2TvpEgSQCEa0WicosqlEgJiacYLaTLEDFB8Kq9Hr7LjAVhM8wu8TT77KqNezQnH/0',
style: {
width: 150,
height: 80,
border: '10px solid #aaaaaa',
boxShadow: '10 20 20 rgba(0, 0, 0, 0.4)',
}
},{
type: 'image',
x: 170,
y: 100,
url: './img/demo.png',
style: {
width: 150,
height: 80,
border: '10px dashed #540821',
// dash: [10, 20, 10]
}
}]
}
this.drawImage6.draw(data6);
},
drawImage7 () {
this.drawImage7 = new Wxml2Canvas({
width: 340,
height: 210,
element: 'canvas7',
background: '#f0f0f0',
finish(url) {
},
error (res) {
}
});
let data7 = {
list: [{
type: 'radius-image',
x: 10,
y: 10,
url: './img/demo.png',
style: {
r: 40,
border: '10px solid #aaaaaa',
boxShadow: '10 10 20 rgba(0, 0, 0, 0.6)',
}
},{
type: 'radius-image',
x: 170,
y: 100,
url: './img/demo.png',
style: {
r: 40,
border: '10px dashed #540821',
// dash: [10, 20, 10]
}
}]
}
this.drawImage7.draw(data7);
},
drawImage8 () {
this.drawImage8 = new Wxml2Canvas({
width: 340,
height: 400,
element: 'canvas8',
background: '#f0f0f0',
finish(url) {
},
error (res) {
}
});
let style = {
text: {
textAlign: 'left',
width: 320,
fontSize: 16,
lineHeight: 25,
}
}
let text = [
'Wxml2Cavnas库是一个生成小程序分享图的通用方案提供了两种绘制方式',
'封装基础图形的绘制接口包括矩形、圆形、线条、图片、圆角图片、纯文本等使用时只需要声明元素类型并提供关键数据即可不需要再关注canvas的具体绘制过程',
'wxml直接转换成canvas元素使用时传入待绘制的wxml节点的class类名并且声明绘制此节点的类型图片、文字等会自动读取此节点的computedStyle利用这些数据完成元素的绘制。',
]
let height1 = 20 + Math.ceil(this.drawImage8.measureWidth(text[0], '16px pingfang') / style.text.width) * style.text.lineHeight;
let height2 = height1 + 10 + Math.ceil(this.drawImage8.measureWidth(text[1], '16px pingfang') / style.text.width) * style.text.lineHeight;
let data8 = {
list: [
{
type: 'text',
text: text[0],
x: 10,
y: 10,
style: style.text
}, {
type: 'text',
text: text[1],
x: 10,
y: height1,
style: style.text
}, {
type: 'image',
x: 10,
y: height2,
url: './img/demo.png',
style: {
width: 100,
height: 60,
}
}, {
type: 'text',
text: text[2],
x: 15,
y: height2 + 80,
style: style.text
}
]
}
this.drawImage8.draw(data8);
}
});

@ -1,10 +0,0 @@
<view class="share">
<canvas canvas-id="canvas1" class="share__canvas"></canvas>
<canvas canvas-id="canvas2" class="share__canvas"></canvas>
<canvas canvas-id="canvas4" class="share__canvas"></canvas>
<canvas canvas-id="canvas3" class="share__canvas"></canvas>
<canvas canvas-id="canvas5" class="share__canvas"></canvas>
<canvas canvas-id="canvas6" class="share__canvas"></canvas>
<canvas canvas-id="canvas7" class="share__canvas"></canvas>
<canvas canvas-id="canvas8" class="share__canvas share__canvas-long"></canvas>
</view>

@ -1,18 +0,0 @@
.share{
width: 100vw;
display: flex;
flex-direction: column;
align-items: center;
box-sizing: border-box;
}
.share__canvas {
width: 680rpx;
height: 420rpx;
background: #f0f0f0;
margin-bottom: 60rpx;
}
.share__canvas-long {
height: 800rpx;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

@ -1,260 +0,0 @@
import Wxml2Canvas from '../../src/index';
Page({
data: {
imgs: []
},
onLoad (res) {
this.drawImage1();
setTimeout(() => {
this.drawImage2();
}, 300);
setTimeout(() => {
this.drawImage3();
}, 600)
setTimeout(() => {
this.drawImage4();
}, 900)
setTimeout(() => {
this.drawImage5();
}, 1200)
setTimeout(() => {
this.drawImage6();
}, 1500)
},
saveImage (evt) {
let index = evt.target.dataset.index;
wx.saveImageToPhotosAlbum({
filePath: this.data.imgs[index],
success(res) {
wx.showToast({
title: '保存成功',
icon: 'success'
})
},
fail () {
wx.showToast({
title: '保存失败',
icon: 'none'
})
}
})
},
drawImage1 () {
let self = this;
this.drawImage1 = new Wxml2Canvas({
width: 340,
height: 210,
element: 'canvas1',
background: '#f0f0f0',
progress (percent) {
},
finish(url) {
let imgs = self.data.imgs;
imgs.push(url);
self.setData({
imgs
})
},
error (res) {
}
});
let data = {
list: [{
type: 'wxml',
class: '.share__canvas1 .draw_canvas',
limit: '.share__canvas1',
x: 0,
y: 0
}]
}
this.drawImage1.draw(data);
},
drawImage2 () {
let self = this;
this.drawImage2 = new Wxml2Canvas({
width: 340,
height: 210,
element: 'canvas2',
background: '#f0f0f0',
progress (percent) {
},
finish(url) {
console.log(url)
let imgs = self.data.imgs;
imgs.push(url);
self.setData({
imgs
})
},
error (res) {
}
});
let data = {
list: [{
type: 'wxml',
class: '.share__canvas2 .draw_canvas',
limit: '.share__canvas2',
x: 0,
y: 0
}]
}
this.drawImage2.draw(data);
},
drawImage3 () {
let self = this;
this.drawImage3 = new Wxml2Canvas({
width: 340,
height: 210,
element: 'canvas3',
background: '#f0f0f0',
progress (percent) {
// console.log(percent)
},
finish(url) {
let imgs = self.data.imgs;
imgs.push(url);
self.setData({
imgs
})
},
error (res) {
}
});
let data = {
list: [{
type: 'wxml',
class: '.share__canvas3 .draw_canvas',
limit: '.share__canvas3',
x: 0,
y: 0
}]
}
this.drawImage3.draw(data);
},
drawImage4 () {
let self = this;
this.drawImage4 = new Wxml2Canvas({
width: 340,
height: 400,
element: 'canvas4',
background: '#f0f0f0',
progress (percent) {
// console.log(percent)
},
finish(url) {
let imgs = self.data.imgs;
imgs.push(url);
self.setData({
imgs
})
},
error (res) {
}
});
let data = {
list: [{
type: 'wxml',
class: '.share__canvas4 .draw_canvas',
limit: '.share__canvas4',
x: 0,
y: 0
}]
}
this.drawImage4.draw(data);
},
drawImage5 () {
let self = this;
this.drawImage5 = new Wxml2Canvas({
width: 340,
height: 210,
element: 'canvas5',
background: '#f0f0f0',
progress (percent) {
// console.log(percent)
},
finish(url) {
let imgs = self.data.imgs;
imgs.push(url);
self.setData({
imgs
})
},
error (res) {
}
});
let data = {
list: [{
type: 'wxml',
class: '.share__canvas5 .draw_canvas',
limit: '.share__canvas5',
x: 0,
y: 0
}]
}
this.drawImage5.draw(data);
},
drawImage6 () {
let self = this;
this.drawImage6 = new Wxml2Canvas({
width: 340,
height: 450,
element: 'canvas6',
background: '#f0f0f0',
progress (percent) {
// console.log(percent)
},
finish(url) {
let imgs = self.data.imgs;
imgs.push(url);
self.setData({
imgs
})
},
error (res) {
}
});
let data = {
list: [{
type: 'wxml',
class: '.share__canvas6 .draw_canvas',
limit: '.share__canvas6',
x: 0,
y: 0
}]
}
this.drawImage6.draw(data);
}
});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -1,40 +0,0 @@
{
"description": "项目配置文件",
"packOptions": {
"ignore": []
},
"setting": {
"urlCheck": false,
"es6": true,
"postcss": true,
"minified": true,
"newFeature": true,
"autoAudits": false
},
"compileType": "miniprogram",
"libVersion": "2.6.2",
"appid": "",
"projectname": "wxml2canvas",
"debugOptions": {
"hidedInDevtools": []
},
"isGameTourist": false,
"condition": {
"search": {
"current": -1,
"list": []
},
"conversation": {
"current": -1,
"list": []
},
"game": {
"currentL": -1,
"list": []
},
"miniprogram": {
"current": -1,
"list": []
}
}
}

File diff suppressed because it is too large Load Diff

@ -1,122 +0,0 @@
/**
* 获取字符的长度full为true时一个汉字算两个长度
* @param {String} str
* @param {Boolean} full
*/
function getTextLength (str, full) {
let len = 0;
for (let i = 0; i < str.length; i++) {
let c = str.charCodeAt(i);
//单字节加1
if ((c >= 0x0001 && c <= 0x007e) || (0xff60 <= c && c <= 0xff9f)) {
len++;
}
else {
len += (full ? 2 : 1);
}
}
return len;
}
/**
* rgba(255, 255, 255, 1) => #ffffff
* @param {String} color
*/
function transferColor (color = '') {
let res = '#';
color = color.replace(/^rgba?\(/, '').replace(/\)$/, '');
color = color.split(', ');
color.length > 3 ? color.length = 3 : '';
for(let item of color) {
item = parseInt(item || 0);
if(item < 10) {
res += ('0' + item)
}else {
res += (item.toString(16))
}
}
return res;
}
function transferBorder (border = '') {
let res = border.match(/(\w+)px\s(\w+)\s(.*)/);
let obj = {};
if(res) {
obj = {
width: +res[1],
style: res[2],
color: res[3]
}
}
return res ? obj : null;
}
/**
* 内边距依次为上右下左
* @param {*} padding
*/
function transferPadding (padding = '0 0 0 0') {
padding = padding.split(' ');
for(let i = 0, len = padding.length; i < len; i++) {
padding[i] = +padding[i].replace('px', '');
}
return padding;
}
/**
* type1: 0, 25, 17, rgba(0, 0, 0, 0.3)
* type2: rgba(0, 0, 0, 0.3) 0px 25px 17px 0px => (0, 25, 17, rgba(0, 0, 0, 0.3))
* @param {*} shadow
*/
function transferBoxShadow(shadow = '', type) {
if(!shadow || shadow === 'none') return;
let color;
let split;
split = shadow.match(/(\w+)\s(\w+)\s(\w+)\s(rgb.*)/);
if (split) {
split.shift();
shadow = split;
color = split[3] || '#ffffff';
} else {
split = shadow.split(') ');
color = split[0] + ')'
shadow = split[1].split('px ');
}
return {
offsetX: +shadow[0] || 0,
offsetY: +shadow[1] || 0,
blur: +shadow[2] || 0,
color
}
}
function getUid(prefix) {
prefix = prefix || '';
return (
prefix +
'xxyxxyxx'.replace(/[xy]/g, c => {
let r = (Math.random() * 16) | 0;
let v = c === 'x' ? r : (r & 0x3) | 0x8;
return v.toString(16);
})
);
}
export default {
getTextLength,
transferBorder,
transferColor,
transferPadding,
transferBoxShadow,
getUid
}

6
package-lock.json generated

@ -11,7 +11,6 @@
"dependencies": {
"tdesign-miniprogram": "^1.1.1",
"weapp-qrcode-canvas-2d": "^1.1.2",
"wxml2canvas": "^1.0.1",
"wxmp-rsa": "^2.1.0"
}
},
@ -33,11 +32,6 @@
"resolved": "https://registry.npmjs.org/weapp-qrcode-canvas-2d/-/weapp-qrcode-canvas-2d-1.1.2.tgz",
"integrity": "sha512-HQef+xpZiiWDcq8aLZdXnVdNljoYsEWiEKiBYnAnfgqXTeYfC8ApzoB9pMI5mnPFbhtu5xCi8oId1g/86uUl8Q=="
},
"node_modules/wxml2canvas": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/wxml2canvas/-/wxml2canvas-1.0.1.tgz",
"integrity": "sha512-AdWvxgTjJtW/m6Cki1cwGO0HOERKU8O9V3RcCz8UyqJbrPF7e8Nv27/epYiIs64HlbPTKWTLl7ECjQi6UVducA=="
},
"node_modules/wxmp-rsa": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/wxmp-rsa/-/wxmp-rsa-2.1.0.tgz",

@ -11,7 +11,6 @@
"dependencies": {
"tdesign-miniprogram": "^1.1.1",
"weapp-qrcode-canvas-2d": "^1.1.2",
"wxml2canvas": "^1.0.1",
"wxmp-rsa": "^2.1.0"
}
}

@ -1,7 +1,6 @@
// pages/home/jl/index.js
const app = getApp();//新建页面时 默认引入
const req = app.xzjlReq();//初始化一个的request() 实例
import Toast from 'tdesign-miniprogram/toast/index';
Page({
/**
@ -13,24 +12,7 @@ Page({
xingxiangtu:{},
userInfo:{},
loverInfo:{},
hours:0,
minute:0,
minutes:0,
pickerValue: [0, 0],
prayTime:0, //祈祷时间
prayTimeStr: '选择祈祷时长' ,
prayerContent:'', //祈祷内容
showSexLogo:false,//不展示形象修改按钮
showPray:false, //显示祈祷弹层
showIsPray:false, //显示取消祈祷弹层
showEnergy:false, //显示赠送能量弹层
showEnergyToast:false, //显示赠送能量提示
showEnergySuccess:false, //赠送成功提示
showEnergyFail:false, //赠送成功提示
showInject:false, //显示注入能量
showInEnergy:false, //显示能量注入中
showScsEnergy:false, //显示注册成功提示
showTiming:false //显示祈祷时间弹层
},
ShowOrNotLogoS(){
this.setData({singleShow:!this.data.singleShow})
@ -44,7 +26,6 @@ Page({
doSetXxtMale(){
this.doSetXxt('male')
},
showTiming(){this.setData({showTiming : !this.data.showTiming})},
doSetXxtFemale(){
this.doSetXxt('female')
},
@ -76,13 +57,11 @@ Page({
})
},
getXxObj(){/**获取形象对应的图片 */
req.getRequest('/api/dict/value/horoscope-resource',{}).then((res)=>{
req.getRequest('/api/dict/values/sprite-type',{}).then((res)=>{
if(res.data.code==200){
console.log(res.data.data);
const horoscopes = res.data.data
const type = this.data.userInfo.horoscope.name
this.setData({xingxiangtu: horoscopes[type].sprite})
this.setData({xingxiangtu:res.data.data})
}
console.log(this.data.xingxiangtu);
}).catch((err)=>{
console.log(err);
})
@ -95,139 +74,17 @@ Page({
if(res.data.code==200){
this.setData({loverInfo:res.data.data})
}
console.log(this.userInfo);
}).catch((err)=>{
console.log(err);
})
},
getTextValue(e){
console.log(e.detail.value);
this.setData({
prayerContent:e.detail.value
})
console.log(this.data.prayerContent);
},
openEnergy(){
this.setData({
showEnergy:!this.data.showEnergy
})
},
cancelEnergy(){
this.setData({
showEnergy:!this.data.showEnergy
})
},
cancelEnergyToast(){
this.setData({
showEnergyToast:false,
showEnergyFail:false
})
},
openPray(){
if(this.data.userInfo.prayerEndTime){
this.setData({
showIsPray:!this.data.showIsPray
})
}else{
this.setData({
showPray:!this.data.showPray,
prayerContent:''
})
}
this.setData({showTiming: false})
},
onPickerChange(e){
console.log(e.detail.value);
const time = e.detail.value[0] + '小时' + e.detail.value[1] + '分钟'
this.setData({prayTimeStr: time})
if(e.detail.value[0] === this.data.hours){
this.setData({
minutes:this.data.minute
})
}else{
this.setData({
minutes:59
})
}
this.setData({
pickerValue: e.detail.value
})
},
openInject(){
this.setData({
showInject:!this.data.showInject
})
},
// 注入晶石
btnInject(){
// 判断是否有能量
if (this.data.userInfo.crystallineEnergy) {
this.setData({
showInject:!this.data.showInject,
showInEnergy:!this.data.showInEnergy
})
req.patchRequest('/api/user/curt/inject-energy-to-pendant',{}).then((res)=>{
console.log('能量注入成功');
})
setTimeout(()=>{
this.setData({
showInEnergy:!this.data.showInEnergy,
showScsEnergy:true
})
this.getUserInfo()
},2000)
}else{
this.setData({showInject: false})
Toast({
context: this,
selector: '#t-toast',
message: '能量不足',
});
}
},
// 关闭注入弹层
closeEnergy(){this.setData({showScsEnergy:false})},
getUserInfo(){
req.getRequest('/api/user/curt',{}).then((res)=>{
if(res.data.code===200){
// 获取已经祈祷时间
const now = new Date();
const startTime = new Date(res.data.data.prayerStartTime)
const diff = now.getTime() - startTime.getTime();
const hour = Math.floor(diff / (1000 * 60 * 60));
const minutes = Math.floor((diff % (1000 * 60 * 60)) / (1000 * 60));
const seconds = Math.floor((diff % (1000 * 60)) / 1000);
const formattedTime = `${hour.toString().padStart(2, '0')}:${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}`;
// 获取结束祈祷返回能量
const nowTime = new Date();
const endTime = new Date(res.data.data.prayerEndTime)
const TimeDiff = endTime.getTime() - nowTime.getTime();
this.setData({
prayTime: formattedTime,
energy: Math.floor(TimeDiff / 360000)
})
const pendantEnergy = res.data.data.crystallineEnergy
const hours = Math.floor(pendantEnergy * 6 / 60); // 计算小时数
const minute = pendantEnergy * 6 - hours * 60
if(hours>0){
this.setData({
minutes:59
})
}
if(hours<=0){
this.setData({
minutes:minute
})
}
this.setData({
userInfo:res.data.data,
hours:hours,
minute:minute,
pendantEnergy:pendantEnergy
})
this.getXxObj()
// console.log(this.data.userInfo);
if(res.data.code==200){
this.setData({userInfo:res.data.data})
}
console.log(this.userInfo);
}).catch((err)=>{
console.log(err);
})
@ -236,95 +93,7 @@ Page({
wx.navigateTo({
url: '/pages/home/jl/jlai/jlai'
})
},
btnOK(){
const prayerEnergy = (this.data.pickerValue[0]*60 + this.data.pickerValue[1])/6
if(this.data.userInfo.crystallineEnergy < 1){
return Toast({
context: this,
selector: '#t-toast',
message: '能量不足',
});
}
if(this.data.prayerContent === ''){
return Toast({
context: this,
selector: '#t-toast',
message: '祈祷内容不能为空',
});
}
if(this.data.prayerContent.length > 11){
return Toast({
context: this,
selector: '#t-toast',
message: '祈祷内容不能超过11个字',
});
}
req.patchRequest('/api/user/curt/prayer',{
prayerContent:this.data.prayerContent,
prayerEnergy:prayerEnergy
}).then((res) => {
if(res.data.code === 200){
Toast({
context: this,
selector: '#t-toast',
message: '祈祷成功',
});
}else{
Toast({
context: this,
selector: '#t-toast',
message: res.data.msg,
});
}
this.getUserInfo()
this.openPray()
}).catch((err) => {
console.log('祈祷失败',err);
})
this.setData({showTiming: false})
},
btnCancel(){
console.log('111');
req.patchRequest('/api/user/curt/prayer/stop',{}).then((res)=>{
Toast({
context: this,
selector: '#t-toast',
message: '已结束祈祷',
});
this.openPray()
this.getUserInfo()
})
},
btnShare(){
console.log('赠送能量');
req.patchRequest('/api/user/curt/give-crystalline-energy-to-lover',{}).then((res)=>{
console.log(res);
if(res.data.code === 200){
this.setData({
showEnergySuccess:!this.data.showEnergySuccess,
showEnergy:!this.data.showEnergy
})
this.getUserInfo()
this.getUserLoverInfo()
return setTimeout(()=>{
this.setData({
showEnergySuccess:!this.data.showEnergySuccess,
})
},2000)
}
this.setData({
showEnergy:!this.data.showEnergy,
showEnergyToast:!this.data.showEnergyToast,
toast:res.data.msg
})
}).catch((err)=>{
console.log('111');
this.setData({
showEnergyFail:!this.data.showEnergyFail,
showEnergy:!this.data.showEnergy
})
})
},
/**
@ -333,6 +102,7 @@ Page({
onLoad(options) {
this.getUserInfo()
this.getUserLoverInfo()
this.getXxObj()
},
/**
@ -346,21 +116,21 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow() {
this.getUserInfo()
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
this.getUserInfo()
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
this.getUserInfo()
},
/**

@ -3,9 +3,6 @@
"t-progress": "tdesign-miniprogram/progress/progress",
"t-popup": "tdesign-miniprogram/popup/popup",
"t-rate": "tdesign-miniprogram/rate/rate",
"t-image": "tdesign-miniprogram/image/image",
"t-icon": "tdesign-miniprogram/icon/icon",
"t-toast": "tdesign-miniprogram/toast/toast",
"t-input": "tdesign-miniprogram/input/input"
"t-image": "tdesign-miniprogram/image/image"
}
}

@ -1,5 +1,5 @@
<swiper class="call" bindtap="closeEnergy">
<swiper class="call">
  <swiper-item class="call1"><!--单人页面-->
<t-image class="tx" src="{{userInfo.avatar}}"></t-image>
<view class="txtext">{{userInfo.nick}}</view><!--头像名字-->
@ -8,9 +8,7 @@
<div class="bkg3"></div><!--点点点,最底层背景图-->
<dic class="bkg1"></dic><!--黄色点背景图-->
<view class="gh"></view>
<view class="xxt" bindtap="ShowOrNotLogo">
<image src="{{xingxiangtu[userInfo.spriteType]}}"></image>
</view>
<t-image src="{{xingxiangtu[userInfo.spriteType]}}" class="xxt" bindtap="ShowOrNotLogo"></t-image>
<view class="yan1" wx:if="{{showSexLogo}}" data-yan="animal" bindtap="doSetXxtAnimal"><!--动物形象-->
<view class="yan11"></view>
</view>
@ -23,64 +21,33 @@
<view class="dcleft">
<t-progress class="dcleft1" theme="circle" percentage="{{userInfo.crystallineEnergy}}" color="#f76229" label="" t-class-bar="dcleft1" />
<t-progress class="dcleft1" theme="circle" percentage="70" color="#f76229" label="" t-class-bar="dcleft1" />
<view class="dcbs"></view>
</view><!--下方左侧块-->
<!--下方左侧块-->
<t-progress class="dchx" percentage="{{userInfo.crystallineEnergy}}" trackColor="#EAC9FF" color="#f76229" label=""/><!--中间进度条-->
<view class="dchxtxt">{{userInfo.crystallineEnergy}}%</view>
<t-progress class="dcright1" theme="circle" percentage="{{userInfo.pendantEnergy}}" color="#FBB093" label="" t-class-bar="dcleft1" />
<t-progress class="dchx" percentage="70" trackColor="#EAC9FF" color="#f76229" label="" /><!--中间进度条-->
<view class="dchxtxt">70%</view>
<view class="dcright">
<view class="dcrightwjx" bindtap="openInject"></view><!--下方右侧五角星-->
<view class="dcrightwjx"></view><!--下方右侧五角星-->
</view><!--下方左侧块-->
<!-- 能量已满提示 -->
<view class="energy-full" wx:if="{{userInfo.crystallineEnergy===100}}">
<view>能量已经集满啦!</view>
<view>可以注入到水晶中</view>
<view>增强运势哦!</view>
</view>
<!-- 能量注入成功提示 -->
<view class="energy-complete" wx:if="{{showScsEnergy}}">
<view>能量已注入100%</view>
<view>守护时间为08小时00分</view>
</view>
<view class="dclefttxt">水晶能量</view><!--下方左侧块-->
<view class="dcrighttxt">能量注入</view><!--下方左侧块-->
</swiper-item>
  <swiper-item class="call1" wx:if='{{userInfo.loverId}}'><!--情侣页面-->
<!-- 未祈祷页面 -->
<view wx:if="{{ !userInfo.prayerEndTime }}">
  <swiper-item class="call1"><!--情侣页面-->
<t-image class="txl" src="{{userInfo.avatar}}"></t-image>
<view class="txtextl">{{userInfo.nick}}</view><!--头像名字1-->
<view class="jiuchan"></view>
<t-image class="txr" shape="circle" src="{{loverInfo.avatar}}"></t-image><!--头像2-->
<view class="txtextr">{{loverInfo.nick}}</view><!--头像名字2-->
</view>
<!-- 有祈祷页面 -->
<view wx:else>
<t-image class="txl txl-qd" src="{{userInfo.avatar}}"></t-image>
<view class="txtextl-qd">
<t-icon name="chevron-right-double" size="24" color="#DE868F"/>
<view class="text-qd">
<view class="top">{{ userInfo.prayerContent }}</view>
<view>你已为Ta祈祷 {{prayTime}}</view>
</view>
<t-icon name="chevron-right-double" size="24" color="#DE868F"/>
</view>
<t-image class="txr txr-qd" shape="circle" src="{{loverInfo.avatar}}"></t-image><!--头像2-->
</view>
<dic class="bkg1"></dic><!--黄色点背景图-->
<div class="bkg3"></div><!--点点点,最底层背景图-->
<view class="xxtl" bindtap="ShowOrNotLogoS">
<image src="{{xingxiangtu[userInfo.spriteType]}}"></image><!--左侧人形象-->
</view>
<view class="xxtr" bindtap="ShowOrNotLogoL">
<image src="{{xingxiangtu[loverInfo.spriteType]}}"></image><!--右侧人形象-->
</view>
<t-image src="{{xingxiangtu[userInfo.spriteType]}}" class="xxtl" bindtap="ShowOrNotLogoS"></t-image><!--左侧人形象-->
<t-image src="{{xingxiangtu[loverInfo.spriteType]}}" class="xxtr" bindtap="ShowOrNotLogoL"></t-image><!--右侧人形象-->
<view class="gh"></view><!--下方光环-->
<view class="yanql1" bindtap="doSetXxtFemale" wx:if="{{singleShow}}"><!--左侧女性按钮-->
<view class="yan13"></view>
@ -104,33 +71,30 @@
</view>
<view class="dcleft">
<t-progress class="dcleft1" theme="circle" percentage="{{userInfo.crystallineEnergy}}" color="#f76229" label="" t-class-bar="dcleft1" />
<t-progress class="dcleft1" theme="circle" percentage="70" color="#f76229" label="" t-class-bar="dcleft1" />
<view class="dcbs"></view>
</view><!--下方左侧块-->
<!--下方左侧块-->
<view class="lovepic"></view>
<view class="dchxtxtql" bindtap="openPray" wx:if="{{ !userInfo.prayerEndTime }}">祈祷</view>
<view class="dchxtxtql" bindtap="openPray" wx:else>结束祈祷</view>
<view class="dchxtxtql">祈祷</view>
<view class="dcrightql">
<t-progress class="dcleft1" theme="circle" percentage="{{loverInfo.crystallineEnergy}}" color="#00A7FF" label="" t-class-bar="dcleft1" />
<view class="dcrbs" bindtap="openEnergy"></view>
<t-progress class="dcleft1" theme="circle" percentage="70" color="#00A7FF" label="" t-class-bar="dcleft1" />
<view class="dcrbs"></view>
</view><!--下方左侧块-->
<view class="dclefttxt">{{userInfo.crystallineEnergy}}%</view><!--下方左侧块-->
<view class="dcrighttxt">{{loverInfo.crystallineEnergy}}%</view><!--下方左侧块-->
<view class="dclefttxt">70%</view><!--下方左侧块-->
<view class="dcrighttxt">79%</view><!--下方左侧块-->
</swiper-item>
<swiper-item class="call1" wx:if='{{userInfo.loverId}}'><!--对方个人页面-->
<swiper-item class="call1"><!--对方个人页面-->
<t-image class="tx" shape="circle" src="{{loverInfo.avatar}}"></t-image>
<view class="txtext">{{loverInfo.nick}}</view><!--头像名字-->
<view class="gh"></view>
<div class="bkg3"></div><!--点点点,最底层背景图-->
<dic class="bkg1"></dic><!--黄色点背景图-->
<view class="gh"></view>
<view class="xxtq" bindtap="ShowOrNotLogo">
<image src="{{xingxiangtu[loverInfo.spriteType]}}"></image> <!--形象图-->
</view>
<t-image src="{{xingxiangtu[loverInfo.spriteType]}}" class="xxtq" bindtap="ShowOrNotLogo"></t-image><!--形象图-->
<div class="k1">{{loverInfo.horoscope.number}}</div><!--幸运数字-->
<div class="ktext1">幸运数字</div>
@ -158,123 +122,6 @@
</swiper>
<!-- 未祈祷弹层 -->
<view class="pray" wx:if="{{showPray}}">
<view class="dialog">
<view class="dialog-item">
<text>祈祷内容</text>
<textarea model:value="{{prayerContent}}" placeholder="请写下你要祈祷的内容" bindblur="getTextValue"></textarea>
</view>
<view class="dialog-item">
<text>祈祷时长</text>
<view class="duration" bindtap="showTiming">{{prayTimeStr}}<t-icon name="chevron-down" size="48rpx"/></view>
</view>
<view class="dialog-btn">
<button bindtap="openPray">取消</button>
<button bindtap="btnOK">发起祈祷</button>
</view>
</view>
</view>
<!-- 祈祷时间弹层 -->
<t-popup placement="bottom" visible="{{showTiming}}" showOverlay="{{false}}">
<view class="timing">
<view class="timing-title">你还有{{userInfo.crystallineEnergy}}%水晶能量,可为对方祈祷{{hours}}小时{{minute}}分</view>
<t-toast id="t-toast" />
<view class="picker">
<picker-view value="{{pickerValue}}" bindchange="onPickerChange" indicator-class="active">
<picker-view-column>
<view wx:for="{{hours + 1}}" wx:key="item" class="picker-item"> {{ item }} </view>
</picker-view-column>
<picker-view-column>
<view wx:for="{{minutes + 1}}" wx:key="item" class="picker-item"> {{ item }} </view>
</picker-view-column>
</picker-view>
</view>
</view>
</t-popup>
<!-- 已祈祷弹层 -->
<view class="pray" wx:if="{{showIsPray}}">
<view class="dialog">
<t-toast id="t-toast" />
<view class="dialog-text">
<view>要结束祈祷吗?</view>
<view>将返还{{energy}}%星座能量</view>
<view>溢出能量将消失</view>
</view>
<view class="dialog-btn">
<button bindtap="openPray">返回</button>
<button bindtap="btnCancel">结束</button>
</view>
</view>
</view>
<!-- 赠送能量弹层 -->
<view class="pray" wx:if="{{showEnergy}}">
<view class="dialog">
<t-toast id="t-toast" />
<view class="dialog-text">
<view>你要将能量共享给对方吗?</view>
<view>溢出能量将保留</view>
</view>
<view class="dialog-btn">
<button bindtap="cancelEnergy">取消</button>
<button bindtap="btnShare">共享</button>
</view>
</view>
</view>
<!-- 赠送能量提示 -->
<view class="pray" wx:if="{{showEnergyToast}}">
<view class="dialog">
<t-toast id="t-toast" />
<view class="dialog-text">
<view>{{toast}}</view>
<view>无法进行共享哦!</view>
</view>
<view class="dialog-btn">
<button bindtap="cancelEnergyToast">好的</button>
</view>
</view>
</view>
<!-- 赠送能量成功 -->
<view class="energy-success" wx:if="{{showEnergySuccess}}">
<view>谢谢你送我的能量!</view>
<view>真是太好了~</view>
</view>
<!-- 赠送能量失败 -->
<view class="pray" wx:if="{{showEnergyFail}}">
<view class="dialog">
<t-toast id="t-toast" />
<view class="dialog-text">
<view>赠送能量失败啦~</view>
<view>是不是网络出问题了?</view>
</view>
<view class="dialog-btn">
<button bindtap="cancelEnergyToast">好的</button>
</view>
</view>
</view>
<!-- 能量注入 -->
<t-toast id="t-toast" />
<view class="pray" wx:if="{{showInject}}">
<view class="dialog">
<view class="dialog-text">
<view>你要将能量注入到晶石吗?</view>
<view>晶石将开启守护计时</view>
</view>
<view class="dialog-btn">
<button bindtap="openInject">取消</button>
<button bindtap="btnInject">开始注入</button>
</view>
</view>
</view>
<!-- 能量注入中 -->
<view class="in-energy" wx:if="{{showInEnergy}}">
<t-image src="/images/hourglass.gif"/>
<view>能量注入中……</view>
</view>
<div class="jltxt" bindtap="go2Jlai">精灵 AI</div>

@ -1,8 +1,4 @@
/* pages/home/jl/index.wxss */
page {
height: 100%;
}
.tx{
position:absolute;
width:72rpx;
@ -11,7 +7,7 @@ page {
margin-left:249.33rpx;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/tx.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/jl/tx.png);
}
.txtext{
@ -35,6 +31,7 @@ page {
position:absolute;
}
.t-progress__canvas--circle{
width:125.67rpx!important;
height:125.67rpx !important;
@ -42,13 +39,12 @@ page {
.dcright{
position:absolute;
width: 100rpx;
height: 100rpx;
margin-left: 528rpx;
margin-top: 1240rpx;
/* background-color: #f76229; */
width:116.67rpx;
height:116.67rpx;
margin-left: 520rpx;
margin-top:1232rpx;
background-color: #f76229;
border-radius: 58.335rpx;
z-index: 1;
}
.dclefttxt{
@ -76,11 +72,11 @@ page {
position:absolute;
width:68rpx;
height:78.67rpx;
margin-left: 18rpx;
margin-top: 14rpx;
margin-left:24rpx;
margin-top:18.67rpx;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/wjx.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/jl/wjx.png);
}
.dchx{
@ -110,9 +106,10 @@ page {
margin-left: 29.33rpx;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/bs.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/jl/bs.png);
}
.gh{
position:absolute;
width:750rpx;
@ -120,16 +117,15 @@ page {
margin-top:1070.67rpx;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/gh.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/jl/gh.png);
}
.call{
position: absolute;
margin: 0;
padding: 0;
width:750rpx;
height: 100%;
/* height:1624rpx!important; */
height:1624rpx!important;
overflow: hidden;
padding: 0!important;
margin: 0!important;
@ -163,7 +159,7 @@ page {
margin-left: 32.33rpx;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/rbs.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/jl/rbs.png);
}
.lovepic{
@ -174,7 +170,7 @@ page {
margin-left:235.33rpx;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/pulse.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/jl/pulse.png);
}
.dchxtxtql{
@ -188,6 +184,7 @@ page {
font-size: 27rpx;
}
.txl{
position:absolute;
width:72rpx;
@ -196,13 +193,7 @@ page {
margin-left:218rpx;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/tx.png);
}
.txl-qd {
position: absolute;
left: 80rpx;
margin-left:0;
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/jl/tx.png);
}
.txr{
@ -213,12 +204,7 @@ page {
margin-left:400.67rpx;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/tx.png);
}
.txr-qd {
position: absolute;
right: 80rpx;
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/jl/tx.png);
}
.txtextl{
@ -232,33 +218,6 @@ page {
font-size: 27rpx;
text-align: right;
}
.txtextl-qd{
position: absolute;
top: 130rpx;
left: 154rpx;
width: 444rpx;
height: 90rpx;
display: flex;
align-items: center;
}
.text-qd {
width: 360rpx;
color: rgba(108, 108, 108, 1);
font-size: 14px;
}
.text-qd .top {
color: #DE868F;
}
.text-qd view {
display: flex;
justify-content: center;
align-items: center;
}
.jiuchan{
position: absolute;
width:47.33rpx;
@ -267,7 +226,7 @@ page {
margin-left: 322.67rpx;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/jiuchan.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/jl/jiuchan.png);
}
@ -290,7 +249,7 @@ page {
margin-left: 322.67rpx;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/bkg3.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/jl/bkg3.png);
}
.xxt{
@ -301,38 +260,28 @@ page {
margin-left: 212rpx;
background-repeat: no-repeat;
background-size:100% 100%;
}
.xxt image {
width: 100%;
height: 100%;
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/jl/szn.png);
}
.yan1{
position: absolute;
width:114rpx;
height:116rpx;
display: flex;
align-items: center;
justify-content: center;
height:116.67rpx;
background-repeat: no-repeat;
background-size:100% 100%;
margin-top: 837.33rpx;
margin-left:118.67rpx;
background-image: url(https://wish-assets.windymuse.com.cn/xy/yan.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/jl/yan.png);
}
.yan2{
position: absolute;
width:114rpx;
height:116rpx;
display: flex;
align-items: center;
justify-content: center;
height:116.67rpx;
background-repeat: no-repeat;
background-size:100% 100%;
margin-top: 837.33rpx;
margin-left:318rpx;
background-image: url(https://wish-assets.windymuse.com.cn/xy/yan.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/jl/yan.png);
}
.yan3{
position: absolute;
@ -340,12 +289,9 @@ page {
height:116.67rpx;
margin-top: 837.33rpx;
margin-left:517.33rpx;
display: flex;
align-items: center;
justify-content: center;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/yan.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/jl/yan.png);
}
.bkg1{
@ -356,7 +302,7 @@ page {
margin-left:46rpx;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/bkg1.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/jl/bkg1.png);
}
.bkg3{
@ -367,120 +313,106 @@ page {
margin-left:42rpx;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/bkg3.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/jl/bkg3.png);
}
.yan11{
position: absolute;
width:46rpx;
height:46rpx;
width:46.67rpx;
height:46.67rpx;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/paw.png);
margin-top: 33.33rpx;
margin-left:34.33rpx;
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/jl/paw.png);
}
.yan12{
/* position: absolute; */
width:46rpx;
height:46rpx;
position: absolute;
width:46.67rpx;
height:46.67rpx;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/male.png);
margin-top: 33.33rpx;
margin-left:34.33rpx;
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/jl/male.png);
}
.yan13{
width:36rpx;
height:46rpx;
position: absolute;
width:46.67rpx;
height:46.67rpx;
background-repeat: no-repeat;
background-size:100% 100%;
background-size: contain;
background-image: url(https://wish-assets.windymuse.com.cn/xy/female.png);
margin-top: 33.33rpx;
margin-left:34.33rpx;
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/jl/female.png);
}
.xxtl{
position: absolute;
width:326rpx;
height:772rpx;
margin-top: 326rpx;
width:326.67rpx;
height:771.33rpx;
margin-top: 326.67rpx;
margin-left: 88rpx;
background-repeat: no-repeat;
background-size:100% 100%;
}
.xxtl image {
width: 100%;
height: 100%;
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/jl/szn.png);
}
.xxtr{
position: absolute;
width:326rpx;
height:782rpx;
margin-top: 326rpx;
margin-left: 356rpx;
width:323.33rpx;
height:787.33rpx;
margin-top: 308.67rpx;
margin-left: 355.33rpx;
background-repeat: no-repeat;
background-size:100% 100%;
}
.xxtr image {
width: 100%;
height: 100%;
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/jl/xxtr.png);
}
.yanql1{
position: absolute;
width:114rpx;
height:116rpx;
display: flex;
align-items: center;
justify-content: center;
height:116.67rpx;
background-repeat: no-repeat;
background-size:100% 100%;
margin-top: 492rpx;
margin-left:86.67rpx;
background-image: url(https://wish-assets.windymuse.com.cn/xy/yan.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/jl/yan.png);
}
.yanql2{
position: absolute;
width:114rpx;
height:116rpx;
display: flex;
align-items: center;
justify-content: center;
height:116.67rpx;
background-repeat: no-repeat;
background-size:100% 100%;
margin-top: 663.33rpx;
margin-left:38.67rpx;
background-image: url(https://wish-assets.windymuse.com.cn/xy/yan.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/jl/yan.png);
}
.yanql4{
position: absolute;
width:114rpx;
height:116rpx;
display: flex;
align-items: center;
justify-content: center;
height:116.67rpx;
background-repeat: no-repeat;
background-size:100% 100%;
margin-top: 492rpx;
margin-left:550.67rpx;
background-image: url(https://wish-assets.windymuse.com.cn/xy/yan.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/jl/yan.png);
}
.yanql5{
position: absolute;
width:114rpx;
height:116rpx;
display: flex;
align-items: center;
justify-content: center;
height:116.67rpx;
background-repeat: no-repeat;
background-size:100% 100%;
margin-top: 663.33rpx;
margin-left:598rpx;
background-image: url(https://wish-assets.windymuse.com.cn/xy/yan.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/jl/yan.png);
}
.xxtq{
@ -491,11 +423,7 @@ page {
margin-left: 212rpx;
background-repeat: no-repeat;
background-size:100% 100%;
}
.xxtq image{
width: 100%;
height: 100%;
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/jl/xxtr.png);
}
.k1{
@ -508,7 +436,7 @@ page {
margin-left: 114.67rpx;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/circle.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/jl/circle.png);
color: rgba(248, 99, 42, 1);
@ -525,7 +453,7 @@ font-family: SourceHanSansSC-regular;
margin-left: 318rpx;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/yan.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/jl/yan.png);
}
@ -539,7 +467,7 @@ font-family: SourceHanSansSC-regular;
margin-left: 520.67rpx;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/circle.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/jl/circle.png);
color: rgba(108, 108, 108, 1);
font-size: 16px;
@ -553,7 +481,7 @@ font-size: 16px;
margin-left: 36rpx;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/yst.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/jl/yst.png);
}
@ -622,7 +550,7 @@ font-size: 16px;
background-size:100% 100%;
margin-left:97.33rpx;
margin-top: 589.33rpx;
background-image: url(https://wish-assets.windymuse.com.cn/xy/jkzs.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xy/jkzs.png);
}
.aqzs{
@ -635,7 +563,7 @@ font-size: 16px;
background-size:100% 100%;
margin-left:97.33rpx;
margin-top: 653.33rpx;
background-image: url(https://wish-assets.windymuse.com.cn/xy/aqzs.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xy/aqzs.png);
}
.cyzs{
@ -648,7 +576,7 @@ font-size: 16px;
background-size:100% 100%;
margin-left:97.33rpx;
margin-top: 717.33rpx;
background-image: url(https://wish-assets.windymuse.com.cn/xy/cyzs.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xy/cyzs.png);
}
.rjkzs{
@ -690,7 +618,7 @@ font-size: 16px;
.jltxt{
position: absolute;
right: 0;
left: 300px;
top: 504px;
width: 75px;
height: 35px;
@ -726,223 +654,5 @@ width: 240px;
height: 11px;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/ysfgx.png);
}
/* 弹层 */
.pray {
display: flex;
justify-content: center;
}
.dialog {
position: absolute;
bottom: 500rpx;
width: 648rpx;
height: 484rpx;
padding: 50rpx;
z-index: 999;
box-sizing: border-box;
line-height: 20px;
border-radius: 15px;
background-color: rgba(255, 255, 255, 1);
text-align: center;
box-shadow: 1px 2px 6px 0px rgba(0, 0, 0, 0.4);
}
.dialog-item {
display: flex;
justify-content: space-between;
margin-bottom: 38rpx;
}
.dialog-item textarea {
width: 400rpx;
height: 142rpx;
padding: 20rpx;
line-height: 40rpx;
box-sizing: border-box;
border-radius: 10px;
background-color: rgba(255, 255, 255, 1);
color: #9A9A9A;
font-size: 14px;
text-align: right;
border: 1px solid rgba(236, 236, 236, 1);
}
.dialog-item text {
padding-top: 16rpx;
color: #6C6C6C;
font-size: 16px;
text-align: center;
}
.dialog-item .duration {
width: 400rpx;
height: 80rpx;
display: flex;
justify-content: flex-end;
align-items: center;
padding-right: 20rpx;
box-sizing: border-box;
border-radius: 10px;
color: rgba(154, 154, 154, 1);
font-size: 14px;
border: 1px solid rgba(236, 236, 236, 1);
}
.dialog-btn {
display: flex;
justify-content: center;
align-items: center;
}
.dialog-btn button {
width: 210rpx;
height: 70rpx;
border-radius: 10px;
background: linear-gradient(233.49deg, rgba(248,99,42,1) 10.48%,rgba(249,135,89,1) 89.2%);
text-align: center;
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4);
border: 3px solid rgba(255, 255, 255, 1);
display: flex;
justify-content: center;
align-items: center;
color: #fff;
font-size: 14px;
}
.dialog-text {
height: 300rpx;
color: rgba(108, 108, 108, 1);
font-size: 18px;
text-align: center;
font-weight: 400;
padding-top: 60rpx;
box-sizing: border-box;
}
.dialog-text view {
margin-bottom: 30rpx;
}
.timing {
position: absolute;
bottom: 0;
width: 100%;
height: 434rpx;
z-index: 999;
line-height: 20px;
background-color: rgba(255, 255, 255, 1);
text-align: center;
}
.timing .picker{
padding: 0 28px;
box-sizing: border-box;
}
.timing .timing-title {
height: 70rpx;
display: flex;
justify-content: center;
align-items: center;
color: #9A9A9A;
font-size: 14px;
border: 1px solid #F1F1F1;
}
.active {
background-color: #F1F1F1;
z-index: 0;
}
.picker-item {
display: flex;
align-items: center;
justify-content: center;
}
picker-view-column {
height: 364rpx;
}
.energy-success {
position: absolute;
top: 500rpx;
right: 30rpx;
width: 286rpx;
height: 160rpx;
opacity: 0.9;
border-radius: 15px;
background-color: rgba(255, 255, 255, 1);
color: #6C6C6C;
font-size: 14px;
padding: 36rpx 0 0 20rpx;
box-sizing: border-box;
box-shadow: 1px 2px 6px 0px rgba(0, 0, 0, 0.4);
}
.energy-full {
position: absolute;
top: 500rpx;
right: 230rpx;
width: 286rpx;
height: 160rpx;
opacity: 0.9;
border-radius: 15px;
background-color: rgba(255, 255, 255, 1);
color: #6C6C6C;
font-size: 14px;
padding: 18rpx 0 0 20rpx;
box-sizing: border-box;
box-shadow: 1px 2px 6px 0px rgba(0, 0, 0, 0.4);
}
.energy-complete {
position: absolute;
top: 500rpx;
right: 230rpx;
width: 336rpx;
height: 160rpx;
opacity: 0.9;
border-radius: 15px;
background-color: rgba(255, 255, 255, 1);
color: #6C6C6C;
font-size: 14px;
padding: 36rpx 0 0 20rpx;
box-sizing: border-box;
box-shadow: 1px 2px 6px 0px rgba(0, 0, 0, 0.4);
z-index: 999;
}
.in-energy {
position: absolute;
top: 500rpx;
right: 130rpx;
width: 484rpx;
height: 434rpx;
padding-top: 80rpx;
box-sizing: border-box;
font-size: 18px;
color: #6C6C6C;
border-radius: 15px;
background-color: rgba(255, 255, 255, 1);
text-align: center;
box-shadow: 1px 2px 6px 0px rgba(0, 0, 0, 0.4);
}
.in-energy .t-image {
width: 200rpx;
height: 200rpx;
}
.dcright1 {
position: absolute;
top: 1232rpx;
right: 109rpx;
}
.dcright1 .t-progress__canvas--inner {
background-color: #f76229 !important;
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/jl/ysfgx.png);
}

@ -7,7 +7,6 @@ Page({
* 页面的初始数据
*/
data: {
isAdd:false,
times:0,//非会员聊天次数
chatList:[],
ltinfo:'',
@ -15,14 +14,6 @@ Page({
userInfo:{},
stxx:false,
},
addClick(){
console.log('点击了加号')
this.setData({isAdd:true})
},
noaddClick(){
console.log('点击了加号')
this.setData({isAdd:false})
},
dovipTips(){
wx: wx.showToast({
title: '请购买会员或聊天次数',
@ -41,7 +32,7 @@ Page({
},
go2BB(e){/**鼠标回显事件 */
// this.setData({ltinfo:e.detail.value})
this.setData({ltinfo:e.detail.value})
},
go2Send(e){/**发送消息 */
this.setData({isBlank:false})

@ -11,7 +11,7 @@
<view class="ltat ltwm" data-lt="我和Ta未来会怎样" bindtap="doLt">我和Ta未来会怎样</view>
<view class="ltat wzmxyx" data-lt="文字冒险游戏" bindtap="doLt">文字冒险游戏</view>
<view class="ltat ltqs" data-lt="帮我写一封情书" bindtap="doLt">帮我写一封情书</view>
<t-image src="https://wish-assets.windymuse.com.cn/xy/jlaitx.png" shape="circle" class="tximg"></t-image>
<t-image src="https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/jl/jlaitx.png" shape="circle" class="tximg"></t-image>
<view class="ltwzk">你好,我是你的星座守护精灵。除此之外,我还可以帮你解答更多问题。快来跟我聊聊吧!
</view>
</view>
@ -24,7 +24,7 @@
<view class="ltat ltwm">我和Ta未来会怎样</view>
<view class="ltat wzmxyx" >文字冒险游戏</view>
<view class="ltat ltqs" >帮我写一封情书</view>
<t-image src="https://wish-assets.windymuse.com.cn/xy/jlaitx.png" shape="circle" class="tximg"></t-image>
<t-image src="https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/jl/jlaitx.png" shape="circle" class="tximg"></t-image>
<view class="ltwzk">你好,我是你的星座守护精灵。除此之外,我还可以帮你解答更多问题。快来跟我聊聊吧!
</view>
<view class="kthybtn" bindtap="go2Member">开通会员</view>
@ -34,7 +34,7 @@
<view class="chatbox" wx:if="{{chatList&&(!isBlank)}}"><!--聊天内容-->
<view class="chatbox1" wx:for="{{chatList}}" wx:key="index">
<t-image src="https://wish-assets.windymuse.com.cn/xy/jlaitx.png" shape="circle" class="chattoux" wx:if="{{item.type==2}}"></t-image>
<t-image src="https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/jl/jlaitx.png" shape="circle" class="chattoux" wx:if="{{item.type==2}}"></t-image>
<t-image src="{{userInfo.avatar}}" class="chattoux" wx:if="{{item.type==1}}"></t-image>
<view class="chatinfo">{{item.value}}</view>
</view>
@ -45,38 +45,17 @@
<!--不是会员且聊天次数为0-->
<view class="ltk1" wx:if="{{!isChatVip&&times==0}}" bindtap="dovipTips">
<view class="ltk1txt">
<t-textarea class="ltk1txt1" model:value="{{ltinfo}}" placeholder="请开通会员或购买次数" bindblur="go2BB" data-lt="{{ltinfo}}" disabled></t-textarea>
<t-textarea class="ltk1txt1" value="{{ltinfo}}" placeholder="请开通会员或购买次数" name="{{ltinfo}}" bindblur="go2BB" data-lt="{{ltinfo}}" disabled></t-textarea>
</view>
<view class="fsan" data-lt="{{ltinfo}}"></view><!--发送按钮-->
<view class="addbtn"></view><!--加号按钮-->
</view>
<!--是会员或者剩余聊天次数不为0 加号缩回-->
<view class="ltk1" wx:if="{{isChatVip||times!=0}}" wx:if="{{!isAdd}}">
<!--是会员或者剩余聊天次数不为0-->
<view class="ltk1" wx:if="{{isChatVip||times!=0}}">
<view class="ltk1txt">
<t-textarea class="ltk1txt1" model:value="{{ltinfo}}" placeholder="输入聊天内容" bindblur="go2BB" data-lt="{{ltinfo}}" bindchange="go2BB"></t-textarea>
<t-textarea class="ltk1txt1" value="{{ltinfo}}" placeholder="输入聊天内容" bindblur="go2BB" data-lt="{{ltinfo}}" bindchange="go2BB"></t-textarea>
</view>
<view class="fsan" bindtap="go2Send" data-lt="{{ltinfo}}"></view><!--发送按钮-->
<view class="addbtn" bindtap="addClick"></view><!--加号按钮-->
</view>
<!--是会员或者剩余聊天次数不为0 加号没有缩回-->
<view class="ltk112" wx:if="{{isChatVip||times!=0}}" wx:if="{{isAdd}}">
<view class="ltk1txt">
<t-textarea class="ltk1txt1" model:value="{{ltinfo}}" placeholder="输入聊天内容" bindblur="go2BB" data-lt="{{ltinfo}}" bindchange="go2BB"></t-textarea>
</view>
<view class="fsan" bindtap="go2Send" data-lt="{{ltinfo}}"></view><!--发送按钮-->
<view class="addbtn" bindtap="noaddClick"></view><!--加号按钮-->
</view>
<!--是会员或者剩余聊天次数不为0 加号没有缩回 快捷键-->
<view class="myshkjj" wx:if="{{isAdd}}">
<view class="myshkjj-container">
<view class="myshkjjco myshkjjxzys" data-lt="星座运势" bindtap="doLt">星座运势</view>
<view class="myshkjjco myshkjjxxzb" data-lt="星座占卜" bindtap="doLt">星座占卜</view>
<view class="myshkjjco myshkjjtlzb" data-lt="塔罗占卜" bindtap="doLt">塔罗占卜</view>
<view class="myshkjjco myshkjjwzmxyx" data-lt="文字冒险游戏" bindtap="doLt">文字冒险游戏</view>
<view class="myshkjjco myshkjjbwxyfqs" data-lt="帮我写一封情书" bindtap="doLt">帮我写一封情书</view>
<view class="myshkjjco myshkjjwhtwlhzy" data-lt="我和Ta未来会怎样" bindtap="doLt">我和Ta未来会怎样</view>
<view class="myshkjjco myshkjjqgqs" data-lt="情感倾诉" bindtap="doLt">情感倾诉</view>
</view>
<view class="addbtn"></view><!--加号按钮-->
</view>

@ -1,10 +1,4 @@
/* pages/home/jl/jlai/jlai.wxss */
page {
width: 100%;
height: 100%;
overflow: hidden;
}
.reback{
position: absolute;
margin-left: 20rpx;
@ -13,7 +7,7 @@ page {
height:48rpx;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/reback.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/me/reback.png);
}
.title{
@ -31,9 +25,9 @@ page {
.mfcs{
position: absolute;
left: 0px;
top: 188rpx;
width: 100%;
height: 88rpx;
top: 88px;
width: 375px;
height: 44px;
line-height: 88rpx;
opacity: 0.8;
background: linear-gradient(222.54deg, rgba(248,99,42,1) 14.03%,rgba(249,135,89,1) 85.21%);
@ -43,11 +37,11 @@ page {
}
.ltkjj{
position: absolute;
left: 32rpx;
top: 328rpx;
width: 686rpx;
height: 764rpx;
line-height: 40rpx;
left: 16px;
top: 164px;
width: 343px;
height: 382px;
line-height: 20px;
opacity: 0.9;
border-radius: 15px;
background-color: rgba(255, 255, 255, 1);
@ -61,9 +55,9 @@ page {
.ltkjj1{
position: absolute;
left: 32rpx;
top: 328rpx;
width: 686rpx;
left: 16px;
top: 164px;
width: 343px;
height: 1000rpx;
line-height: 20px;
opacity: 0.9;
@ -78,10 +72,10 @@ page {
.ltat{
position: absolute;
height: 100rpx;
height: 50px;
line-height: 100rpx;
opacity: 0.9;
border-radius: 50rpx;
border-radius: 24px;
background: linear-gradient(222.69deg, rgba(248,99,42,1) 14.04%,rgba(249,135,89,1) 88.56%);
color: rgba(16, 16, 16, 1);
font-size: 12px;
@ -97,57 +91,57 @@ page {
.ltxzys{
left: 38rpx;
top: 64rpx;
width: 196rpx;
width: 88px;
}
.ltxzzb{
left: 250rpx;
left: 128px;
top: 64rpx;
width: 196rpx;
width: 88px;
}
.lttlzb{
top: 64rpx;
width: 196rpx;
left: 462rpx;
width: 88px;
left:237px;
}
.ltqgqs{
width:236rpx;
width:118px;
left:38rpx;
top:228rpx;
}
.ltwm{
left:320rpx;
left:158px;
top:228rpx;
width:335rpx;
width:167px;
}
.wzmxyx{
left:38rpx;
width:274rpx;
width:137px;
top:392rpx;
}
.ltqs{
left:344rpx;
width:306rpx;
left:172px;
width:153px;
top:392rpx;
}
.tximg{
position: absolute;
left: 38rpx;
top: 556rpx;
width: 84rpx;
height: 84rpx;
top: 278px;
width: 42px;
height: 42px;
border: 3px solid rgba(161, 134, 81, 1);
background-color: coral;
}
.ltwzk{
position: absolute;
left: 154rpx;
top: 556rpx;
width: 482rpx;
height: 144rpx;
top: 278px;
width: 241px;
height: 72px;
color: rgba(108, 108, 108, 1);
font-size: 17px;
line-height: 43rpx;
@ -158,9 +152,9 @@ page {
.ltk1{
position: absolute;
left: 0px;
top: 1444rpx;
width: 100%;
height: 180rpx;
top: 722px;
width: 375px;
height: 90px;
line-height: 20px;
background-color: rgba(248, 248, 248, 1);
text-align: center;
@ -169,9 +163,9 @@ page {
.ltk1txt{
position: absolute;
left: 32rpx;
left: 16px;
top: 14rpx;
width: 530rpx;
width: 265px;
height: 84rpx;
border-radius: 5px;
color: rgba(136, 136, 136, 1);
@ -187,8 +181,11 @@ page {
line-height: 84rpx!important;
}
.ltk1txt1{
width: 530rpx;
width: 265px;
height: 84rpx;
}
.t-textarea__wrapper-inner{
}
.t-textarea__label{
height:84rpx;
@ -197,29 +194,29 @@ page {
.fsan{
position: absolute;
left: 664rpx;
left: 332px;
top: 32rpx;
width: 54rpx;
height: 54rpx;
width: 27px;
height: 27px;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/chatbtn.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/jl/chatbtn.png);
}
.addbtn{
position: absolute;
left: 586rpx;
left: 293px;
top: 30rpx;
width: 54rpx;
height: 54rpx;
width: 27px;
height: 27px;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/addbtn.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/jl/addbtn.png);
}
.chatbox{
position: absolute;
top:264rpx;
top:132px;
width:750rpx;
height:1360rpx;
overflow: auto;
@ -258,8 +255,8 @@ page {
position: absolute;
left: 224rpx;
top: 826rpx;
width: 240rpx;
height: 70rpx;
width: 120px;
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%);
@ -275,8 +272,8 @@ page {
.kthytips{
position: absolute;
top: 898rpx;
width: 686rpx;
top: 448px;
width: 343px;
height: 20px;
color: rgba(108, 108, 108, 1);
font-size: 12px;
@ -286,70 +283,11 @@ page {
.hyhgtx{
position: absolute;
left: 392rpx;
top: 742rpx;
width: 120rpx;
height: 127rpx;
left: 196px;
top: 371px;
width: 59.8px;
height: 66.45px;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/hyhg.png);
}
.ltk112{
position: absolute;
left: 0;
top: 1224rpx;
width: 100%;
height: 110rpx;
line-height: 40rpx;
background-color: rgba(248, 248, 248, 1);
text-align: center;
border: 1px solid rgba(255, 0, 0, 0);
}
.myshkjj{
position: absolute;
top: 1340rpx;
width: 100%; /* 容器宽度 */
overflow-x: scroll; /* 横向滚动 */
}
.myshkjj-container {
width: 990rpx;
height: 200rpx;
padding-top: 20rpx;
display: flex;
flex-wrap: wrap;
}
.myshkjjco{
margin-left: 30rpx;
height: 60rpx;
border-radius: 48rpx;
background: linear-gradient(222.69deg, rgba(248,99,42,1) 14.04%,rgba(249,135,89,1) 88.56%);
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4);
color: rgba(255, 255, 255, 1);
font-size: 28rpx;
display: flex;
align-items: center;
justify-content: center;
}
.myshkjjxzys{
width: 176rpx;
}
.myshkjjxxzb{
width: 176rpx;
}
.myshkjjtlzb{
width: 178rpx;
}
.myshkjjwzmxyx{
width: 274rpx;
}
.myshkjjbwxyfqs{
width: 306rpx;
}
.myshkjjwhtwlhzy{
width: 334rpx;
}
.myshkjjqgqs{
width: 236rpx;
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/jl/hyhg.png);
}

@ -8,22 +8,22 @@ Page({
*/
data: {
avatars:[
'https://wish-assets.windymuse.com.cn/xy/tx1.png',
'https://wish-assets.windymuse.com.cn/xy/tx2.png',
'https://wish-assets.windymuse.com.cn/xy/tx3.png',
'https://wish-assets.windymuse.com.cn/xy/tx4.png',
'https://wish-assets.windymuse.com.cn/xy/tx5.png',
'https://wish-assets.windymuse.com.cn/xy/tx6.png',
'https://wish-assets.windymuse.com.cn/xy/tx1.png',
'https://wish-assets.windymuse.com.cn/xy/tx2.png',
'https://wish-assets.windymuse.com.cn/xy/tx3.png',
'https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/me/tx1.png',
'https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/me/tx2.png',
'https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/me/tx3.png',
'https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/me/tx4.png',
'https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/me/tx5.png',
'https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/me/tx6.png',
'https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/me/tx1.png',
'https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/me/tx2.png',
'https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/me/tx3.png',
],
sexs:[{label:'男生',value:'male'},{label:'女生',value:'female'}],
sexVisible:false,
note:'',
cVisible:false,
userInfo:{},
endDate:new Date().getTime()
userInfo:{}
},
changeAvatar(e){
req.patchRequest('/api/user/curt',{avatar:e.target.dataset.img}).then((res)=>{
@ -58,9 +58,7 @@ Page({
console.log('11111')
},
changeDate(e) {/**修改日期 */
console.log(e);
const { value } = e.detail;
console.log(value);
const format = (val) => {
const date = new Date(val);
return `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()}`;
@ -69,8 +67,7 @@ Page({
this.setData({
note: format(value),
});
req.patchRequest('/api/user/curt',{birthday:format(value)}).then((res)=>{
console.log(res);
req.patchRequest('/api/user/curt',{date:format(value)}).then((res)=>{
if(res.data.code==200){
this.setData({userInfo:res.data.data})
wx.showToast({
@ -78,7 +75,6 @@ Page({
icon: 'none',
duration: 1000
})
this.getUserInfo()
}
}).catch((err)=>{
console.log(err);
@ -89,7 +85,8 @@ Page({
console.log('修改性别')
},
doChangeName1(e){
if (e.detail.value !== this.data.userInfo.nick) {
console.log(e)
console.log(e.detail.value)
req.patchRequest('/api/user/curt',{nick:e.detail.value}).then((res)=>{
if(res.data.code==200){
this.setData({userInfo:res.data.data})
@ -102,7 +99,6 @@ Page({
}).catch((err)=>{
console.log(err);
})
}
},
getUserInfo(){
req.getRequest('/api/user/curt',{}).then((res)=>{

@ -3,7 +3,6 @@
"t-input": "tdesign-miniprogram/input/input",
"t-calendar": "tdesign-miniprogram/calendar/calendar",
"t-picker": "tdesign-miniprogram/picker/picker",
"t-picker-item": "tdesign-miniprogram/picker-item/picker-item",
"t-date-time-picker": "tdesign-miniprogram/date-time-picker/date-time-picker"
"t-picker-item": "tdesign-miniprogram/picker-item/picker-item"
}
}

@ -1,56 +1,25 @@
<view class="xgzl-container">
<!-- 头部返回 -->
<view class="xgzl-header">
<!--pages/home/me/grzl/grzl.wxml-->
<!--返回图标-->
<view class="reback" bindtap="go2Reback"></view>
<view class="title">修改资料</view>
</view>
<!-- 头像 -->
<view class="xgzl-img">
<view class="cameralogo"><view class="cameralogo-img"></view></view>
<image class="avatar1" src="{{userInfo.avatar}}"></image>
<input focus="doChangeName1" class="nickname" name="nick" placeholder="昵称不能为空" maxlength="7" value="{{userInfo.nick}}" bindblur="doChangeName1"></input>
</view>
<view class="cameralogo"></view>
<!-- 精灵头像 -->
<view class="xgzl-sculpture">
<view class="jltxtxt">精灵头像</view>
<view class="txcheck-box">
<view class="txcheck">
<view wx:for="{{avatars}}" class="itemxx"><image class="iii" src="{{item}}" data-img="{{item}}" bindtap="changeAvatar"></image></view>
</view>
</view>
</view>
<view class="yhtx"></view>
<form bindsubmit="go2UpdateUserInfo">
<!-- <form bindsubmit="go2UpdateUserInfo"></form> -->
</form>
<t-input focus="doChangeName1" class="nickname" name="nick" placeholder="昵称不能为空" maxlength="7" value="{{userInfo.nick}}" bindblur="doChangeName1" ></t-input>
<!-- 数据表单 -->
<view class="xgzl-data">
<view class="data-item">
<view class="xbwz">性别</view>
<view class="xbtxt" bindtap="changeSex">{{userInfo.spriteType=='male'?'男生':'女生'}}</view>
</view>
<view class="data-item">
<view class="srwz">生日</view>
<view class="srtxt" bindtap="handleCalendar">{{userInfo.birthday ? userInfo.birthday : '点击选择日期'}}</view>
</view>
<view class="data-item">
<view class="xzwz">星座</view>
<view class="ssxz">{{userInfo.birthdayConstellation}}</view>
</view>
</view>
<!-- <t-calendar visible="{{cVisible}}" bind:confirm="changeDate" minDate="{{minDate}}" maxDate="{{maxDate}}"/> -->
<t-date-time-picker
title="选择日期"
visible="{{cVisible}}"
mode="date"
format="YYYY-MM-DD"
value="{{userInfo.birthday}}"
bind:confirm="changeDate"
start="1980-1-1"
end="{{endDate}}"
/>
<view class="srwz">生日</view>
<view class="jltxtxt">精灵头像</view>
<view class="xbtxt" bindtap="changeSex">{{userInfo.spriteType=='male'?'男生':'女生'}}</view>
<view class="ssxz">{{userInfo.horoscope.name}}</view>
<view class="srtxt" bindtap="handleCalendar">{{userInfo.horoscope.date}}</view><!--生日-->
<t-calendar visible="{{cVisible}}" bind:confirm="changeDate" />
<t-picker
visible="{{sexVisible}}"
@ -59,9 +28,13 @@
title="选择性别"
cancelBtn="取消"
confirmBtn="确认"
bind:confirm="onColumnChange"
bindchange="onPickerChange"
bindpick="onColumnChange"
bindcancel="onPickerCancel"
>
<t-picker-item options="{{sexs}}" />
</t-picker>
<view class="txcheck" >
<view wx:for="{{avatars}}" class="itemxx"><image class="iii" src="{{item}}" data-img="{{item}}" bindtap="changeAvatar"></image></view>
</view>

@ -1,187 +1,185 @@
/* pages/home/me/grzl/grzl.wxss */
.xgzl-container {
position: absolute;
width: 100%;
height: 100%;
padding-top: 88rpx;
box-sizing: border-box;
}
.xgzl-header {
width: 100%;
display: flex;
}
.reback{
position: absolute;
margin-left: 20rpx;
margin-top:108rpx;
width:48rpx;
height:48rpx;
margin-left: 20rpx;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/reback.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/me/reback.png);
}
.title{
position: absolute;
left: 278rpx;
top: 108rpx;
width: 196rpx;
height: 48rpx;
margin-left: 210rpx;
display: flex;
align-items: center;
justify-content: center;
color: rgba(108, 108, 108, 1);
font-size: 32rpx;
text-align: center;
font-family: SourceHanSansSC-regular;
}
.xgzl-img {
position: relative;
width: 100%;
height: 224rpx;
display: flex;
align-items: center;
justify-content: center;
.yhtx{
position: absolute;
left: 74px;
top: 109px;
width: 140rpx;
height: 140rpx;
border-radius: 74rpx;
border: 3px solid rgba(161, 134, 81, 1);
}
.avatar1{
position: absolute;
left: 77px;
top: 112px;
width: 140rpx;
height: 140rpx;
margin: 0 64rpx 0 148rpx;
border-radius: 74rpx;
border: 6rpx solid #A18651;
}
.nickname{
border: 1px solid #ffffff;
/* color: rgba(108, 108, 108, 1);
font-size: 36rpx;
text-align: left;
padding: 0 !important;
border: none !important;
background-color: rgba(108, 108, 108, 0) !important; */
}
.xgzl-sculpture {
width: 100%;
padding-left: 50rpx;
box-sizing: border-box;
}
.jltxtxt{
color: rgba(154, 154, 154, 1);
font-size: 28rpx;
}
.cameralogo{
position: absolute;
top: 144rpx;
left: 296rpx;
width: 38rpx;
height: 38rpx;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
background-color: #4F4F4F;
}
.cameralogo-img {
width: 26rpx;
height: 26rpx;
left: 128px;
top: 162px;
width: 13px;
height: 13px;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/camera.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/me/camera.png);
}
.txcheck-box {
width: 100%;
height: 164rpx;
overflow-x: scroll;
overflow: hidden;
}
.txcheck{
width: 844rpx;
height: 164rpx;
text-align: center;
overflow: auto;
display: flex;
align-items: center;
}
.itemxx{
width: 100rpx;
height: 100rpx;
margin-right: 32rpx;
}
.xgzl-data {
width: 100%;
}
.data-item {
width: 100%;
height: 80rpx;
padding: 0 64rpx;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: space-between;
.nickname{
z-index: 999;
position: absolute;
left: 176px;
top: 131px;
width: 126px;
height: 27px;
color: rgba(108, 108, 108, 1);
font-size: 18px;
text-align: left;
font-family: SourceHanSansSC-medium;
}
.xzwz{
width: 64rpx;
height: 48rpx;
position: absolute;
left: 32px;
top: 436px;
width: 32px;
height: 24px;
color: rgba(108, 108, 108, 1);
font-size: 32rpx;
font-size: 16px;
text-align: left;
font-family: SourceHanSansSC-regular;
}
.srwz{
width: 64rpx;
height: 48rpx;
position: absolute;
left: 32px;
top: 380px;
width: 32px;
height: 24px;
color: rgba(108, 108, 108, 1);
font-size: 32rpx;
font-size: 16px;
text-align: left;
font-family: SourceHanSansSC-regular;
}
.xbwz{
width: 64rpx;
height: 48rpx;
position: absolute;
left: 32px;
top: 324px;
width: 32px;
height: 24px;
color: rgba(108, 108, 108, 1);
font-size: 32rpx;
font-size: 16px;
text-align: left;
font-family: SourceHanSansSC-regular;
}
.ssxz{
width: 104rpx;
height: 48rpx;
position: absolute;
left: 291px;
top: 436px;
width: 52px;
height: 24px;
color: rgba(154, 154, 154, 1);
font-size: 32rpx;
font-size: 16px;
text-align: right;
font-family: SourceHanSansSC-regular;
}
.rlt{
position: absolute;
left: 260px;
top: 380px;
width: 83px;
height: 24px;
color: rgba(154, 154, 154, 1);
font-size: 16px;
text-align: right;
font-family: SourceHanSansSC-regular;
}
.srtxt{
position: absolute;
left: 500rpx;
top: 380px;
width: 200rpx;
height: 48rpx;
height: 24px;
color: rgba(154, 154, 154, 1);
font-size: 32rpx;
font-size: 16px;
text-align: right;
font-family: SourceHanSansSC-regular;
}
.xbtxt{
width: 64rpx;
height: 48rpx;
position: absolute;
left: 311px;
top: 324px;
width: 32px;
height: 24px;
color: rgba(154, 154, 154, 1);
font-size: 32rpx;
font-size: 16px;
text-align: right;
font-family: SourceHanSansSC-regular;
}
.jltxtxt{
position: absolute;
left: 25px;
top: 200px;
width: 56px;
height: 21px;
color: rgba(154, 154, 154, 1);
font-size: 14px;
text-align: left;
font-family: SourceHanSansSC-regular;
}
.txcheck{
position: absolute;
left: 0px;
top: 221px;
width: 422px;
height: 82px;
text-align: center;
overflow: auto;
display: flex;
}
.itemxx{
margin-left: 21px;
margin-top: 32rpx;
width: 50px;
height: 50px;
display: flex;
}
.iii{
width: 100rpx;
height: 100rpx;
width: 50px;
height: 50px;
border-radius: 50rpx;
}

@ -9,67 +9,17 @@ Page({
* 页面的初始数据
*/
data: {
isCxHq:false,
bdsjhVisible:false,
avatar:"",
countdown:60,
userInfo:{
avatar:"",
nick:"",
isChatVip:false,//是否会员
phone:'123',
hasPhone:false
},
phone:'',
phoneVerificationCode:''
},
// 手机号码校验
getPhone(e){
const phone = e.detail.value;
if (!/^1[3456789]\d{9}$/.test(phone)) {
wx.showToast({
title: '手机号码格式不正确',
icon: 'none'
});
return;
}
},
getVerificationCode(e){
const VerificationCode = e.detail.value;
if (VerificationCode.length !== 6) {
wx.showToast({
title: '验证码格式不正确',
icon: 'none'
});
return;
}
},
getCode(){
console.log(this.data.phone);
if(this.data.countdown === 60 || this.data.countdown === '重新获取'){
req.postRequest('/api/user/send-authentication-code',{phone:this.data.phone}).then((res)=>{
console.log(res);
if (res.data.code !== 200) {
return wx.showToast({
title: res.data.msg,
icon: 'none'
});
}
if (this.data.countdown === '重新获取') {
this.setData({countdown: 60})
}
// 验证码倒计时
this.setData({isCxHq:true})
const timerId = setInterval(()=>{
this.setData({countdown:this.data.countdown-1})
if (this.data.countdown === 0) {
clearTimeout(timerId);
this.setData({countdown:'重新获取'})
}
},1000)
console.log('获取验证码');
})
hasPhone:false
}
},
doBdsjh(){
console.log('绑定手机号')
@ -79,30 +29,7 @@ Page({
this.setData({bdsjhVisible:false})
},
doEXecSjh(){
req.patchRequest('/api/user/curt',{
phone:this.data.phone,
phoneVerificationCode:this.data.phoneVerificationCode
}).then((res)=>{
console.log(res);
if(res.data.code !== 200){
wx.showToast({
title:res.data.msg,
icon:'none'
})
return
}else {
this.setData({bdsjhVisible:false})
this.getUserInfo()
wx.showToast({
title:'绑定成功',
icon:'none'
})
}
})
this.setData({
phoneVerificationCode:'',
isCxHq:false
})
},
go2Grzl(){
wx.navigateTo({
@ -119,29 +46,25 @@ Page({
url: '/pages/home/me/member2/member'
})
},
go2Gw(){
// wx.navigateTo({
// url: '/pages/home/me/gw/gw'
// })
console.log('跳转了解星座精灵页面');
go2Gw(){/**跳转到会员购买页面 */
wx.navigateTo({
url: '/pages/home/me/gw/gw'
})
},
go2Ysxy(){
// wx.navigateTo({
// url: '/pages/home/me/ysxy/ysxy'
// })
console.log('跳转隐私协议页面');
go2Ysxy(){/**跳转到会员购买页面 */
wx.navigateTo({
url: '/pages/home/me/ysxy/ysxy'
})
},
go2Yhsyxy(){
// wx.navigateTo({
// url: '/pages/home/me/yhsyxy/yhsyxy'
// })
console.log('跳转用户协议页面');
go2Yhsyxy(){/**跳转到会员购买页面 */
wx.navigateTo({
url: '/pages/home/me/yhsyxy/yhsyxy'
})
},
go2Cjwt(){
// wx.navigateTo({
// url: '/pages/home/me/cjwt/cjwt'
// })
console.log('跳转常见问题页面');
go2Cjwt(){/**跳转到会员购买页面 */
wx.navigateTo({
url: '/pages/home/me/cjwt/cjwt'
})
},
go2Device(){
wx.navigateTo({
@ -149,10 +72,9 @@ Page({
})
},
go2Sq(){
// wx.navigateTo({
// url: '/pages/home/me/sq/sq'
// })
console.log('跳转社群');
wx.navigateTo({
url: '/pages/home/me/sq/sq'
})
},
go2Yjfk(){
wx.navigateTo({
@ -161,23 +83,14 @@ Page({
},
go2Manual(){
// wx.navigateTo({
// url: '/pages/home/me/manual/manual'
// })
console.log('跳转说明书页面');
},
go2Jcjb(){
wx.navigateTo({
url: '/pages/home/me/jcjb/jcjb'
url: '/pages/home/me/manual/manual'
})
},
getUserInfo(){
req.getRequest('/api/user/curt',{}).then((res)=>{
if(res.data.code==200){
this.setData({
userInfo:res.data.data,
phone:res.data.data.phone
})
this.setData({userInfo:res.data.data})
}
console.log(this.userInfo);
}).catch((err)=>{
@ -273,7 +186,6 @@ Page({
.then(() => {
req.deleteRequest('/api/user/logout',{}).then((res)=>{
if(res.data.code===200){
wx.setStorageSync('token', '')
wx.navigateTo({
url: '/pages/index/index'
})
@ -294,6 +206,7 @@ Page({
})
.catch(() => console.log('点击了取消'))
.finally(() => {
wx.setStorageSync('token', '')
Dialog.close()});
},
})

@ -9,58 +9,53 @@
<view class="hydqr" wx:if="{{userInfo.isChatVip}}"> 还有21天到期</view><!--会员图标-->
<view class="gnk">
<!-- <view class="smst" >说明书</view> -->
<!-- <view class="jrsqt">加入社群</view> -->
<view class="wdsbt">我的设备</view>
<view class="smst" >说明书</view><!--说明书文字-->
<view class="jrsqt">加入社群</view><!--加入社群文字-->
<view class="wdsbt">我的设备</view><!--我的设备文字-->
<view class="sx"></view>
<!-- <view class="circle k1" bindtap="go2Manual"> -->
<!-- <view class="sms"></view>
</view> -->
<view class="circle k2" bindtap="go2Device">
<view class="circle k1" bindtap="go2Manual"><!--框1-->
<view class="sms"></view>
</view>
<view class="circle k2" bindtap="go2Device"><!--框2-->
<view class="sq"></view>
</view>
<!-- <view class="circle k3" bindtap="go2Sq">
<view class="circle k3" bindtap="go2Sq"><!--框3-->
<view class="sb"></view>
</view> -->
</view>
<!--功能操作框-->
<view class="mycell" bindtap="ljXzjl" >
<!-- <t-cell hover arrow bindtap="go2Gw">
<t-icon slot="left-icon" name="https://wish-assets.windymuse.com.cn/xy/iconPark-triangles.png" size="50rpx"/>
</view><!--功能操作框-->
<view class="mycell" bindtap="ljXzjl" ><!--cell菜单单元格-->
<t-cell hover arrow bindtap="go2Gw">
<t-icon slot="left-icon" name="https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/me/xzjl.png" size="50rpx"/>
<text slot="title" class="mycelltext" >了解星座精灵</text>
</t-cell> -->
</t-cell>
<t-cell hover bindtap="doBdsjh" >
<t-icon slot="left-icon" name="https://wish-assets.windymuse.com.cn/xy/iconPark-phone.png" size="50rpx"/>
<t-icon slot="left-icon" name="https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/me/phone.png" size="50rpx"/>
<text slot="title" class="mycelltext" >绑定手机号</text>
<text slot="note" wx:if="{{userInfo.hasPhone}}">{{userInfo.phone}}</text>
</t-cell>
<!-- <t-cell hover arrow bindtap="go2Cjwt">
<t-icon slot="left-icon" name="https://wish-assets.windymuse.com.cn/xy/iconPark-help%402x.png" size="50rpx"/>
<t-cell hover arrow bindtap="go2Cjwt">
<t-icon slot="left-icon" name="https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/me/cjwt.png" size="50rpx"/>
<text slot="title" class="mycelltext" >常见问题</text>
</t-cell> -->
</t-cell>
<t-cell hover arrow bindtap="go2Yjfk">
<t-icon slot="left-icon" name="https://wish-assets.windymuse.com.cn/xy/iconPark-edit%402x.png" size="50rpx"/>
<t-icon slot="left-icon" name="https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/me/yjfk.png" size="50rpx"/>
<text slot="title" class="mycelltext" >意见反馈</text>
</t-cell>
<!-- <t-cell hover arrow bindtap="go2Yhsyxy">
<t-icon slot="left-icon" name="https://wish-assets.windymuse.com.cn/xy/iconPark-editor%402x.png" size="50rpx"/>
<t-cell hover arrow bindtap="go2Yhsyxy">
<t-icon slot="left-icon" name="https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/me/yhsyxy.png" size="50rpx"/>
<text slot="title" class="mycelltext" >用户使用协议</text>
</t-cell> -->
<!-- <t-cell hover arrow bindtap="go2Ysxy">
<t-icon slot="left-icon" name="https://wish-assets.windymuse.com.cn/xy/iconPark-audit%402x.png" size="50rpx"/>
</t-cell>
<t-cell hover arrow bindtap="go2Ysxy">
<t-icon slot="left-icon" name="https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/me/ysxy.png" size="50rpx"/>
<text slot="title" class="mycelltext" >隐私协议</text>
</t-cell> -->
</t-cell>
<t-cell hover>
<t-icon slot="left-icon" name="https://wish-assets.windymuse.com.cn/xy/iconPark-layers%402x.png" size="50rpx"/>
<t-icon slot="left-icon" name="https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/me/xcxbb.png" size="50rpx"/>
<text slot="title" class="mycelltext" >小程序版本</text>
<text slot="note" >V1.0</text>
</t-cell>
<t-cell hover arrow bindtap="go2Jcjb" wx:if="{{userInfo.loverId}}">
<t-icon slot="left-icon" name="https://wish-assets.windymuse.com.cn/xy/myqcloud.png" size="50rpx"/>
<text slot="title" class="mycelltext" >解除羁绊</text>
</t-cell>
<t-cell hover arrow bindtap="logout">
<t-icon slot="left-icon" name="https://wish-assets.windymuse.com.cn/xy/iconPark-logout%402x.png" size="50rpx"/>
<t-icon slot="left-icon" name="https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/me/logout.png" size="50rpx"/>
<text slot="title" class="mycelltext" >退出登录</text>
</t-cell>
<view class="meempty"></view>
@ -69,7 +64,6 @@
<t-dialog id="t-dialog" />
</view>
<t-popup visible="{{bdsjhVisible}}" placement="center">
<view class="bdsjh">
<view class="bdsjhm1">绑定手机号码</view>
@ -77,14 +71,14 @@
<view class="sjhm1">手机号码</view>
<view class="yzm1">验证码</view>
<view class="input-example sjhminput1">
<t-input model:value="{{phone}}" bindblur="getPhone" placeholder="请输入手机号" />
<t-input value="{{userInfo.phone}}" placeholder="请输入手机号" />
</view>
<view class="input-example sjhminput2">
<t-input model:value="{{phoneVerificationCode}}" bindblur="getVerificationCode" placeholder="请输入验证码" />
<t-input placeholder="请输入验证码" />
</view>
<view class="sjhbkx"></view>
<view class="yzmbkx"></view>
<view class="cxhq" bindtap="getCode">{{isCxHq?countdown:'立即获取'}}</view>
<view class="cxhq">重新获取</view>
<view class="qxSjh" bindtap="doCancelSjh">取消</view>
<view class="wcSjh" bindtap="doEXecSjh">完成</view>
</view>

@ -7,7 +7,7 @@
flex-direction: column;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/xxt.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/me/xxt.png);
color:#9A9A9A;
text-align: center;
font-size: 27rpx;
@ -59,7 +59,7 @@
height: 100rpx;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/hy.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/me/hy.png);
}
.unhybs{
position: absolute;
@ -69,7 +69,7 @@
height: 100rpx;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/unhy.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/me/unhy.png);
}
.hydqr{
@ -86,8 +86,8 @@
.gnk{
position: absolute;
top: 412rpx;
left: 32rpx;
margin-left: 32rpx;
margin-top: 412rpx;
width: 686rpx;
height: 234rpx;
line-height: 52rpx;
@ -104,9 +104,11 @@
position: absolute;
width: 90rpx;
height: 90rpx;
line-height: 34rpx;
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: 24rpx;
text-align: center;
font-family: Arial;
border-radius: 50%;
margin-top:42rpx;
@ -137,7 +139,7 @@
margin: 18rpx 18rpx;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/sms.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/me/sms.png);
}
.sq{
@ -147,7 +149,7 @@
margin: 18rpx 18rpx;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/sq.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/me/sq.png);
}
.sb{
@ -157,12 +159,12 @@
margin: 14rpx 30rpx ;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/sb.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/me/sb.png);
}
.smst{
position: absolute;
left: 69rpx;
left: 57rpx;
top: 152rpx;
width: 420rpx;
height: 42rpx;
@ -199,8 +201,8 @@
.mycell{
position: absolute;
margin-top: 720rpx;
width:100%;
/* margin-left: 10rpx; */
width:730rpx;
margin-left: 10rpx;
overflow-x:hidden;
}

@ -1,106 +0,0 @@
// pages/home/me/jcjb/jcjb.js
const app = getApp();//新建页面时 默认引入
const req = app.xzjlReq();//初始化一个的request() 实例
Page({
/**
* 页面的初始数据
*/
data: {
timeout:3,
showTimeout:false,
showDialog:false
},
go2Reback(){
wx.navigateBack({ changed: true });
},
// 长按解除羁绊
handleLongPress() {
this.setData({showTimeout:true})
this.setIn = setInterval(() => {
this.setData({
timeout: this.data.timeout - 1
})
if(this.data.timeout === 0){
req.patchRequest('/api/user/curt/lover/unbinding',{}).then((res) => {
console.log(res,'已经解除羁绊');
})
clearInterval(this.setIn)
this.setData({
showTimeout:false,
showDialog:true
})
}
},1000)
},
// 取消长按
handleTouchEnd(){
this.setData({
timeout:3,
showTimeout:false,
})
clearInterval(this.setIn)
},
closeDialog(){
this.setData({showDialog:false})
wx.switchTab({
url: '/pages/home/me/indexx'
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

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

@ -1,29 +0,0 @@
<!--pages/home/me/jcjb/jcjb.wxml-->
<!--返回图标-->
<view class="reback" bindtap="go2Reback"></view>
<view class="title">解除羁绊</view>
<view class="main-img">
<image src="https://wish-assets.windymuse.com.cn/xy/%E9%92%BB%E7%9F%B3.png" />
</view>
<view class="timeout" wx:if="{{showTimeout}}"> {{ timeout }} </view>
<view class="text1">确定与对方解除羁绊吗?</view>
<view class="text2">解除羁绊后你们的数据将保留90天。90天内如果再次建立羁绊你们的数据将恢复。如果超过90天未再次建立羁绊所有数据将永远清除不可找回。</view>
<view class="btn-container">
<view class="btn" bindlongpress="handleLongPress" bindtouchend="handleTouchEnd">
<image src="https://wish-assets.windymuse.com.cn/xy/ze-arrow.png"/>
</view>
</view>
<view class="text3">长按3秒解除羁绊</view>
<!-- 解除成功提示 -->
<view class="dialog" wx:if="{{showDialog}}">
<view class="dialog-main">
<view class="dialog-text">羁绊已解除</view>
<view class="dialog-btn" bindtap="closeDialog">好的</view>
</view>
</view>

@ -1,148 +0,0 @@
/* pages/home/me/jcjb/jcjb.wxss */
.reback{
position: absolute;
margin-left: 20rpx;
margin-top:108rpx;
width:48rpx;
height:48rpx;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/reback.png);
}
.title{
position: absolute;
left: 278rpx;
top: 108rpx;
width: 196rpx;
height: 48rpx;
color: rgba(108, 108, 108, 1);
font-size: 32rpx;
text-align: center;
font-family: SourceHanSansSC-regular;
}
.main-img {
position: absolute;
top: 240rpx;
left: 174rpx;
width: 400rpx;
height: 400rpx;
}
.main-img image {
width: 100%;
height: 100%;
}
.text1 {
position: absolute;
top: 740rpx;
width: 100%;
color: rgba(248, 99, 42, 1);
font-size: 48rpx;
font-weight: 700;
text-align: center;
font-family: SourceHanSansSC-bold;
}
.text2 {
position: absolute;
top: 852rpx;
width: 100%;
padding: 0 100rpx;
box-sizing: border-box;
color: rgba(248, 99, 42, 1);
font-size: 16px;
text-align: justify;
font-family: SourceHanSansSC-regular;
}
.btn-container {
width: 100%;
position: absolute;
top: 1140rpx;
display: flex;
justify-content: center;
}
.btn {
width: 181rpx;
height: 181rpx;
background: linear-gradient(233.49deg, rgba(248,99,42,1) 10.48%,rgba(249,135,89,1) 89.2%);
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4);
border: 4px solid rgba(255, 255, 255, 1);
border-radius: 50%;
}
.btn image {
width: 100%;
height: 100%;
}
.text3 {
position: absolute;
top: 1384rpx;
width: 100%;
text-align: center;
color: rgba(108, 108, 108, 1);
font-size: 20px;
font-weight: 700;
}
.timeout {
position: absolute;
top: 310rpx;
width: 100%;
color: rgba(248, 99, 42, 1);
font-size: 100px;
text-align: center;
font-weight: 700;
}
.dialog {
position: absolute;
width: 100%;
height: 100%;
background-color: rgba(255, 255, 255, 0.8);
}
.dialog-main{
position: absolute;
left: 82rpx;
top: 544rpx;
width: 586rpx;
height: 434rpx;
line-height: 20px;
border-radius: 15px;
background-color: rgba(255, 255, 255, 1);
color: rgba(16, 16, 16, 1);
font-size: 14px;
text-align: center;
box-shadow: 1px 2px 6px 0px rgba(0, 0, 0, 0.4);
}
.dialog-text {
width: 100%;
margin-top: 146rpx;
color: rgba(108, 108, 108, 1);
font-size: 36rpx;
text-align: center;
}
.dialog-btn {
width: 210rpx;
height: 70rpx;
margin: 120rpx auto;
box-sizing: border-box;
border-radius: 20rpx;
background: linear-gradient(233.49deg, rgba(248,99,42,1) 10.48%,rgba(249,135,89,1) 89.2%);
text-align: center;
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4);
border: 3px solid rgba(255, 255, 255, 1);
color: #fff;
font-size: 28rpx;
display: flex;
justify-content: center;
align-items: center;
}

@ -9,8 +9,8 @@ Page({
*/
data: {
yhy:true,
openid:'',
showToast:false
openid:''
},
doKtHy() {
@ -59,11 +59,11 @@ Page({
wx.navigateBack({ changed: true });
},
tQuest(){
this.setData({showToast:true})
},
closeTaost(){
this.setData({showToast:false})
console.log('点击了');
Toast({
context: this,
selector: '#t-toast',
message: '星座精灵AI的付费会员服务基于OpenAI的GPT-3.5 Turbo模型为您提供高智能情感咨询服务以及星座、星骰和塔罗牌等娱乐服务。利用人工智能技术和高质量的自然语言响应星座精灵AI可以更好的帮助您深入探索内心世界。',
});
},
/**

@ -7,14 +7,6 @@
<view class="hgpng"></view><!--皇冠图标-->
<view class="question" bindtap="tQuest"></view><!--问号图标-->
<!-- 提示 -->
<view class="bgc" bindtap="closeTaost" wx:if="{{showToast}}">
<view class="toast">
星座精灵AI的付费会员服务基于OpenAI的GPT-3.5 Turbo模型为您提供高智能情感咨询服务以及星座、
星骰和塔罗牌等娱乐服务。利用人工智能技术和高质量的自然语言响应星座精灵AI可以更好的帮助您深入探
索内心世界。</view>
</view>
<t-toast id="t-toast" /><!--弹出问号图标-->
<view class="hybtn" bindtap="doKtHy">开通会员</view>
<view class="viphyqy">VIP会员权益</view>

@ -6,7 +6,7 @@
height:48rpx;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/reback.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/me/reback.png);
}
.title{
@ -29,7 +29,7 @@
height: 230rpx;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/hybt.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/me/hybt.png);
}
.sftp{
@ -40,7 +40,7 @@
height: 115px;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/sftp.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/me/sftp.png);
}
.hgpng{
@ -51,7 +51,7 @@ width: 157px;
height: 174px;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/hgpng.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/me/hgpng.png);
}
.question{
@ -60,8 +60,7 @@ background-repeat: no-repeat;
top: 124px;
width: 30px;
height: 30px;
z-index: 999;
background-image: url(https://wish-assets.windymuse.com.cn/xy/qqest.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/me/qqest.png);
}
.hybtn{
position: absolute;
@ -231,28 +230,3 @@ font-family: SourceHanSansSC-regular;
font-family: Arial;
border: 2px solid rgba(248, 99, 42, 1);
}
.toast {
position: absolute;
top: 344rpx;
left: 64rpx;
width: 622rpx;
height: 316rpx;
padding: 32rpx;
box-sizing: border-box;
border-radius: 15px;
background-color: rgba(255, 255, 255, 0.9);
color: rgba(108, 108, 108, 1);
font-size: 28rpx;
text-align: center;
box-shadow: 1px 2px 6px 0px rgba(0, 0, 0, 0.2);
z-index: 999;
text-align: justify;
}
.bgc {
position: absolute;
width: 100%;
height: 100%;
z-index: 1;
}

@ -6,7 +6,7 @@
height:48rpx;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/reback.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/me/reback.png);
}
.title{
@ -29,7 +29,7 @@
height: 230rpx;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/hybt.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/me/hybt.png);
}
.sftp{
@ -40,7 +40,7 @@
height: 115px;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/sftp.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/me/sftp.png);
}
.hgpng{
@ -51,7 +51,7 @@ width: 157px;
height: 174px;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/hgpng.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/me/hgpng.png);
}
.question{
@ -60,7 +60,7 @@ background-repeat: no-repeat;
top: 124px;
width: 30px;
height: 30px;
background-image: url(https://wish-assets.windymuse.com.cn/xy/qqest.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/me/qqest.png);
}
.hybtn{
position: absolute;

@ -10,8 +10,8 @@ Page({
* 页面的初始数据
*/
data: {
devs:[],
QRcode:''
devs:[]
},
doCopy(e){/**赋值设备唯一识别码 */
let key = e.target.dataset.copy
@ -35,11 +35,7 @@ Page({
req.getRequest('/api/user/curt/equipments',{}).then((res)=>{
if(res.data.code==200){
// 循环查询
const mac = res.data.data[0].mac
this.setData({
devs:res.data.data,
QRcode: `https://xzjl-api.windymuse.cn/api/v1/qr/generate?mac=${mac}`
})
this.setData({devs:res.data.data})
}
}).catch((err)=>{
console.log(err);
@ -51,44 +47,44 @@ Page({
*/
onLoad(options) {
this.doDevQuery()
// const query = wx.createSelectorQuery()
// query.select('#myQrcode')
// .fields({
// node: true,
// size: true
// })
// .exec((res) => {
// var canvas = res[0].node
// // 调用方法drawQrcode生成二维码
// drawQrcode({
// canvas: canvas,
// canvasId: 'myQrcode',
// width: 260,
// padding: 30,
// background: '#ffffff',
// foreground: '#000000',
// text: '大王顶真帅',
// })
// // 获取临时路径(得到之后,想干嘛就干嘛了)
// wx.canvasToTempFilePath({
// canvasId: 'myQrcode',
// canvas: canvas,
// x: 0,
// y: 0,
// width: 260,
// height: 260,
// destWidth: 260,
// destHeight: 260,
// success(res) {
// console.log('二维码临时路径:', res.tempFilePath)
// },
// fail(res) {
// console.error(res)
// }
// })
// })
const query = wx.createSelectorQuery()
query.select('#myQrcode')
.fields({
node: true,
size: true
})
.exec((res) => {
var canvas = res[0].node
// 调用方法drawQrcode生成二维码
drawQrcode({
canvas: canvas,
canvasId: 'myQrcode',
width: 260,
padding: 30,
background: '#ffffff',
foreground: '#000000',
text: '大王顶真帅',
})
// 获取临时路径(得到之后,想干嘛就干嘛了)
wx.canvasToTempFilePath({
canvasId: 'myQrcode',
canvas: canvas,
x: 0,
y: 0,
width: 260,
height: 260,
destWidth: 260,
destHeight: 260,
success(res) {
console.log('二维码临时路径:', res.tempFilePath)
},
fail(res) {
console.error(res)
}
})
})
},

@ -11,9 +11,7 @@
<view class="sbwysbm">设备唯一识别码</view>
<view class="sbmm">识别码是设备唯一ID绝对不能告诉别人哦</view>
<view class="sbewmt">设备二维码</view>
<view class="sbewm">
<image src="{{QRcode}}"/>
</view><!--设备二维码图片-->
<view class="sbewm"></view><!--设备二维码图片-->
<view class="intr1">可代替设备用于登录,可在设备丢失时临时登录使用</view>
<view class="intr2">请不要将二维码告知他人,否则有账号丢失风险</view>
<view class="sbsbmk"></view><!--设备识别码块-->
@ -22,7 +20,7 @@
</swiper-item>
</swiper>
<!-- <canvas class="sbewm" type="2d" style="width: 300rpx; height: 300rpx;" id="myQrcode"></canvas> -->
<canvas class="sbewm" type="2d" style="width: 300rpx; height: 300rpx;" id="myQrcode"></canvas>
<!--返回图标-->
<view class="reback11" bindtap="go2Reback"></view>

@ -7,7 +7,7 @@
height:48rpx;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/reback.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/me/reback.png);
}
.title{
@ -22,6 +22,31 @@
font-family: SourceHanSansSC-regular;
}
.call{
margin-top:0rpx;
padding: 0;
@ -58,7 +83,7 @@
margin-left: 32.33rpx;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/rbs.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/jl/rbs.png);
}
.lovepic{
@ -69,7 +94,7 @@
margin-left:235.33rpx;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/pulse.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/jl/pulse.png);
}
.dchxtxtql{
@ -92,7 +117,7 @@
margin-left:218rpx;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/tx.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/jl/tx.png);
}
.txr{
@ -103,7 +128,7 @@
margin-left:400.67rpx;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/tx.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/jl/tx.png);
}
.txtextl{
@ -124,7 +149,7 @@
margin-left: 322.67rpx;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/jiuchan.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/jl/jiuchan.png);
}
@ -147,7 +172,7 @@
margin-left: 322.67rpx;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/bkg3.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/jl/bkg3.png);
}
.xxt{
@ -158,7 +183,7 @@
margin-left: 212rpx;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/szn.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/jl/szn.png);
}
.yan1{
@ -169,7 +194,7 @@
background-size:100% 100%;
margin-top: 837.33rpx;
margin-left:118.67rpx;
background-image: url(https://wish-assets.windymuse.com.cn/xy/yan.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/jl/yan.png);
}
.yan2{
position: absolute;
@ -179,7 +204,7 @@
background-size:100% 100%;
margin-top: 837.33rpx;
margin-left:318rpx;
background-image: url(https://wish-assets.windymuse.com.cn/xy/yan.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/jl/yan.png);
}
.yan3{
position: absolute;
@ -189,7 +214,7 @@
margin-left:517.33rpx;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/yan.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/jl/yan.png);
}
.bkg1{
@ -200,7 +225,7 @@
margin-left:46rpx;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/bkg1.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/jl/bkg1.png);
}
.bkg3{
@ -211,7 +236,7 @@
margin-left:42rpx;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/bkg3.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/jl/bkg3.png);
}
.yan11{
@ -222,7 +247,7 @@
background-size:100% 100%;
margin-top: 33.33rpx;
margin-left:34.33rpx;
background-image: url(https://wish-assets.windymuse.com.cn/xy/paw.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/jl/paw.png);
}
.yan12{
@ -233,7 +258,7 @@
background-size:100% 100%;
margin-top: 33.33rpx;
margin-left:34.33rpx;
background-image: url(https://wish-assets.windymuse.com.cn/xy/male.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/jl/male.png);
}
.yan13{
@ -244,7 +269,7 @@
background-size:100% 100%;
margin-top: 33.33rpx;
margin-left:34.33rpx;
background-image: url(https://wish-assets.windymuse.com.cn/xy/female.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/jl/female.png);
}
.xxtl{
@ -255,7 +280,7 @@
margin-left: 88rpx;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/szn.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/jl/szn.png);
}
.xxtr{
@ -266,7 +291,7 @@
margin-left: 355.33rpx;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/xxtr.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/jl/xxtr.png);
}
.yanql1{
@ -277,7 +302,7 @@
background-size:100% 100%;
margin-top: 492rpx;
margin-left:86.67rpx;
background-image: url(https://wish-assets.windymuse.com.cn/xy/yan.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/jl/yan.png);
}
.yanql2{
@ -288,7 +313,7 @@
background-size:100% 100%;
margin-top: 663.33rpx;
margin-left:38.67rpx;
background-image: url(https://wish-assets.windymuse.com.cn/xy/yan.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/jl/yan.png);
}
.yanql4{
@ -299,7 +324,7 @@
background-size:100% 100%;
margin-top: 492rpx;
margin-left:550.67rpx;
background-image: url(https://wish-assets.windymuse.com.cn/xy/yan.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/jl/yan.png);
}
.yanql5{
@ -310,7 +335,7 @@
background-size:100% 100%;
margin-top: 663.33rpx;
margin-left:598rpx;
background-image: url(https://wish-assets.windymuse.com.cn/xy/yan.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/jl/yan.png);
}
.xxtq{
@ -321,7 +346,7 @@
margin-left: 212rpx;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/xxtr.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/jl/xxtr.png);
}
.k1{
@ -334,7 +359,7 @@
margin-left: 114.67rpx;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/circle.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/jl/circle.png);
}
@ -346,7 +371,7 @@
margin-left: 318rpx;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/yan.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/jl/yan.png);
}
@ -360,7 +385,7 @@
margin-left: 520.67rpx;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/circle.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/jl/circle.png);
}
@ -372,7 +397,7 @@
margin-left: 36rpx;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/yst.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/jl/yst.png);
}
@ -427,7 +452,7 @@
left: 0;
right: 0;
margin: 84rpx auto;
background-image: url(https://wish-assets.windymuse.com.cn/xy/ztys.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xzt/ztys.png);
}
.jkzs{
@ -440,7 +465,7 @@
background-size:100% 100%;
margin-left:97.33rpx;
margin-top: 589.33rpx;
background-image: url(https://wish-assets.windymuse.com.cn/xy/jkzs.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xy/jkzs.png);
}
.aqzs{
@ -453,7 +478,7 @@
background-size:100% 100%;
margin-left:97.33rpx;
margin-top: 653.33rpx;
background-image: url(https://wish-assets.windymuse.com.cn/xy/aqzs.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xy/aqzs.png);
}
.cyzs{
@ -466,7 +491,7 @@
background-size:100% 100%;
margin-left:97.33rpx;
margin-top: 717.33rpx;
background-image: url(https://wish-assets.windymuse.com.cn/xy/cyzs.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xy/cyzs.png);
}
.rjkzs{
@ -509,10 +534,10 @@
.shtp{
position: absolute;
left: 242rpx;
top: 240rpx;
width: 268rpx;
height: 268rpx;
left: 121px;
top: 120px;
width: 134px;
height: 134px;
border-radius: 134rpx;
line-height: 17px;
opacity: 0.5;
@ -525,44 +550,44 @@
.shimg{
position: absolute;
left: 262rpx;
top: 262rpx;
width: 226rpx;
height: 226rpx;
left: 131px;
top: 131px;
width: 113px;
height: 113px;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/shimg.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/me/shimg.png);
}
.shmz{
position: absolute;
top: 540rpx;
top: 270px;
width: 750rpx;
height: 48rpx;
height: 24px;
color: rgba(248, 99, 42, 1);
font-size: 32rpx;
font-size: 16px;
text-align: center;
font-family: SourceHanSansSC-medium;
}
.sbwysbm{
position: absolute;
top: 698rpx;
top: 349px;
width: 750rpx;
height: 48rpx;
height: 24px;
color: rgba(108, 108, 108, 1);
font-size: 32rpx;
font-size: 16px;
text-align: center;
font-family: SourceHanSansSC-medium;
}
.intr1{
position: absolute;
top: 1456rpx;
top: 728px;
width: 750rpx;
height: 36rpx;
height: 18px;
color: rgba(154, 154, 154, 1);
font-size: 24rpx;
font-size: 12px;
text-align: center;
font-family: SourceHanSansSC-regular;
}
@ -570,56 +595,51 @@
.intr2{
position: absolute;
top: 1492rpx;
top: 746px;
width: 750rpx;
height: 36rpx;
height: 18px;
color: rgba(154, 154, 154, 1);
font-size: 24rpx;
font-size: 12px;
text-align: center;
font-family: SourceHanSansSC-regular;
}
.sbmm{
position: absolute;
top: 898rpx;
top: 449px;
width: 750rpx;
height: 36rpx;
height: 18px;
color: rgba(154, 154, 154, 1);
font-size: 24rpx;
font-size: 12px;
text-align: center;
font-family: SourceHanSansSC-regular;
}
.sbewmt{
position: absolute;
top: 1044rpx;
top: 522px;
width: 750rpx;
height: 48rpx;
height: 24px;
color: rgba(108, 108, 108, 1);
font-size: 32rpx;
font-size: 16px;
text-align: center;
font-family: SourceHanSansSC-medium;
}
.sbewm{
position: absolute;
left: 226rpx;
top: 1124rpx;
width: 300rpx;
height: 300rpx;
}
.sbewm image {
width: 100%;
height: 100%;
left: 113px;
top: 562px;
width: 150px;
height: 150px;
}
.sbsbmk{
position: absolute;
left: 88rpx;
top: 778rpx;
width: 576rpx;
height: 88rpx;
line-height: 40rpx;
border-radius: 30rpx;
left: 44px;
top: 389px;
width: 288px;
height: 44px;
line-height: 20px;
border-radius: 15px;
background-color: rgba(239, 239, 239, 0.5);
text-align: center;
border: 1px solid rgba(187, 187, 187, 1);
@ -627,28 +647,26 @@
.sbsbmkt{
position: absolute;
left: 152rpx;
top: 778rpx;
width: 410rpx;
height: 88rpx;
line-height: 88rpx;
text-align: center;
left: 76px;
top: 389px;
width: 185px;
height: 44px;
line-height: 44px;
color: rgba(108, 108, 108, 1);
font-size: 32rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
font-size: 16px;
text-align: center;
font-family: SourceHanSansSC-regular;
}
.fz{
position: absolute;
left: 592rpx;
top: 802rpx;
width: 40rpx;
height: 40rpx;
left: 296px;
top: 401px;
width: 20px;
height: 20px;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/copy.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/me/copy.png);
}
.tbl{
@ -659,7 +677,7 @@
height: 75px;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/tbl.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/me/tbl.png);
}
.tbr{
@ -670,5 +688,5 @@
height: 75px;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/tbr.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/me/tbr.png);
}

@ -18,14 +18,6 @@ Page({
wx.navigateBack({ changed: true });
},
doExecYjfk(e){
const contactWay = e.detail.value.contactWay;
if (!/^1[3456789]\d{9}$/.test(contactWay)) {
wx.showToast({
title: '手机号码',
icon: 'none'
});
return;
}
let form = e.detail.value
req.postRequest('/api/v1/opinion',form).then((res)=>{
console.log(res)

@ -7,8 +7,13 @@
<view class="jyms">建议描述</view>
<view class="lxfs">联系方式</view>
<form bindsubmit="doExecYjfk" report-submit="true">
<view class="jymsk"><t-textarea name="content" value="{{yj.content}}" placeholder="请描述您遇到的问题或建议"/></view>
<form bindsubmit="doExecYjfk">
<view class="jymsk"><t-textarea name="content" placeholder="请描述您遇到的问题或建议" /></view>
<view class="lxfsk" ><t-textarea name="contactWay" maxlength="11" value="{{yj.contactWay}}" placeholder="请输入您的联系方式" /></view>
<button class="submit" formType="submit">提交</button>
<button class="submit" form-type="submit">提交</button>
</form>

@ -7,7 +7,7 @@
height:48rpx;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/reback.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/me/reback.png);
}
.title{
@ -30,7 +30,7 @@
height: 230rpx;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/hybt.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/me/hybt.png);
}
.fkt1{
position: absolute;
@ -68,12 +68,13 @@
}
.submit{
z-index: 9999;
position: absolute;
left: 236rpx;
top: 1290rpx;
width: 280rpx;
height: 80rpx;
line-height: 70rpx;
line-height: 80rpx;
border-radius: 20rpx;
background: linear-gradient(233.49deg, rgba(248,99,42,1) 10.48%,rgba(249,135,89,1) 89.2%);
text-align: center;
@ -83,7 +84,6 @@
font-size: 32rpx;
text-align: center;
font-family: SourceHanSansSC-medium;
z-index: 999;
}
.lxfs{
position: absolute;
@ -99,10 +99,10 @@
.jymsk{
position: absolute;
left: 46rpx;
top: 502rpx;
width: 660rpx;
height: 414rpx;
left: 23px;
top: 251px;
width: 330px;
height: 207px;
line-height: 20px;
border-radius: 15px;
background-color: rgba(239, 239, 239, 1);
@ -114,10 +114,10 @@
.lxfsk{
position: absolute;
left: 46rpx;
top: 1064rpx;
width: 660rpx;
height: 112rpx;
left: 23px;
top: 532px;
width: 330px;
height: 56px;
line-height: 20px;
border-radius: 15px;
background-color: rgba(239, 239, 239, 1);

@ -7,8 +7,7 @@ Page({
* 页面的初始数据
*/
data: {
visible:false,
image: []
},
go2Reback(){
wx.navigateTo({
@ -17,12 +16,12 @@ Page({
},
go2Xz(){
wx.navigateTo({
url: '/pages/home/xx/hy/index'
url: '/pages/home/xx/hy/xz/zt'
})
},
go2Yx(){
wx.navigateTo({
url: '/pages/home/xx/hy/yx/yx'
url: '/pages/home/xx/hy/index'
})
},
go2Hx(){
@ -35,83 +34,11 @@ Page({
url: '/pages/home/xx/hy/zt/zt'
})
},
blockClick(e){
console.log(e.target.dataset.url);
this.setData({
visible: true,
image: [e.target.dataset.url]
})
},
onClose(){
this.setData({visible: false})
},
delBtn(e){
console.log('删除图片');
console.log(e.currentTarget.dataset.item);
const url = e.currentTarget.dataset.item
const arr = url.split("/"); // 将链接按照 / 分割成数组
const last = arr[arr.length - 1]; // 取得数组中的最后一个元素
const num = last.split("?")[0]; // 将最后一个元素按照 ? 分割成数组,取得倒数第二个元素
console.log(num); // 输出 128
this.setData({delKey: e.currentTarget.dataset.item, resourceId:num})
},
delBtnHx(){
const hxlist = this.data.hxlist
const id = hxlist.find(item => item.resourceId == this.data.resourceId).id
console.log(id);
req.deleteRequest(`/api/user/curt/message/${id}`,{}).then(res => {
console.log(res);
if (res.data.code === 200) {
this.getList()
this.setData({delKey: ''})
}
})
},
closeViewer(){this.setData({visible: false})},
getList(){
req.getRequest('/api/user/curt/message/lover',{
limit:-1,
type: 'graphic'
}).then(res => {
const list = res.data.data.records
list.forEach(item => {
// 将时间字符串转为Date对象
const date = new Date(item.createdAt);
// 获取年月日时分秒
const year = date.getFullYear();
const month = date.getMonth() + 1;
const day = date.getDate();
// 格式化时间
const formattedDate = `${year}${month}${day}`;
item.createdAt = formattedDate
})
console.log(list);
this.setData({hxlist: list})
const treeData = list.reduce((result, item) => {
const group = result.find(group => group.createdAt === item.createdAt);
if (group) {
// group.list.push(item.resourceId);
group.list.push(`https://xzjl-api.windymuse.cn/api/resource/${item.resourceId}?k=${item.fromUserid}`);
} else {
result.push({
createdAt: item.createdAt,
list: [`https://xzjl-api.windymuse.cn/api/resource/${item.resourceId}?k=${item.fromUserid}`]
});
}
return result;
}, []);
console.log(treeData);
this.setData({list: treeData})
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.getList()
},
/**

@ -1,9 +1,3 @@
{
"component": true,
"usingComponents": {
"t-grid": "tdesign-miniprogram/grid/grid",
"t-grid-item": "tdesign-miniprogram/grid-item/grid-item",
"t-image-viewer": "tdesign-miniprogram/image-viewer/image-viewer"
"usingComponents": {}
}
}

@ -1,40 +1,12 @@
<!--pages/home/xx/hy/xz/zt.wxml-->
<!--pages/home/xx/hy/hx/hx.wxml-->
<!--返回图标-->
<view class="reback" bindtap="go2Reback"></view>
<view class="title">画像</view>
<view class="body">
<view class="block" wx:for="{{list}}" wx:key="index">
<view class="block-text">
{{ item.createdAt }}
</view>
<view class="block-item">
<view class="item" wx:for="{{item.list}}" wx:key="index" bindlongpress="delBtn" data-item="{{item}}">
<view class="item-del" wx:if="{{delKey === item}}" bindtap="delBtnHx">删除</view>
<image src="{{item}}" bindtap="blockClick" data-url="{{item}}"/>
</view>
</view>
</view>
</view>
<!-- 图片预览 -->
<!-- <view class="viewer" wx:if="{{visible}}" bindtap="closeViewer">
<image src="{{image}}" scaleToFill/>
<view class="viewer-btn">
<view class="btn" bindtap="delBtn">删除</view>
<view class="btn">保存</view>
</view>
</view> -->
<t-image-viewer
visible="{{visible}}"
images="{{image}}"
bind:close="onClose"
/>
<!--星讯聊天下方菜单栏-->
<view class="xfgjl" >
<view class="xxqlcd" bindtap="go2Xz">信札</view>
<view class="xxqlcd" bindtap="go2Yx">音讯</view>
<view class="xxqlcd" bindtap="go2Hx">画像</view>
<view class="xxqlcd" bindtap="go2Zt">纸条</view>
<view class="xxqlcd xxqlcd1" bindtap="go2Xz">信札</view>
<view class="xxqlcd xxqlcd2" bindtap="go2Yx">音讯</view>
<view class="xxqlcd xxqlcd3" bindtap="go2Hx">画像</view>
<view class="xxqlcd xxqlcd4" bindtap="go2Zt">纸条</view>
</view>

@ -1,14 +1,13 @@
/* pages/home/xx/hy/index.wxss */
.reback{
position: fixed;
margin-left: 20rpx;
top: 108rpx;
margin-top:108rpx;
width:48rpx;
height:48rpx;
z-index: 2;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/reback.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/me/reback.png);
}
.title{
@ -20,125 +19,48 @@
color: rgba(108, 108, 108, 1);
font-size: 32rpx;
text-align: center;
z-index: 1;
font-family: SourceHanSansSC-regular;
}
.xfgjl{
position: fixed;
top: 0;
left: 0px;
display: flex;
justify-content: space-evenly;
margin-top: 1416rpx;
width: 750rpx;
height: 174rpx;
line-height: 40rpx;
z-index: 99;
height: 87px;
line-height: 20px;
opacity: 0.7;
background-color: rgba(255, 255, 255, 1);
text-align: center;
}
.xxqlcd{
width: 110rpx;
height: 110rpx;
border-radius: 50%;
position: absolute;
top: 32rpx;
width: 55px;
height: 55px;
border-radius: 56rpx;
line-height: 110rpx;
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: 32rpx;
font-size: 12px;
text-align: center;
box-shadow: 2px 2px 2px 2px rgba(0, 0, 0, 0.4);
font-family: Arial;
border: 5rpx solid rgba(255, 255, 255, 1);
color: rgba(255, 255, 255, 1);
font-size: 16px;
text-align: center;
font-family: SourceHanSansSC-medium;
}
.body {
padding-top:188rpx ;
padding-bottom: 200rpx;
.xxqlcd1{
left: 21px;
}
.block {
display: block;
margin-bottom: 32rpx;
.xxqlcd2{
left: 114px;
}
.block-item {
display: flex;
flex-wrap: wrap;
}
.block-text {
color: rgba(108, 108, 108, 1);
font-size: 14px;
margin: 24rpx 32rpx;
.xxqlcd3{
left: 206px;
}
.block-item .item {
position: relative;
width: 182rpx;
height: 182rpx;
margin: 4rpx 0 0 4rpx;
background-color: #e8e8e8;
}
.block-item .item image{
width: 100%;
height: 100%;
}
.block-item .item .item-del{
position: absolute;
top: -52rpx;
left: 6rpx;
width: 148rpx;
height: 84rpx;
border-radius: 10rpx;
color: #6c6c6c;
font-size: 28rpx;
display: flex;
align-items: center;
justify-content: center;
background-image: url(https://wish-assets.windymuse.com.cn/xy/ltqp.png);
}
.viewer {
position: absolute;
top: 0;
width: 100%;
height: 100%;
z-index: 100;
background-color: #fff;
}
.viewer image {
width: 100%;
margin-top: 400rpx;
z-index: 999;
}
.viewer-btn {
width: 100%;
height: 160rpx;
position: absolute;
bottom: 0;
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 32rpx;
box-sizing: border-box;
}
.viewer-btn .btn {
width: 110rpx;
height: 70rpx;
border-radius: 20rpx;
box-sizing: border-box;
color: #fff;
display: flex;
justify-content: center;
align-items: center;
background: linear-gradient(222.54deg, rgba(248,99,42,1) 14.03%,rgba(249,135,89,1) 85.21%);
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4);
border: 3px solid rgba(255, 255, 255, 1);
z-index: 999;
.xxqlcd4{
left: 299px;
}

@ -7,7 +7,7 @@ Page({
* 页面的初始数据
*/
data: {
list: []
},
go2Reback(){
wx.navigateTo({
@ -16,12 +16,12 @@ Page({
},
go2Xz(){
wx.navigateTo({
url: '/pages/home/xx/hy/index'
url: '/pages/home/xx/hy/xz/zt'
})
},
go2Yx(){
wx.navigateTo({
url: '/pages/home/xx/hy/yx/yx'
url: '/pages/home/xx/hy/index'
})
},
go2Hx(){
@ -34,52 +34,11 @@ Page({
url: '/pages/home/xx/hy/zt/zt'
})
},
delLetter(){
console.log('删除');
},
getList(){
req.getRequest('/api/user/curt/message/lover',{
limit:-1,
type: 'letter'
}).then(res => {
const list = res.data.data.records
list.forEach(item => {
// 将时间字符串转为Date对象
const date = new Date(item.createdAt);
// 获取年月日时分秒
const year = date.getFullYear();
const month = date.getMonth() + 1;
const day = date.getDate();
const hour = date.getHours();
const minute = date.getMinutes();
const second = date.getSeconds();
// 格式化时间
const formattedDate = `${year}${month}${day}${hour}:${minute}`;
item.createdAt = formattedDate
})
console.log(list);
this.setData({list: list})
})
},
getLoveInfo(){
req.getRequest('/api/user/curt/lover',{}).then(res => {
console.log(res);
this.setData({
avatar: res.data.data.avatar,
nick: res.data.data.nick
})
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.getList()
this.getLoveInfo()
},
/**

@ -1,5 +1,5 @@
{
"usingComponents": {
"t-swipe-cell": "tdesign-miniprogram/swipe-cell/swipe-cell"
"t-image": "tdesign-miniprogram/image/image"
}
}

@ -1,26 +1,7 @@
<!--pages/home/xx/hy/index.wxml-->
<!--返回图标-->
<view class="reback" bindtap="go2Reback"></view>
<view class="title">信札</view>
<!-- 中间主体 -->
<view class="main">
<view class="main-bgc" />
<t-swipe-cell wx:for="{{ list }}" wx:key="index">
<view class="main-item">
<view class="item-left">
<view class="item-left"><image src="{{avatar}}" /></view>
</view>
<view class="item-text">
<view class="item-text-name">昵称七个字昵称</view>
<view class="item-text-time"> {{item.createdAt}} </view>
</view>
<view class="item-right">
</view>
</view>
<view slot="right" class="delete-btn" bindtap="delLetter">删除</view>
</t-swipe-cell>
</view>
<view class="title">音讯</view>
<!--星讯聊天下方菜单栏-->
<view class="xfgjl" >

@ -7,8 +7,7 @@
height:48rpx;
background-repeat: no-repeat;
background-size:100% 100%;
z-index: 1;
background-image: url(https://wish-assets.windymuse.com.cn/xy/reback.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/me/reback.png);
}
.title{
@ -20,107 +19,48 @@
color: rgba(108, 108, 108, 1);
font-size: 32rpx;
text-align: center;
z-index: 1;
font-family: SourceHanSansSC-regular;
}
.xfgjl{
position: fixed;
left: 0px;
display: flex;
justify-content: space-evenly;
margin-top: 1416rpx;
width: 750rpx;
height: 174rpx;
line-height: 40rpx;
height: 87px;
line-height: 20px;
opacity: 0.7;
background-color: rgba(255, 255, 255, 1);
text-align: center;
}
.xxqlcd{
width: 110rpx;
height: 110rpx;
border-radius: 50%;
position: absolute;
top: 32rpx;
width: 55px;
height: 55px;
border-radius: 56rpx;
line-height: 110rpx;
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: 32rpx;
font-size: 12px;
text-align: center;
box-shadow: 2px 2px 2px 2px rgba(0, 0, 0, 0.4);
font-family: Arial;
border: 5rpx solid rgba(255, 255, 255, 1);
color: rgba(255, 255, 255, 1);
font-size: 16px;
text-align: center;
font-family: SourceHanSansSC-medium;
}
.main {
position: absolute;
width: 100%;
height: 100%;
padding-top: 208rpx;
box-sizing: border-box;
background-size: contain;
}
.main-bgc {
position: fixed;
top: 334rpx;
width: 100%;
height: 1000rpx;
background-image: url(https://wish-assets.windymuse.com.cn/xy/%E4%BF%A1%E6%9C%AD%E8%83%8C%E6%99%AF.png);
.xxqlcd1{
left: 21px;
}
.main-item {
width: 100%;
height: 120rpx;
display: flex;
align-items: center;
padding: 20rpx 48rpx 20rpx 32rpx;
box-sizing: border-box;
margin-bottom: 32rpx;
.xxqlcd2{
left: 114px;
}
.item-left {
width: 80rpx;
height: 80rpx;
border-radius: 50%;
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4);
.xxqlcd3{
left: 206px;
}
.item-text {
flex: 1;
height: 100%;
}
.item-right {
width: 148rpx;
height: 102rpx;
background-size: contain;
background-image: url(https://wish-assets.windymuse.com.cn/xy/%E4%BF%A1%E5%B0%81.png);
}
.item-text-name {
color: rgba(108, 108, 108, 1);
font-size: 28rpx;
margin-left: 32rpx;
margin-bottom: 10rpx;
}
.item-text-time {
color: rgba(153, 153, 153, 1);
font-size: 24rpx;
margin-left: 32rpx;
}
.delete-btn {
height: 100%;
width: 146rpx;
background-color: #FF562C;
display: flex;
justify-content: center;
align-items: center;
color: #fff;
}
.item-left image {
width: 100%;
height: 100%;
border-radius: 50%;
.xxqlcd4{
left: 299px;
}

@ -0,0 +1,92 @@
// pages/home/xx/hy/index.js
const app = getApp();//新建页面时 默认引入
const req = app.xzjlReq();//初始化一个的request() 实例
Page({
/**
* 页面的初始数据
*/
data: {
},
go2Reback(){
wx.navigateTo({
url: '/pages/home/xx/lindex/lindex'
})
},
go2Xz(){
wx.navigateTo({
url: '/pages/home/xx/hy/xz/zt'
})
},
go2Yx(){
wx.navigateTo({
url: '/pages/home/xx/hy/index'
})
},
go2Hx(){
wx.navigateTo({
url: '/pages/home/xx/hy/hx/hx'
})
},
go2Zt(){
wx.navigateTo({
url: '/pages/home/xx/hy/zt/zt'
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

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

@ -0,0 +1,12 @@
<!--pages/home/xx/hy/xz/zt.wxml-->
<!--返回图标-->
<view class="reback" bindtap="go2Reback"></view>
<view class="title">信札</view>
<!--星讯聊天下方菜单栏-->
<view class="xfgjl" >
<view class="xxqlcd xxqlcd1" bindtap="go2Xz">信札</view>
<view class="xxqlcd xxqlcd2" bindtap="go2Yx">音讯</view>
<view class="xxqlcd xxqlcd3" bindtap="go2Hx">画像</view>
<view class="xxqlcd xxqlcd4" bindtap="go2Zt">纸条</view>
</view>

@ -0,0 +1,66 @@
/* pages/home/xx/hy/index.wxss */
.reback{
position: fixed;
margin-left: 20rpx;
margin-top:108rpx;
width:48rpx;
height:48rpx;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/me/reback.png);
}
.title{
position: fixed;
left: 278rpx;
top: 108rpx;
width: 196rpx;
height: 48rpx;
color: rgba(108, 108, 108, 1);
font-size: 32rpx;
text-align: center;
font-family: SourceHanSansSC-regular;
}
.xfgjl{
position: fixed;
left: 0px;
margin-top: 1416rpx;
width: 750rpx;
height: 87px;
line-height: 20px;
opacity: 0.7;
background-color: rgba(255, 255, 255, 1);
text-align: center;
}
.xxqlcd{
position: absolute;
top: 32rpx;
width: 55px;
height: 55px;
border-radius: 56rpx;
line-height: 110rpx;
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: 2px 2px 2px 2px rgba(0, 0, 0, 0.4);
font-family: Arial;
border: 5rpx solid rgba(255, 255, 255, 1);
color: rgba(255, 255, 255, 1);
font-size: 16px;
text-align: center;
font-family: SourceHanSansSC-medium;
}
.xxqlcd1{
left: 21px;
}
.xxqlcd2{
left: 114px;
}
.xxqlcd3{
left: 206px;
}
.xxqlcd4{
left: 299px;
}

@ -1,140 +0,0 @@
// pages/home/xx/hy/index.js
const app = getApp();//新建页面时 默认引入
const req = app.xzjlReq();//初始化一个的request() 实例
Page({
/**
* 页面的初始数据
*/
data: {
},
go2Reback(){
wx.navigateTo({
url: '/pages/home/xx/lindex/lindex'
})
},
go2Xz(){
wx.navigateTo({
url: '/pages/home/xx/hy/index'
})
},
go2Yx(){
wx.navigateTo({
url: '/pages/home/xx/hy/yx/yx'
})
},
go2Hx(){
wx.navigateTo({
url: '/pages/home/xx/hy/hx/hx'
})
},
go2Zt(){
wx.navigateTo({
url: '/pages/home/xx/hy/zt/zt'
})
},
delLetter(e){
const id = e.target.dataset.id
req.deleteRequest(`/api/user/curt/message/${id}`,{}).then(res => {
console.log(res);
if(res.data.code === 200){
wx.showToast({
title: '删除成功',
})
this.getList()
}
})
},
getList(){
req.getRequest('/api/user/curt/message/lover',{
limit:-1,
type: 'audio'
}).then(res => {
const list = res.data.data.records
list.forEach(item => {
// 将时间字符串转为Date对象
const date = new Date(item.createdAt);
// 获取年月日时分秒
const year = date.getFullYear();
const month = date.getMonth() + 1;
const day = date.getDate();
const hour = date.getHours();
const minute = date.getMinutes();
const second = date.getSeconds();
// 格式化时间
const formattedDate = `${year}${month}${day}${hour}:${minute}`;
item.createdAt = formattedDate
})
console.log(list);
this.setData({list: list})
})
},
getLoveInfo(){
req.getRequest('/api/user/curt/lover',{}).then(res => {
console.log(res);
this.setData({
avatar: res.data.data.avatar,
nick: res.data.data.nick
})
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.getList()
this.getLoveInfo()
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

@ -1,5 +0,0 @@
{
"usingComponents": {
"t-swipe-cell": "tdesign-miniprogram/swipe-cell/swipe-cell"
}
}

@ -1,31 +0,0 @@
<!--pages/home/xx/hy/index.wxml-->
<!--返回图标-->
<view class="reback" bindtap="go2Reback"></view>
<view class="title">音讯</view>
<!-- 中间主体 -->
<view class="main">
<view class="main-bgc" />
<t-swipe-cell wx:for="{{ list }}" wx:key="index">
<view class="main-item">
<view class="item-left"><image src="{{avatar}}" /></view>
<view class="item-text">
<view class="item-text-name">{{nick}}</view>
<view class="item-text-time">{{item.createdAt}}</view>
</view>
<view class="item-right">
<view class="item-right-icon"></view>
<view class="item-right-text">224″</view>
</view>
</view>
<view slot="right" class="delete-btn" bindtap="delLetter" data-id="{{item.id}}">删除</view>
</t-swipe-cell>
</view>
<!--星讯聊天下方菜单栏-->
<view class="xfgjl" >
<view class="xxqlcd xxqlcd1" bindtap="go2Xz">信札</view>
<view class="xxqlcd xxqlcd2" bindtap="go2Yx">音讯</view>
<view class="xxqlcd xxqlcd3" bindtap="go2Hx">画像</view>
<view class="xxqlcd xxqlcd4" bindtap="go2Zt">纸条</view>
</view>

@ -1,136 +0,0 @@
/* pages/home/xx/hy/index.wxss */
.reback{
position: fixed;
margin-left: 20rpx;
margin-top:108rpx;
width:48rpx;
height:48rpx;
background-repeat: no-repeat;
background-size:100% 100%;
z-index: 1;
background-image: url(https://wish-assets.windymuse.com.cn/xy/reback.png);
}
.title{
position: fixed;
left: 278rpx;
top: 108rpx;
width: 196rpx;
height: 48rpx;
color: rgba(108, 108, 108, 1);
font-size: 32rpx;
text-align: center;
z-index: 1;
font-family: SourceHanSansSC-regular;
}
.xfgjl{
position: fixed;
left: 0px;
display: flex;
justify-content: space-evenly;
margin-top: 1416rpx;
width: 750rpx;
height: 174rpx;
line-height: 40rpx;
}
.xxqlcd{
width: 110rpx;
height: 110rpx;
border-radius: 50%;
line-height: 110rpx;
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: 32rpx;
text-align: center;
box-shadow: 2px 2px 2px 2px rgba(0, 0, 0, 0.4);
font-family: Arial;
border: 5rpx solid rgba(255, 255, 255, 1);
color: rgba(255, 255, 255, 1);
text-align: center;
font-family: SourceHanSansSC-medium;
}
.main {
position: absolute;
width: 100%;
height: 100%;
padding-top: 208rpx;
box-sizing: border-box;
background-size: contain;
}
.main-bgc {
position: fixed;
top: 334rpx;
width: 100%;
height: 1000rpx;
background-image: url(https://wish-assets.windymuse.com.cn/xy/%E4%BF%A1%E6%9C%AD%E8%83%8C%E6%99%AF.png);
}
.main-item {
width: 100%;
height: 120rpx;
display: flex;
align-items: center;
padding: 20rpx 48rpx 20rpx 32rpx;
box-sizing: border-box;
margin-bottom: 32rpx;
}
.item-left {
width: 80rpx;
height: 80rpx;
border-radius: 50%;
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4);
}
.item-left image {
width: 100%;
height: 100%;
border-radius: 50%;
}
.item-text {
flex: 1;
height: 100%;
}
.item-right {
width: 148rpx;
height: 102rpx;
border-radius: 20rpx;
padding-left: 46rpx;
box-sizing: border-box;
background-color: rgba(255, 252, 243, 1);
border: 1px solid rgba(239, 239, 239, 1);
}
.item-right-icon {
width: 60rpx;
height: 60rpx;
background-size: contain;
background-image: url(https://wish-assets.windymuse.com.cn/xy/iconPark-voicemail%20Copy%401x.png);
}
.item-text-name {
color: rgba(108, 108, 108, 1);
font-size: 28rpx;
margin-left: 32rpx;
margin-bottom: 10rpx;
}
.item-text-time {
color: rgba(153, 153, 153, 1);
font-size: 24rpx;
margin-left: 32rpx;
}
.delete-btn {
height: 100%;
width: 146rpx;
background-color: #FF562C;
display: flex;
justify-content: center;
align-items: center;
color: #fff;
}

@ -16,12 +16,12 @@ Page({
},
go2Xz(){
wx.navigateTo({
url: '/pages/home/xx/hy/index'
url: '/pages/home/xx/hy/xz/zt'
})
},
go2Yx(){
wx.navigateTo({
url: '/pages/home/xx/hy/yx/yx'
url: '/pages/home/xx/hy/index'
})
},
go2Hx(){
@ -34,56 +34,11 @@ Page({
url: '/pages/home/xx/hy/zt/zt'
})
},
delLetter(e){
const id = e.target.dataset.id
req.deleteRequest(`/api/user/curt/message/${id}`,{}).then(res => {
console.log(res, '删除成功');
this.getList()
})
},
getList(){
req.getRequest('/api/user/curt/message/lover',{
limit:-1,
type: 'text'
}).then(res => {
const list = res.data.data.records
list.forEach(item => {
// 将时间字符串转为Date对象
const date = new Date(item.createdAt);
// 获取年月日时分秒
const year = date.getFullYear();
const month = date.getMonth() + 1;
const day = date.getDate();
const hour = date.getHours();
const minute = date.getMinutes();
const second = date.getSeconds();
// 格式化时间
const formattedDate = `${year}${month}${day}${hour}:${minute}`;
item.createdAt = formattedDate
})
console.log(list);
this.setData({list: list})
})
},
getLoveInfo(){
req.getRequest('/api/user/curt/lover',{}).then(res => {
console.log(res);
this.setData({
avatar: res.data.data.avatar,
nick: res.data.data.nick
})
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.getList()
this.getLoveInfo()
},
/**

@ -1,5 +1,3 @@
{
"usingComponents": {
"t-swipe-cell": "tdesign-miniprogram/swipe-cell/swipe-cell"
}
"usingComponents": {}
}

@ -1,26 +1,8 @@
<!--pages/home/xx/hy/index.wxml-->
<!--pages/home/xx/hy/zt/zt.wxml-->
<!--返回图标-->
<view class="reback" bindtap="go2Reback"></view>
<view class="title">纸条</view>
<!-- 中间主体 -->
<view class="main">
<view class="main-bgc" />
<t-swipe-cell wx:for="{{ list }}" wx:key="index">
<view class="main-item">
<view class="item-left"></view>
<view class="item-text">
<view class="item-text-name">{{nick}}</view>
<view class="item-text-time"> {{ item.createdAt }} </view>
</view>
<view class="item-right">
{{item.content}}
</view>
</view>
<view slot="right" class="delete-btn" bindtap="delLetter" data-id="{{item.id}}">删除</view>
</t-swipe-cell>
</view>
<!--星讯聊天下方菜单栏-->
<view class="xfgjl" >
<view class="xxqlcd xxqlcd1" bindtap="go2Xz">信札</view>

@ -7,8 +7,7 @@
height:48rpx;
background-repeat: no-repeat;
background-size:100% 100%;
z-index: 1;
background-image: url(https://wish-assets.windymuse.com.cn/xy/reback.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/me/reback.png);
}
.title{
@ -20,109 +19,48 @@
color: rgba(108, 108, 108, 1);
font-size: 32rpx;
text-align: center;
z-index: 1;
font-family: SourceHanSansSC-regular;
}
.xfgjl{
position: fixed;
left: 0px;
display: flex;
justify-content: space-evenly;
margin-top: 1416rpx;
width: 750rpx;
height: 174rpx;
line-height: 40rpx;
height: 87px;
line-height: 20px;
opacity: 0.7;
background-color: rgba(255, 255, 255, 1);
text-align: center;
}
.xxqlcd{
width: 110rpx;
height: 110rpx;
border-radius: 50%;
position: absolute;
top: 32rpx;
width: 55px;
height: 55px;
border-radius: 56rpx;
line-height: 110rpx;
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: 32rpx;
font-size: 12px;
text-align: center;
box-shadow: 2px 2px 2px 2px rgba(0, 0, 0, 0.4);
font-family: Arial;
border: 5rpx solid rgba(255, 255, 255, 1);
color: rgba(255, 255, 255, 1);
font-size: 16px;
text-align: center;
font-family: SourceHanSansSC-medium;
}
.main {
position: absolute;
width: 100%;
padding-top: 208rpx;
padding-bottom: 200rpx;
box-sizing: border-box;
background-size: contain;
.xxqlcd1{
left: 21px;
}
.main-bgc {
position: fixed;
top: 334rpx;
width: 100%;
height: 1000rpx;
background-image: url(https://wish-assets.windymuse.com.cn/xy/%E4%BF%A1%E6%9C%AD%E8%83%8C%E6%99%AF.png);
.xxqlcd2{
left: 114px;
}
.main-item {
width: 100%;
height: 120rpx;
display: flex;
align-items: center;
box-sizing: border-box;
margin-bottom: 32rpx;
}
.item-left {
width: 80rpx;
height: 80rpx;
border-radius: 50%;
margin-left: 32rpx;
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4);
.xxqlcd3{
left: 206px;
}
.item-text {
flex: 1;
height: 100%;
margin-top: 48rpx;
}
.item-right {
width: 366rpx;
height: 120rpx;
box-sizing: border-box;
background-size: contain;
color: rgba(51, 51, 51, 1);
font-size: 28rpx;
display: flex;
justify-content: center;
align-items: center;
overflow: hidden;
background-image: url(https://wish-assets.windymuse.com.cn/xy/%E7%BA%B8%E6%9D%A1.png);
}
.item-text-name {
color: rgba(108, 108, 108, 1);
font-size: 28rpx;
margin-left: 32rpx;
margin-bottom: 10rpx;
}
.item-text-time {
color: rgba(153, 153, 153, 1);
font-size: 24rpx;
margin-left: 32rpx;
}
.delete-btn {
height: 100%;
width: 146rpx;
background-color: #FF562C;
display: flex;
justify-content: center;
align-items: center;
color: #fff;
.xxqlcd4{
left: 299px;
}

@ -11,16 +11,9 @@ Page({
messages:[],
loverInfo:{},
hasLover:false,// 是否单身
userInfo:{},
Send:false
userInfo:{}
},
closeSend(){
this.setData({Send: false})
},
openSend(){
this.setData({Send: true})
},
openZtVisible(){/**点击纸条按钮 */
this.setData({ztVisible:true})
@ -122,7 +115,7 @@ Page({
},
toSend(){
wx.navigateTo({
wx.redirectTo({
url: 'xz/xz'
})
}

@ -4,23 +4,5 @@
<view class="fgx"></view>
<view class="xzbtn" bindtap="toSend"></view>
<view class="jbt" ></view>
<view class="jbbtn" bindtap="openSend"></view>
</view>
<!-- 绑定情侣 -->
<view class="openSend" wx:if="{{Send}}">
<view class="openSend-main">
<view class="openSend-main-img">
</view>
<view class="openSend-main-text1">羁绊</view>
<view class="openSend-main-text2">要进行情侣绑定吗?</view>
<view class="openSend-main-text3">需要对方也唤醒了精灵</view>
<view class="openSend-main-text3">才能成功绑定哦~</view>
<view class="openSend-main-text3">点击确认发送邀请绑定链接</view>
<view class="openSend-main-text3">绑定链接有效期24小时</view>
</view>
<view class="openSend-btn">
<view class="btn" bindtap="closeSend">取消</view>
<button open-type="share" class="btn">发送</button>
</view>
<view class="jbbtn"></view>
</view>

@ -8,7 +8,7 @@
height:48rpx;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/reback.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/me/reback.png);
}
.title{
@ -44,7 +44,7 @@ text-align: center;
background-size:100% 100%;
margin-left:29.33rpx;
margin-top: 98rpx;
background-image: url(https://wish-assets.windymuse.com.cn/xy/bkg.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xx/bkg.png);
color:#9A9A9A;
text-align: center;
font-size: 27rpx;
@ -59,7 +59,7 @@ text-align: center;
background-size:100% 100%;
margin-left:146.67rpx;
margin-top: 234rpx;
background-image: url(https://wish-assets.windymuse.com.cn/xy/xzt.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xx/xzt.png);
color:#9A9A9A;
text-align: center;
font-size: 27rpx;
@ -75,7 +75,7 @@ text-align: center;
background-size:100% 100%;
margin-left:146.67rpx;
margin-top: 702rpx;
background-image: url(https://wish-assets.windymuse.com.cn/xy/fgx.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xx/fgx.png);
color:#9A9A9A;
text-align: center;
font-size: 27rpx;
@ -91,7 +91,7 @@ text-align: center;
background-size:100% 100%;
margin-left:228.67rpx;
margin-top: 558.67rpx;
background-image: url(https://wish-assets.windymuse.com.cn/xy/xzbtn.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xx/xzbtn.png);
color:#9A9A9A;
text-align: center;
font-size: 27rpx;
@ -107,7 +107,7 @@ text-align: center;
background-size:100% 100%;
margin-left:228.67rpx;
margin-top: 1108.67rpx;
background-image: url(https://wish-assets.windymuse.com.cn/xy/jbbtn.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xx/jbbtn.png);
color:#9A9A9A;
text-align: center;
font-size: 27rpx;
@ -123,7 +123,7 @@ text-align: center;
background-size:100% 100%;
margin-left:146.67rpx;
margin-top: 784rpx;
background-image: url(https://wish-assets.windymuse.com.cn/xy/jbt.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xx/jbt.png);
color:#9A9A9A;
text-align: center;
font-size: 27rpx;
@ -195,7 +195,7 @@ text-align: center;
top: 50rpx;
width: 30px;
height: 16px;
background-image: url(https://wish-assets.windymuse.com.cn/xy/qlzjt.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xyc/qlzjt.png);
color:#9A9A9A;
text-align: center;
font-size: 27rpx;
@ -283,7 +283,7 @@ font-family: SourceHanSansSC-medium;
top: 287px;
width: 93px;
height: 65px;
background-image: url(https://wish-assets.windymuse.com.cn/xy/%E4%BF%A1%E5%B0%81.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xx/xfpic.png);
}
.tt{
display: inline-block;
@ -307,7 +307,7 @@ font-family: SourceHanSansSC-medium;
width: 180px;
height: 60px;
line-height: 60px;
background-image: url(https://wish-assets.windymuse.com.cn/xy/textpic.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xx/textpic.png);
color: rgba(51, 51, 51, 1);
font-size: 14px;
text-align: left;
@ -357,7 +357,7 @@ font-family: SourceHanSansSC-medium;
top: 6px;
width: 30px;
height: 30px;
background-image: url(https://wish-assets.windymuse.com.cn/xy/yppic.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xx/yppic.png);
}
.dfaudiologotxt{
@ -387,7 +387,7 @@ font-family: SourceHanSansSC-medium;
margin-left: 215px;
width: 93px;
height: 65px;
background-image: url(https://wish-assets.windymuse.com.cn/xy/%E4%BF%A1%E5%B0%81.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xx/xfpic.png);
}
.zjydwd1{
position: absolute;
@ -425,7 +425,7 @@ font-family: SourceHanSansSC-medium;
top: 6px;
width: 30px;
height: 30px;
background-image: url(https://wish-assets.windymuse.com.cn/xy/yppic.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xx/yppic.png);
}
.zjypwz1{
position: absolute;
@ -462,7 +462,7 @@ font-family: SourceHanSansSC-regular;
width: 180px;
height: 60px;
line-height: 60px;
background-image: url(https://wish-assets.windymuse.com.cn/xy/textpic.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xx/textpic.png);
color: rgba(51, 51, 51, 1);
font-size: 14px;
text-align: left;
@ -520,79 +520,3 @@ font-family: SourceHanSansSC-regular;
text-align: center;
font-family: SourceHanSansSC-medium;
}
.openSend {
position: absolute;
width: 100%;
height: 100%;
background-color: rgba(255, 255, 255, 0.9);
}
.openSend-main {
width: 620rpx;
height: 1080rpx;
margin: 0 auto;
margin-top: 188rpx;
padding-top: 110rpx ;
box-sizing: border-box;
background-size: contain;
background-image: url(https://wish-assets.windymuse.com.cn/xy/%E7%BB%91%E5%AE%9A%E6%83%85%E4%BE%A3%E8%83%8C%E6%99%AF.png);
}
.openSend-main-img {
width: 404rpx;
height: 404rpx;
margin: 0 auto;
background-image: url(https://wish-assets.windymuse.com.cn/xy/%E9%92%BB%E7%9F%B3.png);
background-size: contain;
}
.openSend-btn {
width: 100%;
display: flex;
margin-top: 42rpx;
justify-content: space-evenly;
}
.openSend-btn .btn {
width: 210rpx;
height: 70rpx;
border-radius: 20rpx;
background: linear-gradient(233.49deg, rgba(248,99,42,1) 10.48%,rgba(249,135,89,1) 89.2%);
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4);
border: 3px solid rgba(255, 255, 255, 1);
display: flex;
justify-content: center;
align-items: center;
color: #fff;
margin: 0;
box-sizing: border-box;
}
.openSend-main-text1 {
width: 100%;
display: flex;
justify-content: center;
color: rgba(248, 99, 42, 1);
font-size: 24px;
margin-top: 52rpx;
font-weight: 700;
}
.openSend-main-text2 {
color: rgba(108, 108, 108, 1);
font-size: 36rpx;
display: flex;
justify-content: center;
align-items: center;
margin: 42rpx 0;
}
.openSend-main-text3 {
color: rgba(108, 108, 108, 1);
font-size: 24rpx;
display: flex;
justify-content: center;
align-items: center;
margin-top: 20rpx;
}

@ -7,7 +7,6 @@ Page({
* 页面的初始数据
*/
data: {
innerAudioContext:'',
formats: {},
readOnly: false,
placeholder: '开始输入...',
@ -18,13 +17,12 @@ Page({
xinzhaVisible:false,
luYInRes:'',//点击录音弹出的录音资源
RM:'',
xhCstP1:[,,,,,,,,],
xhCstP:[,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,],
timer:null,
minute: 0, // 分
second: 0 , // 秒
millisecond:0,
dsQTime:'00:00:00',
dsQTime:'000000',
luYinStatus:0,//录音状态0代表还没开始1代表进行中2代表录音完毕
delId:'',
luyinVisible:false,
@ -38,45 +36,6 @@ Page({
loverInfo:{},
hasLover:false,// 是否单身
userInfo:{}
},
doLuYINBoF(e){
// 判断点击的是否为对方的语音
if(e.currentTarget.dataset.item){
const id = e.currentTarget.dataset.item.id
console.log(id);
// 改变语音状态
req.patchRequest(`/api/user/curt/message/${id}/read`,{}).then(res => {
console.log(res);
})
}
//先判断是开是关
if(!e.currentTarget.dataset.bf){//此时点击为关闭
//设置当前状态为关闭,并关闭
this.setData({['messages['+e.currentTarget.dataset.index+'].extra.isBf']:false})
this.data.innerAudioContext.stop() // 关闭
}else{//此时点击为开启
// 先设置全部为false
for(var i =0;i<this.data.messages.length;i++){
this.setData({['messages['+i+'].extra.isBf']:false})
}
//先停止
this.data.innerAudioContext.stop()
const innerAudioContext = wx.createInnerAudioContext({
useWebAudioImplement: false
})
this.data.innerAudioContext.src = e.currentTarget.dataset.tp
this.setData({['messages['+e.currentTarget.dataset.index+'].extra.isBf']:true})
this.data.innerAudioContext.play() // 播放
// 此时需要向对应的item赋值
//innerAudioContext.pause() // 暂停
// innerAudioContext.stop() // 停止
this.data.innerAudioContext.onEnded((res)=>{
this.setData({['messages['+e.currentTarget.dataset.index+'].extra.isBf']:false})
})
}
},
//编辑器相关
@ -110,6 +69,7 @@ Page({
format(e) {
let { name, value } = e.target.dataset
if (!name) return
// console.log('format', name, value)
this.editorCtx.format(name, value)
},
@ -180,11 +140,11 @@ Page({
fz = Math.floor(res.duration/(60*1000))
}
if(res.duration>=1000){
mz = Math.floor((res.duration-fz*60*1000)/(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+'\'\''
let ssec = fz+'\''+mz+'\'\''+hm+'\'\'\''
console.log(ssec)
wx.uploadFile({
url: 'https://xzjl-api.windymuse.cn/api/resource',
@ -202,8 +162,7 @@ Page({
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,
isBf:false //正在播放为false
ssec:ssec
}}).then((res)=>{
tt.onLoad()
if(res.data.code==200){
@ -232,6 +191,7 @@ Page({
clearInterval(this.data.timer)
console.log('结束录音')
this.data.RM.pause()
},
doStartLuyin(){
this.setData({RM:wx.getRecorderManager()})
@ -389,10 +349,6 @@ Page({
this.setData({dkTpVisible:true})
console.log(e.currentTarget.dataset.tp)
console.log('查看图片详情')
const id = e.currentTarget.dataset.id
req.patchRequest(`/api/user/curt/message/${id}/read`,{}).then(res => {
console.log(res);
})
},
//bindtap="dKztDetial" data-xq="{{item}}"
dKztDetial(e){/**查看详情 */
@ -446,35 +402,9 @@ Page({
})
},
doMessageInfo(){/**查询聊天信息 */
req.getRequest('/api/user/curt/message/lover',{ limit:-1}).then((res)=>{
req.getRequest('/api/user/curt/message/lover',{}).then((res)=>{
if(res.data.code==200){
const list = res.data.data.records
// 格式化时间
list.forEach(item => {
const date = new Date(item.createdAt)
const year = date.getFullYear()
const month = date.getMonth() + 1
const day = date.getDate()
const hours = date.getHours()
const minutes = date.getMinutes()
item.createdAt = `${year}${month}${day}${hours}:${minutes}`
})
// 塞选出对方的消息
const noSelfList = list.filter(item => {
return !item.isSelf
})
// 文本和图片消息全都改为已读
noSelfList.forEach(item => {
if (item.type === 'text' && item.status === 'unread') {
console.log('发送请求');
req.patchRequest(`/api/user/curt/message/${item.id}/read`,{}).then(res => {
console.log(res);
})
}
})
this.setData({messages:list.reverse()})
this.setData({messages:res.data.data.records.reverse()})
}
}).catch((err)=>{
console.log(err);
@ -555,7 +485,7 @@ Page({
})
},
doClickYx(){
this.setData({luyinVisible:true,luYinStatus:0,dsQTime:'00:00:00'})
this.setData({luyinVisible:true,luYinStatus:0,dsQTime:'000000'})
console.log('点击了音讯')
},
quxiaoLuyin(){/**取消录音 */
@ -582,10 +512,6 @@ Page({
*/
onLoad(options) {
console.log('开始。。。。')
const innerAudioContext = wx.createInnerAudioContext({
useWebAudioImplement: false
})
this.setData({innerAudioContext:innerAudioContext})
this.popover = this.selectComponent('#popover');
console.log('结束。。。。')
this.doQueryInit()
@ -600,12 +526,6 @@ Page({
onReady() {
this.doQueryInit()
this.doMessageInfo()
const time = setInterval(() => {
this.doMessageInfo()
console.log('1111');
}, 2000);
this.setData({time: time})
},
/**
@ -619,8 +539,7 @@ Page({
* 生命周期函数--监听页面隐藏
*/
onHide() {
this.data.innerAudioContext.stop()
clearInterval(this.data.time)
console.log('隐藏了页面')
},
/**
@ -628,7 +547,7 @@ Page({
*/
onUnload() {
clearInterval(this.data.timer)
this.data.innerAudioContext.stop()
console.log('卸载隐藏了页面')
},
/**

@ -1,31 +1,20 @@
<!--pages/home/xx/lindex/lindex.wxml 星讯:非情侣页面-->
<view catchtap="allTap" class="allTap">
<!-- 头部导航 -->
<view class="allTap-header">
<view class="hybtn" bindtap="go2Huiyi">回忆</view>
<view class="reback" bindtap="go2Reback"></view>
<view class="title">星讯</view>
</view>
<view catchtap="allTap">
<!--聊天内容-可以滑动-->
<view class="ltinfo">
<!--聊天页头部:粉色那一部分-->
<view class="bkgfs" id="button">
<!--最上方的两个头像-->
<view class="bkgfs-img">
<t-image class="txl" shape="circle" src="{{userInfo.avatar}}"></t-image><!--当前用户头像-->
<view class="bkgfs-img-middle" />
<t-image class="txr" shape="circle" src="{{loverInfo.avatar}}"></t-image><!--当前用户头像-->
</view>
<view class="bkgfstxt">
<view class="txt"> 欢迎来到你们的专属情侣树洞</view>
<view class="txt"> 在这里你可以将你的心意传递给ta</view>
<view class="txt"> 所有美好的回忆都将被精灵记录</view>
欢迎来到你们的专属情侣树洞
在这里你可以将你的心意传递给ta
所有美好的回忆都将被精灵记录
</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>
<!--聊天内容部分-->
<view class="ltxinxi">
@ -37,152 +26,81 @@
<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="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>
<!--自己的头像框-->
<t-image src="{{userInfo.avatar}}" class="zjtx1" shape="circle" ></t-image>
</view>
<!--发送信件消息-->
<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>
<t-image src="{{userInfo.avatar}}" class="zjtx1" shape="circle" ></t-image><!--自己的头像框-->
</view>
<!--发送音频消息-->
<view class="zjtablea2" wx:if="{{item.type=='audio'}}">
<view class="zjypydwd" >{{item.status=='unread'?'未读':'已读'}}</view>
<view
data-bf="{{!item.extra.isBf}}"
class="zjypk1" wx:if="{{!item.extra.isBf}}"
data-tp="{{'https://xzjl-api.windymuse.cn/api/resource/'+item.resourceId+'?k='+userInfo.id}}"
data-index="{{index}}"
bindtap="doLuYINBoF"
>
<view class="zjypt1"></view>
<view class="zjypwz1">{{item.extra.ssec}}</view>
</view>
<view
data-bf="{{!item.extra.isBf}}"
class="zjypk1" wx:if="{{item.extra.isBf}}"
data-tp="{{'https://xzjl-api.windymuse.cn/api/resource/'+item.resourceId+'?k='+userInfo.id}}"
data-index="{{index}}"
bindtap="doLuYINBoF"
>
<view class="zjypt11">
<view class="box2" style="float: left; height: 60rpx; width: 1000px;">
<image wx:for="{{xhCstP}}" wx:key="index" style="height: 60rpx;width: 60rpx;"
src="https://wish-assets.windymuse.com.cn/xy/yppic.png" mode=""/>
</view>
</view>
<view class="zjypwz1">{{item.extra.ssec}}</view>
</view>
<t-image src="{{userInfo.avatar}}" class="zjtx1" shape="circle" ></t-image><!--自己的头像框-->
<view class="zjypk1"><view class="zjypt1"></view>
<view class="zjypwz1">1111</view>
</view>
<view class="zjypydwd" >{{item.status=='unread'?'未读':'已读'}}</view>
</view>
<!--发送文字消息-->
<view class="zjtable3" wx:if="{{item.type=='text'}}">
<view class="zjtextydwd1">{{item.status=='unread'?'未读':'已读'}}</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>
<t-image src="{{userInfo.avatar}}" class="zjtx1" shape="circle" ></t-image><!--自己的头像框-->
<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}}" >
<!--图片信息-->
<view wx:if="{{item.type=='graphic'}}" class="zjtableatp2">
<view class="zttp12" wx:if="{{item.type=='graphic'}}">
<!--聊天信息-->
<view wx:if="{{item.type=='graphic'}}" class="zjtableatp1">
<t-image src="{{loverInfo.avatar}}" class="wchattxk11" shape="circle" ></t-image><!--对方的的头像框-->
<!-- <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-id="{{item.id}}"
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>
<view class="zttp12" wx:if="{{item.type=='graphic'}}">
<view class="zjxftp3" >
<!-- 文本内容 -->
<view wx:if="{{item.type=='text'}}" class="zjtableatp2">
<view class="zttp12" wx:if="{{item.type=='text'}}">
<t-image src="{{loverInfo.avatar}}" class="wchattxk11" shape="circle" ></t-image><!--对方的的头像框-->
<view bindtap="dKztDetial" data-xq="{{item}}" class="dftext"wx:if="{{item.type=='text'}}">
<view class="xjtext">{{item.content}}</view>
</view>
<view class="zjydwdtp3">{{item.status=='unread'?'未读':'已读'}}</view>
</view>
</view>
<!-- 音频内容 -->
<view wx:if="{{item.type=='audio'}}" class="zjtableatp2">
<view class="zttp12" wx:if="{{item.type=='audio'}}">
<t-image src="{{loverInfo.avatar}}" class="wchattxk11" shape="circle" ></t-image><!--对方的的头像框-->
<view
data-bf="{{!item.extra.isBf}}"
class="zjypk1" wx:if="{{!item.extra.isBf}}"
data-tp="{{'https://xzjl-api.windymuse.cn/api/resource/'+item.resourceId+'?k='+userInfo.id}}"
data-index="{{index}}"
bindtap="doLuYINBoF"
data-item="{{item}}"
>
<view class="zjypt1"></view>
<view class="zjypwz1">{{item.extra.ssec}}</view>
</view>
<view
data-bf="{{!item.extra.isBf}}"
class="zjypk1" wx:if="{{item.extra.isBf}}"
data-tp="{{'https://xzjl-api.windymuse.cn/api/resource/'+item.resourceId+'?k='+userInfo.id}}"
data-index="{{index}}"
bindtap="doLuYINBoF"
data-item="{{item}}"
>
<view class="zjypt11">
<view class="box2" style="float: left; height: 60rpx; width: 1000px;">
<image wx:for="{{xhCstP}}" wx:key="index" style="height: 60rpx;width: 60rpx;"
src="https://wish-assets.windymuse.com.cn/xy/yppic.png" mode=""/>
</view>
</view>
<view class="zjypwz1">{{item.extra.ssec}}</view>
</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 wx:if="{{item.type=='xj'}}" class="zjtableatp2">
<view class="zttp12" wx:if="{{item.type=='xj'}}">
<t-image src="{{loverInfo.avatar}}" class="wchattxk11" shape="circle" ></t-image><!--对方的的头像框-->
<!--信件-->
<view class="dfxf" wx:if="{{item.type=='xj'}}"></view>
<view class="dfxfydwd" wx:if="{{item.type=='xj'}}">{{item.status=='unread'?'未读':'已读'}}</view>
<view class="zjydwdtp3">{{item.status=='unread'?'未读':'已读'}}</view>
</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>
<!--音频-->
<view class="dfaudio" wx:if="{{item.type=='audio'}}">
<view class="dfaudiologo"></view>
<view class="dfaudiologotxt">2222</view></view>
<view class="dftextwd" wx:if="{{item.type=='audio'}}">{{item.status=='unread'?'未读':'已读'}}</view>
</view>
</view>
</view>
<view class="cqlgd"></view>
</view>
</view>
<view class="hybtn" bindtap="go2Huiyi">回忆</view>
<view class="h1"></view>
<!--返回图标-->
<view class="reback" bindtap="go2Reback"></view>
<view class="title">星讯</view>
</view>
<!--星讯聊天下方菜单栏-->
<view class="xfgjl" wx:if="{{hasLover}}">
@ -209,12 +127,11 @@
</t-popup>
<t-popup visible="{{dkTpVisible}}" placement="top" class="ztPop1">
<view class="ztPop1-header">
<view class="reback" bindtap="go2Reback1"></view>
<view class="title">画像</view>
</view>
<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>
@ -238,7 +155,7 @@
<!--轮播图位置-->
<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://wish-assets.windymuse.com.cn/xy/lylbt.png" mode=""/>
<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}}">
@ -257,3 +174,51 @@
<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>

@ -1,150 +1,55 @@
/* pages/home/xx/lindex/lindex.wxss */
/* pages/home/xx/index.wxss */
/* pages/home/xyc/wdyw/wdyw.wxss */
.allTap {
position: relative;
width: 100%;
height: 100%;
}
.allTap-header {
position: fixed;
top: 0;
width: 100%;
height: 166rpx;
padding-bottom: 20rpx;
box-sizing: border-box;
display: flex;
align-items: flex-end;
justify-content: center;
z-index: 1;
background-color: #fff;
}
.reback{
position: fixed;
margin-left: 20rpx;
margin-top:108rpx;
width:48rpx;
height:48rpx;
position: absolute;
left: 20rpx;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/reback.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/me/reback.png);
}
.title{
position: fixed;
left: 278rpx;
top: 108rpx;
width: 196rpx;
height: 48rpx;
color: rgba(108, 108, 108, 1);
font-size: 32rpx;
text-align: center;
font-family: SourceHanSansSC-regular;
}
.hybtn{
position: fixed;
left: 0;
top: 210rpx;
width: 166rpx;
height: 70rpx;
line-height: 70rpx;
opacity: 0.7;
border-radius: 0px 20rpx 20rpx 0px;
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 4rpx 12rpx 0px rgba(0, 0, 0, 0.4);
color: rgba(255, 255, 255, 1);
font-size: 28rpx;
text-align: center;
}
.ltinfo{
width: 100%;
margin-top: 224rpx;
}
.bkgfs{
position: relative;
width: 100%;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
line-height: 40rpx;
border-radius: 30rpx;
text-align: center;
}
.bkgfs-img {
position: absolute;
top: 28rpx;
width: 100%;
display: flex;
justify-content: center;
align-items: center;
}
.bkgfs-img-middle {
width: 60rpx;
height: 32rpx;
margin: 0 30rpx;
background-size: contain;
background-image: url(https://wish-assets.windymuse.com.cn/xy/qlzjt.png);
}
.bkgfstxt{
width: 560rpx;
height: 256rpx;
margin-top: 56rpx;
left: 48px;
top: 70rpx;
width: 279px;
height: 128px;
line-height: 20px;
border-radius: 30rpx;
color: #fff;
font-size: 28rpx;
text-align: center;
padding: 74rpx 56rpx 0 56rpx;
box-sizing: border-box;
border-radius: 15px;
background-color: rgba(253, 190, 196, 1);
text-align: center;
}
.bkgfstxt .txt {
margin-bottom: 14rpx;
}
.txl{
width: 80rpx;
height: 80rpx;
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4);
}
.txr{
width: 80rpx;
height: 80rpx;
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4);
}
.ltxinxi{
width: 100%;
}
.wchatfor{
width: 100%;
padding: 0 64rpx;
box-sizing: border-box;
}
.wchattime{
width: 100%;
margin-top: 32rpx;
color: rgba(153, 153, 153, 1);
font-size: 24rpx;
.bkg{
position: absolute;
width: 691.33rpx;
height: 1326rpx;
display: flex;
flex-direction: column;
background-repeat: no-repeat;
background-size:100% 100%;
margin-left:29.33rpx;
margin-top: 98rpx;
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xx/bkg.png);
color:#9A9A9A;
text-align: center;
font-size: 27rpx;
}
.xzt{
position: absolute;
width: 398rpx;
@ -155,7 +60,7 @@
background-size:100% 100%;
margin-left:146.67rpx;
margin-top: 234rpx;
background-image: url(https://wish-assets.windymuse.com.cn/xy/xzt.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xx/xzt.png);
color:#9A9A9A;
text-align: center;
font-size: 27rpx;
@ -171,7 +76,7 @@
background-size:100% 100%;
margin-left:146.67rpx;
margin-top: 702rpx;
background-image: url(https://wish-assets.windymuse.com.cn/xy/fgx.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xx/fgx.png);
color:#9A9A9A;
text-align: center;
font-size: 27rpx;
@ -187,7 +92,7 @@
background-size:100% 100%;
margin-left:228.67rpx;
margin-top: 558.67rpx;
background-image: url(https://wish-assets.windymuse.com.cn/xy/xzbtn.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xx/xzbtn.png);
color:#9A9A9A;
text-align: center;
font-size: 27rpx;
@ -203,7 +108,7 @@
background-size:100% 100%;
margin-left:228.67rpx;
margin-top: 1108.67rpx;
background-image: url(https://wish-assets.windymuse.com.cn/xy/jbbtn.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xx/jbbtn.png);
color:#9A9A9A;
text-align: center;
font-size: 27rpx;
@ -219,28 +124,101 @@
background-size:100% 100%;
margin-left:146.67rpx;
margin-top: 784rpx;
background-image: url(https://wish-assets.windymuse.com.cn/xy/jbt.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xx/jbt.png);
color:#9A9A9A;
text-align: center;
font-size: 27rpx;
}
.hybtn{
position: fixed;
left: 0px;
top: 104px;
width: 83px;
height: 35px;
line-height: 70rpx;
opacity: 0.7;
border-radius: 0px 10px 10px 0px;
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);
color: rgba(255, 255, 255, 1);
font-size: 14px;
text-align: center;
font-family: SourceHanSansSC-regular;
}
.xfgjl{
position: fixed;
bottom: 30rpx;
left: 0;
width: 100%;
height: 174rpx;
display: flex;
justify-content: space-evenly;
left: 0px;
margin-top: 1416rpx;
width: 750rpx;
height: 87px;
line-height: 20px;
opacity: 0.7;
background-color: rgba(255, 255, 255, 1);
text-align: center;
}
.ltinfo{
position: absolute;
width: 750rpx;
height: 2000rpx;
margin-top:200rpx;
}
.h1{
position: fixed;
left: 0px;
width: 375px;
height: 88px;
line-height: 20px;
background-color: rgba(255, 255, 255, 1);
text-align: center;
}
.txl{
position: absolute;
left: 122px;
top: 30rpx;
width: 36px;
height: 36px;
}
.txr{
position: absolute;
top: 30rpx;
left:434rpx;
width: 36px;
height: 36px;
}
.qlzjt{
position: absolute;
left: 173px;
top: 50rpx;
width: 30px;
height: 16px;
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xyc/qlzjt.png);
color:#9A9A9A;
text-align: center;
font-size: 27rpx;
}
.bkgfstxt{
position: absolute;
left: 28px;
top: 74rpx;
width: 223px;
height: 73px;
color: rgba(255, 255, 255, 1);
font-size: 14px;
text-align: center;
font-family: SourceHanSansSC-regular;
}
.xxqlcd{
/* position: absolute; */
/* top: 32rpx; */
width: 110rpx;
height: 110rpx;
border-radius: 50%;
position: absolute;
top: 32rpx;
width: 55px;
height: 55px;
border-radius: 56rpx;
line-height: 110rpx;
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);
@ -250,8 +228,9 @@
font-family: Arial;
border: 5rpx solid rgba(255, 255, 255, 1);
color: rgba(255, 255, 255, 1);
font-size: 32rpx;
font-size: 16px;
text-align: center;
font-family: SourceHanSansSC-medium;
}
.xxqlcd1{
left: 21px;
@ -266,7 +245,24 @@
left: 299px;
}
.ltxinxi{
position: absolute;
margin-top:360rpx;
width: 750rpx;
}
.wchatfor{
width: 750rpx;
}
.wchattime{
left: 131px;
top: 256px;
width: 750rpx;
height: 28px;
color: rgba(153, 153, 153, 1);
font-size: 12px;
text-align: center;
font-family: SourceHanSansSC-regular;
}
.wchattxk{
display: inline-block;
margin-left: 317px;
@ -288,7 +284,7 @@
top: 287px;
width: 93px;
height: 65px;
background-image: url(https://wish-assets.windymuse.com.cn/xy/%E4%BF%A1%E5%B0%81.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xx/xfpic.png);
}
.tt{
display: inline-block;
@ -312,7 +308,7 @@
width: 180px;
height: 60px;
line-height: 60px;
background-image: url(https://wish-assets.windymuse.com.cn/xy/%E7%BA%B8%E6%9D%A1.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xx/textpic.png);
color: rgba(51, 51, 51, 1);
font-size: 14px;
text-align: left;
@ -362,7 +358,7 @@
top: 6px;
width: 30px;
height: 30px;
background-image: url(https://wish-assets.windymuse.com.cn/xy/yppic.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xx/yppic.png);
}
.dfaudiologotxt{
@ -377,21 +373,22 @@
font-family: SourceHanSansSC-regular;
}
.zjtablea1{
width: 100%;
width: 750rpx;
height: 176rpx;
}
.zjtx1{
width: 84rpx;
height: 84rpx;
margin-left: 24rpx;
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4);
position: absolute;
margin-left: 317px;
margin-top: 19rpx;
width: 36px;
height: 36px;
}
.zjxf1{
position: absolute;
margin-left: 215px;
width: 93px;
height: 65px;
background-image: url(https://wish-assets.windymuse.com.cn/xy/%E4%BF%A1%E5%B0%81.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xx/xfpic.png);
}
.zjydwd1{
position: absolute;
@ -405,80 +402,86 @@
font-family: SourceHanSansSC-regular;
}
.zjtablea2{
width: 100%;
width: 750rpx;
height:134rpx;
display: flex;
align-items: center;
justify-content: flex-end;
}
.zjypk1{
width: 300rpx;
height: 84rpx;
padding-left: 32rpx;
box-sizing: border-box;
display: flex;
align-items: center;
border-radius: 20rpx;
position: absolute;
left: 160px;
margin-top: 7px;
width: 150px;
height: 42px;
line-height: 20px;
border-radius: 10px;
background-color: rgba(255, 255, 255, 1);
color: rgba(16, 16, 16, 1);
font-size: 28rpx;
font-size: 14px;
text-align: center;
font-family: Arial;
border: 1px solid rgba(239, 239, 239, 1);
}
.zjypt1{
width: 60rpx;
height: 60rpx;
margin-right: 20rpx;
background-size: cover;
background-image: url(https://wish-assets.windymuse.com.cn/xy/yppic.png);
}
.zjypt11{
width: 60rpx;
height: 60rpx;
margin-right: 20rpx;
overflow: hidden;
position: absolute;
left: 16px;
top: 6px;
width: 30px;
height: 30px;
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xx/yppic.png);
}
.zjypwz1{
position: absolute;
left: 56px;
top: 24rpx;
width: 45px;
height: 18px;
color: rgba(154, 154, 154, 1);
font-size: 24rpx;
font-size: 12px;
text-align: left;
font-family: SourceHanSansSC-regular;
}
.zjypydwd{
height: 100%;
padding: 0 20rpx 20rpx 0;
box-sizing: border-box;
position: absolute;
margin-left: 250rpx;
margin-top: 30px;
width: 28px;
height: 20px;
color: rgba(206, 206, 206, 1);
font-size: 24rpx;
display: flex;
align-items: flex-end;
font-size: 12px;
text-align: left;
font-family: SourceHanSansSC-regular;
}
.zjtable3{
width: 100%;
width: 750rpx;
height: 150rpx;
display: flex;
align-items: center;
justify-content: flex-end;
}
.zjxxbox1{
width: 360rpx;
height: 120rpx;
position: absolute;
margin-left: 260rpx;
width: 180px;
height: 60px;
line-height: 60px;
background-size: contain;
background-image: url(https://wish-assets.windymuse.com.cn/xy/%E7%BA%B8%E6%9D%A1.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xx/textpic.png);
color: rgba(51, 51, 51, 1);
font-size: 14px;
text-align: left;
font-family: SourceHanSansSC-regular;
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
}
.zjtextydwd1{
height: 100%;
display: flex;
align-items: flex-end;
position: absolute;
margin-left: 210rpx;
margin-top: 30px;
width: 28px;
height: 20px;
color: rgba(206, 206, 206, 1);
font-size: 24rpx;
margin: 0 10rpx 60rpx 0;
font-size: 12px;
text-align: left;
font-family: SourceHanSansSC-regular;
}
.zjtextcontent{
@ -508,7 +511,7 @@
top: 111px;
width: 298px;
height: 542px;
background-image: url(https://wish-assets.windymuse.com.cn/xy/ztbkg11.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xx/ztbkg11.png);
}
.btn1{
@ -559,7 +562,7 @@ top: 568px;
.cqlgd{
width: 750rpx;
height: 280rpx;
height: 530rpx;
}
.fhan11{
border-radius: 58rpx;
@ -583,30 +586,15 @@ border: 3px solid rgba(255, 255, 255, 1);
top: 562px;
width: 30px;
height: 30px;
background-image: url(https://wish-assets.windymuse.com.cn/xy/xtreturn.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xx/xtreturn.png);
}
.t-textarea{
background-color: transparent!important;
}
.zjtableatp1{
width: 100%;
width: 750rpx;
height: 220rpx;
padding: 0 32rpx;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: flex-end;
}
.zjtableatp2{
width: 100%;
height: 150rpx;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: flex-start;
}
.zjxftp1{
float: right;
margin-right:130rpx;
@ -627,11 +615,14 @@ background-image: url(https://wish-assets.windymuse.com.cn/xy/xtreturn.png);
}
.zjydwdtp2{
height: 100%;
display: inline-block;
margin-top: 50px;
width: 28px;
height: 20px;
color: rgba(206, 206, 206, 1);
font-size: 24rpx;
display: flex;
align-items: flex-end;
font-size: 12px;
text-align: left;
font-family: SourceHanSansSC-regular;
}
.zjxftp2{
display: inline-block;
@ -641,41 +632,38 @@ background-image: url(https://wish-assets.windymuse.com.cn/xy/xtreturn.png);
max-width: 500rpx;
}
.zttp11{
/* margin-right: 130rpx; */
height: 200rpx;
flex: 1;
display: flex;
justify-content: flex-end;
}
.zttp11 .t-image{
height: 200rpx;
max-width: 440rpx;
float: right;
margin-right: 130rpx;
}
.zttp12{
width: 100%;
height: 100%;
display: flex;
align-items: center;
float: left;
margin-left: 10rpx;
}
.zjydwdtp3{
height: 100%;
display: flex;
align-items: flex-end;
display: inline-block;
margin-top: 80px;
margin-left: 10rpx;
width: 28px;
height: 20px;
color: rgba(206, 206, 206, 1);
font-size: 24rpx;
margin: 0 0 60rpx 10rpx;
font-size: 12px;
text-align: left;
font-family: SourceHanSansSC-regular;
}
.zjxftp3{
display: inline-block;
margin-left:10rpx;
height: 200rpx;
max-width: 480rpx;
background-repeat: no-repeat;
max-width: 500rpx;
}
.wchattxk11{
width: 84rpx;
height: 84rpx;
margin-right: 24rpx;
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4);
float: left;
margin-left: 19px;
margin-top: 7rpx;
width: 36px;
height: 36px;
background-color: chartreuse;
}
.tppp1{
@ -686,7 +674,7 @@ background-image: url(https://wish-assets.windymuse.com.cn/xy/xtreturn.png);
margin-top: 300rpx;
}
.ztPop1{
position: relative;
position: absolute;
width:750rpx ;
height: 1624rpx;
margin: 0!important;
@ -694,31 +682,20 @@ background-image: url(https://wish-assets.windymuse.com.cn/xy/xtreturn.png);
display: table-cell;
vertical-align: middle;
}
.ztPop1-header {
width: 100%;
margin-top: 88rpx;
padding: 20rpx;
box-sizing: border-box;
display: flex;
justify-content: center;
}
.tpBcan1{
position: absolute;
top: 1400rpx;
right: 32rpx;
width: 110rpx;
height: 70rpx;
left: 304px;
top: 727px;
width: 55px;
height: 35px;
line-height: 70rpx;
border-radius: 20rpx;
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: 28rpx;
font-size: 14px;
text-align: center;
font-family: SourceHanSansSC-medium;
}
@ -745,6 +722,13 @@ background-image: url(https://wish-assets.windymuse.com.cn/xy/xtreturn.png);
height: 116rpx;
}
.title {
flex: 1;
text-align: center;
font-weight: 600;
font-size: 36rpx;
}
.btn {
font-size: 32rpx;
padding: 32rpx;
@ -778,22 +762,23 @@ background-image: url(https://wish-assets.windymuse.com.cn/xy/xtreturn.png);
}
.qxly{
position: absolute;
left: 32rpx;
left: 16px;
top: 12rpx;
width: 64rpx;
height: 50rpx;
width: 32px;
height: 25px;
color: rgba(108, 108, 108, 1);
font-size: 32rpx;
font-size: 16px;
text-align: left;
font-family: SourceHanSansSC-regular;
}
.qrfs{
position: absolute;
left: 650rpx;
left: 325px;
top: 12rpx;
width: 64rpx;
height: 50rpx;
font-size: 32rpx;
width: 32px;
height: 25px;
font-size: 16px;
text-align: left;
font-family: SourceHanSansSC-regular;
}
@ -807,32 +792,31 @@ background-image: url(https://wish-assets.windymuse.com.cn/xy/xtreturn.png);
position: absolute;
left: 0px;
top: 72rpx;
width: 100%;
width: 375px;
height: NaNpx;
border: 1px solid rgba(233, 233, 232, 1);
}
.luyinjishiqi{
position: absolute;
left: 286rpx;
left: 143px;
top: 114rpx;
width: 180rpx;
height: 44rpx;
width: 89px;
height: 22px;
color: rgba(108, 108, 108, 1);
font-size: 32rpx;
font-size: 16px;
text-align: center;
font-family: SourceHanSansSC-regular;
}
.weiluyinanniu{
position: absolute;
left: 316rpx;
left: 158px;
top: 300rpx;
width: 120rpx;
height: 120rpx;
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
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);
}
@ -840,8 +824,8 @@ background-image: url(https://wish-assets.windymuse.com.cn/xy/xtreturn.png);
position: absolute;
left: 15rpx;
top: 15rpx;
width: 90rpx;
height: 90rpx;
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%);
@ -854,6 +838,7 @@ background-image: url(https://wish-assets.windymuse.com.cn/xy/xtreturn.png);
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; */
}
@ -881,27 +866,28 @@ background-image: url(https://wish-assets.windymuse.com.cn/xy/xtreturn.png);
} */
.wlyan2{
position: absolute;
left: 30rpx;
top: 30rpx;
width: 60rpx;
height: 60rpx;
left: 15px;
top: 15px;
width: 30px;
height: 30px;
line-height: 17px;
border-radius: 10rpx;
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;
position: absolute;
left: 40rpx;
top: 20rpx; */
width: 70rpx;
height: 70rpx;
/* border-top: 50rpx solid transparent;
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; */
background-size: cover;
background-image: url(https://wish-assets.windymuse.com.cn/xy/if-ui-play%20Copy%401x.png);
border-bottom: 35rpx solid transparent;
}
.luyinlbt1{
position: absolute;
@ -909,7 +895,7 @@ background-image: url(https://wish-assets.windymuse.com.cn/xy/xtreturn.png);
height: 50rpx;
top:198rpx;
overflow: hidden;
background-image: url(https://wish-assets.windymuse.com.cn/xy/lylbt.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xx/lylbt.png);
}
.xiexinzha{
@ -958,7 +944,7 @@ border: 3px solid rgba(255, 255, 255, 1);
top: 52px;
width: 345px;
height: 115px;
background-image: url(https://wish-assets.windymuse.com.cn/xy/xzhlpic.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xx/xzhlpic.png);
}
.xfxfhl{
@ -968,7 +954,7 @@ border: 3px solid rgba(255, 255, 255, 1);
top: 331px;
width: 375px;
height: 462px;
background-image: url(https://wish-assets.windymuse.com.cn/xy/xfxfhlpic.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xx/xfxfhlpic.png);
}
.xzxfnr{
position: absolute;
@ -977,7 +963,7 @@ border: 3px solid rgba(255, 255, 255, 1);
width: 315px;
height: 657px;
overflow: auto;
background-image: url(https://wish-assets.windymuse.com.cn/xy/xznrpic.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xx/xznrpic.png);
}
.xfzjhz{
position: absolute;
@ -985,7 +971,7 @@ border: 3px solid rgba(255, 255, 255, 1);
top: 482rpx;
width: 73px;
height: 71px;
background-image: url(https://wish-assets.windymuse.com.cn/xy/%E5%8D%B0%E7%AB%A0.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xx/xfzjhzpic.png);
}
.xzfhan{
@ -1026,7 +1012,7 @@ border: 3px solid rgba(255, 255, 255, 1);
top: 24rpx;
width: 30px;
height: 30px;
background-image: url(https://wish-assets.windymuse.com.cn/xy/xtreturn.png);
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xx/xtreturn.png);
}
.xzxjto{
margin-left: 50rpx;

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

@ -1,391 +1,115 @@
// pages/home/xx/xz/xz.js
const app = getApp();//新建页面时 默认引入
const req = app.xzjlReq();//初始化一个的request() 实例
Page({
/**
* 页面的初始数据
*/
data: {
to:'',
from:'',
content:'',
audioList:[], // 音频列表
imgList:[], // 图片列表
sound:'',
soundTime:'00:00:00',
duration: '',
minute:0, //分
second:0, //秒
millisecond:0, //毫秒
showBtn:true,
showImgBig:false, //图片太大弹层
showSoundMore:false, //语音太多提示
showSend:false, //寄出提示
Preview:false, //预览
showSound:false,
showAlready:false,
showImgToast:false,
showImgToastBig:false,
btn1:true,
btn2:false,
btn3:false,
btn4:false,
showSoundImg:true,
isPlaying: false, // 是否正在播放语音
},
already(){
console.log('确定寄出');
this.setData({showAlready:true})
const list = [ ...this.data.audioList, ...this.data.imgList]
list.push({
type: 'text',
content: this.data.content
formats: {},
readOnly: false,
placeholder: '开始输入...',
editorHeight: 300,
keyboardHeight: 0,
isIOS: false
},
readOnlyChange() {
this.setData({
readOnly: !this.data.readOnly
})
const fromData = {
from: this.data.from,
to: this.data.to,
messageList: list,
status:'unread'
},
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()
}
console.log(fromData);
// 修改信札
req.putRequest('/api/user/curt/letter',fromData).then(res => {
console.log(res,'修改信札内容成功');
// 修改状态
req.patchRequest('/api/user/curt/letter/send',{}).then(res => {
console.log(res,'信札状态修改成功');
})
}, duration)
})
},
closeShowImgBig(){
this.setData({showImgBig:false})
},
closeShowSoundMore(){
this.setData({showSoundMore:false})
updatePosition(keyboardHeight) {
const toolbarHeight = 50
const { windowHeight, platform } = wx.getSystemInfoSync()
let editorHeight = keyboardHeight > 0 ? (windowHeight - keyboardHeight - toolbarHeight) : windowHeight
this.setData({ editorHeight, keyboardHeight })
},
openShowSend(){
this.setData({showSend:true})
calNavigationBarAndStatusBar() {
const systemInfo = wx.getSystemInfoSync()
const { statusBarHeight, platform } = systemInfo
const isIOS = platform === 'ios'
const navigationBarHeight = isIOS ? 44 : 48
return statusBarHeight + navigationBarHeight
},
closeShowSend(){
this.setData({showSend:false})
onEditorReady() {
const that = this
wx.createSelectorQuery().select('#editor').context(function (res) {
that.editorCtx = res.context
}).exec()
},
closeShowImgToast(){this.setData({showImgToast: false})},
openPreview(){
console.log('预览');
this.setData({Preview:true})
blur() {
this.editorCtx.blur()
},
ClearYl(e){
console.log('清除语音');
const id = e.currentTarget.dataset.id
const list = this.data.audioList.filter(item => {
return item.resourceId !== id
})
this.setData({audioList: list})
},
ClearImg(e){
console.log('清除图片');
const id = e.currentTarget.dataset.id
const list = this.data.imgList.filter(item => {
return item.resourceId !== id
})
this.setData({imgList: list})
format(e) {
let { name, value } = e.target.dataset
if (!name) return
// console.log('format', name, value)
this.editorCtx.format(name, value)
},
goBack(){
if (this.data.Preview) {
this.setData({Preview: false})
}else{
console.log('返回');
wx.navigateBack()
}
onStatusChange(e) {
const formats = e.detail
this.setData({ formats })
},
// 上传图片
addImg(){
console.log('添加图片');
wx.chooseMedia({
mediaType: 'image',
success: (res) => {
const files = res.tempFiles[0]
if(files.size > 5 * 1024 * 1024 ){
this.setData({showImgBig:true})
}
this.uploadFile(res.tempFiles[0].tempFilePath,'poster')
insertDivider() {
this.editorCtx.insertDivider({
success: function () {
console.log('insert divider success')
}
})
},
// 文件上传
uploadFile(file,type) {
wx.uploadFile({
url: 'https://xzjl-api.windymuse.cn/api/resource',
filePath: file,
name: 'file',
header: {
'Authorization': wx.getStorageSync('token'),
'Content-Type': 'multipart/form-data'
},
formData: {
type: type
},
success: (async(res) => {
const data = JSON.parse(res.data);
console.log(data);
if (data.data.type === 'audio') {
console.log('添加音频');
const list = this.data.audioList
if(list.length >= 3){
this.setData({showSoundMore:true ,showSoundImg:true})
console.log('语音太多了');
}else {
list.push({
type: 'audio',
resourceId: data.data.id,
duration: this.data.duration,
videoSrc: this.data.videoSrc,
extra: {duration : this.data.ssec}
})
this.setData({audioList: list})
clear() {
this.editorCtx.clear({
success: function (res) {
console.log("clear success")
}
} else if (data.data.type === 'poster') {
console.log('添加图片');
const list = this.data.imgList
if (list.length >= 9) {
this.setData({showImgToast : true})
}else {
list.push({
type: 'graphic',
resourceId: data.data.id,
img: data.data.abUrl,
})
this.setData({imgList: list, showImg:true})
}
}
}),
fail(res) {
console.log('上传失败');
}
});
},
openSound(){
console.log('添加声音');
this.setData({showSound:true})
removeFormat() {
this.editorCtx.removeFormat()
},
closeSound(){
console.log('退出');
this.setData({
showSound:false,
btn1: true,
btn2: false,
btn3: false,
btn4: false,
soundTime: '00:00:00',
showSoundImg: true,
minute:0,
second:0,
millisecond:0
})
clearInterval(this.data.timeOut)
},
startSound(){
console.log('开始录音');
this.setData({btn1: false, btn2: true, showSoundImg: false})
let option = {
duration:10000, //录音的时长之前最大值好像只有1分钟现在最长可以录音10分钟
format:'mp3', //录音的格式有aac和mp3两种
}
wx.getRecorderManager().start(option)
// 开启定时器
this.data.timeOut = setInterval(this.counter,50)
},
// 计时器
counter(){
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 })
}else if(second >= 60) {
this.setData({second: 0, minute: minute + 1})
}else if(minute === 3) {
this.second({soundTime: '03:00:00'})
clearInterval(this.data.timeOut)
}
let time = '0' + minute
if (second < 10) {
time = time + ':0' + second
}else {
time = time + ':' + second
}
if (millisecond < 10){
time = time + ':0' + millisecond
} else {
time = time + ':' + millisecond
}
let ssec = minute + '\''
if (second < 10) {
ssec = ssec + '0' + second + '\'\''
}else {
ssec = ssec + second
}
this.setData({
soundTime: time,
ssec: ssec
})
},
endSound(){
console.log('结束录音');
wx.getRecorderManager().stop()
wx.getRecorderManager().onStop((res) => {
console.log(res,'这里');
const innerAudioContext = wx.createInnerAudioContext()
innerAudioContext.src = res.tempFilePath
this.setData({
innerAudioContext: innerAudioContext,
videoSrc:res.tempFilePath
})
insertDate() {
const date = new Date()
const formatDate = `${date.getFullYear()}/${date.getMonth() + 1}/${date.getDate()}`
this.editorCtx.insertText({
text: formatDate
})
clearInterval(this.data.timeOut)
this.setData({btn2:false, btn3:true, showSoundImg:true})
},
playVoice(){
console.log('播放录音');
this.data.innerAudioContext.play()
this.setData({btn3: false ,btn4: true})
},
stopVoice(){
console.log('停止播放录音');
this.data.innerAudioContext.stop()
this.setData({btn3: true ,btn4: false})
insertImage() {
const that = this
wx.chooseImage({
count: 1,
success: function (res) {
that.editorCtx.insertImage({
src: res.tempFilePaths[0],
data: {
id: 'abcd',
role: 'god'
},
addSound(){
if(this.data.btn3){
console.log('添加录音');
console.log(this.data.soundTime);
this.setData({duration: this.data.soundTime})
// 上传语音
this.uploadFile(this.data.videoSrc,'audio')
clearInterval(this.data.timeOut)
this.setData({
btn1:true,
btn2:false,
btn3:false,
btn4:false,
showLtqp: true,
showSound: false,
minute:0,
second:0,
millisecond:0,
soundTime:'00:00:00'
})
width: '100%',
success: function () {
console.log('insert image success')
}
},
logout(){
req.deleteRequest('/api/user/logout',{}).then((res)=>{
if(res.data.code===200){
wx.navigateTo({
url: '/pages/index/index'
})
wx.showToast({
title:'寄出成功'
})
}
})
},
modify(){
this.setData({showAlready: false, showSend: false})
},
getLetter(){
console.log('获取当前用户信札内容');
req.getRequest('/api/user/curt/letter',{}).then(res => {
console.log(res);
})
},
// 点击音频试听
listen(e){
if (this.data.isPlaying) {
return; // 如果正在播放语音,则不触发事件
}
const id = e.currentTarget.dataset.url.resourceId
const videoSrc = this.data.audioList.find(item => {
return item.resourceId === id
}).videoSrc
console.log(videoSrc);
const innerAudioContext = wx.createInnerAudioContext()
innerAudioContext.src = videoSrc
innerAudioContext.play() // 播放
this.setData({ isPlaying: true }); // 设置为正在播放语音
innerAudioContext.onEnded(() => {
this.setData({ isPlaying: false }); // 播放完毕后设置为非播放状态
});
},
getUserInfo(){
req.getRequest('/api/user/curt',{}).then(res => {
const id = res.data.data.id
this.setData({id:id})
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.getLetter()
this.getUserInfo()
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

@ -1,7 +1,7 @@
{
"navigationBarTitleText": "发表文章",
"disableScroll": true,
"usingComponents": {
"t-icon": "tdesign-miniprogram/icon/icon",
"t-textarea": "tdesign-miniprogram/textarea/textarea",
"t-input": "tdesign-miniprogram/input/input"
}
}

@ -1,134 +1,36 @@
<!--pages/home/xx/xz/xz.wxml-->
<view class="bgt1"></view>
<view class="xinfo">
<scroll-view scroll-y enhanced="{{true}}" show-scrollbar="{{false}}" class="xinfo-content">
<view class="xinfo-yl-title" wx:if="{{Preview}}">
To: {{to}}
</view>
<view class="xinfo-title" wx:if="{{!Preview}}">
<view class="title-to">
<view class="text">To:</view>
<t-input model:value="{{to}}" />
</view>
<view class="title-form">
<view class="text">From:</view>
<t-input model:value="{{from}}"/>
</view>
</view>
<!-- 信件文本 -->
<view class="xinfo-main">
<t-textarea autosize="true" model:value="{{content}}" placeholder="信件正文" />
</view>
<!-- 信件语音 -->
<view class="{{Preview ? 'xinfo-ltqp-yl' : 'xinfo-ltqp'}}" wx:for="{{audioList}}" wx:key="index" bindtap="listen" data-url="{{item}}">
<image class="xinfo-yuying" src="https://wish-assets.windymuse.com.cn/xy/%E8%AF%AD%E9%9F%B3.png"></image>
<view class="xinfo-ltqp-text">{{item.extra.duration}}</view>
<t-icon class="xinfo-close" name="close-circle" size="48rpx" wx:if="{{!Preview}}" bindtap="ClearYl" data-id="{{item.resourceId}}"/>
</view>
<!-- 信件图片 -->
<view class="{{Preview ? 'xinfo-img-yl' : 'xinfo-img'}}" wx:for="{{imgList}}" wx:key="index">
<image src="{{item.img}}" mode="widthFix"></image>
<view class="xinfo-img-close" bindtap="ClearImg" data-id="{{item.resourceId}}">
<t-icon name="close-circle" size="48rpx" wx:if="{{!Preview}}"/>
</view>
</view>
<view class="xinfo-yl-form" wx:if="{{Preview}}">
From: {{from}}
</view>
<view class="xinfo-yl" wx:if="{{Preview}}"></view>
</scroll-view>
</view>
<view class="bgt2" wx:if="{{showBtn}}">
<view class="bgt2-btn1" bindtap="goBack">
<image src="https://wish-assets.windymuse.com.cn/xy/iconPark-return%401x.png"></image>
</view>
<view class="bgt2-btn2" bindtap="openSound" wx:if="{{!Preview}}">音讯</view>
<view class="bgt2-btn3" bindtap="addImg" wx:if="{{!Preview}}">画像</view>
<view class="bgt2-btn4" bindtap="openPreview" wx:if="{{!Preview}}">预览</view>
<view class="bgt2-btn5" bindtap="openShowSend" wx:if="{{!Preview}}">寄出</view>
<view class="bgt2-yz"></view>
</view>
<view class="taost" wx:if="{{showImgBig}}">
<view class="taost-box">
<view class="taost-box-text">图片太大了</view>
<view class="taost-box-text">请上传5M以内的图片</view>
<view class="taost-box-btn" bindtap="closeShowImgBig">好的</view>
</view>
</view>
<view class="sound" wx:if="{{showSound}}">
<view class="sound-box">
<view class="sound-box-top">
<view bindtap="closeSound">取消</view>
<view bindtap="addSound">添加</view>
</view>
<view class="sound-box-time">{{soundTime}}</view>
<view class="sound-box-img" wx:if="{{showSoundImg}}"></view>
<view class="sound-box-img2" wx:if="{{!showSoundImg}}">
<image wx:for="{{35}}" wx:key="index" src="https://wish-assets.windymuse.com.cn/xy/iconPark-acoustic%20Copy%203%401x.png"/>
</view>
<view class="sound-box-btn">
<view class="btn1" wx:if="{{btn1}}" bindtap="startSound">
<view class="btn-being"></view>
</view>
<view class="btn1" wx:if="{{btn2}}" bindtap="endSound">
<view class="btn-have"></view>
</view>
<view class="btn1" wx:if="{{btn3}}" bindtap="playVoice">
<view class="btn-over"></view>
</view>
<view class="btn1" wx:if="{{btn4}}" bindtap="stopVoice">
<view class="btn-video"></view>
</view>
</view>
</view>
</view>
<view class="taost" wx:if="{{showSoundMore}}">
<view class="taost-box">
<view class="taost-box-text">最多只能添加</view>
<view class="taost-box-text">3条语言</view>
<view class="taost-box-btn" bindtap="closeShowSoundMore">好的</view>
</view>
</view>
<view class="taost" wx:if="{{showImgToast}}">
<view class="taost-box">
<view class="taost-box-text">最多只能上传</view>
<view class="taost-box-text">9张图片</view>
<view class="taost-box-btn" bindtap="closeShowImgToast">好的</view>
</view>
</view>
<view class="taost" wx:if="{{showSend}}">
<view class="taost-box">
<view class="taost-box-text">确定要寄出吗?</view>
<view class="taost-box-text">信件寄出后,再次使用晶石激活</view>
<view class="taost-box-text">将直接提示打开信件</view>
<view class="Send-btn">
<view class="taost-box-btn" bindtap="closeShowSend">取消</view>
<view class="taost-box-btn" bindtap="already">确定</view>
</view>
</view>
</view>
<view class="already" wx:if="{{showAlready}}">
<view class="already-top"></view>
<view class="already-img"></view>
<view class="already-text">
<view class="already-text1">你的信件已打包好!</view>
<view class="already-text1">快把晶石送给收信人吧!</view>
<view class="already-text3">收信人首次将晶石贴近手机</view>
<view class="already-text2">将会提示打开信件</view>
<view class="already-text2">点击OK回到未激活初始页面</view>
<view class="already-text2">如果误打开信件,需要再次寄出哦!</view>
<view class="already-btn">
<view class="btn" bindtap="modify">修改</view>
<view class="btn" bindtap="logout">OK</view>
</view>
</view>
<view class="already-bom"></view>
<!--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>

@ -1,605 +1,159 @@
/* pages/home/xx/xz/xz.wxss */
page {
height: 100%;
overflow: hidden;
}
/* pages/home/xx/lindex/lxz/lxz.wxss */
@import "./common/lib/weui.wxss";
@import "./assets/iconfont.wxss"
.bgt1{
.container {
position: absolute;
width: 690rpx;
height: 227.33rpx;
display: flex;
flex-direction: column;
background-repeat: no-repeat;
background-size:100% 100%;
margin-left:30rpx;
margin-top: 104.67rpx;
background-image: url(https://wish-assets.windymuse.com.cn/xy/bgt1.png);
color:#9A9A9A;
text-align: center;
font-size: 27rpx;
top: 0;
left: 0;
width: 100%;
}
.bgt2{
position: absolute;
width: 750rpx;
height: 1081.33rpx;
display: flex;
flex-direction: column;
background-repeat: no-repeat;
background-size:100% 100%;
margin-top: 608.67rpx;
background-image: url(https://wish-assets.windymuse.com.cn/xy/bgt2.png);
color:#9A9A9A;
text-align: center;
font-size: 27rpx;
pointer-events: none;
.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);
}
.xinfo{
background-color: #FFFCF3;
.xzxfnr{
position: absolute;
width: 616rpx;
height: 1242rpx;
display: flex;
flex-direction: column;
background-repeat: no-repeat;
background-size:100% 100%;
margin-top: 132rpx;
margin-left: 66rpx;
border-radius: 6rpx;
overflow: hidden;
}
.xinfo-content {
width: 100%;
height: 100%;
padding-bottom: 100rpx;
box-sizing: border-box;
left: 31px;
top: 64px;
width: 315px;
height: 657px;
overflow: auto;
position: relative;
pointer-events: auto;
}
.xinfo-yl {
width: 100%;
height: 200rpx;
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xx/xznrpic.png);
}
.xinfo-title {
width: 100%;
height: 100rpx;
margin-top: 60rpx;
padding-left: 64rpx;
.ql-container {
box-sizing: border-box;
font-size: 28rpx;
color: rgba(108, 108, 108, 1);
}
.xinfo-yl-title {
margin: 60rpx 0 0 50rpx;
font-size: 32rpx;
color: rgba(108, 108, 108, 1);
}
.xinfo-yl-form {
width: 100%;
text-align: end;
margin-top: 30rpx;
padding-right: 64rpx;
box-sizing: border-box;
font-size: 32rpx;
color: rgba(108, 108, 108, 1);
}
.title-to {
display: flex;
margin-bottom: 10rpx;
width: 200rpx;
}
.title-to .text {
padding-top: 14rpx;
margin-right: 20rpx;
}
.title-to .t-input {
padding: 0;
height: 46rpx;
background-color: rgba(0, 0, 0, 0);
border-bottom: 1px solid #444444;
}
.title-form {
display: flex;
width: 250rpx;
width: 264px;
margin-left: 52rpx;
height: 100%;
font-size: 16px;
line-height: 1.5;
overflow: auto;
padding: 10px 10px 20px 10px;
}
.title-form .t-input {
padding: 0;
height: 46rpx;
background-color: rgba(0, 0, 0, 0);
border-bottom: 1px solid #444444;
.ql-active {
color: #22C704;
}
.title-form .text {
padding-top: 14rpx;
margin-right: 20rpx;
.iconfont {
display: inline-block;
width: 30px;
height: 30px;
cursor: pointer;
font-size: 20px;
}
.xinfo-main {
width: 100%;
margin: 60rpx 0 32rpx 0;
padding: 0 64rpx;
.toolbar {
box-sizing: border-box;
}
textarea {
height: none;
}
.xinfo-main .t-textarea {
padding: 0 10px;
height: 50px;
width: 100%;
padding: 0;
font-size: 28rpx;
background-color: rgba(0, 0, 0, 0);
}
.t-textarea__wrapper-inner {
color: rgba(108, 108, 108, 1) !important;
}
.xinfo-ltqp {
position: relative;
width: 382rpx;
height: 84rpx;
margin: 0 0 20rpx 64rpx;
display: flex;
align-items: center;
background-size: contain;
background-image: url(https://wish-assets.windymuse.com.cn/xy/ltqpp.png);
}
.xinfo-ltqp-yl {
position: relative;
width: 382rpx;
height: 84rpx;
margin: 0 0 20rpx 64rpx;
position: fixed;
left: 0;
right: 100%;
bottom: 0;
display: flex;
align-items: center;
background-size: contain;
background-image: url(https://wish-assets.windymuse.com.cn/xy/ltqpp.png);
}
.xinfo-ltqp-yl image {
width: 100%;
height: 100%;
}
.xinfo-ltqp image {
width: 100%;
height: 100%;
}
.xinfo-ltqp-text {
color: rgba(79, 79, 79, 1);
font-size: 14px;
justify-content: space-between;
border: 1px solid #ECECEC;
border-left: none;
border-right: none;
}
.xinfo-yuying {
margin: 0 40rpx;
width: 70rpx !important;
height: 70rpx !important;
}
.xinfo-close {
.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;
top: 20rpx;
right: -60rpx;
color: #6c6c6c;
}
.xinfo-img {
position: relative;
width: 480rpx;
margin: 40rpx 0 0 64rpx;
display: flex;
justify-content: center;
}
.xinfo-img-yl {
position: relative;
width: 480rpx;
margin: 40rpx 0 0 64rpx;
display: flex;
justify-content: center;
}
.xinfo-img-yl image {
width: 100%;
}
.xinfo-img image {
width: 100%;
left: 31px;
top: 64px;
width: 315px;
height: 657px;
overflow: auto;
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xx/xznrpic.png);
}
.xinfo-img-close {
.xfzjhz{
position: absolute;
top: 0;
right: -60rpx;
color: #6c6c6c;
left: 154px;
top: 482rpx;
width: 73px;
height: 71px;
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xx/xfzjhzpic.png);
}
.bgt2-btn1 {
.xzfhan{
position: absolute;
top: 648rpx;
left: 32rpx;
width: 110rpx;
height: 110rpx;
border-radius: 50%;
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);
display: flex;
justify-content: center;
align-items: center;
z-index: 1;
pointer-events: auto;
color: rgba(255, 255, 255, 1);
font-size: 16px;
text-align: center;
font-family: SourceHanSansSC-medium;
}
.bgt2-btn1 image {
width: 60rpx;
height: 60rpx;
.xzfhan1{
left: 16px;
top: 592rpx;
}
.bgt2-btn2 {
position: absolute;
top: 460rpx;
right: 32rpx;
width: 110rpx;
height: 110rpx;
border-radius: 50%;
background: linear-gradient(222.54deg, rgba(248,99,42,1) 14.03%,rgba(249,135,89,1) 85.21%);
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4);
border: 3px solid rgba(255, 255, 255, 1);
display: flex;
justify-content: center;
align-items: center;
color: #fff;
pointer-events: auto;
.xzfhan2{
left: 608rpx;
top: 440rpx;
}
.bgt2-btn3 {
position: absolute;
top: 648rpx;
right: 32rpx;
width: 110rpx;
height: 110rpx;
border-radius: 50%;
background: linear-gradient(222.54deg, rgba(248,99,42,1) 14.03%,rgba(249,135,89,1) 85.21%);
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4);
border: 3px solid rgba(255, 255, 255, 1);
display: flex;
justify-content: center;
align-items: center;
color: #fff;
pointer-events: auto;
.xzfhan3{
left: 608rpx;
top: 592rpx;
}
.bgt2-btn4 {
.xzylanbtn{
position: absolute;
top: 900rpx;
left: 124rpx;
width: 210rpx;
height: 70rpx;
border-radius: 20rpx;
background: linear-gradient(222.54deg, rgba(248,99,42,1) 14.03%,rgba(249,135,89,1) 85.21%);
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4);
border: 3px solid rgba(255, 255, 255, 1);
color: #fff;
font-size: 28rpx;
display: flex;
justify-content: center;
align-items: center;
pointer-events: auto;
}
.bgt2-btn5 {
position: absolute;
top: 900rpx;
right: 124rpx;
width: 210rpx;
height: 70rpx;
border-radius: 20rpx;
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: #fff;
font-size: 28rpx;
display: flex;
justify-content: center;
align-items: center;
pointer-events: auto;
}
.bgt2-yz {
position: absolute;
top: 550rpx;
left: 310rpx;
width: 146rpx;
height: 146rpx;
background-image: url(https://wish-assets.windymuse.com.cn/xy/%E5%8D%B0%E7%AB%A0.png);
background-size: cover;
pointer-events: auto;
}
.taost{
position: absolute;
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
z-index: 9;
background-color: rgba(255, 255, 255, 0.9);
}
.taost-box {
width: 586rpx;
height: 434rpx;
padding-top: 104rpx;
box-sizing: border-box;
border-radius: 15px;
background-color: rgba(255, 255, 255, 1);
text-align: center;
box-shadow: 1px 2px 6px 0px rgba(0, 0, 0, 0.4);
}
.sound {
position: relative;
width: 100%;
height: 100%;
z-index: 9;
background-color: rgba(255, 255, 255, 0.9);
}
.sound-box {
position: absolute;
bottom: 0;
width: 100%;
height: 462rpx;
line-height: 40rpx;
border-radius: 10px 10px 0px 0px;
background-color: rgba(255, 255, 255, 1);
color: rgba(16, 16, 16, 1);
color: rgba(255, 255, 255, 1);
font-size: 14px;
z-index: 100;
text-align: center;
font-family: SourceHanSansSC-medium;
}
.sound-box-top {
width: 100%;
height: 72rpx;
display: flex;
justify-content: space-between;
align-items: center;
font-size: 16px;
padding: 0 64rpx;
box-sizing: border-box;
color: rgba(108, 108, 108, 1);
border-bottom: 1px solid #e9e9e9;
}
.sound-box-time {
width: 100%;
display: flex;
justify-content: center;
align-items: center;
color: #6c6c6c;
font-size: 16px;
margin-top: 40rpx;
}
.sound-box-img {
width: 100%;
height: 50rpx;
margin-top: 40rpx;
background-image: url(https://wish-assets.windymuse.com.cn/xy/iconPark-acoustic%20Copy%203%401x%20%281%29.png);
}
.sound-box-img2 {
width: 1000px;
height: 50rpx;
margin-top: 40rpx;
animation: move 5s infinite linear;
}
.sound-box-img2 image {
width: 50rpx;
height: 50rpx;
}
/* 定义动画 */
/* 定义和调用动画 */
@keyframes move {
/* 动画的第一个状态和盒子的默认状态相同, 可以省略动画的开始状态代码 */
/* from {
transform: translateX(0);
} */
to {
transform: translateX(-750rpx);
/* transform: translateX(-900px); */
/* transform: translateX(-800px); */
}
}
.sound-box-btn {
width: 100%;
height: 120rpx;
margin-top: 52rpx;
display: flex;
justify-content: center;
align-items: center;
.xzylan1{
left: 62px;
}
.sound-box-btn .btn1 {
width: 120rpx;
height: 120rpx;
background-color: rgba(255, 255, 255, 1);
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4);
border: 3px solid rgba(255, 255, 255, 1);
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
}
.btn-being {
width: 90rpx;
height: 90rpx;
border-radius: 50%;
background: linear-gradient(222.54deg, rgba(248,99,42,1) 14.03%,rgba(249,135,89,1) 85.21%);
.xzylan2{
left: 448rpx;
}
.btn-over {
width: 60rpx;
height: 60rpx;
background-image: url(https://wish-assets.windymuse.com.cn/xy/if-ui-play%20Copy%401x.png);
background-size: contain;
}
.btn-video {
width: 60rpx;
height: 60rpx;
background-image: url(https://wish-assets.windymuse.com.cn/xy/semiDesign.png);
background-size: contain;
}
.btn-have {
width: 60rpx;
height: 60rpx;
border-radius: 10rpx;
background-color: #F8632A;
background-size: contain;
}
.taost-box-text {
width: 100%;
display: flex;
margin-bottom: 20rpx;
justify-content: center;
color: rgba(108, 108, 108, 1);
font-size: 18px;
}
.taost-box-btn {
width: 210rpx;
height: 64rpx;
margin: 80rpx auto;
border-radius: 20rpx;
background: linear-gradient(233.49deg, rgba(248,99,42,1) 10.48%,rgba(249,135,89,1) 89.2%);
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4);
border: 6rpx solid rgba(255, 255, 255, 1);
display: flex;
justify-content: center;
align-items: center;
color: #fff;
font-size: 28rpx;
}
.Send-btn {
width: 100%;
justify-content: space-around;
display: flex;
}
.Send-btn .taost-box-btn{
margin: 20rpx 0;
}
.already {
.fan11r2{
position: absolute;
width: 100%;
height: 100%;
z-index: 999;
background-color: #fff;
left: 26rpx;
top: 24rpx;
width: 30px;
height: 30px;
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xx/xtreturn.png);
}
.already-top {
width: 100%;
height: 230rpx;
margin-top: 104rpx;
background-image: url(https://wish-assets.windymuse.com.cn/xy/bgt1.png);
background-size: contain;
}
.already-bom {
position: absolute;
bottom: 0;
width: 100%;
height: 230rpx;
background-size: contain;
}
.already-img {
margin: 0 auto;
width: 660rpx;
height: 522rpx;
background-size: contain;
background-image: url(https://wish-assets.windymuse.com.cn/xy/xzt.png);
}
.already-text {
width: 100%;
margin-top: 80rpx;
}
.already-text1 {
width: 100%;
display: flex;
justify-content: center;
color: rgba(108, 108, 108, 1);
font-size: 18px;
margin-bottom: 10rpx;
}
.already-text2 {
width: 100%;
display: flex;
justify-content: center;
color: rgba(108, 108, 108, 1);
font-size: 14px;
margin-top: 20rpx;
}
.already-text3 {
width: 100%;
display: flex;
justify-content: center;
color: rgba(108, 108, 108, 1);
font-size: 14px;
margin-top: 72rpx;
}
.already-btn {
width: 100%;
margin-top: 48rpx;
display: flex;
justify-content: space-around;
}
.already-btn .btn {
width: 210rpx;
height: 70rpx;
box-sizing: border-box;
border-radius: 20rpx;
background: linear-gradient(222.54deg, rgba(248,99,42,1) 14.03%,rgba(249,135,89,1) 85.21%);
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4);
border: 3px solid rgba(255, 255, 255, 1);
display: flex;
justify-content: center;
align-items: center;
color: #fff;
z-index: 999;
}

@ -1,344 +1,18 @@
// pages/home/xx/xz/xz.js
const app = getApp();//新建页面时 默认引入
const req = app.xzjlReq();//初始化一个的request() 实例
Page({
/**
* 页面的初始数据
*/
data: {
to:'',
from:'',
content:'',
audioList:[], // 音频列表
imgList:[], // 图片列表
sound:'',
soundTime:'00:00:00',
duration: '',
minute:0, //分
second:0, //秒
millisecond:0, //毫秒
showBtn:true,
showImgBig:false, //图片太大弹层
showSoundMore:false, //语音太多提示
showSend:false, //寄出提示
Preview:false, //预览
showSound:false,
showAlready:false,
showImgToast:false,
showImgToastBig:false,
btn1:true,
btn2:false,
btn3:false,
btn4:false,
showSoundImg:true,
isPlaying: false, // 是否正在播放语音
},
already(){
console.log('确定寄出');
this.setData({showAlready:true})
const list = [ ...this.data.audioList, ...this.data.imgList]
list.push({
type: 'text',
content: this.data.content
})
const fromData = {
from: this.data.from,
to: this.data.to,
messageList: list,
status:'unread'
}
console.log(fromData);
// 修改信札
req.putRequest('/api/user/curt/letter',fromData).then(res => {
console.log(res,'修改信札内容成功');
// 修改状态
req.patchRequest('/api/user/curt/letter/send',{}).then(res => {
console.log(res,'信札状态修改成功');
})
})
},
closeShowImgBig(){
this.setData({showImgBig:false})
},
closeShowSoundMore(){
this.setData({showSoundMore:false})
},
openShowSend(){
this.setData({showSend:true})
},
closeShowSend(){
this.setData({showSend:false})
},
closeShowImgToast(){this.setData({showImgToast: false})},
openPreview(){
console.log('预览');
this.setData({Preview:true})
},
ClearYl(e){
console.log('清除语音');
const id = e.currentTarget.dataset.id
const list = this.data.audioList.filter(item => {
return item.resourceId !== id
})
this.setData({audioList: list})
},
ClearImg(e){
console.log('清除图片');
const id = e.currentTarget.dataset.id
const list = this.data.imgList.filter(item => {
return item.resourceId !== id
})
this.setData({imgList: list})
},
goBack(){
if (this.data.Preview) {
this.setData({Preview: false})
}else{
console.log('返回');
wx.navigateBack()
}
},
// 上传图片
addImg(){
console.log('添加图片');
wx.chooseMedia({
mediaType: 'image',
success: (res) => {
const files = res.tempFiles[0]
if(files.size > 5 * 1024 * 1024 ){
this.setData({showImgBig:true})
}
this.uploadFile(res.tempFiles[0].tempFilePath,'poster')
}
})
},
// 文件上传
uploadFile(file,type) {
wx.uploadFile({
url: 'https://xzjl-api.windymuse.cn/api/resource',
filePath: file,
name: 'file',
header: {
'Authorization': wx.getStorageSync('token'),
'Content-Type': 'multipart/form-data'
},
formData: {
type: type
},
success: (async(res) => {
const data = JSON.parse(res.data);
console.log(data);
if (data.data.type === 'audio') {
console.log('添加音频');
const list = this.data.audioList
if(list.length >= 3){
this.setData({showSoundMore:true ,showSoundImg:true})
console.log('语音太多了');
}else {
list.push({
type: 'audio',
resourceId: data.data.id,
duration: this.data.duration,
videoSrc: this.data.videoSrc,
extra: {duration : this.data.ssec}
})
this.setData({audioList: list})
}
} else if (data.data.type === 'poster') {
console.log('添加图片');
const list = this.data.imgList
if (list.length >= 9) {
this.setData({showImgToast : true})
}else {
list.push({
type: 'graphic',
resourceId: data.data.id,
img: data.data.abUrl,
})
this.setData({imgList: list, showImg:true})
}
}
}),
fail(res) {
console.log('上传失败');
}
});
},
openSound(){
console.log('添加声音');
this.setData({showSound:true})
},
closeSound(){
console.log('退出');
this.setData({
showSound:false,
btn1: true,
btn2: false,
btn3: false,
btn4: false,
soundTime: '00:00:00',
showSoundImg: true,
minute:0,
second:0,
millisecond:0
})
clearInterval(this.data.timeOut)
},
startSound(){
console.log('开始录音');
this.setData({btn1: false, btn2: true, showSoundImg: false})
let option = {
duration:10000, //录音的时长之前最大值好像只有1分钟现在最长可以录音10分钟
format:'mp3', //录音的格式有aac和mp3两种
}
wx.getRecorderManager().start(option)
// 开启定时器
this.data.timeOut = setInterval(this.counter,50)
},
// 计时器
counter(){
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 })
}else if(second >= 60) {
this.setData({second: 0, minute: minute + 1})
}else if(minute === 3) {
this.second({soundTime: '03:00:00'})
clearInterval(this.data.timeOut)
}
let time = '0' + minute
if (second < 10) {
time = time + ':0' + second
}else {
time = time + ':' + second
}
if (millisecond < 10){
time = time + ':0' + millisecond
} else {
time = time + ':' + millisecond
}
let ssec = minute + '\''
if (second < 10) {
ssec = ssec + '0' + second + '\'\''
}else {
ssec = ssec + second
}
this.setData({
soundTime: time,
ssec: ssec
})
},
endSound(){
console.log('结束录音');
wx.getRecorderManager().stop()
wx.getRecorderManager().onStop((res) => {
console.log(res,'这里');
const innerAudioContext = wx.createInnerAudioContext()
innerAudioContext.src = res.tempFilePath
this.setData({
innerAudioContext: innerAudioContext,
videoSrc:res.tempFilePath
})
})
clearInterval(this.data.timeOut)
this.setData({btn2:false, btn3:true, showSoundImg:true})
},
playVoice(){
console.log('播放录音');
this.data.innerAudioContext.play()
this.setData({btn3: false ,btn4: true})
},
stopVoice(){
console.log('停止播放录音');
this.data.innerAudioContext.stop()
this.setData({btn3: true ,btn4: false})
},
addSound(){
if(this.data.btn3){
console.log('添加录音');
console.log(this.data.soundTime);
this.setData({duration: this.data.soundTime})
// 上传语音
this.uploadFile(this.data.videoSrc,'audio')
clearInterval(this.data.timeOut)
this.setData({
btn1:true,
btn2:false,
btn3:false,
btn4:false,
showLtqp: true,
showSound: false,
minute:0,
second:0,
millisecond:0,
soundTime:'00:00:00'
})
}
},
logout(){
req.deleteRequest('/api/user/logout',{}).then((res)=>{
if(res.data.code===200){
wx.navigateTo({
url: '/pages/index/index'
})
wx.showToast({
title:'寄出成功'
})
}
})
},
modify(){
this.setData({showAlready: false, showSend: false})
},
getLetter(){
console.log('获取当前用户信札内容');
req.getRequest('/api/user/curt/letter',{}).then(res => {
console.log(res);
})
},
// 点击音频试听
listen(e){
if (this.data.isPlaying) {
return; // 如果正在播放语音,则不触发事件
}
const id = e.currentTarget.dataset.url.resourceId
const videoSrc = this.data.audioList.find(item => {
return item.resourceId === id
}).videoSrc
console.log(videoSrc);
const innerAudioContext = wx.createInnerAudioContext()
innerAudioContext.src = videoSrc
innerAudioContext.play() // 播放
console.log('播放');
this.setData({ isPlaying: true }); // 设置为正在播放语音
innerAudioContext.onEnded(() => {
this.setData({ isPlaying: false }); // 播放完毕后设置为非播放状态
});
},
getUserInfo(){
req.getRequest('/api/user/curt',{}).then(res => {
const id = res.data.data.id
this.setData({id:id})
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.getLetter()
this.getUserInfo()
},
/**

@ -1,7 +1,3 @@
{
"usingComponents": {
"t-icon": "tdesign-miniprogram/icon/icon",
"t-textarea": "tdesign-miniprogram/textarea/textarea",
"t-input": "tdesign-miniprogram/input/input"
}
"usingComponents": {}
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save