From afb05754bf1f7b6aee63e85ed6e9eecf5b5d5b29 Mon Sep 17 00:00:00 2001 From: zhaojs <349234519@qq.com> Date: 星期五, 20 十月 2023 09:38:19 +0800 Subject: [PATCH] no message --- H5/utils/ComUtils.js | 27 +++ H5/pages/ad_page/sms_examine.vue | 265 +++++++++++++++++++++++++++++++++ web/src/views/sms_shenhe/shehelist.vue | 38 ++-- web/src/views/sms_listmanage/smslist.vue | 40 ++-- H5/pages.json | 17 ++ H5/manifest.json | 4 H5/unpackage/dist/build/h5/index.html | 4 H5/pages/ad_page/trans.vue | 35 ++++ 8 files changed, 382 insertions(+), 48 deletions(-) diff --git a/H5/manifest.json b/H5/manifest.json index 5b0f4fd..4eb6f2a 100644 --- a/H5/manifest.json +++ b/H5/manifest.json @@ -1,5 +1,5 @@ { - "name" : "sms_sender", + "name" : "鏆楀彿鎯呬功", "appid" : "__UNI__9FB7B6E", "description" : "", "versionName" : "1.0.0", @@ -83,7 +83,7 @@ //閰嶇疆浠g悊鏈嶅姟鍣ㄦ潵瑙e喅璺ㄥ煙闂锛寀niapp涓嶉�傜敤CORS鏂规鍜岃缃甁SONP鏂规 "/smsapi/" : { //鏄犲皠鍩熷悕 - "target" : "http://localhost:24147", //娴嬭瘯鐜 + "target" : "http://124.70.216.149:8083", //娴嬭瘯鐜 "changeOrigin" : true, //鏄惁璺ㄥ煙 "secure" : true // 鏄惁鏀寔 https 鍗忚鐨勪唬鐞� } diff --git a/H5/pages.json b/H5/pages.json index 7d7e568..09a4390 100644 --- a/H5/pages.json +++ b/H5/pages.json @@ -64,6 +64,23 @@ "navigationBarTextStyle": "black", "navigationBarBackgroundColor": "#ffffff" } + }, + { + "path": "pages/ad_page/sms_examine", + "style": { + "navigationBarTitleText": "瀹℃牳", + "navigationBarTextStyle": "black", + "navigationBarBackgroundColor": "#ffffff" + } + }, + { + "path": "pages/ad_page/trans", + "style": { + "navigationStyle": "custom", + "navigationBarTitleText": "back鎺堟潈涓�", + "navigationBarTextStyle": "black", + "navigationBarBackgroundColor": "#ffffff" + } } ], "globalStyle": { diff --git a/H5/pages/ad_page/sms_examine.vue b/H5/pages/ad_page/sms_examine.vue new file mode 100644 index 0000000..bded003 --- /dev/null +++ b/H5/pages/ad_page/sms_examine.vue @@ -0,0 +1,265 @@ +<template> + <view class="container" style="height: auto;"> + <v-tabs v-model="currentTab" :tabs="tabList" :pills="true" line-height="0" activeColor="#fff" + @change="changeTab" pillsColor="#FF928F" :fixed="true"></v-tabs> + <cc-pullScroolView class="pullScrollView" ref="pullScroll" :enablePullDown="false" :back-top="false"> + <view> + <view v-if="smsList.length>0" class="orders-list d-flex flex-column w-100" + style="padding: 20rpx; padding-bottom: 0;"> + <view class="order-item" v-for="(item, index) in smsList" :key="index" + style="margin-bottom: 30rpx;"> + <list-cell :hover="false"> + <view class="w-100 d-flex align-items-center"> + <view @tap="copy(item.id)" class="flex-fill d-flex flex-column" style="width: 60%;"> + <view class="font-size-lg text-color-base" style="margin-bottom: 20rpx;"> + {{ item.mobile }} + </view> + <view style="display: flex;"> + <view class="font-size-sm text-color-assist taskid-show">浠诲姟缂栧彿锛歿{ item.id }} + </view> + <view style="color: #919293;">澶嶅埗</view> + </view> + <view style="display: flex;"> + <view class="font-size-sm text-color-assist taskid-show"> + 鍒涘缓鏃堕棿锛歿{item.createtime }} + </view> + </view> + <view style="display: flex;"> + <view class="font-size-sm text-color-assist taskid-show"> + {{ item.wantsendtype== '1' ? '绔嬪嵆鍙戦��' : ('瀹氭椂鍙戦�侊細' + item.wantsendtime) }} + </view> + </view> + <view style="display: flex;"> + <view class="font-size-sm text-color-assist taskid-show"> + 鍏眥{ item.sendcount }}鏉$煭淇� + </view> + </view> + </view> + <view class="font-size-lg text-color-primary" style="font-size: 14px;"> + {{ getSmsStatus(item.sendstatus) }} + </view> + </view> + </list-cell> + <list-cell :hover="false" last> + <view class="w-100 d-flex flex-column"> + <view class="w-100 font-size-lg text-color-base" style="margin-bottom: 20rpx;"> + {{ item.smscontent}} + </view> + <view class="d-flex justify-content-between align-items-center" + style="margin-bottom: 30rpx;"> + <!-- <view class="font-size-sm text-color-assist"> + {{item.wantsendtime}} + </view> --> + <view class="d-flex font-size-sm text-color-base align-items-center"> + <view style="display: flex;"> + <button type="primary" + style="background-color: #ef1913; margin-right: 5rem;" + @click="shenhe(item,1)">閫氳繃</button><button type="primary" + @click="shenhe(item,2)">椹冲洖</button> + </view> + </view> + </view> + <view class="d-flex align-items-center justify-content-end"> + <!-- <view style="margin-right: 10rpx;"> + <button type="primary" plain size="mini">鏌ョ湅鍥炲</button> + </view> --> + + </view> + </view> + </list-cell> + </view> + </view> + + </view> + </cc-pullScroolView> + </view> +</template> + +<script> + import comUtils from '@/utils/ComUtils.js' + export default { + data() { + return { + currentTab: 0, + memberid: '', + tabList: ['寰呭鏍�', '椹冲洖', '宸查�氳繃', ], + smsTypeList: [{ + id: '0', + name: '寰呭鏍�' + }, { + id: '2', + name: '椹冲洖' + }, { + id: '1', + name: '宸查�氳繃' + }], + smsList: [], + curPageNum: 1, + pageCount: 10, + totalNum: 0, + checkType: '', + whiteid: "ocUrg6nVVPhn-m6yNPg7igYnB64g" + } + }, + onLoad(option) { + this.checkId(); + }, + + // 涓婃媺鍔犺浇 + onReachBottom() { + if (this.curPageNum * this.pageCount < this.totalNum) { + // 鏁版嵁涓哄姞杞藉畬 + this.$refs.pullScroll.showUpLoading(); + this.curPageNum++; + this.getTemplateData(); + } + }, + methods: { + //妫�鏌ョ櫧鍚嶅崟 + checkId() { + var openId = uni.getStorageSync('smsopenid'); + if (openId == "" || this.whiteid.indexOf(openId) < 0) { + uni.reLaunch({ + url: '/pages/emptypage/nopermissions' + }) + } else { + this.getTemplateData(); + } + }, + //瀹℃牳 + shenhe(record, shStatus) { + var txt = shStatus == 1 ? '纭畾閫氳繃鍚楋紵' : '纭畾椹冲洖鍚楋紵'; + var that = this; + uni.showModal({ + title: '鎻愮ず', + content: txt, + success: ({ + confirm + }) => { + if (confirm) { + uni.showLoading({ + title: '澶勭悊涓�...' + }) + let param = { + id: record.id, + shstatus: shStatus + }; + that.$http.post('/smsapi/SmsBusiness/UpdateSmsSendShStatus', param).then(e => { + uni.hideLoading(); + if (e.result) { + uni.showToast({ + title: '鎿嶄綔鎴愬姛锛�', + icon: 'none' + }); + } else { + uni.showToast({ + title: '鎿嶄綔澶辫触锛�', + icon: 'none' + }); + } + this.smsList = []; + this.getTemplateData(); + + }).catch(function(err) { + uni.hideLoading() + console.log(err); + }) + + } + } + }) + }, + getSmsStatus(status) { + return comUtils.getBackSmsStatus(status); + }, + changeTab(index) { + this.currentTab = index; + this.smsList = []; + this.curPageNum = 1; + this.totalNum = 0; + this.getTemplateData(); + }, + //鍙戠煭淇� + toSend(record) { + uni.navigateTo({ + url: '/pages/sendsms/index?templateTxt=' + record.templetecontent + }) + }, + getTemplateData() { + let templateId = ""; + templateId = this.smsTypeList[this.currentTab].id; + let param = { + PageNo: this.curPageNum, + PageSize: this.pageCount, + SmsStatus: templateId, + MemberId: this.memberid + } + uni.showLoading({ + title: '鍔犺浇涓�' + }) + this.$http.post('/smsapi/SmsBusiness/GetShSmsSend', param).then(e => { + this.totalNum = e.result.totalCount; + this.smsList = this.smsList.concat(e.result.data); + if (this.curPageNum * this.pageCount >= this.totalNum) { + // 濡傛灉鏄渶鍚庝竴椤� + this.$refs.pullScroll.finish(); + } else { + // 涓嶆槸鏈�鍚庝竴椤� + this.$refs.pullScroll.success(); + } + uni.hideLoading() + }).catch(function(err) { + uni.hideLoading() + console.log(err); + }) + + + } + } + } +</script> + +<style lang="scss" scoped> + page { + + height: 100%; + } + + .taskid-show { + text-overflow: ellipsis; + overflow: hidden; + white-space: nowrap; + width: 80%; + } + + .container { + display: flex; + flex-direction: column; + padding: 0.4rem; + } + + .uni-flex { + display: flex; + } + + .uni-flex-row { + @extend .uni-flex; + flex-direction: row; + box-sizing: border-box; + } + + /* 鍒楄〃footer */ + .uni-footer { + @extend .uni-flex-row; + justify-content: right; + margin-top: $uni-spacing-col-lg; + } + + .uni-footer-text { + font-size: 14px; + color: $uni-text-color-grey; + margin-left: 5px; + color: #FF928F; + font-weight: 700; + } +</style> \ No newline at end of file diff --git a/H5/pages/ad_page/trans.vue b/H5/pages/ad_page/trans.vue new file mode 100644 index 0000000..8a15a23 --- /dev/null +++ b/H5/pages/ad_page/trans.vue @@ -0,0 +1,35 @@ +<template> + +</template> + +<script> + export default { + data() { + return { + code:'' + } + }, + onLoad(option) { + if (option.code) { //鏍规嵁code鑾峰彇openid + this.code=option.code + let data = { + code: option.code + } + this.$http.post('/smsapi/WxBack/GetOpenId', data).then(e => { + uni.setStorageSync("smsopenid", e.result); + uni.navigateTo({ + url: '/pages/ad_page/sms_examine' + }) + }).catch(function(err) { + console.log(err); + }) + }else{ + this.code='娌℃湁鑾峰彇鍒癱ode'; + } + }, + methods: {} + } +</script> + +<style> +</style> \ No newline at end of file diff --git a/H5/unpackage/dist/build/h5/index.html b/H5/unpackage/dist/build/h5/index.html index b6924c8..5250132 100644 --- a/H5/unpackage/dist/build/h5/index.html +++ b/H5/unpackage/dist/build/h5/index.html @@ -1,2 +1,2 @@ -<!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>sms_sender</title><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)')) - document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=/static/index.63b34199.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/static/js/chunk-vendors.aef9fdd2.js></script><script src=/static/js/index.30d9f385.js></script></body></html> \ No newline at end of file +<!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>鏆楀彿鎯呬功</title><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)')) + document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=/static/index.63b34199.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/static/js/chunk-vendors.aef9fdd2.js></script><script src=/static/js/index.9915f567.js></script></body></html> \ No newline at end of file diff --git a/H5/utils/ComUtils.js b/H5/utils/ComUtils.js index eef78dd..7056d24 100644 --- a/H5/utils/ComUtils.js +++ b/H5/utils/ComUtils.js @@ -32,6 +32,30 @@ function getSmsStatus(status) { switch (status) { case 0: + return '鍙戦�佷腑'; + case 1: + return '鍙戦�佷腑'; + case 2: + return '鍙戦�佸け璐�'; + case 3: + return '鍙戦�佷腑'; + case 4: + return '鍙戦�佷腑'; + case 5: + return '鎺ユ敹涓�'; + case 6: + return '鎺ユ敹鎴愬姛'; + case 7: + return '鎺ユ敹澶辫触'; + default: + return '鎺ユ敹澶辫触'; + } +} + + +function getBackSmsStatus(status) { + switch (status) { + case 0: return '瀹℃牳涓�'; case 1: return '瀹℃牳鎴愬姛'; @@ -55,5 +79,6 @@ module.exports = { getUrlPar, formatDate, - getSmsStatus + getSmsStatus, + getBackSmsStatus } \ No newline at end of file diff --git a/web/src/views/sms_listmanage/smslist.vue b/web/src/views/sms_listmanage/smslist.vue index 5aaf37d..625dfe1 100644 --- a/web/src/views/sms_listmanage/smslist.vue +++ b/web/src/views/sms_listmanage/smslist.vue @@ -36,7 +36,7 @@ :data-source="data" :loading="loading" > - <span v-if="record.sendstatus==6" slot="action" slot-scope="text, record"> + <span v-if="record.sendstatus==7" slot="action" slot-scope="text, record"> <!-- <template> <a-popconfirm title="鏄惁纭鍒犻櫎璇ヤ换鍔�?" @@ -108,27 +108,23 @@ customRender: (text, record) => { switch (text) { case 0: - return '瀹℃牳涓�'; - case 1: - return '瀹℃牳鎴愬姛'; - case 2: - return '瀹℃牳澶辫触'; - case 3: - return '绛夊緟鍙戦��'; - case 4: - return '鍙戦�佷腑'; - case 5: - return '鍙戦�佹垚鍔�'; - case 6: - return '鍙戦�佸け璐�'; - case 7: - return '鎺ユ敹涓�'; - case 8: - return '鎺ユ敹鎴愬姛'; - case 9: - return '鎺ユ敹澶辫触'; - default: - return '寮傚父' + return '瀹℃牳涓�'; + case 1: + return '瀹℃牳鎴愬姛'; + case 2: + return '瀹℃牳澶辫触'; + case 3: + return '绛夊緟鍙戦��'; + case 4: + return '鍙戦�佷腑'; + case 5: + return '鎺ユ敹涓�'; + case 6: + return '鎺ユ敹鎴愬姛'; + case 7: + return '鎺ユ敹澶辫触'; + default: + return '鎺ユ敹澶辫触'; } } }, diff --git a/web/src/views/sms_shenhe/shehelist.vue b/web/src/views/sms_shenhe/shehelist.vue index 273320c..c4cb496 100644 --- a/web/src/views/sms_shenhe/shehelist.vue +++ b/web/src/views/sms_shenhe/shehelist.vue @@ -96,27 +96,23 @@ customRender: (text, record) => { switch (text) { case 0: - return '瀹℃牳涓�'; - case 1: - return '瀹℃牳鎴愬姛'; - case 2: - return '瀹℃牳澶辫触'; - case 3: - return '绛夊緟鍙戦��'; - case 4: - return '鍙戦�佷腑'; - case 5: - return '鍙戦�佹垚鍔�'; - case 6: - return '鍙戦�佸け璐�'; - case 7: - return '鎺ユ敹涓�'; - case 8: - return '鎺ユ敹鎴愬姛'; - case 9: - return '鎺ユ敹澶辫触'; - default: - return '寮傚父' + return '瀹℃牳涓�'; + case 1: + return '瀹℃牳鎴愬姛'; + case 2: + return '瀹℃牳澶辫触'; + case 3: + return '绛夊緟鍙戦��'; + case 4: + return '鍙戦�佷腑'; + case 5: + return '鎺ユ敹涓�'; + case 6: + return '鎺ユ敹鎴愬姛'; + case 7: + return '鎺ユ敹澶辫触'; + default: + return '鎺ユ敹澶辫触'; } } }, -- Gitblit v1.9.3