registerSuccess.vue 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303
  1. <template>
  2. <view class="pageBody">
  3. <!-- 公共组件-每个页面必须引入 -->
  4. <public-module></public-module>
  5. <view>
  6. <view class="info">
  7. <image src="/static/image/register/success-bg.jpg" style="height: 100%;">
  8. </image>
  9. <view class="ok-btn">
  10. <image src="/static/image/register/ok.png" alt="注册成功" mode="widthFix"></image>
  11. </view>
  12. <view class="" style="position: absolute;right: 0; left: 0; top: 160px;">
  13. <p class="entry-con">感谢您加入掌柜</p>
  14. <h2 class="entry-hd">恭喜注册成功</h2>
  15. <view class="info-list">
  16. <view @longpress="copyAction(id)">您的掌柜会员号:{{id}}</view>
  17. <view @longpress="copyAction(phone)">您的关联手机:{{phone}}</view>
  18. </view>
  19. </view>
  20. </view>
  21. <view class="download">
  22. <h3 class="entry-hd">立即下载晋掌柜</h3>
  23. <p class="entry-con">即可享受保险特别特别优惠</p>
  24. <p class="entry-con">点击下方按钮复制会员号并下载</p>
  25. <view class="download-btn d-flex a-center j-center">
  26. <!-- <view><image src="/static/image/register/ios-btn.png" alt="苹果版下载" mode="widthFix"></image></view> -->
  27. <view>
  28. <image id="android" src="/static/image/register/android-btn.png" @tap="downloadApp('android')"
  29. alt="安卓版下载" mode="widthFix"></image>
  30. </view>
  31. </view>
  32. </view>
  33. <view class="app">
  34. <image src="/static/image/register/app.jpg" mode="widthFix" alt="应用预览"></image>
  35. <p class="entry-con">下载完成后,在晋掌柜中登录<br>进行账号认证即可正常使用<br>如有下载困难,请致电:4006-333-016</p>
  36. </view>
  37. <view class="footer-bg">
  38. <p class="entry-con">注:微信用户请在右上角选择“在浏览器中打开”,再选择下载应用</p>
  39. </view>
  40. </view>
  41. <view id="weixin-tip">
  42. <p>
  43. <image src="/static/image/register/live_weixin.png" alt="微信打开" mode="widthFix"></image>
  44. <span id="close" title="关闭" class="close" @tap="hideDownload">×</span>
  45. </p>
  46. </view>
  47. </view>
  48. </template>
  49. <script>
  50. export default {
  51. data() {
  52. return {
  53. id: "",
  54. phone: "",
  55. }
  56. },
  57. onLoad(params) {
  58. this.id = params.id;
  59. this.phone = params.phone;
  60. if (!!this.id) {
  61. uni.setClipboardData({
  62. data: this.id
  63. })
  64. }
  65. },
  66. methods: {
  67. copyAction(text) {
  68. uni.setClipboardData({
  69. data: text,
  70. success: function() {
  71. uni.showToast({
  72. title: '复制成功',
  73. duration: 2000
  74. });
  75. }
  76. });
  77. },
  78. // 判断是不是微信
  79. async weixinTip(ele) {
  80. var ua = navigator.userAgent;
  81. var isWeixin = !!/MicroMessenger/i.test(ua);
  82. if (isWeixin) {
  83. ele.onclick = function(e) {
  84. window.event ? window.event.returnValue = false : e.preventDefault();
  85. document.getElementById('weixin-tip').style.display = 'block';
  86. }
  87. } else {
  88. if (!!this.id) {
  89. uni.setClipboardData({
  90. data: this.id
  91. })
  92. }
  93. let pageRequest = {
  94. pageNum: 1,
  95. pageSize: 50,
  96. columnFilters: {
  97. apptype: {
  98. name: "apptype",
  99. value: "apk",
  100. }
  101. }
  102. };
  103. let getquote = await this.$http.post('/sysVersion/findPage', pageRequest);
  104. let url = getquote.data.content[0].path;
  105. if (getquote.code == '200') {
  106. window.open(url);
  107. } else {
  108. uni.showToast({
  109. title: getquote.msg,
  110. icon: 'none'
  111. });
  112. }
  113. }
  114. },
  115. downloadApp(typeId) {
  116. var btn = document.getElementById(typeId);
  117. this.weixinTip(btn);
  118. },
  119. hideDownload() {
  120. document.getElementById('weixin-tip').style.display = 'none';
  121. }
  122. }
  123. }
  124. </script>
  125. <style scoped>
  126. /*核心css*/
  127. .wxtip {
  128. background: rgba(0, 0, 0, 0.8);
  129. text-align: center;
  130. position: fixed;
  131. left: 0;
  132. top: 0;
  133. width: 100%;
  134. height: 100%;
  135. z-index: 998;
  136. display: none;
  137. }
  138. .wxtip-icon {
  139. width: 52px;
  140. height: 67px;
  141. background: url(http://caibaojian.com/d/uploads/2016/01/weixin-tip.png) no-repeat;
  142. display: block;
  143. position: absolute;
  144. right: 30px;
  145. top: 20px;
  146. }
  147. .wxtip-txt {
  148. padding-top: 107px;
  149. color: #fff;
  150. font-size: 16px;
  151. line-height: 1.5;
  152. }
  153. .pageBody {
  154. max-width: 750rpx;
  155. min-height: 100vh;
  156. background: #f5f5f5;
  157. font-family: "Arial,Helvetica,sans-serif,PingFangSC";
  158. }
  159. .info {
  160. position: relative;
  161. height: 400px;
  162. color: #fff;
  163. }
  164. .info .ok-btn {
  165. width: 130rpx;
  166. margin: 0 auto;
  167. padding-bottom: 30rpx;
  168. text-align: center;
  169. position: absolute;
  170. top: 50px;
  171. left: 0;
  172. right: 0;
  173. }
  174. .info .ok-btn image {
  175. width: 100%;
  176. }
  177. .info .entry-con {
  178. font-size: 28rpx;
  179. text-align: center;
  180. }
  181. .info .entry-hd {
  182. font-size: 50rpx;
  183. letter-spacing: 15rpx;
  184. font-weight: bold;
  185. text-align: center;
  186. }
  187. .info .info-list {
  188. margin: 40rpx 80rpx 0;
  189. list-style: none;
  190. font-size: 28rpx;
  191. text-align: center;
  192. }
  193. .info .info-list>view {
  194. padding-top: 30upx;
  195. border-bottom: 1px solid #D1EAEE;
  196. padding-bottom: 10upx;
  197. }
  198. .download {
  199. color: #4D4D4D;
  200. background-color: #FFFFFF;
  201. padding: 50upx 50upx 70upx;
  202. }
  203. .download .entry-con {
  204. font-size: 28upx;
  205. text-align: center;
  206. }
  207. .download .entry-hd {
  208. font-size: 50upx;
  209. letter-spacing: 5upx;
  210. font-weight: bold;
  211. text-align: center;
  212. }
  213. .download .download-btn {
  214. padding-top: 30upx;
  215. }
  216. .download .download-btn>view {
  217. width: 325upx;
  218. padding: 0 32.5rpx;
  219. box-sizing: border-box;
  220. display: inline-block;
  221. vertical-align: top;
  222. text-align: center;
  223. }
  224. .download .download-btn>view>image {
  225. width: 100%;
  226. }
  227. .app {
  228. background-color: #FFFFFF;
  229. }
  230. .app>image {
  231. width: 640upx;
  232. margin: 0 auto;
  233. display: block;
  234. margin-bottom: 26upx;
  235. }
  236. .app .entry-con {
  237. font-size: 28upx;
  238. text-align: center;
  239. }
  240. .footer-bg {
  241. background: #2D2D2D;
  242. color: #E4E4E4;
  243. padding: 25upx 15upx;
  244. text-align: center;
  245. }
  246. .footer-bg .entry-con {
  247. font-size: 24upx;
  248. text-align: center;
  249. }
  250. #weixin-tip {
  251. display: none;
  252. position: fixed;
  253. left: 0;
  254. top: 0;
  255. background: rgba(0, 0, 0, 0.8);
  256. filter: alpha(opacity=80);
  257. width: 100%;
  258. height: 100%;
  259. z-index: 100;
  260. }
  261. #weixin-tip p {
  262. text-align: center;
  263. margin-top: 75upx;
  264. padding: 0 40upx;
  265. position: relative;
  266. }
  267. #weixin-tip .close {
  268. color: #fff;
  269. padding: 5px;
  270. font: bold 20px/20px simsun;
  271. text-shadow: 0 1px 0 #ddd;
  272. position: absolute;
  273. top: 0;
  274. left: 5%;
  275. }
  276. </style>