Commit ee7f6c0c authored by 李超鹏's avatar 李超鹏

Merge remote-tracking branch 'origin/master'

parents 0de042c4 406adb42
...@@ -16,11 +16,11 @@ const install = (Vue, vm) => { ...@@ -16,11 +16,11 @@ const install = (Vue, vm) => {
function toLoginPage(){ function toLoginPage(){
const app = getApp() const app = getApp()
let jumpLoginStatus = app && app.globalData && app.globalData.jumpLoginStatus let curpath = vm.$Route.path
if(!jumpLoginStatus){ if(curpath == '/pages/login/index') {
return // 如果已经在登录页,无需再次跳转
return false
} }
app.globalData.jumpLoginStatus = false
vm.$u.route('/pages/login/index'); vm.$u.route('/pages/login/index');
} }
Vue.prototype.$u.http.setConfig({ Vue.prototype.$u.http.setConfig({
......
...@@ -72,7 +72,13 @@ ...@@ -72,7 +72,13 @@
} }
}, },
methods: { methods: {
selectUpload(){ selectUpload(){
if (this.imgList.length === 10) {
return this.$refs.uToast.show({
title: '图片已超出最大数量',
type: 'error',
})
}
// 弹窗展示 // 弹窗展示
this.maskShow = true this.maskShow = true
}, },
......
...@@ -125,7 +125,7 @@ ...@@ -125,7 +125,7 @@
photo.currentItemLength = 10 photo.currentItemLength = 10
this.continuePhoto() this.continuePhoto()
// 完成本项 // 完成本项
this.$emit('finish') //this.$emit('finish')
}, },
// 确认图片 // 确认图片
continuePhoto() { continuePhoto() {
...@@ -139,7 +139,7 @@ ...@@ -139,7 +139,7 @@
}, },
submitFile() { submitFile() {
const photo = getApp().globalData.photo const photo = getApp().globalData.photo
photo.currentItemLength = photo.currentItemLength + 1 if (photo.currentItemLength < 10) photo.currentItemLength = photo.currentItemLength + 1
uni.hideLoading() uni.hideLoading()
// 当前项的图片显示 // 当前项的图片显示
// 拍照项张数目增加 等于10张 // 拍照项张数目增加 等于10张
......
<template>
<u-navbar
:height="40"
:background="background"
:back-icon-color="navbarColor"
:title="title"
:titleColor="navbarColor"
:is-back="isBack"
:is-fixed="isFixed"
:title-bold="true"
:border-bottom="false">
</u-navbar>
</template>
<script>
/**
* navbar 自定义导航栏
* @description 此组件一般用于在特殊情况下,需要自定义导航栏的时候用到,一般建议使用uniapp自带的导航栏。
* @tutorial https://www.uviewui.com/components/navbar.html
* @property {String Number} height 导航栏高度(不包括状态栏高度在内,内部自动加上),注意这里的单位是px(默认40)
* @property {String} navbar-Color 导航栏内容的颜色(默认#333333)
* @property {String} title 导航栏标题,如设置为空字符,将会隐藏标题占位区域
* @property {String Number} title-width 导航栏标题的最大宽度,内容超出会以省略号隐藏,单位rpx(默认250)
* @property {Boolean} is-back 是否显示导航栏左边返回图标和辅助文字(默认true)
* @property {Object} background 导航栏背景设置,见官网说明(默认{ background: '#ffffff' })
* @property {Boolean} is-fixed 导航栏是否固定在顶部(默认true)
* @example <w-navbar title="剑未配妥,出门已是江湖"></w-navbar>
*/
export default {
name:"w-navbar",
props: {
height: {
type: String,
default: "40"
},
background: {
type: Object,
default(){
return {
backgroundColor: 'none'
}
}
},
navbarColor: {
type: String,
default: "#333333"
},
title: {
type: String,
default: ""
},
titleBold: {
type: Boolean,
default: true
},
isBack: {
type: Boolean,
default: true
},
isFixed: {
type: Boolean,
default: true
},
},
data() {
return {
};
}
}
</script>
<style lang="scss">
</style>
...@@ -137,7 +137,26 @@ ...@@ -137,7 +137,26 @@
}, },
{ {
"root": "pages/mine", "root": "pages/mine",
"pages": [] "pages": [
{
"path": "address/index",
"style": {
"navigationBarTitleText": "收获地址",
"enablePullDownRefresh": false,
"navigationStyle": "custom", // 隐藏系统导航栏
"disableScroll": true
}
},
{
"path": "address/addSite",
"style": {
"navigationBarTitleText": "修改地址",
"enablePullDownRefresh": false,
"navigationStyle": "custom", // 隐藏系统导航栏
"disableScroll": true
}
}
]
}, },
{ {
"root": "pages/order", "root": "pages/order",
...@@ -323,7 +342,7 @@ ...@@ -323,7 +342,7 @@
"preloadRule": { "preloadRule": {
"pages/index/index": { "pages/index/index": {
"network": "all", "network": "all",
"packages": ["pages/order", "pages/learn"] "packages": ["pages/order", "pages/learn", "pages/mine"]
} }
}, },
"globalStyle": { "globalStyle": {
......
...@@ -108,7 +108,6 @@ ...@@ -108,7 +108,6 @@
watch: { watch: {
vuex_token(val, oldVal) { vuex_token(val, oldVal) {
// 监听token变化,如果更新则重新加载页面数据 // 监听token变化,如果更新则重新加载页面数据
console.log('', val, oldVal)
val && this.initSettleInfo() val && this.initSettleInfo()
} }
}, },
......
...@@ -3,15 +3,18 @@ ...@@ -3,15 +3,18 @@
<image class="header-image" mode="widthFix" :src="imageUrl + 'wodebeijing.png'"></image> <image class="header-image" mode="widthFix" :src="imageUrl + 'wodebeijing.png'"></image>
<u-navbar :is-back="false" :background="{ background: 'transparent' }" :border-bottom="false"> <u-navbar :is-back="false" :background="{ background: 'transparent' }" :border-bottom="false">
<text class="title-view">我的</text> <text class="title-view">我的</text>
</u-navbar> </u-navbar>
<view v-if="!takeStatus" class="mine-content"> <view class="mine-content">
<view class="u-flex header-view"> <view class="header-view">
<view class="u-m-r-10"> <view class="head-image">
<u-avatar :src="pic" size="140"></u-avatar> <u-avatar :src="headImageUrl" size="142" mode="circle"></u-avatar>
</view> </view>
<view class="u-flex-1"> <view class="header-content">
<view class="u-font-18 u-p-b-20">uView ui</view> <view class="name-view">{{name}}</view>
<view class="u-font-14 u-tips-color">微信号:helang_uView</view> <view :class="['tel-view', {'active': info.tel}]">
<text>{{tel}}</text>
<icon name="arrow-left-fill"></icon>
</view>
</view> </view>
</view> </view>
...@@ -45,7 +48,8 @@ ...@@ -45,7 +48,8 @@
}, },
data() { data() {
return { return {
serviceTel: '0755-81773817', serviceTel: '0755-81773817',
info: {},
pic: 'https://uviewui.com/common/logo.png', pic: 'https://uviewui.com/common/logo.png',
show: true, show: true,
takeStatus: false, takeStatus: false,
...@@ -108,18 +112,35 @@ ...@@ -108,18 +112,35 @@
imageStyle: 'width:32rpx;height:32rpx' imageStyle: 'width:32rpx;height:32rpx'
} }
] ]
},
name() {
return this.info.name || '点击登录'
},
tel() {
return this.info.tel ? '已绑定手机号' : '绑定手机号'
}, },
imageUrl(name) { imageUrl() {
return process.uniEnv.qn_base_url return process.uniEnv.qn_base_url
}, },
pages() { pages() {
return [] return ['', '', '', '', 'address', '', '']
},
headImageUrl() {
return this.info.headImage || this.placeholderImage
},
placeholderImage() {
return this.imageUrl + 'touxiang.png'
} }
}, },
onLoad() { onLoad() {
}, },
methods: { methods: {
handleClick(index) {
uni.navigateTo({
url: 'pages/mine/' + this.pages[index]
})
},
take() { take() {
uni.hideTabBar() uni.hideTabBar()
this.takeStatus = true this.takeStatus = true
...@@ -127,56 +148,82 @@ ...@@ -127,56 +148,82 @@
closeTake(img) { closeTake(img) {
console.log(img) console.log(img)
this.takeStatus = false this.takeStatus = false
},
handleClick(index) {
uni.navigateTo({
url: 'pages/mine/' + this.pages[index]
})
} }
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.mine-view { .mine-view {
position: relative; position: relative;
.header-image { .header-image {
position: absolute; position: absolute;
width: 100%; width: 100%;
} }
.title-view { .title-view {
color: #FFFFFF; color: #FFFFFF;
font-weight: bold; font-weight: bold;
font-size: 40rpx; font-size: 40rpx;
} padding-left: 30rpx;
.mine-content { }
background-color: #F4F5F7; .mine-content {
.header-view {} background-color: #F4F5F7;
.list-view { .header-view {
background-color: #FFFFFF; padding: 30rpx;
border-radius: 16rpx 16rpx 0 0; display: flex;
.item-title { .head-image {
font-size: 32rpx; width: 142rpx;
color: #333333; height: 142rpx;
margin-left: 16rpx;
line-height: 32rpx;
}
.item-value {
font-size: 26rpx;
color: #999999;
} }
.header-content {
.line-view { color: #FFFFFF;
height: 2rpx; z-index: 0;
background-color: #F4F5F7; .name-view {
margin-top: 30rpx;
margin-bottom: 30rpx; }
.tel-view {
background-color: #FFFFFF;
border-radius: 26rpx;
color: #2272FF;
width: 164rpx;
height: 52rpx;
&.active {
color: #FFFFFF;
border: 1rpx bold #FFFFFF;
}
}
} }
} }
.list-view {
background-color: #FFFFFF;
border-radius: 16rpx 16rpx 0 0;
.item-title {
font-size: 32rpx;
color: #333333;
margin-left: 16rpx;
line-height: 32rpx;
}
.item-value {
font-size: 26rpx;
color: #999999;
}
.line-view {
height: 2rpx;
background-color: #F4F5F7;
margin-top: 30rpx;
margin-bottom: 30rpx;
}
}
} }
} }
</style> </style>
...@@ -113,9 +113,6 @@ export default { ...@@ -113,9 +113,6 @@ export default {
signupLogin(e) { signupLogin(e) {
var that = this var that = this
console.log(e.detail.errMsg)
console.log(e.detail.iv)
console.log(e.detail.encryptedData)
if (!e || !e.detail || e.detail.errMsg.indexOf('user deny') > -1) { if (!e || !e.detail || e.detail.errMsg.indexOf('user deny') > -1) {
wx.showModal({ wx.showModal({
title: '提示', title: '提示',
...@@ -157,22 +154,17 @@ export default { ...@@ -157,22 +154,17 @@ export default {
goBackPage() { goBackPage() {
let pages = getCurrentPages(); let pages = getCurrentPages();
debugger
if(pages.length) { if(pages.length) {
let index = pages.length - 1; let index = pages.length - 1;
if(index) { if(index) {
let prevPage = pages[index]; //上一个页面 let prevPage = pages[index]; //上一个页面
if(prevPage.route == "pages/login/index") { if (prevPage && prevPage.$vm) {
uni.redirectTo({ prevPage.$vm.isRefresh = true;
url:'pages/index/index'
})
} else {
if (prevPage && prevPage.$vm) {
prevPage.$vm.isRefresh = true;
}
uni.navigateBack({
delta: 1
})
} }
uni.navigateBack({
delta: 1
})
} else { } else {
uni.redirectTo({ uni.redirectTo({
url:'pages/index/index' url:'pages/index/index'
......
<template> <template>
<view> <view class="address-wrap">
<view class="item" v-for="(res, index) in siteList" :key="res.id"> <w-navbar title="收货地址"></w-navbar>
<view class="item" v-for="(res, sindex) in siteList" :key="res.id">
<view class="top"> <view class="top">
<view class="name">{{ res.name }}</view> <view class="name">{{ res.name }}</view>
<view class="phone">{{ res.phone }}</view> <view class="phone">{{ res.phone }}</view>
<view class="tag">
<text v-for="(item, index) in res.tag" :key="index" :class="{red:item.tagText=='默认'}">{{ item.tagText }}</text>
</view>
</view> </view>
<view class="bottom"> <view class="bottom">
广东省深圳市宝安区 自由路66号 <view class="address">广东省深圳市宝安区宝城67区留芳路6号庭威产业园3栋10C</view>
<u-icon name="edit-pen" :size="40" color="#999999"></u-icon> <u-icon :name="editPen" :size="32" color="#999999"></u-icon>
</view>
<view class="default" v-show="true">
<u-icon name="checkmark-circle" color="#2272FF" size="32"></u-icon>
<text class="txt">默认地址</text>
</view> </view>
</view> </view>
<view class="addSite" @tap="toAddSite"> <view class="addSite" @tap="toAddSite">
...@@ -25,12 +27,20 @@ ...@@ -25,12 +27,20 @@
export default { export default {
data() { data() {
return { return {
background: {
backgroundColor: 'none'
},
siteList: [] siteList: []
}; };
}, },
onLoad() { onLoad() {
this.getData(); this.getData();
}, },
computed: {
editPen() {
return process.uniEnv.qn_base_url + 'icon/edit-pen.png'
}
},
methods: { methods: {
getData() { getData() {
this.siteList = [ this.siteList = [
...@@ -46,7 +56,7 @@ export default { ...@@ -46,7 +56,7 @@ export default {
tagText: '家' tagText: '家'
} }
], ],
site: '广东省深圳市宝安区 自由路66号' site: '广东省深圳市宝安区宝城67区留芳路6号庭威产业园3栋10C'
}, },
{ {
id: 2, id: 2,
...@@ -70,7 +80,7 @@ export default { ...@@ -70,7 +80,7 @@ export default {
}, },
toAddSite(){ toAddSite(){
uni.navigateTo({ uni.navigateTo({
url: '/pages/template/address/addSite' url: '/pages/mine/address/addSite'
}); });
} }
} }
...@@ -78,42 +88,51 @@ export default { ...@@ -78,42 +88,51 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.address-wrap {
background-color: #F4F5F7;
}
.item { .item {
padding: 40rpx 20rpx; margin: 30rpx;
padding: 50rpx 30rpx 48rpx 30rpx;
background-color: #FFFFFF;
border-radius: 12px;
.top { .top {
display: flex; display: flex;
font-size: 32rpx;
font-weight: bold; font-weight: bold;
font-size: 34rpx; color: #333333;
line-height: 32rpx;
.phone { .phone {
margin-left: 60rpx; margin-left: 20rpx;
} font-size: 28rpx;
.tag { font-weight: 400;
display: flex; color: #666666;
font-weight: normal;
align-items: center;
text {
display: block;
width: 60rpx;
height: 34rpx;
line-height: 34rpx;
color: #ffffff;
font-size: 20rpx;
border-radius: 6rpx;
text-align: center;
margin-left: 30rpx;
background-color:rgb(49, 145, 253);
}
.red{
background-color:red
}
} }
} }
.bottom { .bottom {
display: flex; display: flex;
margin-top: 20rpx; margin-top: 24rpx;
font-size: 28rpx;
justify-content: space-between; justify-content: space-between;
color: #999999; align-items: flex-start;
font-size: 28rpx;
font-weight: 400;
color: #333333;
.address{
max-width: 500rpx;
line-height: 40rpx;
}
}
.default {
border-top: 2rpx solid #F4F5F7;
margin-top: 22rpx;
padding-top: 30rpx;
.txt {
margin-left: 12rpx;
font-size: 28rpx;
font-weight: 400;
color: #333333;
line-height: 28rpx;
}
} }
} }
.addSite { .addSite {
......
...@@ -256,7 +256,8 @@ ...@@ -256,7 +256,8 @@
}, },
saveComplete(){// 保存完工信息 saveComplete(){// 保存完工信息
let self = this let self = this
let param = {} let param = {}
self.list.forEach((panel)=>{ self.list.forEach((panel)=>{
param[panel.panelFieldsName] = [] param[panel.panelFieldsName] = []
panel.items.forEach((group) =>{ panel.items.forEach((group) =>{
...@@ -272,15 +273,8 @@ ...@@ -272,15 +273,8 @@
}) })
}) })
}) })
if (!param.base[0].fieldsValue) {
return this.$refs.uToast.show({
title: '请先选择产品规格',
type: 'error',
})
}
self.$u.api.saveCompleteData(param,self.orderId).then((res)=>{ self.$u.api.saveCompleteData(param,self.orderId).then((res)=>{
if (res.code == 200) { if (res.code == 200) {
this.$refs.uToast.show({ this.$refs.uToast.show({
title: '保存成功', title: '保存成功',
...@@ -288,7 +282,7 @@ ...@@ -288,7 +282,7 @@
}) })
} else { } else {
this.$refs.uToast.show({ this.$refs.uToast.show({
title: res.message, title: res.data,
type: 'error', type: 'error',
}) })
} }
......
...@@ -33,7 +33,9 @@ const store = new Vuex.Store({ ...@@ -33,7 +33,9 @@ const store = new Vuex.Store({
vuex_user: lifeData.vuex_user ? lifeData.vuex_user : {}, vuex_user: lifeData.vuex_user ? lifeData.vuex_user : {},
vuex_token: lifeData.vuex_token ? lifeData.vuex_token : '', vuex_token: lifeData.vuex_token ? lifeData.vuex_token : '',
vuex_version: '1.0.1', vuex_version: '1.0.1',
vuex_config: {}, vuex_config: {},
// 入驻信息
vuex_settled: {},
vuex_wx_uid: lifeData.vuex_wx_uid || 0, vuex_wx_uid: lifeData.vuex_wx_uid || 0,
}, },
mutations: { mutations: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment