diff --git a/app.js b/app.js index 2042b90..92a1fc0 100644 --- a/app.js +++ b/app.js @@ -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, diff --git a/components/job-sub/index.js b/components/job-sub/index.js index 382a2a6..556dff7 100644 --- a/components/job-sub/index.js +++ b/components/job-sub/index.js @@ -21,8 +21,8 @@ Component({ value: {}, }, agencyStatus: { - type: Boolean, - value: true + type: Number, + value: 0 }, hasUserInfo: { type: Number, diff --git a/components/job-sub/index.wxml b/components/job-sub/index.wxml index 2a319ac..7bceb16 100644 --- a/components/job-sub/index.wxml +++ b/components/job-sub/index.wxml @@ -76,7 +76,7 @@ 登录查看 - {{(item.picked || corpUserFlag) ? (agencyStatus == 1 ? (item.fuWuFei ? item.fuWuFei : '详询客服') : '仅代理可见') : '详询客服' }} + {{(agencyStatus == 1 ? (item.fuWuFei ? item.fuWuFei : '详询客服') : '仅代理可见') }} diff --git a/components/service-modal/index.js b/components/service-modal/index.js new file mode 100644 index 0000000..16a7442 --- /dev/null +++ b/components/service-modal/index.js @@ -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 + }) + } + } +}) \ No newline at end of file diff --git a/components/service-modal/index.json b/components/service-modal/index.json new file mode 100644 index 0000000..32640e0 --- /dev/null +++ b/components/service-modal/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} \ No newline at end of file diff --git a/components/service-modal/index.wxml b/components/service-modal/index.wxml new file mode 100644 index 0000000..87fb4dc --- /dev/null +++ b/components/service-modal/index.wxml @@ -0,0 +1,25 @@ + + + + + + + + + + 加客户经理微信 + + + + + 加载中... + + + + + 长按识别二维码 + + + \ No newline at end of file diff --git a/components/service-modal/index.wxss b/components/service-modal/index.wxss new file mode 100644 index 0000000..9503cb7 --- /dev/null +++ b/components/service-modal/index.wxss @@ -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; +} diff --git a/pages/detail/index.wxml b/pages/detail/index.wxml index 1abf0ba..29d5f8c 100644 --- a/pages/detail/index.wxml +++ b/pages/detail/index.wxml @@ -40,7 +40,7 @@ - {{ (jobDetail.record.picked || corpUserFlag) ? (fuWuFei || '详询客服') : '详询客服'}} + {{ (fuWuFei || '详询客服')}} *** diff --git a/pages/message/index.js b/pages/message/index.js index d02fb84..7b1fb50 100644 --- a/pages/message/index.js +++ b/pages/message/index.js @@ -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", + }); + }, }); diff --git a/pages/message/index.json b/pages/message/index.json index 61f167f..edbfefd 100644 --- a/pages/message/index.json +++ b/pages/message/index.json @@ -1,5 +1,7 @@ { - "usingComponents": {}, + "usingComponents": { + "service-modal":"../../components/service-modal" + }, "navigationBarTitleText" : "消息", "navigationBarBackgroundColor": "#fff", "backgroundColor": "#f5f5f5", diff --git a/pages/message/index.wxml b/pages/message/index.wxml index 07725cf..db5d2e8 100644 --- a/pages/message/index.wxml +++ b/pages/message/index.wxml @@ -1,10 +1,29 @@ + + + + + + + + 客户经理 + + {{serviceInfo.userName }} +

{{serviceInfo.tel || '0371-6611 3723'}}

+
+
+
+ + + + +
- + {{item.title}} @@ -23,4 +42,5 @@ 内容内容内容内容内容内容 --> +
diff --git a/pages/message/index.wxss b/pages/message/index.wxss index 8aee7ac..b15889c 100644 --- a/pages/message/index.wxss +++ b/pages/message/index.wxss @@ -1,15 +1,27 @@ /* pages/message/index.wxss */ -.container{ +.container { padding-top: 10px; } -.noticImg{ +.noticImg { width: 48px; height: 48px; border-radius: 12px; } -.sub{ +.sub { padding: 12px; font-size: 14px; background-color: #fff; /* border-radius: 8px; */ -} \ No newline at end of file +} +.servicebox { + padding: 12px; + /* padding-bottom: 0; */ + /* padding-right: 10px; */ + background-color: #fff; +} +.servicebox .serviceinfo { +} +.servicebox .serviceinfo image { + width: 52px; + height: 52px; +} diff --git a/pages/mine/index.js b/pages/mine/index.js index 8b397b0..3510c38 100644 --- a/pages/mine/index.js +++ b/pages/mine/index.js @@ -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, diff --git a/pages/mine/index.wxml b/pages/mine/index.wxml index 612729c..4dc43e8 100644 --- a/pages/mine/index.wxml +++ b/pages/mine/index.wxml @@ -4,7 +4,7 @@ - + @@ -260,61 +260,130 @@ --> + + + + 10/90 + 今日/职位数 + + + 102 + 关注发单号 + + + 180 + 我的粉丝 + + + + + + + + + + + 当前团队 + + + + + + {{userInfo.agencyName || '-'}} + + + + + + + + + + + + + + + + + 我要发单 + 快速创建新职位 + + + + + + + + 发展代理 + 让更多代理关注我 + + + - + 我的服务 - + + + + + {{item.name}} + + + 银行卡 - - 地址本 - + --> + + + + + - + @@ -336,80 +405,59 @@ - - - - - - - - - 当前团队 + + + + + + + + 反馈与建议 + - - - - {{userInfo.agencyName || '-'}} - - - - + + + + + + + + + + 设置 + - + - - - - - - 反馈与建议 - - - - - - - - - - - - - 设置 - - - - - - + - + {{item.name}} - + @@ -465,12 +513,6 @@ 长按识别二维码 - diff --git a/pages/mine/index.wxss b/pages/mine/index.wxss index 1c012fd..e3dcb32 100644 --- a/pages/mine/index.wxss +++ b/pages/mine/index.wxss @@ -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 { diff --git a/pages/opinion/index.js b/pages/opinion/index.js index 1e1ea66..5fed3d2 100644 --- a/pages/opinion/index.js +++ b/pages/opinion/index.js @@ -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({ @@ -57,47 +66,17 @@ Page({ }); that.data.subLoad = false - }).catch(()=>{ + }).catch(() => { that.setData({ 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 + }) + }, /** * 生命周期函数--监听页面隐藏 */ diff --git a/pages/opinion/index.wxml b/pages/opinion/index.wxml index 4cd2571..e03f2b3 100644 --- a/pages/opinion/index.wxml +++ b/pages/opinion/index.wxml @@ -1,8 +1,29 @@ - - - 查看记录 + + + + {{item}} + + + + + {{ textVal.length }}/150 + + + + + + + + + + + 上传照片截图,最多传4张(选填) + + + + 查看记录 diff --git a/pages/opinion/index.wxss b/pages/opinion/index.wxss index f8b7e8f..538a577 100644 --- a/pages/opinion/index.wxss +++ b/pages/opinion/index.wxss @@ -3,13 +3,47 @@ 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; } .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%; } \ No newline at end of file diff --git a/pages/publishJob/index.js b/pages/publishJob/index.js index 8cbc45d..9689f4b 100644 --- a/pages/publishJob/index.js +++ b/pages/publishJob/index.js @@ -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 }, ], diff --git a/project.config.json b/project.config.json index 577cad2..858bc26 100644 --- a/project.config.json +++ b/project.config.json @@ -44,7 +44,7 @@ "tabIndent": "insertSpaces", "tabSize": 2 }, - "appid": "wxe431e0b3abd9ae0b", + "appid": "wxb0dea4d11428c6a5", "packOptions": { "ignore": [], "include": [] diff --git a/utils/commonUtil.js b/utils/commonUtil.js index 2f0b614..bb5912f 100644 --- a/utils/commonUtil.js +++ b/utils/commonUtil.js @@ -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: "费用待定" }, @@ -1783,4 +1783,52 @@ export function roundRect1 (ctx, x, y, w, h, r, color) { ctx.fillRect(x + r, y + r, w - r * 2, h - r * 2); ctx.stroke(); ctx.closePath(); -} \ No newline at end of file +} +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) + }, + }); + }) + }) + +}