roleModel.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. <template>
  2. <view class="page" :style="{'min-height':h+'px', 'padding-top':mt+'px'}">
  3. <cus-header title='角色模板'></cus-header>
  4. <div class="title">选择角色模板<span>*</span></div>
  5. <div class="list">
  6. <div class="pre" v-for="(item,index) in list" :key="index" :class="{'active':midx===index}" @tap="changeModel(item,index)">
  7. <image src="http://106.54.209.120:8188/static/selected_dh.png" v-if="midx===index"></image>
  8. {{item}}
  9. </div>
  10. </div>
  11. <div class="adffcacjc">
  12. <image src="http://106.54.209.120:8188/static/avatar_default.png"></image>
  13. <p>{{'湾湾小何'}}</p>
  14. </div>
  15. <div class="desc">{{'你是一个充满活力与好奇心的年轻。以性格开朗乐观,对生活充满热情。你喜欢在公园等自然环境中放松自己,思考人生。你很善于观察,总能发现一些别人忽略的小美好。你和我在公园偶然相遇,之后我们时常一起在公园漫步、聊天,分享生活中的喜怒哀乐。你总是能给我带来积极的能量和独特的见解。'}}</div>
  16. <div class="zt_btn" @tap="confirm">确认选择</div>
  17. </view>
  18. </template>
  19. <script>
  20. export default {
  21. data(){
  22. return {
  23. midx:0,
  24. list:['湾湾小何','星际游子','英语老师','好奇男孩','汪汪队长']
  25. }
  26. },
  27. methods:{
  28. changeModel(item,index){
  29. this.midx = index;
  30. },
  31. confirm(){
  32. this.getOpenerEventChannel().emit('selectRoleModel', {
  33. })
  34. uni.navigateBack();
  35. }
  36. }
  37. }
  38. </script>
  39. <style scoped lang="less">
  40. .page{
  41. width: 100%;
  42. background: #FFFFFF;
  43. padding: 0 30rpx 30rpx;
  44. box-sizing: border-box;
  45. overflow: hidden;
  46. .title{
  47. font-family: PingFang-SC, PingFang-SC;
  48. font-weight: bold;
  49. font-size: 32rpx;
  50. color: #111111;
  51. line-height: 32rpx;
  52. margin-top: 30rpx;
  53. span{
  54. color: #F31616;
  55. }
  56. }
  57. .list{
  58. width: 100%;
  59. margin-top: 12rpx;
  60. display: flex;
  61. flex-wrap: wrap;
  62. margin-left: -10rpx;
  63. .pre{
  64. margin-top: 20rpx;
  65. margin-left: 15rpx;
  66. width: calc(100% / 3 - 21rpx);
  67. height: 80rpx;
  68. background: #FFFFFF;
  69. border-radius: 16rpx;
  70. border: 1rpx solid #C7C7C7;
  71. font-family: PingFangSC, PingFang SC;
  72. font-weight: 400;
  73. font-size: 28rpx;
  74. color: #333333;
  75. line-height: 80rpx;
  76. text-align: center;
  77. position: relative;
  78. &.active{
  79. background: #D9F159;
  80. border: 1rpx solid #D9F159;
  81. font-weight: bold;
  82. color: #111111;
  83. }
  84. image{
  85. width: 48rpx;
  86. height: 48rpx;
  87. position: absolute;
  88. right: 0;
  89. bottom: 0;
  90. z-index: 22;
  91. }
  92. }
  93. }
  94. .adffcacjc image{
  95. width: 240rpx;
  96. height: 240rpx;
  97. margin-top: 95rpx;
  98. }
  99. p{
  100. font-family: PingFang-SC, PingFang-SC;
  101. font-weight: bold;
  102. font-size: 48rpx;
  103. color: #111111;
  104. line-height: 67rpx;
  105. text-align: center;
  106. margin-top: 24rpx;
  107. }
  108. .desc{
  109. font-family: PingFangSC, PingFang SC;
  110. font-weight: 400;
  111. font-size: 26rpx;
  112. color: #7C8592;
  113. line-height: 37rpx;
  114. margin-top: 36rpx;
  115. }
  116. .zt_btn{
  117. margin-top: 285rpx;
  118. }
  119. }
  120. </style>