tn-sign-board.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690
  1. <template>
  2. <view v-if="show" class="tn-sign-board-class tn-sign-board" :style="{top: `${customBarHeight}px`, height: `calc(100% - ${customBarHeight}px)`}">
  3. <!-- 签名canvas -->
  4. <view class="tn-sign-board__content">
  5. <view class="tn-sign-board__content__wrapper">
  6. <canvas class="tn-sign-board__content__canvas" :canvas-id="canvasName" :disableScroll="true" @touchstart="onTouchStart" @touchmove="onTouchMove" @touchend="onTouchEnd"></canvas>
  7. </view>
  8. </view>
  9. <!-- 底部工具栏 -->
  10. <view class="tn-sign-board__tools">
  11. <!-- 可选颜色 -->
  12. <view class="tn-sign-board__tools__color">
  13. <view
  14. v-for="(item, index) in signSelectColor"
  15. :key="index"
  16. class="tn-sign-board__tools__color__item"
  17. :class="[{'tn-sign-board__tools__color__item--active': currentSelectColor === item}]"
  18. :style="{backgroundColor: item}"
  19. @tap="colorSwitch(item)"
  20. ></view>
  21. </view>
  22. <!-- 按钮 -->
  23. <view class="tn-sign-board__tools__button">
  24. <view class="tn-sign-board__tools__button__item tn-bg-red" @tap="reDraw">清除</view>
  25. <view class="tn-sign-board__tools__button__item tn-bg-blue" @tap="save">保存</view>
  26. <view class="tn-sign-board__tools__button__item tn-bg-indigo" @tap="previewImage">预览</view>
  27. <view class="tn-sign-board__tools__button__item tn-bg-orange" @tap="closeBoard">关闭</view>
  28. </view>
  29. </view>
  30. <!-- 伪全屏生成旋转图片canvas容器,不在页面上展示 -->
  31. <view style="position: fixed; left: -2000px;width: 0;height: 0;overflow: hidden;">
  32. <canvas canvas-id="temp-tn-sign-canvas" :style="{width: `${canvasHeight}px`, height: `${canvasHeight}px`}"></canvas>
  33. </view>
  34. </view>
  35. </template>
  36. <script>
  37. export default {
  38. name: 'tn-sign-board',
  39. props: {
  40. // 是否显示
  41. show: {
  42. type: Boolean,
  43. default: false
  44. },
  45. // 可选签名颜色
  46. signSelectColor: {
  47. type: Array,
  48. default() {
  49. return ['#080808', '#E83A30']
  50. }
  51. },
  52. // 是否旋转输出图片
  53. rotate: {
  54. type: Boolean,
  55. default: true
  56. },
  57. // 自定义顶栏的高度
  58. customBarHeight: {
  59. type: [String, Number],
  60. default: 0
  61. }
  62. },
  63. data() {
  64. return {
  65. canvasName: 'tn-sign-canvas',
  66. ctx: null,
  67. canvasWidth: 0,
  68. canvasHeight: 0,
  69. currentSelectColor: this.signSelectColor[0],
  70. // 第一次触摸
  71. firstTouch: false,
  72. // 透明度
  73. transparent: 1,
  74. // 笔迹倍数
  75. lineSize: 1.5,
  76. // 最小画笔半径
  77. minLine: 0.5,
  78. // 最大画笔半径
  79. maxLine: 4,
  80. // 画笔压力
  81. pressure: 1,
  82. // 顺滑度,用60的距离来计算速度
  83. smoothness: 60,
  84. // 当前触摸的点
  85. currentPoint: {},
  86. // 当前线条
  87. currentLine: [],
  88. // 画笔圆半径
  89. radius: 1,
  90. // 裁剪区域
  91. cutArea: {
  92. top: 0,
  93. right: 0,
  94. bottom: 0,
  95. left: 0
  96. },
  97. // 所有线条, 生成贝塞尔点
  98. // bethelPoint: [],
  99. // 上一个点
  100. lastPoint: 0,
  101. // 笔迹
  102. chirography: [],
  103. // 当前笔迹
  104. // currentChirography: {},
  105. // 画线轨迹,生成线条的实际点
  106. linePrack: []
  107. }
  108. },
  109. watch: {
  110. show(value) {
  111. if (value && this.canvasWidth === 0 && this.canvasHeight === 0) {
  112. this.$nextTick(() => {
  113. this.getCanvasInfo()
  114. })
  115. }
  116. },
  117. signSelectColor(value) {
  118. if (value.length > 0) {
  119. this.currentSelectColor = value[0]
  120. }
  121. }
  122. },
  123. created() {
  124. // 创建canvas
  125. this.ctx = uni.createCanvasContext(this.canvasName, this)
  126. },
  127. mounted() {
  128. // 获取画板的相关信息
  129. // this.$nextTick(() => {
  130. // this.getCanvasInfo()
  131. // })
  132. },
  133. methods: {
  134. // 获取画板的相关信息
  135. getCanvasInfo() {
  136. this._tGetRect('.tn-sign-board__content__canvas').then(res => {
  137. this.canvasWidth = res.width
  138. this.canvasHeight = res.height
  139. // 初始化Canvas
  140. this.$nextTick(() => {
  141. this.initCanvas('#FFFFFF')
  142. })
  143. })
  144. },
  145. // 初始化Canvas
  146. initCanvas(color) {
  147. /* 将canvas背景设置为 白底,不设置 导出的canvas的背景为透明 */
  148. // rect() 参数说明 矩形路径左上角的横坐标,左上角的纵坐标, 矩形路径的宽度, 矩形路径的高度
  149. // 矩形的宽高需要减去边框的宽度
  150. this.ctx.rect(0, 0, this.canvasWidth - uni.upx2px(4), this.canvasHeight - uni.upx2px(4))
  151. this.ctx.setFillStyle(color)
  152. this.ctx.fill()
  153. this.ctx.draw()
  154. },
  155. // 开始画
  156. onTouchStart(e) {
  157. if (e.type != 'touchstart') return false
  158. // 设置线条颜色
  159. this.ctx.setFillStyle(this.currentSelectColor)
  160. // 设置透明度
  161. this.ctx.setGlobalAlpha(this.transparent)
  162. let currentPoint = {
  163. x: e.touches[0].x,
  164. y: e.touches[0].y
  165. }
  166. let currentLine = this.currentLine
  167. currentLine.unshift({
  168. time: new Date().getTime(),
  169. dis: 0,
  170. x: currentPoint.x,
  171. y: currentPoint.y
  172. })
  173. this.currentPoint = currentPoint
  174. if (this.firstTouch) {
  175. this.cutArea = {
  176. top: currentPoint.y,
  177. right: currentPoint.x,
  178. bottom: currentPoint.y,
  179. left: currentPoint.x
  180. }
  181. this.firstTouch = false
  182. }
  183. this.pointToLine(currentLine)
  184. },
  185. // 正在画
  186. onTouchMove(e) {
  187. if (e.type != 'touchmove') return false
  188. if (e.cancelable) {
  189. // 判断默认行为是否已经被禁用
  190. if (!e.defaultPrevented) {
  191. e.preventDefault()
  192. }
  193. }
  194. let point = {
  195. x: e.touches[0].x,
  196. y: e.touches[0].y
  197. }
  198. if (point.y < this.cutArea.top) {
  199. this.cutArea.top = point.y
  200. }
  201. if (point.y < 0) this.cutArea.top = 0
  202. if (point.x < this.cutArea.right) {
  203. this.cutArea.right = point.x
  204. }
  205. if (this.canvasWidth - point.x <= 0) {
  206. this.cutArea.right = this.canvasWidth
  207. }
  208. if (point.y > this.cutArea.bottom) {
  209. this.cutArea.bottom = this.canvasHeight
  210. }
  211. if (this.canvasHeight - point.y <= 0) {
  212. this.cutArea.bottom = this.canvasHeight
  213. }
  214. if (point.x < this.cutArea.left) {
  215. this.cutArea.left = point.x
  216. }
  217. if (point.x < 0) this.cutArea.left = 0
  218. this.lastPoint = this.currentPoint
  219. this.currentPoint = point
  220. let currentLine = this.currentLine
  221. currentLine.unshift({
  222. time: new Date().getTime(),
  223. dis: this.distance(this.currentPoint, this.lastPoint),
  224. x: point.x,
  225. y: point.y
  226. })
  227. this.pointToLine(currentLine)
  228. },
  229. // 移动结束
  230. onTouchEnd(e) {
  231. if (e.type != 'touchend') return false
  232. let point = {
  233. x: e.changedTouches[0].x,
  234. y: e.changedTouches[0].y
  235. }
  236. this.lastPoint = this.currentPoint
  237. this.currentPoint = point
  238. let currentLine = this.currentLine
  239. currentLine.unshift({
  240. time: new Date().getTime(),
  241. dis: this.distance(this.currentPoint, this.lastPoint),
  242. x: point.x,
  243. y: point.y
  244. })
  245. //一笔结束,保存笔迹的坐标点,清空,当前笔迹
  246. //增加判断是否在手写区域
  247. this.pointToLine(currentLine)
  248. let currentChirography = {
  249. lineSize: this.lineSize,
  250. lineColor: this.currentSelectColor
  251. }
  252. let chirography = this.chirography
  253. chirography.unshift(currentChirography)
  254. this.chirography = chirography
  255. let linePrack = this.linePrack
  256. linePrack.unshift(this.currentLine)
  257. this.linePrack = linePrack
  258. this.currentLine = []
  259. },
  260. // 重置绘画板
  261. reDraw() {
  262. this.initCanvas('#FFFFFF')
  263. },
  264. // 保存
  265. save() {
  266. // 在组件内使用需要第二个参数this
  267. uni.canvasToTempFilePath({
  268. canvasId: this.canvasName,
  269. fileType: 'png',
  270. quality: 1,
  271. success: (res) => {
  272. if (this.rotate) {
  273. this.getRotateImage(res.tempFilePath).then((res) => {
  274. this.$emit('save', res)
  275. }).catch(err => {
  276. this.$t.message.toast('旋转图片失败')
  277. })
  278. } else {
  279. this.$emit('save', res.tempFilePath)
  280. }
  281. },
  282. fail: () => {
  283. this.$t.message.toast('保存失败')
  284. }
  285. }, this)
  286. },
  287. // 预览图片
  288. previewImage() {
  289. // 在组件内使用需要第二个参数this
  290. uni.canvasToTempFilePath({
  291. canvasId: this.canvasName,
  292. fileType: 'png',
  293. quality: 1,
  294. success: (res) => {
  295. if (this.rotate) {
  296. this.getRotateImage(res.tempFilePath).then((res) => {
  297. uni.previewImage({
  298. urls: [res]
  299. })
  300. }).catch(err => {
  301. this.$t.message.toast('旋转图片失败')
  302. })
  303. } else {
  304. uni.previewImage({
  305. urls: [res.tempFilePath]
  306. })
  307. }
  308. },
  309. fail: (e) => {
  310. this.$t.message.toast('预览失败')
  311. }
  312. }, this)
  313. },
  314. // 关闭签名板
  315. closeBoard() {
  316. this.$t.message.modal('提示信息','关闭后内容将被清除,是否确认关闭',() => {
  317. this.$emit('closed')
  318. }, true)
  319. },
  320. // 切换画笔颜色
  321. colorSwitch(color) {
  322. this.currentSelectColor = color
  323. },
  324. // 绘制两点之间的线条
  325. pointToLine(line) {
  326. this.calcBethelLine(line)
  327. },
  328. // 计算插值,让线条更加圆滑
  329. calcBethelLine(line) {
  330. if (line.length <= 1) {
  331. line[0].r = this.radius
  332. return
  333. }
  334. let x0,
  335. x1,
  336. x2,
  337. y0,
  338. y1,
  339. y2,
  340. r0,
  341. r1,
  342. r2,
  343. len,
  344. lastRadius,
  345. dis = 0,
  346. time = 0,
  347. curveValue = 0.5;
  348. if (line.length <= 2) {
  349. x0 = line[1].x
  350. y0 = line[1].y
  351. x2 = line[1].x + (line[0].x - line[1].x) * curveValue
  352. y2 = line[1].y + (line[0].y - line[1].y) * curveValue
  353. x1 = x0 + (x2 - x0) * curveValue
  354. y1 = y0 + (y2 - y0) * curveValue
  355. } else {
  356. x0 = line[2].x + (line[1].x - line[2].x) * curveValue
  357. y0 = line[2].y + (line[1].y - line[2].y) * curveValue
  358. x1 = line[1].x
  359. y1 = line[1].y
  360. x2 = x1 + (line[0].x - x1) * curveValue
  361. y2 = y1 + (line[0].y - y1) * curveValue
  362. }
  363. // 三个点分别是(x0,y0),(x1,y1),(x2,y2) ;(x1,y1)这个是控制点,控制点不会落在曲线上;实际上,这个点还会手写获取的实际点,却落在曲线上
  364. len = this.distance({
  365. x: x2,
  366. y: y2
  367. }, {
  368. x: x0,
  369. y: y0
  370. })
  371. lastRadius = this.radius
  372. for (let i = 0; i < line.length - 1; i++) {
  373. dis += line[i].dis
  374. time += line[i].time - line[i + 1].time
  375. if (dis > this.smoothness) break
  376. }
  377. this.radius = Math.min((time / len) * this.pressure + this.minLine, this.maxLine) * this.lineSize
  378. line[0].r = this.radius
  379. // 计算笔迹半径
  380. if (line.length <= 2) {
  381. r0 = (lastRadius + this.radius) / 2
  382. r1 = r0
  383. r2 = r1
  384. } else {
  385. r0 = (line[2].r + line[1].r) / 2
  386. r1 = line[1].r
  387. r2 = (line[1].r + line[0].r) / 2
  388. }
  389. let n = 5
  390. let point = []
  391. for (let i = 0; i < n; i++) {
  392. let t = i / (n - 1)
  393. let x = (1 - t) * (1 - t) * x0 + 2 * t * (1 - t) * x1 + t * t * x2
  394. let y = (1 - t) * (1 - t) * y0 + 2 * t * (1 - t) * y1 + t * t * y2
  395. let r = lastRadius + ((this.radius - lastRadius) / n) * i
  396. point.push({
  397. x,
  398. y,
  399. r
  400. })
  401. if (point.length === 3) {
  402. let a = this.ctaCalc(point[0].x, point[0].y, point[0].r, point[1].x, point[1].y, point[1].r, point[2].x, point[2].y, point[2].r)
  403. a[0].color = this.currentSelectColor
  404. this.drawBethel(a, true)
  405. point = [{
  406. x,
  407. y,
  408. r
  409. }]
  410. }
  411. }
  412. this.currentLine = line
  413. },
  414. // 求两点之间的距离
  415. distance(a, b) {
  416. let x = b.x - a.x
  417. let y = b.y - a.y
  418. return Math.sqrt(x * x + y * y)
  419. },
  420. // 计算点信息
  421. ctaCalc(x0, y0, r0, x1, y1, r1, x2, y2, r2) {
  422. let a = [],
  423. vx01,
  424. vy01,
  425. norm,
  426. n_x0,
  427. n_y0,
  428. vx21,
  429. vy21,
  430. n_x2,
  431. n_y2;
  432. vx01 = x1 - x0
  433. vy01 = y1 - y0
  434. norm = Math.sqrt(vx01 * vx01 + vy01 * vy01 + 0.0001) * 2
  435. vx01 = (vx01 / norm) * r0
  436. vy01 = (vy01 / norm) * r0
  437. n_x0 = vy01
  438. n_y0 = -vx01
  439. vx21 = x1 - x2
  440. vy21 = y1 - y2
  441. norm = Math.sqrt(vx21 * vx21 + vy21 * vy21 + 0.0001) * 2
  442. vx21 = (vx21 / norm) * r2
  443. vy21 = (vy21 / norm) * r2
  444. n_x2 = -vy21
  445. n_y2 = vx21
  446. a.push({
  447. mx: x0 + n_x0,
  448. my: y0 + n_y0,
  449. color: '#080808'
  450. })
  451. a.push({
  452. c1x: x1 + n_x0,
  453. c1y: y1 + n_y0,
  454. c2x: x1 + n_x2,
  455. c2y: y1 + n_y2,
  456. ex: x2 + n_x2,
  457. ey: y2 + n_y2
  458. })
  459. a.push({
  460. c1x: x2 + n_x2 - vx21,
  461. c1y: y2 + n_y2 - vy21,
  462. c2x: x2 - n_x2 - vx21,
  463. c2y: y2 - n_y2 - vy21,
  464. ex: x2 - n_x2,
  465. ey: y2 - n_y2
  466. })
  467. a.push({
  468. c1x: x1 - n_x2,
  469. c1y: y1 - n_y2,
  470. c2x: x1 - n_x0,
  471. c2y: y1 - n_y0,
  472. ex: x0 - n_x0,
  473. ey: y0 - n_y0
  474. })
  475. a.push({
  476. c1x: x0 - n_x0 - vx01,
  477. c1y: y0 - n_y0 - vy01,
  478. c2x: x0 + n_x0 - vx01,
  479. c2y: y0 + n_y0 - vy01,
  480. ex: x0 + n_x0,
  481. ey: y0 + n_y0
  482. })
  483. a[0].mx = a[0].mx.toFixed(1)
  484. a[0].mx = parseFloat(a[0].mx)
  485. a[0].my = a[0].my.toFixed(1)
  486. a[0].my = parseFloat(a[0].my)
  487. for (let i = 1; i < a.length; i++) {
  488. a[i].c1x = a[i].c1x.toFixed(1)
  489. a[i].c1x = parseFloat(a[i].c1x)
  490. a[i].c1y = a[i].c1y.toFixed(1)
  491. a[i].c1y = parseFloat(a[i].c1y)
  492. a[i].c2x = a[i].c2x.toFixed(1)
  493. a[i].c2x = parseFloat(a[i].c2x)
  494. a[i].c2y = a[i].c2y.toFixed(1)
  495. a[i].c2y = parseFloat(a[i].c2y)
  496. a[i].ex = a[i].ex.toFixed(1)
  497. a[i].ex = parseFloat(a[i].ex)
  498. a[i].ey = a[i].ey.toFixed(1)
  499. a[i].ey = parseFloat(a[i].ey)
  500. }
  501. return a
  502. },
  503. // 绘制贝塞尔曲线
  504. drawBethel(point, is_fill, color) {
  505. this.ctx.beginPath()
  506. this.ctx.moveTo(point[0].mx, point[0].my)
  507. if (color != undefined) {
  508. this.ctx.setFillStyle(color)
  509. this.ctx.setStrokeStyle(color)
  510. } else {
  511. this.ctx.setFillStyle(point[0].color)
  512. this.ctx.setStrokeStyle(point[0].color)
  513. }
  514. for (let i = 1; i < point.length; i++) {
  515. this.ctx.bezierCurveTo(point[i].c1x, point[i].c1y, point[i].c2x, point[i].c2y, point[i].ex, point[i].ey)
  516. }
  517. this.ctx.stroke()
  518. if (is_fill != undefined) {
  519. //填充图形 ( 后绘制的图形会覆盖前面的图形, 绘制时注意先后顺序 )
  520. this.ctx.fill()
  521. }
  522. this.ctx.draw(true)
  523. },
  524. // 旋转图片
  525. async getRotateImage(dataUrl) {
  526. // const url = await this.base64ToPath(dataUrl)
  527. const url = dataUrl
  528. // 创建新画布
  529. const tempCtx = uni.createCanvasContext('temp-tn-sign-canvas', this)
  530. const width = this.canvasWidth
  531. const height = this.canvasHeight
  532. tempCtx.restore()
  533. tempCtx.save()
  534. tempCtx.translate(0, height)
  535. tempCtx.rotate(270 * Math.PI / 180)
  536. tempCtx.drawImage(url, 0, 0, width, height)
  537. tempCtx.draw()
  538. return new Promise((resolve, reject) => {
  539. setTimeout(() => {
  540. uni.canvasToTempFilePath({
  541. canvasId: 'temp-tn-sign-canvas',
  542. fileType: 'png',
  543. x: 0,
  544. y: height - width,
  545. width: height,
  546. height: width,
  547. success: res => resolve(res.tempFilePath),
  548. fail: reject
  549. }, this)
  550. }, 50)
  551. })
  552. },
  553. // 将base64转换为本地
  554. base64ToPath(dataUrl) {
  555. return new Promise((resolve, reject) => {
  556. // 判断地址是否包含bas64字样,不包含直接返回
  557. if (dataUrl.indexOf('base64') !== -1) {
  558. const data = uni.base64ToArrayBuffer(dataUrl.replace(/^data:image\/\w+;base64,/, ''))
  559. // #ifdef MP-WEIXIN
  560. const filePath = `${wx.env.USER_DATA_PATH}/${new Date().getTime()}-${Math.random().toString(32).slice(2)}.png`
  561. // #endif
  562. // #ifndef MP-WEIXIN
  563. const filePath = `${new Date().getTime()}-${Math.random().toString(32).slice(2)}.png`
  564. // #endif
  565. uni.getFileSystemManager().writeFile({
  566. filePath,
  567. data,
  568. encoding: 'base64',
  569. success: () => resolve(filePath),
  570. fail: reject
  571. })
  572. } else {
  573. resolve(dataUrl)
  574. }
  575. })
  576. }
  577. }
  578. }
  579. </script>
  580. <style lang="scss" scoped>
  581. .tn-sign-board {
  582. position: fixed;
  583. top: 0;
  584. left: 0;
  585. right: 0;
  586. bottom: 0;
  587. width: 100%;
  588. height: 100%;
  589. background-color: #E6E6E6;
  590. z-index: 997;
  591. display: flex;
  592. flex-direction: row-reverse;
  593. &__content {
  594. width: 84%;
  595. height: 100%;
  596. &__wrapper {
  597. width: calc(100% - 60rpx);
  598. height: calc(100% - 60rpx);
  599. margin: 30rpx;
  600. border-radius: 20rpx;
  601. border: 2rpx dotted #AAAAAA;
  602. overflow: hidden;
  603. }
  604. &__canvas {
  605. width: 100%;
  606. height: 100%;
  607. background-color: #FFFFFF;
  608. }
  609. }
  610. &__tools {
  611. width: 16%;
  612. height: 100%;
  613. display: flex;
  614. flex-direction: column;
  615. align-items: center;
  616. justify-content: space-between;
  617. &__color {
  618. margin-top: 30rpx;
  619. &__item {
  620. width: 70rpx;
  621. height: 70rpx;
  622. border-radius: 100rpx;
  623. margin: 20rpx auto;
  624. &--active {
  625. position: relative;
  626. &::after {
  627. content: '';
  628. position: absolute;
  629. top: 50%;
  630. left: 50%;
  631. width: 40%;
  632. height: 40%;
  633. border-radius: 100rpx;
  634. background-color: #FFFFFF;
  635. transform: translate(-50%, -50%);
  636. }
  637. }
  638. }
  639. }
  640. &__button {
  641. margin-bottom: 30rpx;
  642. display: flex;
  643. flex-direction: column;
  644. &__item {
  645. width: 130rpx;
  646. height: 60rpx;
  647. line-height: 60rpx;
  648. text-align: center;
  649. margin: 60rpx auto;
  650. border-radius: 10rpx;
  651. color: #FFFFFF;
  652. transform-origin: center center;
  653. transform: rotateZ(90deg);
  654. }
  655. }
  656. }
  657. }
  658. </style>