agentDetail.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. <template>
  2. <view class="page" :style="{'min-height':h+'px', 'padding-top':mt+'px'}">
  3. <cus-header title='智能体详情' bgColor="transparent"></cus-header>
  4. <!-- <div class="top adffcacjc">
  5. <image src="@/static/avatar_big.png"></image>
  6. <div class="change adfacjb">
  7. <image src="@/static/change2.png"></image>
  8. <span>更换形象</span>
  9. </div>
  10. </div> -->
  11. <div class="box b1 adfac">
  12. <text>角色昵称</text>
  13. <span>{{info.agentName||''}}</span>
  14. </div>
  15. <div class="box b2">
  16. <text>角色介绍</text>
  17. <p>{{info.systemPrompt||''}}</p>
  18. </div>
  19. <div class="box b1 adfac">
  20. <text>角色音色</text>
  21. <span>{{vname||''}}</span>
  22. </div>
  23. <div class="item adfacjb" @tap="toTurn('/pages/roleSet?id='+info.id+'&agentId='+id)">
  24. <div class="i_l adfac">
  25. <image src="@/static/user_set.png"></image>
  26. <span>配置角色</span>
  27. </div>
  28. <div class="i_r adfac">
  29. <span>编辑</span>
  30. <u-icon name="arrow-right" color="#D3D2D2" size="28rpx"></u-icon>
  31. </div>
  32. </div>
  33. <div class="item adfacjb" @tap="toTurn('/pages/device?agentId='+id)">
  34. <div class="i_l adfac">
  35. <image src="@/static/device_gl.png"></image>
  36. <span>设备管理</span>
  37. </div>
  38. <div class="i_r adfac">
  39. <span>编辑</span>
  40. <u-icon name="arrow-right" color="#D3D2D2" size="28rpx"></u-icon>
  41. </div>
  42. </div>
  43. </view>
  44. </template>
  45. <script>
  46. export default {
  47. data(){
  48. return {
  49. id:'',
  50. vname:'',
  51. info:null
  52. }
  53. },
  54. onLoad(option) {
  55. this.id = option.id;
  56. this.vname = option.vname;
  57. this.getDetail();
  58. },
  59. methods:{
  60. getDetail(){
  61. this.$api.get(`/agent/${this.id}`).then(res=>{
  62. if(res.data.code!==0) return this.$showToast(res.data.msg)
  63. this.info = res.data.data;
  64. })
  65. },
  66. toTurn(url){
  67. uni.navigateTo({
  68. url
  69. })
  70. }
  71. }
  72. }
  73. </script>
  74. <style scoped lang="less">
  75. .page{
  76. background: linear-gradient( 180deg, #E0EEFF 0%, #F6FCFF 100%);
  77. padding: 0 31rpx 40rpx;
  78. box-sizing: border-box;
  79. .top{
  80. &>image{
  81. margin-top: 20rpx;
  82. width: 200rpx;
  83. height: 233rpx;
  84. }
  85. .change{
  86. margin-top: 40rpx;
  87. width: 232rpx;
  88. height: 72rpx;
  89. background: #FFFFFF;
  90. border-radius: 36rpx;
  91. padding: 18rpx 36rpx;
  92. box-sizing: border-box;
  93. image{
  94. width: 28rpx;
  95. height: 25rpx;
  96. }
  97. span{
  98. font-family: PingFangSC, PingFang SC;
  99. font-weight: 400;
  100. font-size: 28rpx;
  101. color: #0066FE;
  102. line-height: 32rpx;
  103. }
  104. }
  105. }
  106. .box{
  107. background: #FFFFFF;
  108. border-radius: 16rpx;
  109. padding: 35rpx 34rpx;
  110. margin-top: 20rpx;
  111. &.b1{
  112. margin-top: 40rpx;
  113. }
  114. text{
  115. font-family: PingFang-SC, PingFang-SC;
  116. font-weight: bold;
  117. font-size: 30rpx;
  118. color: #111111;
  119. line-height: 32rpx;
  120. }
  121. span{
  122. font-family: PingFangSC, PingFang SC;
  123. font-weight: 400;
  124. font-size: 30rpx;
  125. color: #333333;
  126. line-height: 42rpx;
  127. margin-left: 52rpx;
  128. }
  129. p{
  130. margin-top: 30rpx;
  131. font-family: PingFangSC, PingFang SC;
  132. font-weight: 400;
  133. font-size: 30rpx;
  134. color: #616161;
  135. line-height: 56rpx;
  136. }
  137. }
  138. .item{
  139. margin-top: 20rpx;
  140. background: #FFFFFF;
  141. border-radius: 16rpx;
  142. padding: 18rpx 34rpx;
  143. .i_l{
  144. image{
  145. width: 64rpx;
  146. height: 64rpx;
  147. }
  148. span{
  149. font-family: PingFang-SC, PingFang-SC;
  150. font-weight: bold;
  151. font-size: 30rpx;
  152. color: #111111;
  153. line-height: 32rpx;
  154. margin-left: 30rpx;
  155. }
  156. }
  157. .i_r{
  158. span{
  159. font-family: PingFangSC, PingFang SC;
  160. font-weight: 400;
  161. font-size: 26rpx;
  162. color: #0066FE;
  163. line-height: 32rpx;
  164. margin-right: 14rpx;
  165. }
  166. }
  167. }
  168. }
  169. </style>