publish.vue 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  1. <template>
  2. <view class="tabPage" :style="{'min-height':h+'px', 'padding-top':mt+'px'}">
  3. <cus-header title='发布问卷' :showback="false"></cus-header>
  4. <image :style="{'top':mt+'px'}" :src="imgBase+'publish_bg.png'" mode="widthFix"></image>
  5. <div class="list">
  6. <div class="list-item adfacjb" v-for="(item,index) in list" :key="index" @click="handleTurnPage(item)">
  7. <div class="list-item-left">
  8. <div class="list-item-left-title">{{item.title}}</div>
  9. <div class="list-item-left-type">{{typeDict[item.type]||'默认版'}}</div>
  10. </div>
  11. <image class="list-item-right" :src="imgBase+'publish_arrow_right.png'"></image>
  12. </div>
  13. </div>
  14. <div class="dialog adffcacjc" v-if="buyShow">
  15. <div class="dialog-box adffcac" :class="{'zyb':type==2}">
  16. <image :src="imgBase+'new_free_close.png'" @click="buyShow=false"></image>
  17. <div class="dialog-box-list adf">
  18. <div class="dialog-box-list-item adffcac" v-for="(item,index) in buyImgList" :key="index">
  19. <image :src="item.img"></image>
  20. <text>{{item.text}}</text>
  21. </div>
  22. </div>
  23. <div class="dialog-box-btn" @click="handleBuy">立即购买</div>
  24. </div>
  25. </div>
  26. <Notice :show="noticeShow" @close="noticeShow=false" @handleKnow="handleKnow"></Notice>
  27. <Tabbar :tabbarIndex="1"></Tabbar>
  28. </view>
  29. </template>
  30. <script>
  31. import Tabbar from '@/components/CusTabbar/index.vue'
  32. import Notice from '@/components/CusNotice/index.vue'
  33. export default {
  34. components:{ Tabbar, Notice },
  35. data(){
  36. return {
  37. list:[],
  38. type:1,
  39. typeDict:{
  40. 1:'基础版',
  41. 2:'专业版',
  42. 3:'专家版'
  43. },
  44. buyShow:false,
  45. buyImgList:[
  46. {img:this.$imgBase+'buy_img1.png',text:'全球200+客户'},
  47. {img:this.$imgBase+'buy_img2.png',text:'企业正念'},
  48. {img:this.$imgBase+'buy_img3.png',text:'国际教练专业认证'},
  49. {img:this.$imgBase+'buy_img4.png',text:'4A领导力'}
  50. ],
  51. noticeShow:false,
  52. }
  53. },
  54. onLoad() {
  55. this.getList()
  56. },
  57. methods:{
  58. getList(){
  59. this.$api.get('/core/questionnaire/list').then(({data:res})=>{
  60. if(res.code!==0) return this.$showToast(res.msg)
  61. this.list = res.data
  62. })
  63. },
  64. handleTurnPage(item){
  65. this.type = item.type;
  66. // this.buyShow = true;
  67. this.noticeShow = true;
  68. },
  69. handleBuy(){
  70. uni.navigateTo({
  71. url:'/pagesPublish/rechargeCenter'
  72. })
  73. },
  74. handleKnow(){
  75. this.noticeShow = false;
  76. uni.navigateTo({
  77. url:'/pagesPublish/fillTeamInfo'
  78. })
  79. }
  80. }
  81. }
  82. </script>
  83. <style scoped lang="scss">
  84. .tabPage{
  85. padding: 0;
  86. &>image{
  87. width: 100%;
  88. position: absolute;
  89. left: 0;
  90. right: 0;
  91. }
  92. .list{
  93. margin-top: 369rpx;
  94. position: relative;
  95. padding: 0 24rpx;
  96. &-item{
  97. margin-top: 20rpx;
  98. background: #FFFFFF;
  99. border-radius: 24rpx;
  100. padding: 40rpx 30rpx;
  101. &:first-child{
  102. margin-top: 0;
  103. }
  104. &-left{
  105. width: calc(100% - 50rpx);
  106. padding-right: 30rpx;
  107. box-sizing: border-box;
  108. &-title{
  109. font-family: PingFang-SC, PingFang-SC;
  110. font-weight: bold;
  111. font-size: 30rpx;
  112. color: #002846;
  113. line-height: 42rpx;
  114. text-overflow: ellipsis;
  115. overflow: hidden;
  116. white-space: nowrap;
  117. }
  118. &-type{
  119. background: #FFEFB9;
  120. border-radius: 8rpx;
  121. margin-top: 20rpx;
  122. padding: 2rpx 13rpx;
  123. font-family: PingFangSC, PingFang SC;
  124. font-weight: 400;
  125. font-size: 24rpx;
  126. color: #335368;
  127. line-height: 33rpx;
  128. letter-spacing: 2rpx;
  129. display: inline-block;
  130. }
  131. }
  132. &-right{
  133. width: 50rpx;
  134. height: 50rpx;
  135. }
  136. }
  137. }
  138. .dialog{
  139. position: fixed;
  140. left: 0;
  141. right: 0;
  142. top: 0;
  143. bottom: 0;
  144. z-index: 1000;
  145. background: rgba(0, 0, 0, .6);
  146. &-box{
  147. width: calc(100% - 48rpx);
  148. background: url('https://gitee.com/hw_0302/chuang-heng-wechat-images/raw/master/buy_bg.png') no-repeat;
  149. background-size: 100% 100%;
  150. padding: 308rpx 30rpx 40rpx;
  151. box-sizing: border-box;
  152. position: relative;
  153. &.zyb{
  154. background: url('https://gitee.com/hw_0302/chuang-heng-wechat-images/raw/master/buy_bg_zyb.png') no-repeat;
  155. background-size: 100% 100%;
  156. }
  157. &>image{
  158. width: 48rpx;
  159. height: 48rpx;
  160. position: absolute;
  161. top: 0;
  162. right: 30rpx;
  163. }
  164. &-list{
  165. width: 100%;
  166. justify-content: space-between;
  167. &-item{
  168. width: calc(25% - 16rpx);
  169. image{
  170. width: 80rpx;
  171. height: 80rpx;
  172. }
  173. text{
  174. font-family: PingFangSC, PingFang SC;
  175. font-weight: 400;
  176. font-size: 22rpx;
  177. color: #6F4611;
  178. line-height: 30rpx;
  179. text-align: center;
  180. margin-top: 24rpx;
  181. }
  182. }
  183. }
  184. &-btn{
  185. width: calc(100% - 70rpx);
  186. height: 88rpx;
  187. background: linear-gradient( 90deg, #EBB56C 0%, #FCEAD0 100%);
  188. border-radius: 44rpx;
  189. margin-top: 27rpx;
  190. font-family: PingFang-SC, PingFang-SC;
  191. font-weight: bold;
  192. font-size: 32rpx;
  193. color: #6F4611;
  194. line-height: 88rpx;
  195. text-align: center;
  196. letter-spacing: 2rpx;
  197. }
  198. }
  199. }
  200. }
  201. </style>