contract.vue 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <template>
  2. <view class="content">
  3. <view v-for="(item,index) in content" :key="index">
  4. <scroll-view>
  5. <image :src="item" mode="widthFix" lazy-load="true"></image>
  6. </scroll-view>
  7. </view>
  8. <!-- <scroll-view> -->
  9. <!-- </scroll-view> -->
  10. </view>
  11. </template>
  12. <script>
  13. export default{
  14. data(){
  15. return{
  16. content:''
  17. }
  18. },
  19. onLoad() {
  20. this.init()
  21. },
  22. methods:{
  23. init(){
  24. uni.showLoading()
  25. let phone=uni.getStorageSync("phone")
  26. let code=uni.getStorageSync("code")
  27. uni.$u.http.post('/api/config/list',{phone,code},{
  28. custom: {
  29. auth: true
  30. }
  31. }).then((res) => {
  32. this.content=res[6].value
  33. uni.hideLoading()
  34. }).catch((err) => {
  35. uni.hideLoading()
  36. console.log( err)
  37. })
  38. }
  39. }
  40. }
  41. </script>
  42. <style lang="less">
  43. page{
  44. background-color: #FFFFFF;
  45. }
  46. .content{
  47. background-color: #fff;
  48. padding: 20rpx;
  49. // margin:0 20rpx;
  50. height: 100%;
  51. image{
  52. width: 750rpx;
  53. width: 100%;
  54. height: 100%;
  55. }
  56. .title{
  57. text-align: center;
  58. }
  59. }
  60. </style>