main^2
Wkang921 2 years ago
parent 6ded150933
commit db770dea42

@ -14,3 +14,8 @@
height: 0; height: 0;
color: transparent; color: transparent;
} }
page {
width: 100%;
height: 100%;
}

Binary file not shown.

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

File diff suppressed because one or more lines are too long

5
node_modules/.package-lock.json generated vendored

@ -22,6 +22,11 @@
"resolved": "https://registry.npmjs.org/weapp-qrcode-canvas-2d/-/weapp-qrcode-canvas-2d-1.1.2.tgz", "resolved": "https://registry.npmjs.org/weapp-qrcode-canvas-2d/-/weapp-qrcode-canvas-2d-1.1.2.tgz",
"integrity": "sha512-HQef+xpZiiWDcq8aLZdXnVdNljoYsEWiEKiBYnAnfgqXTeYfC8ApzoB9pMI5mnPFbhtu5xCi8oId1g/86uUl8Q==" "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": { "node_modules/wxmp-rsa": {
"version": "2.1.0", "version": "2.1.0",
"resolved": "https://registry.npmjs.org/wxmp-rsa/-/wxmp-rsa-2.1.0.tgz", "resolved": "https://registry.npmjs.org/wxmp-rsa/-/wxmp-rsa-2.1.0.tgz",

330
node_modules/wxml2canvas/README.md generated vendored

@ -0,0 +1,330 @@
## 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

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

27
node_modules/wxml2canvas/app.json generated vendored

@ -0,0 +1,27 @@
{
"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"
}]
}
}

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

@ -0,0 +1,16 @@
{
"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.

After

Width:  |  Height:  |  Size: 15 KiB

@ -0,0 +1,411 @@
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);
}
});

@ -0,0 +1,10 @@
<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>

@ -0,0 +1,18 @@
.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.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

@ -0,0 +1,260 @@
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

@ -0,0 +1,40 @@
{
"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

@ -0,0 +1,122 @@
/**
* 获取字符的长度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,6 +11,7 @@
"dependencies": { "dependencies": {
"tdesign-miniprogram": "^1.1.1", "tdesign-miniprogram": "^1.1.1",
"weapp-qrcode-canvas-2d": "^1.1.2", "weapp-qrcode-canvas-2d": "^1.1.2",
"wxml2canvas": "^1.0.1",
"wxmp-rsa": "^2.1.0" "wxmp-rsa": "^2.1.0"
} }
}, },
@ -32,6 +33,11 @@
"resolved": "https://registry.npmjs.org/weapp-qrcode-canvas-2d/-/weapp-qrcode-canvas-2d-1.1.2.tgz", "resolved": "https://registry.npmjs.org/weapp-qrcode-canvas-2d/-/weapp-qrcode-canvas-2d-1.1.2.tgz",
"integrity": "sha512-HQef+xpZiiWDcq8aLZdXnVdNljoYsEWiEKiBYnAnfgqXTeYfC8ApzoB9pMI5mnPFbhtu5xCi8oId1g/86uUl8Q==" "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": { "node_modules/wxmp-rsa": {
"version": "2.1.0", "version": "2.1.0",
"resolved": "https://registry.npmjs.org/wxmp-rsa/-/wxmp-rsa-2.1.0.tgz", "resolved": "https://registry.npmjs.org/wxmp-rsa/-/wxmp-rsa-2.1.0.tgz",

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

@ -11,7 +11,7 @@ page {
margin-left:249.33rpx; margin-left:249.33rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/tx.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/tx.png);
} }
.txtext{ .txtext{
@ -80,7 +80,7 @@ page {
margin-top: 14rpx; margin-top: 14rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/wjx.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/wjx.png);
} }
.dchx{ .dchx{
@ -110,7 +110,7 @@ page {
margin-left: 29.33rpx; margin-left: 29.33rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/bs.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/bs.png);
} }
.gh{ .gh{
@ -120,7 +120,7 @@ page {
margin-top:1070.67rpx; margin-top:1070.67rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/gh.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/gh.png);
} }
.call{ .call{
@ -163,7 +163,7 @@ page {
margin-left: 32.33rpx; margin-left: 32.33rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/rbs.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/rbs.png);
} }
.lovepic{ .lovepic{
@ -174,7 +174,7 @@ page {
margin-left:235.33rpx; margin-left:235.33rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/pulse.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/pulse.png);
} }
.dchxtxtql{ .dchxtxtql{
@ -196,7 +196,7 @@ page {
margin-left:218rpx; margin-left:218rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/tx.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/tx.png);
} }
.txl-qd { .txl-qd {
@ -213,7 +213,7 @@ page {
margin-left:400.67rpx; margin-left:400.67rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/tx.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/tx.png);
} }
.txr-qd { .txr-qd {
@ -267,7 +267,7 @@ page {
margin-left: 322.67rpx; margin-left: 322.67rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/jiuchan.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/jiuchan.png);
} }
@ -290,7 +290,7 @@ page {
margin-left: 322.67rpx; margin-left: 322.67rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/bkg3.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/bkg3.png);
} }
.xxt{ .xxt{
@ -319,7 +319,7 @@ page {
background-size:100% 100%; background-size:100% 100%;
margin-top: 837.33rpx; margin-top: 837.33rpx;
margin-left:118.67rpx; margin-left:118.67rpx;
background-image: url(https://oss.wish.ydxxkj.top/xy/yan.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/yan.png);
} }
.yan2{ .yan2{
position: absolute; position: absolute;
@ -332,7 +332,7 @@ page {
background-size:100% 100%; background-size:100% 100%;
margin-top: 837.33rpx; margin-top: 837.33rpx;
margin-left:318rpx; margin-left:318rpx;
background-image: url(https://oss.wish.ydxxkj.top/xy/yan.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/yan.png);
} }
.yan3{ .yan3{
position: absolute; position: absolute;
@ -345,7 +345,7 @@ page {
justify-content: center; justify-content: center;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/yan.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/yan.png);
} }
.bkg1{ .bkg1{
@ -356,7 +356,7 @@ page {
margin-left:46rpx; margin-left:46rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/bkg1.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/bkg1.png);
} }
.bkg3{ .bkg3{
@ -367,7 +367,7 @@ page {
margin-left:42rpx; margin-left:42rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/bkg3.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/bkg3.png);
} }
.yan11{ .yan11{
@ -376,7 +376,7 @@ page {
height:46rpx; height:46rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/paw.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/paw.png);
} }
.yan12{ .yan12{
@ -385,7 +385,7 @@ page {
height:46rpx; height:46rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/male.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/male.png);
} }
.yan13{ .yan13{
@ -394,7 +394,7 @@ page {
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-size: contain; background-size: contain;
background-image: url(https://oss.wish.ydxxkj.top/xy/female.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/female.png);
} }
.xxtl{ .xxtl{
@ -438,7 +438,7 @@ page {
background-size:100% 100%; background-size:100% 100%;
margin-top: 492rpx; margin-top: 492rpx;
margin-left:86.67rpx; margin-left:86.67rpx;
background-image: url(https://oss.wish.ydxxkj.top/xy/yan.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/yan.png);
} }
.yanql2{ .yanql2{
@ -452,7 +452,7 @@ page {
background-size:100% 100%; background-size:100% 100%;
margin-top: 663.33rpx; margin-top: 663.33rpx;
margin-left:38.67rpx; margin-left:38.67rpx;
background-image: url(https://oss.wish.ydxxkj.top/xy/yan.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/yan.png);
} }
.yanql4{ .yanql4{
@ -466,7 +466,7 @@ page {
background-size:100% 100%; background-size:100% 100%;
margin-top: 492rpx; margin-top: 492rpx;
margin-left:550.67rpx; margin-left:550.67rpx;
background-image: url(https://oss.wish.ydxxkj.top/xy/yan.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/yan.png);
} }
.yanql5{ .yanql5{
@ -480,7 +480,7 @@ page {
background-size:100% 100%; background-size:100% 100%;
margin-top: 663.33rpx; margin-top: 663.33rpx;
margin-left:598rpx; margin-left:598rpx;
background-image: url(https://oss.wish.ydxxkj.top/xy/yan.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/yan.png);
} }
.xxtq{ .xxtq{
@ -508,7 +508,7 @@ page {
margin-left: 114.67rpx; margin-left: 114.67rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/circle.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/circle.png);
color: rgba(248, 99, 42, 1); color: rgba(248, 99, 42, 1);
@ -525,7 +525,7 @@ font-family: SourceHanSansSC-regular;
margin-left: 318rpx; margin-left: 318rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/yan.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/yan.png);
} }
@ -539,7 +539,7 @@ font-family: SourceHanSansSC-regular;
margin-left: 520.67rpx; margin-left: 520.67rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/circle.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/circle.png);
color: rgba(108, 108, 108, 1); color: rgba(108, 108, 108, 1);
font-size: 16px; font-size: 16px;
@ -553,7 +553,7 @@ font-size: 16px;
margin-left: 36rpx; margin-left: 36rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/yst.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/yst.png);
} }
@ -622,7 +622,7 @@ font-size: 16px;
background-size:100% 100%; background-size:100% 100%;
margin-left:97.33rpx; margin-left:97.33rpx;
margin-top: 589.33rpx; margin-top: 589.33rpx;
background-image: url(https://oss.wish.ydxxkj.top/xy/jkzs.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/jkzs.png);
} }
.aqzs{ .aqzs{
@ -635,7 +635,7 @@ font-size: 16px;
background-size:100% 100%; background-size:100% 100%;
margin-left:97.33rpx; margin-left:97.33rpx;
margin-top: 653.33rpx; margin-top: 653.33rpx;
background-image: url(https://oss.wish.ydxxkj.top/xy/aqzs.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/aqzs.png);
} }
.cyzs{ .cyzs{
@ -648,7 +648,7 @@ font-size: 16px;
background-size:100% 100%; background-size:100% 100%;
margin-left:97.33rpx; margin-left:97.33rpx;
margin-top: 717.33rpx; margin-top: 717.33rpx;
background-image: url(https://oss.wish.ydxxkj.top/xy/cyzs.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/cyzs.png);
} }
.rjkzs{ .rjkzs{
@ -726,7 +726,7 @@ width: 240px;
height: 11px; height: 11px;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/ysfgx.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/ysfgx.png);
} }
/* 弹层 */ /* 弹层 */

@ -11,7 +11,7 @@
<view class="ltat ltwm" data-lt="我和Ta未来会怎样" bindtap="doLt">我和Ta未来会怎样</view> <view class="ltat ltwm" data-lt="我和Ta未来会怎样" bindtap="doLt">我和Ta未来会怎样</view>
<view class="ltat wzmxyx" data-lt="文字冒险游戏" bindtap="doLt">文字冒险游戏</view> <view class="ltat wzmxyx" data-lt="文字冒险游戏" bindtap="doLt">文字冒险游戏</view>
<view class="ltat ltqs" data-lt="帮我写一封情书" bindtap="doLt">帮我写一封情书</view> <view class="ltat ltqs" data-lt="帮我写一封情书" bindtap="doLt">帮我写一封情书</view>
<t-image src="https://oss.wish.ydxxkj.top/xy/jlaitx.png" shape="circle" class="tximg"></t-image> <t-image src="https://wish-assets.windymuse.com.cn/xy/jlaitx.png" shape="circle" class="tximg"></t-image>
<view class="ltwzk">你好,我是你的星座守护精灵。除此之外,我还可以帮你解答更多问题。快来跟我聊聊吧! <view class="ltwzk">你好,我是你的星座守护精灵。除此之外,我还可以帮你解答更多问题。快来跟我聊聊吧!
</view> </view>
</view> </view>
@ -24,7 +24,7 @@
<view class="ltat ltwm">我和Ta未来会怎样</view> <view class="ltat ltwm">我和Ta未来会怎样</view>
<view class="ltat wzmxyx" >文字冒险游戏</view> <view class="ltat wzmxyx" >文字冒险游戏</view>
<view class="ltat ltqs" >帮我写一封情书</view> <view class="ltat ltqs" >帮我写一封情书</view>
<t-image src="https://oss.wish.ydxxkj.top/xy/jlaitx.png" shape="circle" class="tximg"></t-image> <t-image src="https://wish-assets.windymuse.com.cn/xy/jlaitx.png" shape="circle" class="tximg"></t-image>
<view class="ltwzk">你好,我是你的星座守护精灵。除此之外,我还可以帮你解答更多问题。快来跟我聊聊吧! <view class="ltwzk">你好,我是你的星座守护精灵。除此之外,我还可以帮你解答更多问题。快来跟我聊聊吧!
</view> </view>
<view class="kthybtn" bindtap="go2Member">开通会员</view> <view class="kthybtn" bindtap="go2Member">开通会员</view>
@ -34,7 +34,7 @@
<view class="chatbox" wx:if="{{chatList&&(!isBlank)}}"><!--聊天内容--> <view class="chatbox" wx:if="{{chatList&&(!isBlank)}}"><!--聊天内容-->
<view class="chatbox1" wx:for="{{chatList}}" wx:key="index"> <view class="chatbox1" wx:for="{{chatList}}" wx:key="index">
<t-image src="https://oss.wish.ydxxkj.top/xy/jlaitx.png" shape="circle" class="chattoux" wx:if="{{item.type==2}}"></t-image> <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="{{userInfo.avatar}}" class="chattoux" wx:if="{{item.type==1}}"></t-image> <t-image src="{{userInfo.avatar}}" class="chattoux" wx:if="{{item.type==1}}"></t-image>
<view class="chatinfo">{{item.value}}</view> <view class="chatinfo">{{item.value}}</view>
</view> </view>

@ -13,7 +13,7 @@ page {
height:48rpx; height:48rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/reback.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/reback.png);
} }
.title{ .title{
@ -203,7 +203,7 @@ page {
height: 54rpx; height: 54rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/chatbtn.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/chatbtn.png);
} }
.addbtn{ .addbtn{
@ -214,7 +214,7 @@ page {
height: 54rpx; height: 54rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/addbtn.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/addbtn.png);
} }
.chatbox{ .chatbox{
@ -292,7 +292,7 @@ page {
height: 127rpx; height: 127rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/hyhg.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/hyhg.png);
} }
.ltk112{ .ltk112{
position: absolute; position: absolute;

@ -8,15 +8,15 @@ Page({
*/ */
data: { data: {
avatars:[ avatars:[
'https://oss.wish.ydxxkj.top/xy/tx1.png', 'https://wish-assets.windymuse.com.cn/xy/tx1.png',
'https://oss.wish.ydxxkj.top/xy/tx2.png', 'https://wish-assets.windymuse.com.cn/xy/tx2.png',
'https://oss.wish.ydxxkj.top/xy/tx3.png', 'https://wish-assets.windymuse.com.cn/xy/tx3.png',
'https://oss.wish.ydxxkj.top/xy/tx4.png', 'https://wish-assets.windymuse.com.cn/xy/tx4.png',
'https://oss.wish.ydxxkj.top/xy/tx5.png', 'https://wish-assets.windymuse.com.cn/xy/tx5.png',
'https://oss.wish.ydxxkj.top/xy/tx6.png', 'https://wish-assets.windymuse.com.cn/xy/tx6.png',
'https://oss.wish.ydxxkj.top/xy/tx1.png', 'https://wish-assets.windymuse.com.cn/xy/tx1.png',
'https://oss.wish.ydxxkj.top/xy/tx2.png', 'https://wish-assets.windymuse.com.cn/xy/tx2.png',
'https://oss.wish.ydxxkj.top/xy/tx3.png', 'https://wish-assets.windymuse.com.cn/xy/tx3.png',
], ],
sexs:[{label:'男生',value:'male'},{label:'女生',value:'female'}], sexs:[{label:'男生',value:'male'},{label:'女生',value:'female'}],
sexVisible:false, sexVisible:false,

@ -17,7 +17,7 @@
height:48rpx; height:48rpx;
margin-left: 20rpx; margin-left: 20rpx;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/reback.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/reback.png);
} }
.title{ .title{
@ -87,7 +87,7 @@
height: 26rpx; height: 26rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/camera.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/camera.png);
} }
.txcheck-box { .txcheck-box {

@ -273,6 +273,7 @@ Page({
.then(() => { .then(() => {
req.deleteRequest('/api/user/logout',{}).then((res)=>{ req.deleteRequest('/api/user/logout',{}).then((res)=>{
if(res.data.code===200){ if(res.data.code===200){
wx.setStorageSync('token', '')
wx.navigateTo({ wx.navigateTo({
url: '/pages/index/index' url: '/pages/index/index'
}) })
@ -293,7 +294,6 @@ Page({
}) })
.catch(() => console.log('点击了取消')) .catch(() => console.log('点击了取消'))
.finally(() => { .finally(() => {
wx.setStorageSync('token', '')
Dialog.close()}); Dialog.close()});
}, },
}) })

@ -26,41 +26,41 @@
<!--功能操作框--> <!--功能操作框-->
<view class="mycell" bindtap="ljXzjl" > <view class="mycell" bindtap="ljXzjl" >
<!-- <t-cell hover arrow bindtap="go2Gw"> <!-- <t-cell hover arrow bindtap="go2Gw">
<t-icon slot="left-icon" name="https://oss.wish.ydxxkj.top/xy/iconPark-triangles.png" size="50rpx"/> <t-icon slot="left-icon" name="https://wish-assets.windymuse.com.cn/xy/iconPark-triangles.png" size="50rpx"/>
<text slot="title" class="mycelltext" >了解星座精灵</text> <text slot="title" class="mycelltext" >了解星座精灵</text>
</t-cell> --> </t-cell> -->
<t-cell hover bindtap="doBdsjh" > <t-cell hover bindtap="doBdsjh" >
<t-icon slot="left-icon" name="https://oss.wish.ydxxkj.top/xy/iconPark-phone.png" size="50rpx"/> <t-icon slot="left-icon" name="https://wish-assets.windymuse.com.cn/xy/iconPark-phone.png" size="50rpx"/>
<text slot="title" class="mycelltext" >绑定手机号</text> <text slot="title" class="mycelltext" >绑定手机号</text>
<text slot="note" wx:if="{{userInfo.hasPhone}}">{{userInfo.phone}}</text> <text slot="note" wx:if="{{userInfo.hasPhone}}">{{userInfo.phone}}</text>
</t-cell> </t-cell>
<!-- <t-cell hover arrow bindtap="go2Cjwt"> <!-- <t-cell hover arrow bindtap="go2Cjwt">
<t-icon slot="left-icon" name="https://oss.wish.ydxxkj.top/xy/iconPark-help%402x.png" size="50rpx"/> <t-icon slot="left-icon" name="https://wish-assets.windymuse.com.cn/xy/iconPark-help%402x.png" size="50rpx"/>
<text slot="title" class="mycelltext" >常见问题</text> <text slot="title" class="mycelltext" >常见问题</text>
</t-cell> --> </t-cell> -->
<t-cell hover arrow bindtap="go2Yjfk"> <t-cell hover arrow bindtap="go2Yjfk">
<t-icon slot="left-icon" name="https://oss.wish.ydxxkj.top/xy/iconPark-edit%402x.png" size="50rpx"/> <t-icon slot="left-icon" name="https://wish-assets.windymuse.com.cn/xy/iconPark-edit%402x.png" size="50rpx"/>
<text slot="title" class="mycelltext" >意见反馈</text> <text slot="title" class="mycelltext" >意见反馈</text>
</t-cell> </t-cell>
<!-- <t-cell hover arrow bindtap="go2Yhsyxy"> <!-- <t-cell hover arrow bindtap="go2Yhsyxy">
<t-icon slot="left-icon" name="https://oss.wish.ydxxkj.top/xy/iconPark-editor%402x.png" size="50rpx"/> <t-icon slot="left-icon" name="https://wish-assets.windymuse.com.cn/xy/iconPark-editor%402x.png" size="50rpx"/>
<text slot="title" class="mycelltext" >用户使用协议</text> <text slot="title" class="mycelltext" >用户使用协议</text>
</t-cell> --> </t-cell> -->
<!-- <t-cell hover arrow bindtap="go2Ysxy"> <!-- <t-cell hover arrow bindtap="go2Ysxy">
<t-icon slot="left-icon" name="https://oss.wish.ydxxkj.top/xy/iconPark-audit%402x.png" size="50rpx"/> <t-icon slot="left-icon" name="https://wish-assets.windymuse.com.cn/xy/iconPark-audit%402x.png" size="50rpx"/>
<text slot="title" class="mycelltext" >隐私协议</text> <text slot="title" class="mycelltext" >隐私协议</text>
</t-cell> --> </t-cell> -->
<t-cell hover> <t-cell hover>
<t-icon slot="left-icon" name="https://oss.wish.ydxxkj.top/xy/iconPark-layers%402x.png" size="50rpx"/> <t-icon slot="left-icon" name="https://wish-assets.windymuse.com.cn/xy/iconPark-layers%402x.png" size="50rpx"/>
<text slot="title" class="mycelltext" >小程序版本</text> <text slot="title" class="mycelltext" >小程序版本</text>
<text slot="note" >V1.0</text> <text slot="note" >V1.0</text>
</t-cell> </t-cell>
<t-cell hover arrow bindtap="go2Jcjb" wx:if="{{userInfo.loverId}}"> <t-cell hover arrow bindtap="go2Jcjb" wx:if="{{userInfo.loverId}}">
<t-icon slot="left-icon" name="https://oss.wish.ydxxkj.top/xy/myqcloud.png" size="50rpx"/> <t-icon slot="left-icon" name="https://wish-assets.windymuse.com.cn/xy/myqcloud.png" size="50rpx"/>
<text slot="title" class="mycelltext" >解除羁绊</text> <text slot="title" class="mycelltext" >解除羁绊</text>
</t-cell> </t-cell>
<t-cell hover arrow bindtap="logout"> <t-cell hover arrow bindtap="logout">
<t-icon slot="left-icon" name="https://oss.wish.ydxxkj.top/xy/iconPark-logout%402x.png" size="50rpx"/> <t-icon slot="left-icon" name="https://wish-assets.windymuse.com.cn/xy/iconPark-logout%402x.png" size="50rpx"/>
<text slot="title" class="mycelltext" >退出登录</text> <text slot="title" class="mycelltext" >退出登录</text>
</t-cell> </t-cell>
<view class="meempty"></view> <view class="meempty"></view>

@ -7,7 +7,7 @@
flex-direction: column; flex-direction: column;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/xxt.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/xxt.png);
color:#9A9A9A; color:#9A9A9A;
text-align: center; text-align: center;
font-size: 27rpx; font-size: 27rpx;
@ -59,7 +59,7 @@
height: 100rpx; height: 100rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/hy.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/hy.png);
} }
.unhybs{ .unhybs{
position: absolute; position: absolute;
@ -69,7 +69,7 @@
height: 100rpx; height: 100rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/unhy.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/unhy.png);
} }
.hydqr{ .hydqr{
@ -137,7 +137,7 @@
margin: 18rpx 18rpx; margin: 18rpx 18rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/sms.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/sms.png);
} }
.sq{ .sq{
@ -147,7 +147,7 @@
margin: 18rpx 18rpx; margin: 18rpx 18rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/sq.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/sq.png);
} }
.sb{ .sb{
@ -157,7 +157,7 @@
margin: 14rpx 30rpx ; margin: 14rpx 30rpx ;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/sb.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/sb.png);
} }
.smst{ .smst{

@ -4,7 +4,7 @@
<view class="title">解除羁绊</view> <view class="title">解除羁绊</view>
<view class="main-img"> <view class="main-img">
<image src="https://oss.wish.ydxxkj.top/xy/%E9%92%BB%E7%9F%B3.png" /> <image src="https://wish-assets.windymuse.com.cn/xy/%E9%92%BB%E7%9F%B3.png" />
</view> </view>
<view class="timeout" wx:if="{{showTimeout}}"> {{ timeout }} </view> <view class="timeout" wx:if="{{showTimeout}}"> {{ timeout }} </view>
@ -14,7 +14,7 @@
<view class="btn-container"> <view class="btn-container">
<view class="btn" bindlongpress="handleLongPress" bindtouchend="handleTouchEnd"> <view class="btn" bindlongpress="handleLongPress" bindtouchend="handleTouchEnd">
<image src="https://oss.wish.ydxxkj.top/xy/ze-arrow.png"/> <image src="https://wish-assets.windymuse.com.cn/xy/ze-arrow.png"/>
</view> </view>
</view> </view>

@ -7,7 +7,7 @@
height:48rpx; height:48rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/reback.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/reback.png);
} }
.title{ .title{

@ -6,7 +6,7 @@
height:48rpx; height:48rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/reback.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/reback.png);
} }
.title{ .title{
@ -29,7 +29,7 @@
height: 230rpx; height: 230rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/hybt.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/hybt.png);
} }
.sftp{ .sftp{
@ -40,7 +40,7 @@
height: 115px; height: 115px;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/sftp.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/sftp.png);
} }
.hgpng{ .hgpng{
@ -51,7 +51,7 @@ width: 157px;
height: 174px; height: 174px;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/hgpng.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/hgpng.png);
} }
.question{ .question{
@ -61,7 +61,7 @@ background-repeat: no-repeat;
width: 30px; width: 30px;
height: 30px; height: 30px;
z-index: 999; z-index: 999;
background-image: url(https://oss.wish.ydxxkj.top/xy/qqest.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/qqest.png);
} }
.hybtn{ .hybtn{
position: absolute; position: absolute;

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

@ -7,7 +7,7 @@
height:48rpx; height:48rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/reback.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/reback.png);
} }
.title{ .title{
@ -58,7 +58,7 @@
margin-left: 32.33rpx; margin-left: 32.33rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/rbs.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/rbs.png);
} }
.lovepic{ .lovepic{
@ -69,7 +69,7 @@
margin-left:235.33rpx; margin-left:235.33rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/pulse.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/pulse.png);
} }
.dchxtxtql{ .dchxtxtql{
@ -92,7 +92,7 @@
margin-left:218rpx; margin-left:218rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/tx.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/tx.png);
} }
.txr{ .txr{
@ -103,7 +103,7 @@
margin-left:400.67rpx; margin-left:400.67rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/tx.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/tx.png);
} }
.txtextl{ .txtextl{
@ -124,7 +124,7 @@
margin-left: 322.67rpx; margin-left: 322.67rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/jiuchan.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/jiuchan.png);
} }
@ -147,7 +147,7 @@
margin-left: 322.67rpx; margin-left: 322.67rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/bkg3.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/bkg3.png);
} }
.xxt{ .xxt{
@ -158,7 +158,7 @@
margin-left: 212rpx; margin-left: 212rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/szn.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/szn.png);
} }
.yan1{ .yan1{
@ -169,7 +169,7 @@
background-size:100% 100%; background-size:100% 100%;
margin-top: 837.33rpx; margin-top: 837.33rpx;
margin-left:118.67rpx; margin-left:118.67rpx;
background-image: url(https://oss.wish.ydxxkj.top/xy/yan.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/yan.png);
} }
.yan2{ .yan2{
position: absolute; position: absolute;
@ -179,7 +179,7 @@
background-size:100% 100%; background-size:100% 100%;
margin-top: 837.33rpx; margin-top: 837.33rpx;
margin-left:318rpx; margin-left:318rpx;
background-image: url(https://oss.wish.ydxxkj.top/xy/yan.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/yan.png);
} }
.yan3{ .yan3{
position: absolute; position: absolute;
@ -189,7 +189,7 @@
margin-left:517.33rpx; margin-left:517.33rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/yan.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/yan.png);
} }
.bkg1{ .bkg1{
@ -200,7 +200,7 @@
margin-left:46rpx; margin-left:46rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/bkg1.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/bkg1.png);
} }
.bkg3{ .bkg3{
@ -211,7 +211,7 @@
margin-left:42rpx; margin-left:42rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/bkg3.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/bkg3.png);
} }
.yan11{ .yan11{
@ -222,7 +222,7 @@
background-size:100% 100%; background-size:100% 100%;
margin-top: 33.33rpx; margin-top: 33.33rpx;
margin-left:34.33rpx; margin-left:34.33rpx;
background-image: url(https://oss.wish.ydxxkj.top/xy/paw.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/paw.png);
} }
.yan12{ .yan12{
@ -233,7 +233,7 @@
background-size:100% 100%; background-size:100% 100%;
margin-top: 33.33rpx; margin-top: 33.33rpx;
margin-left:34.33rpx; margin-left:34.33rpx;
background-image: url(https://oss.wish.ydxxkj.top/xy/male.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/male.png);
} }
.yan13{ .yan13{
@ -244,7 +244,7 @@
background-size:100% 100%; background-size:100% 100%;
margin-top: 33.33rpx; margin-top: 33.33rpx;
margin-left:34.33rpx; margin-left:34.33rpx;
background-image: url(https://oss.wish.ydxxkj.top/xy/female.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/female.png);
} }
.xxtl{ .xxtl{
@ -255,7 +255,7 @@
margin-left: 88rpx; margin-left: 88rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/szn.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/szn.png);
} }
.xxtr{ .xxtr{
@ -266,7 +266,7 @@
margin-left: 355.33rpx; margin-left: 355.33rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/xxtr.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/xxtr.png);
} }
.yanql1{ .yanql1{
@ -277,7 +277,7 @@
background-size:100% 100%; background-size:100% 100%;
margin-top: 492rpx; margin-top: 492rpx;
margin-left:86.67rpx; margin-left:86.67rpx;
background-image: url(https://oss.wish.ydxxkj.top/xy/yan.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/yan.png);
} }
.yanql2{ .yanql2{
@ -288,7 +288,7 @@
background-size:100% 100%; background-size:100% 100%;
margin-top: 663.33rpx; margin-top: 663.33rpx;
margin-left:38.67rpx; margin-left:38.67rpx;
background-image: url(https://oss.wish.ydxxkj.top/xy/yan.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/yan.png);
} }
.yanql4{ .yanql4{
@ -299,7 +299,7 @@
background-size:100% 100%; background-size:100% 100%;
margin-top: 492rpx; margin-top: 492rpx;
margin-left:550.67rpx; margin-left:550.67rpx;
background-image: url(https://oss.wish.ydxxkj.top/xy/yan.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/yan.png);
} }
.yanql5{ .yanql5{
@ -310,7 +310,7 @@
background-size:100% 100%; background-size:100% 100%;
margin-top: 663.33rpx; margin-top: 663.33rpx;
margin-left:598rpx; margin-left:598rpx;
background-image: url(https://oss.wish.ydxxkj.top/xy/yan.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/yan.png);
} }
.xxtq{ .xxtq{
@ -321,7 +321,7 @@
margin-left: 212rpx; margin-left: 212rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/xxtr.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/xxtr.png);
} }
.k1{ .k1{
@ -334,7 +334,7 @@
margin-left: 114.67rpx; margin-left: 114.67rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/circle.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/circle.png);
} }
@ -346,7 +346,7 @@
margin-left: 318rpx; margin-left: 318rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/yan.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/yan.png);
} }
@ -360,7 +360,7 @@
margin-left: 520.67rpx; margin-left: 520.67rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/circle.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/circle.png);
} }
@ -372,7 +372,7 @@
margin-left: 36rpx; margin-left: 36rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/yst.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/yst.png);
} }
@ -427,7 +427,7 @@
left: 0; left: 0;
right: 0; right: 0;
margin: 84rpx auto; margin: 84rpx auto;
background-image: url(https://oss.wish.ydxxkj.top/xy/ztys.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/ztys.png);
} }
.jkzs{ .jkzs{
@ -440,7 +440,7 @@
background-size:100% 100%; background-size:100% 100%;
margin-left:97.33rpx; margin-left:97.33rpx;
margin-top: 589.33rpx; margin-top: 589.33rpx;
background-image: url(https://oss.wish.ydxxkj.top/xy/jkzs.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/jkzs.png);
} }
.aqzs{ .aqzs{
@ -453,7 +453,7 @@
background-size:100% 100%; background-size:100% 100%;
margin-left:97.33rpx; margin-left:97.33rpx;
margin-top: 653.33rpx; margin-top: 653.33rpx;
background-image: url(https://oss.wish.ydxxkj.top/xy/aqzs.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/aqzs.png);
} }
.cyzs{ .cyzs{
@ -466,7 +466,7 @@
background-size:100% 100%; background-size:100% 100%;
margin-left:97.33rpx; margin-left:97.33rpx;
margin-top: 717.33rpx; margin-top: 717.33rpx;
background-image: url(https://oss.wish.ydxxkj.top/xy/cyzs.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/cyzs.png);
} }
.rjkzs{ .rjkzs{
@ -531,7 +531,7 @@
height: 226rpx; height: 226rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/shimg.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/shimg.png);
} }
.shmz{ .shmz{
@ -648,7 +648,7 @@
height: 40rpx; height: 40rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/copy.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/copy.png);
} }
.tbl{ .tbl{
@ -659,7 +659,7 @@
height: 75px; height: 75px;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/tbl.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/tbl.png);
} }
.tbr{ .tbr{
@ -670,5 +670,5 @@
height: 75px; height: 75px;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/tbr.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/tbr.png);
} }

@ -7,7 +7,7 @@
height:48rpx; height:48rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/reback.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/reback.png);
} }
.title{ .title{
@ -30,7 +30,7 @@
height: 230rpx; height: 230rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/hybt.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/hybt.png);
} }
.fkt1{ .fkt1{
position: absolute; position: absolute;

@ -8,7 +8,7 @@
z-index: 2; z-index: 2;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/reback.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/reback.png);
} }
.title{ .title{
@ -98,7 +98,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
background-image: url(https://oss.wish.ydxxkj.top/xy/ltqp.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/ltqp.png);
} }
.viewer { .viewer {

@ -8,7 +8,7 @@
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
z-index: 1; z-index: 1;
background-image: url(https://oss.wish.ydxxkj.top/xy/reback.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/reback.png);
} }
.title{ .title{
@ -64,7 +64,7 @@
top: 334rpx; top: 334rpx;
width: 100%; width: 100%;
height: 1000rpx; height: 1000rpx;
background-image: url(https://oss.wish.ydxxkj.top/xy/%E4%BF%A1%E6%9C%AD%E8%83%8C%E6%99%AF.png); 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 { .main-item {
@ -93,7 +93,7 @@
width: 148rpx; width: 148rpx;
height: 102rpx; height: 102rpx;
background-size: contain; background-size: contain;
background-image: url(https://oss.wish.ydxxkj.top/xy/%E4%BF%A1%E5%B0%81.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/%E4%BF%A1%E5%B0%81.png);
} }
.item-text-name { .item-text-name {

@ -8,7 +8,7 @@
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
z-index: 1; z-index: 1;
background-image: url(https://oss.wish.ydxxkj.top/xy/reback.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/reback.png);
} }
.title{ .title{
@ -64,7 +64,7 @@
top: 334rpx; top: 334rpx;
width: 100%; width: 100%;
height: 1000rpx; height: 1000rpx;
background-image: url(https://oss.wish.ydxxkj.top/xy/%E4%BF%A1%E6%9C%AD%E8%83%8C%E6%99%AF.png); 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 { .main-item {
@ -109,7 +109,7 @@
width: 60rpx; width: 60rpx;
height: 60rpx; height: 60rpx;
background-size: contain; background-size: contain;
background-image: url(https://oss.wish.ydxxkj.top/xy/iconPark-voicemail%20Copy%401x.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/iconPark-voicemail%20Copy%401x.png);
} }
.item-text-name { .item-text-name {

@ -8,7 +8,7 @@
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
z-index: 1; z-index: 1;
background-image: url(https://oss.wish.ydxxkj.top/xy/reback.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/reback.png);
} }
.title{ .title{
@ -64,7 +64,7 @@
top: 334rpx; top: 334rpx;
width: 100%; width: 100%;
height: 1000rpx; height: 1000rpx;
background-image: url(https://oss.wish.ydxxkj.top/xy/%E4%BF%A1%E6%9C%AD%E8%83%8C%E6%99%AF.png); 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 { .main-item {
@ -101,7 +101,7 @@
justify-content: center; justify-content: center;
align-items: center; align-items: center;
overflow: hidden; overflow: hidden;
background-image: url(https://oss.wish.ydxxkj.top/xy/%E7%BA%B8%E6%9D%A1.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/%E7%BA%B8%E6%9D%A1.png);
} }
.item-text-name { .item-text-name {

@ -8,7 +8,7 @@
height:48rpx; height:48rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/reback.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/reback.png);
} }
.title{ .title{
@ -44,7 +44,7 @@ text-align: center;
background-size:100% 100%; background-size:100% 100%;
margin-left:29.33rpx; margin-left:29.33rpx;
margin-top: 98rpx; margin-top: 98rpx;
background-image: url(https://oss.wish.ydxxkj.top/xy/bkg.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/bkg.png);
color:#9A9A9A; color:#9A9A9A;
text-align: center; text-align: center;
font-size: 27rpx; font-size: 27rpx;
@ -59,7 +59,7 @@ text-align: center;
background-size:100% 100%; background-size:100% 100%;
margin-left:146.67rpx; margin-left:146.67rpx;
margin-top: 234rpx; margin-top: 234rpx;
background-image: url(https://oss.wish.ydxxkj.top/xy/xzt.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/xzt.png);
color:#9A9A9A; color:#9A9A9A;
text-align: center; text-align: center;
font-size: 27rpx; font-size: 27rpx;
@ -75,7 +75,7 @@ text-align: center;
background-size:100% 100%; background-size:100% 100%;
margin-left:146.67rpx; margin-left:146.67rpx;
margin-top: 702rpx; margin-top: 702rpx;
background-image: url(https://oss.wish.ydxxkj.top/xy/fgx.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/fgx.png);
color:#9A9A9A; color:#9A9A9A;
text-align: center; text-align: center;
font-size: 27rpx; font-size: 27rpx;
@ -91,7 +91,7 @@ text-align: center;
background-size:100% 100%; background-size:100% 100%;
margin-left:228.67rpx; margin-left:228.67rpx;
margin-top: 558.67rpx; margin-top: 558.67rpx;
background-image: url(https://oss.wish.ydxxkj.top/xy/xzbtn.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/xzbtn.png);
color:#9A9A9A; color:#9A9A9A;
text-align: center; text-align: center;
font-size: 27rpx; font-size: 27rpx;
@ -107,7 +107,7 @@ text-align: center;
background-size:100% 100%; background-size:100% 100%;
margin-left:228.67rpx; margin-left:228.67rpx;
margin-top: 1108.67rpx; margin-top: 1108.67rpx;
background-image: url(https://oss.wish.ydxxkj.top/xy/jbbtn.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/jbbtn.png);
color:#9A9A9A; color:#9A9A9A;
text-align: center; text-align: center;
font-size: 27rpx; font-size: 27rpx;
@ -123,7 +123,7 @@ text-align: center;
background-size:100% 100%; background-size:100% 100%;
margin-left:146.67rpx; margin-left:146.67rpx;
margin-top: 784rpx; margin-top: 784rpx;
background-image: url(https://oss.wish.ydxxkj.top/xy/jbt.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/jbt.png);
color:#9A9A9A; color:#9A9A9A;
text-align: center; text-align: center;
font-size: 27rpx; font-size: 27rpx;
@ -195,7 +195,7 @@ text-align: center;
top: 50rpx; top: 50rpx;
width: 30px; width: 30px;
height: 16px; height: 16px;
background-image: url(https://oss.wish.ydxxkj.top/xy/qlzjt.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/qlzjt.png);
color:#9A9A9A; color:#9A9A9A;
text-align: center; text-align: center;
font-size: 27rpx; font-size: 27rpx;
@ -283,7 +283,7 @@ font-family: SourceHanSansSC-medium;
top: 287px; top: 287px;
width: 93px; width: 93px;
height: 65px; height: 65px;
background-image: url(https://oss.wish.ydxxkj.top/xy/%E4%BF%A1%E5%B0%81.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/%E4%BF%A1%E5%B0%81.png);
} }
.tt{ .tt{
display: inline-block; display: inline-block;
@ -307,7 +307,7 @@ font-family: SourceHanSansSC-medium;
width: 180px; width: 180px;
height: 60px; height: 60px;
line-height: 60px; line-height: 60px;
background-image: url(https://oss.wish.ydxxkj.top/xy/textpic.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/textpic.png);
color: rgba(51, 51, 51, 1); color: rgba(51, 51, 51, 1);
font-size: 14px; font-size: 14px;
text-align: left; text-align: left;
@ -357,7 +357,7 @@ font-family: SourceHanSansSC-medium;
top: 6px; top: 6px;
width: 30px; width: 30px;
height: 30px; height: 30px;
background-image: url(https://oss.wish.ydxxkj.top/xy/yppic.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/yppic.png);
} }
.dfaudiologotxt{ .dfaudiologotxt{
@ -387,7 +387,7 @@ font-family: SourceHanSansSC-medium;
margin-left: 215px; margin-left: 215px;
width: 93px; width: 93px;
height: 65px; height: 65px;
background-image: url(https://oss.wish.ydxxkj.top/xy/%E4%BF%A1%E5%B0%81.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/%E4%BF%A1%E5%B0%81.png);
} }
.zjydwd1{ .zjydwd1{
position: absolute; position: absolute;
@ -425,7 +425,7 @@ font-family: SourceHanSansSC-medium;
top: 6px; top: 6px;
width: 30px; width: 30px;
height: 30px; height: 30px;
background-image: url(https://oss.wish.ydxxkj.top/xy/yppic.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/yppic.png);
} }
.zjypwz1{ .zjypwz1{
position: absolute; position: absolute;
@ -462,7 +462,7 @@ font-family: SourceHanSansSC-regular;
width: 180px; width: 180px;
height: 60px; height: 60px;
line-height: 60px; line-height: 60px;
background-image: url(https://oss.wish.ydxxkj.top/xy/textpic.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/textpic.png);
color: rgba(51, 51, 51, 1); color: rgba(51, 51, 51, 1);
font-size: 14px; font-size: 14px;
text-align: left; text-align: left;
@ -536,14 +536,14 @@ font-family: SourceHanSansSC-regular;
padding-top: 110rpx ; padding-top: 110rpx ;
box-sizing: border-box; box-sizing: border-box;
background-size: contain; background-size: contain;
background-image: url(https://oss.wish.ydxxkj.top/xy/%E7%BB%91%E5%AE%9A%E6%83%85%E4%BE%A3%E8%83%8C%E6%99%AF.png); 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 { .openSend-main-img {
width: 404rpx; width: 404rpx;
height: 404rpx; height: 404rpx;
margin: 0 auto; margin: 0 auto;
background-image: url(https://oss.wish.ydxxkj.top/xy/%E9%92%BB%E7%9F%B3.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/%E9%92%BB%E7%9F%B3.png);
background-size: contain; background-size: contain;
} }

@ -40,6 +40,15 @@ Page({
userInfo:{} userInfo:{}
}, },
doLuYINBoF(e){ 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){//此时点击为关闭 if(!e.currentTarget.dataset.bf){//此时点击为关闭
//设置当前状态为关闭,并关闭 //设置当前状态为关闭,并关闭
@ -380,6 +389,10 @@ Page({
this.setData({dkTpVisible:true}) this.setData({dkTpVisible:true})
console.log(e.currentTarget.dataset.tp) console.log(e.currentTarget.dataset.tp)
console.log('查看图片详情') 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}}" //bindtap="dKztDetial" data-xq="{{item}}"
dKztDetial(e){/**查看详情 */ dKztDetial(e){/**查看详情 */
@ -446,6 +459,21 @@ Page({
const minutes = date.getMinutes() const minutes = date.getMinutes()
item.createdAt = `${year}${month}${day}${hours}:${minutes}` 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:list.reverse()})
} }
}).catch((err)=>{ }).catch((err)=>{
@ -572,6 +600,12 @@ Page({
onReady() { onReady() {
this.doQueryInit() this.doQueryInit()
this.doMessageInfo() this.doMessageInfo()
const time = setInterval(() => {
this.doMessageInfo()
console.log('1111');
}, 2000);
this.setData({time: time})
}, },
/** /**
@ -586,6 +620,7 @@ Page({
*/ */
onHide() { onHide() {
this.data.innerAudioContext.stop() this.data.innerAudioContext.stop()
clearInterval(this.data.time)
}, },
/** /**

@ -1,20 +1,31 @@
<!--pages/home/xx/lindex/lindex.wxml 星讯:非情侣页面--> <!--pages/home/xx/lindex/lindex.wxml 星讯:非情侣页面-->
<view catchtap="allTap"> <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 class="ltinfo"> <view class="ltinfo">
<!--聊天页头部:粉色那一部分--> <!--聊天页头部:粉色那一部分-->
<view class="bkgfs" id="button"> <view class="bkgfs" id="button">
<view class="bkgfstxt">
欢迎来到你们的专属情侣树洞
在这里你可以将你的心意传递给ta
所有美好的回忆都将被精灵记录
</view>
</view>
<!--最上方的两个头像--> <!--最上方的两个头像-->
<view class="bkgfs-img">
<t-image class="txl" shape="circle" src="{{userInfo.avatar}}"></t-image><!--当前用户头像--> <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><!--当前用户头像--> <t-image class="txr" shape="circle" src="{{loverInfo.avatar}}"></t-image><!--当前用户头像-->
<!--头像中间的连接图--> </view>
<view class="qlzjt"></view>
<view class="bkgfstxt">
<view class="txt"> 欢迎来到你们的专属情侣树洞</view>
<view class="txt"> 在这里你可以将你的心意传递给ta</view>
<view class="txt"> 所有美好的回忆都将被精灵记录</view>
</view>
</view>
<!--聊天内容部分--> <!--聊天内容部分-->
<view class="ltxinxi"> <view class="ltxinxi">
@ -64,7 +75,7 @@
<view class="zjypt11"> <view class="zjypt11">
<view class="box2" style="float: left; height: 60rpx; width: 1000px;"> <view class="box2" style="float: left; height: 60rpx; width: 1000px;">
<image wx:for="{{xhCstP}}" wx:key="index" style="height: 60rpx;width: 60rpx;" <image wx:for="{{xhCstP}}" wx:key="index" style="height: 60rpx;width: 60rpx;"
src="https://oss.wish.ydxxkj.top/xy/yppic.png" mode=""/> src="https://wish-assets.windymuse.com.cn/xy/yppic.png" mode=""/>
</view> </view>
</view> </view>
<view class="zjypwz1">{{item.extra.ssec}}</view> <view class="zjypwz1">{{item.extra.ssec}}</view>
@ -102,54 +113,76 @@
src="{{'https://xzjl-api.windymuse.cn/api/resource/'+item.resourceId+'?k='+userInfo.id}}" src="{{'https://xzjl-api.windymuse.cn/api/resource/'+item.resourceId+'?k='+userInfo.id}}"
class="zjxftp3" mode="heightFix" class="zjxftp3" mode="heightFix"
bindtap="go2SeeHxDetail" bindtap="go2SeeHxDetail"
data-id="{{item.id}}"
data-tp="{{'https://xzjl-api.windymuse.cn/api/resource/'+item.resourceId+'?k='+userInfo.id}}" data-tp="{{'https://xzjl-api.windymuse.cn/api/resource/'+item.resourceId+'?k='+userInfo.id}}"
></t-image> ></t-image>
<view class="zjydwdtp3">{{item.status=='unread'?'未读':'已读'}}</view> <view class="zjydwdtp3">{{item.status=='unread'?'未读':'已读'}}</view>
</view> </view>
</view> </view>
<!-- 文本内容 -->
<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>
<t-image <!-- 音频内容 -->
wx:if="{{item.type!='graphic'}}" <view wx:if="{{item.type=='audio'}}" class="zjtableatp2">
src="{{loverInfo.avatar}}" <view class="zttp12" wx:if="{{item.type=='audio'}}">
class="wchattxk1" <t-image src="{{loverInfo.avatar}}" class="wchattxk11" shape="circle" ></t-image><!--对方的的头像框-->
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 <view
bindtap="dKztDetial" data-bf="{{!item.extra.isBf}}"
data-xq="{{item}}" class="zjypk1" wx:if="{{!item.extra.isBf}}"
class="dftext" data-tp="{{'https://xzjl-api.windymuse.cn/api/resource/'+item.resourceId+'?k='+userInfo.id}}"
wx:if="{{item.type=='text'}}" data-index="{{index}}"
bindtap="doLuYINBoF"
data-item="{{item}}"
> >
<view class="xjtext">{{item.content}}</view> <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>
<view class="zjydwdtp3">{{item.status=='unread'?'未读':'已读'}}</view>
</view>
</view> </view>
<view class="dftextwd" wx:if="{{item.type=='text'}}">{{item.status=='unread'?'未读':'已读'}}</view>
<!--音频--> <!-- 信件内容 -->
<view class="dfaudio" wx:if="{{item.type=='audio'}}"> <view wx:if="{{item.type=='xj'}}" class="zjtableatp2">
<view class="dfaudiologo"></view> <view class="zttp12" wx:if="{{item.type=='xj'}}">
<view class="dfaudiologotxt">2222</view></view> <t-image src="{{loverInfo.avatar}}" class="wchattxk11" shape="circle" ></t-image><!--对方的的头像框-->
<view class="dftextwd" wx:if="{{item.type=='audio'}}">{{item.status=='unread'?'未读':'已读'}}</view> <view class="dfxf" wx:if="{{item.type=='xj'}}"></view>
<view class="dfxfydwd" wx:if="{{item.type=='xj'}}">{{item.status=='unread'?'未读':'已读'}}</view>
<view class="zjydwdtp3">{{item.status=='unread'?'未读':'已读'}}</view>
</view>
</view> </view>
</view> </view>
</view>
<view class="cqlgd"></view> <view class="cqlgd"></view>
</view> </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>
<!--星讯聊天下方菜单栏--> <!--星讯聊天下方菜单栏-->
<view class="xfgjl" wx:if="{{hasLover}}"> <view class="xfgjl" wx:if="{{hasLover}}">
@ -176,11 +209,12 @@
</t-popup> </t-popup>
<t-popup visible="{{dkTpVisible}}" placement="top" class="ztPop1"> <t-popup visible="{{dkTpVisible}}" placement="top" class="ztPop1">
<view class="ztPop1-header">
<t-image src="{{imgPicUrl}}" mode="widthFix" class="tppp1"></t-image>
<!--返回图标-->
<view class="reback" bindtap="go2Reback1"></view> <view class="reback" bindtap="go2Reback1"></view>
<view class="title">画像</view> <view class="title">画像</view>
</view>
<t-image src="{{imgPicUrl}}" mode="widthFix" class="tppp1"></t-image>
<!--返回图标-->
<view class="tpBcan1" bindtap="go2BcPic">保存</view> <view class="tpBcan1" bindtap="go2BcPic">保存</view>
</t-popup> </t-popup>
@ -204,7 +238,7 @@
<!--轮播图位置--> <!--轮播图位置-->
<view class="luyinlbt" wx:if="{{luYinStatus==1}}"> <view class="luyinlbt" wx:if="{{luYinStatus==1}}">
<view class="box2" style="float: left; height: 50rpx; width: 1000px; " > <view class="box2" style="float: left; height: 50rpx; width: 1000px; " >
<image wx:for="{{xhCstP}}" wx:key="index" style="height: 50rpx;width: 50rpx;" src="https://oss.wish.ydxxkj.top/xy/lylbt.png" mode=""/> <image wx:for="{{xhCstP}}" wx:key="index" style="height: 50rpx;width: 50rpx;" src="https://wish-assets.windymuse.com.cn/xy/lylbt.png" mode=""/>
</view> </view>
</view> </view>
<view class="luyinlbt1" wx:if="{{luYinStatus!=1}}"> <view class="luyinlbt1" wx:if="{{luYinStatus!=1}}">

@ -1,55 +1,150 @@
/* pages/home/xx/lindex/lindex.wxss */ /* pages/home/xx/lindex/lindex.wxss */
/* pages/home/xx/index.wxss */ /* pages/home/xx/index.wxss */
/* pages/home/xyc/wdyw/wdyw.wxss */ /* pages/home/xyc/wdyw/wdyw.wxss */
.reback{
.allTap {
position: relative;
width: 100%;
height: 100%;
}
.allTap-header {
position: fixed; position: fixed;
margin-left: 20rpx; top: 0;
margin-top:108rpx; 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{
width:48rpx; width:48rpx;
height:48rpx; height:48rpx;
position: absolute;
left: 20rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/reback.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/reback.png);
} }
.title{ .title{
position: fixed;
left: 278rpx;
top: 108rpx;
width: 196rpx; width: 196rpx;
height: 48rpx; height: 48rpx;
color: rgba(108, 108, 108, 1); color: rgba(108, 108, 108, 1);
font-size: 32rpx; font-size: 32rpx;
text-align: center; 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{ .bkgfs{
position: absolute; position: relative;
left: 96rpx; width: 100%;
top: 70rpx; display: flex;
width: 558rpx; justify-content: center;
height: 256rpx; align-items: center;
flex-direction: column;
line-height: 40rpx; line-height: 40rpx;
border-radius: 30rpx; border-radius: 30rpx;
background-color: rgba(253, 190, 196, 1);
text-align: center; text-align: center;
} }
.bkg{ .bkgfs-img {
position: absolute; position: absolute;
width: 691.33rpx; top: 28rpx;
height: 1326rpx; width: 100%;
display: flex; display: flex;
flex-direction: column; justify-content: center;
background-repeat: no-repeat; align-items: center;
background-size:100% 100%; }
margin-left:29.33rpx;
margin-top: 98rpx; .bkgfs-img-middle {
background-image: url(https://oss.wish.ydxxkj.top/xy/bkg.png); width: 60rpx;
color:#9A9A9A; 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;
line-height: 20px;
border-radius: 30rpx;
color: #fff;
font-size: 28rpx;
text-align: center;
padding: 74rpx 56rpx 0 56rpx;
box-sizing: border-box;
background-color: rgba(253, 190, 196, 1);
}
.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;
text-align: center; text-align: center;
font-size: 27rpx;
} }
.xzt{ .xzt{
position: absolute; position: absolute;
width: 398rpx; width: 398rpx;
@ -60,7 +155,7 @@
background-size:100% 100%; background-size:100% 100%;
margin-left:146.67rpx; margin-left:146.67rpx;
margin-top: 234rpx; margin-top: 234rpx;
background-image: url(https://oss.wish.ydxxkj.top/xy/xzt.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/xzt.png);
color:#9A9A9A; color:#9A9A9A;
text-align: center; text-align: center;
font-size: 27rpx; font-size: 27rpx;
@ -76,7 +171,7 @@
background-size:100% 100%; background-size:100% 100%;
margin-left:146.67rpx; margin-left:146.67rpx;
margin-top: 702rpx; margin-top: 702rpx;
background-image: url(https://oss.wish.ydxxkj.top/xy/fgx.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/fgx.png);
color:#9A9A9A; color:#9A9A9A;
text-align: center; text-align: center;
font-size: 27rpx; font-size: 27rpx;
@ -92,7 +187,7 @@
background-size:100% 100%; background-size:100% 100%;
margin-left:228.67rpx; margin-left:228.67rpx;
margin-top: 558.67rpx; margin-top: 558.67rpx;
background-image: url(https://oss.wish.ydxxkj.top/xy/xzbtn.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/xzbtn.png);
color:#9A9A9A; color:#9A9A9A;
text-align: center; text-align: center;
font-size: 27rpx; font-size: 27rpx;
@ -108,7 +203,7 @@
background-size:100% 100%; background-size:100% 100%;
margin-left:228.67rpx; margin-left:228.67rpx;
margin-top: 1108.67rpx; margin-top: 1108.67rpx;
background-image: url(https://oss.wish.ydxxkj.top/xy/jbbtn.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/jbbtn.png);
color:#9A9A9A; color:#9A9A9A;
text-align: center; text-align: center;
font-size: 27rpx; font-size: 27rpx;
@ -124,30 +219,12 @@
background-size:100% 100%; background-size:100% 100%;
margin-left:146.67rpx; margin-left:146.67rpx;
margin-top: 784rpx; margin-top: 784rpx;
background-image: url(https://oss.wish.ydxxkj.top/xy/jbt.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/jbt.png);
color:#9A9A9A; color:#9A9A9A;
text-align: center; text-align: center;
font-size: 27rpx; 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{ .xfgjl{
position: fixed; position: fixed;
bottom: 30rpx; bottom: 30rpx;
@ -158,58 +235,6 @@ font-family: SourceHanSansSC-regular;
justify-content: space-evenly; justify-content: space-evenly;
} }
.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: 244rpx;
top: 30rpx;
width: 72rpx;
height: 72rpx;
}
.txr{
position: absolute;
top: 30rpx;
left:434rpx;
width: 72rpx;
height: 72rpx;
}
.qlzjt{
position: absolute;
left: 346rpx;
top: 50rpx;
width: 60rpx;
height: 32rpx;
background-image: url(https://oss.wish.ydxxkj.top/xy/qlzjt.png);
color:#9A9A9A;
text-align: center;
font-size: 27rpx;
}
.bkgfstxt{
position: absolute;
left: 56rpx;
top: 74rpx;
width: 446rpx;
height: 146rpx;
color: rgba(255, 255, 255, 1);
font-size: 28rpx;
text-align: center;
font-family: SourceHanSansSC-regular;
}
.xxqlcd{ .xxqlcd{
/* position: absolute; */ /* position: absolute; */
/* top: 32rpx; */ /* top: 32rpx; */
@ -241,23 +266,7 @@ text-align: center;
left: 299px; left: 299px;
} }
.ltxinxi{
position: absolute;
margin-top:360rpx;
width: 750rpx;
}
.wchatfor{
width: 750rpx;
padding: 0 64rpx;
box-sizing: border-box;
}
.wchattime{
width: 750rpx;
margin-top: 32rpx;
color: rgba(153, 153, 153, 1);
font-size: 24rpx;
text-align: center;
}
.wchattxk{ .wchattxk{
display: inline-block; display: inline-block;
margin-left: 317px; margin-left: 317px;
@ -279,7 +288,7 @@ text-align: center;
top: 287px; top: 287px;
width: 93px; width: 93px;
height: 65px; height: 65px;
background-image: url(https://oss.wish.ydxxkj.top/xy/%E4%BF%A1%E5%B0%81.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/%E4%BF%A1%E5%B0%81.png);
} }
.tt{ .tt{
display: inline-block; display: inline-block;
@ -303,7 +312,7 @@ text-align: center;
width: 180px; width: 180px;
height: 60px; height: 60px;
line-height: 60px; line-height: 60px;
background-image: url(https://oss.wish.ydxxkj.top/xy/%E7%BA%B8%E6%9D%A1.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/%E7%BA%B8%E6%9D%A1.png);
color: rgba(51, 51, 51, 1); color: rgba(51, 51, 51, 1);
font-size: 14px; font-size: 14px;
text-align: left; text-align: left;
@ -353,7 +362,7 @@ text-align: center;
top: 6px; top: 6px;
width: 30px; width: 30px;
height: 30px; height: 30px;
background-image: url(https://oss.wish.ydxxkj.top/xy/yppic.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/yppic.png);
} }
.dfaudiologotxt{ .dfaudiologotxt{
@ -382,7 +391,7 @@ text-align: center;
margin-left: 215px; margin-left: 215px;
width: 93px; width: 93px;
height: 65px; height: 65px;
background-image: url(https://oss.wish.ydxxkj.top/xy/%E4%BF%A1%E5%B0%81.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/%E4%BF%A1%E5%B0%81.png);
} }
.zjydwd1{ .zjydwd1{
position: absolute; position: absolute;
@ -420,7 +429,7 @@ text-align: center;
height: 60rpx; height: 60rpx;
margin-right: 20rpx; margin-right: 20rpx;
background-size: cover; background-size: cover;
background-image: url(https://oss.wish.ydxxkj.top/xy/yppic.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/yppic.png);
} }
.zjypt11{ .zjypt11{
width: 60rpx; width: 60rpx;
@ -456,7 +465,7 @@ text-align: center;
height: 120rpx; height: 120rpx;
line-height: 60px; line-height: 60px;
background-size: contain; background-size: contain;
background-image: url(https://oss.wish.ydxxkj.top/xy/%E7%BA%B8%E6%9D%A1.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/%E7%BA%B8%E6%9D%A1.png);
color: rgba(51, 51, 51, 1); color: rgba(51, 51, 51, 1);
font-size: 14px; font-size: 14px;
text-align: left; text-align: left;
@ -499,7 +508,7 @@ text-align: center;
top: 111px; top: 111px;
width: 298px; width: 298px;
height: 542px; height: 542px;
background-image: url(https://oss.wish.ydxxkj.top/xy/ztbkg11.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/ztbkg11.png);
} }
.btn1{ .btn1{
@ -574,7 +583,7 @@ border: 3px solid rgba(255, 255, 255, 1);
top: 562px; top: 562px;
width: 30px; width: 30px;
height: 30px; height: 30px;
background-image: url(https://oss.wish.ydxxkj.top/xy/xtreturn.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/xtreturn.png);
} }
.t-textarea{ .t-textarea{
background-color: transparent!important; background-color: transparent!important;
@ -591,7 +600,7 @@ background-image: url(https://oss.wish.ydxxkj.top/xy/xtreturn.png);
.zjtableatp2{ .zjtableatp2{
width: 100%; width: 100%;
height: 220rpx; height: 150rpx;
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
align-items: center; align-items: center;
@ -645,7 +654,8 @@ background-image: url(https://oss.wish.ydxxkj.top/xy/xtreturn.png);
} }
.zttp12{ .zttp12{
height: 200rpx; width: 100%;
height: 100%;
display: flex; display: flex;
align-items: center; align-items: center;
} }
@ -655,14 +665,17 @@ background-image: url(https://oss.wish.ydxxkj.top/xy/xtreturn.png);
align-items: flex-end; align-items: flex-end;
color: rgba(206, 206, 206, 1); color: rgba(206, 206, 206, 1);
font-size: 24rpx; font-size: 24rpx;
margin: 0 0 60rpx 10rpx;
} }
.zjxftp3{ .zjxftp3{
height: 200rpx; height: 200rpx;
max-width: 480rpx; max-width: 480rpx;
} }
.wchattxk11{ .wchattxk11{
width: 72rpx; width: 84rpx;
height: 72rpx; height: 84rpx;
margin-right: 24rpx;
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4);
} }
.tppp1{ .tppp1{
@ -673,28 +686,39 @@ background-image: url(https://oss.wish.ydxxkj.top/xy/xtreturn.png);
margin-top: 300rpx; margin-top: 300rpx;
} }
.ztPop1{ .ztPop1{
position: absolute; position: relative;
width:750rpx ; width: 750rpx ;
height: 1624rpx; height: 1624rpx;
margin: 0!important; margin: 0!important;
padding: 0!important; padding: 0!important;
display: table-cell; display: table-cell;
vertical-align: middle; vertical-align: middle;
} }
.ztPop1-header {
width: 100%;
margin-top: 88rpx;
padding: 20rpx;
box-sizing: border-box;
display: flex;
justify-content: center;
}
.tpBcan1{ .tpBcan1{
position: absolute; position: absolute;
left: 304px; top: 1400rpx;
top: 727px; right: 32rpx;
width: 55px; width: 110rpx;
height: 35px; height: 70rpx;
line-height: 70rpx; line-height: 70rpx;
border-radius: 10px; border-radius: 20rpx;
background: linear-gradient(222.54deg, rgba(248,99,42,1) 14.03%,rgba(249,135,89,1) 85.21%); background: linear-gradient(222.54deg, rgba(248,99,42,1) 14.03%,rgba(249,135,89,1) 85.21%);
text-align: center; text-align: center;
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4); box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4);
border: 3px solid rgba(255, 255, 255, 1); border: 3px solid rgba(255, 255, 255, 1);
color: rgba(255, 255, 255, 1); color: rgba(255, 255, 255, 1);
font-size: 14px; font-size: 28rpx;
text-align: center; text-align: center;
font-family: SourceHanSansSC-medium; font-family: SourceHanSansSC-medium;
} }
@ -721,13 +745,6 @@ top: 727px;
height: 116rpx; height: 116rpx;
} }
.title {
flex: 1;
text-align: center;
font-weight: 600;
font-size: 36rpx;
}
.btn { .btn {
font-size: 32rpx; font-size: 32rpx;
padding: 32rpx; padding: 32rpx;
@ -884,7 +901,7 @@ top: 727px;
border-left: 60rpx solid rgba(248,99,42,1); border-left: 60rpx solid rgba(248,99,42,1);
border-bottom: 35rpx solid transparent; */ border-bottom: 35rpx solid transparent; */
background-size: cover; background-size: cover;
background-image: url(https://oss.wish.ydxxkj.top/xy/if-ui-play%20Copy%401x.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/if-ui-play%20Copy%401x.png);
} }
.luyinlbt1{ .luyinlbt1{
position: absolute; position: absolute;
@ -892,7 +909,7 @@ top: 727px;
height: 50rpx; height: 50rpx;
top:198rpx; top:198rpx;
overflow: hidden; overflow: hidden;
background-image: url(https://oss.wish.ydxxkj.top/xy/lylbt.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/lylbt.png);
} }
.xiexinzha{ .xiexinzha{
@ -941,7 +958,7 @@ border: 3px solid rgba(255, 255, 255, 1);
top: 52px; top: 52px;
width: 345px; width: 345px;
height: 115px; height: 115px;
background-image: url(https://oss.wish.ydxxkj.top/xy/xzhlpic.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/xzhlpic.png);
} }
.xfxfhl{ .xfxfhl{
@ -951,7 +968,7 @@ border: 3px solid rgba(255, 255, 255, 1);
top: 331px; top: 331px;
width: 375px; width: 375px;
height: 462px; height: 462px;
background-image: url(https://oss.wish.ydxxkj.top/xy/xfxfhlpic.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/xfxfhlpic.png);
} }
.xzxfnr{ .xzxfnr{
position: absolute; position: absolute;
@ -960,7 +977,7 @@ border: 3px solid rgba(255, 255, 255, 1);
width: 315px; width: 315px;
height: 657px; height: 657px;
overflow: auto; overflow: auto;
background-image: url(https://oss.wish.ydxxkj.top/xy/xznrpic.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/xznrpic.png);
} }
.xfzjhz{ .xfzjhz{
position: absolute; position: absolute;
@ -968,7 +985,7 @@ border: 3px solid rgba(255, 255, 255, 1);
top: 482rpx; top: 482rpx;
width: 73px; width: 73px;
height: 71px; height: 71px;
background-image: url(https://oss.wish.ydxxkj.top/xy/%E5%8D%B0%E7%AB%A0.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/%E5%8D%B0%E7%AB%A0.png);
} }
.xzfhan{ .xzfhan{
@ -1009,7 +1026,7 @@ border: 3px solid rgba(255, 255, 255, 1);
top: 24rpx; top: 24rpx;
width: 30px; width: 30px;
height: 30px; height: 30px;
background-image: url(https://oss.wish.ydxxkj.top/xy/xtreturn.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/xtreturn.png);
} }
.xzxjto{ .xzxjto{
margin-left: 50rpx; margin-left: 50rpx;

@ -32,7 +32,8 @@ Page({
btn2:false, btn2:false,
btn3:false, btn3:false,
btn4:false, btn4:false,
showSoundImg:true showSoundImg:true,
isPlaying: false, // 是否正在播放语音
}, },
already(){ already(){
console.log('确定寄出'); console.log('确定寄出');
@ -309,6 +310,9 @@ Page({
}, },
// 点击音频试听 // 点击音频试听
listen(e){ listen(e){
if (this.data.isPlaying) {
return; // 如果正在播放语音,则不触发事件
}
const id = e.currentTarget.dataset.url.resourceId const id = e.currentTarget.dataset.url.resourceId
const videoSrc = this.data.audioList.find(item => { const videoSrc = this.data.audioList.find(item => {
return item.resourceId === id return item.resourceId === id
@ -317,6 +321,10 @@ Page({
const innerAudioContext = wx.createInnerAudioContext() const innerAudioContext = wx.createInnerAudioContext()
innerAudioContext.src = videoSrc innerAudioContext.src = videoSrc
innerAudioContext.play() // 播放 innerAudioContext.play() // 播放
this.setData({ isPlaying: true }); // 设置为正在播放语音
innerAudioContext.onEnded(() => {
this.setData({ isPlaying: false }); // 播放完毕后设置为非播放状态
});
}, },
getUserInfo(){ getUserInfo(){
req.getRequest('/api/user/curt',{}).then(res => { req.getRequest('/api/user/curt',{}).then(res => {

@ -21,7 +21,7 @@
</view> </view>
<!-- 信件语音 --> <!-- 信件语音 -->
<view class="{{Preview ? 'xinfo-ltqp-yl' : 'xinfo-ltqp'}}" wx:for="{{audioList}}" wx:key="index" bindtap="listen" data-url="{{item}}"> <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://oss.wish.ydxxkj.top/xy/%E8%AF%AD%E9%9F%B3.png"></image> <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> <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}}"/> <t-icon class="xinfo-close" name="close-circle" size="48rpx" wx:if="{{!Preview}}" bindtap="ClearYl" data-id="{{item.resourceId}}"/>
</view> </view>
@ -42,7 +42,7 @@
</view> </view>
<view class="bgt2" wx:if="{{showBtn}}"> <view class="bgt2" wx:if="{{showBtn}}">
<view class="bgt2-btn1" bindtap="goBack"> <view class="bgt2-btn1" bindtap="goBack">
<image src="https://oss.wish.ydxxkj.top/xy/iconPark-return%401x.png"></image> <image src="https://wish-assets.windymuse.com.cn/xy/iconPark-return%401x.png"></image>
</view> </view>
<view class="bgt2-btn2" bindtap="openSound" wx:if="{{!Preview}}">音讯</view> <view class="bgt2-btn2" bindtap="openSound" wx:if="{{!Preview}}">音讯</view>
<view class="bgt2-btn3" bindtap="addImg" wx:if="{{!Preview}}">画像</view> <view class="bgt2-btn3" bindtap="addImg" wx:if="{{!Preview}}">画像</view>
@ -68,7 +68,7 @@
<view class="sound-box-time">{{soundTime}}</view> <view class="sound-box-time">{{soundTime}}</view>
<view class="sound-box-img" wx:if="{{showSoundImg}}"></view> <view class="sound-box-img" wx:if="{{showSoundImg}}"></view>
<view class="sound-box-img2" wx:if="{{!showSoundImg}}"> <view class="sound-box-img2" wx:if="{{!showSoundImg}}">
<image wx:for="{{35}}" wx:key="index" src="https://oss.wish.ydxxkj.top/xy/iconPark-acoustic%20Copy%203%401x.png"/> <image wx:for="{{35}}" wx:key="index" src="https://wish-assets.windymuse.com.cn/xy/iconPark-acoustic%20Copy%203%401x.png"/>
</view> </view>
<view class="sound-box-btn"> <view class="sound-box-btn">
<view class="btn1" wx:if="{{btn1}}" bindtap="startSound"> <view class="btn1" wx:if="{{btn1}}" bindtap="startSound">

@ -14,7 +14,7 @@ page {
background-size:100% 100%; background-size:100% 100%;
margin-left:30rpx; margin-left:30rpx;
margin-top: 104.67rpx; margin-top: 104.67rpx;
background-image: url(https://oss.wish.ydxxkj.top/xy/bgt1.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/bgt1.png);
color:#9A9A9A; color:#9A9A9A;
text-align: center; text-align: center;
font-size: 27rpx; font-size: 27rpx;
@ -29,7 +29,7 @@ page {
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
margin-top: 608.67rpx; margin-top: 608.67rpx;
background-image: url(https://oss.wish.ydxxkj.top/xy/bgt2.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/bgt2.png);
color:#9A9A9A; color:#9A9A9A;
text-align: center; text-align: center;
font-size: 27rpx; font-size: 27rpx;
@ -157,7 +157,7 @@ textarea {
display: flex; display: flex;
align-items: center; align-items: center;
background-size: contain; background-size: contain;
background-image: url(https://oss.wish.ydxxkj.top/xy/ltqpp.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/ltqpp.png);
} }
.xinfo-ltqp-yl { .xinfo-ltqp-yl {
@ -168,7 +168,7 @@ textarea {
display: flex; display: flex;
align-items: center; align-items: center;
background-size: contain; background-size: contain;
background-image: url(https://oss.wish.ydxxkj.top/xy/ltqpp.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/ltqpp.png);
} }
.xinfo-ltqp-yl image { .xinfo-ltqp-yl image {
@ -329,7 +329,7 @@ textarea {
left: 310rpx; left: 310rpx;
width: 146rpx; width: 146rpx;
height: 146rpx; height: 146rpx;
background-image: url(https://oss.wish.ydxxkj.top/xy/%E5%8D%B0%E7%AB%A0.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/%E5%8D%B0%E7%AB%A0.png);
background-size: cover; background-size: cover;
pointer-events: auto; pointer-events: auto;
} }
@ -405,7 +405,7 @@ textarea {
width: 100%; width: 100%;
height: 50rpx; height: 50rpx;
margin-top: 40rpx; margin-top: 40rpx;
background-image: url(https://oss.wish.ydxxkj.top/xy/iconPark-acoustic%20Copy%203%401x%20%281%29.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/iconPark-acoustic%20Copy%203%401x%20%281%29.png);
} }
.sound-box-img2 { .sound-box-img2 {
@ -465,14 +465,14 @@ textarea {
.btn-over { .btn-over {
width: 60rpx; width: 60rpx;
height: 60rpx; height: 60rpx;
background-image: url(https://oss.wish.ydxxkj.top/xy/if-ui-play%20Copy%401x.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/if-ui-play%20Copy%401x.png);
background-size: contain; background-size: contain;
} }
.btn-video { .btn-video {
width: 60rpx; width: 60rpx;
height: 60rpx; height: 60rpx;
background-image: url(https://oss.wish.ydxxkj.top/xy/semiDesign.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/semiDesign.png);
background-size: contain; background-size: contain;
} }
@ -530,7 +530,7 @@ textarea {
width: 100%; width: 100%;
height: 230rpx; height: 230rpx;
margin-top: 104rpx; margin-top: 104rpx;
background-image: url(https://oss.wish.ydxxkj.top/xy/bgt1.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/bgt1.png);
background-size: contain; background-size: contain;
} }
@ -547,7 +547,7 @@ textarea {
width: 660rpx; width: 660rpx;
height: 522rpx; height: 522rpx;
background-size: contain; background-size: contain;
background-image: url(https://oss.wish.ydxxkj.top/xy/xzt.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/xzt.png);
} }
.already-text { .already-text {

@ -32,7 +32,8 @@ Page({
btn2:false, btn2:false,
btn3:false, btn3:false,
btn4:false, btn4:false,
showSoundImg:true showSoundImg:true,
isPlaying: false, // 是否正在播放语音
}, },
already(){ already(){
console.log('确定寄出'); console.log('确定寄出');
@ -309,6 +310,9 @@ Page({
}, },
// 点击音频试听 // 点击音频试听
listen(e){ listen(e){
if (this.data.isPlaying) {
return; // 如果正在播放语音,则不触发事件
}
const id = e.currentTarget.dataset.url.resourceId const id = e.currentTarget.dataset.url.resourceId
const videoSrc = this.data.audioList.find(item => { const videoSrc = this.data.audioList.find(item => {
return item.resourceId === id return item.resourceId === id
@ -317,6 +321,11 @@ Page({
const innerAudioContext = wx.createInnerAudioContext() const innerAudioContext = wx.createInnerAudioContext()
innerAudioContext.src = videoSrc innerAudioContext.src = videoSrc
innerAudioContext.play() // 播放 innerAudioContext.play() // 播放
console.log('播放');
this.setData({ isPlaying: true }); // 设置为正在播放语音
innerAudioContext.onEnded(() => {
this.setData({ isPlaying: false }); // 播放完毕后设置为非播放状态
});
}, },
getUserInfo(){ getUserInfo(){
req.getRequest('/api/user/curt',{}).then(res => { req.getRequest('/api/user/curt',{}).then(res => {

@ -21,7 +21,7 @@
</view> </view>
<!-- 信件语音 --> <!-- 信件语音 -->
<view class="{{Preview ? 'xinfo-ltqp-yl' : 'xinfo-ltqp'}}" wx:for="{{audioList}}" wx:key="index" bindtap="listen" data-url="{{item}}"> <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://oss.wish.ydxxkj.top/xy/%E8%AF%AD%E9%9F%B3.png"></image> <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> <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}}"/> <t-icon class="xinfo-close" name="close-circle" size="48rpx" wx:if="{{!Preview}}" bindtap="ClearYl" data-id="{{item.resourceId}}"/>
</view> </view>
@ -42,7 +42,7 @@
</view> </view>
<view class="bgt2" wx:if="{{showBtn}}"> <view class="bgt2" wx:if="{{showBtn}}">
<view class="bgt2-btn1" bindtap="goBack"> <view class="bgt2-btn1" bindtap="goBack">
<image src="https://oss.wish.ydxxkj.top/xy/iconPark-return%401x.png"></image> <image src="https://wish-assets.windymuse.com.cn/xy/iconPark-return%401x.png"></image>
</view> </view>
<view class="bgt2-btn2" bindtap="openSound" wx:if="{{!Preview}}">音讯</view> <view class="bgt2-btn2" bindtap="openSound" wx:if="{{!Preview}}">音讯</view>
<view class="bgt2-btn3" bindtap="addImg" wx:if="{{!Preview}}">画像</view> <view class="bgt2-btn3" bindtap="addImg" wx:if="{{!Preview}}">画像</view>
@ -68,7 +68,7 @@
<view class="sound-box-time">{{soundTime}}</view> <view class="sound-box-time">{{soundTime}}</view>
<view class="sound-box-img" wx:if="{{showSoundImg}}"></view> <view class="sound-box-img" wx:if="{{showSoundImg}}"></view>
<view class="sound-box-img2" wx:if="{{!showSoundImg}}"> <view class="sound-box-img2" wx:if="{{!showSoundImg}}">
<image wx:for="{{35}}" wx:key="index" src="https://oss.wish.ydxxkj.top/xy/iconPark-acoustic%20Copy%203%401x.png"/> <image wx:for="{{35}}" wx:key="index" src="https://wish-assets.windymuse.com.cn/xy/iconPark-acoustic%20Copy%203%401x.png"/>
</view> </view>
<view class="sound-box-btn"> <view class="sound-box-btn">
<view class="btn1" wx:if="{{btn1}}" bindtap="startSound"> <view class="btn1" wx:if="{{btn1}}" bindtap="startSound">

@ -14,7 +14,7 @@ page {
background-size:100% 100%; background-size:100% 100%;
margin-left:30rpx; margin-left:30rpx;
margin-top: 104.67rpx; margin-top: 104.67rpx;
background-image: url(https://oss.wish.ydxxkj.top/xy/bgt1.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/bgt1.png);
color:#9A9A9A; color:#9A9A9A;
text-align: center; text-align: center;
font-size: 27rpx; font-size: 27rpx;
@ -29,7 +29,7 @@ page {
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
margin-top: 608.67rpx; margin-top: 608.67rpx;
background-image: url(https://oss.wish.ydxxkj.top/xy/bgt2.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/bgt2.png);
color:#9A9A9A; color:#9A9A9A;
text-align: center; text-align: center;
font-size: 27rpx; font-size: 27rpx;
@ -157,7 +157,7 @@ textarea {
display: flex; display: flex;
align-items: center; align-items: center;
background-size: contain; background-size: contain;
background-image: url(https://oss.wish.ydxxkj.top/xy/ltqpp.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/ltqpp.png);
} }
.xinfo-ltqp-yl { .xinfo-ltqp-yl {
@ -168,7 +168,7 @@ textarea {
display: flex; display: flex;
align-items: center; align-items: center;
background-size: contain; background-size: contain;
background-image: url(https://oss.wish.ydxxkj.top/xy/ltqpp.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/ltqpp.png);
} }
.xinfo-ltqp-yl image { .xinfo-ltqp-yl image {
@ -329,7 +329,7 @@ textarea {
left: 310rpx; left: 310rpx;
width: 146rpx; width: 146rpx;
height: 146rpx; height: 146rpx;
background-image: url(https://oss.wish.ydxxkj.top/xy/%E5%8D%B0%E7%AB%A0.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/%E5%8D%B0%E7%AB%A0.png);
background-size: cover; background-size: cover;
pointer-events: auto; pointer-events: auto;
} }
@ -405,7 +405,7 @@ textarea {
width: 100%; width: 100%;
height: 50rpx; height: 50rpx;
margin-top: 40rpx; margin-top: 40rpx;
background-image: url(https://oss.wish.ydxxkj.top/xy/iconPark-acoustic%20Copy%203%401x%20%281%29.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/iconPark-acoustic%20Copy%203%401x%20%281%29.png);
} }
.sound-box-img2 { .sound-box-img2 {
@ -465,14 +465,14 @@ textarea {
.btn-over { .btn-over {
width: 60rpx; width: 60rpx;
height: 60rpx; height: 60rpx;
background-image: url(https://oss.wish.ydxxkj.top/xy/if-ui-play%20Copy%401x.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/if-ui-play%20Copy%401x.png);
background-size: contain; background-size: contain;
} }
.btn-video { .btn-video {
width: 60rpx; width: 60rpx;
height: 60rpx; height: 60rpx;
background-image: url(https://oss.wish.ydxxkj.top/xy/semiDesign.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/semiDesign.png);
background-size: contain; background-size: contain;
} }
@ -530,7 +530,7 @@ textarea {
width: 100%; width: 100%;
height: 230rpx; height: 230rpx;
margin-top: 104rpx; margin-top: 104rpx;
background-image: url(https://oss.wish.ydxxkj.top/xy/bgt1.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/bgt1.png);
background-size: contain; background-size: contain;
} }
@ -547,7 +547,7 @@ textarea {
width: 660rpx; width: 660rpx;
height: 522rpx; height: 522rpx;
background-size: contain; background-size: contain;
background-image: url(https://oss.wish.ydxxkj.top/xy/xzt.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/xzt.png);
} }
.already-text { .already-text {

@ -9,7 +9,7 @@
background-size:100% 100%; background-size:100% 100%;
margin-top:136rpx; margin-top:136rpx;
margin-left: 304rpx; margin-left: 304rpx;
background-image: url(https://oss.wish.ydxxkj.top/xy/jrys.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/jrys.png);
} }
.gold{ .gold{
@ -21,7 +21,7 @@
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
margin-top:240.67rpx; margin-top:240.67rpx;
background-image: url(https://oss.wish.ydxxkj.top/xy/gold.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/gold.png);
} }
.gold1{ .gold1{
@ -37,7 +37,7 @@
top: 0; top: 0;
bottom: 0; bottom: 0;
margin: auto; margin: auto;
background-image: url(https://oss.wish.ydxxkj.top/xy/gold1.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/gold1.png);
} }
.gold111{ .gold111{
position: absolute; position: absolute;
@ -45,7 +45,7 @@
top: 179px; top: 179px;
width: 240px; width: 240px;
height: 240px; height: 240px;
background-image: url(https://oss.wish.ydxxkj.top/xy/gold1.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/gold1.png);
} }
.gold2{ .gold2{
position: absolute; position: absolute;
@ -60,7 +60,7 @@
top: 0; top: 0;
bottom: 0; bottom: 0;
margin: auto; margin: auto;
background-image: url(https://oss.wish.ydxxkj.top/xy/gold22.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/gold22.png);
} }
.gold3{ .gold3{
@ -73,7 +73,7 @@
flex-direction: column; flex-direction: column;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/gold3.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/gold3.png);
} }
.book{ .book{
@ -85,7 +85,7 @@
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
margin-top: 797.33rpx; margin-top: 797.33rpx;
background-image: url(https://oss.wish.ydxxkj.top/xy/book.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/book.png);
} }
.gold2{ .gold2{
@ -101,7 +101,7 @@
top: -12rpx; top: -12rpx;
bottom: 0; bottom: 0;
margin: auto; margin: auto;
background-image: url(https://oss.wish.ydxxkj.top/xy/gold22.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/gold22.png);
} }
.star{ .star{
@ -115,7 +115,7 @@
left: 0; left: 0;
right: 0; right: 0;
margin: 802.67rpx auto; margin: 802.67rpx auto;
background-image: url(https://oss.wish.ydxxkj.top/xy/star.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/star.png);
} }
.xyszy{ .xyszy{
@ -129,7 +129,7 @@
background-size:100% 100%; background-size:100% 100%;
margin-top:1232rpx; margin-top:1232rpx;
margin-left:114rpx; margin-left:114rpx;
background-image: url(https://oss.wish.ydxxkj.top/xy/xyszy.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/xyszy.png);
text-align: center; text-align: center;
font-size: 90rpx; font-size: 90rpx;
color: #6C6C6C; color: #6C6C6C;
@ -145,7 +145,7 @@
background-size:100% 100%; background-size:100% 100%;
margin-top:1232rpx; margin-top:1232rpx;
margin-left:316.67rpx; margin-left:316.67rpx;
background-image: url(https://oss.wish.ydxxkj.top/xy/byz.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/byz.png);
} }
.xyysy{ .xyysy{
@ -162,7 +162,7 @@
font-size: 32rpx; font-size: 32rpx;
margin-top:1232rpx; margin-top:1232rpx;
margin-left:520rpx; margin-left:520rpx;
background-image: url(https://oss.wish.ydxxkj.top/xy/xyszy.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/xyszy.png);
} }
.text1{ .text1{
position: absolute; position: absolute;
@ -234,7 +234,7 @@
height: 22rpx; height: 22rpx;
margin: 70rpx auto; margin: 70rpx auto;
background-size: cover; background-size: cover;
background-image: url(https://oss.wish.ydxxkj.top/xy/xy-toast.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/xy-toast.png);
} }
.ztys{ .ztys{
@ -295,7 +295,7 @@
background-size:100% 100%; background-size:100% 100%;
margin-left:71.33rpx; margin-left:71.33rpx;
margin-top: 206.33rpx; margin-top: 206.33rpx;
background-image: url(https://oss.wish.ydxxkj.top/xy/btn.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/btn.png);
color:#9A9A9A; color:#9A9A9A;
text-align: center; text-align: center;
font-size: 27rpx; font-size: 27rpx;
@ -312,7 +312,7 @@
background-size:100% 100%; background-size:100% 100%;
margin-left:452rpx; margin-left:452rpx;
margin-top: 206.33rpx; margin-top: 206.33rpx;
background-image: url(https://oss.wish.ydxxkj.top/xy/btn.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/btn.png);
color:#9A9A9A; color:#9A9A9A;
text-align: center; text-align: center;
font-size: 27rpx; font-size: 27rpx;

@ -1,6 +1,7 @@
// pages/home/xyc/index.js // pages/home/xyc/index.js
import FormData from './../../../utils/formdata/index' import FormData from './../../../utils/formdata/index'
import Toast from 'tdesign-miniprogram/toast/index'; import Toast from 'tdesign-miniprogram/toast/index';
import Wxml2Canvas from 'wxml2canvas';
const app = getApp();//新建页面时 默认引入 const app = getApp();//新建页面时 默认引入
const req = app.xzjlReq();//初始化一个的request() 实例 const req = app.xzjlReq();//初始化一个的request() 实例
Page({ Page({
@ -32,7 +33,8 @@ Page({
showXyz:false, //显示许愿中弹层 showXyz:false, //显示许愿中弹层
showDetail:false, //许愿成功回显弹层 showDetail:false, //许愿成功回显弹层
shareVisible:false, //显示分享页面 shareVisible:false, //显示分享页面
showToast:false //显示提示弹层 showToast:false, //显示提示弹层
showCanvas:false
}, },
handleAdd(e){/**添加图片 */ handleAdd(e){/**添加图片 */
const { fileList } = this.data; const { fileList } = this.data;
@ -68,13 +70,9 @@ Page({
}, },
success: async res => { success: async res => {
let data = JSON.parse(res.data); let data = JSON.parse(res.data);
console.log(data, '111111');
if (data.code == 200) { if (data.code == 200) {
this.setData({imgUrl:data.data.abUrl}) this.setData({imgUrl:data.data.abUrl})
console.log('打印1111')
console.log(this.data.imgUrl)
res.data = JSON.parse(res.data); res.data = JSON.parse(res.data);
console.log(res.data);
if (res.data.code == 1) { if (res.data.code == 1) {
console.log(res.data.data.url); console.log(res.data.data.url);
this.img = this.baseUrl + res.data.data.url; this.img = this.baseUrl + res.data.data.url;
@ -102,7 +100,6 @@ Page({
}, },
doXzTime(){ doXzTime(){
this.setData({ cvisible: true }); this.setData({ cvisible: true });
console.log('执行选择时间')
}, },
// 显示提示 // 显示提示
showToast(){ showToast(){
@ -183,6 +180,7 @@ Page({
showDetail:true, showDetail:true,
item:res.data.data item:res.data.data
}) })
wx.hideTabBar()
},2000) },2000)
}else{ }else{
console.log('额外情况') console.log('额外情况')
@ -224,14 +222,17 @@ Page({
// 关闭回显 // 关闭回显
closeDetail(){ closeDetail(){
this.setData({ this.setData({
showDetail: false showDetail: false,
showCanvas: false
}) })
wx.showTabBar()
}, },
// 分享 // 分享
openShare(){ openShare(event){
this.setData({ this.setData({
shareVisible:!this.data.shareVisible shareVisible:!this.data.shareVisible
}) })
wx.hideTabBar()
}, },
shareQQ(){ shareQQ(){
console.log('分享到qq') console.log('分享到qq')
@ -247,15 +248,135 @@ Page({
} }
}) })
}, },
gitImg(){
console.log('获取图片');
this.drawMyCanvas()
this.setData({showCanvas: true,shareVisible: false})
},
drawMyCanvas() {
wx.showLoading({
title: '图片生成中'
})
const that = this
const query = wx.createSelectorQuery().in(this);
query.select('#my-canvas').fields({ // 选择需要生成canvas的范围
size: true,
scrollOffset: true
}, data => {
let width = data.width;
let height = data.height;
that.setData({
width,
height
})
setTimeout(() => {
that.startDraw()
}, 1500);
}).exec()
},
startDraw() {
let that = this
// 创建wxml2canvas对象
let drawMyImage = new Wxml2Canvas({
element: 'myCanvas', // canvas的id,
obj: that, // 传入当前组件的this
width: that.data.width ,
height: that.data.height,
background: '#fff', // 生成图片的背景色
progress(percent) { // 进度
// console.log(percent);
},
finish(url) { // 生成的图片
wx.hideLoading()
console.log(url);
that.savePoster(url)
},
error(res) { // 失败原因
console.log(res);
wx.hideLoading()
}
}, this);
let data = {
// 获取wxml数据
list: [{
type: 'wxml',
class: '.my_canvas .my_draw_canvas', // my_canvas要绘制的wxml元素根类名 my_draw_canvas单个元素的类名所有要绘制的单个元素都要添加该类名
limit: '.my_canvas', // 要绘制的wxml元素根类名
x: 0,
y: 0
}]
}
// 绘制canvas
drawMyImage.draw(data, this);
},
savePoster(url) {
const that = this
wx.saveImageToPhotosAlbum({
filePath: url,
success: function() {
wx.showToast({
title: '保存成功',
icon: 'none',
duration: 1500
});
},
fail(err) {
if (err.errMsg === "saveImageToPhotosAlbum:fail:auth denied" || err.errMsg === "saveImageToPhotosAlbum:fail auth deny" || err.errMsg === "saveImageToPhotosAlbum:fail authorize no response") {
wx.showModal({
title: '提示',
content: '需要您授权保存相册',
showCancel: false,
success: modalSuccess => {
wx.openSetting({
success(settingdata) {
if (settingdata.authSetting['scope.writePhotosAlbum']) {
wx.saveImageToPhotosAlbum({
filePath: url,
success: function () {
wx.showToast({
title: '保存成功',
icon: 'success',
duration: 2000
})
},
})
} else {
wx.showToast({
title: '授权失败,请稍后重新获取',
icon: 'none',
duration: 1500
});
}
}
})
}
})
}
}
})
},
// 获取我的许愿 // 获取我的许愿
getMyWish(){ getMyWish(){
req.getRequest('/api/user/curt/wish',{}).then((res)=>{ req.getRequest('/api/user/curt/wish',{limit: '-1'}).then((res)=>{
if(res.data.code==200){ if(res.data.code==200){
this.setData({wishes:res.data.data.records}) this.setData({wishes:res.data.data.records})
} }
}).catch((err)=>{ }).catch((err)=>{
console.log(err); console.log(err);
}) })
req.getRequest('/api/user/curt/lover/wish',{limit: '-1'}).then((res)=>{
if(res.data.code==200){
this.setData({LoveWishes:res.data.data.records})
}
}).catch((err)=>{
console.log(err);
})
}, },
/** /**

@ -5,7 +5,7 @@
<!--非单身情况下--> <!--非单身情况下-->
<view class="qlxybtn2" wx:if="{{userInfo.loverId}}"><text class="btn21">银币</text><text class="btn22">{{userInfo.silverCoin}}枚</text></view> <view class="qlxybtn2" wx:if="{{userInfo.loverId}}"><text class="btn21">银币</text><text class="btn22">{{userInfo.silverCoin}}枚</text></view>
<view class="qlxybtn21" wx:if="{{userInfo.loverId}}" bindtap="go2TaYw">Ta的愿望</view> <view class="qlxybtn21" wx:if="{{userInfo.loverId}}" bindtap="go2TaYw">Ta的愿望<view class="xyctoast">{{LoveWishes.length}}</view></view>
<view class="qlxybtn22" wx:if="{{userInfo.loverId}}" bindtap="go2MyYw">我的愿望<view class="xyctoast">{{wishes.length}}</view></view> <view class="qlxybtn22" wx:if="{{userInfo.loverId}}" bindtap="go2MyYw">我的愿望<view class="xyctoast">{{wishes.length}}</view></view>
<view class="bgt3" ></view> <view class="bgt3" ></view>
<view class="bgt2" ></view> <view class="bgt2" ></view>
@ -22,7 +22,6 @@
<view class="xylj">许愿链接</view> <view class="xylj">许愿链接</view>
<view class="xytp">许愿图片</view> <view class="xytp">许愿图片</view>
<t-textarea class="xynrf" model:value="{{xyContent}}" t-class="external-class" placeholder="内容限制30个字" /> <t-textarea class="xynrf" model:value="{{xyContent}}" t-class="external-class" placeholder="内容限制30个字" />
<!-- <t-textarea class="qwsjt" placeholder="请选择到期时间" bindtap="doXzTime" value="{{note}}" disabled /> -->
<t-input <t-input
class="qwsjt" class="qwsjt"
placeholder="请选择到期时间" placeholder="请选择到期时间"
@ -34,10 +33,8 @@
<t-input <t-input
class="xyljt" class="xyljt"
placeholder="愿望链接(可不填)" placeholder="愿望链接(可不填)"
bindtap="doXzTime"
model:value="{{xyLink}}" model:value="{{xyLink}}"
/> />
<!-- <t-textarea class="xyljt" placeholder="愿望链接(可不填)" /> -->
<view > <view >
<t-upload class="xytpt" <t-upload class="xytpt"
@ -70,25 +67,40 @@
</view> </view>
<!--愿望详情--> <!--愿望详情-->
<view wx:if="{{showDetail}}"> <view wx:if="{{showDetail}}" class="wishdetail-box">
<view class="wishdetail" bindtap="closeDetail"></view> <view class="wishdetail">
<view class="popbox"></view>
<t-image class="yximg" src="{{item.img}}"></t-image> <!-- <view class="popbox" bindtap="closeDetail">
<t-image src="https://wish-assets.windymuse.com.cn/xy/jt.gif"/>
<view class="yximg"><t-image src="{{item.img}}"></t-image></view>
<view class="ywwz2">愿望</view> <view class="ywwz2">愿望</view>
<view class="ywxq2">{{item.content}}</view> <view class="ywxq2">{{item.content}}</view>
<view class="qwsj2">期望时间</view> <view class="qwsj2">期望时间</view>
<view class="qwsjtxt2">{{item.deadline}}</view> <view class="qwsjtxt2">{{item.deadline}}</view>
<view class="anwz1" bindtap="openShare"> </view> -->
<view class="anwz1-tb"> <canvas canvas-id="myCanvas" class="myCanvas" wx:if="{{showCanvas}}"></canvas>
<t-image class="anzmlogo1" src="https://oss.wish.ydxxkj.top/xy/lfc.png"></t-image> <view id="my-canvas" class="my_canvas" bindtap="closeDetail">
<image class="logosta my_draw_canvas" src="https://wish-assets.windymuse.com.cn/xy/jxzdt.gif" data-type="image" data-url="https://wish-assets.windymuse.com.cn/xy/jxzdt.gif"></image>
<image class="popbox my_draw_canvas" src="https://wish-assets.windymuse.com.cn/xy/detailbkg.png" data-type="image" data-url="https://wish-assets.windymuse.com.cn/xy/detailbkg.png"/>
<image class="yximg my_draw_canvas" src="{{item.img}}" data-type="image" data-url="{{item.img}}"/>
<text class="ywwz2 my_draw_canvas" data-type="text" data-text="愿望">愿望</text>
<view class="ywxq2 my_draw_canvas" data-type="text" data-text="{{item.content}}">{{item.content}}</view>
<view class="qwsj2 my_draw_canvas" data-type="text" data-text="期望时间">期望时间</view>
<view class="qwsjtxt2 my_draw_canvas" data-type="text" data-text="{{item.deadline}}">{{item.deadline}}</view>
</view>
<view class="anwz1">
<view class="anwz1-tb" bindtap="openShare">
<t-image class="anzmlogo1" src="https://wish-assets.windymuse.com.cn/xy/lfc.png"></t-image>
</view> </view>
<view class="anwztxt1">分享</view> <view class="anwztxt1">分享</view>
</view> </view>
</view>
<!-- 分享 --> </view>
<t-popup visible="{{shareVisible}}" placement="bottom">
<view class="popup-main"> <!-- 分享 -->
<!-- <t-popup placement="bottom"> -->
<view class="popup-main" wx:if="{{shareVisible}}">
<view class="main-top"> <view class="main-top">
<view></view> <view></view>
<view class="text">分享到</view> <view class="text">分享到</view>
@ -97,40 +109,41 @@
<view class="main-box"> <view class="main-box">
<view class="box-item"> <view class="box-item">
<button open-type="share" class="item-icon" bindtap="shareWx"> <button open-type="share" class="item-icon" bindtap="shareWx">
<t-image src="https://oss.wish.ydxxkj.top/xy/lfc.png"></t-image> <t-image src="https://wish-assets.windymuse.com.cn/xy/antFill-wx.png"></t-image>
</button> </button>
<view class="item-text">微信</view> <view class="item-text">微信</view>
</view> </view>
<view class="box-item"> <view class="box-item">
<view class="item-icon cyan"> <view class="item-icon cyan">
<t-image src="https://oss.wish.ydxxkj.top/xy/antFill-pyq.png"></t-image> <t-image src="https://wish-assets.windymuse.com.cn/xy/antFill-pyq.png"></t-image>
</view> </view>
<view class="item-text">朋友圈</view> <view class="item-text">朋友圈</view>
</view> </view>
<view class="box-item"> <view class="box-item">
<view class="item-icon orange"> <view class="item-icon orange">
<t-image src="https://oss.wish.ydxxkj.top/xy/antFill-wb.png"></t-image> <t-image src="https://wish-assets.windymuse.com.cn/xy/antFill-wb.png"></t-image>
</view> </view>
<view class="item-text">微博</view> <view class="item-text">微博</view>
</view> </view>
<view class="box-item"> <view class="box-item">
<view class="item-icon blue"> <view class="item-icon blue">
<t-image src="https://oss.wish.ydxxkj.top/xy/antFill-qq.png"></t-image> <t-image src="https://wish-assets.windymuse.com.cn/xy/antFill-qq.png"></t-image>
</view> </view>
<view class="item-text">QQ</view> <view class="item-text">QQ</view>
</view> </view>
<view class="box-item"> <view class="box-item">
<view class="item-icon yellow"> <view class="item-icon yellow">
<t-image src="https://oss.wish.ydxxkj.top/xy/antFill-qqkj.png"></t-image> <t-image src="https://wish-assets.windymuse.com.cn/xy/antFill-qqkj.png"></t-image>
</view> </view>
<view class="item-text">QQ空间</view> <view class="item-text">QQ空间</view>
</view> </view>
<view class="box-item"> <view class="box-item">
<view class="item-icon orange"> <view class="item-icon orange" bindtap="gitImg">
<t-image src="https://oss.wish.ydxxkj.top/xy/antFill-tp.png"></t-image> <t-image src="https://wish-assets.windymuse.com.cn/xy/antFill-tp.png"></t-image>
</view> </view>
<view class="item-text">生成图片</view> <view class="item-text">生成图片</view>
</view> </view>
</view> </view>
</view> </view>
</t-popup> <!-- </t-popup> -->
</view>

@ -10,7 +10,7 @@
background-size:100% 100%; background-size:100% 100%;
margin-left:30rpx; margin-left:30rpx;
margin-top: 1194rpx; margin-top: 1194rpx;
background-image: url(https://oss.wish.ydxxkj.top/xy/xyk.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/xyk.png);
color:#9A9A9A; color:#9A9A9A;
text-align: center; text-align: center;
font-size: 27rpx; font-size: 27rpx;
@ -27,7 +27,7 @@
background-size:100% 100%; background-size:100% 100%;
margin-left:258rpx; margin-left:258rpx;
margin-top: 1228rpx; margin-top: 1228rpx;
background-image: url(https://oss.wish.ydxxkj.top/xy/xybtn.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/xybtn.png);
color:#9A9A9A; color:#9A9A9A;
text-align: center; text-align: center;
font-size: 27rpx; font-size: 27rpx;
@ -150,7 +150,7 @@
background-size:100% 100%; background-size:100% 100%;
margin-left:46rpx; margin-left:46rpx;
margin-top: 242rpx; margin-top: 242rpx;
background-image: url(https://oss.wish.ydxxkj.top/xy/bgt3.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/bgt3.png);
color:#9A9A9A; color:#9A9A9A;
text-align: center; text-align: center;
font-size: 27rpx; font-size: 27rpx;
@ -167,7 +167,7 @@
background-size:100% 100%; background-size:100% 100%;
margin-left:48rpx; margin-left:48rpx;
margin-top: 280rpx; margin-top: 280rpx;
background-image: url(https://oss.wish.ydxxkj.top/xy/%E8%AE%B8%E6%84%BF%E6%B1%A0%402x.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/%E8%AE%B8%E6%84%BF%E6%B1%A0%402x.png);
color:#9A9A9A; color:#9A9A9A;
text-align: center; text-align: center;
font-size: 27rpx; font-size: 27rpx;
@ -203,7 +203,7 @@
margin-top:30rpx; margin-top:30rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/xybjta.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/xybjta.png);
} }
.xynr{ .xynr{
@ -404,82 +404,97 @@ font-family: SourceHanSansSC-medium;
} }
/* 许愿成功回显 */ /* 许愿成功回显 */
.wishdetail{ .wishdetail-box {
position: absolute; position: absolute;
width:100%; width: 100%;
height:100%; height: 100%;
background-color: rgba(255, 255, 255, 0.7); background-color: #fff;
} }
.popbox{
.wishdetail{
position: absolute; position: absolute;
left: 66rpx; left: 66rpx;
top: 206rpx; top: 166rpx;
width: 620rpx; width: 620rpx;
height: 1080rpx; height: 1080rpx;
}
.popbox{
width: 620rpx;
height: 1080rpx;
display: flex;
align-items: center;
flex-direction: column;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/detailbkg.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/detailbkg.png);
}
.popbox .t-image {
width: 70rpx;
height: 70rpx;
margin-top: 20rpx;
} }
.yximg{ .yximg{
position: absolute; position: absolute;
left: 146rpx; left: 80rpx;
top: 330rpx; top: 164rpx;
width: 460rpx; width: 460rpx;
height: 308rpx; height: 308rpx;
border-radius: 10px; border-radius: 10px;
background-color: #767686; background-color: #767686;
} }
.yximg .t-image {
width: 100%;
height: 100%;
margin: 0;
}
.ywwz2{ .ywwz2{
position: absolute; position: absolute;
left: 328rpx; top: 540rpx;
top: 706rpx; width: 100%;
/* width: 96rpx; */
height: 66rpx; height: 66rpx;
text-align: center;
color: rgba(248, 99, 42, 1); color: rgba(248, 99, 42, 1);
font-size: 24px; font-size: 48rpx;
text-align: left; font-weight: 700;
font-family: SourceHanSansSC-bold;
} }
.ywxq2{ .ywxq2{
position: absolute; position: absolute;
left: 182rpx; top: 632rpx;
top: 798rpx; width: 100%;
width: 388rpx;
height: 150rpx; height: 150rpx;
color: rgba(108, 108, 108, 1); color: rgba(108, 108, 108, 1);
font-size: 18px; font-size: 36rpx;
text-align: center; text-align: center;
font-family: SourceHanSansSC-regular; font-family: SourceHanSansSC-regular;
} }
.qwsj2{ .qwsj2{
position: absolute; position: absolute;
left: 280rpx; top: 814rpx;
top: 980rpx; width: 100%;
/* width: 192rpx; */
height: 66rpx; height: 66rpx;
color: rgba(248, 99, 42, 1); color: rgba(248, 99, 42, 1);
font-size: 24px; font-size: 48rpx;
text-align: center; text-align: center;
font-family: SourceHanSansSC-regular;
} }
.qwsjtxt2{ .qwsjtxt2{
position: absolute; position: absolute;
left: 250rpx; top: 906rpx;
top: 1072rpx; width: 100%;
width: 254rpx;
height: 50rpx; height: 50rpx;
color: rgba(108, 108, 108, 1); color: rgba(108, 108, 108, 1);
font-size: 18px; font-size: 36rpx;
text-align: center; text-align: center;
font-family: SourceHanSansSC-regular;
} }
.anwz1 { .anwz1 {
position: absolute; position: absolute;
bottom: 0; top: 1140rpx;
margin-left: 315rpx; width: 100%;
} }
.anwz1 .anwz1-tb { .anwz1 .anwz1-tb {
@ -506,8 +521,8 @@ font-family: SourceHanSansSC-medium;
} }
.anwz1 .anzmlogo1 { .anwz1 .anzmlogo1 {
width: 100rpx; width: 80rpx;
height: 100rpx; height: 80rpx;
} }
.xyctoast { .xyctoast {
@ -530,6 +545,9 @@ font-family: SourceHanSansSC-medium;
} }
.popup-main { .popup-main {
position: absolute;
bottom: 0;
width: 100%;
height: 462rpx; height: 462rpx;
margin-bottom: 68rpx; margin-bottom: 68rpx;
background-color: #fff; background-color: #fff;
@ -556,7 +574,7 @@ font-family: SourceHanSansSC-medium;
.popup-main .main-box { .popup-main .main-box {
height: 100%; height: 100%;
padding-top:70rpx; padding-top:56rpx;
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
@ -607,3 +625,26 @@ font-family: SourceHanSansSC-medium;
.cyan { .cyan {
background-color: #A8E450 !important; background-color: #A8E450 !important;
} }
.logosta {
position: absolute;
top: 20rpx;
left: 270rpx;
width: 50px;
height: 50px;
z-index: 1;
}
.myCanvas {
width: 620rpx;
height: 1080rpx;
}
.my_canvas {
width: 620rpx;
height: 1080rpx;
position: absolute;
top: 0;
}

@ -1,6 +1,7 @@
// pages/home/xyc/wdyw/wdyw.js // pages/home/xyc/wdyw/wdyw.js
const app = getApp();//新建页面时 默认引入 const app = getApp();//新建页面时 默认引入
const req = app.xzjlReq();//初始化一个的request() 实例 const req = app.xzjlReq();//初始化一个的request() 实例
import Wxml2Canvas from 'wxml2canvas';
Page({ Page({
/** /**
@ -11,12 +12,126 @@ Page({
detail:{}, detail:{},
visible:false, visible:false,
shareVisible:false, //分享弹层 shareVisible:false, //分享弹层
wishes:[] wishes:[],
showCanvas: true
}, },
// 分享微信 // 分享微信
shareWx(){ shareWx(){
console.log('分享微信') console.log('分享微信')
}, },
getImg(){
console.log('获取图片');
this.setData({shareVisible: false, showCanvas:true})
this.drawMyCanvas()
},
drawMyCanvas() {
wx.showLoading({
title: '图片生成中'
})
const that = this
const query = wx.createSelectorQuery().in(this);
query.select('#my-canvas').fields({ // 选择需要生成canvas的范围
size: true,
scrollOffset: true
}, data => {
let width = data.width;
let height = data.height;
that.setData({
width,
height
})
setTimeout(() => {
that.startDraw()
}, 1500);
}).exec()
},
startDraw() {
let that = this
// 创建wxml2canvas对象
let drawMyImage = new Wxml2Canvas({
element: 'myCanvas', // canvas的id,
obj: that, // 传入当前组件的this
width: that.data.width ,
height: that.data.height,
background: '#fff', // 生成图片的背景色
progress(percent) { // 进度
// console.log(percent);
},
finish(url) { // 生成的图片
wx.hideLoading()
console.log(url);
that.savePoster(url)
},
error(res) { // 失败原因
console.log(res);
wx.hideLoading()
}
}, this);
let data = {
// 获取wxml数据
list: [{
type: 'wxml',
class: '.my_canvas .my_draw_canvas', // my_canvas要绘制的wxml元素根类名 my_draw_canvas单个元素的类名所有要绘制的单个元素都要添加该类名
limit: '.my_canvas', // 要绘制的wxml元素根类名
x: 0,
y: 0
}]
}
// 绘制canvas
drawMyImage.draw(data, this);
},
savePoster(url) {
const that = this
wx.saveImageToPhotosAlbum({
filePath: url,
success: function() {
wx.showToast({
title: '保存成功',
icon: 'none',
duration: 1500
});
},
fail(err) {
if (err.errMsg === "saveImageToPhotosAlbum:fail:auth denied" || err.errMsg === "saveImageToPhotosAlbum:fail auth deny" || err.errMsg === "saveImageToPhotosAlbum:fail authorize no response") {
wx.showModal({
title: '提示',
content: '需要您授权保存相册',
showCancel: false,
success: modalSuccess => {
wx.openSetting({
success(settingdata) {
if (settingdata.authSetting['scope.writePhotosAlbum']) {
wx.saveImageToPhotosAlbum({
filePath: url,
success: function () {
wx.showToast({
title: '保存成功',
icon: 'success',
duration: 2000
})
},
})
} else {
wx.showToast({
title: '授权失败,请稍后重新获取',
icon: 'none',
duration: 1500
});
}
}
})
}
})
}
}
})
},
showShare(){ showShare(){
this.setData({ this.setData({
shareVisible:!this.data.shareVisible shareVisible:!this.data.shareVisible
@ -86,13 +201,13 @@ Page({
}); });
}, },
changeVisible(){ changeVisible(){
this.setData({visible:false}) this.setData({visible:false, showCanvas:false})
}, },
go2Reback(){ go2Reback(){
wx.navigateBack({ changed: true }); wx.navigateBack({ changed: true });
}, },
getMyWish(){ getMyWish(){
req.getRequest('/api/user/curt/lover/wish',{}).then((res)=>{ req.getRequest('/api/user/curt/lover/wish',{limit: '-1'}).then((res)=>{
console.log(res,'11111111') console.log(res,'11111111')
if(res.data.code==200){ if(res.data.code==200){
this.setData({wishes:res.data.data.records}) this.setData({wishes:res.data.data.records})
@ -120,14 +235,12 @@ Page({
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow() { onShow() {
}, },
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
onHide() { onHide() {
}, },
/** /**

@ -1,87 +1,111 @@
<!--pages/home/xyc/wdyw/wdyw.wxml--> <!--pages/home/xyc/wdyw/wdyw.wxml-->
<!--返回图标--> <!--返回图标-->
<view class="reback" bindtap="go2Reback"></view> <view class="top-header">
<view class="title">ta的愿望</view> <view class="header-reback" bindtap="go2Reback"></view>
<view class="header-title">我的愿望</view>
<view class="ywbjt1"></view> </view>
<view class="xycbg2"></view>
<view class="xycbg3"></view>
<view class="wishbox"> <!-- 愿望内容 -->
<view class="body">
<!-- 背景 -->
<view class="ywbjt1"><view class="xycbg2"></view></view>
<!-- 列表 -->
<view class="wishbox">
<view wx:for="{{wishes}}" wx:key="index"> <view wx:for="{{wishes}}" wx:key="index">
<view class="boxitem" bindtap="go2WishDetail" data-wish="{{item}}"> <view class="boxitem" bindtap="go2WishDetail" data-wish="{{item}}">
<!-- 许愿图片 -->
<t-image src="{{item.img}}" class="boximg"></t-image> <t-image src="{{item.img}}" class="boximg"></t-image>
<!-- 许愿内容 -->
<view class="wishbox-text">
<view class="boxtitle">{{item.content}}</view> <view class="boxtitle">{{item.content}}</view>
<view class="qwsjbox">期望时间:{{item.deadline}}</view> <view class="qwsjbox">期望时间:{{item.deadline}}</view>
<t-image class="logosta" src="https://oss.wish.ydxxkj.top/xy/ywc.png" wx:if="{{item.status=='completed'}}"></t-image> </view>
<t-image class="logostajxz" src="https://oss.wish.ydxxkj.top/xy/jxzdt.gif" wx:if="{{item.status=='processing'}}"></t-image> <!-- 图标 -->
<t-image class="logosta" src="https://oss.wish.ydxxkj.top/xy/ygq.png" wx:if="{{item.status=='expired'}}"></t-image> <view class="xy-icon" wx:if="{{item.status=='processing'}}">
<view class="wczt" wx:if="{{item.status=='processing'}}">进行中</view> <t-image class="icon" src="https://oss.wish.ydxxkj.top/xy/jt.gif"></t-image>
<view class="wczt" wx:if="{{item.status=='completed'}}">已完成</view> <view class="text">进行中</view>
<view class="wczt" wx:if="{{item.status=='expired'}}">已过期</view> </view>
<view class="xy-icon" wx:if="{{item.status=='completed'}}">
<t-image class="icon" src="https://wish-assets.windymuse.com.cn/xy/ywc.png"></t-image>
<view class="text">已完成</view>
</view>
<view class="xy-icon" wx:if="{{item.status=='expired'}}">
<t-image class="icon" src="https://wish-assets.windymuse.com.cn/xy/ygq.png"></t-image>
<view class="text">已过期</view>
</view>
</view>
</view> </view>
</view> </view>
</view> </view>
<!--愿望详情--> <!--愿望详情-->
<t-popup visible="{{visible}}" bind:visible-change="onVisibleChange" placement="top"> <t-popup visible="{{visible}}" show-overlay="{{false}}" bind:visible-change="onVisibleChange" placement="top" class="myCanvas-popup">
<view class="all" >
<view class="wishdetail" bindtap="changeVisible"></view> <view class="box-canvas">
<view class="popbox"></view> <canvas canvas-id="myCanvas" class="myCanvas" wx:if="{{showCanvas}}"></canvas>
<t-image class="yximg" src="{{detail.img}}"></t-image> <view id="my-canvas" class="my_canvas" bindtap="changeVisible">
<view class="ywwz">愿望</view> <image class="logosta my_draw_canvas" src="https://wish-assets.windymuse.com.cn/xy/ywc.png" data-type="image" data-url="https://wish-assets.windymuse.com.cn/xy/ywc.png" wx:if="{{detail.status=='completed'}}"></image>
<view class="ywxq">{{detail.content}}</view> <image class="logosta my_draw_canvas" src="https://wish-assets.windymuse.com.cn/xy/jxzdt.gif" data-type="image" data-url="https://wish-assets.windymuse.com.cn/xy/jxzdt.gif" wx:if="{{detail.status=='processing'}}"></image>
<view class="qwsj">期望时间</view> <image class="logosta my_draw_canvas" src="https://wish-assets.windymuse.com.cn/xy/ygq.png" data-type="image" data-url="https://wish-assets.windymuse.com.cn/xy/ygq.png" wx:if="{{detail.status=='expired'}}"></image>
<view class="qwsjtxt">{{detail.deadline}}</view> <image class="popbox my_draw_canvas" src="https://wish-assets.windymuse.com.cn/xy/detailbkg.png" data-type="image" data-url="https://wish-assets.windymuse.com.cn/xy/detailbkg.png"/>
<image class="yximg my_draw_canvas" src="{{detail.img}}" data-type="image" data-url="{{detail.img}}"/>
<text class="ywwz my_draw_canvas" data-type="text" data-text="愿望">愿望</text>
<view class="ywxq my_draw_canvas" data-type="text" data-text="{{detail.content}}">{{detail.content}}</view>
<view class="qwsj my_draw_canvas" data-type="text" data-text="期望时间">期望时间</view>
<view class="qwsjtxt my_draw_canvas" data-type="text" data-text="{{detail.deadline}}">{{detail.deadline}}</view>
</view> </view>
</view>
<view class="ywcczk" wx:if="{{detail.status=='processing'}}"><!--进行中按钮展示--> <view class="ywcczk" wx:if="{{detail.status=='processing'}}"><!--进行中按钮展示-->
<view class="anwz1 sc1"> <view class="anwz1">
<view class="yqq" bindtap="go2DelDialog"></view> <view class="yqq" bindtap="go2DelDialog"></view>
<view class="anwztxt1">删除</view> <view class="anwztxt1">删除</view>
<t-image bindtap="go2DelDialog" class="anzmlogo1" src="https://oss.wish.ydxxkj.top/xy/lsc.png"></t-image> <t-image bindtap="go2DelDialog" class="anzmlogo1" src="https://wish-assets.windymuse.com.cn/xy/lsc.png"></t-image>
</view> </view>
<view class="anwz1 xg1"> <view class="anwz1">
<view class="yqq"></view> <view class="yqq"></view>
<view class="anwztxt1">修改</view> <view class="anwztxt1">修改</view>
<t-image class="anzmlogo1" src="https://oss.wish.ydxxkj.top/xy/lxg.png"></t-image> <t-image class="anzmlogo1" src="https://wish-assets.windymuse.com.cn/xy/lxg.png"></t-image>
</view> </view>
<view class="anwz1 wc1"> <view class="anwz1">
<view class="yqq" bindtap="doFinishWish"></view> <view class="yqq" bindtap="doFinishWish"></view>
<view class="anwztxt1" >已达成</view> <view class="anwztxt1" >已达成</view>
<t-image bindtap="doFinishWish" class="anzmlogo1" src="https://oss.wish.ydxxkj.top/xy/lydc.png"></t-image> <t-image bindtap="doFinishWish" class="anzmlogo1" src="https://wish-assets.windymuse.com.cn/xy/lydc.png"></t-image>
</view> </view>
<view class="anwz1 fx1"> <view class="anwz1" bindtap="showShare">
<view class="yqq"></view> <view class="yqq"></view>
<view class="anwztxt1">分享</view> <view class="anwztxt1">分享</view>
<t-image class="anzmlogo1" src="https://oss.wish.ydxxkj.top/xy/lfc.png"></t-image> <t-image class="anzmlogo1" src="https://wish-assets.windymuse.com.cn/xy/lfc.png"></t-image>
</view> </view>
</view> </view>
<view class="ywcczk" wx:if="{{detail.status=='completed'}}"><!--已完成按钮展示--> <view class="ywcczk" wx:if="{{detail.status=='completed'}}"><!--已完成按钮展示-->
<view class="anwz1 sc2"> <view class="anwz1">
<view class="yqq" bindtap="go2DelDialog"></view> <view class="yqq" bindtap="go2DelDialog"></view>
<view class="anwztxt1">删除</view> <view class="anwztxt1">删除</view>
<t-image bindtap="go2DelDialog" class="anzmlogo1" src="https://oss.wish.ydxxkj.top/xy/lsc.png"></t-image> <t-image bindtap="go2DelDialog" class="anzmlogo1" src="https://wish-assets.windymuse.com.cn/xy/lsc.png"></t-image>
</view> </view>
<view class="anwz1 fx2"> <view class="anwz1" bindtap="showShare">
<view class="yqq"></view> <view class="yqq"></view>
<view class="anwztxt1">分享</view> <view class="anwztxt1">分享</view>
<t-image class="anzmlogo1" src="https://oss.wish.ydxxkj.top/xy/lfc.png"></t-image> <t-image class="anzmlogo1" src="https://wish-assets.windymuse.com.cn/xy/lfc.png"></t-image>
</view> </view>
</view> </view>
<view class="ywcczk" wx:if="{{detail.status=='expired'}}"> <view class="ywcczk" wx:if="{{detail.status=='expired'}}">
<view class="anwz1 sc2"> <view class="anwz1">
<view class="yqq" bindtap="go2DelDialog"></view> <view class="yqq" bindtap="go2DelDialog"></view>
<view class="anwztxt1">删除</view> <view class="anwztxt1">删除</view>
<t-image bindtap="go2DelDialog" class="anzmlogo1" src="https://oss.wish.ydxxkj.top/xy/lsc.png"></t-image> <t-image bindtap="go2DelDialog" class="anzmlogo1" src="https://wish-assets.windymuse.com.cn/xy/lsc.png"></t-image>
</view> </view>
<view class="anwz1 fx2"> <view class="anwz1">
<view class="yqq"></view> <view class="yqq"></view>
<view class="anwztxt1">修改</view> <view class="anwztxt1">修改</view>
<t-image class="anzmlogo1" src="https://oss.wish.ydxxkj.top/xy/lxg.png"></t-image> <t-image class="anzmlogo1" src="https://wish-assets.windymuse.com.cn/xy/lxg.png"></t-image>
</view> </view>
</view><!--已过期按钮展示--> </view><!--已过期按钮展示-->
@ -100,4 +124,51 @@ data-del="{{detail.id}}"
bind:cancel="closeDelDialog" bind:cancel="closeDelDialog"
/> />
<!-- 分享 -->
<t-popup visible="{{shareVisible}}" placement="bottom">
<view class="popup-main">
<view class="main-top">
<view></view>
<view class="text">分享到</view>
<t-icon name="close" size="32" bindtap="showShare"/>
</view>
<view class="main-box">
<view class="box-item">
<button open-type="share" class="item-icon" bindtap="shareWx">
<t-image src="https://wish-assets.windymuse.com.cn/xy/antFill-wx.png"></t-image>
</button>
<view class="item-text">微信</view>
</view>
<view class="box-item">
<view class="item-icon cyan">
<t-image src="https://wish-assets.windymuse.com.cn/xy/antFill-pyq.png"></t-image>
</view>
<view class="item-text">朋友圈</view>
</view>
<view class="box-item">
<view class="item-icon orange">
<t-image src="https://wish-assets.windymuse.com.cn/xy/antFill-wb.png"></t-image>
</view>
<view class="item-text">微博</view>
</view>
<view class="box-item">
<view class="item-icon blue">
<t-image src="https://wish-assets.windymuse.com.cn/xy/antFill-qq.png"></t-image>
</view>
<view class="item-text">QQ</view>
</view>
<view class="box-item">
<view class="item-icon yellow">
<t-image src="https://wish-assets.windymuse.com.cn/xy/antFill-qqkj.png"></t-image>
</view>
<view class="item-text">QQ空间</view>
</view>
<view class="box-item">
<view class="item-icon orange" bindtap="getImg">
<t-image src="https://wish-assets.windymuse.com.cn/xy/antFill-tp.png"></t-image>
</view>
<view class="item-text">生成图片</view>
</view>
</view>
</view>
</t-popup>

@ -1,144 +1,137 @@
/* pages/home/xyc/wdyw/wdyw.wxss */ /* pages/home/xyc/wdyw/wdyw.wxss */
.reback{
.top-header {
position: fixed;
top: 0;
width: 100%;
height: 176rpx;
padding-bottom: 20rpx;
box-sizing: border-box;
display: flex;
align-items: flex-end;
justify-content: center;
background-color: #fff;
z-index: 1;
}
.header-reback{
position: absolute; position: absolute;
margin-left: 20rpx; left: 20rpx;
margin-top:108rpx;
width:48rpx; width:48rpx;
height:48rpx; height:48rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/reback.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/reback.png);
} }
.title{ .header-title{
position: absolute;
left: 278rpx;
top: 108rpx;
width: 196rpx; width: 196rpx;
height: 48rpx; height: 48rpx;
color: rgba(108, 108, 108, 1); color: rgba(108, 108, 108, 1);
font-size: 32rpx; font-size: 32rpx;
text-align: center; text-align: center;
font-family: SourceHanSansSC-regular;
} }
.ywbjt1{ .body {
position: absolute; position: absolute;
left: -44rpx; top: 190rpx;
top: 280rpx; width: 100%;
width: 842rpx; }
.ywbjt1{
width: 100%;
height: 1168rpx; height: 1168rpx;
margin-top: 280rpx;
padding-top: 404rpx;
box-sizing: border-box;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/bg111.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/bg111.png);
} }
.xycbg2{ .xycbg2{
position: absolute; width: 100%;
left: -28rpx;
top: 684rpx;
width: 798rpx;
height: 682rpx; height: 682rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/xycbg2.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/xycbg2.png);
} }
.wishbox{ .wishbox{
position: absolute; position: absolute;
width:750rpx; top: 0;
top:190rpx; width:100%;
height:1300rpx; height:1428rpx;
} padding-top: 10rpx;
box-sizing: border-box;
.xycbg3{ display: flex;
position: absolute; align-items: center;
left: -48rpx; flex-direction: column;
top: 232rpx; overflow-y: auto;
width: 880rpx;
height: 1370rpx;
background-repeat: no-repeat;
background-size:100% 100%;
} }
.boxitem{ .boxitem{
margin: 0 auto; width: 686rpx;
top: 104px; height: 188rpx;
width: 343px; padding: 40rpx 32rpx;
height: 94px; box-sizing: border-box;
line-height: 20px; border-radius: 20rpx;
border-radius: 10px;
background-color: rgba(255, 255, 255, 1); background-color: rgba(255, 255, 255, 1);
text-align: center; box-shadow: 0px 2rpx 6rpx 0px rgba(0, 0, 0, 0.4);
box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.4);
margin-bottom: 30rpx; margin-bottom: 30rpx;
display: flex;
align-items: center;
justify-content: space-between;
} }
.boximg{ .boximg{
float: left; width: 110rpx;
margin-left: 32rpx; height: 110rpx;
padding-top: 39rpx; }
width: 55px;
height: 55px; .wishbox-text {
width: 320rpx;
height: 100%;
display: flex;
justify-content: center;
flex-direction: column;
} }
.boxtitle{ .boxtitle{
float:initial;
margin-left: 174rpx;
padding-top: 58rpx;
width: 180px;
height: 20px;
color: rgba(108, 108, 108, 1); color: rgba(108, 108, 108, 1);
font-size: 30rpx; font-size: 28rpx;
text-align: left;
font-weight: 700; font-weight: 700;
overflow:hidden; width: 320rpx;
white-space: nowrap;
text-overflow: ellipsis;
-o-text-overflow:ellipsis;
} }
.qwsjbox{ .qwsjbox{
float:initial;
margin-left: 174rpx;
top: 306rpx;
width: 286rpx;
height: 34rpx;
color: rgba(108, 108, 108, 1); color: rgba(108, 108, 108, 1);
font-size: 12px; font-size: 28rpx;
text-align: left; width: 320rpx;
font-family: SourceHanSansSC-regular;
} }
.wczt{ .xy-icon {
float:initial; width: 110rpx;
margin-left: 295px; height: 110rpx;
margin-top: -75rpx; display: flex;
width: 36px; align-items: center;
height: 17px; justify-content: space-between;
color: rgba(108, 108, 108, 1); flex-direction: column;
font-size: 12px;
text-align: left;
font-family: SourceHanSansSC-regular;
} }
.logosta{ .xy-icon .icon {
float:initial; width: 70rpx;
margin-left: 289px; height: 70rpx;
margin-top: -100rpx;
width: 34px;
height: 34px;
} }
.logostajxz{ .xy-icon .text {
float:initial; font-size: 24rpx;
margin-left: 283px; color: rgba(108, 108, 108, 1);
margin-top: -130rpx;
width: 60px;
height: 60px;
} }
.all{ .all{
width:750rpx; width:750rpx;
height:1624rpx; height:1624rpx;
@ -150,19 +143,16 @@
} }
.popbox{ .popbox{
position: absolute; position: absolute;
left: 66rpx; left: 0;
top: 166rpx; top: 0;
width: 620rpx; width: 620rpx;
height: 1080rpx; height: 1080rpx;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/detailbkg.png);
} }
.yximg{ .yximg{
position: absolute; position: absolute;
left: 146rpx; left: 80rpx;
top: 330rpx; top: 164rpx;
width: 460rpx; width: 460rpx;
height: 308rpx; height: 308rpx;
border-radius: 10px; border-radius: 10px;
@ -170,21 +160,19 @@
} }
.ywwz{ .ywwz{
position: absolute; position: absolute;
left: 328rpx; top: 540rpx;
top: 706rpx; width: 100%;
/* width: 96rpx; */
height: 66rpx; height: 66rpx;
text-align: center;
color: rgba(248, 99, 42, 1); color: rgba(248, 99, 42, 1);
font-size: 48rpx; font-size: 48rpx;
text-align: left; font-weight: 700;
font-family: SourceHanSansSC-bold;
} }
.ywxq{ .ywxq{
position: absolute; position: absolute;
left: 182rpx; top: 632rpx;
top: 798rpx; width: 100%;
width: 388rpx;
height: 150rpx; height: 150rpx;
color: rgba(108, 108, 108, 1); color: rgba(108, 108, 108, 1);
font-size: 36rpx; font-size: 36rpx;
@ -193,25 +181,21 @@
} }
.qwsj{ .qwsj{
position: absolute; position: absolute;
left: 280rpx; top: 814rpx;
top: 980rpx; width: 100%;
/* width: 192rpx; */
height: 66rpx; height: 66rpx;
color: rgba(248, 99, 42, 1); color: rgba(248, 99, 42, 1);
font-size: 48rpx; font-size: 48rpx;
text-align: center; text-align: center;
font-family: SourceHanSansSC-regular;
} }
.qwsjtxt{ .qwsjtxt{
position: absolute; position: absolute;
left: 250rpx; top: 906rpx;
top: 1072rpx; width: 100%;
width: 254rpx;
height: 50rpx; height: 50rpx;
color: rgba(108, 108, 108, 1); color: rgba(108, 108, 108, 1);
font-size: 36rpx; font-size: 36rpx;
text-align: center; text-align: center;
font-family: SourceHanSansSC-regular;
} }
.yqq{/*圆圈*/ .yqq{/*圆圈*/
@ -373,6 +357,46 @@
top: 192rpx; top: 192rpx;
left: 336rpx; left: 336rpx;
width: 80rpx; width: 80rpx;
height: 64rpx; height: 80rpx;
z-index: 1;
}
.myCanvas-popup {
height: 100vh;
background-color: rgba(255, 255, 255, 0) !important;
}
.myCanvas-popup .t-popup__content{
height: 100%;
background-color: rgba(255, 255, 255, 1);
}
.my_canvas {
width: 620rpx;
height: 1080rpx;
position: absolute;
top: 0;
}
.myCanvas {
width: 620rpx;
height: 1080rpx;
}
.logosta {
position: absolute;
top: 20rpx;
left: 270rpx;
width: 50px;
height: 50px;
z-index: 1; z-index: 1;
} }
.box-canvas {
position: absolute;
left: 66rpx;
top: 166rpx;
width: 620rpx;
height: 1080rpx;
}

@ -1,6 +1,7 @@
// pages/home/xyc/wdyw/wdyw.js // pages/home/xyc/wdyw/wdyw.js
const app = getApp();//新建页面时 默认引入 const app = getApp();//新建页面时 默认引入
const req = app.xzjlReq();//初始化一个的request() 实例 const req = app.xzjlReq();//初始化一个的request() 实例
import Wxml2Canvas from 'wxml2canvas';
Page({ Page({
/** /**
@ -11,12 +12,126 @@ Page({
detail:{}, detail:{},
visible:false, visible:false,
shareVisible:false, //分享弹层 shareVisible:false, //分享弹层
wishes:[] wishes:[],
showCanvas: true
}, },
// 分享微信 // 分享微信
shareWx(){ shareWx(){
console.log('分享微信') console.log('分享微信')
}, },
getImg(){
console.log('获取图片');
this.setData({shareVisible: false, showCanvas:true})
this.drawMyCanvas()
},
drawMyCanvas() {
wx.showLoading({
title: '图片生成中'
})
const that = this
const query = wx.createSelectorQuery().in(this);
query.select('#my-canvas').fields({ // 选择需要生成canvas的范围
size: true,
scrollOffset: true
}, data => {
let width = data.width;
let height = data.height;
that.setData({
width,
height
})
setTimeout(() => {
that.startDraw()
}, 1500);
}).exec()
},
startDraw() {
let that = this
// 创建wxml2canvas对象
let drawMyImage = new Wxml2Canvas({
element: 'myCanvas', // canvas的id,
obj: that, // 传入当前组件的this
width: that.data.width ,
height: that.data.height,
background: '#fff', // 生成图片的背景色
progress(percent) { // 进度
// console.log(percent);
},
finish(url) { // 生成的图片
wx.hideLoading()
console.log(url);
that.savePoster(url)
},
error(res) { // 失败原因
console.log(res);
wx.hideLoading()
}
}, this);
let data = {
// 获取wxml数据
list: [{
type: 'wxml',
class: '.my_canvas .my_draw_canvas', // my_canvas要绘制的wxml元素根类名 my_draw_canvas单个元素的类名所有要绘制的单个元素都要添加该类名
limit: '.my_canvas', // 要绘制的wxml元素根类名
x: 0,
y: 0
}]
}
// 绘制canvas
drawMyImage.draw(data, this);
},
savePoster(url) {
const that = this
wx.saveImageToPhotosAlbum({
filePath: url,
success: function() {
wx.showToast({
title: '保存成功',
icon: 'none',
duration: 1500
});
},
fail(err) {
if (err.errMsg === "saveImageToPhotosAlbum:fail:auth denied" || err.errMsg === "saveImageToPhotosAlbum:fail auth deny" || err.errMsg === "saveImageToPhotosAlbum:fail authorize no response") {
wx.showModal({
title: '提示',
content: '需要您授权保存相册',
showCancel: false,
success: modalSuccess => {
wx.openSetting({
success(settingdata) {
if (settingdata.authSetting['scope.writePhotosAlbum']) {
wx.saveImageToPhotosAlbum({
filePath: url,
success: function () {
wx.showToast({
title: '保存成功',
icon: 'success',
duration: 2000
})
},
})
} else {
wx.showToast({
title: '授权失败,请稍后重新获取',
icon: 'none',
duration: 1500
});
}
}
})
}
})
}
}
})
},
showShare(){ showShare(){
this.setData({ this.setData({
shareVisible:!this.data.shareVisible shareVisible:!this.data.shareVisible
@ -86,13 +201,13 @@ Page({
}); });
}, },
changeVisible(){ changeVisible(){
this.setData({visible:false}) this.setData({visible:false, showCanvas:false})
}, },
go2Reback(){ go2Reback(){
wx.navigateBack({ changed: true }); wx.navigateBack({ changed: true });
}, },
getMyWish(){ getMyWish(){
req.getRequest('/api/user/curt/wish',{}).then((res)=>{ req.getRequest('/api/user/curt/wish',{limit: '-1'}).then((res)=>{
console.log(res,'11111111') console.log(res,'11111111')
if(res.data.code==200){ if(res.data.code==200){
this.setData({wishes:res.data.data.records}) this.setData({wishes:res.data.data.records})
@ -120,14 +235,12 @@ Page({
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow() { onShow() {
}, },
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
onHide() { onHide() {
}, },
/** /**

@ -1,88 +1,111 @@
<!--pages/home/xyc/wdyw/wdyw.wxml--> <!--pages/home/xyc/wdyw/wdyw.wxml-->
<!--返回图标--> <!--返回图标-->
<view class="reback" bindtap="go2Reback"></view> <view class="top-header">
<view class="title">我的愿望</view> <view class="header-reback" bindtap="go2Reback"></view>
<view class="header-title">我的愿望</view>
<view class="ywbjt1"></view> </view>
<view class="xycbg2"></view>
<view class="xycbg3"></view>
<view class="wishbox"> <!-- 愿望内容 -->
<view class="body">
<!-- 背景 -->
<view class="ywbjt1"><view class="xycbg2"></view></view>
<!-- 列表 -->
<view class="wishbox">
<view wx:for="{{wishes}}" wx:key="index"> <view wx:for="{{wishes}}" wx:key="index">
<view class="boxitem" bindtap="go2WishDetail" data-wish="{{item}}"> <view class="boxitem" bindtap="go2WishDetail" data-wish="{{item}}">
<!-- 许愿图片 -->
<t-image src="{{item.img}}" class="boximg"></t-image> <t-image src="{{item.img}}" class="boximg"></t-image>
<!-- 许愿内容 -->
<view class="wishbox-text">
<view class="boxtitle">{{item.content}}</view> <view class="boxtitle">{{item.content}}</view>
<view class="qwsjbox">期望时间:{{item.deadline}}</view> <view class="qwsjbox">期望时间:{{item.deadline}}</view>
<t-image class="logosta" src="https://oss.wish.ydxxkj.top/xy/ywc.png" wx:if="{{item.status=='completed'}}"></t-image> </view>
<t-image class="logostajxz" src="https://oss.wish.ydxxkj.top/xy/jxzdt.gif" wx:if="{{item.status=='processing'}}"></t-image> <!-- 图标 -->
<t-image class="logosta" src="https://oss.wish.ydxxkj.top/xy/ygq.png" wx:if="{{item.status=='expired'}}"></t-image> <view class="xy-icon" wx:if="{{item.status=='processing'}}">
<view class="wczt" wx:if="{{item.status=='processing'}}">进行中</view> <t-image class="icon" src="https://oss.wish.ydxxkj.top/xy/jt.gif"></t-image>
<view class="wczt" wx:if="{{item.status=='completed'}}">已完成</view> <view class="text">进行中</view>
<view class="wczt" wx:if="{{item.status=='expired'}}">已过期</view> </view>
<view class="xy-icon" wx:if="{{item.status=='completed'}}">
<t-image class="icon" src="https://wish-assets.windymuse.com.cn/xy/ywc.png"></t-image>
<view class="text">已完成</view>
</view>
<view class="xy-icon" wx:if="{{item.status=='expired'}}">
<t-image class="icon" src="https://wish-assets.windymuse.com.cn/xy/ygq.png"></t-image>
<view class="text">已过期</view>
</view>
</view>
</view> </view>
</view> </view>
</view> </view>
<!--愿望详情--> <!--愿望详情-->
<t-popup visible="{{visible}}" bind:visible-change="onVisibleChange" placement="top"> <t-popup visible="{{visible}}" show-overlay="{{false}}" bind:visible-change="onVisibleChange" placement="top" class="myCanvas-popup">
<view class="all" >
<image class="all-img" wx:if="{{detail.status === 'completed'}}" src="https://oss.wish.ydxxkj.top/xy/ywc.png" /> <view class="box-canvas">
<image class="all-img-processing" wx:if="{{detail.status === 'processing'}}" src="https://oss.wish.ydxxkj.top/xy/jxzdt.gif" /> <canvas canvas-id="myCanvas" class="myCanvas" wx:if="{{showCanvas}}"></canvas>
<image class="all-img" wx:if="{{detail.status === 'expired'}}" src="https://oss.wish.ydxxkj.top/xy/ygq.png" /> <view id="my-canvas" class="my_canvas" bindtap="changeVisible">
<view class="wishdetail" bindtap="changeVisible"></view> <image class="logosta my_draw_canvas" src="https://wish-assets.windymuse.com.cn/xy/ywc.png" data-type="image" data-url="https://wish-assets.windymuse.com.cn/xy/ywc.png" wx:if="{{detail.status=='completed'}}"></image>
<view class="popbox"></view> <image class="logosta my_draw_canvas" src="https://wish-assets.windymuse.com.cn/xy/jxzdt.gif" data-type="image" data-url="https://wish-assets.windymuse.com.cn/xy/jxzdt.gif" wx:if="{{detail.status=='processing'}}"></image>
<t-image class="yximg" src="{{detail.img}}"></t-image> <image class="logosta my_draw_canvas" src="https://wish-assets.windymuse.com.cn/xy/ygq.png" data-type="image" data-url="https://wish-assets.windymuse.com.cn/xy/ygq.png" wx:if="{{detail.status=='expired'}}"></image>
<view class="ywwz">愿望</view> <image class="popbox my_draw_canvas" src="https://wish-assets.windymuse.com.cn/xy/detailbkg.png" data-type="image" data-url="https://wish-assets.windymuse.com.cn/xy/detailbkg.png"/>
<view class="ywxq">{{detail.content}}</view> <image class="yximg my_draw_canvas" src="{{detail.img}}" data-type="image" data-url="{{detail.img}}"/>
<view class="qwsj">期望时间</view> <text class="ywwz my_draw_canvas" data-type="text" data-text="愿望">愿望</text>
<view class="qwsjtxt">{{detail.deadline}}</view> <view class="ywxq my_draw_canvas" data-type="text" data-text="{{detail.content}}">{{detail.content}}</view>
<view class="qwsj my_draw_canvas" data-type="text" data-text="期望时间">期望时间</view>
<view class="qwsjtxt my_draw_canvas" data-type="text" data-text="{{detail.deadline}}">{{detail.deadline}}</view>
</view> </view>
</view>
<view class="ywcczk" wx:if="{{detail.status=='processing'}}"><!--进行中按钮展示--> <view class="ywcczk" wx:if="{{detail.status=='processing'}}"><!--进行中按钮展示-->
<view class="anwz1"> <view class="anwz1">
<view class="yqq" bindtap="go2DelDialog"></view> <view class="yqq" bindtap="go2DelDialog"></view>
<view class="anwztxt1">删除</view> <view class="anwztxt1">删除</view>
<t-image bindtap="go2DelDialog" class="anzmlogo1" src="https://oss.wish.ydxxkj.top/xy/lsc.png"></t-image> <t-image bindtap="go2DelDialog" class="anzmlogo1" src="https://wish-assets.windymuse.com.cn/xy/lsc.png"></t-image>
</view> </view>
<view class="anwz1"> <view class="anwz1">
<view class="yqq"></view> <view class="yqq"></view>
<view class="anwztxt1">修改</view> <view class="anwztxt1">修改</view>
<t-image class="anzmlogo1" src="https://oss.wish.ydxxkj.top/xy/lxg.png"></t-image> <t-image class="anzmlogo1" src="https://wish-assets.windymuse.com.cn/xy/lxg.png"></t-image>
</view> </view>
<view class="anwz1"> <view class="anwz1">
<view class="yqq" bindtap="doFinishWish"></view> <view class="yqq" bindtap="doFinishWish"></view>
<view class="anwztxt1" >已达成</view> <view class="anwztxt1" >已达成</view>
<t-image bindtap="doFinishWish" class="anzmlogo1" src="https://oss.wish.ydxxkj.top/xy/lydc.png"></t-image> <t-image bindtap="doFinishWish" class="anzmlogo1" src="https://wish-assets.windymuse.com.cn/xy/lydc.png"></t-image>
</view> </view>
<view class="anwz1" bindtap="showShare"> <view class="anwz1" bindtap="showShare">
<view class="yqq"></view> <view class="yqq"></view>
<view class="anwztxt1">分享</view> <view class="anwztxt1">分享</view>
<t-image class="anzmlogo1" src="https://oss.wish.ydxxkj.top/xy/lfc.png"></t-image> <t-image class="anzmlogo1" src="https://wish-assets.windymuse.com.cn/xy/lfc.png"></t-image>
</view> </view>
</view> </view>
<view class="ywcczk" wx:if="{{detail.status=='completed'}}"><!--已完成按钮展示--> <view class="ywcczk" wx:if="{{detail.status=='completed'}}"><!--已完成按钮展示-->
<view class="anwz1"> <view class="anwz1">
<view class="yqq" bindtap="go2DelDialog"></view> <view class="yqq" bindtap="go2DelDialog"></view>
<view class="anwztxt1">删除</view> <view class="anwztxt1">删除</view>
<t-image bindtap="go2DelDialog" class="anzmlogo1" src="https://oss.wish.ydxxkj.top/xy/lsc.png"></t-image> <t-image bindtap="go2DelDialog" class="anzmlogo1" src="https://wish-assets.windymuse.com.cn/xy/lsc.png"></t-image>
</view> </view>
<view class="anwz1" bindtap="showShare"> <view class="anwz1" bindtap="showShare">
<view class="yqq"></view> <view class="yqq"></view>
<view class="anwztxt1">分享</view> <view class="anwztxt1">分享</view>
<t-image class="anzmlogo1" src="https://oss.wish.ydxxkj.top/xy/lfc.png"></t-image> <t-image class="anzmlogo1" src="https://wish-assets.windymuse.com.cn/xy/lfc.png"></t-image>
</view> </view>
</view> </view>
<view class="ywcczk" wx:if="{{detail.status=='expired'}}"> <view class="ywcczk" wx:if="{{detail.status=='expired'}}">
<view class="anwz1"> <view class="anwz1">
<view class="yqq" bindtap="go2DelDialog"></view> <view class="yqq" bindtap="go2DelDialog"></view>
<view class="anwztxt1">删除</view> <view class="anwztxt1">删除</view>
<t-image bindtap="go2DelDialog" class="anzmlogo1" src="https://oss.wish.ydxxkj.top/xy/lsc.png"></t-image> <t-image bindtap="go2DelDialog" class="anzmlogo1" src="https://wish-assets.windymuse.com.cn/xy/lsc.png"></t-image>
</view> </view>
<view class="anwz1"> <view class="anwz1">
<view class="yqq"></view> <view class="yqq"></view>
<view class="anwztxt1">修改</view> <view class="anwztxt1">修改</view>
<t-image class="anzmlogo1" src="https://oss.wish.ydxxkj.top/xy/lxg.png"></t-image> <t-image class="anzmlogo1" src="https://wish-assets.windymuse.com.cn/xy/lxg.png"></t-image>
</view> </view>
</view><!--已过期按钮展示--> </view><!--已过期按钮展示-->
@ -112,37 +135,37 @@ data-del="{{detail.id}}"
<view class="main-box"> <view class="main-box">
<view class="box-item"> <view class="box-item">
<button open-type="share" class="item-icon" bindtap="shareWx"> <button open-type="share" class="item-icon" bindtap="shareWx">
<t-image src="https://oss.wish.ydxxkj.top/xy/antFill-wx.png"></t-image> <t-image src="https://wish-assets.windymuse.com.cn/xy/antFill-wx.png"></t-image>
</button> </button>
<view class="item-text">微信</view> <view class="item-text">微信</view>
</view> </view>
<view class="box-item"> <view class="box-item">
<view class="item-icon cyan"> <view class="item-icon cyan">
<t-image src="https://oss.wish.ydxxkj.top/xy/antFill-pyq.png"></t-image> <t-image src="https://wish-assets.windymuse.com.cn/xy/antFill-pyq.png"></t-image>
</view> </view>
<view class="item-text">朋友圈</view> <view class="item-text">朋友圈</view>
</view> </view>
<view class="box-item"> <view class="box-item">
<view class="item-icon orange"> <view class="item-icon orange">
<t-image src="https://oss.wish.ydxxkj.top/xy/antFill-wb.png"></t-image> <t-image src="https://wish-assets.windymuse.com.cn/xy/antFill-wb.png"></t-image>
</view> </view>
<view class="item-text">微博</view> <view class="item-text">微博</view>
</view> </view>
<view class="box-item"> <view class="box-item">
<view class="item-icon blue"> <view class="item-icon blue">
<t-image src="https://oss.wish.ydxxkj.top/xy/antFill-qq.png"></t-image> <t-image src="https://wish-assets.windymuse.com.cn/xy/antFill-qq.png"></t-image>
</view> </view>
<view class="item-text">QQ</view> <view class="item-text">QQ</view>
</view> </view>
<view class="box-item"> <view class="box-item">
<view class="item-icon yellow"> <view class="item-icon yellow">
<t-image src="https://oss.wish.ydxxkj.top/xy/antFill-qqkj.png"></t-image> <t-image src="https://wish-assets.windymuse.com.cn/xy/antFill-qqkj.png"></t-image>
</view> </view>
<view class="item-text">QQ空间</view> <view class="item-text">QQ空间</view>
</view> </view>
<view class="box-item"> <view class="box-item">
<view class="item-icon orange"> <view class="item-icon orange" bindtap="getImg">
<t-image src="https://oss.wish.ydxxkj.top/xy/antFill-tp.png"></t-image> <t-image src="https://wish-assets.windymuse.com.cn/xy/antFill-tp.png"></t-image>
</view> </view>
<view class="item-text">生成图片</view> <view class="item-text">生成图片</view>
</view> </view>

@ -1,144 +1,137 @@
/* pages/home/xyc/wdyw/wdyw.wxss */ /* pages/home/xyc/wdyw/wdyw.wxss */
.reback{
.top-header {
position: fixed;
top: 0;
width: 100%;
height: 176rpx;
padding-bottom: 20rpx;
box-sizing: border-box;
display: flex;
align-items: flex-end;
justify-content: center;
background-color: #fff;
z-index: 1;
}
.header-reback{
position: absolute; position: absolute;
margin-left: 20rpx; left: 20rpx;
margin-top:108rpx;
width:48rpx; width:48rpx;
height:48rpx; height:48rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/reback.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/reback.png);
} }
.title{ .header-title{
position: absolute;
left: 278rpx;
top: 108rpx;
width: 196rpx; width: 196rpx;
height: 48rpx; height: 48rpx;
color: rgba(108, 108, 108, 1); color: rgba(108, 108, 108, 1);
font-size: 32rpx; font-size: 32rpx;
text-align: center; text-align: center;
font-family: SourceHanSansSC-regular;
} }
.ywbjt1{ .body {
position: absolute; position: absolute;
left: -44rpx; top: 190rpx;
top: 280rpx; width: 100%;
width: 842rpx; }
.ywbjt1{
width: 100%;
height: 1168rpx; height: 1168rpx;
margin-top: 280rpx;
padding-top: 404rpx;
box-sizing: border-box;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/bg111.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/bg111.png);
} }
.xycbg2{ .xycbg2{
position: absolute; width: 100%;
left: -28rpx;
top: 684rpx;
width: 798rpx;
height: 682rpx; height: 682rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/xycbg2.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/xycbg2.png);
} }
.wishbox{ .wishbox{
position: absolute; position: absolute;
width:750rpx; top: 0;
top:190rpx; width:100%;
height:1300rpx; height:1428rpx;
} padding-top: 10rpx;
box-sizing: border-box;
.xycbg3{ display: flex;
position: absolute; align-items: center;
left: -48rpx; flex-direction: column;
top: 232rpx; overflow-y: auto;
width: 880rpx;
height: 1370rpx;
background-repeat: no-repeat;
background-size:100% 100%;
} }
.boxitem{ .boxitem{
margin: 0 auto; width: 686rpx;
top: 104px; height: 188rpx;
width: 343px; padding: 40rpx 32rpx;
height: 94px; box-sizing: border-box;
line-height: 20px; border-radius: 20rpx;
border-radius: 10px;
background-color: rgba(255, 255, 255, 1); background-color: rgba(255, 255, 255, 1);
text-align: center; box-shadow: 0px 2rpx 6rpx 0px rgba(0, 0, 0, 0.4);
box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.4);
margin-bottom: 30rpx; margin-bottom: 30rpx;
display: flex;
align-items: center;
justify-content: space-between;
} }
.boximg{ .boximg{
float: left; width: 110rpx;
margin-left: 32rpx; height: 110rpx;
padding-top: 39rpx; }
width: 55px;
height: 55px; .wishbox-text {
width: 320rpx;
height: 100%;
display: flex;
justify-content: center;
flex-direction: column;
} }
.boxtitle{ .boxtitle{
float:initial;
margin-left: 174rpx;
padding-top: 58rpx;
width: 180px;
height: 20px;
color: rgba(108, 108, 108, 1); color: rgba(108, 108, 108, 1);
font-size: 30rpx; font-size: 28rpx;
text-align: left;
font-weight: 700; font-weight: 700;
overflow:hidden; width: 320rpx;
white-space: nowrap;
text-overflow: ellipsis;
-o-text-overflow:ellipsis;
} }
.qwsjbox{ .qwsjbox{
float:initial;
margin-left: 174rpx;
top: 306rpx;
width: 286rpx;
height: 34rpx;
color: rgba(108, 108, 108, 1); color: rgba(108, 108, 108, 1);
font-size: 12px; font-size: 28rpx;
text-align: left; width: 320rpx;
font-family: SourceHanSansSC-regular;
} }
.wczt{ .xy-icon {
float:initial; width: 110rpx;
margin-left: 295px; height: 110rpx;
margin-top: -75rpx; display: flex;
width: 36px; align-items: center;
height: 17px; justify-content: space-between;
color: rgba(108, 108, 108, 1); flex-direction: column;
font-size: 12px;
text-align: left;
font-family: SourceHanSansSC-regular;
} }
.logosta{ .xy-icon .icon {
float:initial; width: 70rpx;
margin-left: 289px; height: 70rpx;
margin-top: -100rpx;
width: 34px;
height: 34px;
} }
.logostajxz{ .xy-icon .text {
float:initial; font-size: 24rpx;
margin-left: 283px; color: rgba(108, 108, 108, 1);
margin-top: -130rpx;
width: 60px;
height: 60px;
} }
.all{ .all{
width:750rpx; width:750rpx;
height:1624rpx; height:1624rpx;
@ -150,19 +143,16 @@
} }
.popbox{ .popbox{
position: absolute; position: absolute;
left: 66rpx; left: 0;
top: 166rpx; top: 0;
width: 620rpx; width: 620rpx;
height: 1080rpx; height: 1080rpx;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/detailbkg.png);
} }
.yximg{ .yximg{
position: absolute; position: absolute;
left: 146rpx; left: 80rpx;
top: 330rpx; top: 164rpx;
width: 460rpx; width: 460rpx;
height: 308rpx; height: 308rpx;
border-radius: 10px; border-radius: 10px;
@ -170,21 +160,19 @@
} }
.ywwz{ .ywwz{
position: absolute; position: absolute;
left: 328rpx; top: 540rpx;
top: 706rpx; width: 100%;
/* width: 96rpx; */
height: 66rpx; height: 66rpx;
text-align: center;
color: rgba(248, 99, 42, 1); color: rgba(248, 99, 42, 1);
font-size: 48rpx; font-size: 48rpx;
text-align: left; font-weight: 700;
font-family: SourceHanSansSC-bold;
} }
.ywxq{ .ywxq{
position: absolute; position: absolute;
left: 182rpx; top: 632rpx;
top: 798rpx; width: 100%;
width: 388rpx;
height: 150rpx; height: 150rpx;
color: rgba(108, 108, 108, 1); color: rgba(108, 108, 108, 1);
font-size: 36rpx; font-size: 36rpx;
@ -193,25 +181,21 @@
} }
.qwsj{ .qwsj{
position: absolute; position: absolute;
left: 280rpx; top: 814rpx;
top: 980rpx; width: 100%;
/* width: 192rpx; */
height: 66rpx; height: 66rpx;
color: rgba(248, 99, 42, 1); color: rgba(248, 99, 42, 1);
font-size: 48rpx; font-size: 48rpx;
text-align: center; text-align: center;
font-family: SourceHanSansSC-regular;
} }
.qwsjtxt{ .qwsjtxt{
position: absolute; position: absolute;
left: 250rpx; top: 906rpx;
top: 1072rpx; width: 100%;
width: 254rpx;
height: 50rpx; height: 50rpx;
color: rgba(108, 108, 108, 1); color: rgba(108, 108, 108, 1);
font-size: 36rpx; font-size: 36rpx;
text-align: center; text-align: center;
font-family: SourceHanSansSC-regular;
} }
.yqq{/*圆圈*/ .yqq{/*圆圈*/
@ -373,6 +357,46 @@
top: 192rpx; top: 192rpx;
left: 336rpx; left: 336rpx;
width: 80rpx; width: 80rpx;
height: 64rpx; height: 80rpx;
z-index: 1;
}
.myCanvas-popup {
height: 100vh;
background-color: rgba(255, 255, 255, 0) !important;
}
.myCanvas-popup .t-popup__content{
height: 100%;
background-color: rgba(255, 255, 255, 1);
}
.my_canvas {
width: 620rpx;
height: 1080rpx;
position: absolute;
top: 0;
}
.myCanvas {
width: 620rpx;
height: 1080rpx;
}
.logosta {
position: absolute;
top: 20rpx;
left: 270rpx;
width: 50px;
height: 50px;
z-index: 1; z-index: 1;
} }
.box-canvas {
position: absolute;
left: 66rpx;
top: 166rpx;
width: 620rpx;
height: 1080rpx;
}

@ -14,7 +14,7 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
background-image: url(https://oss.wish.ydxxkj.top/xy/index-bgc.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/index-bgc.png);
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: contain; background-size: contain;
} }
@ -26,7 +26,7 @@
flex-direction: column; flex-direction: column;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 50rpx 50rpx; background-size: 50rpx 50rpx;
background-image: url(https://oss.wish.ydxxkj.top/xy/question.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/question.png);
} }
.alb{ .alb{
@ -35,7 +35,7 @@
margin-top: 258rpx; margin-top: 258rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/alb.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/alb.png);
} }
.qr{ .qr{
@ -46,14 +46,14 @@
align-items: center; align-items: center;
justify-content: center; justify-content: center;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/qr.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/qr.png);
} }
.js{ .js{
width: 114rpx; width: 114rpx;
height: 172rpx; height: 172rpx;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/js.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/js.png);
} }
.yw{ .yw{
@ -64,14 +64,14 @@
align-items: center; align-items: center;
justify-content: center; justify-content: center;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/yw.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/yw.png);
} }
.shadow { .shadow {
width: 150rpx; width: 150rpx;
height: 62rpx; height: 62rpx;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/shadow.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/shadow.png);
} }
.jstext{ .jstext{
@ -79,7 +79,7 @@
height: 242rpx; height: 242rpx;
margin-top: 118rpx; margin-top: 118rpx;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/jstext.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/jstext.png);
} }
.yx{ .yx{
@ -93,5 +93,5 @@
font-size: 40rpx; font-size: 40rpx;
font-weight: bold; font-weight: bold;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/yx.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/yx.png);
} }

@ -40,10 +40,10 @@
<view class="body-btm-img"> <view class="body-btm-img">
<view class="btm-img-icon"></view> <view class="btm-img-icon"></view>
<view class="btm-img-goback" bindtap="go2Back"> <view class="btm-img-goback" bindtap="go2Back">
<image src="https://oss.wish.ydxxkj.top/xy/iconPark-return%401x.png" /> <image src="https://wish-assets.windymuse.com.cn/xy/iconPark-return%401x.png" />
</view> </view>
<view class="btm-img-more" bindtap="openMore"> <view class="btm-img-more" bindtap="openMore">
<image src="https://oss.wish.ydxxkj.top/xy/md-more_horiz%20Copy%401x.png" /> <image src="https://wish-assets.windymuse.com.cn/xy/md-more_horiz%20Copy%401x.png" />
</view> </view>
<view class="btm-img-more modify" wx:if="{{showMore}}" bindtap="openDel">销毁</view> <view class="btm-img-more modify" wx:if="{{showMore}}" bindtap="openDel">销毁</view>
<!-- <view class="btm-img-more del" wx:if="{{showMore}}">修改</view> --> <!-- <view class="btm-img-more del" wx:if="{{showMore}}">修改</view> -->

@ -16,7 +16,7 @@ page {
width: 100%; width: 100%;
height: 230rpx; height: 230rpx;
margin-top: 104rpx; margin-top: 104rpx;
background-image: url(https://oss.wish.ydxxkj.top/xy/bgt1.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/bgt1.png);
background-size: cover; background-size: cover;
} }
@ -25,7 +25,7 @@ page {
width: 660rpx; width: 660rpx;
height: 522rpx; height: 522rpx;
background-size: contain; background-size: contain;
background-image: url(https://oss.wish.ydxxkj.top/xy/xzt.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/xzt.png);
} }
.already-text { .already-text {
@ -124,7 +124,7 @@ page {
padding-left: 48rpx; padding-left: 48rpx;
box-sizing: border-box; box-sizing: border-box;
background-size: cover; background-size: cover;
background-image: url(https://oss.wish.ydxxkj.top/xy/ltqpp.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/ltqpp.png);
} }
.xinfo-icon { .xinfo-icon {
@ -132,7 +132,7 @@ page {
height: 60rpx; height: 60rpx;
background-size: cover; background-size: cover;
margin-right: 20rpx; margin-right: 20rpx;
background-image: url(https://oss.wish.ydxxkj.top/xy/%E8%AF%AD%E9%9F%B3.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/%E8%AF%AD%E9%9F%B3.png);
} }
.xinfo-img { .xinfo-img {
@ -172,7 +172,7 @@ page {
height: 900rpx; height: 900rpx;
background-size: cover; background-size: cover;
pointer-events: none; pointer-events: none;
background-image: url(https://oss.wish.ydxxkj.top/xy/bgt2.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/bgt2.png);
} }
.btm-img-icon { .btm-img-icon {
@ -181,7 +181,7 @@ page {
left: 308rpx; left: 308rpx;
width: 146rpx; width: 146rpx;
height: 146rpx; height: 146rpx;
background-image: url(https://oss.wish.ydxxkj.top/xy/%E5%8D%B0%E7%AB%A0.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/%E5%8D%B0%E7%AB%A0.png);
background-size: cover; background-size: cover;
} }

@ -3,21 +3,14 @@
"projectname": "xzjl-ui", "projectname": "xzjl-ui",
"setting": { "setting": {
"compileHotReLoad": true, "compileHotReLoad": true,
"urlCheck": false "urlCheck": true
}, },
"condition": { "condition": {
"miniprogram": { "miniprogram": {
"list": [ "list": [
{ {
"name": "", "name": "",
"pathName": "pages/home/jl/index", "pathName": "pages/home/xyc/index",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "",
"pathName": "pages/home/xx/lindex/lindex",
"query": "", "query": "",
"launchMode": "default", "launchMode": "default",
"scene": null "scene": null

Loading…
Cancel
Save