


How to identify whether the WeChat browser is opened and a picture pops up?
Use WeChat to open the homepage of this website and click on the product. This picture will appear: You cannot purchase within WeChat, please click on the upper right corner.
But there is no such identification on the product sharing page. Clicking to go to Tmall to buy will jump directly to Taobao. I want to add an identification when clicking to buy, but I don’t know where to add it. This program uses thinkPHP I don’t know what code is needed for the framework. Can anyone help me?
<code> <include file="public:head"></include> <script src="__STATIC__/jwap/js/jquery-1.8.0.js"></script> <link type="text/css" rel="stylesheet" href="__STATIC__/jwap/css/alert.css"> <link type="text/css" rel="stylesheet" href="__STATIC__/jwap/css/global.css"> <div class="main"> <include file="public:header"></include> <include file="public:top"></include> <div class="app"> <header class="head" id="head"> <div class="fixtop"> <span id="t-find"><a class="btn btn-left btn-back" href="javascript:window.history.go(-1)" title="返回上一页"></a></span> <span id="t-index">商品详情</span> <span id="t-user"><a class="btn btn-left btn-back-home" href="%7B:C('ftx_header_html')%7D" title="返回首页"></a></span> </div> </header> <div id="item"> <div class="item-good"> <div class="img_show"> <ul id="target" class="clear"> <li><a href="%7B:U('jump/index',array('id'=>%24item%5B'num_iid'%5D))%7D" rel="nofollow"> <img src="/static/imghwm/default1.png" data-src="{$item['pic_url']}" class="lazy" pic_url alt="How to identify whether the WeChat browser is opened and a picture pops up?" ></a></li> </ul> </div> <div class="list-price buy"> <span class="price-new ml"><i>¥</i>{$item.coupon_price}</span><i class="del f14 ml2">¥{$item.price}</i><if condition="$item.cu neq ''"><em class="icon-gai ml2">{$item.cu}</em></if> </div> <h1 id="item-title">{$item.title}</h1> <div class="better_change"> <h3 id="精挑细选">精挑细选</h3> <ul class="better_show clear"> <li> <div class="better_info"> <i class="xp"></i> <span>新品特价</span> </div> </li> <li> <div class="better_info"> <i class="xs"></i> <span>限时特卖</span> </div> </li> <li> <div class="better_info"> <i class="cx"></i> <span>诚信品牌</span> </div> </li> <li> <div class="better_info"> <i class="tj"></i> <span>人气推荐</span> </div> </li> <li class="last"> <div class="better_info"> <i class="by"></i> <span>全国包邮</span> </div> </li> </ul> </div> </div> <if condition="$item.class eq 'start'"> <a class="btn-pay buy">即将开始</a> <elseif condition="$item.class eq 'gone'"></elseif> <a class="btn-pay buy">已卖光</a> <elseif condition="$item.class eq 'gone'"></elseif> <a class="btn-pay buy">已结束</a> <elseif condition="$item.class eq 'buy'"></elseif> <if condition="$item.shop_type eq 'B' "><a href="%7B:U('jump/index',array('id'=>%24item%5B'num_iid'%5D))%7D" target="_self" class="btn-pay buy" rel="nofollow">去天猫抢购</a></if> <if condition="$item.shop_type eq 'C' "><a href="%7B:U('jump/index',array('id'=>%24item%5B'num_iid'%5D))%7D" target="_self" class="btn-pay buy" rel="nofollow">去淘宝抢购</a></if> <if condition="$item.shop_type eq 'M' "><a href="%7B:U('jump/index',array('id'=>%24item%5B'id'%5D))%7D" target="_self" class="btn-pay buy" rel="nofollow">去美丽说抢购</a></if> </if> <div class="bady-part"> <div id="bady-tab" class="bady-tab clear"> <ul> <li> <a href="javascript:;">图文详情</a> </li> <li> <a href="javascript:;">产品参数</a> </li> <li> <a href="javascript:;">商品评论</a> </li> </ul> </div> <div class="tab1"> {$item.desc} </div> <!-- 商品评论 --> <div class="com-big tab3" style="display: none;"> <div class="com-list"> <ul> <volist name="feedback" id="feedback"> <li> <div class="rate-user-info"> <span class="rate-user">{$feedback.nicker} <span class="rate-user-grade"> <em class="tm-icon t3"> </em> <em class="tm-icon vip-icon blue_2"></em> </span> </span> <span class="rate-right fr"> <em class="rate-time">2015-07-30 14:53:31</em><em>评论来自 <if condition="$item.shop_type eq 'C' ">淘宝</if><if condition="$item.shop_type eq 'B' ">天猫</if><if condition="$item.shop_type eq 'M' ">美丽说</if></em></span> <div class="rate-leirong">{$feedback.feedback}</div> </div> </li> </volist> </ul> </div> </div> <!-- 规格参数 --> <div class="com-big tab2" style="display: none;"> <div class="com-list"> <ul> <volist name="props" id="guige"> <li> <div class="shop_info clear"> <span>{$guige.name}:</span> <strong>{$guige.value}</strong> </div> </li> </volist> </ul> </div> </div> </div> </div> <div class="normal item-recommend clear"> <h3 id="span-猜你还喜欢-span"><span>猜你还喜欢:</span></h3> <ul class="goods-list clear" id="goods_block"> <include file="public:hotitems"></include> </ul> </div> <div class="normal user-like clear"> <h3 id="已有-wholike-人收藏">已有{$wholike}人收藏</h3> <p> <volist name="whos" id="val"> <a href="%7B:U('user/like')%7D" target="_self"><img src="/static/imghwm/default1.png" data-src="__STATIC__/jwap/images/home.png" class="lazy" id style="max-width:90%" height="32px" alt="How to identify whether the WeChat browser is opened and a picture pops up?" title="How to identify whether the WeChat browser is opened and a picture pops up?"></a> </volist> </p> </div> <div class="buy_btn clear"> <a href="%7B:C('ftx_header_html')%7D" class="go_home"><img src="/static/imghwm/default1.png" data-src="__STATIC__/jwap/images/home.png" class="lazy" alt="How to identify whether the WeChat browser is opened and a picture pops up?" >返回首页</a> <div class="buy_info"> <if condition="$item.class eq 'start'"> <a class="go_tmall">即将开始</a> <elseif condition="$item.class eq 'gone'"></elseif> <a class="go_tmall">已卖光</a> <elseif condition="$item.class eq 'gone'"></elseif> <a class="go_tmall">已结束</a> <elseif condition="$item.class eq 'buy'"></elseif> <eq name="item.is_quan" value="1"> <a href="%7B%24item.quan_url%7D" target="_self" class="go_tmall buy" rel="nofollow">领取{$item.quan_price}元优惠券<i class="gtbuy"></i></a> <if condition="$item.shop_type eq 'B' "><a href="%7B:U('jump/index',array('id'=>%24item%5B'num_iid'%5D))%7D" target="_self" class="app_load buy" rel="nofollow">去天猫抢购</a></if> <if condition="$item.shop_type eq 'C' "><a href="%7B:U('jump/index',array('id'=>%24item%5B'num_iid'%5D))%7D" target="_self" class="app_load buy" rel="nofollow">去淘宝抢购</a></if> <if condition="$item.shop_type eq 'M' "><a isconvert="1" href="%7B:U('jump/index',array('id'=>%24item%5B'id'%5D))%7D" target="_self" class="app_load buy" rel="nofollow">去美丽说</a></if> </eq> <eq name="item.is_quan" value="0"> <if condition="$item.shop_type eq 'B' "><a href="%7B:U('jump/index',array('id'=>%24item%5B'num_iid'%5D))%7D" target="_self" class="go_tmall" rel="nofollow">去天猫抢购<i></i></a></if> <if condition="$item.shop_type eq 'C' "><a href="%7B:U('jump/index',array('id'=>%24item%5B'num_iid'%5D))%7D" target="_self" class="go_tmall" rel="nofollow">去淘宝抢购<i></i></a></if> <if condition="$item.shop_type eq 'M' "><a isconvert="1" href="%7B:U('jump/index',array('id'=>%24item%5B'id'%5D))%7D" target="_self" class="go_tmall" rel="nofollow">去美丽说<i></i></a></if> <a class="app_load joa_load_app" data-pid="{$item.num_iid}" title="{$item.title}" href="javascript:;">点这里<br>放入收藏夹</a> </eq> </if> </div> </div> <include file="public:footer"></include> <script type="text/javascript"> var FTXIAER = { root: "__ROOT__", site: "{:C('ftx_header_html')}", uid: "<?php echo $visitor['id'];?>", url: {} }; var lang = {}; <volist name=":L('js_lang')" id="val">lang.{$key} = "{$val}"; </script> </div> </div> <script type="text/javascript"> $("#bady-tab li").eq(0).addClass("active"); $('#bady-tab li').on('click', function(){ $("#bady-tab li").removeClass("active"); $(this).addClass("active"); $(".tab1,.tab2,.tab3").hide(); $(".tab"+($(this).index()+1)).show(); }); </script> <script type="text/javascript" src="__STATIC__/jwap/js/like.js"></script> <include file="public:footjs"></include> </code>This is the product details page
<code> <include file="public:head"></include> <link type="text/css" rel="stylesheet" href="__STATIC__/jwap/css/alert.css"> <link type="text/css" rel="stylesheet" href="__STATIC__/jwap/css/global.css"> <if condition="C('ftx_popup_status') eq '1'"> <link type="text/css" rel="stylesheet" href="__STATIC__/jwap/css/popup.css"> <div id="popup_scroll"> <div id="popup_opacity"></div> <div id="popup_content"> <div id="popup"><dl><dt> <div id="closebtn" style="float:right;"><img src="/static/imghwm/default1.png" data-src="__STATIC__/jwap/images/alert-close.png" class="lazy" style="max-width:90%" height="32px" alt="先逛逛"></div> <a href="%7B:C('ftx_popup_url')%7D" data-gid="521" class="popup_show_maidian"><img src="/static/imghwm/default1.png" data-src="{:C('ftx_site_url')}{:C('ftx_popup_img')}" class="lazy" ftx_site_url style="max-width:90%" style="max-width:90%" alt="How to identify whether the WeChat browser is opened and a picture pops up?" ></a> </dt></dl></div> </div> </div> <script type="text/javascript" src="__STATIC__/jwap/js/popup.js"></script> </if> <div class="main"> <include file="public:header"></include> <include file="public:top"></include> <include file="public:dapp"></include> <div class="app"> <div class="search_warp"> <span id="classify" class="classify"><a href="javascript:;" class="btn btn-left btn-type"></a></span> <div class="search" style="float: none;"> <form name="search" action="%7B:C('search/index')%7D" method="get" id="search"> <input type="hidden" name="m" value="search"><input type="hidden" name="a" value="index"><div class="seek_main"> <input type="text" name="k" onclick="if(this.value=='请输入内容'){this.value='';this.className='seek_input seek_input_h'}" onblur="if(this.value==''){this.value='请输入内容';this.className='seek_input seek_input_f'}" class="seek_input seek_input_f" value="请输入内容"><button type="submit" id="k" onclick="document.getElementById('k').value=encodeURI(document.getElementById('k').value);getId('search').submit()" class="seek_btn" value="搜本站"><img src="/static/imghwm/default1.png" data-src="__STATIC__/jwap/images/search.png" class="lazy" alt="How to identify whether the WeChat browser is opened and a picture pops up?" ></button> </div> </form> </div> </div> <header id="head" class="head"> <div class="fixtop"> <span id="classify" class="classify"><a href="javascript:;" class="btn btn-left btn-type"></a></span> <span id="t-index">{:C('ftx_site_name')}</span> <span id="user"><a href="javascript:;" class="sign_btn btn btn-right btn-sign"></a></span> </div> </header> {:R('advert/index', array(10), 'Widget')} <div id="ct"> <link rel="stylesheet" type="text/css" href="__STATIC__/jwap/css/zhuanti.css?ts=201510111950"> <div class="index_w"> <ul class="category"> <nav type="lists" style="other"> <volist name="data" id="val"> <li class="ffxgo_1" data-url="{$val.link}"> <span> <img src="/static/imghwm/default1.png" data-src="{:attach($val['icon'],'m')}" class="lazy" icon alt="{$val.name}"> </span> <strong>{$val.name}</strong> </li> </volist> </nav> </ul> <div class="hot_recommend"> <nav type="lists" style="foot"> <volist name="data" id="val"> <!-- 每日更新 --> <if condition="$val['alias'] eq 'new' "> <dl class="today ffxgo_1" data-url="{$val.link}"> <dt class="tit t1" style="width: 60px;height: 15px;background:url({:attach(get_thumb($val['icon1'], '_m'),'m')}); background-size: contain; background-repeat: no-repeat;">{$val.name}</dt> <dd class="txt">{$val.des}</dd> <dd class="img"> <img src="/static/imghwm/default1.png" data-src="{:attach($val['icon'],'m')}" class="lazy" icon style="max-width:90%" alt="{$val.name}"><span></span> </dd> <!-- dl--> </dl> </if> <if condition="$val['alias'] eq 'shijian' "> <dl class="rec_item ffxgo_1" data-url="{$val.link}"> <dt class="tit">{$val.name}</dt> <dd class="txt">{$val.des}</dd> <dd class="img"><img src="/static/imghwm/default1.png" data-src="{:attach($val['icon'],'m')}" class="lazy" icon style="max-width:90%" alt="好货早收藏"></dd> <!-- dl--> </dl> </if> </volist> </nav> </div> <script type="text/javascript"> </script> <div class="hot_bottom"> <nav type="lists" style="foot"> <volist name="data" id="val"> <if condition="$val['alias'] eq 'hot' "> <dl class="add_item ffxgo_1" data-url="{$val.link}"> <dt class="img"> <img src="/static/imghwm/default1.png" data-src="{:attach($val['icon'],'m')}" class="lazy" icon style="max-width:90%" style="max-width:90%" alt="How to identify whether the WeChat browser is opened and a picture pops up?" > </dt> <dd> <p class="tit t6">{$val.name}</p> <p class="txt">{$val.des}</p> </dd> </dl> </if> <if condition="$val['alias'] eq 'temai' "> <dl class="add_item ffxgo_1" data-url="{$val.link}"> <dt class="img"> <img src="/static/imghwm/default1.png" data-src="{:attach($val['icon'],'m')}" class="lazy" icon style="max-width:90%" style="max-width:90%" alt="How to identify whether the WeChat browser is opened and a picture pops up?" > </dt> <dd> <p class="tit"> <span class="fc_orange">{$val.name}</span> <if condition="$val['hot'] eq '1'"><span class="icon_saleShop">热卖</span></if><if condition="$val['hot'] eq '2'"><span class="icon_bestBuy">精选</span></if> </p> <p class="txt">{$val.des}</p> </dd> </dl> </if> </volist> </nav> </div> </div> </div> <script type="text/javascript"> $(".ffxgo_1").off("click").on("click",function(){ window.location.href = $(this).attr("data-url"); }); </script> <div id="goods"> <section class="goods" id="goods"> <ul class="goods-list clear"> <include file="public:itemlist"></include> </ul> </section> <div class="paging"> <div class="paging-nav"> {$page} </div> </div> </div> <include file="public:footer"></include> </div> </div> <include file="public:footjs"></include> <script type="text/javascript">document.getElementById("back_top").style.display = "none"; window.onscroll = function () { if (document.documentElement.scrollTop + document.body.scrollTop > 100) { document.getElementById("back_top").style.display = "block"; } else { document.getElementById("back_top").style.display = "none"; } } </script><script type="text/javascript">$(document).ready(function(){ var jumpurl=$("#jumpurl").text(); if(getck("showdiv") == "") { var data = new Date(); var timestr = data.getFullYear() + "-" + (Number(data.getMonth())+1) + "-" + data.getDate() + " " + data.getHours() + ":" + data.getMinutes() + ":" + data.getSeconds(); document.cookie="showdiv=" + timestr; } else { var date_ = convertdate(getck("showdiv")); var data = new Date(); var num = Number(data.getTime()) - Number(date_.getTime()); if(num >= 24*3600000)//已经过期重新设置 { document.cookie="showdiv="; } } $("#closebtn").click(function(){ document.cookie="isshow=true";$("#ffxiabige_scroll").fadeOut("slow");}); $("#add_fav").click(function(){ window.open(jumpurl); document.cookie="isshow=true"; $("#ffxiabige_scroll").fadeOut("slow"); }); $("#welcome_img").click(function(){ window.open(jumpurl); document.cookie="isshow=true"; $("#ffxiabige_scroll").fadeOut("slow"); }); setTimeout("showdiv()",1000); //这里修改打开网页多久之后显示提示 }); function showdiv() { if(getck("isshow") == "true") { return; } else { if(getck("showdiv") == "") { $("#ffxiabige_scroll").width(document.body.clientWidth); $("#ffxiabige_scroll").height(document.body.clientHeight); $("#ffxiabige_scroll").show(400); } else { var date_ = convertdate(getck("showdiv")); var data = new Date(); var num = Number(data.getTime()) - Number(date_.getTime()); if(num >= 24*3600000)//已经过期重新设置 { document.cookie="showdiv="; $("#ffxiabige_scroll").width(document.body.clientWidth); $("#ffxiabige_scroll").height(document.body.clientHeight); $("#ffxiabige_scroll").show(); } } } } var acookie=document.cookie.split("; "); function getck(sname) { //获取单个cookies for(var i=0;i<acookie.length;i++){ var arr=acookie[i].split("="); if(sname==arr[0]){ if(arr.length>1) return unescape(arr[1]); else return ""; }} return ""; } function convertdate(datestr) { var date_hidden = datestr; date_hidden = date_hidden.replace(":","-"); date_hidden = date_hidden.replace(":","-"); date_hidden = date_hidden.replace(" ","-"); var date = new Date(Number(date_hidden.split("-")[0]),Number(date_hidden.split("-")[1])-1,Number(date_hidden.split("-")[2]),Number(date_hidden.split("-")[3]),Number(date_hidden.split("-")[4]),Number(date_hidden.split("-")[5])); return date; } function clearcookie() { document.cookie="showdiv="; document.cookie="isshow=";location.href=location.href; } </script> </code>This is the homepage. What changes need to be made?

What’s still popular is the ease of use, flexibility and a strong ecosystem. 1) Ease of use and simple syntax make it the first choice for beginners. 2) Closely integrated with web development, excellent interaction with HTTP requests and database. 3) The huge ecosystem provides a wealth of tools and libraries. 4) Active community and open source nature adapts them to new needs and technology trends.

PHP and Python are both high-level programming languages that are widely used in web development, data processing and automation tasks. 1.PHP is often used to build dynamic websites and content management systems, while Python is often used to build web frameworks and data science. 2.PHP uses echo to output content, Python uses print. 3. Both support object-oriented programming, but the syntax and keywords are different. 4. PHP supports weak type conversion, while Python is more stringent. 5. PHP performance optimization includes using OPcache and asynchronous programming, while Python uses cProfile and asynchronous programming.

PHP is mainly procedural programming, but also supports object-oriented programming (OOP); Python supports a variety of paradigms, including OOP, functional and procedural programming. PHP is suitable for web development, and Python is suitable for a variety of applications such as data analysis and machine learning.

PHP originated in 1994 and was developed by RasmusLerdorf. It was originally used to track website visitors and gradually evolved into a server-side scripting language and was widely used in web development. Python was developed by Guidovan Rossum in the late 1980s and was first released in 1991. It emphasizes code readability and simplicity, and is suitable for scientific computing, data analysis and other fields.

PHP is suitable for web development and rapid prototyping, and Python is suitable for data science and machine learning. 1.PHP is used for dynamic web development, with simple syntax and suitable for rapid development. 2. Python has concise syntax, is suitable for multiple fields, and has a strong library ecosystem.

PHP remains important in the modernization process because it supports a large number of websites and applications and adapts to development needs through frameworks. 1.PHP7 improves performance and introduces new features. 2. Modern frameworks such as Laravel, Symfony and CodeIgniter simplify development and improve code quality. 3. Performance optimization and best practices further improve application efficiency.

PHPhassignificantlyimpactedwebdevelopmentandextendsbeyondit.1)ItpowersmajorplatformslikeWordPressandexcelsindatabaseinteractions.2)PHP'sadaptabilityallowsittoscaleforlargeapplicationsusingframeworkslikeLaravel.3)Beyondweb,PHPisusedincommand-linescrip

PHP type prompts to improve code quality and readability. 1) Scalar type tips: Since PHP7.0, basic data types are allowed to be specified in function parameters, such as int, float, etc. 2) Return type prompt: Ensure the consistency of the function return value type. 3) Union type prompt: Since PHP8.0, multiple types are allowed to be specified in function parameters or return values. 4) Nullable type prompt: Allows to include null values and handle functions that may return null values.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SublimeText3 Chinese version
Chinese version, very easy to use

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

SublimeText3 Mac version
God-level code editing software (SublimeText3)