share.vue 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <template>
  2. <view class="share_div">
  3. <uv-row>
  4. <uv-col span="10" class="text" align="center">
  5. 心脑血管早期筛查,简单易得,有利无害,分享给朋友家人。
  6. </uv-col>
  7. <uv-col span="2">
  8. <view class="" @click="dosharewechat" align="center">
  9. <uv-image class="img" src="/static/image/wxfriend.png" mode="aspectFill"
  10. shape="circle" :lazy-load="true" width="50" height="50">
  11. </uv-image>
  12. <!-- <uv-icon name="share" label="分享" size="50" labelPos="bottom" color="#648EB8" labelColor="#648EB8" labelSize="18"></uv-icon> -->
  13. </view>
  14. </uv-col>
  15. </uv-row>
  16. </view>
  17. </template>
  18. <script>
  19. import {addlog} from "@/common/api/system.js"
  20. export default{
  21. data(){
  22. return {
  23. shareimg:"https://backup-1306866048.cos.ap-nanjing.myqcloud.com/workercard/20231228/658d1042e1395.jpg",
  24. }
  25. },
  26. methods:{
  27. showshare(){
  28. },
  29. dosharewechat(){
  30. this.$emit('dosharewechat', {shareimg:this.shareimg})
  31. // uni.$emit('dosharewechat',{shareimg:this.shareimg})
  32. // uni.share({
  33. // provider: "weixin",
  34. // scene: "WXSceneSession",
  35. // type: 0,
  36. // href:"testapp://",
  37. // title: "uni-app分享",
  38. // summary: "我正在使用HBuilderX开发uni-app,赶紧跟我一起来体验!",
  39. // imageUrl: this.shareimg,
  40. // success: function (res) {
  41. // addlog({
  42. // json: JSON.stringify(res),
  43. // type: 'uniapp信息'
  44. // })
  45. // console.log("success:" + JSON.stringify(res));
  46. // },
  47. // fail: function (err) {
  48. // addlog({
  49. // json: JSON.stringify(res),
  50. // type: 'uniapp错误'
  51. // })
  52. // console.log("fail:" + JSON.stringify(err));
  53. // }
  54. // })
  55. }
  56. }
  57. }
  58. </script>
  59. <style scoped>
  60. .page{
  61. overflow-y: auto;
  62. }
  63. .share_div{
  64. width: 100%;
  65. border:1rpx dotted #797979;
  66. box-sizing: border-box;
  67. padding: 1em;
  68. }
  69. .page{
  70. overflow-y: auto;
  71. }
  72. .share_div .text{
  73. font-size: 15px;
  74. align-items:center;
  75. }
  76. </style>