Browse Source

上传

master
前端-胡立永 7 months ago
parent
commit
bbb2e7e0df
5 changed files with 24 additions and 12 deletions
  1. +1
    -1
      pages/index/center.vue
  2. +3
    -0
      pages/index/index.vue
  3. +4
    -1
      pages_order/auth/wxUserInfo.vue
  4. +15
    -9
      pages_order/components/product/submitUnitSelect.vue
  5. +1
    -1
      store/store.js

+ 1
- 1
pages/index/center.vue View File

@ -5,7 +5,7 @@
<view class="head"> <view class="head">
<view class="headImage"> <view class="headImage">
<image src="" mode=""></image>
<image :src="userInfo.headImage" mode=""></image>
</view> </view>
<view class="info"> <view class="info">
<view class="name"> <view class="name">


+ 3
- 0
pages/index/index.vue View File

@ -208,6 +208,9 @@
// //
getBindShop(){ getBindShop(){
if(!uni.getStorageSync('token')){
return
}
this.$api('bindShop', res => { this.$api('bindShop', res => {
if(res.code == 200){ if(res.code == 200){
this.bindShop = res.result this.bindShop = res.result


+ 4
- 1
pages_order/auth/wxUserInfo.vue View File

@ -74,7 +74,10 @@
return return
} }
self.$api('updateInfo', self.userInfo, res => {
self.$api('updateInfo', {
headImg : self.userInfo.headImage,
nickname : self.userInfo.nickName,
}, res => {
if (res.code == 200) { if (res.code == 200) {
uni.redirectTo({ uni.redirectTo({
url:'/pages/index/index' url:'/pages/index/index'


+ 15
- 9
pages_order/components/product/submitUnitSelect.vue View File

@ -120,6 +120,7 @@
}, },
num : 1, num : 1,
unit : {}, unit : {},
addressTotal : 0,
} }
}, },
methods: { methods: {
@ -129,6 +130,14 @@
if(!this.unit.id){ if(!this.unit.id){
this.selectUnit(this.detail.hotelGoodsSkuList[0], 0) this.selectUnit(this.detail.hotelGoodsSkuList[0], 0)
} }
//
this.$refs.addressList.getAddressList().then(res => {
this.addressTotal = res.total
if(this.addressTotal != 0){
this.address = res.records[0]
}
})
}, },
// //
close(){ close(){
@ -136,15 +145,12 @@
}, },
// //
openAddress(){ openAddress(){
//
this.$refs.addressList.getAddressList().then(res => {
if (res.total == 0) {
return uni.navigateTo({
url: '/pages_order/mine/address'
})
}
this.$refs.addressPopup.open('bottom')
})
if (this.addressTotal == 0) {
return uni.navigateTo({
url: '/pages_order/mine/address'
})
}
this.$refs.addressPopup.open('bottom')
}, },
// //
selectAddress(e){ selectAddress(e){


+ 1
- 1
store/store.js View File

@ -10,7 +10,7 @@ import Position from '@/utils/position.js'
const store = new Vuex.Store({ const store = new Vuex.Store({
state: { state: {
configList: [], //配置列表 configList: [], //配置列表
shop : true,
shop : false,
position : {//定位信息 position : {//定位信息
latitude : 0, latitude : 0,
longitude : 0, longitude : 0,


Loading…
Cancel
Save