|
@@ -1,4 +1,5 @@
|
|
|
-const io = require('./socket.io-mp')
|
|
|
+// const io = require('./socket.io-mp');
|
|
|
+const { io } = require('./socket.io-v4');
|
|
|
var user = require('./services/user.js');
|
|
|
const api = require('/config/api.js');
|
|
|
const util = require('/utils/util.js');
|
|
@@ -73,7 +74,7 @@ export default {
|
|
|
}else
|
|
|
{
|
|
|
// hostUrl = 'https://zfb.4dkankan.com/shop-container/'
|
|
|
- hostUrl = remote.viewHost+'/shop-container/'
|
|
|
+ hostUrl = remote.viewHost + '/shop-container/'
|
|
|
}
|
|
|
// let base = remote.viewHost + '/shop-container/fashilong.html?env=' + remote.env + '&sponsor=' + sponsor + '&many=' + this.data.many
|
|
|
let base = hostUrl + 'fashilong.html?time=' + Date.now() + '&env=' + remote.env + '&sponsor=' + sponsor + '&many=' + this.data.many
|
|
@@ -289,12 +290,14 @@ export default {
|
|
|
options = await this.getSocketOptions(sceneId, roomId)
|
|
|
}
|
|
|
|
|
|
- console.log('小程序参数', options)
|
|
|
+ console.log('小程序参数', options);
|
|
|
+
|
|
|
let socket = io(remote.socketHost, {
|
|
|
path: '/fsl-node',
|
|
|
query: {
|
|
|
...options,
|
|
|
- isClient: true
|
|
|
+ isClient: true,
|
|
|
+ from : 1
|
|
|
}
|
|
|
})
|
|
|
|
|
@@ -921,14 +924,16 @@ export default {
|
|
|
|
|
|
async getCouponList(id) {
|
|
|
const success = (res) => {
|
|
|
+
|
|
|
this.setData({
|
|
|
- coupons: res.data.list.map(item => {
|
|
|
+ coupons: (res.data && res.data.message.list) ? res.data.message.list.map(item => {
|
|
|
item.typeMoney = item.typeMoney.toString()
|
|
|
item.fontSize = item.typeMoney.length === 3 ? '90rpx' :
|
|
|
item.typeMoney.length === 4 ? '70rpx' : '130rpx'
|
|
|
return item
|
|
|
- })
|
|
|
+ }):[]
|
|
|
})
|
|
|
+
|
|
|
|
|
|
this.loadConponSuccess = true
|
|
|
this.readySendCouponCtrl()
|