|
@@ -85,15 +85,14 @@ export default {
|
|
|
getUserInfo.postMessage('获取用户信息')
|
|
|
// 暴露setUserInfo方法给APP
|
|
|
window['setUserInfo'] = res => {
|
|
|
- this.setUserInfo(res)
|
|
|
- console.log(res);
|
|
|
+ this.userInfo = res
|
|
|
+ this.setUserInfo()
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- setUserInfo(e) {
|
|
|
-
|
|
|
+ setUserInfo() {
|
|
|
this.prizes = []
|
|
|
- page(JSON.parse(e)).then(res => {
|
|
|
+ page(JSON.parse(this.userInfo)).then(res => {
|
|
|
if (res.data.code === 0) {
|
|
|
const j = res.data.data
|
|
|
// 可用积分
|
|
@@ -136,9 +135,7 @@ export default {
|
|
|
this.$refs.lucky.play()
|
|
|
if (this.disabled) {
|
|
|
this.disabled = false
|
|
|
- result({
|
|
|
- userId: this.userId
|
|
|
- }).then(res => {
|
|
|
+ result(JSON.parse(this.userInfo)).then(res => {
|
|
|
if (res.data.code === 0) {
|
|
|
setTimeout(() => {
|
|
|
this.$refs.lucky.stop(res.data.data.resultGoodSort - 1)
|
|
@@ -185,9 +182,8 @@ export default {
|
|
|
getSubmit() {
|
|
|
if (this.disabled) {
|
|
|
this.disabled = false
|
|
|
- receive({
|
|
|
+ receive(JSON.parse(this.userInfo), {
|
|
|
prizeId: this.form.resultGoodId,
|
|
|
- userId: this.form.userId,
|
|
|
lotteryCode: this.form.lotteryCode
|
|
|
}).then(res => {
|
|
|
if (res.data.code === 0) {
|
|
@@ -206,7 +202,7 @@ export default {
|
|
|
// 填写收货信息
|
|
|
getDetail() {
|
|
|
uni.navigateTo({
|
|
|
- url: `/pages/lottery/detail?userId=${this.userId}&prizeId=${this.form.resultGoodId}&lotteryCode=${this.form.lotteryCode}`
|
|
|
+ url: `/pages/lottery/detail?userInfo=${this.userInfo}&prizeId=${this.form.resultGoodId}&lotteryCode=${this.form.lotteryCode}`
|
|
|
})
|
|
|
}
|
|
|
}
|
|
@@ -214,10 +210,6 @@ export default {
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
-page{
|
|
|
- height: none;
|
|
|
-}
|
|
|
-
|
|
|
.app-container {
|
|
|
position: relative;
|
|
|
background: url('@/static/lottery/bg.png');
|
|
@@ -225,7 +217,6 @@ page{
|
|
|
background-repeat: no-repeat;
|
|
|
width: 100%;
|
|
|
height: 1880rpx;
|
|
|
- margin-top: 44rpx;
|
|
|
|
|
|
.nav {
|
|
|
height: 88rpx;
|