integral_info.html 56.5 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 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 140 141 142 143 144 145 146 147 148 149 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 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 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 259 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 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 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 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 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 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 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 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 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
<script type="text/javascript" src="__PUBLIC__/js/rem_new.js"></script>
<!DOCTYPE html >
<html>
	<head>
		<meta name="Generator" content="tpshop" />
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width">
		<title>{$goods.goods_name}-{$tpshop_config.shop_info_store_title}</title>
		<meta http-equiv="keywords" content="{$tpshop_config['shop_info_store_keyword']}" />
		<meta name="description" content="{$tpshop_config['shop_info_store_desc']}" />
		<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
		<meta name="format-detection" content="telephone=no" />
		<meta name="format-detection" content="email=no" />
		<meta name="format-detection" content="address=no;">
		<meta name="apple-mobile-web-app-capable" content="yes" />
		<meta name="apple-mobile-web-app-status-bar-style" content="default" />
		<link rel="stylesheet" type="text/css" href="__STATIC__/css/public.css?v=__CSSVERSION__" />
		<link rel="stylesheet" type="text/css" href="__STATIC__/css/goods.css?v=__CSSVERSION__" />
		<link rel="stylesheet" type="text/css" href="__STATIC__/css/layer.css" />
		<link rel="stylesheet" type="text/css" href="__STATIC__/css/integral.css?v=__CSSVERSION__" />
		<link rel="stylesheet" type="text/css" href="__STATIC__/swiper/css/swiper.min.css"/>
		<link rel="stylesheet" type="text/css" href="__STATIC__/css/integral_ing.css?v=__CSSVERSION__" />
		<!--<link rel="stylesheet" type="text/css" href="__STATIC__/css/integral_team.css?v=__CSSVERSION__" />-->
		<link rel="stylesheet" type="text/css" href="__STATIC__/css/goods_info_new.css?v=__CSSVERSION__"/>
		<script type="text/javascript" src="__STATIC__/js/jquery.min.js"></script>
		<script type="text/javascript" src="__STATIC__/js/touchslider.dev.js"></script>
		<script type="text/javascript" src="__STATIC__/js/layer.js"></script>
		<script type="text/javascript" src="__PUBLIC__/js/global.js?v=__CSSVERSION__"></script>
		<script type="text/javascript" src="__PUBLIC__/js/mobile_common.js?v=__CSSVERSION__"></script>
		<script type="text/javascript" src="__STATIC__/js/common.js?v=__CSSVERSION__"></script>
		<script type="text/javascript" src="../../../../../public/plugins/Ueditor/ueditor.config.js"></script>
		<script type="text/javascript" src="__PUBLIC__/js/goodsInfoScroll.js"></script>
		<script type="text/javascript" src="__PUBLIC__/js/noscroll.js"></script>
		<script type="text/javascript" src="__STATIC__/swiper/js/swiper.min.js"></script>
		<style type="text/css">
			.noscroll,
			.noscroll body {
				overflow: hidden;
			}
			
			.noscroll body {
				position: relative;
			}
			.tcprice{ font-size: 12px;}

			/*修改 left,width   20170327*/
			.qqkefu {
				position: fixed;
				left: 20%;
				bottom: 50px;
				background-color: #fff;
				border: 1px #eee solid;
				width: 20%;
				z-index: 999;
			}
			.qqkefu ul li {
				border-bottom: 1px #eee solid;
				height: 45px;
				line-height: 45px;
				font-size: 16px;
				color: #666;
				width: 100%;
				text-align:center;
				background-position: .1rem center;
				overflow: hidden;
			}
			.nokill{ background:#adadad;border-radius: 30px; line-height: 31px; color: #fff}
			.footer_nav dl .ptgoumai {background: #ff9c00;}

			.erpapp{width:100%; height:50px; background-color:#ca3043;}
			.erpapp img{height:30px; width:30px;border-radius: 30px;margin: 10px;display: inline-block;vertical-align: top;}
			.erptext{color:#fff;line-height: 50px;width: 50%;display: inline-block;height: 50px;}
			.openapp{background-color: #fff;color: #c93145;border-radius: 5px;display: inline-block;margin: 12px;vertical-align:top;height: 25px;width: 70px;text-align: center;line-height: 25px;margin-right: 0;margin-left: 0; float: right;margin-right: 20px;}


			/*许程 8.20*/
			/*8.7*/
			.bs{
				background: #d60021;
				color: #fff;
			}
			.goods-position{
				margin-top: 0.2rem;margin-bottom: 0.1rem;
			}
            .integral-img{
                width: 0.4rem;height: 0.4rem;padding-top: 0.1rem
            }
			.floor_body2 ul li{
				width: 47.2% !important;
			}
			.popup-frame{
				z-index: 20;
			}
			.layermbtn.buttons{

				width: 90%;
				margin: auto;
				height: 30px;
				line-height: 30px;
				border-radius: 30px;
				margin-bottom: 20px;
				margin-top: 110px;
			}
			.footer_nav dl .goumai{
				border-radius: 30px;
			}
			.red{
				background-color: #f23030 !important;
				background: none;
			}

		</style>
	</head>

	<body>
		<script type="text/javascript">
            var is_fast_reg='{:get_fast_reg();}';
			var process_request = "正在处理您的请求...";
		</script>
		
		<if condition="$ylpres">
			<div class=" erpapp">
				<img  src="{$ylpres['appIcon']}">
				<span class="cut erptext" style="">{$ylpres['appName']}欢迎你</span>
				<span class="openapp" onclick="javascript:window.location.href='{$ylpres.downLoadUrl}'">打开APP</span>
			</div>
		</if>

		<include file="public/info_video"/>
		
		<div class="main">
			<Input type="hidden" id="hidstoid" value="{$Think.request.stoid}">

			<!-- 顶上按钮 -->
			<div class="tab_nav">
				<div class="header">
					<div class="h-left">
						<a class="sb-back" href="javascript:history.go(-1)" title="返回"></a>
					</div>
					<div class="h-mid">
						<ul>
							<li><a href="javascript:;" class="tab_head on" id="goods_ka1" onClick="setGoodsTab('goods_ka',1,3)">商品</a>
							</li>
							<li><a href="javascript:;" class="tab_head" id="goods_ka2" onClick="setGoodsTab('goods_ka',2,3)">详情</a></li>
							<li><a href="javascript:;" class="tab_head" id="goods_ka3" onClick="setGoodsTab('goods_ka',3,3)">评价</a></li>
						</ul>
					</div>
					<div class="h-right">
						<aside class="top_bar">
							<div onClick="show_menu();$('#close_btn').addClass('hid');" id="show_more">
								<a href="javascript:;"></a>
							</div>
							<a href="{:U('Mobile/Cart/cart',array('stoid'=>$Think.request.stoid))}" class="show_cart"><em
                            class="global-nav__nav-shop-cart-num" id="tp_cart_info"></em></a>
						</aside>
					</div>
				</div>
			</div>
			<include file="public/menu" />

			<div class="main" id="user_goods_ka_1" style="display:block;">
				<div class="banner" style="position: relative">
					<div id="slider" class="slider" style="overflow: hidden; visibility: visible; list-style: outside none none; position: relative;">
						<ul id="sliderlist" class="sliderlist" style="position: relative; overflow: hidden; transition: left 0ms ease 0s; width: 303px; left: 0px;">

							<if condition="$goods_videos">
								<foreach name="$goods_videos" item="video">
									<li style="float: left; display: block; width: 100%; position: relative"><span><a href="javascript:void(0)">
                     	       <img title="" width="100%"  src="{:getImg($video.video_img,NOIMG)}"></a></span>
										<div class="v_play"><img  v_url="__WEBPUBLIC__{$video.video_url}"
																  src="__PUBLIC__/images/v_btn.png" onclick="play_video(this)"/></div>

									</li>
								</foreach>
							</if>

							<foreach name="goods_images_list" item="pic">
								<li style="float: left; display: block; width: 100%;"><span><a href="javascript:void(0)">
      	<img class="pic_img" title="" width="100%"  src="{:getImg($pic.image_url,NOIMG)}"></a></span></li>
							</foreach>
						</ul>
						<div id="pagenavi" style="display: none">
							<foreach name="goods_images_list" item="pic" key="k">
								<a href="javascript:void(0);"
								<if condition="$k eq 0">class="active"</if>
								></a>
							</foreach>
						</div>
					</div>
					<if condition="$goods_videos">
						<!---视频图片的显示--->
						<div class="video_pic">
							<div class="click-playssss">
								<div class="video-fonts ons" onclick="videos()">视频</div>
								<div class="picture" onclick="pictures()">图片</div>
							</div>
						</div>
						<!---页码显示--->
						<div class="pic_num_set"><font id="show_pic_index"></font>/{:count($goods_images_list)}</div>
					</if>
				</div>
				<div class="s_bottom"></div>
				<script type="text/javascript">
					$(function() {
						$("div.module_special .wrap .major ul.list li:last-child").addClass("remove_bottom_line");
					});

                    //--有视频和无视频要分别处理--
                    <if condition="$goods_videos">
                    //t2.slide(j); 跳转某个页面的函数
                        var t2 = new TouchSlider({
                            id: 'sliderlist', speed: 600, timeout: 6000, autoPlay:false,
                            //---获取跳到到页面的下标,精确控制---
                            before: function (index) {
                                if(index>0){
                                    if($(".video-fonts").has('ons')) {
                                        $(".video-fonts").removeClass('ons');
                                        $(".picture").addClass('ons');
                                    }
                                    $("#show_pic_index").text(index);
                                    $(".pic_num_set").show();

                                }else{
                                    $(".pic_num_set").hide();
                                    if($(".picture").has('ons')) {
                                        $(".video-fonts").addClass('ons');
                                        $(".picture").removeClass('ons');
                                    }
                                }
                            }
                        });

                    function videos(){
                        if($(".picture").has('ons')) {
                            t2.slide(0);
                        }
                    }

                    function pictures() {
                        if($(".video-fonts").has('ons')) {
                            t2.slide(1);
                        }
                    }

                    <else/>

                    $("#pagenavi").show();
                    var active = 0, as = document.getElementById('pagenavi').getElementsByTagName('a');
                    for (var i = 0; i < as.length; i++) {
                        (function () {
                            var j = i;
                            as[i].onclick = function () {
                                t2.slide(j);
                                return false;
                            }
                        })();
                    }

                    var t2 = new TouchSlider({
                        id: 'sliderlist', speed: 600, timeout: 6000, before: function (index) {
                            as[active].className = '';
                            active = index;
                            as[active].className = 'active';
                        }
                    });

                    </if>
				</script>
				<form name="buy_goods_form" method="post" id="buy_goods_form">
					<input name="goods_id" value="28" type="hidden">
					<div class="product_info">

						<!--许程改 8.20-->
						<dl class="goods_price ">
							<script type="text/javascript" src="__STATIC__/js/lefttime.js"></script>
							<dt class="flex jc_sb ai_center">

								<div>
											<span class="flex ai_center xc-goods-price">
												<img class="integral-img" style="margin-left: 0.06rem" src="__STATIC__/images/weixin/integral_red.png">
												<text>{$integral}</text>
												<text class="integral_world">积分</text>
												<!--判断积分够不够-->
												<if condition="!empty($addmoney)">
													<text class="fs020 xc-moneys">+{$addmoney}元</text>
												</if>
												<text class="fs020 word-line fg xc_retail_price" style="<if condition='empty($integral)'>margin-top: 0.15rem;</if>" >零售价:¥{$goods.market_price}</text>
											</span>

									<!--<if condition="!empty($rank_field) && $goods[$rank_field] neq 0">-->
									<!--</if>-->
								<!--	<font class="n_price_set">原价¥{$goods.market_price} 88.2 </font>-->
								</div>
								<!--分享按钮 许程 8.10-->
								<div class="xc-share-frame-jieti flex  ai_center" onclick="lookshare(event)">
									<img class="share-frame" src="__STATIC__/images/weixin/share.png"/>
									<text class="share-font fc">分享</text>
								</div>

							</dt>
						</dl>


						<if class="info_dottms flex ai_center" >
                            <if condition="get_redis_distribution($integral_buy.id,$stoid,4)">
                                <image style="width:0.2rem;height: 0.2rem ;margin-left: 0.25rem;" src="__STATIC__/images/addmoney.png"></image>
                            </if>

							<h3 class="name ellipsis-2 fs028" style=" <if condition="get_redis_distribution($integral_buy.id,$stoid,4)">padding-left:0.05rem</if>">{$goods['goods_name']}</h3>

						</div>

						<div class= "price_dottm flex jc_sb fs025 fc-hui" style="width: 100%; border-bottom:0.04rem solid #eee;">
							<test style="padding-left:0.23rem;" >销量:{$goods.sales_sum}件</test>
							<test>折扣:{$goods.discount}折</test>
							<test style="padding-right:0.23rem; margin-bottom: 0.1rem">评价:<font id="jr_pj_num"></font></test>
						</div>

					<!--门店地址-->
					<!-- //选择门店-->
					<div class="store_frame" style="height: auto">
						<div class="store">
							<div class="flex jc_sb "style="height: 0.6rem">
								<div class="store_top flex ai_center" >
									<img src="__WEBPUBLIC__/miniapp/images/stores.png">
									<text class="fs026 fg">选择门店</text>
								</div>
								<div class="flex ai_center fs028 red_bb"  onclick="open_store(1)">
									更多门店 <text class="bg_jj"></text>
								</div>
							</div>
							<!-- 显现默认的门店 和选择了的门店 -->
							<div id="ff_page_sto" style="display: none"></div>
						</div>
					</div>



						<!----保障服务---->
				    	<if condition="$tpshop_config.service_bz">
						<div class="xc-bzfw flex ai_center" style="margin-left: 0.13rem;">
							<img  src="__WEBPUBLIC__/miniapp/images/bzfu_w.png">
							<font class="fs025">{$tpshop_config.service_bz}</font>
						</div>
						</if>

						<!--  宝贝评价 -->
						<div id="bbpj_div" style="display: none">
							<div class="bb_view fs025 flex jc_sb ai_center">
								<div>宝贝评价<!--({{categories3[0].num}})-->  (<text id="all_pj_text"></text>)</div>
								<div class="red_bb flex ai_center" onclick="setGoodsTab('goods_ka',3,3)" >查看全部
									<text class="bg_jj"></text>
								</div>
							</div>
							<div class="xc_comment flex">
								<div class="xc_comment-have-pictures fs14" onclick="go_pj(5)" >有图<font id="pj_has_img"></font><!--({{categories3[1].num}})--> </div>
								<div class="xc_comment-discuss fs14" onclick="go_pj(2)">好评<font id="pj_good"></font><!--({{categories3[2].num}})--> </div>
                                <div class="xc_comment-discuss fs14" onclick="go_pj(3)">中评<font id="pj_zhon"></font><!--({{categories3[2].num}})--> </div>
                                <div class="xc_comment-discuss fs14" onclick="go_pj(4)">差评<font id="pj_bad"></font><!--({{categories3[4].num}})--> </div>
							</div>
							<!-- 评论的轮播组件 -->
							<div class="swiper-container" id="pj_swiper">
								<div class="swiper-wrapper" id="pj_list"></div>
							</div>
						</div>

						<!-- 商品详情参数 -->
						<div class="tuwen_title flex rel">
							<div class="g_line"></div>
							<div class="center_s abs flex ai_center jc_center fs028">
								<img src="__WEBPUBLIC__//miniapp/images/tuwen_c.png">详情
							</div>
						</div>

						<div class="t_g_info flex ai_center flex  " style="margin-bottom: 0.08rem;">
							<div class="red_shu"></div>
							<div class="fs028">商品信息</div>
						</div>

						<div class="table_s">
							<div class="tb_item flex">
								<div class="item_left t_c"><span>商品名称</span></div>
								<div class="item_right"><span class="text">{$goods.goods_name}</span></div>
							</div>
							<div class="tb_item flex">
								<div class="item_left t_c"><span>商品编号</span></div>
								<div class="item_right"><span class="text">{$goods.goods_sn}</span></div>
							</div>
							<div class="tb_item flex">
								<div class="item_left t_c"><span>商品条码</span></div>
								<div class="item_right"><span class="text">{$goods.sku}</span></div>
							</div>

							<if condition="check_is_set(1) && $goods.cat_name">
								<div class="tb_item flex">
									<div class="item_left t_c"><span>品类</span></div>
									<div class="item_right"><span class="text">{$goods.cat_name}</span></div>
								</div>
							</if>

							<if condition="check_is_set(3) && $goods.brand_name">
								<div class="tb_item flex">
									<div class="item_left t_c"><span>品牌</span></div>
									<div class="item_right"><span class="text">{$goods.brand_name}</span></div>
								</div>
							</if>

							<if condition="check_is_set(2) && $goods.nation_name ">
								<div class="tb_item flex">
									<div class="item_left t_c"><span>国别</span></div>
									<div class="item_right"><span class="text">{$goods.nation_name}</span></div>
								</div>
							</if>

							<div class="tb_item flex">
								<div class="item_left t_c"><span>规格</span></div>
								<div class="item_right"><span class="text">{$goods.guige}</span></div>
							</div>
							<div class="tb_item flex" style="border-bottom: 0.01rem solid #eee;">
								<div class="item_left t_c"><span>上架时间</span></div>
								<div class="item_right"><span class="text">{$goods.on_time|date='Y-m-d H:i',###}</span></div>
							</div>
						</div>

						<!-- 自动加载底部内容的div,必须为空。-->
						<div  id="mubiao"></div>

						<script type="text/javascript">
                            $(function() {
                                //图片高度控制20170510
                                var w = $(".sliderlist li").width();
                                $(".sliderlist li img").css("max-height", w);
                                $(".subNav").click(function() {
                                    if ($(this).attr('non') == "1") return;
                                    $(this).next(".navContent").slideToggle(300).siblings(".navContent").slideUp(500);
                                    $(this).toggleClass("on").siblings(".subNav").removeClass("on");
                                    if ($(".is_scroll").length <= 0) {
                                        $('html,body').animate({
                                            'scrollTop': $('body')[0].scrollHeight
                                        }, 600);
                                    }
                                });
                                commentType = 1; // 评论类型
                                ajaxComment(1, 1); // ajax 加载评价列表
                            })
						</script>
						<script type="text/jscript">
							function click_search() {
								var search_ka = document.getElementById("search_ka");
								if (search_ka.className == "s-buy open ui-section-box") {
									search_ka.className = "s-buy ui-section-box";
								} else {
									search_ka.className = "s-buy open ui-section-box";
								}
							}

							function changeAtt(t) {
								t.lastChild.checked = 'checked';
								for (var i = 0; i < t.parentNode.childNodes.length; i++) {
									if (t.parentNode.childNodes[i].className == 'hover') {
										t.parentNode.childNodes[i].className = '';
										t.childNodes[0].checked = "checked";
									}
								}
								t.className = "hover";
								changePrice();
							}

							function changeAtt1(t) {
								t.lastChild.checked = 'checked';
								for (var i = 0; i < t.parentNode.childNodes.length; i++) {
									if (t.className == 'hover') {
										t.className = '';
										t.childNodes[0].checked = false;
									} else {
										t.className = "hover";
										t.childNodes[0].checked = true;
									}
								}
								changePrice();
							}
						</script>
						<div style=" height:8px; background:#eeeeee; margin-top:-1px;"></div>

						<!-- 推荐商品 -->
						<div class="flex ai_center jc_center rel xc-linellae-frame">
							<div class="xc-linellae"></div>
							<div class="abs flex ai_center jc_center xc-recommend-frame ">
								<img class=" xc-recommend" src="__STATIC__/images/weixin/zs.png"/>

								<div class="xc-recommend-word">推荐</div>
							</div>
						</div>

						<include file="public/floor_more"/>

					</div>
				</form>
			</div>
		</div>

        <!---  商品详情  --->
		<div class="main" id="user_goods_ka_2" style="display:none">
			<div class="t_g_info flex ai_center flex goods-position">
				<div class="red_shu"></div>
				<div class="fs025">商品信息</div>
			</div>
			<div class="table_s">
				<div class="tb_item flex">
					<div class="item_left t_c"><span >商品名称</span></div>
					<div class="item_right"><span class="text">{$goods.goods_name}</span></div>
				</div>
				<div class="tb_item flex">
					<div class="item_left t_c"><span>商品编号</span></div>
					<div class="item_right"><span class="text">{$goods.goods_sn}</span></div>
				</div>
				<div class="tb_item flex">
					<div class="item_left t_c"><span>商品条码</span></div>
					<div class="item_right"><span class="text">{$goods.sku}</span></div>
				</div>

				<if condition="check_is_set(1) && $goods.cat_name">
					<div class="tb_item flex">
						<div class="item_left t_c"><span>品类</span></div>
						<div class="item_right"><span class="text">{$goods.cat_name}</span></div>
					</div>
				</if>

				<if condition="check_is_set(3) && $goods.brand_name">
					<div class="tb_item flex">
						<div class="item_left t_c"><span>品牌</span></div>
						<div class="item_right"><span class="text">{$goods.brand_name}</span></div>
					</div>
				</if>

				<if condition="check_is_set(2) && $goods.nation_name ">
					<div class="tb_item flex">
						<div class="item_left t_c"><span >国别</span></div>
						<div class="item_right"><span class="text">{$goods.nation_name}</span></div>
					</div>
				</if>

				<div class="tb_item flex">
					<div class="item_left t_c"><span>规格</span></div>
					<div class="item_right"><span class="text">{$goods.guige}</span></div>
				</div>
				<div class="tb_item flex">
					<div class="item_left t_c"><span>上架时间</span></div>
					<div class="item_right" style="border-bottom: 0.01rem solid #eee"><span class="text">{$goods.on_time|date='Y-m-d H:i',###}</span></div>
				</div>
			</div>
			<div class="product_main" style=""></div>
		</div>

		<!---  评价  --->
		<div class="tab_attrs tab_item hide" id="user_goods_ka_3" style="display:none;">
			<ul class="comment_nav flex jc_sb ai_center">
				<li id="all_com_li" class="xc-li bs" ctype="1">
					全部({$commentStatistics.c0})
					<!--	<p>{$commentStatistics.c0}</p>-->
				</li>
				<li id="com_img_li" class="xc-li" ctype="5">
					有图({$commentStatistics.c4})
					<!--<p>{$commentStatistics.c4}</p>-->
				</li>
				<li id="com_gd_li" class="xc-li"  ctype="2">
					好评({$commentStatistics.c1})
					<!--<p>{$commentStatistics.c1}</p>-->
				</li>
				<li id="xc-li" class="xc-li"ctype="3">
					中评({$commentStatistics.c2})
					<!--<p>{$commentStatistics.c2}</p>-->
				</li>
				<li id="com_bd_li" class="xc-li"  ctype="4">
					差评({$commentStatistics.c3})
					<!--<p>{$commentStatistics.c3}</p>-->
				</li>

			</ul>
			<div id="ECS_COMMENT"></div>
		</div>


		<!--弹窗-->
		<div class="layermbox layermbox0_1 dn">
			<div class="laymshade"></div>
			<div class="layermmain">
				<div id="jfbuydiv" class="section">
					<div class="layermchild  layermanim">
						<div class="layermcont">
							<ul class="tcbox">
								<li class="liFirst">
									<div class="flex" style="width: 100%;height: 101px">
									<div class="tcimg">
										<img id="fgoodsimg" src="{:getimg($goods['original_img'],NOIMG,0,1)}" />
										<span class="dis_vm"></span>
									</div>
										<div style="width: 70%">
											<div style="width: 100%;height: 50%">
												<div class="cat-goods-name">
													<div class="ellipsis-2 "> {$goods.goods_name}</div>
												</div>
											</div>


									<div class="tcinfo flex ai_fe">
										<div>
										<div class="tcprice" style="height: 25px">
											<span class="cr font18">{$integral}</span>&nbsp;&nbsp;积分&nbsp;<if condition="$addmoney neq 0">&nbsp;+&nbsp;&nbsp;
											<span class="cr"><em class="font18">{$addmoney}</em></span></if>
											<!--<i>¥</i><font id="fpirce">{$curpirce}</font>-->
										</div>
											<div class="flex fg" style="line-height: 20px;height: 16px;">
										<div>已售:<font id="fsalenum">{$goods.sales_sum}</font></div>
										<div>可售:<font id="fablenum">{$onlybuy}</font></div>
											</div>
										<!--<div>已选:<font id="fselected_pro">{$goods['guige']}</font></div>-->
									</div>
									</div>
									</div>
									</div>
									<span class="close"></span>
									<div class="store-frame">
										<div class="flex jc_sb">
											<div class="flex" style="width: 80%">
												<div class="store_top flex ai_center"><img src="__WEBPUBLIC__/miniapp/images/stores.png"><text class="fs026 fg">选择门店</text></div>
											</div>
											<div class="flex ai_center fs024 red_bb" onclick="open_store(2)">
												更多门店
												<text class="bg_jj"></text>
											</div>
										</div>
										<div id="ff_page_stos" style="width:100%;"></div>

									</div>

								</li>
								<li class="attribute">
									<ul>
										<li>
											<p class="tcTit">商品属性</p>
											<div class="tcBtnBox">
                                                <span  class="tcBtn tcBtnOn" >{$goods['guige']}</span>
											</div>
										</li>
										<!--
										许程 2019/12/03
										<li>
											<div class="tcTit">
												<div class="subNav" non="1">取货门店(
													<font id="fselestore">请选择门店</font>)</div>
											</div>
										</li>-->


										<li>
											<span class="tcBy"><i>购买数量</i></span>
											<span class="tcBy"style="overflow: hidden;height:21px">
                   							<div class="act_wrap rel" >
												 <div class="flex add-cut" >
                        					<!--	<a class="input-sub active" onClick="goods_cut()"></a>-->
                     							 <div class="active-cut  fs14 flex jc_center ai_center t-c" onClick="goods_cut()"></div>
												  <div class="d-il">
												<input id="ffgoods_num" type="tel"
                                                       onkeydown="if(event.keyCode == 13) event.returnValue = false"
                                                       name="goods_num" value="1" class="input-num"
                                                       type="text">
												  </div>
                     						<!--	<a class="input-add active" onClick="goods_add();"></a>-->
                     						 <div class="active-add  fs030 flex jc_center ai_center t-c" onClick="goods_add()"></div>
											</div>
												</div>
									</span>
										</li>
									</ul>
								</li>
								<li id="selecat" class="area dn">
									<div class="tcTit" style="border-bottom: 1px solid #dadada;">
										<&nbsp;选择门店 </div>
											<ol class="addr-name" id="addr_catlist">
												<foreach name="store" item="list">
													<li sid="{$list.cat_id}">{$list.cat_name}</li>
												</foreach>
											</ol>
								</li>
								<li id="selepick" class="store dn">
									<div class="tcTit" style="border-bottom: 1px solid #dadada;">
										<&nbsp;&nbsp;<font id="fcat_name"></font>
									</div>
									<ol class="addr-name" id="pickuplist">
										<!--<li>中山路店</li>-->
									</ol>
								</li>
							</ul>

							</div>
							<div id="fsumbitbtn" type="2" class="layermbtn buttons" onClick="checkup(this)">确定</div>
						</div>
					</div>
			</div>
		</div>

		<a href="javascript:goTop();" class="gotop" style="display: none"><img src="__STATIC__/images/topup.png"></a>
		<div style=" height:60px;"></div>

        <!-- 底部按钮 --->
		<div class="footer_nav">
			<ul>
				<if condition="$is_chat eq 1 || $tpshop_config['qqlist']">
				<li class="bian">
					<a onClick="get_event_log('1','展开QQ客服');showQQList()">
						<if condition="$is_chat eq 1">
							<em class="goods_nav1" style="background-image: url(__STATIC__/images/chat-2.png);"></em>
							<else/>
							<em class="goods_nav1"></em>
						</if>
						<span>客服</span>
					</a>
				</li>
				</if>
				<li class="bian"><a href="tel:{$tpshop_config['shop_info_phone']}"><em
			class="goods_nav2"></em><span>电话</span></a></li>
				<li><a href="javascript:collect_goods({$goods.goods_id},{$goods.store_id});" id="favorite_add"><em class="goods_nav3 <if condition="$collect eq 1">goods_nav3_on</if>"></em><span <if condition="$collect eq 1">style="color:#C4182E"</if>>收藏</span></a>
				</li>
			</ul>
			<!--<dl id="saleout" class="nokill dn">积分商品已经售完</dl>-->
			<!--<dl id="isinteg" class="nokill  <notempty name='isinteg'>dn</notempty>">积分不足</dl>class="<empty name='isinteg'>dn</empty>"-->
			<!--商家控制积分购要不要实现普通购买-->
			<if condition="$integral_buy.is_shopbuy neq 1">
				<dl id="normal" style="padding-top: 11px">
					<empty name='isinteg'>
					    <dd class="nokill" style=" width: 100%">积分不足</dd>
					<else/>
						<dd id="saleout"  class="nokill dn" style=" width: 100%"><a  style="display:block;" href="javascript:void(0);">已售完</a></dd>
						<if condition="$goods.flash_sale['buy_limit'] eq 0">
						<dd id="saleout2"  class="nokill" style=" width: 100%"><a  style="display:block;" href="javascript:void(0);">超出限购</a></dd>
							<else/>
						<dd id="saleing"  class="goumai" style=" width: 100%"><a  style="display:block;" href="javascript:void(0);">立即兑换</a></dd>
						</if>

					</empty>
				</dl>
			<else/>
		    	<dl id="normal">
				   <empty name='isinteg'>
						<dd class="nokill" style=" width: 50%">积分不足</dd>
						<else/>
						<dd id="saleout"  class="nokill dn" style=" width: 50%"><a  style="display:block;" href="javascript:void(0);">已售完</a></dd>
					   <if condition="$goods.flash_sale['buy_limit'] eq 0">
						   <dd id="saleout2"  class="nokill" style=" width: 100%"><a  style="display:block;" href="javascript:void(0);">超出限购</a></dd>
						   <else/>
						<dd id="saleing"  class="goumai" style=" width: 50%"><a  style="display:block;" href="javascript:void(0);">立即兑换</a></dd>
					   </if>
					</empty>
				   <dd class="ptgoumai" onclick="gogood(this)" style="width: 50%" gid="{$Think.request.id}"><a class="button active_button" href="javascript:void(0);">单独购买</a></dd>
			</dl>
			</if>
		</div>

		<Input type="hidden" id="fstore_limit" value="{$goods.flash_sale['buy_limit']}">
		<Input type="hidden" id="fonly_buy" value="{$goods.flash_sale['onlybuy']}">
		<Input type="hidden" id="prom_num" value="{$goods.flash_sale['goods_num']}">
		<Input type="hidden" id="prom_buynum" value="{$goods.flash_sale['buy_num']}">
		<Input type="hidden" id="fordnum" value="{$ordnum}">
		<Input type="hidden" id="integ" value="{$integ}">
		<Input type="hidden" id="integerr" value="{$integerr}">
		<Input type="hidden" id="ulx" value="{:session('ulx'.session('user')['user_id'])}">
		<Input type="hidden" id="uly" value="{:session('uly'.session('user')['user_id'])}">

		<!----QQ客服--->
		<div class="qqkefu dn">
			<ul id="fqqlist"></ul>
		</div>

		<!-- 是否默认门店 -->
		<if condition="$de_pick">
			<Input type="hidden" id="is_def" value="1">
			<Input type="hidden" id="def_pick" value="{$de_pick.pickup_id}">
			<Input type="hidden" id="def_pick_name" value="{$de_pick.pickup_name}">
		</if>
		<!-- 是否默认门店 -->
		<include file="public/pk_htm2"/>
		<script type="text/javascript">

            var qqlist="{$tpshop_config['qqlist']}";
            var distr_type="{$goods['distr_type']}";
            var gotop=$(".gotop");
            $(window).scroll(function () {
                ($(window).scrollTop() > 100) ? gotop.show(500) : gotop.hide(100);
            });
			/*--返回顶部--*/
            function goTop() {
                $('html,body').animate({'scrollTop': 0}, 600);
            }
            //选择的商品ID
            var selectid="<?php echo I("id")?>";
            var id="<?php echo I("id")?>";
            //选择的自提点ID
            var selectpid="";
            var selectnum=1;

            var stoid="<?php echo I("stoid") ?>";
            //商品起始库存
            var store_count ={$goods.store_count};
            var store_limit=$("#fstore_limit").val();
            var ordnum=$("#fordnum").val();
            var prom_num=$("#prom_num").val();
            var prom_buynum=$("#prom_buynum").val();
            var prom_onlybuynum=parseInt(prom_num)-parseInt(prom_buynum);


			/*-----------------定位相关------------------*/
            var issortsto="{$is_sort_storage}";
            function ismobile(test) {
                var u = navigator.userAgent, app = navigator.appVersion;
                if (/AppleWebKit.*Mobile/i.test(navigator.userAgent) || (/MIDP|SymbianOS|NOKIA|SAMSUNG|LG|NEC|TCL|Alcatel|BIRD|DBTEL|Dopod|PHILIPS|HAIER|LENOVO|MOT-|Nokia|SonyEricsson|SIE-|Amoi|ZTE/.test(navigator.userAgent))) {
                    if (window.location.href.indexOf("?mobile") < 0) {
                        try {
                            if (/iPhone|mac|iPod|iPad/i.test(navigator.userAgent)) {
                                return '0';
                            } else {
                                return '1';
                            }
                        } catch (e) { }
                    }
                } else if (u.indexOf('iPad') > -1) {
                    return '0';
                } else {
                    return '1';
                }
            }
            var ii0=0;
            //获取经纬度
            function getCurLocation() {
                navigator.geolocation.getCurrentPosition( // 该函数有如下三个参数
                    function (pos) { // 如果成果则执行该回调函数
                        var x = pos.coords.longitude;
                        var y = pos.coords.latitude;
                        mapshow(x,y);
                    }, function (err) { // 如果失败则执行该回调函数
                        //layer.open({content:'定位失败',time:2});
                        mapshow(0,0);
                    }, { // 附带参数
                        enableHighAccuracy: false, // 提高精度(耗费资源)
                        timeout: 5000, // 超过timeout则调用失败的回调函数
                        maximumAge: 1000 // 获取到的地理信息的有效期,超过有效期则重新获取一次位置信息
                    }
                );
            }

            var isapple=false;
            if (ismobile(1)=="0"){
                isapple=true;
            }

			/*--显示门店--*/
       /*     function mapshow(x,y) {
                var is_def=$("#is_def").val();
				/!*---新增20171016,获取门店---*!/
                $.ajax({
                    type: "GET",
                    url: "/index.php?m=Mobile&c=activity&a=getStorageList&stoid="+stoid+"&goodsid="+id+"&lx="+x+"&ly="+y+"&distr_type="+distr_type,//+tab,
                    success: function (data) {
                        layer.close(ii0);
                        if(data.code==1){
                            if(data.type==1){
                                list=data.mini;
                                var htm=""; var len=0;
                                for (var i in list) {
                                    len++;
                                    htm += "<li onclick='setpickup(this)'  pid='" + list[i]['pickup_id'] + "'>" + list[i]['pickup_name'] + "</li>";
                                }
                                $("#addr_catlist").html(htm);

                                if(is_def){
                                    $("#fselestore").text($("#def_pick_name").val());
                                    selectpid = $("#def_pick").val();
                                }


                                if ((issortsto == 1 && (x!=0 || y!=0)) || len == 1) {
                                    if(!is_def) {
                                        var ele = list[0];
                                        $("#fselestore").text(ele.pickup_name);
                                        selectpid = ele.pickup_id;
                                    }
                                }
                            }else {
                                list = data.store;
                                var htm = "";
                                for (var i in list) {
                                    htm += "<li sid='" + list[i].cat_id + "'>" + list[i].cat_name + "</li>";
                                }
                                $("#addr_catlist").html(htm);

                                if(is_def){
                                    $("#fselestore").text($("#def_pick_name").val());
                                    selectpid = $("#def_pick").val();
                                }
								/!*---最小值拿出来---*!/
                                if (x != 0 || y != 0) {
                                    if (issortsto == 1 && !is_def) {
                                        var ele = data.min;
                                        $("#fselestore").text(ele.pickup_name);
                                        selectpid = ele.pickup_id;
                                    }
                                }
                            }

							/!*--选择线下门店--*!/
                            $(".layermbox .area .addr-name li").click(function () {
                                var id=parseInt($(this).attr("sid"));
                                var htm="";
								/!*----判断是否采用了线下库存----*!/
                                if(data.is_bline==0) {
                                    var ary;
                                    for(var i in list){
                                        if(list[i]["cat_id"]==id){
                                            ary= list[i];
                                            break;
                                        }
                                    }
                                    var cary = ary["list"];
                                    for (var i = 0; i < cary.length; i++) {
                                        if (cary[i]['count'] != undefined && cary[i]['count'] != null && cary[i]['count'] != "") {
                                            htm += "";
                                        } else {
                                            htm += "<li onclick='setpickup(this)'  pid='" + cary[i]['pickup_id'] + "'>" + cary[i]['pickup_name'] + "</li>";
                                        }
                                    }
                                }

                                $("#fcat_name").text(ary['cat_name']);
                                $("#pickuplist").html(htm);
                                $("#ffgoods_num").val("1");
                                $(".layermbox .area").addClass("dn");
                                $(".layermbox .attribute").addClass("dn");
                                $(".layermbox .store").removeClass("dn");
                            });

                        }
                        else {
                            $(".nokill").text('未找到门店');
                            $(".nokill").show();
                            $("#saleing").hide();
                        }
                    }
                });
            }*/

            /***
			 * 程序入口
             */
            $(document).ready(function () {

                if(prom_onlybuynum<=0){
                    $("#saleout").fadeIn(3);
                    //$("#normal").fadeOut(3);
                    $("#saleing").fadeOut(3);
                }

                var err1=$.trim($("#integerr").val());
                if(err1!=""){
                    layer.open({content:err1,time:2});
				}

                //更新商品价格
                get_goods_price();
                //新增20170329
                $.ajax({
                    type: "GET",
                    url: "/index.php?m=Mobile&c=Cart&a=getNum&stoid="+stoid,//+tab,
                    success: function (data) {
                        $('#tp_cart_info').html(data);
                    }
                });

				/*--qq客服--*/
                if (qqlist != undefined && qqlist!="") {
                    var list = qqlist.split(",");
                    var htm = "";
                    for (var i = 0; i < list.length; i++) {
                        htm += "<li><a target='_blank' href='http://wpa.qq.com/msgrd?v=3&uin=" + list[i] + "&site=qq&menu=yes'>客服"
                            + (i + 1) + "<a></li>"
                    }
                    $("#fqqlist").html(htm);
                }

                //--判断整个页面的高度--
                var hei=$("body").height();
                var whei=window.innerHeight;
                if(hei<=whei){
                    load_detail();
                }

                //--评价--
                get_pj_fir();
                //--加载更多--
                $("#getmore").hide();
                //getGoodsList();
            });

            function switch_spec(spec) {
                $(spec).siblings().removeClass('hover');
                $(spec).addClass('hover');
                $(spec).siblings().children('input').prop('checked', false);
                $(spec).children('input').prop('checked', true);
                //更新商品价格
                // get_goods_price();
            }

            function get_goods_price() {
                var goods_price = {$goods.shop_price}; // 商品起始价
                var goods_num = parseInt($("#goods_num").val());
                // 库存不足的情况
                if (goods_num > store_count) {
                    goods_num = store_count;
                    alert('库存仅剩 ' + store_count + ' 件');
                    $("#goods_num").val(goods_num);
                }
                var flash_sale_price = parseFloat("{$goods['flash_sale']['price']}");
                (flash_sale_price > 0) && (goods_price = flash_sale_price);
                $("#goods_price").html('¥' + goods_price ); // 变动价格显示
                $("#fpirce").text(goods_price);
            }

            function sortNumber(a, b) {
                return a - b;
            }

            function ajaxComment(commentType, page) {
                var i0=layer.open({type:2});
                $.ajax({
                    type: "GET",
                    url: "/index.php?m=Mobile&c=goods&a=ajaxComment&goods_id="+id+"&stoid="+stoid+
                    "&commentType=" + commentType + "&p=" + page,//+tab,
                    success: function (data) {
                        $("#ECS_COMMENT").empty().append(data);
                        layer.close(i0);
                    }
                });
            }

			/*--商品的数量的加减--*/
            function goods_cut(){
                var num_val=document.getElementById('ffgoods_num');
                var new_num=num_val.value;
                var Num = parseInt(new_num);
                if(Num>1)Num=Num-1;
                num_val.value=Num;
                selectnum=Num;
            }

            function goods_add(){
                var num_val=document.getElementById('ffgoods_num');
                var new_num=num_val.value;
                var Num = parseInt(new_num);
                Num=Num+1;
				/*--判断库存--*/
                if(Num>store_count){
                    layer.open({content:'购买数量超出库存',time:2});
                    num_val.value=Num-1;
                    return;
                }
				/*--判断活动商品数量是否超出--*/
                if(prom_num!="" && (Num+parseInt(prom_buynum))>parseInt(prom_num)){
                    layer.open({content:'购买数量超出活动商品的数量',time:2});
                    num_val.value=Num-1;
                    return;
                }

				/*--判断限购--*/
                if(store_limit!=""&&Num>parseInt(store_limit)){
                    layer.open({content:'购买数量超出抢购的限购数量',time:2});
                    num_val.value=Num-1;
                    return;
                }

                num_val.value=Num;
                selectnum=Num;
            }


			/*--选择属性商品--*/
            function selectgd(ob){
                var obj=$(ob);
                selectnum=1;
                selectid=obj.attr("id");
                store_count=parseInt(obj.attr("gku"));
                store_limit=parseInt(obj.attr("limit"));
                prom_num=parseInt(obj.attr("prom_num"));
                prom_buynum=parseInt(obj.attr("prom_buynum"));
                var price=obj.attr("pirce");
                var img=obj.attr("img");
                var name=obj.attr("gname");
                var salenum=obj.attr("sale_num");
                $("#fgoodsimg").attr("src",img);
                $("#fsalenum").text(salenum);
                $("#fselected_pro").text(obj.text());
                $("#fpirce").text(price);

				get_the_Sto();

            }


            function checkup(ob) {
				selectpid=my_sele_pkid;
                if(selectpid==""){
                    layer.open({content:'请先选择门店',time:2});
                    return;
                }
                var num_val=document.getElementById('ffgoods_num');
                var new_num=num_val.value;
                var Num = parseInt(new_num);

				/*--判断库存--*/
                if(Num>store_count){
                    layer.open({content:'购买数量超出库存',time:2});
                    return;
                }
				/*--判断活动商品数量是否超出--*/
                if(prom_num!="" && (Num+parseInt(prom_buynum))>parseInt(prom_num)){
                    layer.open({content:'购买数量超出活动商品的数量',time:2});
                    return;
                }
				/*--判断限购--*/
                if(store_limit!=""&&Num>parseInt(store_limit)){
                    layer.open({content:'购买数量超出抢购的限购数量',time:2});
                    return;
                }

                var text=$(ob).text();
                if(text=="提交中"){
                    return false;
                }
                $(ob).text("提交中");

                //var type= parseInt($(ob).attr("type"));
                selectnum=Num;
                AjaxAddCart(selectid,selectnum,2,selectpid);
            }

			/*--qq客服--*/
            function showQQList() {
				<if condition="$is_chat eq 1">
					window.location.href="/mchat/mbchat/index?goods_id={$Think.request.id}&stoid={$Think.request.stoid}";
				<else/>
					$(".qqkefu").fadeToggle();
				</if>
            }
			/*--微信图片预览 --*/
            $(document).on('click', '#sliderlist img.pic_img',function(event) {
                var imgArray = [];
                var curImageSrc = $(this).attr('src');
                var oParent = $(this).parent();
                if (curImageSrc) {
                    $('#sliderlist img.pic_img').each(function(index, el) {
                        var itemSrc = $(this).attr('src');
                        imgArray.push(itemSrc);
                    });

                    wx.previewImage({
                        current: curImageSrc,
                        urls: imgArray
                    });
                }
            });

			/*--微信图片评价中的图片预览 --*/
			$(document).on('click', '.iddle-goods-img .goods-img-nyf',function(event) {
				var imgArrays = [];
				var curImageSrcs = $(this).attr('src');
				var oParent = $(this).parent();
				if (curImageSrcs) {
					$('.iddle-goods-img .goods-img-nyf').each(function(index, el) {
						var itemSrc = $(this).attr('src');
						imgArray.push(itemSrc);
					});

					wx.previewImage({
						current: curImageSrcs,
						urls: imgArrays
					});
				}
			});

            //跳转到原价购买
			function gogood(ob){
			    var id=$(ob).attr('gid');
			    var url='/index.php/Mobile/Goods/goodsInfo/is_inte_normal/1/stoid/{$Think.request.stoid}/id/'+id;
			    window.location.href=url;
			}


            ///滑动到底部事件
            $(document).unbind("scroll");
            $(document).bind("scroll", function (event) {
                if ($(document).scrollTop()+50 >= $(document).height() - window.innerHeight) {
                    var html= $("#mubiao").html();
                    if(html==""){
                        var htm = $('.product_main').html();
                        if ($.trim(htm) == "") {
                            load_detail();
                        }
                    }else{
                        getGoodsList();
					}
                }
            });

            var d_loading=0;
            function load_detail() {
                if(d_loading) return false;
                d_loading=1;

                var i0=layer.open({type:2,shadeClose: false});
                $.ajax({
                    type: "GET",
                    url: "/index.php?m=Mobile&c=goods&a=ajaxdetail&stoid=" + stoid+"&goods_id="+id,//+tab,
                    success: function (data) {
                        if($.trim(data)=="") data="&nbsp;";
                        $('.product_main').html(data);
                        $("#mubiao").html(data);
                        layer.close(i0)
                        d_loading=0;
                    }
                });
            }

            var pj_fir_data=null;
            //获取评价的初始值
            function get_pj_fir() {

                $("#jr_pj_num").text(0);
                var url="{$mini_host}/api/weshop/comment/countlist?store_id="+stoid+"&goods_id="+id;
                $.ajax({
                    type: "GET",
                    url:url,
                    success: function (data) {
                        if(data.code==0){
                            var dd= [{  name: "全部",id: 1, num: 0 },{   name: "有图", id: 5,num: 0 },
                                { name: "好评",id: 2,  num: 0 }, {  name: "中评",id: 3, num: 0 }, {
                                    name: "差评", id: 4,num: 0
                                }, ];

                            var g = data.data[0];
                            var allnum = g.c0 + g.c1 + g.c2 + g.c3 + g.c4 + g.c5;
                            var num2 = g.c4 + g.c5;
                            var num3 = g.c3;
                            var num4 = g.c0 + g.c1 + g.c2;

                            dd[0].num = allnum;

                            if(allnum>0){
                                dd[1].num = g.cimg;
                                dd[2].num = num2;
                                dd[3].num = num3;
                                dd[4].num = num4;

                                pj_fir_data=dd;
                                $("#all_pj_text").text(allnum);
                                $("#jr_pj_num").text(allnum);
                                $("#pj_good").text("("+dd[2].num+")");
                                $("#pj_zhon").text("("+dd[3].num+")");
                                $("#pj_bad").text("("+dd[4].num+")");
                                $("#pj_has_img").text("("+dd[1].num+")");

                                $("#bbpj_div").show();
                            }
                        }
                    }
                });

                url="/mobile/goods/get_pj_list?stoid="+stoid+"&goods_id="+id+"&pageSize=3&parent_id=0&page=1";
                //----获取3条-----
                $.ajax({
                    type: "GET",
                    url:url,
                    success: function (data) {
                        $("#pj_list").html(data);
                        var swiper = new Swiper('#pj_swiper', {
                            slidesPerView:"auto",//容器的数量
                            spaceBetween: 1,//框之间的距离
                            pagination: {
                                el: '.swiper-pagination',
                                clickable: true,
                            },
                        });
                    }
                });
            }
            var user_id="{$tpshop_config['user_id']}";
			var zaning=0;
            //--点赞功能---
            function dian_zan(ob) {
                if(user_id==""){
                    my_msg("您还未绑定登陆",0);
                    return;
                }
				if(zaning) return false;
				zaning=1;
                var com_id=$(ob).attr("com_id");
                var zannum= parseInt($(ob).find(".parameter-val").text());
                var url="{$mini_host}/api/weshop/commentZan/save?store_id="+
                    stoid+"&goods_id="+id+"&comment_id="+com_id+"&user_id="+user_id;
                var ty=$(ob).find("img").attr('ty');

                //----获取3条-----
                $.ajax({
                    type: "POST",
                    url:url,
                    success: function (data) {
						zaning=0;
                        if(data.code==0){
                            if(data.msg=='点赞成功!'){
                                $(ob).find("img").attr('ty',0);
                                $(ob).find("img").attr("src","__STATIC__/images/weixin/dianzanred.png");
								$(ob).find(".parameter-val").css('color',"#d60022");
                                zannum=zannum+1;
                            }else{
								$(ob).find(".parameter-val").css('color',"#8a8a8a");
                                zannum=zannum-1;
                                $(ob).find("img").attr("src","__STATIC__/images/weixin/dianzane.png");
                                $(ob).find("img").attr('ty',1);
                            }
                            $(ob).find(".parameter-val").text(zannum);
                        }else{
                            my_msg(data.msg,0);
                        }
                    }
                });
            }
            //--点击评价按钮跳转---
            function go_pj(ind) {
                var name='goods_ka',i=3;
                for(i=1;i<=3;i++){
                    var menu=document.getElementById(name+i);
                    var con=document.getElementById("user_"+name+"_"+i);
                    menu.className=i==3?"on":"";
                    con.style.display=i==3?"block":"none";
                }

                $(".comment_nav li ").removeClass("bs");
                switch(ind){
                    case 5:
                        $("#com_img_li").addClass("bs");
                        break;
                    case 2:
                        $("#com_gd_li").addClass("bs");
                        break;
                    case 2:
                        $("#xc-li").addClass("bs");
                        break;
                    case 4:
                        $("#com_bd_li").addClass("bs");
                        break;
                }

                ajaxComment(ind, 1);
            }

            //--评价的标题栏的点击作用--
            $(".comment_nav li ").click(function(){
                $(".comment_nav li ").removeClass("bs");
                $(this).addClass("bs");
                var $commentType = $(this).attr('ctype');
                ajaxComment($commentType, 1);// ajax 加载评价列表
            });

            var page_md=1;
            var gooding=0;
            var nomore_pG=0;
            function getGoodsList() {
                if(gooding) return false;
                if(nomore_pG) return false;
                gooding=1;

                $('.get_more').show();
                $('#getmore').hide();
                $.ajax({
                    type: "get",
                    url: "/index.php?m=Mobile&c=Index&a=ajaxGetMore&p=" + page_md + "&stoid=<?php echo getMobileStoId()?>",
                    success: function (data) {
                        $('.get_more').hide();
                        if (data) {
                            gooding=0;
                            $("#J_ItemList>ul").append(data);
                            page_md++;
                        } else {
                            $('#getmore').remove();nomore_pG=1;
                        }
                    },
                    error:function(XMLHttpRequest, textStatus, errorThrown){
                        gooding=0;
                        $("#ferweimap").hide();
                    }
                });
            }


		</script>
		<script src="__PUBLIC__/js/jqueryUrlGet.js"></script><!--获取get参数插件-->
		<script> set_first_leader(); //设置推荐人 </script>
		<!-- 微信浏览器 调用微信 分享js-->
		<include file="public/wx_share"/>
		<!-- 微信浏览器 调用微信 分享js  end-->
		<!--分享生成图片-->
		<include file="public/integralShare"/>
	</body>

</html>