百富门答题小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

157 lines
2.6 KiB

3 months ago
2 months ago
3 months ago
2 months ago
3 months ago
2 months ago
3 months ago
2 months ago
3 months ago
2 months ago
3 months ago
2 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
2 months ago
3 months ago
  1. <template>
  2. <view class="page">
  3. <image :src="titleBy.image"
  4. class="page-bg"
  5. mode="aspectFill"></image>
  6. <!--
  7. <image :src="configList.img_13"
  8. class="page-bg"
  9. mode="aspectFill"></image>
  10. -->
  11. <!-- <image :src="configList.img_7"
  12. class="logo"
  13. mode="widthFix"></image> -->
  14. <!-- next1 -->
  15. <view class="content">
  16. <image src="titleBy.image"
  17. class="content-bg"
  18. mode="widthFix"></image>
  19. </view>
  20. <view class="btn-list">
  21. <view class="next-btn-2"
  22. @click="save">
  23. 保存
  24. </view>
  25. <view class="next-btn"
  26. @click="next">
  27. 下一页
  28. </view>
  29. </view>
  30. </view>
  31. </template>
  32. <script>
  33. import { mapState } from 'vuex'
  34. export default {
  35. data() {
  36. return {
  37. index : 0,
  38. }
  39. },
  40. computed : {
  41. ...mapState(['titleBy', 'configList']),
  42. },
  43. onLoad() {
  44. console.log(this.$store.state.titleBy.image);
  45. },
  46. onShow() {
  47. },
  48. methods: {
  49. next(){
  50. // uni.navigateTo({
  51. // url: '/pages/index/article'
  52. // })
  53. uni.navigateTo({
  54. url: '/pages/index/preAppoint'
  55. })
  56. },
  57. async save(){
  58. await this.$authorize('scope.writePhotosAlbum')
  59. uni.getImageInfo({
  60. src: this.titleBy.image,
  61. success: function(image) {
  62. /* 保存图片到手机相册 */
  63. uni.saveImageToPhotosAlbum({
  64. filePath: image.path,
  65. success: function() {
  66. uni.showModal({
  67. title: '保存成功',
  68. content: '图片已成功保存到相册',
  69. showCancel: false
  70. });
  71. },
  72. complete(res) {
  73. console.log(res);
  74. }
  75. });
  76. }
  77. });
  78. },
  79. }
  80. }
  81. </script>
  82. <style lang="scss" scoped>
  83. .page{
  84. .logo{
  85. width: 600rpx;
  86. margin: 150rpx 75rpx;
  87. margin-bottom: 0;
  88. }
  89. .content{
  90. position: relative;
  91. display: flex;
  92. flex-direction: column;
  93. align-items: center;
  94. justify-content: center;
  95. box-sizing: border-box;
  96. text-align: center;
  97. width: 750rpx;
  98. margin: 0 auto;
  99. margin-bottom: 50rpx;
  100. z-index: 999;
  101. .content-bg{
  102. width: 100%;
  103. top: 0;
  104. left: 0;
  105. }
  106. }
  107. }
  108. .btn-list{
  109. position: fixed;
  110. bottom: 12%;
  111. display: flex;
  112. flex-direction: column;
  113. gap: 40rpx;
  114. width: 100%;
  115. justify-content: center;
  116. align-items: center;
  117. }
  118. .next-btn{
  119. width: 400rpx;
  120. display: flex;
  121. align-items: center;
  122. justify-content: center;
  123. color: white;
  124. padding: 16rpx 90rpx;
  125. background-color: $uni-color;
  126. border-radius: 30rpx;
  127. }
  128. .next-btn-2{
  129. width: 400rpx;
  130. display: flex;
  131. align-items: center;
  132. justify-content: center;
  133. color: white;
  134. padding: 16rpx 90rpx;
  135. background-color: $uni-color-primary;
  136. border-radius: 30rpx;
  137. }
  138. .second-color{
  139. margin-top: 20rpx;
  140. }
  141. </style>