1to1.vue 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. <template>
  2. <view class="ercode">
  3. <!-- <view class="image" :show-menu-by-longpress="true" @tap="previewImage">
  4. </view> -->
  5. <image src="https://mall.zhaijieshi.cc/file/wx-huawang/kfewm.png" mode="widthFix" :show-menu-by-longpress="true" @tap="previewImage"></image>
  6. </view>
  7. </template>
  8. <script>
  9. var api = require('../../config/api.js');
  10. var util = require('../../utils/util.js');
  11. var user = require('../../utils/user.js');
  12. var app = getApp();
  13. export default {
  14. data() {
  15. return {
  16. };
  17. }
  18. /**
  19. * 生命周期函数--监听页面加载
  20. */
  21. ,
  22. onLoad: function(options) {},
  23. /**
  24. * 生命周期函数--监听页面初次渲染完成
  25. */
  26. onReady: function() {},
  27. /**
  28. * 生命周期函数--监听页面显示
  29. */
  30. onShow: function() {},
  31. /**
  32. * 生命周期函数--监听页面隐藏
  33. */
  34. onHide: function() {},
  35. /**
  36. * 生命周期函数--监听页面卸载
  37. */
  38. onUnload: function() {},
  39. /**
  40. * 页面相关事件处理函数--监听用户下拉动作
  41. */
  42. onPullDownRefresh: function() {},
  43. /**
  44. * 页面上拉触底事件的处理函数
  45. */
  46. onReachBottom: function() {},
  47. /**
  48. * 用户点击右上角分享
  49. */
  50. onShareAppMessage: function() {},
  51. methods: {
  52. previewImage(e) {
  53. uni.previewImage({
  54. // 需要预览的图片链接列表
  55. urls: [],
  56. // 为当前显示图片的链接/索引值
  57. current: 'https://mall.zhaijieshi.cc/file/wx-huawang/kfewm.png',
  58. // 图片指示器样式
  59. indicator: 'default',
  60. // 是否可循环预览
  61. loop: false,
  62. // 长按图片显示操作菜单,如不填默认为保存相册
  63. // longPressActions:{
  64. // itemList:[this.l('发送给朋友'),this.l]
  65. // },
  66. success: res => {
  67. console.log('res', res);
  68. },
  69. fail: err => {
  70. console.log('err', err);
  71. }
  72. })
  73. }
  74. }
  75. };
  76. </script>
  77. <style>
  78. page {
  79. height: 100vh;
  80. background-color: #feebd7;
  81. }
  82. .ercode {
  83. width: 100vw;
  84. height: 100vh;
  85. display: flex;
  86. justify-content: center;
  87. align-items: center;
  88. }
  89. .image {
  90. background-image: url('https://mall.zhaijieshi.cc/file/wx-huawang/kfewm.png');
  91. background-size: cover;
  92. background-position: center;
  93. width: 538rpx;
  94. height: 942rpx;
  95. }
  96. </style>