Browse Source

1111

master
guoxing 1 year ago
parent
commit
88ae90eaf9
  1. 81
      App.vue
  2. 12
      pages/cloud/optionalCard.vue
  3. 1
      pages/home/cloudCard.vue
  4. 5
      pages/home/pickUpCard.vue
  5. 8
      pages/home/recordList.vue
  6. 8
      pages/home/recordList2.vue

81
App.vue

@ -41,46 +41,47 @@
this.globalData.navInfo = navParams() this.globalData.navInfo = navParams()
let _this = this;
wx.login({ // let _this = this;
success: function(res) { // wx.login({
uni.request({ // success: function(res) {
// // uni.request({
url:_this.globalData.wxSilentLoginURL + "?wxCode=" + res.code, // //
method: "GET", // url:_this.globalData.wxSilentLoginURL + "?wxCode=" + res.code,
header: { // method: "GET",
'content-type': "application/x-www-form-urlencoded" // header: {
}, // 'content-type': "application/x-www-form-urlencoded"
data: { // },
"wxCode": res.code // data: {
}, // "wxCode": res.code
success: res => { // },
if (res.statusCode == 200) { // success: res => {
if (!res.data.success) { // if (res.statusCode == 200) {
if (res.data.code == "110") { // if (!res.data.success) {
// // if (res.data.code == "110") {
uni.reLaunch({ // //
url: '/pages/index/BindPhone?openid=' + // uni.reLaunch({
res.data.data.wxMpOpenid // url: '/pages/index/BindPhone?openid=' +
}) // res.data.data.wxMpOpenid
} else { // })
// _this.status = 'more' // } else {
} // // _this.status = 'more'
} else { // }
// // } else {
_this.globalData.sid = res.data.data.sid // //
console.log("用户sid",_this.globalData.sid) // _this.globalData.sid = res.data.data.sid
} // console.log("sid",_this.globalData.sid)
} else { // }
} // } else {
}, // }
fail: (err) => { // },
} // fail: (err) => {
}); // }
}, // });
fail: function(res) { // },
} // fail: function(res) {
}); // }
// });
}, },
onShow: function() { onShow: function() {
console.log('App Show') console.log('App Show')

12
pages/cloud/optionalCard.vue

@ -1,6 +1,7 @@
<template> <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"> <view class="top">
<NavBar ref="nav" navTitle="详情" :showIcon="true" :start-change-height="page.startHeight" <NavBar ref="nav" navTitle="详情" :showIcon="true" :start-change-height="page.startHeight"
@ -59,7 +60,8 @@
</view> </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 <view
style="display: flex;flex-direction: row;justify-content:space-between;margin-top: 5px;"> style="display: flex;flex-direction: row;justify-content:space-between;margin-top: 5px;">
@ -82,8 +84,8 @@
</view> </view>
</view> </view>
<view style="height: 200px;background: #fff; "></view> <view style="height: 200px;background: #fff; "></view>
@ -221,6 +223,8 @@
item.price = Number(item.goodsNumber * item.jprice * item.weight).toFixed(2) item.price = Number(item.goodsNumber * item.jprice * item.weight).toFixed(2)
else
item.price = "0"
}, },
getweight() { getweight() {

1
pages/home/cloudCard.vue

@ -191,6 +191,7 @@
uni.navigateTo({ uni.navigateTo({
url: '/pages/cloud/optionalCard' url: '/pages/cloud/optionalCard'
}) })
} }
} }

5
pages/home/pickUpCard.vue

@ -25,7 +25,7 @@
<!-- <view <!-- <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;"> --> 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" <view v-for="(item,index) in data" :key="index"
style="display: flex;flex-direction: column;align-items: center;margin-top: 14px; " 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.startHeight = info.windowWidth * 0.6
this.page.endHeight = info.windowWidth * 0.8 this.page.endHeight = info.windowWidth * 0.8
}, },
onShow() {
this.$refs.paging.reload(true);
},
onUnload() { onUnload() {
uni.$off('order'); uni.$off('order');
}, },

8
pages/home/recordList.vue

@ -187,10 +187,10 @@
} }
}, },
created() { created() {
this.$bus.$on('order', msg => { // this.$bus.$on('order', msg => {
console.log("aaaaaaaaaaa4", msg) // console.log("aaaaaaaaaaa4", msg)
this.$refs.paging.reload(true); // this.$refs.paging.reload(true);
}); // });
this.$bus.$on('order2', msg => { this.$bus.$on('order2', msg => {
console.log("aaaaaaaaaaa4", msg) console.log("aaaaaaaaaaa4", msg)
this.$refs.paging.reload(true); this.$refs.paging.reload(true);

8
pages/home/recordList2.vue

@ -188,10 +188,10 @@
} }
}, },
created() { created() {
this.$bus.$on('order', msg => { // this.$bus.$on('order', msg => {
console.log("aaaaaaaaaaa4", msg) // console.log("aaaaaaaaaaa4", msg)
this.$refs.paging.reload(true); // this.$refs.paging.reload(true);
}); // });
this.$bus.$on('order2', msg => { this.$bus.$on('order2', msg => {
console.log("aaaaaaaaaaa4", msg) console.log("aaaaaaaaaaa4", msg)
this.$refs.paging.reload(true); this.$refs.paging.reload(true);

Loading…
Cancel
Save