作者 王晓刚
1 个管道 的构建 通过 耗费 46 秒

一键复制

... ... @@ -122,8 +122,13 @@
<!--</div>-->
<!-- 地址信息 -->
<div class="log_four_input">
<div class="log_four_input_title" style="margin-bottom: 0.2rem;">
地址信息
<div style="display: flex;align-items: center;justify-content: space-between;">
<div class="log_four_input_title" style="margin-bottom: 0.2rem;">
地址信息
</div>
<div class="log_four_input_title" onclick="copyText()" style="margin-bottom: 0.2rem;">
一键复制
</div>
</div>
<if condition="$data.is_courier eq 2">
<div class="log_four_input_one">
... ... @@ -175,6 +180,7 @@
<img src="__TMPL__/public/assets/images/29.png" alt=""/>
</div>
</div>
<div hidden id="keydiv">{$data.name} {$data.phone} {$data.region} {$data.region_detail}</div>
<else/>
<div class="log_four_input_one city_word">
<div class="log_four_input_one_left">
... ... @@ -244,6 +250,7 @@
<img src="__TMPL__/public/assets/images/29.png" alt="" />
</div>
</div>
<div hidden id="keydiv">{$data.name} {$data.phone} {$data.region} {$data.school} {$data.grade}-{$data.class} {$data.beiyong_address}</div>
</if>
... ... @@ -313,6 +320,17 @@
<script>
</script>
<script>
function copyText() {
var Url2 = document.getElementById("keydiv").innerText;
var oInput = document.createElement('input');
oInput.value = Url2;
document.body.appendChild(oInput);
oInput.select();
document.execCommand("Copy");
oInput.className = 'oInput';
oInput.style.display = 'none';
alert('复制成功');
}
<notempty name='$school'>
var myschool = {$school};
school_s(myschool);
... ...