liudan 4 months ago
parent fb64717fd3
commit c4d4c58bba
  1. 192
      components/weikuan.vue
  2. 8
      pages/goods/order_list/index.vue
  3. 78
      pages/guide/index.vue
  4. 1
      pages/user/index.vue
  5. 56
      pages/users/binding_phone/index.vue
  6. 14
      pages/users/shiming/index.vue
  7. 44
      pages/users/wechat_login/index.vue
  8. 14
      uni_modules/zmm-watermark/components/zmm-watermark/zmm-watermark.vue

@ -0,0 +1,192 @@
<template>
<view>
<view class="address-window" :class="address.address==true?'on':''">
<view class='title'>{{$t(`选择地址`)}}<text class='iconfont icon-guanbi' @tap='close'></text></view>
<view class='list'>
<view class='item acea-row row-between-wrapper' :class='active==index?"font-num":""'
v-for="(item,index) in addressList" @tap='tapAddress(index,item.id)' :key='index'>
<text class='iconfont icon-ditu' :class='active==index?"font-num":""'></text>
<view class='address'>
<view class='name' :class='active==index?"font-num":""'>{{item.real_name}}<text
class='phone'>{{item.phone}}</text></view>
<view class='line1'>{{item.province}}{{item.city}}{{item.district}}{{item.detail}}</view>
</view>
<text class='iconfont icon-complete' :class='active==index?"font-num":""'></text>
</view>
</view>
<!-- 无地址 -->
<view class='pictrue' v-if="!is_loading && !addressList.length">
<image :src="imgHost + '/statics/images/noAddress.png'"></image>
</view>
<view class='addressBnt bg-color' @tap='goAddressPages'>{{$t(`选择其它地址`)}}</view>
</view>
<view class='mask' catchtouchmove="true" :hidden='address.address==false' @tap='close'></view>
</view>
</template>
<script>
import {
getAddressList
} from '@/api/user.js';
import {
HTTP_REQUEST_URL
} from '@/config/app';
export default {
props: {
pagesUrl: {
type: String,
default: '',
},
address: {
type: Object,
default: function() {
return {
address: true,
addressId: 0,
};
}
},
isLog: {
type: Boolean,
default: false,
},
},
data() {
return {
imgHost: HTTP_REQUEST_URL,
active: 0,
//
addressList: [],
is_loading: true
};
},
methods: {
tapAddress: function(e, addressid) {
this.active = e;
this.$emit('OnChangeAddress', addressid);
},
close: function() {
this.$emit('changeClose');
this.$emit('changeTextareaStatus');
},
goAddressPages: function() {
this.$emit('changeClose');
this.$emit('changeTextareaStatus');
uni.navigateTo({
url: this.pagesUrl
});
},
getAddressList: function() {
let that = this;
getAddressList({
page: 1,
limit: 5
}).then(res => {
let addressList = res.data;
//
for (let i = 0, leng = addressList.length; i < leng; i++) {
if (addressList[i].id == that.address.addressId) {
that.active = i;
}
}
that.$set(that, 'addressList', addressList);
that.is_loading = false;
if (addressList.length) {
this.$emit('onHaveAddressList', true)
}
})
}
}
}
</script>
<style scoped lang="scss">
.address-window {
background-color: #fff;
position: fixed;
bottom: 0;
left: 0;
width: 100%;
z-index: 1000;
transform: translate3d(0, 100%, 0);
transition: all .3s cubic-bezier(.25, .5, .5, .9);
}
.address-window.on {
transform: translate3d(0, 0, 0);
}
.address-window .title {
font-size: 32rpx;
font-weight: bold;
text-align: center;
height: 123rpx;
line-height: 123rpx;
position: relative;
}
.address-window .title .iconfont {
position: absolute;
right: 30rpx;
color: #8a8a8a;
font-size: 35rpx;
}
.address-window .list .item {
margin-left: 30rpx;
padding-right: 30rpx;
border-bottom: 1px solid #eee;
height: 129rpx;
font-size: 25rpx;
color: #333;
}
.address-window .list .item .iconfont {
font-size: 37rpx;
color: #2c2c2c;
}
.address-window .list .item .iconfont.icon-complete {
font-size: 30rpx;
color: #fff;
}
.address-window .list .item .address {
width: 560rpx;
}
.address-window .list .item .address .name {
font-size: 28rpx;
font-weight: bold;
color: #282828;
margin-bottom: 4rpx;
}
.address-window .list .item .address .name .phone {
margin-left: 18rpx;
}
.address-window .addressBnt {
font-size: 30rpx;
font-weight: bold;
color: #fff;
width: 690rpx;
height: 86rpx;
border-radius: 43rpx;
text-align: center;
line-height: 86rpx;
margin: 85rpx auto;
}
.address-window .pictrue {
width: 414rpx;
height: 336rpx;
margin: 0 auto;
}
.address-window .pictrue image {
width: 100%;
height: 100%;
}
</style>

@ -130,7 +130,7 @@
<view class="bnt bg-color" v-if="item._status._type == 0"
@click="goPay(item.pay_price, item.order_id)">{{$t(`支付定金`)}}</view>
<view class="bnt bg-color" v-if="item._status._type == 6"
@click="goPay(item.pay_money_wei, item.order_id)">{{$t(`支付尾款`)}}</view>
@click="goPayWei(item)">{{$t(`支付尾款`)}}</view>
<!-- <view class="bnt bg-color" v-else-if="item._status._type == 3"
@click="goOrderDetails(item.order_id)">去评价</view> -->
<!-- <view class="bnt bg-color"
@ -156,6 +156,7 @@
</view>
</view>
<zmm-watermark></zmm-watermark>
<weikuan></weikuan>
<!-- #ifndef MP -->
<home></home>
<!-- #endif -->
@ -174,6 +175,7 @@
openOrderSubscribe
} from '@/utils/SubscribeMessage.js';
import home from '@/components/home';
import weikuan from '@/components/weikuan';
import {
toLogin
} from '@/libs/login.js';
@ -188,6 +190,7 @@
export default {
components: {
home,
weikuan,
emptyPage,
// #ifdef MP
authorize
@ -332,6 +335,9 @@
url: `/pages/goods/cashier/index?order_id=${order_id}&from_type=order`
})
},
goPayWei(item){
console.log(item,"777")
},
/**
* 去订单详情
*/

@ -5,8 +5,14 @@
</template>
<script>
import {
mapGetters
} from "vuex";
import guide from '@/components/guide/index.vue'
import Cache from '@/utils/cache';
import {
getUserInfo
} from '@/api/user.js';
import {
getOpenAdv
} from '@/api/api.js'
@ -14,6 +20,12 @@
components: {
guide
},
computed: {
...mapGetters({
isLogin: 'isLogin'
})
},
data() {
return {
guidePages: false,
@ -28,27 +40,73 @@
const tagDate = uni.getStorageSync('guideDate') || '',
nowDate = new Date().toLocaleDateString();
if (tagDate === nowDate) {
uni.switchTab({
url: '/pages/index/index'
});
if(this.isLogin){
getUserInfo().then(res => {
if(res.data.renzheng&&res.data.renzheng.status==1){
uni.switchTab({
url: '/pages/index/index'
});
}else{
uni.navigateTo({
url:"/pages/users/shiming/index"
})
}
});
}else{
uni.redirectTo({
url:'/pages/users/wechat_login/index'
})
}
return
}
getOpenAdv().then(res => {
if (res.data.status == 0 || res.data.value.length == 0) {
uni.switchTab({
url: '/pages/index/index'
});
if(this.isLogin){
getUserInfo().then(res1 => {
if(res1.data.renzheng&&res1.data.renzheng.status==1){
uni.switchTab({
url: '/pages/index/index'
});
}else{
uni.navigateTo({
url:"/pages/users/shiming/index"
})
}
});
}else{
uni.redirectTo({
url:'/pages/users/wechat_login/index'
})
}
} else if (res.data.status && (res.data.value.length || res.data.video_link)) {
this.advData = res.data
uni.setStorageSync('guideDate', new Date().toLocaleDateString());
this.guidePages = true
}
}).catch(err => {
uni.switchTab({
url: '/pages/index/index'
});
if(this.isLogin){
getUserInfo().then(res1 => {
if(res1.data.renzheng&&res1.data.renzheng.status==1){
uni.switchTab({
url: '/pages/index/index'
});
}else{
uni.navigateTo({
url:"/pages/users/shiming/index"
})
}
});
}else{
uni.redirectTo({
url:'/pages/users/wechat_login/index'
})
}
})
}
},
},
onHide() {
this.guidePages = false

@ -609,6 +609,7 @@
let that = this;
getUserInfo().then(res => {
that.userInfo = res.data
uni.setStorageSync('mark',res.data.renzheng.company_name)
that.$store.commit("SETUID", res.data.uid);
that.orderMenu.forEach((item, index) => {
switch (item.title) {

@ -254,28 +254,50 @@
getUserInfo().then(res => {
uni.hideLoading();
that.userInfo = res.data;
uni.setStorageSync('mark',res.data.renzheng.company_name)
that.$store.commit('SETUID', res.data.uid);
that.$store.commit('UPDATE_USERINFO', res.data);
if (new_user) {
this.isShow = true
} else {
// #ifdef MP
that.$util.Tips({
title: that.$t(`登录成功`),
icon: 'success'
}, {
tab: 3,
url: this.configData.wechat_auth_switch ? 2 : 1
});
// #endif
// #ifndef MP
that.$util.Tips({
title: that.$t(`登录成功`),
icon: 'success'
}, {
url: this.backUrl || 'pages/user/index'
});
// #endif
// // #ifdef MP
// that.$util.Tips({
// title: that.$t(``),
// icon: 'success'
// }, {
// tab: 3,
// url: this.configData.wechat_auth_switch ? 2 : 1
// });
// // #endif
// // #ifndef MP
// that.$util.Tips({
// title: that.$t(``),
// icon: 'success'
// }, {
// url: this.backUrl || 'pages/user/index'
// });
// // #endif
if(res.data.renzheng.status==1){
uni.showToast({
title: '登录成功',
icon: 'none',
duration: 2000
});
uni.switchTab({
url:"/pages/user/index",
})
}else{
uni.showToast({
title: '登录成功',
icon: 'none',
duration: 2000
});
uni.redirectTo({
url:"/pages/users/shiming/index"
})
}
}
});

@ -3,7 +3,7 @@
<view class="approval" v-if="status==1">
已实名认证
</view>
<form @submit.stop="formSubmit" v-if="status==0||status==1" :disabled="status==1?true:false">
<form @submit.stop="formSubmit" v-if="status==0||status==1||status==null" :disabled="status==1?true:false">
<view class='addAddress'>
<view class='list'>
<view class="listItem">
@ -100,7 +100,7 @@
</view>
</view>
<zmm-watermark></zmm-watermark>
</view>
</template>
@ -227,8 +227,14 @@
this.infoForm.phone = res.data.renzheng.phone;
this.infoForm.companyName = res.data.renzheng.company_name;
this.infoForm.companyId = res.data.renzheng.company_code;
this.infoForm.companyResPic = JSON.parse(res.data.renzheng.business_licens_ide);
this.infoForm.companyPics = JSON.parse(res.data.renzheng.shop_img_id);
if(res.data.renzheng.business_licens_ide&&res.data.renzheng.business_licens_ide.length>0){
this.infoForm.companyResPic = JSON.parse(res.data.renzheng.business_licens_ide);
}
if(res.data.renzheng.business_licens_ide&&res.data.renzheng.shop_img_id.length>0){
this.infoForm.companyPics = JSON.parse(res.data.renzheng.shop_img_id);
}
});
},

@ -416,26 +416,36 @@
that.userInfo = res.data;
that.$store.commit('SETUID', res.data.uid);
that.$store.commit('UPDATE_USERINFO', res.data);
uni.setStorageSync('mark',res.data.renzheng.company_name)
if (new_user) {
this.isShow = true
} else {
// #ifdef MP
that.$util.Tips({
title: that.$t(`登录成功`),
icon: 'success'
}, {
tab: 3
});
// #endif
// #ifndef MP
that.$util.Tips({
title: that.$t(`登录成功`),
icon: 'success'
}, {
tab: 4,
url: back_url || '/pages/user/index'
});
// #endif
if(res.data.renzheng.status==1){
uni.showToast({
title: '登录成功',
icon: 'none',
duration: 2000
});
uni.switchTab({
url:"/pages/user/index",
})
}else{
uni.showToast({
title: '登录成功',
icon: 'none',
duration: 2000
});
uni.redirectTo({
url:"/pages/users/shiming/index"
})
}
}
}).catch(err => {
uni.hideLoading();

@ -19,14 +19,15 @@
data() {
return {
forLength: 0, //
watermarkArea: 0 //()
watermarkArea: 0 ,//()
watermark:'',
};
},
props: {
watermark: { //(html)
type: String,
default: '猫小鱼潮玩'
},
// watermark: { //(html)
// type: String,
// default: ''
// },
color: { //
type: String,
default: '#666'
@ -88,6 +89,9 @@
this.countForLength();
}
},
created(){
this.watermark = uni.getStorageSync('mark')
},
methods: {
countForLength() { //
// #ifndef APP-NVUE

Loading…
Cancel
Save