publishResult.vue 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  1. <template>
  2. <view class="default_page adffc" :style="{'height':h+'px', 'padding-top':mt+'px'}">
  3. <cus-header title='发布结果'></cus-header>
  4. <view class="xcx">
  5. <view class="box">
  6. <view class="box-title">{{title}}</view>
  7. <view class="box-fill">
  8. <view class="box-fill-bottom adfacjb">
  9. <view class="box-fill-bottom-left adfac">
  10. <image :src="imgBase+'publish_result_avatar.png'"></image>
  11. <text>邀请填写</text>
  12. </view>
  13. <view class="box-fill-bottom-right">进入</view>
  14. </view>
  15. </view>
  16. <view class="box-bottom adfac">
  17. <image :src="imgBase+'publish_result_xcx.png'"></image>
  18. <text>小程序</text>
  19. </view>
  20. </view>
  21. </view>
  22. <view class="share">
  23. <view class="share-title">分享到</view>
  24. <view class="share-menu adf">
  25. <view class="share-menu-pre adffcac">
  26. <button class="share-btn" open-type="share">
  27. <image :src="imgBase+'publish_result_wx.png'"></image>
  28. <text>微信好友</text>
  29. </button>
  30. </view>
  31. <view class="share-menu-pre adffcac" @click="sharePyq">
  32. <image :src="imgBase+'publish_result_pyq.png'"></image>
  33. <text>朋友圈</text>
  34. </view>
  35. <view class="share-menu-pre adffcac" @click="copyLink">
  36. <image :src="imgBase+'publish_result_copy.png'"></image>
  37. <text>复制链接</text>
  38. </view>
  39. </view>
  40. </view>
  41. </view>
  42. </template>
  43. <script>
  44. export default {
  45. data(){
  46. return {
  47. title:'',
  48. teamQuestionnaireId:''
  49. }
  50. },
  51. onShareTimeline() {
  52. const sharerId = JSON.parse(uni.getStorageSync('userInfo')).id;
  53. return {
  54. title: this.title,
  55. query: `shareUserId=${sharerId}&shareTQId=${this.teamQuestionnaireId}&from=timeline`,
  56. // imageUrl: this.$imgBase+''
  57. };
  58. },
  59. onShareAppMessage(res) {
  60. const sharerId = JSON.parse(uni.getStorageSync('userInfo'))?.id;
  61. return {
  62. title: this.title,
  63. path: `/pages/home?shareTQId=${this.teamQuestionnaireId}&shareUserId=${sharerId}`,
  64. // imageUrl: this.$imgBase+''
  65. };
  66. },
  67. onLoad(options){
  68. this.title = options.title;
  69. this.teamQuestionnaireId = options.teamQuestionnaireId;
  70. },
  71. methods:{
  72. async copyLink(){
  73. let res = await this.$api.get('/wx/getStableAccessToken');
  74. console.log(res);
  75. }
  76. }
  77. }
  78. </script>
  79. <style scoped lang="scss">
  80. .share-btn {
  81. background-color: transparent;
  82. border: none;
  83. padding: 0;
  84. margin: 0;
  85. line-height: 1;
  86. display: flex;
  87. flex-direction: column;
  88. justify-content: center;
  89. align-items: center;
  90. &::after {
  91. border: none;
  92. }
  93. }
  94. .default_page{
  95. box-sizing: border-box;
  96. .xcx{
  97. padding: 70rpx 155rpx;
  98. .box{
  99. background: #FFFFFF;
  100. border-radius: 8rpx;
  101. padding: 40rpx 24rpx 18rpx;
  102. &-title{
  103. font-family: PingFangSC, PingFang SC;
  104. font-weight: 400;
  105. font-size: 24rpx;
  106. color: #002846;
  107. line-height: 32rpx;
  108. }
  109. &-fill{
  110. margin-top: 34rpx;
  111. width: 100%;
  112. height: 322rpx;
  113. background: url('https://gitee.com/hw_0302/chuang-heng-wechat-images/raw/master/publish_result_bg1.png') no-repeat;
  114. background-size: 100% 100%;
  115. display: flex;
  116. flex-direction: column;
  117. justify-content: flex-end;
  118. padding: 0 5rpx 5rpx;
  119. &-bottom{
  120. width: 100%;
  121. height: 84rpx;
  122. background: url('https://gitee.com/hw_0302/chuang-heng-wechat-images/raw/master/publish_result_bg2.png') no-repeat;
  123. background-size: 100% 100%;
  124. padding: 13rpx 16rpx;
  125. box-sizing: border-box;
  126. &-left{
  127. image{
  128. width: 56rpx;
  129. height: 56rpx;
  130. }
  131. text{
  132. font-family: PingFangSC, PingFang SC;
  133. font-weight: 400;
  134. font-size: 24rpx;
  135. color: #002846;
  136. line-height: 33rpx;
  137. margin-left: 12rpx;
  138. }
  139. }
  140. &-right{
  141. width: 86rpx;
  142. height: 42rpx;
  143. background: #33A7A7;
  144. border-radius: 10rpx;
  145. font-family: PingFangSC, PingFang SC;
  146. font-weight: 400;
  147. font-size: 24rpx;
  148. color: #FFFFFF;
  149. line-height: 42rpx;
  150. text-align: center;
  151. letter-spacing: 2rpx;
  152. }
  153. }
  154. }
  155. &-bottom{
  156. margin-top: 16rpx;
  157. border-top: 1rpx solid #EFEFEF;
  158. padding-top: 10rpx;
  159. image{
  160. width: 24rpx;
  161. height: 24rpx;
  162. }
  163. text{
  164. font-family: PingFangSC, PingFang SC;
  165. font-weight: 400;
  166. font-size: 20rpx;
  167. color: #95A5B1;
  168. line-height: 20rpx;
  169. margin-left: 8rpx;
  170. }
  171. }
  172. }
  173. }
  174. .share{
  175. flex: 1;
  176. background: #FFFFFF;
  177. border-radius: 24rpx 24rpx 0rpx 0rpx;
  178. padding: 40rpx 30rpx;
  179. &-title{
  180. font-family: PingFang-SC, PingFang-SC;
  181. font-weight: bold;
  182. font-size: 30rpx;
  183. color: #002846;
  184. line-height: 42rpx;
  185. padding-left: 10rpx;
  186. }
  187. &-menu{
  188. flex-wrap: wrap;
  189. &-pre{
  190. width: calc(100% / 3);
  191. margin-top: 42rpx;
  192. image{
  193. width: 102rpx;
  194. height: 102rpx;
  195. }
  196. text{
  197. font-family: PingFangSC, PingFang SC;
  198. font-weight: 400;
  199. font-size: 26rpx;
  200. color: #002846;
  201. line-height: 37rpx;
  202. text-align: center;
  203. margin-top: 24rpx;
  204. }
  205. }
  206. }
  207. }
  208. }
  209. </style>