publish.vue 5.3 KB

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