Commit 13fca3da by LJM

「爱智小程序」—业务验收问题合集fix

parent 3613d455
.classNavPage{ .classNavPage {
.bugc-ceng{ .bugc-ceng {
position: relative; position: relative;
z-index: 1; z-index: 1;
background: #fff; background: #fff;
} }
.cons{ .cons {
padding-top:23rpx; padding-top: 23rpx;
.one-c-box{ .one-c-box {
padding-left:18rpx; padding-left: 18rpx;
position: relative; position: relative;
padding-right:90rpx; padding-right: 90rpx;
height:63rpx; height: 63rpx;
.lb {
.lb{ height: 100%;
height:100%; width: 100%;
width:100%;
overflow-x: auto; overflow-x: auto;
.itemo{ .itemo {
height: 45rpx; height: 45rpx;
line-height: 45rpx; line-height: 45rpx;
padding:0 17rpx; padding: 0 17rpx;
border-radius: 5rpx; border-radius: 5rpx;
border: 1rpx solid #fff; border: 1rpx solid #fff;
margin-right:25rpx; margin-right: 25rpx;
font-size: 24rpx; font-size: 24rpx;
color: #000000; color: #000000;
flex-shrink: 0; flex-shrink: 0;
&.act{ &.act {
border: 1rpx solid #D0121B; border: 1rpx solid #d0121b;
background: #FFF5F5; background: #fff5f5;
color: #D0121B; color: #d0121b;
} }
} }
} }
.rb{ .rb {
width:90rpx; width: 90rpx;
height:45rpx; height: 45rpx;
position: absolute; position: absolute;
top:0rpx; top: 0rpx;
right:0rpx; right: 0rpx;
text-align: center; text-align: center;
.icon{ .icon {
font-size: 16rpx; font-size: 16rpx;
color:#000; color: #000;
} }
} }
.one-c-hide-cons{ .one-c-hide-cons {
position: absolute; position: absolute;
z-index: 1; z-index: 1;
width: 100%; width: 100%;
background: #FFFFFF; background: #ffffff;
border-radius: 0rpx 0rpx 20rpx 20rpx; border-radius: 0rpx 0rpx 20rpx 20rpx;
top:-24rpx; top: -24rpx;
left:0rpx; left: 0rpx;
transition: max-height 0.5s; transition: max-height 0.5s;
max-height: 0; max-height: 0;
overflow: hidden; overflow: hidden;
.tit{ .tit {
padding: 11rpx 30rpx; padding: 11rpx 30rpx;
font-size: 24rpx; font-size: 24rpx;
color: #000000; color: #000000;
margin-bottom: 35rpx; margin-bottom: 35rpx;
} }
.hide-sec{ .hide-sec {
flex-wrap: wrap; flex-wrap: wrap;
padding-left:60rpx; padding-left: 60rpx;
padding-bottom:40rpx; padding-bottom: 40rpx;
.itemh{ .itemh {
margin-bottom: 40rpx; margin-bottom: 40rpx;
margin-right: 33rpx; margin-right: 33rpx;
&:nth-child(4n){ &:nth-child(4n) {
margin-right: 0rpx; margin-right: 0rpx;
} }
image{ image {
display: block; display: block;
width:106rpx; width: 106rpx;
height:106rpx; height: 106rpx;
margin:0 auto; margin: 0 auto;
} }
text{ text {
margin-top:8rpx; margin-top: 8rpx;
display: block; display: block;
width:135rpx; width: 135rpx;
text-align: center; text-align: center;
font-size: 24rpx; font-size: 24rpx;
color: #666666; color: #666666;
height:30rpx; height: 30rpx;
line-height: 30rpx; line-height: 30rpx;
} }
&.act{ &.act {
text{color:#D0121B;} text {
color: #d0121b;
}
} }
} }
} }
.foot{ .foot {
height:87rpx; height: 87rpx;
font-size: 24rpx; font-size: 24rpx;
color: #000000; color: #000000;
border-top:1rpx solid #D1D1D1; border-top: 1rpx solid #d1d1d1;
border-radius: 0rpx 0rpx 20rpx 20rpx; border-radius: 0rpx 0rpx 20rpx 20rpx;
.icon{ .icon {
font-size: 16rpx; font-size: 16rpx;
margin-left: 20rpx; margin-left: 20rpx;
} }
} }
} }
&.show{ &.show {
.one-c-hide-cons{max-height: 700rpx;} .one-c-hide-cons {
&::after{ max-height: 800rpx;
content:""; overflow-y: auto;
}
&::after {
content: '';
position: fixed; position: fixed;
left:0; left: 0;
top:0; top: 0;
right:0; right: 0;
bottom:0; bottom: 0;
background: rgba(0,0,0,0.3); background: rgba(0, 0, 0, 0.3);
} }
} }
} }
.two-c-box{ .two-c-box {
margin-top:20rpx; margin-top: 20rpx;
height:calc(100vh - 175rpx - 130rpx); height: calc(100vh - 175rpx - 130rpx);
.lc{ .lc {
width:225rpx; width: 225rpx;
height:100%; height: 100%;
padding-top:40rpx; padding-top: 40rpx;
font-size: 24rpx; font-size: 24rpx;
color: #666666; color: #666666;
overflow-y: auto; overflow-y: auto;
background: #f8f8f8; background: #f8f8f8;
.item{ .item {
padding:15rpx 0; padding: 15rpx 0;
padding-left:35rpx; padding-left: 35rpx;
padding-right:50rpx; padding-right: 50rpx;
margin-bottom: 10rpx; margin-bottom: 10rpx;
height:92rpx; height: 92rpx;
&.act{ &.act {
color: #000000; color: #000000;
background: #fff; background: #fff;
border-radius: 100rpx 0 0 100rpx; border-radius: 100rpx 0 0 100rpx;
} }
} }
} }
.rc{ .rc {
width:525rpx; width: 525rpx;
height:100%; height: 100%;
overflow-y: auto; overflow-y: auto;
padding-left:35rpx; padding-left: 35rpx;
.item{ .item {
margin-right: 35rpx; margin-right: 35rpx;
width: 130rpx; width: 130rpx;
padding-bottom:20rpx; padding-bottom: 20rpx;
//margin-bottom:10rpx; //margin-bottom:10rpx;
display: inline-block; display: inline-block;
height:227rpx; height: 227rpx;
&:nth-child(3n){ &:nth-child(3n) {
margin-right: 0rpx; margin-right: 0rpx;
} }
image{ image {
width: 130rpx; width: 130rpx;
height: 130rpx; height: 130rpx;
margin-bottom: 12rpx; margin-bottom: 12rpx;
display: block; display: block;
} }
text{ text {
color: #000000; color: #000000;
width: 130rpx; width: 130rpx;
display: block; display: block;
line-height: 30rpx; line-height: 30rpx;
height:30rpx; height: 30rpx;
text-align: center; text-align: center;
font-size: 24rpx; font-size: 24rpx;
color: #000000; color: #000000;
} }
} }
} }
} }
} }
} }
/* #ifdef H5 */ /* #ifdef H5 */
.classNavPage{ .classNavPage {
.two-c-box{ .two-c-box {
height:calc(100vh - 90rpx - 130rpx); height: calc(100vh - 90rpx - 130rpx);
} }
} }
/* #endif */ /* #endif */
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<barX /> <barX />
<view class="header row verCenter"> <view class="header row verCenter">
<text class="icon iconfont icon-arrowleft" @click="$goBack"></text> <text class="icon iconfont icon-arrowleft" @click="$goBack"></text>
<view>{{id==1?'爱智网站服务协议':'爱智网隐私政策'}}</view> <view>{{id==1?'爱智网站服务协议':'爱智隐私政策'}}</view>
</view> </view>
<view class="content" v-html="content"></view> <view class="content" v-html="content"></view>
</view> </view>
...@@ -18,20 +18,20 @@ ...@@ -18,20 +18,20 @@
export default { export default {
data() { data() {
return { return {
id:1, id: 1,
content:"" content: ""
} }
}, },
onLoad: function(option) { onLoad: function(option) {
this.id=option.id this.id = option.id
this.getData() this.getData()
}, },
methods: { methods: {
getData(){ getData() {
this.request(Api_Url + '/api/xcx/newsPage', 'GET', {type:this.id}, true).then(res => { this.request(Api_Url + '/api/xcx/newsPage', 'GET', { type: this.id }, true).then(res => {
if(res.code==0){ if (res.code == 0) {
this.content=res.data.content this.content = res.data.content
}else{ } else {
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
icon: 'error' icon: 'error'
...@@ -49,32 +49,35 @@ ...@@ -49,32 +49,35 @@
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.rulePage{ .rulePage {
.header{ .header {
height:110rpx; height: 110rpx;
padding-left:33rpx; padding-left: 33rpx;
.icon{
.icon {
font-size: 35rpx; font-size: 35rpx;
color: #898989; color: #898989;
margin-right:160rpx; margin-right: 160rpx;
} }
view{
view {
font-weight: 600; font-weight: 600;
font-size: 32rpx; font-size: 32rpx;
color: #000000; color: #000000;
} }
} }
.content{
padding:33rpx; .content {
padding-top:0rpx; padding: 33rpx;
padding-top: 0rpx;
font-size: 26rpx; font-size: 26rpx;
color: #000000; color: #000000;
line-height: 50rpx; line-height: 50rpx;
letter-spacing: 1px; letter-spacing: 1px;
overflow-y: auto; overflow-y: auto;
height:calc(100vh - 285rpx); height: calc(100vh - 285rpx);
/* #ifdef H5 */ /* #ifdef H5 */
height:calc(100vh - 200rpx); height: calc(100vh - 200rpx);
/* #endif */ /* #endif */
} }
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<view class="classNavPage"> <view class="classNavPage">
<barX /> <barX />
<view class="bugc-ceng"> <view class="bugc-ceng">
<searchHead @confirm="onConfirm" @goUrl="goUrl"/> <searchHead @confirm="onConfirm" @goUrl="goUrl" />
</view> </view>
<view class="cons"> <view class="cons">
...@@ -11,19 +11,17 @@ ...@@ -11,19 +11,17 @@
<view class="itemo" :class="{'act':item.checkedx}" v-for="(item,index) in pageData" :key="index" @click="tab(1,item.base_id)">{{item.title}}</view> <view class="itemo" :class="{'act':item.checkedx}" v-for="(item,index) in pageData" :key="index" @click="tab(1,item.base_id)">{{item.title}}</view>
</view> </view>
<view class="rb row verCenter rowCenter" @click="isShowClassOne=!isShowClassOne"> <view class="rb row verCenter rowCenter" @click="isShowClassOne=!isShowClassOne">
<text :class="['icon','iconfont','icon-arrowxia']" ></text> <text :class="['icon','iconfont','icon-arrowxia']"></text>
</view> </view>
<view class="one-c-hide-cons"> <view class="one-c-hide-cons">
<view class="tit">全部分类</view> <view class="tit">全部分类</view>
<view class="hide-sec row"> <view class="hide-sec row">
<view class="itemh" :class="{'act':item.checkedx}" v-for="(item,index) in pageData" :key="index" @click="tab(1,item.base_id)"> <view class="itemh" :class="{'act':item.checkedx}" v-for="(item,index) in pageData" :key="index" @click="tab(1,item.base_id)">
<image :src="item.images||'https://www.iedge.net/assets/images/common/defaultnew.png'" mode="aspectFit" ></image> <image :src="item.images||'https://www.iedge.net/assets/images/common/defaultnew.png'" mode="aspectFit"></image>
<text class="elep">{{item.title}}</text> <text class="elep">{{item.title}}</text>
</view> </view>
</view> </view>
<view class="foot row verCenter rowCenter" @click="isShowClassOne=!isShowClassOne">收起<text <view class="foot row verCenter rowCenter" @click="isShowClassOne=!isShowClassOne">收起<text class="icon iconfont icon-arrowshang"></text></view>
class="icon iconfont icon-arrowshang"></text></view>
</view> </view>
</view> </view>
<view class="two-c-box row bothSide"> <view class="two-c-box row bothSide">
...@@ -32,7 +30,7 @@ ...@@ -32,7 +30,7 @@
</view> </view>
<view class="rc "> <view class="rc ">
<navigator :url="'/pages/class/list?class_id2='+item.class_id" class="item" v-for="(item,index) in sanJlist" :key="index"> <navigator :url="'/pages/class/list?class_id2='+item.class_id" class="item" v-for="(item,index) in sanJlist" :key="index">
<image :src="item.class_icon||'https://www.iedge.net/assets/images/common/defaultnew.png'" mode="aspectFit" ></image> <image :src="item.class_icon||'https://www.iedge.net/assets/images/common/defaultnew.png'" mode="aspectFit"></image>
<text class="elep">{{item.class_name}}</text> <text class="elep">{{item.class_name}}</text>
</navigator> </navigator>
...@@ -57,42 +55,42 @@ ...@@ -57,42 +55,42 @@
return { return {
isShowClassOne: false, //是否展示一级分类浮层 isShowClassOne: false, //是否展示一级分类浮层
pageData: [], pageData: [],
erJList:[], erJList: [],
sanJlist:[], sanJlist: [],
class_id1:"", class_id1: "",
class_id2:"" class_id2: ""
} }
}, },
onLoad: function(option) { onLoad: function(option) {
this.class_id1=option.class_id1?option.class_id1:'' this.class_id1 = option.class_id1 ? option.class_id1 : ''
this.class_id2=option.class_id2?option.class_id2:'' this.class_id2 = option.class_id2 ? option.class_id2 : ''
this.getData() this.getData()
}, },
methods: { methods: {
tab(type,id){ tab(type, id) {
if(type==1){ if (type == 1) {
this.pageData.forEach(item=>{ this.pageData.forEach(item => {
if(item.base_id==id){ if (item.base_id == id) {
item.checkedx=true item.checkedx = true
this.erJList=item.right_cate_list||[] this.erJList = item.right_cate_list || []
}else{ } else {
item.checkedx=false item.checkedx = false
} }
(this.erJList||[]).forEach((item1, index1) => { (this.erJList || []).forEach((item1, index1) => {
if (index1 == 0) { if (index1 == 0) {
item1.checkedx = true item1.checkedx = true
this.sanJlist=item1.children this.sanJlist = item1.children
} else { } else {
item1.checkedx = false item1.checkedx = false
} }
}) })
}) })
}else{ } else {
this.erJList.forEach((item1, index1) => { this.erJList.forEach((item1, index1) => {
if (item1.class_id == id) { if (item1.class_id == id) {
item1.checkedx = true item1.checkedx = true
this.sanJlist=item1.children this.sanJlist = item1.children
} else { } else {
item1.checkedx = false item1.checkedx = false
} }
...@@ -101,36 +99,36 @@ ...@@ -101,36 +99,36 @@
}, },
getData() { getData() {
this.request(Api_Url + '/api/xcx/category', 'GET', {}, true).then(res => { this.request(Api_Url + '/api/xcx/category', 'GET', {}, true).then(res => {
if(res.code==0){ if (res.code == 0) {
this.pageData = res.data.category_list || [] this.pageData = res.data.category_list || []
this.pageData.forEach((item, index) => { this.pageData.forEach((item, index) => {
if(this.class_id1){ if (this.class_id1) {
if(this.class_id1==item.base_id){ if (this.class_id1 == item.base_id) {
item.checkedx = true item.checkedx = true
this.erJList=item.right_cate_list||[] this.erJList = item.right_cate_list || []
}else{ } else {
item.checkedx = false item.checkedx = false
} }
}else{ } else {
if (index == 0) { if (index == 0) {
item.checkedx = true item.checkedx = true
this.erJList=item.right_cate_list||[] this.erJList = item.right_cate_list || []
} else { } else {
item.checkedx = false item.checkedx = false
} }
} }
(this.erJList||[]).forEach((item1, index1) => { (this.erJList || []).forEach((item1, index1) => {
if(this.class_id2){ if (this.class_id2) {
if(this.class_id2==item1.class_id){ if (this.class_id2 == item1.class_id) {
item1.checkedx = true item1.checkedx = true
this.sanJlist=item1.children this.sanJlist = item1.children
}else{ } else {
item1.checkedx = false item1.checkedx = false
} }
}else{ } else {
if (index1 == 0) { if (index1 == 0) {
item1.checkedx = true item1.checkedx = true
this.sanJlist=item1.children this.sanJlist = item1.children
} else { } else {
item1.checkedx = false item1.checkedx = false
} }
...@@ -139,7 +137,7 @@ ...@@ -139,7 +137,7 @@
}) })
}) })
}else{ } else {
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
icon: 'error' icon: 'error'
...@@ -163,7 +161,7 @@ ...@@ -163,7 +161,7 @@
url: '/pages/search/list?k=' + key_ url: '/pages/search/list?k=' + key_
}); });
}, },
goUrl(){ goUrl() {
uni.navigateTo({ uni.navigateTo({
url: '/pages/search/nav' url: '/pages/search/nav'
}); });
......
...@@ -14,8 +14,7 @@ ...@@ -14,8 +14,7 @@
<view class="c">{{item.detail_address}}</view> <view class="c">{{item.detail_address}}</view>
<view class="b row bothSide"> <view class="b row bothSide">
<view class="l row verCenter" @click="setdefault(item.address_id)" v-if="!form"> <view class="l row verCenter" @click="setdefault(item.address_id)" v-if="!form">
<text class="icon iconfont icon-checked1" <text class="icon iconfont icon-checked1" :class="{'icon-checked':item.is_default==1}"></text>
:class="{'icon-checked':item.is_default==1}"></text>
<text>{{item.is_default==1?"已默认":"设为默认"}}</text> <text>{{item.is_default==1?"已默认":"设为默认"}}</text>
</view> </view>
<view v-else></view> <view v-else></view>
...@@ -27,7 +26,7 @@ ...@@ -27,7 +26,7 @@
<view class="r row verCenter"> <view class="r row verCenter">
<text @click.stop="deleteAdress(item.address_id)">删除</text> <text @click.stop="deleteAdress(item.address_id)">删除</text>
<text @click.stop="copy(item)">复制</text> <!-- <text @click.stop="copy(item)">复制</text> -->
<view @click.stop="goUpdate(item.address_id)">修改</view> <view @click.stop="goUpdate(item.address_id)">修改</view>
</view> </view>
</view> </view>
...@@ -55,57 +54,57 @@ ...@@ -55,57 +54,57 @@
data() { data() {
return { return {
isInit: false, //记录是否加载了数据 isInit: false, //记录是否加载了数据
form:"", form: "",
address_id:"", address_id: "",
invoice_id:"", invoice_id: "",
coupon_id:"", coupon_id: "",
list: [], list: [],
} }
}, },
onLoad: function(options) { onLoad: function(options) {
this.form=options.form||"" this.form = options.form || ""
this.address_id=options.address_id||"" this.address_id = options.address_id || ""
this.invoice_id=options.invoice_id||"" this.invoice_id = options.invoice_id || ""
this.coupon_id=options.coupon_id||"" this.coupon_id = options.coupon_id || ""
}, },
onShow() { onShow() {
this.getData(); this.getData();
}, },
methods: { methods: {
goUpdate(address_id){ goUpdate(address_id) {
uni.navigateTo({ uni.navigateTo({
url:'/pages/user/addressEdit?address_id=' + address_id url: '/pages/user/addressEdit?address_id=' + address_id
}) })
}, },
setChoose(address_id){ setChoose(address_id) {
if(!this.form){return} if (!this.form) { return }
let address_id_go="" let address_id_go = ""
this.list.forEach(item=>{ this.list.forEach(item => {
item.checkedx=false item.checkedx = false
if(address_id==item.address_id){ if (address_id == item.address_id) {
item.checkedx=true item.checkedx = true
address_id_go=item.address_id address_id_go = item.address_id
} }
}) })
setTimeout(()=>{ setTimeout(() => {
if(this.form=="confirmQuote"){ if (this.form == "confirmQuote") {
//报价过来 //报价过来
uni.navigateTo({ uni.navigateTo({
url: '/pages/car/confirmQuote?address_id='+address_id_go+'&coupon_id='+this.coupon_id url: '/pages/car/confirmQuote?address_id=' + address_id_go + '&coupon_id=' + this.coupon_id
}); });
return return
} }
uni.navigateTo({ uni.navigateTo({
url: '/pages/car/confirmOrder?address_id='+address_id_go+'&coupon_id='+this.coupon_id+'&invoice_id='+this.invoice_id url: '/pages/car/confirmOrder?address_id=' + address_id_go + '&coupon_id=' + this.coupon_id + '&invoice_id=' + this.invoice_id
}); });
},200); }, 200);
}, },
copy(item){ copy(item) {
uni.setClipboardData({ uni.setClipboardData({
data: (item.nation_cn!="中国"?item.nation_cn:'')+item.province_val+' '+item.city_val+' '+item.district_val+' '+item.detail_address, data: (item.nation_cn != "中国" ? item.nation_cn : '') + item.province_val + ' ' + item.city_val + ' ' + item.district_val + ' ' + item.detail_address,
success: function () { success: function() {
uni.showToast({ uni.showToast({
title: '复制成功', title: '复制成功',
icon: 'success' icon: 'success'
...@@ -164,14 +163,14 @@ ...@@ -164,14 +163,14 @@
p: 1 p: 1
} }
this.request(Api_Url + '/api/address/getList', 'GET', obj_, (loading?false:true)).then(res => { this.request(Api_Url + '/api/address/getList', 'GET', obj_, (loading ? false : true)).then(res => {
if (res.code == 0) { if (res.code == 0) {
this.isInit = 1; this.isInit = 1;
let arr_ = res.data.list || [] let arr_ = res.data.list || []
arr_.forEach(item=>{ arr_.forEach(item => {
item.checkedx=false item.checkedx = false
if(item.address_id==this.address_id){ if (item.address_id == this.address_id) {
item.checkedx=true item.checkedx = true
} }
}) })
this.list = arr_ this.list = arr_
......
...@@ -11,12 +11,12 @@ ...@@ -11,12 +11,12 @@
</view> </view>
<view class="input-group row verCenter"> <view class="input-group row verCenter">
<text class="label">手机号</text> <text class="label">手机号</text>
<picker @change="bindPickerChange($event)" :value="areaIndex" :range="areaArray" <picker @change="bindPickerChange($event)" :value="areaIndex" :range="areaArray" :range-key="'name'">
:range-key="'name'"> <view class="areabox-but ">
<text class="areabox-but "><text class="but-val">{{areaArray[areaIndex].value}}</text><text <text class="but-val">{{areaArray[areaIndex].value}}</text>
class="icon iconfont icon-arrowxia"></text></text> <text class="icon iconfont icon-arrowxia"></text>
</view>
</picker> </picker>
<input type="number" v-model="formParams.mobile" placeholder="请输入手机号" placeholder-class="placeholder-class" /> <input type="number" v-model="formParams.mobile" placeholder="请输入手机号" placeholder-class="placeholder-class" />
</view> </view>
<view class="input-group row verCenter"> <view class="input-group row verCenter">
...@@ -78,27 +78,27 @@ ...@@ -78,27 +78,27 @@
areaArray: [{ areaArray: [{
name: "0086(中国大陆)", name: "0086(中国大陆)",
value: '0086' value: '0086'
},
{
name: "00852(中国香港)",
value: '00852'
},
{
name: "00853(中国澳门)",
value: '00853'
},
{
name: "00886(中国台湾)",
value: '00886'
},
{
name: "0066(泰国)",
value: '0066'
},
{
name: "0084(越南)",
value: '0084'
} }
// {
// name: "00852(中国香港)",
// value: '00852'
// },
// {
// name: "00853(中国澳门)",
// value: '00853'
// },
// {
// name: "00886(中国台湾)",
// value: '00886'
// },
// {
// name: "0066(泰国)",
// value: '0066'
// },
// {
// name: "0084(越南)",
// value: '0084'
// }
], ],
} }
}, },
...@@ -237,7 +237,7 @@ ...@@ -237,7 +237,7 @@
return false; return false;
} }
let reg = /^1(3[0-9]|4[01456879]|5[0-35-9]|6[2567]|7[0-8]|8[0-9]|9[0-35-9])\d{8}$/; let reg = /^1(3[0-9]|4[01456879]|5[0-35-9]|6[2567]|7[0-8]|8[0-9]|9[0-35-9])\d{8}$/;
if ((!this.formParams.mobile) || ((this.formParams.intl_code=="0086")&&!reg.test(this.formParams.mobile))) { if ((!this.formParams.mobile) || ((this.formParams.intl_code == "0086") && !reg.test(this.formParams.mobile))) {
uni.showToast({ uni.showToast({
title: '请输入正确的手机号', title: '请输入正确的手机号',
icon: 'none' icon: 'none'
......
...@@ -5,38 +5,34 @@ ...@@ -5,38 +5,34 @@
<view class="cons"> <view class="cons">
<view class="input-box"> <view class="input-box">
<view class="input-group row verCenter" > <view class="input-group row verCenter">
<text class="label required">公司名称</text> <text class="label required">公司名称</text>
<input type="text" v-model="formParams.com_name" placeholder="请输入公司名称" placeholder-class="placeholder-class" /> <input type="text" v-model="formParams.com_name" placeholder="请输入公司名称" placeholder-class="placeholder-class" @blur="tianyancha()" />
</view> </view>
<view class="input-group row verCenter" > <view class="input-group row verCenter">
<text class="label required ">公司税号</text> <text class="label required ">公司税号</text>
<input type="text" v-model="formParams.tax_no" placeholder="系统自动查询后补充" placeholder-class="placeholder-class" /> <input type="text" v-model="formParams.tax_no" placeholder="系统自动查询后补充" placeholder-class="placeholder-class" />
</view> </view>
<view class="input-group row verCenter" > <view class="input-group row verCenter">
<text class="label required">公司电话</text> <text class="label required">公司电话</text>
<input type="text" v-model="formParams.com_tel" placeholder="系统自动查询后补充" placeholder-class="placeholder-class" /> <input type="text" v-model="formParams.com_tel" placeholder="系统自动查询后补充" placeholder-class="placeholder-class" />
</view> </view>
<view class="input-group row verCenter">
<view class="input-group row verCenter" >
<text class="label required">注册地址</text> <text class="label required">注册地址</text>
<input type="text" v-model="formParams.com_addr" placeholder="系统自动查询后补充" placeholder-class="placeholder-class" /> <input type="text" v-model="formParams.com_addr" placeholder="系统自动查询后补充" placeholder-class="placeholder-class" />
</view> </view>
<view class="input-group row verCenter"> <view class="input-group row verCenter">
<text class="label required" >联系人</text> <text class="label required">联系人</text>
<input type="text" v-model="formParams.contact_person" placeholder="请输入联系人" placeholder-class="placeholder-class" /> <input type="text" v-model="formParams.contact_person" placeholder="请输入联系人" placeholder-class="placeholder-class" />
</view> </view>
<view class="input-group row verCenter"> <view class="input-group row verCenter">
<text class="label required" >联系电话</text> <text class="label required">联系电话</text>
<input type="text" v-model="formParams.contact_phone" placeholder="请输入联系电话" placeholder-class="placeholder-class" /> <input type="text" v-model="formParams.contact_phone" placeholder="请输入联系电话" placeholder-class="placeholder-class" />
</view> </view>
<view class="input-group row verCenter"> <view class="input-group row verCenter">
<text class="label required">邮箱</text> <text class="label required">邮箱</text>
<input type="text" v-model="formParams.email" placeholder="请输入邮箱" placeholder-class="placeholder-class" /> <input type="text" v-model="formParams.email" placeholder="请输入邮箱" placeholder-class="placeholder-class" />
</view> </view>
</view> </view>
</view> </view>
...@@ -56,22 +52,22 @@ ...@@ -56,22 +52,22 @@
export default { export default {
data() { data() {
return { return {
id:"", id: "",
formParams:{ formParams: {
com_name: "", com_name: "",
tax_no:"" , tax_no: "",
com_tel: "", com_tel: "",
com_addr: "", com_addr: "",
contact_person:"", contact_person: "",
contact_phone:"", contact_phone: "",
email:"" email: ""
}, },
certification:[] certification: []
} }
}, },
onLoad: function(options) { onLoad: function(options) {
this.id=options.id||"" this.id = options.id || ""
if(this.id){ if (this.id) {
this.getData() this.getData()
} }
...@@ -80,86 +76,111 @@ ...@@ -80,86 +76,111 @@
}, },
methods: { methods: {
getData(){ getData() {
//获取用户信息 //获取用户信息
this.request(Api_Url + '/api/user/info', 'GET', {}, true).then(res => { this.request(Api_Url + '/api/user/info', 'GET', {}, true).then(res => {
if (res.code == 0) { if (res.code == 0) {
let arr_=res.data.certification||[] let arr_ = res.data.certification || []
this.certification=arr_.filter(item=>item.id==this.id) this.certification = arr_.filter(item => item.id == this.id)
this.formParams={ this.formParams = {
...this.certification[0] ...this.certification[0]
} }
} }
}); });
}, },
changeTab(inv_type){ /**
this.formParams.inv_type=inv_type * 天眼查
*/
tianyancha() {
if (!this.formParams.com_name) { return }
this.request(Api_Url + '/api/user/tianyancha', 'GET', { company_name: this.formParams.com_name }, false).then(res => {
if (res.code == 0) {
if (!res.data.com_name) {
uni.showToast({
title: '天眼查没有查到该公司信息',
icon: 'none'
});
}
this.formParams.com_name = res.data.com_name;
this.formParams.tax_no = res.data.tax_number;
this.formParams.com_tel = res.data.phone_number;
this.formParams.com_addr = res.data.com_address;
} else {
uni.showToast({
title: res.msg,
icon: 'none'
});
}
});
},
changeTab(inv_type) {
this.formParams.inv_type = inv_type
console.log(this.formParams.inv_type) console.log(this.formParams.inv_type)
}, },
onSwitchChange(e) { onSwitchChange(e) {
this.formParams.is_default = e.detail.value ? 1 : 0; this.formParams.is_default = e.detail.value ? 1 : 0;
}, },
submitI(){ submitI() {
if(!this.formParams.com_name){ if (!this.formParams.com_name) {
uni.showToast({ uni.showToast({
title: '公司名称不能为空', title: '公司名称不能为空',
icon: 'none' icon: 'none'
}); });
return; return;
} }
if(!this.formParams.tax_no){ if (!this.formParams.tax_no) {
uni.showToast({ uni.showToast({
title: '公司税号不能为空', title: '公司税号不能为空',
icon: 'none' icon: 'none'
}); });
return; return;
} }
if(!this.formParams.com_tel){ if (!this.formParams.com_tel) {
uni.showToast({ uni.showToast({
title: '公司电话不能为空', title: '公司电话不能为空',
icon: 'none' icon: 'none'
}); });
return; return;
} }
if(!this.formParams.com_addr){ if (!this.formParams.com_addr) {
uni.showToast({ uni.showToast({
title: '注册地址不能为空', title: '注册地址不能为空',
icon: 'none' icon: 'none'
}); });
return; return;
} }
if(!this.formParams.contact_person){ if (!this.formParams.contact_person) {
uni.showToast({ uni.showToast({
title: '联系人不能为空', title: '联系人不能为空',
icon: 'none' icon: 'none'
}); });
return; return;
} }
if(!this.formParams.contact_phone){ if (!this.formParams.contact_phone) {
uni.showToast({ uni.showToast({
title: '联系电话不能为空', title: '联系电话不能为空',
icon: 'none' icon: 'none'
}); });
return; return;
} }
if(!this.formParams.email){ if (!this.formParams.email) {
uni.showToast({ uni.showToast({
title: '邮箱不能为空', title: '邮箱不能为空',
icon: 'none' icon: 'none'
}); });
return; return;
} }
let url='/api/com/add' let url = '/api/com/add'
if(this.id){ if (this.id) {
this.formParams.id=this.id this.formParams.id = this.id
url='/api/com/edit' url = '/api/com/edit'
} }
this.request(Api_Url + url, 'POST', this.formParams, true).then(res => { this.request(Api_Url + url, 'POST', this.formParams, true).then(res => {
if (res.code == 0) { if (res.code == 0) {
uni.showToast({ uni.showToast({
title: this.id?'编辑成功':'新增成功', title: this.id ? '编辑成功' : '新增成功',
icon: 'success' icon: 'success'
}); });
setTimeout(() => { setTimeout(() => {
......
let _env = "" let _env = ""
let api_url="" let api_url = ""
if (process.env.UNI_PLATFORM === 'h5') { // 判断是否为 H5 平台 if (process.env.UNI_PLATFORM === 'h5') { // 判断是否为 H5 平台
if (process.env.NODE_ENV === 'production') { // H5 生产环境 if (process.env.NODE_ENV === 'production') { // H5 生产环境
_env = 'release' _env = 'release'
...@@ -8,7 +8,7 @@ if (process.env.UNI_PLATFORM === 'h5') { // 判断是否为 H5 平台 ...@@ -8,7 +8,7 @@ if (process.env.UNI_PLATFORM === 'h5') { // 判断是否为 H5 平台
} }
api_url = _env == 'release' ? 'https://www.iedge.net' : '' api_url = _env == 'release' ? 'https://www.iedge.net' : ''
console.log(api_url,_env) console.log(api_url, _env)
} else if (process.env.UNI_PLATFORM === 'mp-weixin') { // 判断是否为微信小程序平台 } else if (process.env.UNI_PLATFORM === 'mp-weixin') { // 判断是否为微信小程序平台
_env = uni.getAccountInfoSync().miniProgram.envVersion //develop: trial: release: _env = uni.getAccountInfoSync().miniProgram.envVersion //develop: trial: release:
// if (_env != 'develop') { // if (_env != 'develop') {
...@@ -18,12 +18,11 @@ if (process.env.UNI_PLATFORM === 'h5') { // 判断是否为 H5 平台 ...@@ -18,12 +18,11 @@ if (process.env.UNI_PLATFORM === 'h5') { // 判断是否为 H5 平台
api_url = _env == 'release' ? 'https://www.iedge.net' : 'http://iedge.liexindev.net' api_url = _env == 'release' ? 'https://www.iedge.net' : 'http://iedge.liexindev.net'
//api_url ='https://www.iedge.net' //api_url = 'https://www.iedge.net'
console.log(api_url,_env) console.log(api_url, _env)
} else { // 其他平台(如 App 等) } else { // 其他平台(如 App 等)
} }
export const Api_Url=api_url export const Api_Url = api_url
\ No newline at end of file
...@@ -4,7 +4,7 @@ export default { ...@@ -4,7 +4,7 @@ export default {
miniShareOptions: { miniShareOptions: {
title: '爱智工业平台', title: '爱智工业平台',
path: '/pages/index/index', path: '/pages/index/index',
imageUrl: 'https://img.ichunt.com/images/ichunt/202503/11/8bd43dcc1b28a3fd8c417ac0c6410406.png', imageUrl: 'https://img.ichunt.com/images/ichunt/202503/19/cdaebc710d636541b8d9916210b46a49.png',
desc: '' desc: ''
} }
}; };
...@@ -24,7 +24,7 @@ export default { ...@@ -24,7 +24,7 @@ export default {
return { return {
title: '爱智工业平台', title: '爱智工业平台',
path: '/pages/index/index', path: '/pages/index/index',
imageUrl: 'https://img.ichunt.com/images/ichunt/202503/11/8bd43dcc1b28a3fd8c417ac0c6410406.png', imageUrl: 'https://img.ichunt.com/images/ichunt/202503/19/cdaebc710d636541b8d9916210b46a49.png',
success: () => { success: () => {
uni.showToast({ title: '分享成功', icon: 'success' }); uni.showToast({ title: '分享成功', icon: 'success' });
}, },
......
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 sign in to comment