12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- // components/component-list.js
- const { imgServer } = require('../../../utils/services.js')
- const app = getApp()
- Component({
- /**
- * 组件的属性列表
- */
- properties: {
- hasProduct: {
- type: Boolean
- },
- hasPay: {
- type: Boolean
- },
- sceneId: {
- type: String
- },
- imageUrl: {
- type: String
- },
- name: {
- type: String
- },
- pavilionName: {
- type: String
- },
- statusTextDesp: {
- type: String
- },
- distance: {
- type: String
- },
- online: Number,
- scenePv: Number,
- link: String
- },
- options: {
- addGlobalClass: true,
- },
- /**
- * 组件的初始数据
- */
- data: {
- imgServer
- },
- /**
- * 组件的方法列表
- */
- methods: {
- goBigScene: function(){
- if (this.data.hasProduct){
- app.globalData.currentUrl = this.data.link
- wx.navigateTo({
- url: `../../wv_page/index?id=${this.data.sceneId}`,
- success: function (res) { },
- fail: function (res) { },
- complete: function (res) { },
- })
- }else{
- wx.navigateTo({
- url: `/pages/zl_detail/index?id=${this.data.sceneId}`,
- success: function (res) { },
- fail: function (res) { },
- complete: function (res) { },
- })
- }
-
- }
-
- },
- ready : function(){
- console.log(this.data)
- }
- })
|