1111
This commit is contained in:
81
App.vue
81
App.vue
@@ -41,46 +41,47 @@
|
||||
|
||||
|
||||
this.globalData.navInfo = navParams()
|
||||
let _this = this;
|
||||
wx.login({
|
||||
success: function(res) {
|
||||
uni.request({
|
||||
// 组装请求地址
|
||||
url:_this.globalData.wxSilentLoginURL + "?wxCode=" + res.code,
|
||||
method: "GET",
|
||||
header: {
|
||||
'content-type': "application/x-www-form-urlencoded"
|
||||
},
|
||||
data: {
|
||||
"wxCode": res.code
|
||||
},
|
||||
success: res => {
|
||||
if (res.statusCode == 200) {
|
||||
if (!res.data.success) {
|
||||
if (res.data.code == "110") {
|
||||
// 需要绑定手机号
|
||||
uni.reLaunch({
|
||||
url: '/pages/index/BindPhone?openid=' +
|
||||
res.data.data.wxMpOpenid
|
||||
})
|
||||
} else {
|
||||
// _this.status = 'more'
|
||||
}
|
||||
} else {
|
||||
// 成功后跳转主页
|
||||
_this.globalData.sid = res.data.data.sid
|
||||
console.log("用户sid",_this.globalData.sid)
|
||||
}
|
||||
} else {
|
||||
}
|
||||
},
|
||||
fail: (err) => {
|
||||
}
|
||||
});
|
||||
},
|
||||
fail: function(res) {
|
||||
}
|
||||
});
|
||||
|
||||
// let _this = this;
|
||||
// wx.login({
|
||||
// success: function(res) {
|
||||
// uni.request({
|
||||
// // 组装请求地址
|
||||
// url:_this.globalData.wxSilentLoginURL + "?wxCode=" + res.code,
|
||||
// method: "GET",
|
||||
// header: {
|
||||
// 'content-type': "application/x-www-form-urlencoded"
|
||||
// },
|
||||
// data: {
|
||||
// "wxCode": res.code
|
||||
// },
|
||||
// success: res => {
|
||||
// if (res.statusCode == 200) {
|
||||
// if (!res.data.success) {
|
||||
// if (res.data.code == "110") {
|
||||
// // 需要绑定手机号
|
||||
// uni.reLaunch({
|
||||
// url: '/pages/index/BindPhone?openid=' +
|
||||
// res.data.data.wxMpOpenid
|
||||
// })
|
||||
// } else {
|
||||
// // _this.status = 'more'
|
||||
// }
|
||||
// } else {
|
||||
// // 成功后跳转主页
|
||||
// _this.globalData.sid = res.data.data.sid
|
||||
// console.log("用户sid",_this.globalData.sid)
|
||||
// }
|
||||
// } else {
|
||||
// }
|
||||
// },
|
||||
// fail: (err) => {
|
||||
// }
|
||||
// });
|
||||
// },
|
||||
// fail: function(res) {
|
||||
// }
|
||||
// });
|
||||
},
|
||||
onShow: function() {
|
||||
console.log('App Show')
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<template>
|
||||
|
||||
<view style="display: flex;flex-direction: column; height: 100vh;box-sizing: border-box; background-color: #fff;" id="page">
|
||||
<view style="display: flex;flex-direction: column; height: 100vh;box-sizing: border-box; background-color: #fff;"
|
||||
id="page">
|
||||
|
||||
<view class="top">
|
||||
<NavBar ref="nav" navTitle="详情" :showIcon="true" :start-change-height="page.startHeight"
|
||||
@@ -59,7 +60,8 @@
|
||||
</view>
|
||||
|
||||
|
||||
<text style="color: #AEAEAE;font-size: 14px;margin-top: 5px;line-height: 20px;">{{item.remark}}</text>
|
||||
<text
|
||||
style="color: #AEAEAE;font-size: 14px;margin-top: 5px;line-height: 20px;">{{item.remark}}</text>
|
||||
|
||||
<view
|
||||
style="display: flex;flex-direction: row;justify-content:space-between;margin-top: 5px;">
|
||||
@@ -82,8 +84,8 @@
|
||||
|
||||
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</view>
|
||||
<view style="height: 200px;background: #fff; "></view>
|
||||
@@ -221,6 +223,8 @@
|
||||
|
||||
item.price = Number(item.goodsNumber * item.jprice * item.weight).toFixed(2)
|
||||
|
||||
else
|
||||
item.price = "0"
|
||||
},
|
||||
getweight() {
|
||||
|
||||
|
||||
@@ -191,6 +191,7 @@
|
||||
uni.navigateTo({
|
||||
url: '/pages/cloud/optionalCard'
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
<!-- <view
|
||||
style="display: flex;flex-direction: column;background: #f0f; height: auto; border-top-left-radius: 25px;border-top-right-radius: 25px;margin-top: -9.1vw;"> -->
|
||||
<z-paging ref="paging" v-model="data" :pagingStyle='styleObject' @query="queryList" :refresher-enabled="true">
|
||||
<z-paging ref="paging" v-model="data" :pagingStyle='styleObject' @query="queryList" :refresher-enabled="true" :auto="false">
|
||||
|
||||
<view v-for="(item,index) in data" :key="index"
|
||||
style="display: flex;flex-direction: column;align-items: center;margin-top: 14px; "
|
||||
@@ -298,6 +298,9 @@
|
||||
this.page.startHeight = info.windowWidth * 0.6
|
||||
this.page.endHeight = info.windowWidth * 0.8
|
||||
},
|
||||
onShow() {
|
||||
this.$refs.paging.reload(true);
|
||||
},
|
||||
onUnload() {
|
||||
uni.$off('order');
|
||||
},
|
||||
|
||||
@@ -187,10 +187,10 @@
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.$bus.$on('order', msg => {
|
||||
console.log("aaaaaaaaaaa4", msg)
|
||||
this.$refs.paging.reload(true);
|
||||
});
|
||||
// this.$bus.$on('order', msg => {
|
||||
// console.log("aaaaaaaaaaa4", msg)
|
||||
// this.$refs.paging.reload(true);
|
||||
// });
|
||||
this.$bus.$on('order2', msg => {
|
||||
console.log("aaaaaaaaaaa4", msg)
|
||||
this.$refs.paging.reload(true);
|
||||
|
||||
@@ -188,10 +188,10 @@
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.$bus.$on('order', msg => {
|
||||
console.log("aaaaaaaaaaa4", msg)
|
||||
this.$refs.paging.reload(true);
|
||||
});
|
||||
// this.$bus.$on('order', msg => {
|
||||
// console.log("aaaaaaaaaaa4", msg)
|
||||
// this.$refs.paging.reload(true);
|
||||
// });
|
||||
this.$bus.$on('order2', msg => {
|
||||
console.log("aaaaaaaaaaa4", msg)
|
||||
this.$refs.paging.reload(true);
|
||||
|
||||
Reference in New Issue
Block a user