问题修改

cyl/develop
wangxia 12 months ago
parent 04ab639abf
commit 5864631f00

@ -571,6 +571,9 @@ App({
},
});
},
/**
* 点击震感反馈
*/
vibrateShort () {
wx.vibrateShort({
type: "heavy",
@ -579,6 +582,9 @@ App({
},
});
},
/**
* 小程序分享配置
*/
sharePageImage (path = "/pages/firstBill/index", image = "https://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/fenxiang2025.png", title = " ") {
let params = {
path: path,
@ -589,6 +595,9 @@ App({
console.log('分享数据:', params)
return params;
},
/**
* 内容复制
*/
copyFun (data, callBack) {
wx.setClipboardData({
data,

@ -21,8 +21,8 @@ Component({
value: {},
},
agencyStatus: {
type: Boolean,
value: true
type: Number,
value: 0
},
hasUserInfo: {
type: Number,

@ -76,7 +76,7 @@
<image class="mr4" style="width:20px;height:20px;display:block" src="https://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/fee.svg" mode="aspecFill" lazy-load="false"></image>
</view>
<view class style="font-size:13px" wx:if="{{!isLogin}}" hover-class="none" hover-stop-propagation="false">登录查看</view>
<view class style="font-size:13px" wx:else hover-class="none" hover-stop-propagation="false">{{(item.picked || corpUserFlag) ? (agencyStatus == 1 ? (item.fuWuFei ? item.fuWuFei : '详询客服') : '仅代理可见') : '详询客服' }}</view>
<view class style="font-size:13px" wx:else hover-class="none" hover-stop-propagation="false">{{(agencyStatus == 1 ? (item.fuWuFei ? item.fuWuFei : '详询客服') : '仅代理可见') }}</view>
</view>
</view>
</view>

@ -0,0 +1,43 @@
const app = getApp()
// let app = null;
Component({
data: {
labelColor: ["#c41d7f", "#096dd9", "#531dab", "#d46b08", "#389e0d", "#08979c", "#cf1322"],
bgColor: ["#fff0f6", "#e6f7ff", "#f9f0ff", "#fff7e6", "#f6ffed", "#e6fffb", "#fff1f0"],
corpUserFlag: false,
serviceInfo: {}
},
properties: {
// 抽屉高度
showModal: {
type: Boolean,
value: false,
},
},
lifetimes: {
attached: function () {
this.setData({
serviceInfo: app.globalData.serviceInfo,
});
// 在组件实例进入页面节点树时执行
},
detached: function () {
// 在组件实例被从页面节点树移除时执行
},
},
ready () {
// console.log('app.globalData.loginUserInfo.corpUserFlag', app.globalData.loginUserInfo.corpUserFlag);
console.log('this.properties.loginUserInfo', this.properties.loginUserInfo);
// app.getLoginUserTokenInfo().then(() => {
// });
},
methods: {
closeDialog () {
this.setData({
showModal: false
})
}
}
})

@ -0,0 +1,3 @@
{
"component": true
}

@ -0,0 +1,25 @@
<view aria-role="dialog" aria-modal="true" catchtouchmove="modalMove" class="fadeIn" wx:if="{{showModal}}">
<view class="weui-mask"></view>
<view class="weui-dialog contact" style="box-sizing:border-box;">
<view class="weui-dialog__hd">
<!-- <strong class="weui-dialog__title">17639080029</strong></view> -->
<!-- <view class="weui-dialog__bd">
<view>现在登录吗?</view>
</view>-->
<!-- <image src="https://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/service.jpg" style="width:56px;height:56px;"></image> -->
<!-- <image src="../../assets/Snipaste_2023-06-13_09-25-14.png" show-menu-by-longpress='{{true}}' style="width:56px;height:56px;"></image> -->
<i class="iconfont icon-guanbi guanbi c6 biggerSize" bindtap="closeDialog"></i>
<view class="f16 c3 fw500 mb32">加客户经理微信</view>
<view wx:if="{{isLoading}}" class style="position:absolute;left:50%;top:50%;transform:translate(-50%,-50%)" hover-class="none" hover-stop-propagation="false">
<view aria-role="img" aria-label="加载中" style class="weui-primary-loading">
<view class="weui-primary-loading__dot"></view>
</view>
<view class hover-class="none" hover-stop-propagation="false">加载中...</view>
</view>
<image src="{{serviceInfo.qrCode}}" bindload="imageLoad" show-menu-by-longpress="{{true}}" style="width: 184px;height: 184px;"></image>
<!-- <view class="f14 c9">人才经纪人</view> -->
<!-- <view class="mt20 f22 c3">{{pmdUserInfo.tel}}</view> -->
<view class="f14 c3 mt6">长按识别二维码</view>
</view>
</view>
</view>

@ -0,0 +1,37 @@
@import "../../app.wxss";
/*
成为代理二维码弹窗
*/
.weui-mask {
background: rgba(0, 0, 0, 0.6);
}
.weui-dialog {
position: fixed;
z-index: 5000;
top: 50%;
left: 50%;
-webkit-transform: translateY(-50%);
transform: translate(-50%, -50%);
background-color: var(--weui-BG-2);
text-align: center;
border-radius: 12px;
overflow: hidden;
display: -webkit-box;
display: -webkit-flex;
display: flex;
-webkit-flex-direction: column;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
flex-direction: column;
max-height: 90%;
outline: 0;
}
.weui-mask,
.weui-mask_transparent {
position: fixed;
z-index: 1000;
top: 0;
right: 0;
left: 0;
bottom: 0;
}

@ -40,7 +40,7 @@
<icon class="iconfont {{isServicePriceShow ? 'icon-zhengyan1' : 'icon-biyan1'}} ysd-base-f40 f22 h67 g_flex_column_center" color data-index="{{isServicePriceShow ? 1 : 2}}" wx:if="{{isAgency}}" catchtap="toggleprice" style="width: 67px;"></icon>
</view>
<view class="fse h67" hover-class="none" hover-stop-propagation="false" style="flex: 1;">
<span class wx:if="{{isServicePriceShow && isAgency}}">{{ (jobDetail.record.picked || corpUserFlag) ? (fuWuFei || '详询客服') : '详询客服'}}</span>
<span class wx:if="{{isServicePriceShow && isAgency}}">{{ (fuWuFei || '详询客服')}}</span>
<span class wx:else>***</span>
<view class="iconfont icon-you f14 c045 ml4" hover-class="none" hover-stop-propagation="false"></view>
</view>

@ -10,6 +10,7 @@ Page({
isLogin: app.globalData.isLogin,
serviceInfo: {},
iosDialog: false,
showModalShow: false,
isLoading: true,
messageClick: false,
infoList: [],
@ -164,7 +165,7 @@ Page({
*/
onHide () {
this.setData({
iosDialog: false,
showModalShow: false,
});
},
@ -201,7 +202,7 @@ Page({
showdialog () {
this.setData({
iosDialog: true,
showModalShow: true,
loading: true,
});
},
@ -270,4 +271,12 @@ Page({
});
}
},
makePhoneCall () {
console.log(1);
var that = this;
wx.makePhoneCall({
// number: that.data.jobDetail.assistantUserTel + ""
phoneNumber: that.data.serviceInfo.workPhone || "0371-6611 3723",
});
},
});

@ -1,5 +1,7 @@
{
"usingComponents": {},
"usingComponents": {
"service-modal":"../../components/service-modal"
},
"navigationBarTitleText" : "消息",
"navigationBarBackgroundColor": "#fff",
"backgroundColor": "#f5f5f5",

@ -1,4 +1,23 @@
<view class="container">
<view class="servicebox bb1 br8 fsa">
<view class="serviceinfo display-flex" style="flex:1" hover-class="none">
<view class="mr10">
<image wx:if="{{serviceInfo.avatar}}" style="display:block" class="br_8" src="{{serviceInfo.avatar}}" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror bindload></image>
<image wx:else class="br_8" style="display:block" src="https://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/service.jpg" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror bindload></image>
</view>
<view class="servicenamebox">
<view class="mb2 f18 fw500">客户经理</view>
<view class="c3 f16 fss">
<view class="oelps mr4 f14" style="max-width:30%">{{serviceInfo.userName }}</view>
<p class="f14" style="">{{serviceInfo.tel || '0371-6611 3723'}}</p>
</view>
</view>
</view>
<view class='fss' hover-class="none" hover-stop-propagation="false">
<i class="t-icon t-icon-dianhua mr8" bindtap="makePhoneCall" hover-class="thover" style="width:40px;height:40px "></i>
<i class="t-icon t-icon-qiyeweixin1" bindtap="showdialog" hover-class="thover" style="width:40px;height:40px "></i>
</view>
</view>
<navigator wx:for="{{list}}" wx:item="item" class="fss sub bb1" target url="{{item.url}}" hover-class="navigator-hover" open-type="navigate">
<view class="mr12">
<image class="noticImg" style="display:block" src="{{item.img}}" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror bindload></image>
@ -23,4 +42,5 @@
<view class="c9">内容内容内容内容内容内容</view>
</view>
</navigator>-->
<service-modal showModal='{{showModalShow}}'/>
</view>

@ -13,3 +13,15 @@
background-color: #fff;
/* border-radius: 8px; */
}
.servicebox {
padding: 12px;
/* padding-bottom: 0; */
/* padding-right: 10px; */
background-color: #fff;
}
.servicebox .serviceinfo {
}
.servicebox .serviceinfo image {
width: 52px;
height: 52px;
}

@ -9,6 +9,7 @@ Page({
* 页面的初始数据
*/
data: {
// appId: '1' || app.globalData.appId,
appId: app.globalData.appId,
pageShow: true,
isopen: 1, // 账户余额是否显示
@ -66,7 +67,8 @@ Page({
jobCategoryLabelIds: "",
ucj: 0,
},
recordList: []
recordList: [],
myService: []
// agencyStatus: 0, // 是否是代理判断
},
@ -89,7 +91,53 @@ Page({
this.getTeamList()
}
this.getJobList()
this.setData({
myService: this.data.appId == 'wxe431e0b3abd9ae0b' ? [
{
name: '证件',
url: '/pages/addUserCard/index',
icon: 'https://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/zjb.svg'
},
{
name: '银行卡',
url: '/pages/addCard/index',
icon: 'https://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/yhkb.svg'
},
{
name: '地址本',
url: '/subPage/addressBook/index',
icon: 'https://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/dzbb.svg'
},
{
name: '反馈与建议',
url: '/pages/opinion/index',
icon: 't-icon-fankuiyujianyi',
iconType: 'icon'
},
{
name: '设置',
url: '/pages/setting/index',
icon: 't-icon-shezhi1',
iconType: 'icon'
}
] : [
{
name: '证件',
url: '/pages/addUserCard/index',
icon: 'https://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/zjb.svg'
},
{
name: '银行卡',
url: '/pages/addCard/index',
icon: 'https://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/yhkb.svg'
},
{
name: '地址本',
url: '/subPage/addressBook/index',
icon: 'https://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/dzbb.svg'
},
]
})
}, 100);
},
hidedrawershow (e) {
@ -284,7 +332,6 @@ Page({
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
console.log(123);
this.setData({
iosDialog: false,

@ -4,7 +4,7 @@
<scroll-view bindscrolltolower="onScrollToLower" style="height:calc(100vh - 90px)" enable-passive scroll-x="{{false}}" scroll-y="{{true}}">
<view class="pl10 pr10" hover-class="none" hover-stop-propagation="false">
<navigator class target url="/pages/userDetail/index" hover-class="none" open-type="navigate" wx:if="{{isLogin}}">
<view class="userinfobox">
<view class="userinfobox mt10">
<view class="userinfo">
<block wx:if="{{userInfo.user.imgSrc}}">
<view class="por mr12" style="height:56px" hover-class="none" hover-stop-propagation="false">
@ -260,30 +260,104 @@
</view>
</view>
</view>-->
<!-- 职位信息 -->
<view class="bgf p16 mt10 tac br8 fsa" wx:if="{{appId == 'wxe431e0b3abd9ae0b'}}">
<view class>
<view class="fw500 f20 mb4">10/90</view>
<view class="f15 c9">今日/职位数</view>
</view>
<view class>
<view class="fw500 f20 mb4">102</view>
<view class="f15 c9">关注发单号</view>
</view>
<view class>
<view class="fw500 f20 mb4">180</view>
<view class="f15 c9">我的粉丝</view>
</view>
</view>
<!-- 切换团队 -->
<view class>
<!-- <navigator wx:if="{{userInfo.agencyStatus == 1 && configInfo.team}}" class url="/pages/myMember/index" ></navigator> -->
<view class="br_8" catchtap="showToggle" hover-class="none" style="background-color:#fff" hover-stop-propagation="false" wx:if="{{isLogin && userInfo.agencyStatus == 1 && configInfo.team}}">
<view class="setting mt_10" hover-class="thover">
<view style="flex: none;">
<view class="t-icon t-icon-qiehuantuandui mr6" style="width:24px;height:24px"></view>
<view class hover-class="none" style="line-height:16px" hover-stop-propagation="false">
<view class="f16 display-flex c3" style="line-height:16px">当前团队</view>
</view>
</view>
<view style="flex: 1;" class="g_flex_column_center">
<view class="g_flex_row_end" style="width: 100%;position: relative;top: 3px;">
<view class="g_flex_column_center g_flex_1">
<view class="g_flex_1 g_ell_1" style="text-align: right;">{{userInfo.agencyName || '-'}}</view>
</view>
<view class="g_flex_column_center g_flex_none">
<view class="iconfont icon-gengduo11 f16 c9 ml4 mt2"></view>
</view>
</view>
</view>
</view>
</view>
</view>
<!-- 发单, 代理 -->
<view class="fsa mt10" wx:if="{{appId == 'wxe431e0b3abd9ae0b'}}">
<view class="fss p12 bgf br8 flex-1 mr10">
<view class>
<view class="t-icon t-icon-qiehuantuandui mr6" style="width:24px;height:24px"></view>
</view>
<view class="ml8">
<view class="f18 fw500">我要发单</view>
<view class="f12 c9">快速创建新职位</view>
</view>
</view>
<view class="fss p12 bgf br8 flex-1 mr10">
<view class>
<view class="t-icon t-icon-qiehuantuandui mr6" style="width:24px;height:24px"></view>
</view>
<view class="ml8">
<view class="f18 fw500">发展代理</view>
<view class="f12 c9">让更多代理关注我</view>
</view>
</view>
</view>
<!-- 我的服务 -->
<view class="myserve mt_10 br_8">
<view class="title bb1" hover-class="none" hover-stop-propagation="false">
<view class="title bb1">
<view class="ml16 f16 c3 fw500">我的服务</view>
</view>
<view class="content">
<view>
<view class wx:for="{{myService}}">
<navigator class target url="{{isLogin? item.url : '/pages/login/index'}}" hover-class="thover" open-type="navigate">
<view wx:if="{{item.iconType == 'icon'}}" class="t-icon {{item.icon}} ticon" style="width:22px;height:22px"></view>
<image wx:else class src="{{item.icon}}" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror bindload></image>
<view>{{item.name}}</view>
</navigator>
</view>
<!-- <view>
<navigator class target url="{{isLogin? '/pages/addUserCard/index': '/pages/login/index'}}" hover-class="thover" open-type="navigate">
<image class src="https://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/zjb.svg" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror bindload></image>
<view>证件</view>
</navigator>
</view>
<!-- <view>
<navigator class="" target="" url="/pages/collect/index" hover-class="thover" open-type="navigate">
<image class="" src="/assets/images/sc.svg" mode="aspectFit | aspectFill | widthFix" lazy-load="false" binderror="" bindload=""></image>
<view>我的收藏</view>
</navigator>
</view>-->
<view>
<navigator class target url="{{isLogin? '/pages/addCard/index': '/pages/login/index'}}" hover-class="thover" aria-role="navigate" open-type="navigate">
<image class src="https://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/yhkb.svg" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror bindload></image>
<view>银行卡</view>
</navigator>
</view>
<view>
<navigator class target url="{{isLogin? '/subPage/addressBook/index': '/pages/login/index'}}" hover-class="thover" open-type="navigate">
<image class src="https://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/dzbb.svg" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror bindload></image>
<view>地址本</view>
</navigator>
</view>-->
<!-- <view>
<navigator class="" target="" url="/pages/collect/index" hover-class="thover" open-type="navigate">
<image class="" src="/assets/images/sc.svg" mode="aspectFit | aspectFill | widthFix" lazy-load="false" binderror="" bindload=""></image>
<view>我的收藏</view>
</navigator>
</view>-->
<!-- <view>
<navigator class="" target="" url="/pages/myEnroll/index" hover-class="none" open-type="navigate">
<image class="" src="/assets/images/wdbm.svg" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload=""></image>
@ -294,12 +368,7 @@
<image class="" src="/assets/images/wdlx.svg" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload=""></image>
<view>我的老乡</view>
</view>-->
<view>
<navigator class target url="{{isLogin? '/subPage/addressBook/index': '/pages/login/index'}}" hover-class="thover" open-type="navigate">
<image class src="https://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/dzbb.svg" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror bindload></image>
<view>地址本</view>
</navigator>
</view>
<!-- <view>
<navigator class target url="{{isLogin? '/pages/configAnnunciate/index': '/pages/login/index'}}" hover-class="thover" aria-role="navigate" open-type="navigate">
<image class src="https://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/yhkb.svg" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror bindload></image>
@ -314,7 +383,7 @@
</view>-->
</view>
</view>
<view class="servicebox mt_10 br8 fsa">
<view class="servicebox mt_10 br8 fsa" wx:if="{{false}}">
<view class="serviceinfo display-flex" style="flex:1" hover-class="none">
<view class="mr10">
<image wx:if="{{serviceInfo.avatar}}" style="display:block" class="br_8" src="{{serviceInfo.avatar}}" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror bindload></image>
@ -352,31 +421,9 @@
</view>
</view>-->
</view>
<!-- 切换团队 -->
<view class hover-class="none" hover-stop-propagation="false">
<!-- <navigator wx:if="{{userInfo.agencyStatus == 1 && configInfo.team}}" class url="/pages/myMember/index" hover-class="none" hover-stop-propagation="false"></navigator> -->
<view class="br_8" catchtap="showToggle" hover-class="none" style="background-color:#fff" hover-stop-propagation="false" wx:if="{{isLogin && userInfo.agencyStatus == 1 && configInfo.team}}">
<view class="setting mt_10" hover-class="thover">
<view style="flex: none;">
<view class="t-icon t-icon-qiehuantuandui mr6" style="width:24px;height:24px" hover-class="none" hover-stop-propagation="false"></view>
<view class hover-class="none" style="line-height:16px" hover-stop-propagation="false">
<view class="f16 display-flex c3" style="line-height:16px" hover-class="none" hover-stop-propagation="false">当前团队</view>
</view>
</view>
<view style="flex: 1;" class="g_flex_column_center">
<view class="g_flex_row_end" style="width: 100%;position: relative;top: 3px;">
<view class="g_flex_column_center g_flex_1">
<view class="g_flex_1 g_ell_1" style="text-align: right;">{{userInfo.agencyName || '-'}}</view>
</view>
<view class="g_flex_column_center g_flex_none">
<view class="iconfont icon-gengduo11 f16 c9 ml4 mt2"></view>
</view>
</view>
</view>
</view>
</view>
</view>
<navigator class hover-class style target url="{{isLogin? '/pages/opinion/index': '/pages/login/index'}}">
<view class wx:if="{{appId !== 'wxe431e0b3abd9ae0b'}}" hover-class="none" hover-stop-propagation="false">
<navigator class url="{{isLogin? '/pages/opinion/index': '/pages/login/index'}}">
<view class="br_8" hover-class="none" style="background-color:#fff" hover-stop-propagation="false">
<view class="setting mt_10" hover-class="thover">
<view>
@ -401,15 +448,16 @@
</view>
</navigator>
</view>
</view>
<!-- #if MP -->
<view class wx:if="{{appId == 'wxe431e0b3abd9ae0b'}}" hover-class="none" hover-stop-propagation="false">
<view class="mt10" wx:if="{{appId == 'wxe431e0b3abd9ae0b'}}" hover-class="none" hover-stop-propagation="false">
<view class="tab_container fsa sticky" hover-class="none" hover-stop-propagation="false">
<view wx:for="{{tabGroup}}" class="tarbar" style="margin-right: 24px;text-align:center" data-item="{{item}}" bindtap="collectChange">
<view wx:for="{{tabGroup}}" class="tarbar" style="margin-right: {{ index < 2 ? '24px':''}};text-align:center" data-item="{{item}}" bindtap="collectChange">
<view class="tarbarText {{choiceCollect == item.key?'collectActive':''}}">{{item.name}}</view>
<!-- <image wx:if="{{toped == '1'}}" src="../../assets/images/border-circle.svg" class="tarbarImg"></image> -->
</view>
</view>
<view class="mt12" style='min-height:80vh' hover-class="none" hover-stop-propagation="false">
<view class="mt12" style="min-height:80vh" hover-class="none" hover-stop-propagation="false">
<job-sub storeJobListSearchForm="{{storeJobListSearchForm}}" type="main" recordList="{{recordList}}" isLogin="{{isLogin}}" agencyStatus="{{userInfo.agencyStatus}}" hasUserInfo="{{hasUserInfo}}" loginUserInfo="{{userInfo}}"></job-sub>
<view wx:if="{{(recordList == null || recordList.length == 0) }}" class="tc">
<block wx:if="{{pageShow}}">
@ -465,12 +513,6 @@
<!-- <view class="mt20 f22 c3">{{pmdUserInfo.tel}}</view> -->
<view class="f14 c3 mt6">长按识别二维码</view>
</view>
<!-- <view class="display-flex contact_bottomBtn pb20" style="padding-top:20px;">
<view class="flex-1 lflex v-center" bindtap="closeDialog" hover-class="thover">取消</view>
<view class="rflex">
<button class="" type="primary" hover-class="thover" bindtap="makePhoneCall">呼叫</button>
</view>
</view>-->
</view>
</view>
<view aria-role="dialog" catchtouchmove="modalMove" aria-modal="true" class="fadeIn" wx:if="{{iosDialogTobe}}">

@ -5,7 +5,8 @@ page {
}
.container {
/* height: 100vh; */
padding: 10px 0;
/* margin-top: 10px; */
padding: 0;
overflow: auto;
}
.container .no_login {
@ -378,10 +379,10 @@ page {
display: flex;
justify-content: space-between;
align-items: center;
padding: 12px;
margin: 0 10px;
padding: 12px 24px;
/* margin: 0 10px; */
background-color: #fff;
border-radius: 8px;
/* border-radius: 8px; */
box-shadow: 0px 4px 4px 0px rgba(218, 218, 218, 0.5);
}
.sticky {

@ -1,6 +1,7 @@
// pages/opinion/index.js
const app = getApp();
import { customRequest } from '../../utils/request.js';
import { uploadImg } from "../../utils/commonUtil.js";
Page({
/**
* 页面的初始数据
@ -10,6 +11,9 @@ Page({
loading: false,
subLoad: false,
success: false,
troubleList: ["投诉", "建议", "故障", "其他"],
troubleIndex: 0,
imgList: []
},
/**
@ -40,7 +44,12 @@ Page({
that.setData({
loading: true,
});
customRequest("/daotian/feedback/add",{header:'headers', method: 'post', data: {content: that.data.textVal}}).then((res)=>{
customRequest("/daotian/feedback/add", {
header: 'headers', method: 'post', data: {
content: that.data.textVal, classify: that.data.troubleIndex + 1,
imgs: that.data.imgList.join(","),
}
}).then((res) => {
console.log(res);
if (res.data.status == 200) {
that.setData({
@ -62,42 +71,12 @@ Page({
loading: false,
});
})
// wx.request({
// url: app.globalData.ip + "/daotian/feedback/add",
// method: 'post',
// header: app.globalData.headers,
// data: {
// content: that.data.textVal
// },
// success: function (res) {
// console.log(res);
// if (res.data.status == 200) {
// that.setData({
// success: true,
// });
// } else {
// wx.showToast({
// title: res.data.msg,
// icon: 'none'
// })
// }
// that.setData({
// loading: false,
// });
// that.data.subLoad = false
// },
// fail: function (res) {
// that.setData({
// loading: false,
// });
// },
// });
} else {
wx.showToast({
title: '请输入内容再提交',
icon: 'none'
})
that.data.subLoad = false
}
@ -109,6 +88,34 @@ Page({
})
console.log(this.data.textVal);
},
uploadImg () {
let that = this
uploadImg(4, (res) => {
console.log(res);
if (res.status == 200 && that.data.imgList.length < 4) {
if (that.data.imgList.length > 4) {
wx.showToast({
title: '最多上传4张图片',
})
} else {
that.data.imgList.push(res.data)
}
}
that.setData({
imgList: that.data.imgList
})
})
},
delImg (e) {
let ind = e.currentTarget.dataset.ind
this.data.imgList.splice(
this.data.imgList.findIndex((item, index) => index == ind),
1
);
this.setData({
imgList: this.data.imgList
})
},
goback () {
wx.navigateBack({
delta: 1,
@ -119,6 +126,11 @@ Page({
url: "/pages/opinionList/index",
});
},
changeType (e) {
this.setData({
troubleIndex: e.currentTarget.dataset.index
})
},
/**
* 生命周期函数--监听页面隐藏
*/

@ -1,8 +1,29 @@
<view class="container">
<view class="submit" wx:if="{{!success}}" hover-class="none" hover-stop-propagation="false">
<textarea class="bgf textarea br8 f14" value="{{textVal}}" bindinput="getVal" maxlength="140" placeholder="我们想听到您的心声..." placeholder-class="f14 cccc" bindfocus bindconfirm></textarea>
<button class="normalBtn loginOut f16" hover-class="thover" bindtap="submit" style="margin-top:90px" loading="{{loading}}">提交</button>
<view class="tac mt16 f14" style="color:#576B95" bindtap="goList" hover-class="thover" hover-stop-propagation="false">查看记录</view>
<view class hover-class="none" hover-stop-propagation="false">
<view class="fss mb12 mt4" hover-class="none" hover-stop-propagation="false">
<block wx:for="{{troubleList}}">
<view class="sub_type {{troubleIndex == index ? 'active' : ''}}" data-index="{{index}}" bindtap="changeType" hover-class="none" hover-stop-propagation="false">{{item}}</view>
</block>
</view>
<view class="bgf br8 f14" hover-class="none" hover-stop-propagation="false">
<textarea class="textarea" value="{{textVal}}" bindinput="getVal" maxlength="150" placeholder="我们想听到您的心声..." placeholder-class="f14 cccc" bindfocus bindconfirm></textarea>
<view class="tr f12 pr12 pb12">{{ textVal.length }}/150</view>
</view>
<view class="imgUpload" hover-class="none" hover-stop-propagation="false">
<view class="fss" hover-class="none" hover-stop-propagation="false">
<view wx:for="{{imgList}}" class="{{index <= 2 ? 'mr18' : ''}} por mr12">
<i class="iconfont icon-guanbi close" bindtap="delImg" data-ind="{{index}}"></i>
<image src="{{item}}" style="width:72px;height:72px" class="br8" />
</view>
<image wx:if="{{imgList.length < 4}}" class="br8" style="width:72px;height:72px" src="https://matripe-cms.oss-cn-beijing.aliyuncs.com/dailibaoming/my_uploadphotos.svg" bindtap="uploadImg" />
</view>
<view class="c9 f12 mt8" hover-class="none" hover-stop-propagation="false">上传照片截图最多传4张选填</view>
</view>
<button class="normalBtn loginOut f16" hover-class="thover" bindtap="submit" style="margin-top:65px" loading="{{loading}}">提交</button>
</view>
<view class="tac mt16 mb32 f14" style="color:#576B95" bindtap="goList" hover-class="thover" hover-stop-propagation="false">查看记录</view>
</view>
<view class="success" wx:else hover-class="none" hover-stop-propagation="false">
<view class="tc" style="padding-top: 100px;">

@ -3,9 +3,15 @@
height: 100vh;
box-sizing: border-box;
}
.submit{
height: 100%;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.textarea {
width: 100%;
height: 200px;
/* height: 200px; */
padding: 12px;
line-height: 20px;
box-sizing: border-box;
@ -13,3 +19,31 @@
.lh20{
line-height: 20px;
}
.sub_type{
padding: 4px 14px;
font-size: 14px;
margin-right: 12px;
border-radius: 20px;
background-color: #fff;
}
.active{
color: #fff;
background-color: var(--color-ysd);
}
.imgUpload{
margin-top: 16px;
}
.close {
position: absolute;
width: 18px;
height: 18px;
right: -6px;
top: -6px;
z-index: 99;
background-color: #666;
color: #fff;
font-size: 8px;
text-align: center;
line-height: 18px;
border-radius: 50%;
}

@ -27,7 +27,7 @@ Page({
{ id: 1, name: '按日', unit: '元/日', checked: false },
{ id: 2, name: '按月', unit: '元/月', checked: false },
{ id: 3, name: '按次', unit: '元/次', checked: false },
{ id: 4, name: '按件', unit: '元/公斤', checked: false },
{ id: 4, name: '按件', unit: '元/', checked: false },
{ id: 5, name: '按百分比', unit: '%', checked: false },
{ id: 6, name: '总计', unit: '元', checked: false },
],

@ -44,7 +44,7 @@
"tabIndent": "insertSpaces",
"tabSize": 2
},
"appid": "wxe431e0b3abd9ae0b",
"appid": "wxb0dea4d11428c6a5",
"packOptions": {
"ignore": [],
"include": []

@ -1079,7 +1079,7 @@ export function returnFeeTypeArray (value) {
{ id: 1, value: "1", text: "按日", name: "天", name1: `${value}元/日` },
{ id: 2, value: "2", text: "按月", name: "月", name1: `${value}元/月` },
{ id: 3, value: "3", text: "按次", name: "次", name1: `${value}元/次` },
{ id: 4, value: "4", text: "按件", name: "件", name1: `${value}元/公斤` },
{ id: 4, value: "4", text: "按件", name: "件", name1: `${value}元/` },
{ id: 5, value: "5", text: "百分比", name: "百分比", name1: `工人收入${value}%` },
{ id: 6, value: "6", text: "共计", name: "人", name1: `${value}` },
{ id: 7, value: "7", name1: "费用待定" },
@ -1784,3 +1784,51 @@ export function roundRect1 (ctx, x, y, w, h, r, color) {
ctx.stroke();
ctx.closePath();
}
export function choiceImg ($num = 1) {
return new Promise((resolve) => {
wx.chooseImage({
count: $num,
sizeType: ["original", "compressed"],
sourceType: ["album", "camera"],
success (res) {
console.log();
// debugger;
resolve(res)
},
});
})
}
export function uploadImg ($num = 1, callBack = () => { }) {
choiceImg($num).then((res) => {
console.log('res', res);
const tempFilePaths = res.tempFilePaths;
tempFilePaths.forEach((item, index) => {
wx.uploadFile({
url: "https://daotian.matripe.com.cn/imgs/uploadImage",
method: "post",
// data:currData,
// name: "uploadFile",
filePath: tempFilePaths[index],
name: "uploadFile",
header: {
"content-type": "application/x-www-form-urlencoded",
Authorization: "",
Cookie: "",
appId: wx.getAccountInfoSync().miniProgram.appId,
"g-open-env": 'MP_MINI',
appClassify: 1,
},
success: function (res) {
console.log(res);
let val = JSON.parse(res.data);
callBack(val)
},
fail: function (res) {
let val = JSON.parse(res.data);
callBack(val)
},
});
})
})
}

Loading…
Cancel
Save