rechargeCenter.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396
  1. <template>
  2. <view class="default_page adffc" :style="{'min-height':h+'px', 'padding-top':mt+'px'}">
  3. <cus-header title='充值中心' bgColor="transparent"></cus-header>
  4. <view class="info adfac">
  5. <view class="info-left">
  6. <image :src="avatar"></image>
  7. </view>
  8. <view class="info-right">
  9. <view class="info-right-name adfac">
  10. <view class="text">{{'龙傲天'}}</view>
  11. <view class="version">{{'基础版'}}</view>
  12. </view>
  13. <view class="info-right-tip">可用次数:基础版{{0}}次,专业版{{0}}次</view>
  14. </view>
  15. </view>
  16. <view class="box adffc">
  17. <view class="box-tab adfacjb">
  18. <view class="box-tab-pre" :class="{'active':tindex===index}"
  19. v-for="(item,index) in tabList" :key="index" @click="changeTab(index)">{{item}}</view>
  20. </view>
  21. <template v-if="tindex===0">
  22. <view class="box-price adf">
  23. <view class="box-price-pre adffcac" :class="{'active':pindex===index}"
  24. v-for="(item,index) in priceList" :key="index" @click="changePrice(item,index)">
  25. <view class="box-price-pre-once" v-if="index===0">限时优惠</view>
  26. <view class="box-price-pre-times">{{item.times}}</view>
  27. <view class="box-price-pre-money"><span>¥</span>{{item.money}}<span v-if="index===priceList.length-1">/次</span></view>
  28. <view class="box-price-pre-bottom">{{item.tip}}</view>
  29. </view>
  30. </view>
  31. <view class="box-other adfacjb" v-if="pindex===priceList.length-1">
  32. <view class="box-other-left">其他次数</view>
  33. <view class="box-other-right">
  34. <cus-number-box :min="otherTimes" :number="otherTimes" @valueChange="valueChange"></cus-number-box>
  35. </view>
  36. </view>
  37. </template>
  38. <template v-if="tindex===1">
  39. <view class="box-price adf">
  40. <view class="box-price-pre adffcac" :class="{'active':pindex===index}"
  41. v-for="(item,index) in priceList2" :key="index" @click="changePrice(item,index)">
  42. <view class="box-price-pre-once" v-if="index===0">限时优惠</view>
  43. <view class="box-price-pre-times">{{item.times}}</view>
  44. <view class="box-price-pre-money"><span>¥</span>{{item.money}}<span v-if="index===priceList2.length-1">/次</span></view>
  45. <view class="box-price-pre-bottom">{{item.tip}}</view>
  46. </view>
  47. </view>
  48. <view class="box-other adfacjb" v-if="pindex===priceList2.length-1">
  49. <view class="box-other-left">其他次数</view>
  50. <view class="box-other-right">
  51. <cus-number-box :min="otherTimes" :number="otherTimes" @valueChange="valueChange"></cus-number-box>
  52. </view>
  53. </view>
  54. </template>
  55. <template v-if="tindex<2">
  56. <view class="box-memo">
  57. <view class="box-memo-title">服务条款说明</view>
  58. <view class="box-memo-p">
  59. 1、未激活的问卷:付费后使用有效期1年,过期将不能使用。<br/>
  60. 2、已进行中问卷:创建者可以设置答题截止时间,修改时间,以支持少数用户延期做问卷。<br/>
  61. 3、其他次数不能低于10次。
  62. </view>
  63. </view>
  64. <view class="box-btn adfacjb">
  65. <view class="box-btn-left adfac">
  66. <view class="box-btn-left-text">实付</view>
  67. <view class="box-btn-left-money adfac"><span>¥</span>{{590}}<span style="margin-left: 9rpx;">/{{10}}次</span></view>
  68. </view>
  69. <view class="box-btn-right" @click="confirmBuy">确认协议并购买</view>
  70. </view>
  71. </template>
  72. <template v-else>
  73. <view class="box-empty adffcacjc">
  74. <image :src="imgBase+'recharge_empty.png'"></image>
  75. <p>专家版正在开发中</p>
  76. <text>敬请期待</text>
  77. </view>
  78. </template>
  79. </view>
  80. </view>
  81. </template>
  82. <script>
  83. import CusNumberBox from '@/components/CusNumberBox/index.vue'
  84. export default {
  85. components:{ CusNumberBox },
  86. data(){
  87. return {
  88. avatar:this.$imgBase+'avatar.png',
  89. tabList:['基础版','专业版','专家版'],
  90. tindex:0,
  91. pindex:0,
  92. priceList:[
  93. {times:'1次',money:99,tip:'首次登录赠送1次'},
  94. {times:'5次',money:395,tip:'¥79/次'},
  95. {times:'10次',money:590,tip:'¥59/次'},
  96. {times:'超过10次',money:39,tip:'超过10次,¥39/次'}
  97. ],
  98. priceList2:[
  99. {times:'1次',money:199,tip:'首次登录赠送1次'},
  100. {times:'5次',money:795,tip:'¥155/次'},
  101. {times:'10次',money:1090,tip:'¥109/次'},
  102. {times:'超过10次',money:89,tip:'超过10次,¥89/次'}
  103. ],
  104. otherTimes:11
  105. }
  106. },
  107. methods:{
  108. changeTab(index){
  109. this.tindex = index;
  110. this.pindex = 0;
  111. this.otherTimes = 11;
  112. },
  113. changePrice(item,index){
  114. this.pindex = index;
  115. },
  116. valueChange(val){
  117. this.otherTimes = val;
  118. },
  119. confirmBuy(){
  120. uni.navigateTo({
  121. url:'/pagesPublish/payResult'
  122. })
  123. }
  124. }
  125. }
  126. </script>
  127. <style scoped lang="scss">
  128. .default_page{
  129. padding: 0;
  130. background: #F9F6EE;
  131. box-sizing: border-box;
  132. .info{
  133. padding: 40rpx 36rpx 37rpx;
  134. &-left{
  135. width: 98rpx;
  136. height: 98rpx;
  137. image{
  138. width: 100%;
  139. height: 100%;
  140. }
  141. }
  142. &-right{
  143. width: calc(100% - 98rpx);
  144. padding-left: 20rpx;
  145. box-sizing: border-box;
  146. &-name{
  147. .text{
  148. font-family: PingFang-SC, PingFang-SC;
  149. font-weight: bold;
  150. font-size: 36rpx;
  151. color: #795021;
  152. line-height: 32rpx;
  153. }
  154. .version{
  155. width: 129rpx;
  156. height: 40rpx;
  157. background: url('https://gitee.com/hw_0302/chuang-heng-wechat-images/raw/master/my_version_bg.png') no-repeat;
  158. background-size: 100% 100%;
  159. padding-left: 48rpx;
  160. box-sizing: border-box;
  161. font-family: PingFang-SC, PingFang-SC;
  162. font-weight: bold;
  163. font-size: 22rpx;
  164. color: #795021;
  165. line-height: 40rpx;
  166. margin-left: 12rpx;
  167. }
  168. }
  169. &-tip{
  170. font-family: PingFangSC, PingFang SC;
  171. font-weight: 400;
  172. font-size: 26rpx;
  173. color: #667E90;
  174. line-height: 24rpx;
  175. margin-top: 22rpx;
  176. }
  177. }
  178. }
  179. .box{
  180. flex: 1;
  181. overflow-y: auto;
  182. background: #FFFFFF;
  183. border-radius: 36rpx 36rpx 3rpx 3rpx;
  184. padding: 32rpx 30rpx 60rpx;
  185. &-tab{
  186. &-pre{
  187. width: calc(100% / 3);
  188. position: relative;
  189. font-family: PingFang-SC, PingFang-SC;
  190. font-weight: bold;
  191. font-size: 32rpx;
  192. color: #667E90;
  193. line-height: 45rpx;
  194. text-align: center;
  195. &.active{
  196. font-weight: bold;
  197. color: #002846;
  198. &::after{
  199. content: '';
  200. width: 48rpx;
  201. height: 6rpx;
  202. background: #002846;
  203. border-radius: 3rpx;
  204. position: absolute;
  205. left: 50%;
  206. margin-left: -24rpx;
  207. bottom: -15rpx;
  208. }
  209. }
  210. }
  211. }
  212. &-price{
  213. margin-top: 34rpx;
  214. justify-content: space-between;
  215. flex-wrap: wrap;
  216. &-pre{
  217. width: calc(50% - 10rpx);
  218. margin-top: 16rpx;
  219. background: #FFFFFF;
  220. border-radius: 24rpx;
  221. border: 2rpx solid #FBEBCB;
  222. position: relative;
  223. &-once{
  224. width: 121rpx;
  225. height: 35rpx;
  226. background: linear-gradient( 270deg, #EF923B 0%, #EA4F27 100%);
  227. border-radius: 10rpx;
  228. font-family: PingFangSC, PingFang SC;
  229. font-weight: 400;
  230. font-size: 24rpx;
  231. color: #FFFFFF;
  232. line-height: 35rpx;
  233. text-align: center;
  234. position: absolute;
  235. left: 0;
  236. top: 0;
  237. }
  238. &-times{
  239. font-family: PingFang-SC, PingFang-SC;
  240. font-weight: bold;
  241. font-size: 30rpx;
  242. color: #002846;
  243. line-height: 30rpx;
  244. text-align: center;
  245. margin-top: 36rpx;
  246. }
  247. &-money{
  248. font-family: D-DINCondensed, D-DINCondensed;
  249. font-weight: bold;
  250. font-size: 80rpx;
  251. color: #002846;
  252. line-height: 87rpx;
  253. margin-top: 20rpx;
  254. span{
  255. font-size: 54rpx;
  256. line-height: 59rpx;
  257. }
  258. }
  259. &-bottom{
  260. width: 100%;
  261. height: 56rpx;
  262. background: #FFF3CB;
  263. border-radius: 0rpx 0rpx 24rpx 24rpx;
  264. font-family: PingFangSC, PingFang SC;
  265. font-weight: 400;
  266. font-size: 24rpx;
  267. color: #95581C;
  268. line-height: 56rpx;
  269. text-align: center;
  270. margin-top: 31rpx;
  271. }
  272. &.active{
  273. background: url('https://gitee.com/hw_0302/chuang-heng-wechat-images/raw/master/price_bg.png') no-repeat;
  274. background-size: 100% 100%;
  275. .box-price-pre-times,.box-price-pre-money{
  276. color: #955A1D;
  277. }
  278. .box-price-pre-bottom{
  279. background: url('https://gitee.com/hw_0302/chuang-heng-wechat-images/raw/master/price_bottom2.png') no-repeat;
  280. color: #795021;
  281. }
  282. }
  283. }
  284. }
  285. &-other{
  286. margin-top: 51rpx;
  287. &-left{
  288. font-family: PingFang-SC, PingFang-SC;
  289. font-weight: bold;
  290. font-size: 30rpx;
  291. color: #002846;
  292. line-height: 42rpx;
  293. }
  294. }
  295. &-memo{
  296. margin-top: 48rpx;
  297. &-title{
  298. font-family: PingFang-SC, PingFang-SC;
  299. font-weight: bold;
  300. font-size: 28rpx;
  301. color: #667E90;
  302. line-height: 40rpx;
  303. }
  304. &-p{
  305. font-family: PingFangSC, PingFang SC;
  306. font-weight: 400;
  307. font-size: 24rpx;
  308. color: #95A5B1;
  309. line-height: 40rpx;
  310. margin-top: 16rpx;
  311. }
  312. }
  313. &-btn{
  314. margin-top: 206rpx;
  315. width: 100%;
  316. height: 100rpx;
  317. background: linear-gradient(to right, #242424 0%, #575757 50%);
  318. border-radius: 24rpx;
  319. &-left{
  320. padding-left: 30rpx;
  321. &-text{
  322. font-family: PingFangSC, PingFang SC;
  323. font-weight: 400;
  324. font-size: 24rpx;
  325. color: #FFFFFF;
  326. line-height: 33rpx;
  327. }
  328. &-money{
  329. font-family: D-DINCondensed, D-DINCondensed;
  330. font-weight: bold;
  331. font-size: 48rpx;
  332. color: #FCEED2;
  333. line-height: 52rpx;
  334. margin-left: 9rpx;
  335. span{
  336. font-family: D-DINCondensed, D-DINCondensed;
  337. font-weight: bold;
  338. font-size: 24rpx;
  339. color: #FCEED2;
  340. line-height: 26rpx;
  341. }
  342. }
  343. }
  344. &-right{
  345. width: 365rpx;
  346. height: 100rpx;
  347. background: #11120F;
  348. border-radius: 24rpx;
  349. font-family: PingFang-SC, PingFang-SC;
  350. font-weight: bold;
  351. font-size: 32rpx;
  352. color: #FCEED2;
  353. line-height: 100rpx;
  354. text-align: center;
  355. letter-spacing: 2rpx;
  356. }
  357. }
  358. &-empty{
  359. flex: 1;
  360. image{
  361. width: 370rpx;
  362. height: 284rpx;
  363. }
  364. p{
  365. font-family: PingFangSC, PingFang SC;
  366. font-weight: 400;
  367. font-size: 30rpx;
  368. color: #667E90;
  369. line-height: 40rpx;
  370. text-align: center;
  371. margin-top: 21rpx;
  372. }
  373. text{
  374. font-family: PingFangSC, PingFang SC;
  375. font-weight: 400;
  376. font-size: 36rpx;
  377. color: #667E90;
  378. line-height: 40rpx;
  379. text-align: center;
  380. margin-top: 16rpx;
  381. }
  382. }
  383. }
  384. }
  385. </style>