Mapping.vue 40.7 KB
Newer Older
huahua committed
1
<template>
huahua committed
2
	<view v-if="Signincenterstate" ref="Signincenter" style="position: absolute; z-index: 999; top: 0;"
huahua committed
3
		:style="{height: windowHeight +'px',width:isShowPc?$base.isPcWidth + 'px':'100%'}">
huahua committed
4 5
		
        <view style="visibility: hidden; margin-top: -1600upx;">{{countCome}}</view>
huahua committed
6

huahua committed
7 8 9
		<view class="uni-share full-width" :style="{height: windowHeight +'px',width:$tool.isPc()?$base.isPcWidth + 'px':'100%',
			left:$tool.isPc()?'calc(50% - '+ (($base.isPcWidth  ) / 2 ) +'px)':'0upx'}" @touchmove.stop="myCatchTouch"
			v-if="(e_active == 3 || e_active == 4) && text == 'typeface'"  >
huahua committed
10 11
			<view style="position: absolute; bottom: 0; left: 0; width: 100%; height: 100%; z-index: 997; opacity: 0.8;"
				@click.stop.prevent="cancel('share')"></view>
huahua committed
12 13 14 15
			<view style="position: fixed; bottom: 0; left: 0; width: 100%; height: 600upx; z-index: 999;background: #292933;"
			  :style="{width:$tool.isPc()?$base.isPcWidth + 'px':'100%',
			  left:$tool.isPc()?'calc(50% - '+ (($base.isPcWidth  ) / 2 ) +'px)':'0upx'}">
				<scroll-view style="width: calc(100% - 30upx); margin: auto; height:598upx; overflow: hidden;"
huahua committed
16 17 18 19 20 21 22
					scroll-y scroll-with-animation>
					<view v-for="(item, index) in typefacedata"
						:style="{'font-family':item.textlong == true ? item.key : item.key + 'ttf','color': data.itemList[data.cidx].font_dict_id == item.id ? '#64DD17 !important' : 'none'}"
						@click="typefaceClick(item, index)" :key="index"
						style="font-size: 36upx; color: #FFFFFF; padding:22upx 0 21upx; text-align: center;">
						<text style="font-size: 20upx;">
							<text style="font-size: 32upx;"
huahua committed
23 24
								:style="{'color': data.itemList[data.cidx].font_dict_id == item.id ? '#64DD17 !important' : '#fff'}">
								 壳小站
huahua committed
25 26 27 28 29 30 31 32 33 34
							</text>
							<text v-if="item.remark != ''">
								{{item.long == true ? '' : '(点击加载)'}}
							</text>
							<text v-if="item.remark != ''" style="color: #64DD17;">
								{{item.textlong == false ? '(下载失败,点击重新下载)' : ''}}
							</text>
						</text>
				   </view>
				</scroll-view>
huahua committed
35 36 37 38 39 40 41
			</view>
		</view>
		
		<view class="uni-share full-width" :style="{height: windowHeight +'px'}" @touchmove.stop="myCatchTouch"
			@change="change" v-if="(e_active == 3 || e_active == 4) && text != 'typeface'">
			<view :style="{width:$tool.isPc()?$base.isPcWidth + 'px':'100%',
			left:$tool.isPc()?'calc(50% - '+ (($base.isPcWidth  ) / 2 ) +'px)':'0upx'}" style="position: fixed; bottom: 0; left: 0; width: 100%; height: 100%; z-index: 997; 
huahua committed
42
			background: linear-gradient(0deg, #1B294F, #4E2761, #E73231);opacity: 0.2;" @click.stop.prevent="cancel('share')"></view>
huahua committed
43 44 45 46 47
			<view style="position: fixed; bottom: 0;  height: 22%; z-index: 999;">
				<view style="position: fixed;bottom: 0;  " :style="{width:$tool.isPc()?$base.isPcWidth + 'px':'100%',
				 left:$tool.isPc()?'calc(50% - '+ (($base.isPcWidth  ) / 2 ) +'px)':'0upx',}">
					<view style="width: 100%; height: 90upx; display: flex; flex-direction: row;">
						<view
huahua committed
48
							style="width: 240upx; height: 100%; background: #292933; border-top-right-radius: 60upx;display: flex; flex-direction: row; ">
huahua committed
49 50 51 52 53 54 55
							<image v-if="bg_text_color"
								style="width: 47upx; height: 47upx; display: block;margin-top: 28upx; margin-left:40upx;"
								src="../../static/img/icon_qiehuan_one.png" mode="aspectFill" @click="bgtextcolor">
							</image>
							<image v-else
								style="width: 47upx; height: 47upx; display: block;margin-top: 28upx; margin-left:40upx;"
								src="../../static/img/icon_qiehuan.png" mode="aspectFill" @click="bgtextcolor"></image>
huahua committed
56
							<view style="width: 80upx; margin-top: 22upx;margin-left: 50upx;" @click="typefaceshow('share')">
huahua committed
57
								<text style="font-size: 34upx; color: #FFFFFF;"><!-- 字体 --> {{$i18n.messages[$i18n.locale]['字体']}}</text>
huahua committed
58 59 60
							</view>	
						</view>
					</view>
huahua committed
61
					<view style="background: #292933;">
huahua committed
62
						<view style="display: flex;align-items: center; justify-items: center; border-bottom: 2upx solid #000000;height: 98upx;">
huahua committed
63
							<view style="width: calc(100% - 160upx); height: 57upx; background: rgb(255,255,255,0.1); margin: 21upx 41upx 21upx 21upx; border-radius: 10upx;">
huahua committed
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
								<input :fixed="true" :auto-height="true" :show-confirm-bar="false" :cursor-spacing="73"
									:adjust-position="false" type="text" maxlength="24" @input="textInput"
									@focus="focusTextarea" @blur="blurTextarea" v-model="data.currentText"
									:placeholder="$i18n.messages[$i18n.locale]['请先输入文字内容']"
									style="font-size: 34upx; font-weight: 400; height: 57upx; line-height: 57upx; padding: 0upx 0 0upx 20upx; color: #FFFFFF;" />
							</view>
							<view style="width: 1px; height: 28upx; background: #FFFFFF;"></view>
							<image style="width: 43upx; height: 30upx; display: block;margin: auto;"
								src="../../static/icon/icon_determine.png" mode="aspectFill"
								@click.stop.prevent="cancel('share')"></image>
						</view>
						<view style="display: flex; height: 100upx; padding: 28upx 0 21upx; align-items: center;">
							<!-- 颜色 开始-->
							<scroll-view style="box-sizing: border-box; white-space: nowrap;
						     margin-left: 35upx; margin-right: 35upx;margin-bottom: 30upx; margin-top: 35upx; width: calc(100% - 70upx);"
								scroll-x scroll-with-animation>
								<view style="text-align: center; display: inline-block; padding-left: 20upx;"
									v-for="(item,index) in colorList" :key="index" @click.stop="workcolor(item.color)">
									<view v-if="data.itemList[data.cidx]">
										<view v-if="data.itemList[data.cidx].font_color == item.color && !bg_text_color"
huahua committed
84
											style="width: 60upx; height: 60upx; background: #000000; border: 4upx solid #64DD17; border-radius: 50%;"
huahua committed
85 86 87
											:style="{background:item.color}"></view>
										<view
											v-else-if="data.itemList[data.cidx].under_color == item.color && bg_text_color"
huahua committed
88
											style="width: 60upx; height: 60upx; background: #000000; border: 4upx solid #64DD17; border-radius: 50%;"
huahua committed
89 90 91 92 93 94
											:style="{background:item.color}"></view>
										<view v-else
											style="width: 60upx; height: 60upx; background: #000000; border: 4upx solid #FFFFFF; border-radius: 50%;"
											:style="{background:item.color}"></view>
									</view>
									<view v-else
huahua committed
95 96
										  style="width: 60upx; height: 60upx; background: #000000; border: 4upx solid #FFFFFF; border-radius: 50%;"
										 :style="{background:item.color}"></view>
huahua committed
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139
								</view>
							</scroll-view>
						</view>
					</view>
				</view>
			</view>
		</view>
		
		<view v-if="e_active == 24">
			<view style="position: absolute; bottom:0; left: 0; height: 100%; z-index: 998;
			  background: linear-gradient(0deg, #1B294F, #4E2761, #E73231); opacity: 0.8;"
			   :style="{width:isShowPc?$base.isPcWidth + 'px':'100%'}"
			   @click.stop.prevent="cancel('share')">
			</view>
			<view style="position: fixed; background: #FFFFFF; top:calc((100% - 621upx) / 2); left:calc((100% - 560upx) / 2); 
			  z-index:1000; width: 560upx; min-height: 600upx; border-radius: 12upx;">
				<image style="width: 560upx; height: 300upx; display: block;margin: auto;"
					src="../../static/image_p/remind_picture.png" mode="aspectFill"></image>
				<view @click.stop='addItem' style="width: 300upx; height: 100upx; background: #854AC2; border-radius: 10upx;
				  margin: 150upx auto 50upx; display: flex; justify-content: center;">
					<image src="../../static/upload.png" mode=""
						style="width: 60upx; height: 60upx; display: inline-block; margin: auto 10upx;"></image>
					<view style="color:#FFFFFF;line-height:100upx;">{{$i18n.messages[$i18n.locale]['上传']}}</view>
				</view>
			</view>
		</view>
		
		<!-- 贴图/模板形状 -->
		<view
			v-if="e_active == 22 || e_active == 1 || e_active == 2  || e_active == 23 || e_active == 25 || e_active == 99"
			class="uni-share" :style="{height: windowHeight +'px'}"
			style="position: relative;width: 100%;">
			<!-- 遮罩 -->
			<view style="position: fixed; bottom: 0; left: 0; width: 100%; height: 100%; z-index: 997; 
			background: linear-gradient(0deg, #1B294F, #4E2761, #E73231);opacity: 0.8;"
				:style="{width:$tool.isPc()?$base.isPcWidth + 'px':'100%',left:$tool.isPc()?'calc(50% - '+ ($base.isPcWidth / 2 ) +'px)':'0upx'}"
				@click.stop.prevent="cancel('share')" @touchmove.stop.prevent="myCatchTouch"></view>
			<view :style="{width:$tool.isPc()?$base.isPcWidth - 80 + 'px':'calc(100% - 120upx)',
		       left:$tool.isPc()?'calc(50% - '+ (($base.isPcWidth  ) / 2 ) +'px)':'0upx'}"
				style="position: fixed; top:0; left: 0;  height:100%; z-index: 999; overflow: hidden;">
				<view style="position: absolute; bottom: 0upx; left: 0; 
					height: 100%; width: 120upx; z-index: 999;  
					background: #1A1D33; overflow: hidden;">
huahua committed
140 141 142 143 144 145 146 147 148 149
					<view style="width: 120upx; height: 188upx;">
						
						<view :style="{ height: headheight + 'px'}" style="width: 100%; z-index: 9999;">
							<view class="back" @tap="cancel('share')">
								<image src="../../static/recommend/icon_back.png" mode="aspectFit" style="width: 42upx; height: 42upx; 
								margin-left: 20upx;" :style="{ marginTop: menuButtonInfoTop + 10 + 'px'}"></image>
							</view>
						</view>
						
					</view>
huahua committed
150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206
					<!-- 一级分类 -->
					<view style="width: 120upx; " :style="{height: (windowHeight - 100 ) +'px'}"
						v-if="e_active == 2 || e_active == 23  || e_active == 99">
						<scroll-view class="scroll-container" :style="{height: (windowHeight - 100 ) +'px'}" scroll-y
							scroll-with-animation v-if="brands.length > 0" :scroll-into-view="'s' + currentIndex">
							<view :class="['scroll-item', { activeone: index == currentId }]" :id="'s' + index"
								v-for="(item, index) in brands" :key="index" @tap="handleScroll(index,item)">
								<image
									style="width: 60upx; height: 60upx; display: block;margin:auto; padding: 18upx;z-index:1 "
									:src="index == currentId ? item.icon_click : item.icon" mode="aspectFill">
								</image>
								<view v-if="item.update_flag == 1" style="width: 20upx; height: 20upx;
								       margin-left: 80upx;
								       background: #ff0000; 
								        z-index:10;
								        border-radius: 50%;
								   		margin-top: -80upx;
								        position: absolute;">
								</view>
							</view>
						</scroll-view>
					</view>
				</view>
				<view style="position: absolute; bottom: 0upx; left: 120upx; height: 100%; width: calc(100% - 120upx); z-index: 999; overflow: hidden; background: #282932;">
					<!-- 轮播图 -->
					<view style="height: 210upx; width: 100%;background: #282932;position: relative;z-index: 9;">
						<view style="width: calc(100% - 40upx); z-index: 99; margin:auto; padding: 30upx 0;">
							<swiper class="uni-swiper-wrapper" :autoplay="true" :interval="3000" :duration="1000"
								:indicator-dots="true" :indicator-active-color="'#ffffff'"
								style="height: 165upx; width: 100%; border-radius: 10upx; overflow: hidden; margin:auto;">
								<swiper-item v-for="(item, index) in Adlists" :key="index" class="full-width">
									<image :src="item.content + '?x-oss-process=image/resize,lfit,w_375'"
										mode="aspectFill" class="full-width full-height"
										style="border-radius: 10upx; background: #007AFF;"></image>
								</swiper-item>
							</swiper>
						</view>
					</view>
					<!-- 二级分类 -->
					<view id="classification" v-if="e_active == 2 || e_active == 23 "
						style="width: 100%; position: relative; z-index: 99; background: #282932;">
						<view style="overflow: hidden;" v-if="material_series_list.length > 0">
							<view :class="['material-series-scroll-item', 
							{ 'material-series-scroll-item-active': item.id == material_series_currentId }]" :id="'s' + index"
								v-for="(item, index) in material_series_list" :key="index"
								@tap="material_series_handleScroll(index,item)">
								{{item.alias_title}}
							</view>
						</view>
					</view>
					<!-- 贴图/壁纸 -->
					<view v-if="e_active == 2 ||e_active == 23 || e_active == 99 "
						:style="{height: (windowHeight - 60) +'px',background:backColorVal}" style="width: 100%; position: relative;" >
						<refresh ref="refresh" @interrupt="interrupt" @pushToInterrupt="pushToInterrupt"
							@finished="finished" @scrolltolower="g" :scrollHeight="(windowHeight - 60)"
							:scrollTop="scrollViewTop" @scroll="scroll">
							<template slot="top">
huahua committed
207 208
								<view style="color: #FFFFFF;position: absolute;  top: 0;width: 100%; text-align: center;"
									 :style="'height:' + 40 + 'px; line-height:' + 40 + 'px;'">{{tip}}</view>
huahua committed
209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227
							</template>
							<template slot="content">
								<view style="width:100%; margin: auto; height:calc(100% - 20upx); ">
									<view style="float: left; width: calc(100% / 3); margin: 10upx 0 10upx;"
										v-for="(item, index) in datalist" :key="index" @click="Worksdetail(item)">
										<view style="width: 139upx; height: 255upx; margin: auto; position: relative;">
											<image
												style="width: 139upx; height: 255upx; margin: auto; border-radius: 14px; overflow: hidden;"
												:src="(item.image ? item.image:item.url) + '?x-oss-process=image/resize,lfit,w_112'"
												mode="aspectFit"></image>
										</view>
									</view>
									<view class="align-center"
										style="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);"
										v-if="datalist.length == 0">
										<span class="iconfont icon-wushuju"
											style="font-size: 100upx; text-align: center; color: #B2B2B2;"></span>
										<view
											style="color: #B2B2B2; text-align: center; line-height: 50upx;font-size: 24upx;">
huahua committed
228
											{{$i18n.messages[$i18n.locale]['没有更多数据了']}}
huahua committed
229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258
										</view>
									</view>
								</view>
							</template>
							<template slot="bottom">
								<view>{{$i18n.messages[$i18n.locale]['没有更多数据了']}}</view>
							</template>
						</refresh>
					</view>
					<!-- 颜色 -->
					<view v-if="e_active == 25" style="width: 100%; height: calc(100% - 210upx); position: relative;">
						<refresh @interrupt="interrupt" @pushToInterrupt="pushToInterrupt" @finished="finished"
							@scrolltolower="g" :scrollHeight="(windowHeight - 60)">
							<template slot="content">
								<view style="width:100%; margin: auto; height:calc(100% - 40upx); ">
									<view style="float: left; width: calc(100% / 3); margin: 10upx 0 10upx;"
										v-for="(item, index) in datalist" :key="index" @click="bgColorAssembly(item)">
										<view style="width: 139upx; height: 255upx; margin: auto; position: relative;">
											<view
												style="width: 139upx; height: 255upx; margin: auto; border-radius: 14px; overflow: hidden;"
												:style="'background:' + item.color"></view>
										</view>
									</view>
									<view class="align-center"
										style="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);"
										v-if="datalist.length == 0">
										<span class="iconfont icon-wushuju"
											style="font-size: 100upx; text-align: center; color: #B2B2B2;"></span>
										<view
											style="color: #B2B2B2; text-align: center; line-height: 50upx;font-size: 24upx;">
huahua committed
259
											{{$i18n.messages[$i18n.locale]['没有更多数据了']}}
huahua committed
260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872
										</view>
									</view>
								</view>
							</template>
							<template slot="bottom">
								<view>
									{{$i18n.messages[$i18n.locale]['没有更多数据了']}}
								</view>
							</template>
						</refresh>
					</view>
				</view>

			</view>
		</view>
	</view>
</template>

<script>
	import loadFont from '@/util/loadFont.js'
	import userService from '@/service/UserService';
	import homeservice from '@/service/homeservice.js';
	import uniPopup from './common/uni-popup/uni-popup.vue'
	import refresh from '@/components/xing-refresh/xing-refresh.vue';

	var app = getApp(); // 当前APP实例
	export default {
		components: {
			uniPopup,
			refresh
		},
		computed: {},
		props: {
			windowHeight: {
				type: Number,
				default: 563
			},
			brands: {
				type: Array,
			},
			material_series_list: {
				type: Array,
			},
			e_active: {
				type: Number,
			},
			pixelRate: {
				type: Number,
			},
			currentId: {
				type: Number,
			},
			material_series_currentId: {
				type: Number,
			},
			backgroundColor: {
				type: Boolean,
			},
			classificationHeight: {
				type: Number,
				default: 0
			},
			currentIndex: {
				type: Number,
				default: 0
			},
		},
		data() {
			return {
				scrollViewTop: 0, //滚动距离
				oldScrollViewTop: 0, //旧数据到顶部位置
				queryPage: {
					s: 'Material.list',
					page: 1,
					per_page: 50,
					is_revise: 1, //可调整
					is_edit: 1, //模板属性
					total: 0,
					is_new: null, //最新
					is_hot: null, //热门
					material_category_id: "", //
					material_series_id: "",
				},
				Material_categorydatalist: [], //作品、贴图列表
				datalist: [], //作品、贴图列表
				Material_category: [], //贴图分类
				tip: '',
				Signincenterstate: false,
				data: null,
				bg_text_color: null,
				inputBottom: 0,
				text: 'modify',
				textlist: [{
						text: '仓耳小丸子',
						url: 'url("https://tprint.refinecolor.com/text/CangErXiaoWanZi.ttf")',
						fontname: '仓耳小丸子',
						lineheight: 1.26,
						long: false,
						textlong: null
					},
					{
						text: '千图小兔体',
						url: 'url("https://tprint.refinecolor.com/text/Qiantu_rabbit.ttf")',
						fontname: '千图小兔体',
						lineheight: 1.2,
						long: false,
						textlong: null
					},
					{
						text: '站酷酷黑',
						url: 'url("https://tprint.refinecolor.com/text/Stand_cool_black.ttf")',
						fontname: '站酷酷黑',
						lineheight: 1.14,
						long: false,
						textlong: null
					},
					{
						text: '站酷快乐体',
						url: 'url("https://tprint.refinecolor.com/text/Standing_cool_happy_body.ttf")',
						fontname: '站酷快乐体',
						lineheight: 1.14,
						long: false,
						textlong: null
					},
					{
						text: '站酷庆科黄油体',
						url: 'url("https://tprint.refinecolor.com/text/ZhankuQingkeButterBody.ttf")',
						fontname: '站酷庆科黄油体',
						lineheight: 1.18,
						long: false,
						textlong: null
					},
					{
						text: '字体视界法棍体',
						url: 'url("https://tprint.refinecolor.com/text/Font_horizon_method_stick_body.ttf")',
						fontname: '字体视界法棍体',
						lineheight: 1.14,
						long: false,
						textlong: null
					},
				],
				typefacedata: [],
				Adlists: [],
				colorList: [{
						color: '#000000',
						index: '01'
					},
					{
						color: '#FFFFFF',
						index: '01'
					},
					{
						color: '#7f2a3f',
						index: '01'
					}, {
						color: '#e24187',
						index: '03'
					}, {
						color: '#f5305d',
						index: '04'
					}, {
						color: '#de4156',
						index: '05'
					}, {
						color: '#fe42cd',
						index: '06'
					}, {
						color: '#f48b9a',
						index: '07'
					}, {
						color: '#ec8191',
						index: '08'
					}, {
						color: '#f9aeb5',
						index: '09'
					}, {
						color: '#f21d5f',
						index: '10'
					}, {
						color: '#cc3739',
						index: '11'
					}, {
						color: '#dd5047',
						index: '12'
					}, {
						color: '#e24187',
						index: '13'
					}, {
						color: '#fa6449',
						index: '14'
					}, {
						color: '#e8495b',
						index: '15'
					}, {
						color: '#fb7162',
						index: '16'
					}, {
						color: '#f6afd1',
						index: '17'
					}, {
						color: '#fbb6b9',
						index: '18'
					}, {
						color: '#db6f27',
						index: '21'
					}, {
						color: '#ed702e',
						index: '22'
					}, {
						color: '#f99627',
						index: '23'
					}, {
						color: '#eb8926',
						index: '24'
					}, {
						color: '#edc3aa',
						index: '25'
					}, {
						color: '#e1d8cf',
						index: '26'
					}, {
						color: '#deebc5',
						index: '27'
					}, {
						color: '#fccdc7',
						index: '28'
					}, {
						color: '#dbbdd2',
						index: '29'
					}, {
						color: '#e8a321',
						index: '31'
					}, {
						color: '#db6f27',
						index: '32'
					}, {
						color: '#edb74b',
						index: '33'
					}, {
						color: '#e8b741',
						index: '34'
					}, {
						color: '#fef052',
						index: '35'
					}, {
						color: '#ffd684',
						index: '36'
					}, {
						color: '#e2d958',
						index: '37'
					}, {
						color: '#e2e5d0',
						index: '38'
					}, {
						color: '#ba9431',
						index: '41'
					}, {
						color: '#797f5d',
						index: '42'
					}, {
						color: '#536d50',
						index: '43'
					}, {
						color: '#d8b53f',
						index: '44'
					}, {
						color: '#d4c172',
						index: '45'
					}, {
						color: '#32b75c',
						index: '46'
					}, {
						color: '#90D15B',
						index: '47'
					}, {
						color: '#c5d52a',
						index: '48'
					}, {
						color: '#e8e098',
						index: '49'
					}, {
						color: '#1b6661',
						index: '50'
					}, {
						color: '#3b4f4d',
						index: '51'
					}, {
						color: '#336559',
						index: '52'
					}, {
						color: '#01776e',
						index: '53'
					}, {
						color: '#2e7662',
						index: '54'
					}, {
						color: '#439877',
						index: '55'
					}, {
						color: '#0ba066',
						index: '56'
					}, {
						color: '#318488',
						index: '57'
					}, {
						color: '#6fd3c9',
						index: '58'
					}, {
						color: '#b9d3ac',
						index: '59'
					}, {
						color: '#0e898e',
						index: '61'
					}, {
						color: '#317194',
						index: '62'
					}, {
						color: '#029bc7',
						index: '63'
					}, {
						color: '#2a8ec9',
						index: '64'
					}, {
						color: '#57c9d3',
						index: '65'
					}, {
						color: '#65b3df',
						index: '67'
					}, {
						color: '#8bd0d7',
						index: '68'
					}, {
						color: '#4B4881',
						index: '69'
					}, {
						color: '#77A1CB',
						index: '70'
					}, {
						color: '#3051BB',
						index: '71'
					}, {
						color: '#2E41A7',
						index: '72'
					}, {
						color: '#704CAE',
						index: '73'
					}, {
						color: '#385BD1',
						index: '74'
					}, {
						color: '#E0DFED',
						index: '75'
					}, {
						color: '#A6BDE9',
						index: '76'
					}, {
						color: '#B3B9DD',
						index: '77'
					}, {
						color: '#7942A8',
						index: '81'
					}, {
						color: '#8F52BA',
						index: '82'
					}, {
						color: '#9680C0',
						index: '83'
					}, {
						color: '#CD82BB',
						index: '84'
					}, {
						color: '#8E2A80',
						index: '85'
					}, {
						color: '#E24CB0',
						index: '86'
					}, {
						color: '#CC2A75',
						index: '87'
					}, {
						color: '#ED89D2',
						index: '88'
					}, {
						color: '#F562B6',
						index: '89'
					}, {
						color: '#8B3B32',
						index: '91'
					}, {
						color: '#593A35',
						index: '92'
					}, {
						color: '#7A3C2D',
						index: '93'
					}, {
						color: '#7D2E21',
						index: '94'
					}, {
						color: '#935A47',
						index: '95'
					}, {
						color: '#A05047',
						index: '96'
					}, {
						color: '#E39476',
						index: '97'
					}, {
						color: '#4E3F3C',
						index: '98'
					}, {
						color: '#5A4939',
						index: '99'
					}, {
						color: '#EDE8EC',
						index: '100'
					}, {
						color: '#C0813A',
						index: '101'
					}, {
						color: '#77432E',
						index: '102'
					}, {
						color: '#C17748',
						index: '103'
					}, {
						color: '#C7AC39',
						index: '104'
					}, {
						color: '#DBA179',
						index: '107'
					}, {
						color: '#D8D3D0',
						index: '109'
					}, {
						color: '#091A22',
						index: '120'
					}, {
						color: '#CA3A32',
						index: '121'
					}, {
						color: '#FAAB60',
						index: '122'
					}, {
						color: '#CADEAD',
						index: '123'
					}, {
						color: '#C7D858',
						index: '124'
					}, {
						color: '#F264D0',
						index: '125'
					}, {
						color: '#F77ADC',
						index: '126'
					}, {
						color: '#FAE7D9',
						index: '131'
					}, {
						color: '#E6D9D1',
						index: '132'
					}, {
						color: '#EBCDB1',
						index: '133'
					}, {
						color: '#E2DCCC',
						index: '134'
					}, {
						color: '#FAD9D2',
						index: '135'
					}, {
						color: '#E1C2BD',
						index: '136'
					}, {
						color: '#E5BBCF',
						index: '137'
					}, {
						color: '#F7BACC',
						index: '138'
					}, {
						color: '#E9CBC1',
						index: '139'
					}, {
						color: '#EBB89F',
						index: '140'
					}, {
						color: '#E6D09E',
						index: '141'
					}, {
						color: '#E2B78D',
						index: '142'
					}, {
						color: '#D1E4EB',
						index: '143'
					}, {
						color: '#B9D9EE',
						index: '144'
					}, {
						color: '#CFD0E2',
						index: '145'
					}, {
						color: '#CECFF0',
						index: '146'
					}, {
						color: '#D6C3E3',
						index: '147'
					}, {
						color: '#E3F0C5',
						index: '163'
					}, {
						color: '#DAD792',
						index: '164'
					}, {
						color: '#D4D4BC',
						index: '166'
					}, {
						color: '#C0D0AB',
						index: '167'
					}, {
						color: '#D7C6A8',
						index: '169'
					}, {
						color: '#D9E9E8',
						index: '171'
					}, {
						color: '#B4E0C7',
						index: '172'
					}, {
						color: '#D6E2BA',
						index: '173'
					}, {
						color: '#E3E5D0',
						index: '174'
					}, {
						color: '#C1D39A',
						index: '175'
					}, {
						color: '#AFE4E6',
						index: '178'
					}, {
						color: '#92DDE2',
						index: '179'
					}, {
						color: '#DBE0E6',
						index: '182'
					}, {
						color: '#8FBFF0',
						index: '183'
					}, {
						color: '#9DCDE1',
						index: '185'
					}, {
						color: '#BBC4BF',
						index: '196'
					}, {
						color: '#E484A9',
						index: '198'
					}, {
						color: '#BBC4BF',
						index: 'GG3'
					}, {
						color: '#494A4C',
						index: 'CG9'
					}, {
						color: '#C2CEDA',
						index: 'BG1'
					}, {
						color: '#C1C3D3',
						index: 'BG3'
					}, {
						color: '#8696A3',
						index: 'BG5'
					}, {
						color: '#646A76',
						index: 'BG7'
					}, {
						color: '#415361',
						index: 'BG9'
					}, {
						color: '#DFDEE3',
						index: 'WG.5'
					}, {
						color: '#CBC6CC',
						index: 'WG1'
					}, {
						color: '#B6B0B2',
						index: 'WG2'
					}, {
						color: '#C5BBBA',
						index: 'WG3'
					}, {
						color: '#958A92',
						index: 'WG4'
					}, {
						color: '#837477',
						index: 'WG5'
					}, {
						color: '#8A7E7E',
						index: 'WG6'
					}, {
						color: '#4D4342',
						index: 'WG9'
					}
				],
				e: 0, //弹窗类型
				type: 0,
				queryCollectionPage: {
					page: 1,
					limit: 25
				},
				historyQueryPage: {
					goods_id: "", //产品Id
					s: 'Works.myList',
				}, //历史对象
huahua committed
873
				isWork: false,   //是否作品
huahua committed
874
				isShowPc: false, //是否pc显示
huahua committed
875 876
				backColorVal: "",
				countCome: 0,    //进来次数
huahua committed
877 878
				headheight:60,
				menuButtonInfoTop:14,
huahua committed
879 880 881 882 883 884 885 886
			};
		},
		mounted() {},
		onLoad() {},
		methods: {

			//过滤字符串
			filterTextInput(textStr) {
huahua committed
887
				let content = textStr.replace(/[^\a-\z\A-\Z0-9\u4E00-\u9FA5\.\,\?\<\>\。\,\-\—\=\;\@\!\!\+\$\%\*\(\)\#\&\*]/g, '');
huahua committed
888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045
				let that = this;
				setTimeout(function() {
					that.data.currentText = content;
					that.$emit('textInput', content)
				}, 0);
			},

			//解决滚动穿透问题
			myCatchTouch() {
				return
			},

			cancel() {
				this.$emit('change', {
					show: false
				})
				this.Signincenterstate = false
			},

			scroll(e) {
				if (e.detail.scrollTop > 1) {
					this.oldScrollViewTop = e.detail.scrollTop - 0.01
				}
			},

			//图库贴纸
			open(item) {
				if (item.val) {
					this.backColorVal = item.val
				} else {
					this.backColorVal = "";
				}
			    //console.log(this.backColorVal);
				this.isShowPc = this.$tool.isPc();
				if (this.e != item.e) {
					this.datalist = [];
				}
				this.isWork = false; //是否作品
				this.type = item.e;
				this.e = item.e;
				this.scrollViewTop = 0;
				//壁纸广告KEY:diy_back,贴纸广告KEY:diy_banner
				if (item.e == 2) { //图库贴纸
					homeservice.queryListPhone({
						s: 'Ad.list',
						ad_position_key: 'diy_banner',
						machine_id: item.machine_id
					}).then(result => {
						this.Adlists = result
					}).catch(err => {});
				} else if (item.e == 23 || item.e == 24 || item.e == 25) { //壁纸
					homeservice.queryListPhone({
						s: 'Ad.list',
						ad_position_key: 'diy_back',
						machine_id: item.machine_id
					}).then(result => {
						this.Adlists = result
					}).catch(err => {});
				} else if (item.e == 99) {
					homeservice.queryListPhone({
						s: 'Ad.list',
						ad_position_key: 'history_works',
						machine_id: item.machine_id
					}).then(result => {
						this.Adlists = result
					}).catch(err => {});
				}
				let loadData = false;
				if (item.e == 23 || item.e == 2) {
					if (this.queryPage.material_category_id == item.queryPage.material_category_id) {
						if (this.queryPage.material_series_id != item.queryPage.material_series_id) {
							loadData = true;
						}
					} else {
						loadData = true;
					}
					if (this.datalist == null || this.datalist.length == 0) {
						loadData = true;
					}
				} else if (item.e == 99) {
					if (this.currentId != item.queryPage.currentId || this.currentId == -1) {
						loadData = true;
					}
					if (this.datalist == null || this.datalist.length == 0) {
						loadData = true;
					}
				}

				let that = this
				if (item.e == 2 || item.e == 23) {
					this.queryPage = {
						s: item.queryPage.s,
						page: item.queryPage.page, //分页
						per_page: item.queryPage.per_page, //分页
						is_revise: item.queryPage.is_revise, //可调整
						is_edit: item.queryPage.is_edit, //模板属性
						machine_id: item.queryPage.machine_id, //设备id
						goods_category_id: item.queryPage.goods_category_id, //星形接口列表增加,产品分类参数
						material_category_id: item.queryPage.material_category_id, //贴图壁纸选择值一级分类
						material_series_id: item.queryPage.material_series_id, //贴图壁纸选择值二级分类
						is_new: item.queryPage.is_new, //最新
						is_hot: item.queryPage.is_hot, //热门
						goods_id: item.queryPage.goods_id, //商品id
						is_under: item.queryPage.is_under, //贴图是否为背景图
						partner_id: item.queryPage.partner_id, //代理
						goods_feature_id: this.$base.goods_feature_id
					}
				}
				if (item.e == 2) { //贴图
					if (loadData) {
						this.queryPage.page == 1;
						this.queryPage.is_under = '0' //贴图标识
						this.queryPage.surface_color_series_id = this.$base.surfaceData.surface_color_series_id //色系编号
						this.getShapeList()
						this.scrollViewTop = 0;
						this.oldScrollViewTop = 0;
					} else {
						this.scrollViewTop = this.oldScrollViewTop
						this.$nextTick(() => {
							this.$refs.refresh.scrollTopPostion(this.scrollViewTop);
						});
					}
				} else if (item.e == 23) { //壁纸
					if (loadData) {
						this.queryPage.page == 1;
						this.queryPage.is_under = '1' //壁纸标识
						this.queryPage.surface_color_series_id = this.$base.surfaceData.surface_color_series_id //色系编号
						this.getShapeList()
						this.scrollViewTop = 0;
						this.oldScrollViewTop = 0;
					} else {
						this.scrollViewTop = this.oldScrollViewTop
						this.$nextTick(() => {
							this.$refs.refresh.scrollTopPostion(this.scrollViewTop);
						});
					}
				} else if (item.e == 24 || item.e == 25) {
					//if (loadData) {
					this.queryPage = item.queryPage
					this.getShapeList()
					this.scrollViewTop = 0;
					this.oldScrollViewTop = 0;
				} else if (item.e == 99) {
					if (item.e.currentId == 0) {
						this.isWork = true
					}
					this.datalist = [];
					this.scrollViewTop = 0;
					this.oldScrollViewTop = 0;
					this.type = 99;
					this.queryCollectionPage = {
						page: 1,
						limit: 30
					}
					this.item = item;
					this.getExcellentMaterial(item.queryPage)
				}
				this.Signincenterstate = true
huahua committed
1046 1047 1048 1049
				if (this.$base.typefacedata.length > 0) {
					this.typefacedata = this.$base.typefacedata
					console.log(this.$base.typefacedata)
				}
huahua committed
1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066
			},

			getExcellentMaterialMore(e) {
				if (e.currentId == 0) {
					this.isWork = true;
				} else {
					uni.showLoading({
						title: this.$i18n.messages[this.$i18n.locale]['正在加载中'],
					})
					let url = ''
					if (e.currentId == 1) url = '/douyin/Material/getMeMaterial'
					else if (e.currentId == 2) url = '/douyin/Material/getMeCollection'
					else if (e.currentId == 3) url = '/douyin/Material/getFollowMaterials'
					this.$http.post(url, this.queryCollectionPage).then(result => {
						if (result.data == null || result.data == "" || result.data.data == null) {

						} else {
huahua committed
1067
							this.Material_categorydatalist = this.Material_categorydatalist.concat(result.data.data);
huahua committed
1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129
							this.datalist = this.datalist.concat(result.data.data);
							this.queryCollectionPage.page += 1;
							if (Math.ceil(result.total / result.per_page) <= this.queryCollectionPage.page) {
								return setTimeout(() => {
									uni.showToast({
										title: this.$i18n.messages[this.$i18n.locale]['没有更多数据了'],
										icon: 'none'
									});
								}, 500);
							}
						}
						uni.hideLoading();
					}).catch(err => {

						uni.hideLoading();
					});
				}
			},

			getExcellentMaterial(e) {
				this.datalist = []
				uni.showLoading({
					title: this.$i18n.messages[this.$i18n.locale]['正在加载中'],
				})
				let url = ''
				this.currentId = e.currentId;
				if (e.currentId == 0) {
					this.isWork = true;
					this.historyQueryPage.goods_id = this.item.goods_id;
					homeservice.WorksList(this.historyQueryPage).then(result => {
						this.datalist = result.data
						uni.hideLoading();
					}).catch(err => {
						uni.hideLoading();
					});
				} else {
					if (e.currentId == 1) url = '/douyin/Material/getMeMaterial'
					else if (e.currentId == 2) url = '/douyin/Material/getMeCollection'
					else if (e.currentId == 3) url = '/douyin/Material/getFollowMaterials'
					this.$http.post(url, this.queryCollectionPage).then(result => {
						if (result.data == null || result.data == "" || result.data.data == null) {

						} else {
							this.Material_categorydatalist = result.data.data
							this.datalist = result.data.data;
							this.queryCollectionPage.page += 1;
							uni.hideLoading();
							this.tip = '';
						}
					}).catch(err => {
						uni.hideLoading();
					});
				}
			},

			//文字弹框
			inittext(data) {
				let that = this
				this.Signincenterstate = true
				this.data = data.data
				this.bg_text_color = data.bg_text_color
				this.text = data.text
huahua committed
1130
				this.countCome++;
huahua committed
1131 1132 1133 1134 1135 1136
				if (this.text == 'typeface') {
					this.typeface('typeface')
					this.inputBottom = 'none'
				}
			},

huahua committed
1137 1138 1139 1140 1141 1142 1143
			//文字弹框
			inittextSelect(data) {
				this.data = data.data
				this.countCome++;
				console.log("dvfdsv111")
			},
			
huahua committed
1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262
			picture() {
				this.Signincenterstate = true
			},

			addItem(item) {
				this.$emit('addItem', item)
				this.Signincenterstate = false
			},

			//贴图列表
			getShapeList() {
				this.datalist = []
				uni.showLoading({
					title: this.$i18n.messages[this.$i18n.locale]['正在加载中'],
					mask: true
				})
				homeservice.WorksListPhone(this.queryPage).then(result => {
					this.Material_categorydatalist = result.data
					this.datalist = result.data
					uni.hideLoading();
					this.tip = '';
				}).catch(err => {
					uni.hideLoading();
				});
			},

			handleScroll(index, item) {
				let e = {
					index: index,
					item: item
				}
				this.$emit('handleScroll', e)
			},

			material_series_handleScroll(index, item) {
				let e = {
					index: index,
					item: item
				}
				this.$emit('material_series_handleScroll', e)
			},

			bgColorClick(item) {
				this.$emit('bgColorClick')
			},

			bgColorAssembly(item) {
				this.$emit('bgColorAssembly', item.color)
				this.Signincenterstate = false
			},

			Worksdetail(item) {
				item.isWork = this.isWork;
				this.$emit('Worksdetail', item)
				this.Signincenterstate = false
			},

			empty() {
				this.$emit('empty')
				this.Signincenterstate = false
			},

			g(e) {
				if (this.type == 99) {
					this.getExcellentMaterialMore(this.item.queryPage)
				} else {
					uni.showLoading({
						title: this.$i18n.messages[this.$i18n.locale]['正在加载中'],
						mask: true
					})
					homeservice.WorksListPhone(this.queryPage).then(result => {
						this.Material_categorydatalist = this.Material_categorydatalist.concat(result.data)
						this.datalist = this.datalist.concat(result.data)
						this.queryPage.page += 1;
						if (Math.ceil(result.total / result.per_page) <= this.queryPage.page) {
							return setTimeout(() => {
								uni.showToast({
									title: this.$i18n.messages[this.$i18n.locale]['没有更多数据了'],
									icon: 'none'
								});
							}, 500);
						}
						uni.hideLoading();
					}).catch(err => {
						uni.hideLoading();
					});
				}
			},

			interrupt(e) {
				this.tip = this.$i18n.messages[this.$i18n.locale]['刷新中'] //'刷新中'
				//模拟发送请求
				setTimeout(e, 500);
				this.tip = this.$i18n.messages[this.$i18n.locale]['刷新成功'];
				this.queryPage.page = 1
				//this.getShapeList()
				if (this.type == 99) {
					this.queryCollectionPage.page = 1;
					this.getExcellentMaterial(this.item.queryPage)
				} else {
					this.getShapeList()
				}
			},

			pushToInterrupt() {
				this.tip = this.$i18n.messages[this.$i18n.locale]['释放刷新'];
			},
			finished() {
				this.tip = this.$i18n.messages[this.$i18n.locale]['下拉刷新'];
			},
			typefaceshow(e) {
				this.$emit('typefaceshow', e)
			},
			keyboard(e) {
				this.inputBottom = 0
			},
			typeface(e) {
				this.text = e
				this.inputBottom = 0
huahua committed
1263 1264 1265 1266 1267
				//console.log(this.$base.typefacedata)
				if (this.$base.typefacedata.length > 0) {
					this.typefacedata = this.$base.typefacedata
				}
		        //console.log(this.e_active)
huahua committed
1268 1269
			},
			typefaceClick(e, index) {
huahua committed
1270 1271
				
				let that = this;
huahua committed
1272
				if ((index + 1) == this.typefacedata.length) {
huahua committed
1273 1274 1275 1276 1277 1278 1279 1280 1281 1282
					
		          /* setTimeout(function() {
			          that.data.itemList[that.data.cidx].font_dict_id == e.id
		           }, 0); */
				   
				   
				   
				   

					//this.data.itemList[this.data.cidx].font_dict_id == e.id
huahua committed
1283 1284 1285 1286 1287 1288
					if (e.textlong == true) {
						this.$emit('typefaceClick', e)
					} else {
						this.$emit('typefaceClick', e)
					}
				} else {
huahua committed
1289 1290 1291 1292 1293 1294
					
					/* setTimeout(function() {
					  that.data.itemList[that.data.cidx].font_dict_id == e.id
					}, 0); */
					//this.data.itemList[this.data.cidx].font_dict_id == e.id
					
huahua committed
1295 1296
					this.$emit('typefaceClick', e)
				}
huahua committed
1297 1298 1299 1300 1301 1302
				
				
				
				//console.log(this.data);
				
				
huahua committed
1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450
			},
			loadFont(textlist) {
				let that = this;
				uni.showLoading({
					title: this.$i18n.messages[this.$i18n.locale]['正在加载中'],
					mask: true,
				});
				uni.loadFontFace({
					global: true,
					family: textlist.key,
					source: 'url(' + textlist.remark + ')',
					desc: {
						weight: 100
					},
					success: function(message) {
						textlist.textlong = true
					},
					fail: function(message) {
						textlist.textlong = false
					},
					complete(res) {
						uni.hideLoading();
						//wx.showToast({title: '字体下载完成',icon: 'success',duration: 2000});
						textlist.long = true
						that.setData({
							typefacedata: that.typefacedata
						});
						that.$emit('typefaceClick', textlist)
					}
				})
			},
			setData(obj) {
				let that = this;
				let keys = [];
				let val, data;
				Object.keys(obj).forEach(function(key) {
					keys = key.split('.');
					val = obj[key];
					data = that.$data;
					keys.forEach(function(key2, index) {
						if (index + 1 == keys.length) {
							that.$set(data, key2, val);
						} else {
							if (!data[key2]) {
								that.$set(data, key2, {});
							}
						}
						data = data[key2];
					})
				});
			},
			color(e) {
				this.text = e
				this.inputBottom = 0
			},
			modify(e) {
				this.text = e
				this.inputBottom = 0
			},
			focusTextarea(e) {
				this.inputBottom = e.detail.height;
			},
			blurTextarea(e) {
				this.inputBottom = 0;
			},
			textInput(e) {
				this.filterTextInput(e.detail.value);
			},
			workcolor(e) {
				this.$emit('workcolor', e)
			},
			bgtextcolor(e) {
				this.$emit('bgtextcolor', e)
			},
		}
	}
</script>

<style lang="scss">
	// 分类
	.scroll-container {
		box-sizing: border-box;
		white-space: nowrap;

		.scroll-item {
			text-align: center;
			height: 80upx;
		}
	}

	.material-series-scroll-item {
		text-align: center;
		padding: 10upx 20upx;
		color: #FFFFFF;
		background: #000;
		border-radius: 40upx;
		float: left;
		margin: 5upx 10upx 5upx;
		font-size: 21upx;
	}

	.material-series-scroll-item-active {
		background: #864BC3;
	}

	.tooltextone {
		position: absolute;
		bottom: 0;
		z-index: 1000;
		width: 100%;
		display: flex;
		align-items: center;
		height: 100upx;
		background: #292933;

		.tooltext_li {
			width: 25%;

			.tooltext_li_top {
				border-radius: 50%;
				text-align: center;
				width: 41upx;
				height: 41upx;
				border: 1upx solid #FFFFFF;
				display: block;
				padding: 2upx;
				margin: 2upx auto;

				.tooltext_li_top_icon {
					color: #FFFFFF;
					font-size: 26upx;
					line-height: 41upx;
					text-align: center;
				}
			}

			.tooltext_li_text {
				text-align: center;
				color: #FFFFFF;
				font-size: 22upx;
			}
		}




	}
</style>