zhaojs
2023-10-20 afb05754bf1f7b6aee63e85ed6e9eecf5b5d5b29
no message
已添加2个文件
已修改6个文件
430 ■■■■ 文件已修改
H5/manifest.json 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/pages.json 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/pages/ad_page/sms_examine.vue 265 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/pages/ad_page/trans.vue 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/unpackage/dist/build/h5/index.html 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/utils/ComUtils.js 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/src/views/sms_listmanage/smslist.vue 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/src/views/sms_shenhe/shehelist.vue 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/manifest.json
@@ -1,5 +1,5 @@
{
    "name" : "sms_sender",
    "name" : "暗号情书",
    "appid" : "__UNI__9FB7B6E",
    "description" : "",
    "versionName" : "1.0.0",
@@ -83,7 +83,7 @@
                //配置代理服务器来解决跨域问题,uniapp不适用CORS方案和设置JSONP方案
                "/smsapi/" : {
                    //映射域名
                    "target" : "http://localhost:24147", //测试环境
                    "target" : "http://124.70.216.149:8083", //测试环境
                    "changeOrigin" : true, //是否跨域
                    "secure" : true // æ˜¯å¦æ”¯æŒ https åè®®çš„代理
                }
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": {
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>
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='没有获取到code';
            }
        },
        methods: {}
    }
</script>
<style>
</style>
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>
<!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>
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
}
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 '接收失败';
          }
        }
      },
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 '接收失败';
          }
        }
      },