问星数据小程序

mine.vue 7.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308
  1. <template>
  2. <view>
  3. <view class="mine">
  4. <view class="userInfo">
  5. <view class="headImg">
  6. <image src="/static/img/userHeader.png" mode="widthFix"></image>
  7. </view>
  8. </view>
  9. <view class="business">
  10. <view class="business_item" @click="openWxApplet">
  11. <image src="/static/img/mine_renling.png" mode="widthFix"></image>
  12. <text>我的视频号</text>
  13. </view>
  14. <view class="business_item" @click="openWxApplet">
  15. <image src="/static/img/guanzhu@2x.png" mode="widthFix"></image>
  16. <text>收藏的视频号</text>
  17. </view>
  18. <view class="business_item" @click="openWxApplet">
  19. <image src="/static/img/news.png" mode="widthFix"></image>
  20. <text>消息订阅</text>
  21. </view>
  22. </view>
  23. <view class="list">
  24. <view class="item" @click="openWxApplet">
  25. <image mode="widthFix" class="icon" src="/static/img/followVideo2.png"></image>
  26. <view class="right">
  27. <text>收藏的视频</text>
  28. <image class="back" mode="widthFix" src="/static/img/jt_right.png"></image>
  29. </view>
  30. </view>
  31. <view class="item" @click="openPage">
  32. <image mode="widthFix" class="icon" src="/static/img/invite_iocn.png"></image>
  33. <view class="right">
  34. <text>视频号冷启动</text>
  35. <image class="back" mode="widthFix" src="/static/img/jt_right.png"></image>
  36. </view>
  37. </view>
  38. <view class="item" @click="interchangeFlag=true">
  39. <image mode="widthFix" class="icon" src="/static/img/mine_qun2.png"></image>
  40. <view class="right">
  41. <text>官方交流群</text>
  42. <image class="back" mode="widthFix" src="/static/img/jt_right.png"></image>
  43. </view>
  44. </view>
  45. <view class="item" @click="wxSubscriptionFlag=true">
  46. <image mode="widthFix" class="icon" src="/static/img/mine_gzh2.png"></image>
  47. <view class="right">
  48. <text>关注公众号</text>
  49. <image class="back" mode="widthFix" src="/static/img/jt_right.png"></image>
  50. </view>
  51. </view>
  52. </view>
  53. </view>
  54. <image src="/static/img/mine_bg_pc.png" mode="widthFix" class="mine_bg_pc"></image>
  55. <view class="pc_hint">PC端体验更佳</view>
  56. <view class="pc_http">
  57. sph.wenxingshuju.com
  58. </view>
  59. <view class="copyButton" @click="copyCon">复制网址</view>
  60. <tab-bar :current='4'></tab-bar>
  61. <interchange v-if="interchangeFlag" @closeMask="interchangeFlag=false"></interchange>
  62. <applet-mask v-if="appletMaskFlag" @closeMask='appletMaskFlag=false'></applet-mask>
  63. <wxSubscription v-if="wxSubscriptionFlag" @closeMask='wxSubscriptionFlag=false'></wxSubscription>
  64. </view>
  65. </template>
  66. <script>
  67. import { setClipboardData } from 'uni-clipboard'
  68. export default {
  69. data() {
  70. return {
  71. interchangeFlag:false,
  72. appletMaskFlag:false,
  73. wxSubscriptionFlag:false
  74. }
  75. },
  76. methods: {
  77. copyCon(){
  78. // var sUserAgent = navigator.userAgent.toLowerCase();
  79. // if(sUserAgent.indexOf("baidu") > 0 || sUserAgent.indexOf("ucbrowser") > 0 ) {
  80. setClipboardData('https://sph.wenxingshuju.com').then((res)=>{
  81. uni.showToast({
  82. title: '复制成功'
  83. })
  84. })
  85. // }else{
  86. // location.href = 'weixin://dl/business/?t=o3aIVwrmPmt'
  87. // }
  88. },
  89. openPage(){
  90. uni.navigateTo({
  91. url:'/pages/extension/extension'
  92. })
  93. },
  94. openWxApplet(){
  95. var sUserAgent = navigator.userAgent.toLowerCase();
  96. if(sUserAgent.indexOf("baidu") > 0 || sUserAgent.indexOf("ucbrowser") > 0 ) {
  97. this.$burialPoint({project_name:'小程序版h5',button_name:'点击打开弹框',key_value:uni.getStorageSync('key')?uni.getStorageSync('key'):'',page_name:'我的页面',url_value:window.location.href})
  98. _hmt?_hmt.push(['_trackEvent','小程序版h5', '点击打开弹框', uni.getStorageSync('key'),'']):'';
  99. this.appletMaskFlag = true;
  100. }else{
  101. if (!navigator.userAgent.toLowerCase().match(/micromessenger/i)) {
  102. this.$burialPoint({project_name:'小程序版h5',button_name:'页面按钮直接打开微信',key_value:uni.getStorageSync('key')?uni.getStorageSync('key'):'',page_name:'我的页面',url_value:window.location.href})
  103. _hmt?_hmt.push(['_trackEvent','小程序版h5', '页面按钮直接打开微信', uni.getStorageSync('key'),'']):'';
  104. location.href = 'weixin://dl/business/?t=p79W84aUqrm'
  105. }else{
  106. this.$burialPoint({project_name:'小程序版h5',button_name:'微信端-点击打开弹框',key_value:uni.getStorageSync('key')?uni.getStorageSync('key'):'',page_name:'我的页面',url_value:window.location.href})
  107. _hmt?_hmt.push(['_trackEvent','小程序版h5', '微信端-点击打开弹框', uni.getStorageSync('key'),'']):'';
  108. this.appletMaskFlag = true;
  109. }
  110. }
  111. }
  112. }
  113. }
  114. </script>
  115. <style>
  116. /* pages/mine/mine.wxss */
  117. page {
  118. background: #F3F3F3;
  119. padding-bottom: 80rpx;
  120. }
  121. .mine {
  122. overflow: hidden;
  123. display: flex;
  124. flex-direction: column;
  125. }
  126. .userInfo {
  127. padding:50rpx 0;
  128. padding-left: 16rpx;
  129. padding-bottom: 50rpx;
  130. border-bottom: 2rpx solid rgba(137,137,156,.5);
  131. background: #2562FF;
  132. }
  133. .headImg {
  134. display: block;
  135. width: 135rpx;
  136. height: 135rpx;
  137. border-radius: 50%;
  138. overflow: hidden;
  139. margin: auto;
  140. background: #fff;
  141. }
  142. .headImg image{
  143. width: 100%;
  144. height: 100%;
  145. }
  146. .head {
  147. display: block;
  148. width: 135rpx!important;
  149. height: 135rpx!important;
  150. margin: auto;
  151. }
  152. .name {
  153. display: block;
  154. color: #fff;
  155. margin: 14rpx auto;
  156. font-size: 28rpx;
  157. font-weight: bold;
  158. line-height: 40rpx;
  159. text-align: center;
  160. width: 300rpx;
  161. overflow: hidden;
  162. text-overflow: ellipsis;
  163. white-space: nowrap;
  164. }
  165. .item {
  166. padding: 30rpx 40rpx;
  167. margin: 20rpx 0 ;
  168. background: #fff;
  169. display: flex;
  170. justify-content: space-between;
  171. align-items: center;
  172. }
  173. .right {
  174. flex: 1;
  175. display: flex;
  176. align-items: center;
  177. justify-content: space-between;
  178. color: #101426;
  179. font-size: 30rpx;
  180. padding-left: 32rpx;
  181. }
  182. .icon {
  183. width: 46rpx;
  184. height: auto;
  185. }
  186. .back {
  187. width: 14rpx;
  188. height: auto;
  189. }
  190. .mine_bg_pc{
  191. width: 222rpx;
  192. height: 178rpx;
  193. margin: auto;
  194. display: block;
  195. }
  196. .pc_http{
  197. width: 420rpx;
  198. height: 52rpx;
  199. background: #EAEDFA;
  200. border-radius: 6rpx;
  201. color: #101426;
  202. font-size: 24rpx;
  203. line-height: 52rpx;
  204. margin: auto;
  205. overflow: hidden;
  206. margin-top: 26rpx;
  207. text-align: center;
  208. }
  209. .pc_http .copy{
  210. width: 118rpx;
  211. height: 52rpx;
  212. background: #2662FF;
  213. color: #ffffff;
  214. font-size: 24rpx;
  215. line-height: 52rpx;
  216. text-align: center;
  217. }
  218. .pc_hint{
  219. color: #4A4A5F;
  220. font-size: 24rpx;
  221. line-height: 34rpx;
  222. text-align: center;
  223. }
  224. .authorizeContent .title{
  225. text-align: center;
  226. font-size: 34rpx;
  227. line-height: 40rpx;
  228. padding-top: 43rpx;
  229. }
  230. .authorizeContent .evmCantiner{
  231. margin-top: 40rpx;
  232. }
  233. .authorizeContent .evmCantiner .evm{
  234. width: 400rpx;
  235. height: 400rpx;
  236. display: block;
  237. margin: auto;
  238. }
  239. .authorizeContent .claimEvmHint{
  240. font-size: 26rpx;
  241. color: #666;
  242. text-align: center;
  243. }
  244. .buttons{
  245. display: flex;
  246. align-items: center;
  247. justify-content: space-around;
  248. margin-top: 40rpx;
  249. }
  250. .buttons .button{
  251. color: #2662FF;
  252. border: 1px solid #2662FF;
  253. font-size: 24rpx;
  254. border-radius: 60rpx;
  255. line-height: 60rpx;
  256. width: 200rpx;
  257. text-align: center;
  258. }
  259. .buttons .buttonyes{
  260. color: #ffffff;
  261. background: #2662FF;
  262. }
  263. .business{
  264. background: #FFFFFF;
  265. width: 100%;
  266. border-radius: 40rpx;
  267. margin-top: -30rpx;
  268. display: flex;
  269. align-items: center;
  270. padding: 48rpx;
  271. box-sizing: border-box;
  272. }
  273. .business .business_item{
  274. width: 33.3%;
  275. text-align: center;
  276. background: transparent;
  277. padding: 0;
  278. line-height: initial;
  279. }
  280. .business .business_item image{
  281. width: 60rpx;
  282. height: 60rpx;
  283. display: block;
  284. margin: auto;
  285. margin-bottom: 26rpx;
  286. }
  287. .business .business_item text{
  288. color: #101426;
  289. font-size: 28rpx;
  290. line-height: 40rpx;
  291. }
  292. .copyButton{
  293. color: #ffffff;
  294. background: #2662FF;
  295. font-size: 24rpx;
  296. border-radius: 60rpx;
  297. line-height: 60rpx;
  298. width: 200rpx;
  299. text-align: center;
  300. margin: auto;
  301. margin-top: 30rpx;
  302. margin-bottom: 130rpx;
  303. }
  304. </style>