indexs.html 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. <!DOCTYPE html>
  2. <html lang="zh-CN">
  3. <head>
  4. <meta charset="UTF-8" />
  5. <meta
  6. content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"
  7. name="viewport" />
  8. <meta
  9. content="width=device-width,height=device-height,maximum-scale=1.0,user-scalable=no"
  10. name="viewport" />
  11. <meta content="yes" name="apple-mobile-web-app-capable" />
  12. <meta content="black" name="apple-mobile-web-app-status-bar-style" />
  13. <meta content="telephone=no" name="format-detection" />
  14. <script type="text/javascript">
  15. var deviceWidth = document.documentElement.clientWidth;
  16. if (deviceWidth > 750) {
  17. deviceWidth = 750;
  18. }
  19. document.documentElement.style.fontSize = deviceWidth / 7.5 + "px";
  20. </script>
  21. <link rel="stylesheet" href="index.css" />
  22. <link rel="stylesheet" href="../../scss/unicom.css" />
  23. </head>
  24. <body>
  25. <div class="overlaysa"></div>
  26. <div class="section-agr">
  27. <div class="issue">能告诉我们为什么退订吗?</div>
  28. <div class="content">
  29. <ul class="list">
  30. <li><input type="radio" name="canceltype" value="产品太贵了" />产品太贵了</li>
  31. <li>
  32. <input type="radio" name="canceltype" value="换套餐了,流量够用" />换套餐了,流量够用
  33. </li>
  34. <li><input type="radio" name="canceltype" value="产品包含流量太少" />产品包含流量太少</li>
  35. <li><input type="radio" name="canceltype" value="选择其他产品代替" />选择其他替代产品</li>
  36. <li><input type="radio" name="canceltype" value="使用体验不佳" />使用体验不佳</li>
  37. <li>
  38. <input id="neveruseinput" type="radio" name="canceltype" value="不再使用该款APP" />
  39. <span id="neverusespan">不再使用该款APP</span>
  40. </li>
  41. <li><input type="radio" name="canceltype" value="其他原因" />其他原因</li>
  42. </ul>
  43. <!-- <div class="cancelmsg-title">其他原因:</div>
  44. <div class="cancelmsg-box">
  45. <textarea id="cancelmsg" name="cancelmsg" class="cancelmsg" maxlength="50" placeholder="请输入..."></textarea>
  46. <span id="cnt" class="cnt">0/50</span>
  47. </div> -->
  48. <div class="layout actions">
  49. <div id="close" class="btn">再想想</div>
  50. <div id="cancel" class="btn primary">去退订</div>
  51. </div>
  52. </div>
  53. </div>
  54. <!-- 模板 -->
  55. <div class="fixed-center sms-form login">
  56. <div class="form-group">
  57. <span class="feedback">请选择或输入退订原因</span>
  58. </div>
  59. </div>
  60. </body>
  61. <script type="text/javascript" src="../jquery-min.js"></script>
  62. <script type="text/javascript" src="../../js/jquery.compnt.js"></script>
  63. <script>
  64. var baseUrl;
  65. if (window.location.href.indexOf("https://800.wo.cn/orderchannel") >= 0) {
  66. baseUrl = "https://800.wo.cn/";
  67. } else if (window.location.href.indexOf("https://800.wo.cn/festivalchannel") >= 0) {
  68. baseUrl = "https://800.wo.cn/";
  69. } else if (window.location.href.indexOf("http://localhost") >= 0) {
  70. baseUrl = "http://localhost:8088/";
  71. } else if (window.location.href.indexOf("http://127.0.0.1") >= 0) {
  72. baseUrl = "http://127.0.0.1:8088/";
  73. } else if (window.location.href.indexOf("http://100.0.4.69:3344") >= 0) {
  74. baseUrl = "http://100.0.4.69:3344/";
  75. } else if (window.location.href.indexOf("http://100.0.4.69:8282") >= 0) {
  76. baseUrl = "http://100.0.4.69:8282/";
  77. } else if (window.location.href.indexOf("https://optest.bol.wo.cn") >= 0) {
  78. baseUrl = "https://optest.bol.wo.cn/";
  79. } else {
  80. baseUrl = "https://operation1.bol.wo.cn/";
  81. }
  82. // if (window.parent.location.href.indexOf("/douyin/") >= 0) {
  83. // $('#neveruseinput').val('不再使用抖音APP');
  84. // $('#neverusespan').text('不再使用抖音APP');
  85. // } else if (window.parent.location.href.indexOf("/tt/") >= 0) {
  86. // $('#neveruseinput').val('不再使用抖音APP');
  87. // $('#neverusespan').text('不再使用抖音APP');
  88. // } else if (window.parent.location.href.indexOf("/sina/wb") >= 0) {
  89. // $('#neveruseinput').val('不再使用微博APP');
  90. // $('#neverusespan').text('不再使用微博APP');
  91. // } else if (window.parent.location.href.indexOf("/wy/") >= 0) {
  92. // $('#neveruseinput').val('不再使用网易APP');
  93. // $('#neverusespan').text('不再使用网易APP');
  94. // } else {
  95. // $('#neveruseinput').val('不再使用此APP');
  96. // $('#neverusespan').text('不再使用此APP');
  97. // }
  98. // 给选中的radio组件设置背景颜色
  99. // <!-- $('input[type="radio"').each(function(i, item) {-->
  100. // <!-- $(item).addClass('checked')-->
  101. // <!-- });-->
  102. $("#cancelmsg").on("keyup", function () {
  103. if ($("#cancelmsg").val().length > 50) {
  104. $("#cancelmsg").val($("#cancelmsg").val().substring(0, 50));
  105. return;
  106. }
  107. $("#cnt").html($("#cancelmsg").val().length + "/50");
  108. });
  109. $("#close").on("click", function () {
  110. var data = {
  111. eventtype: "close"
  112. };
  113. parent.postMessage(JSON.stringify(data), baseUrl);
  114. });
  115. $("#cancel").on("click", function () {
  116. if (
  117. $("input:radio:checked").val() == null &&
  118. ($("#cancelmsg").val() == null || $("#cancelmsg").val().trim() == "")
  119. ) {
  120. // 请选择或填写退订原因!
  121. compnt.showAlert("请选择退订原因!");
  122. return;
  123. }
  124. // if ($('#cancelmsg').val().length > 0 && $('#cancelmsg').val().length < 10) {
  125. // compnt.showAlert('退订原因不能少于10个字符!');
  126. // return;
  127. // }
  128. var data = {
  129. eventtype: "cancel",
  130. canceltype: $("input:radio:checked").val(),
  131. cancelmsg: $("#cancelmsg").val()
  132. };
  133. parent.postMessage(JSON.stringify(data), baseUrl);
  134. });
  135. // <!-- var checkbox = document.querySelectorAll("input[type=radio]");-->
  136. // <!-- var submit = document.querySelector("button[type=submit]");-->
  137. // <!-- var section = document.querySelector(".section-agr")-->
  138. // <!-- var res = document.querySelector(".res")-->
  139. // <!-- var fixed = document.querySelector(".fixed-center")-->
  140. // <!-- var im = document.querySelector(".im")-->
  141. // <!-- res.addEventListener("click", function() {-->
  142. // <!-- fixed.style.display = "block"-->
  143. // <!-- setTimeout(function() {-->
  144. // <!-- fixed.style.display = "none"-->
  145. // <!-- }, 3000);-->
  146. // <!-- })-->
  147. // <!-- submit.addEventListener("click", function() {-->
  148. // <!-- if (submit.disabled = true) {-->
  149. // <!-- window.location.replace("http:www.baidu.com")-->
  150. // <!-- }-->
  151. // <!-- })-->
  152. // <!-- function check() {-->
  153. // <!-- for (var i = 0; i < checkbox.length; i++) {-->
  154. // <!-- if (checkbox[i].checked) {-->
  155. // <!-- submit.disabled = false;-->
  156. // <!-- res.style.display = "none"-->
  157. // <!-- return;-->
  158. // <!-- };-->
  159. // <!-- }-->
  160. // <!-- submit.disabled = true;-->
  161. // <!-- }-->
  162. // <!-- for (var i = 0; i < checkbox.length; i++) {-->
  163. // <!-- checkbox[i].onclick = check;-->
  164. // <!-- }-->
  165. // <!-- area.oninput = function() {-->
  166. // <!-- if (area.value != "" && area.value.length >= 10) {-->
  167. // <!-- submit.disabled = false;-->
  168. // <!-- res.style.display = "none"-->
  169. // <!-- }-->
  170. // <!-- }-->
  171. // <!-- window.onload = check;-->
  172. // <!-- function texLength(obj, maxlength, id) {-->
  173. // <!-- var curr = obj.value.length;-->
  174. // <!-- if (curr > maxlength) {-->
  175. // <!-- layer.msg('字数在' + maxlength + '字以内');-->
  176. // <!-- } else {-->
  177. // <!-- document.getElementById(id).innerHTML = curr;-->
  178. // <!-- }-->
  179. // <!-- }-->
  180. // var x = document.getElementById("area").value;
  181. // var amount = [...document.querySelectorAll("input[type='radio']")]
  182. // console.log(amount);
  183. // var flag = amount.some(item=>{
  184. // return item.checked
  185. // })
  186. // console.log(flag);
  187. </script>
  188. </html>