material-download.vue 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <template>
  2. <view class="poster_page">
  3. <mp-swiper name="image" :list="list" @click="createPoster"></mp-swiper>
  4. </view>
  5. </template>
  6. <script>
  7. import mpSwiper from "./comps/mp-swiper.vue"
  8. export default {
  9. components: {
  10. mpSwiper
  11. },
  12. data() {
  13. return {
  14. list: [{
  15. name: '模板1',
  16. image: 'https://guosen-bucket-ldt.obs.cn-south-1.myhuaweicloud.com:443/09fd8a561be341898cf0a18676cb5543-gx8N2ZYZ1Tgfd68d224f9be781b5350604a93eb19665.png'
  17. },
  18. {
  19. name: '模板2',
  20. image: 'https://guosen-bucket-ldt.obs.cn-south-1.myhuaweicloud.com:443/78978a6eff7e405aa94ce88c2e2c5db8-sIJjjTCcbtWm8125a0b912d80d468bc514b4025468ca.png'
  21. },
  22. {
  23. name: '模板3',
  24. image: 'https://guosen-bucket-ldt.obs.cn-south-1.myhuaweicloud.com:443/ed3e1b59af934cf481fe8ec1747e1e3a-TztUhOtCZEHt83e8384035c15466d4a17cf6ee3c9519.png'
  25. },
  26. {
  27. name: '模板4',
  28. image: 'https://guosen-bucket-ldt.obs.cn-south-1.myhuaweicloud.com:443/be1bf10664ed47998752a423abae5d7f-cQkZEj7ZXbZ1662466380785e447bc1b1c3155317a95.png'
  29. }
  30. ],
  31. templateIndex:1,
  32. type:''
  33. };
  34. },
  35. onLoad(options) {
  36. this.type=options.type || ''
  37. },
  38. methods: {
  39. createPoster(index) {
  40. this.templateIndex=index + 1
  41. if (this.$isNotEmpty(this.type)) {
  42. //生成点餐码
  43. uni.navigateTo({
  44. url:"createOrderPoster?index="+this.templateIndex
  45. })
  46. return
  47. }
  48. //生成付款码
  49. uni.navigateTo({
  50. url:"createPoster?index="+this.templateIndex
  51. })
  52. },
  53. }
  54. };
  55. </script>
  56. <style lang="scss" scoped>
  57. </style>