|
@@ -16,8 +16,8 @@ Page({
|
|
loadUrl: false,
|
|
loadUrl: false,
|
|
goodsCount: 0,
|
|
goodsCount: 0,
|
|
canIUse: wx.canIUse('button.open-type.getUserInfo'),
|
|
canIUse: wx.canIUse('button.open-type.getUserInfo'),
|
|
- rnd:'',
|
|
|
|
- temp:'',
|
|
|
|
|
|
+ rnd: '',
|
|
|
|
+ temp: '',
|
|
live_base_url: 'rtmp://120.24.85.77:1935/hls',
|
|
live_base_url: 'rtmp://120.24.85.77:1935/hls',
|
|
peopleCount: 5,
|
|
peopleCount: 5,
|
|
surplus: 5
|
|
surplus: 5
|
|
@@ -31,7 +31,7 @@ Page({
|
|
onLoad: async function (options) {
|
|
onLoad: async function (options) {
|
|
getApp().checkNetStatu();
|
|
getApp().checkNetStatu();
|
|
|
|
|
|
-
|
|
|
|
|
|
+
|
|
// setTimeout(() => this.login(), 3000)
|
|
// setTimeout(() => this.login(), 3000)
|
|
this.setData({
|
|
this.setData({
|
|
join: false,
|
|
join: false,
|
|
@@ -56,7 +56,7 @@ Page({
|
|
page: 1,
|
|
page: 1,
|
|
size: 1000
|
|
size: 1000
|
|
})
|
|
})
|
|
-
|
|
|
|
|
|
+
|
|
// console.log(options)
|
|
// console.log(options)
|
|
// options.id = '1046098'
|
|
// options.id = '1046098'
|
|
|
|
|
|
@@ -81,17 +81,37 @@ Page({
|
|
async init() {
|
|
async init() {
|
|
let options = this.options
|
|
let options = this.options
|
|
|
|
|
|
- let {url: base, obj: m } = await new Promise(r => this.getBrandDetail(options.id, (url, obj) => r({url, obj})))
|
|
|
|
|
|
+ let {
|
|
|
|
+ url: base,
|
|
|
|
+ obj: m
|
|
|
|
+ } = await new Promise(r => this.getBrandDetail(options.id, (url, obj) => r({
|
|
|
|
+ url,
|
|
|
|
+ obj
|
|
|
|
+ })))
|
|
|
|
|
|
this.getBrand(options.id, m)
|
|
this.getBrand(options.id, m)
|
|
this.mcode = m
|
|
this.mcode = m
|
|
- let socketOptions = await this.socketStart({sceneId: this.mcode, roomId: options.roomId})
|
|
|
|
|
|
+ let socketOptions = await this.socketStart({
|
|
|
|
+ sceneId: this.mcode,
|
|
|
|
+ roomId: options.roomId
|
|
|
|
+ })
|
|
let url = this.getUrl(base, socketOptions, this.data.join) + this.urlPj
|
|
let url = this.getUrl(base, socketOptions, this.data.join) + this.urlPj
|
|
|
|
|
|
this.base = base
|
|
this.base = base
|
|
|
|
|
|
- this.setData({urlTemp: url.split('').join(' ')})
|
|
|
|
- this.setData({ url, loadUrl: true, socketOptions, reload: true, hideWebView: false })
|
|
|
|
|
|
+ this.setData({
|
|
|
|
+ urlTemp: url.split('').join(' ')
|
|
|
|
+ })
|
|
|
|
+ socketOptions.nickname = socketOptions.nickname.replace(/[^\u4E00-\u9FA5A-Za-z0-9]/g, '')
|
|
|
|
+ console.error(socketOptions)
|
|
|
|
+
|
|
|
|
+ this.setData({
|
|
|
|
+ url,
|
|
|
|
+ loadUrl: true,
|
|
|
|
+ socketOptions,
|
|
|
|
+ reload: true,
|
|
|
|
+ hideWebView: false
|
|
|
|
+ })
|
|
this.recorderManager = wx.getRecorderManager()
|
|
this.recorderManager = wx.getRecorderManager()
|
|
|
|
|
|
this.brandId = options.id
|
|
this.brandId = options.id
|
|
@@ -100,20 +120,28 @@ Page({
|
|
},
|
|
},
|
|
|
|
|
|
hideInvitation() {
|
|
hideInvitation() {
|
|
- this.setData({ showInvitation: false })
|
|
|
|
|
|
+ this.setData({
|
|
|
|
+ showInvitation: false
|
|
|
|
+ })
|
|
this.exit()
|
|
this.exit()
|
|
},
|
|
},
|
|
|
|
|
|
hideGuide() {
|
|
hideGuide() {
|
|
- this.setData({ showGuide: false })
|
|
|
|
|
|
+ this.setData({
|
|
|
|
+ showGuide: false
|
|
|
|
+ })
|
|
},
|
|
},
|
|
|
|
|
|
hideEnd() {
|
|
hideEnd() {
|
|
- this.setData({ showEnd: false })
|
|
|
|
|
|
+ this.setData({
|
|
|
|
+ showEnd: false
|
|
|
|
+ })
|
|
},
|
|
},
|
|
|
|
|
|
hideAlert() {
|
|
hideAlert() {
|
|
- this.setData({ showAlert: false })
|
|
|
|
|
|
+ this.setData({
|
|
|
|
+ showAlert: false
|
|
|
|
+ })
|
|
},
|
|
},
|
|
|
|
|
|
// exit() {
|
|
// exit() {
|
|
@@ -121,23 +149,27 @@ Page({
|
|
// this.socketStop && this.socketStop()
|
|
// this.socketStop && this.socketStop()
|
|
// wx.navigateBack()
|
|
// wx.navigateBack()
|
|
// },
|
|
// },
|
|
-
|
|
|
|
|
|
+
|
|
hidePacked() {
|
|
hidePacked() {
|
|
- this.setData({ showPacked: false })
|
|
|
|
|
|
+ this.setData({
|
|
|
|
+ showPacked: false
|
|
|
|
+ })
|
|
},
|
|
},
|
|
-
|
|
|
|
|
|
+
|
|
hideIsEnd() {
|
|
hideIsEnd() {
|
|
- this.setData({ showIsEnd: false })
|
|
|
|
|
|
+ this.setData({
|
|
|
|
+ showIsEnd: false
|
|
|
|
+ })
|
|
},
|
|
},
|
|
|
|
|
|
/**
|
|
/**
|
|
* 生命周期函数--监听页面初次渲染完成
|
|
* 生命周期函数--监听页面初次渲染完成
|
|
*/
|
|
*/
|
|
onReady: function () {
|
|
onReady: function () {
|
|
-
|
|
|
|
|
|
+
|
|
},
|
|
},
|
|
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -146,11 +178,11 @@ Page({
|
|
onShow: async function () {
|
|
onShow: async function () {
|
|
getApp().updateCardCount()
|
|
getApp().updateCardCount()
|
|
|
|
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+
|
|
// this.options.join = true
|
|
// this.options.join = true
|
|
// this.getCartList()
|
|
// this.getCartList()
|
|
-
|
|
|
|
|
|
+
|
|
let userInfo = wx.getStorageSync('userInfo');
|
|
let userInfo = wx.getStorageSync('userInfo');
|
|
let token = wx.getStorageSync('token');
|
|
let token = wx.getStorageSync('token');
|
|
|
|
|
|
@@ -180,7 +212,9 @@ Page({
|
|
webviewUrl: null
|
|
webviewUrl: null
|
|
})
|
|
})
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
- this.setData({ hideWebView: false })
|
|
|
|
|
|
+ this.setData({
|
|
|
|
+ hideWebView: false
|
|
|
|
+ })
|
|
this.init()
|
|
this.init()
|
|
}, 500)
|
|
}, 500)
|
|
} else {
|
|
} else {
|
|
@@ -205,7 +239,7 @@ Page({
|
|
getApp().onPullDownRefresh()
|
|
getApp().onPullDownRefresh()
|
|
},
|
|
},
|
|
|
|
|
|
-
|
|
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 页面上拉触底事件的处理函数
|
|
* 页面上拉触底事件的处理函数
|
|
*/
|
|
*/
|