registerSuccess.vue 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307
  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. appid: {
  102. name: "appid",
  103. value: "__UNI__D4FE29A",
  104. }
  105. }
  106. };
  107. let getquote = await this.$http.post('/sysVersion/findPage', pageRequest);
  108. let url = getquote.data.content[0].path;
  109. if (getquote.code == '200') {
  110. window.open(url);
  111. } else {
  112. uni.showToast({
  113. title: getquote.msg,
  114. icon: 'none'
  115. });
  116. }
  117. }
  118. },
  119. downloadApp(typeId) {
  120. var btn = document.getElementById(typeId);
  121. this.weixinTip(btn);
  122. },
  123. hideDownload() {
  124. document.getElementById('weixin-tip').style.display = 'none';
  125. }
  126. }
  127. }
  128. </script>
  129. <style scoped>
  130. /*核心css*/
  131. .wxtip {
  132. background: rgba(0, 0, 0, 0.8);
  133. text-align: center;
  134. position: fixed;
  135. left: 0;
  136. top: 0;
  137. width: 100%;
  138. height: 100%;
  139. z-index: 998;
  140. display: none;
  141. }
  142. .wxtip-icon {
  143. width: 52px;
  144. height: 67px;
  145. background: url(http://caibaojian.com/d/uploads/2016/01/weixin-tip.png) no-repeat;
  146. display: block;
  147. position: absolute;
  148. right: 30px;
  149. top: 20px;
  150. }
  151. .wxtip-txt {
  152. padding-top: 107px;
  153. color: #fff;
  154. font-size: 16px;
  155. line-height: 1.5;
  156. }
  157. .pageBody {
  158. max-width: 750rpx;
  159. min-height: 100vh;
  160. background: #f5f5f5;
  161. font-family: "Arial,Helvetica,sans-serif,PingFangSC";
  162. }
  163. .info {
  164. position: relative;
  165. height: 400px;
  166. color: #fff;
  167. }
  168. .info .ok-btn {
  169. width: 130rpx;
  170. margin: 0 auto;
  171. padding-bottom: 30rpx;
  172. text-align: center;
  173. position: absolute;
  174. top: 50px;
  175. left: 0;
  176. right: 0;
  177. }
  178. .info .ok-btn image {
  179. width: 100%;
  180. }
  181. .info .entry-con {
  182. font-size: 28rpx;
  183. text-align: center;
  184. }
  185. .info .entry-hd {
  186. font-size: 50rpx;
  187. letter-spacing: 15rpx;
  188. font-weight: bold;
  189. text-align: center;
  190. }
  191. .info .info-list {
  192. margin: 40rpx 80rpx 0;
  193. list-style: none;
  194. font-size: 28rpx;
  195. text-align: center;
  196. }
  197. .info .info-list>view {
  198. padding-top: 30upx;
  199. border-bottom: 1px solid #D1EAEE;
  200. padding-bottom: 10upx;
  201. }
  202. .download {
  203. color: #4D4D4D;
  204. background-color: #FFFFFF;
  205. padding: 50upx 50upx 70upx;
  206. }
  207. .download .entry-con {
  208. font-size: 28upx;
  209. text-align: center;
  210. }
  211. .download .entry-hd {
  212. font-size: 50upx;
  213. letter-spacing: 5upx;
  214. font-weight: bold;
  215. text-align: center;
  216. }
  217. .download .download-btn {
  218. padding-top: 30upx;
  219. }
  220. .download .download-btn>view {
  221. width: 325upx;
  222. padding: 0 32.5rpx;
  223. box-sizing: border-box;
  224. display: inline-block;
  225. vertical-align: top;
  226. text-align: center;
  227. }
  228. .download .download-btn>view>image {
  229. width: 100%;
  230. }
  231. .app {
  232. background-color: #FFFFFF;
  233. }
  234. .app>image {
  235. width: 640upx;
  236. margin: 0 auto;
  237. display: block;
  238. margin-bottom: 26upx;
  239. }
  240. .app .entry-con {
  241. font-size: 28upx;
  242. text-align: center;
  243. }
  244. .footer-bg {
  245. background: #2D2D2D;
  246. color: #E4E4E4;
  247. padding: 25upx 15upx;
  248. text-align: center;
  249. }
  250. .footer-bg .entry-con {
  251. font-size: 24upx;
  252. text-align: center;
  253. }
  254. #weixin-tip {
  255. display: none;
  256. position: fixed;
  257. left: 0;
  258. top: 0;
  259. background: rgba(0, 0, 0, 0.8);
  260. filter: alpha(opacity=80);
  261. width: 100%;
  262. height: 100%;
  263. z-index: 100;
  264. }
  265. #weixin-tip p {
  266. text-align: center;
  267. margin-top: 75upx;
  268. padding: 0 40upx;
  269. position: relative;
  270. }
  271. #weixin-tip .close {
  272. color: #fff;
  273. padding: 5px;
  274. font: bold 20px/20px simsun;
  275. text-shadow: 0 1px 0 #ddd;
  276. position: absolute;
  277. top: 0;
  278. left: 5%;
  279. }
  280. </style>