12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- const { getQrcode } = require('../../utils/API.js')
- //Component Object
- Component({
- options: {
- multipleSlots: true
- },
- properties: {
- posterInfo: {
- type: Object,
- value: {}
- }
- },
- data: {
- actionSheetState: false
- },
- methods: {
- openActionSheet: function () {
- this.setData({
- actionSheetState: true
- })
- },
- closeActionSheet: function () {
- this.setData({
- actionSheetState: false
- })
- },
- toSharePoster: function() {
- let that = this
- let { id, scene, path, title, count, imageUrl, time } = this.data.posterInfo
- getQrcode('/user/genwxacode', {
- lottery_id: id,
- scene,
- page: path,
- is_hyaline: 1,
- width: 320
- }).then(result => {
- wx.showLoading({
- title: '生成中,请稍等',
- mask: true
- })
- wx.setStorage({
- key: 'POSTER_INFO',
- data: {
- qrcode: result.data,
- title: title + ' x ' + count,
- imageUrl,
- time
- },
- success: function() {
- wx.hideLoading()
- wx.navigateTo({
- url: '/pages/share-poster/share-poster',
- })
- }
- })
- }).catch(err => {
- wx.showToast({
- title: '生成失败:' + err.msg,
- icon: 'none'
- })
- })
- },
- joinOthers: function() {
- wx.switchTab({
- url: '/pages/index/index',
- })
- }
- }
- })
|