MBTI人格测试 uniapp

home.vue 5.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250
  1. <template>
  2. <view class="content-bottom page-wrap">
  3. <view class="share-wrap">
  4. <button open-type="share">
  5. <view class="share-btn">邀请好友测试</view>
  6. </button>
  7. </view>
  8. <!-- MBTI职业性格测试 -->
  9. <view class="text">
  10. <view class="fk"></view>
  11. <view class="title">
  12. <text>MBTI职业性格测试</text>
  13. </view>
  14. </view>
  15. <view class="nav mt20">
  16. <view class="bus box-shadow">
  17. <view class="img">
  18. <image src="/static/imgs/mbti1.jpg"></image>
  19. </view>
  20. <view class="con">
  21. <view class="name">简洁版【28道】</view>
  22. <view class="price">免费</view>
  23. <button class="btn" type="button" @click="career">立即测试</button>
  24. </view>
  25. </view>
  26. </view>
  27. <view class="nav mt60">
  28. <view class="bus box-shadow">
  29. <view class="img">
  30. <image src="/static/imgs/mbti2.jpg"></image>
  31. </view>
  32. <view class="con">
  33. <view class="name">完整版【70道】</view>
  34. <view class="price">免费</view>
  35. <button class="btn" type="button" @click="career70">立即测试</button>
  36. </view>
  37. </view>
  38. </view>
  39. </view>
  40. </template>
  41. <script>
  42. const app = getApp();
  43. export default {
  44. components: {},
  45. data() {
  46. return {
  47. appName: app.globalData.$appInfo.appName,
  48. pageContentTop: app.globalData.pageContentTop,
  49. };
  50. },
  51. onLoad() {
  52. app.handleSetNavTitle();
  53. },
  54. onShow() {},
  55. onPullDownRefresh() {},
  56. onReachBottom() {},
  57. onShareAppMessage(res) {
  58. // 如果要自定义分享内容,可以设置shareTicket和query参数
  59. return {
  60. title: "免费MBTI人格测试bot,快来试试吧~",
  61. path: "/pages/home/home",
  62. desc: "免费MBTI人格测试bot,快来试试吧~",
  63. imageUrl: '/static/imgs/mbti1.jpg',
  64. success(res) {
  65. uni.showToast({
  66. title: "分享成功",
  67. });
  68. },
  69. fail(res) {
  70. uni.showToast({
  71. title: "分享失败",
  72. icon: "none",
  73. });
  74. },
  75. };
  76. },
  77. methods: {
  78. career(re) {
  79. uni.navigateTo({
  80. url: "/pages/career/career",
  81. });
  82. },
  83. career70(re) {
  84. uni.navigateTo({
  85. url: "/pages/career70/career70",
  86. });
  87. },
  88. Holland(re) {
  89. uni.navigateTo({
  90. url: "/pages/Holland/Holland",
  91. });
  92. },
  93. },
  94. };
  95. </script>
  96. <style lang="scss" scoped>
  97. /* MBTI职业性格测试 */
  98. .content-bottom {
  99. min-height: 100vh;
  100. background-color: #ECF0F3;
  101. }
  102. .fk {
  103. height: 80rpx;
  104. width: 16rpx;
  105. background: linear-gradient(90deg, #FF9048 0%, #fd6a68 100%);
  106. margin: 20rpx 40rpx;
  107. }
  108. .text {
  109. display: flex;
  110. color: #5c616e;
  111. flex-direction: row;
  112. /* justify-content: center;左右居中 */
  113. align-items: center;
  114. /* 上下居中 */
  115. position: relative;
  116. /* border: red solid 1rpx; */
  117. }
  118. .title {
  119. width: 100%;
  120. font-weight: bolder;
  121. font-size: 40rpx;
  122. }
  123. .bus {
  124. padding-left: 30rpx;
  125. width: 95%;
  126. height: 240rpx;
  127. display: flex;
  128. justify-content: space-around;
  129. // border: solid #f65532 2rpx;
  130. margin: auto auto 16rpx;
  131. border-radius: 12rpx;
  132. align-items: center;
  133. }
  134. .bus .img {
  135. width: 40%;
  136. height: 80%;
  137. border: rgb(138, 138, 138) solid 2rpx;
  138. }
  139. .bus .con {
  140. /* border: red solid 1rpx; */
  141. width: 60%;
  142. height: 80%;
  143. /* 相对定位 */
  144. position: relative;
  145. overflow: hidden;
  146. }
  147. .bus image {
  148. width: 100%;
  149. height: 100%;
  150. }
  151. .con .name {
  152. font-size: 32rpx;
  153. margin-top: 4rpx;
  154. font-weight: bold;
  155. padding-left: 40rpx;
  156. padding-top: 16rpx;
  157. opacity: 0.8;
  158. }
  159. .con .price {
  160. margin-top: 60rpx;
  161. font-size: 24rpx;
  162. padding-left: 40rpx;
  163. color: #fc9834;
  164. margin-bottom: 20rpx;
  165. }
  166. .con .btn {
  167. width: 36%;
  168. color: #ffffff;
  169. background: linear-gradient(90deg, #FF9048 0%, #fd6a68 100%);
  170. font-size: 24rpx;
  171. padding: 10rpx 14rpx 10rpx 14rpx;
  172. display: inline;
  173. border-radius: 20rpx;
  174. position: absolute;
  175. right: 28rpx;
  176. bottom: 24rpx;
  177. }
  178. /* 分割线 */
  179. .fgx {
  180. border: 20rpx #f2f2f2 solid;
  181. margin-top: 30rpx;
  182. }
  183. .mt20 {
  184. margin-top: 20rpx;
  185. }
  186. .mt60 {
  187. margin-top: 60rpx;
  188. }
  189. .page-wrap {
  190. .share-wrap {
  191. button::after {
  192. border: none;
  193. }
  194. button {
  195. position: relative;
  196. display: block;
  197. margin-left: auto;
  198. margin-right: auto;
  199. padding-left: 0px;
  200. padding-right: 0px;
  201. box-sizing: border-box;
  202. text-align: center;
  203. text-decoration: none;
  204. line-height: 1.35;
  205. -webkit-tap-highlight-color: transparent;
  206. overflow: hidden;
  207. color: #000;
  208. font-size: 32rpx;
  209. background-color: #fff;
  210. width: 100%;
  211. height: 100%;
  212. }
  213. .share-btn {
  214. padding: 15rpx 10rpx;
  215. background: linear-gradient(90deg, #FF9048 0%, #fd6a68 100%);
  216. color: #fff;
  217. font-weight: 600;
  218. font-size: 26rpx;
  219. position: fixed;
  220. right: 0;
  221. bottom: 20%;
  222. border-radius: 40rpx 0 0 40rpx;
  223. }
  224. }
  225. }
  226. .box-shadow {
  227. background-color: #fff;
  228. border-radius: 20px;
  229. box-shadow:
  230. inset rgba(0, 0, 0, 0.1) 0 5rpx 12rpx,
  231. inset rgba(252, 255, 255, 0.5) 0 5rpx 12rpx,
  232. rgba(0, 0, 0, 0.2) 0 5rpx 12rpx -5rpx;
  233. }
  234. </style>