doum
2025-08-21 71a103d6f5c55136f40535bccf23bc6129e342f7
前端
已修改2个文件
85 ■■■■■ 文件已修改
small-program/App.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
small-program/pages/index/index.vue 83 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
small-program/App.vue
@@ -5,7 +5,7 @@
            ...mapState(['userInfo','openid'])
        },
        onLaunch: function() { 
            console.log(ua)
            // console.log(ua)
            var that = this;
            if (!this.openid || this.openid =='') {
                uni.login({
small-program/pages/index/index.vue
@@ -193,7 +193,7 @@
                        </view>
                    </view>
                    <view class="box-hz-btn" :style="{ backgroundImage: 'url(' + btn + ')' }">
                        <view class="box-hz-btn-kf">客服</view>
                        <view class="box-hz-btn-kf" @click="contactPhone()">客服</view>
                        <view class="box-hz-btn-next" @click="submit">下一步</view>
                    </view>
                </view>
@@ -303,7 +303,7 @@
                    </template>
                    
                    <view class="box-hz-btn" :style="{ backgroundImage: 'url(' + btn + ')' }">
                        <view class="box-hz-btn-kf">客服</view>
                        <view class="box-hz-btn-kf"  @click="contactPhone()" >客服</view>
                        <view class="box-hz-btn-next" @click="jump()">下一步</view>
                    </view>
                </view>
@@ -312,6 +312,23 @@
        
        <!-- 选择日期范围 -->
        <u-calendar :show="show" color="#00BC12" mode="range" @close="show = false" @confirm="confirmDate"></u-calendar>
        <u-popup :show="showPhone" round="15" mode="bottom"   @close="contactPhone()" :closeable="true" :closeOnClickOverlay="true">
            <view class="phone">
                <view class="phone-head">
                    <view></view>
                    <text>客服电话</text>
                </view>
                 <view class="phone-item" v-for="(item,index) in serverPhone"    :key="item" @click="contactPhoneDo(item)">
                     <view></view>
                     <text>{{item}}</text>
                 </view>
                 <view class="phone-item" v-for="(item,index) in serverPhone"    :key="item" @click="contactPhoneDo(item)">
                     <view></view>
                     <text>{{item}}</text>
                 </view>
                <!-- <view class="phone-botton"  @click="contactPhone()" >关闭</view> -->
            </view>
        </u-popup>
    </view>
</template>
@@ -329,6 +346,8 @@
        },
        data() {
            return {
                showPhone:false,
                serverPhone:[],
                show: false,
                isLogin: false,
                typeId: 0,
@@ -405,6 +424,8 @@
            });
            
            this.form.linkPhone = this.userInfo.telephone
            this.getDictInfo()
        },
        onShow(options) {
            this.typeViewId = 0
@@ -480,6 +501,23 @@
            this.getOrderList()
        },
        methods: {
            getDictInfo(){
                var that = this;
                this.$u.api.getPlatformAboutUs({}).then(res =>{
                      that.serverPhone = (res.data.serverPhone||'').split(",")
                })
            },
            contactPhone(){
                 this.showPhone = !this.showPhone
                 console.log("==================================",this.showPhone)
            },
            contactPhoneDo(phone){
                if(phone !=null && phone!=''){
                    uni.makePhoneCall({
                       phoneNumber: phone
                    })
                }
            },
            // 手动接单
            getaccept(e, orderId, index) {
                if (!e.msg) return;
@@ -1704,5 +1742,46 @@
                }
            }
        }
        .phone {
            width: 100%;
            padding-top: 40rpx;
            box-sizing: border-box;
            .phone-botton {
                width: 100%;
                height: 88rpx;
                line-height: 88rpx;
                text-align: center;
                font-weight: 500;
                font-size: 32rpx;
                color: #FFFFFF;
                background: #00BC12;
                border-radius: 44rpx;
                margin-top: 60rpx;
            }
            .phone-head {
                width: 100%;
                text-align: center;
                justify-content: space-between;
                margin-bottom: 40rpx;
                text {
                    font-weight: 800;
                    font-size: 32rpx;
                    color: #222222;
                }
            }
            .phone-item {
                width: 100%;
                text-align: center;
                justify-content: space-between;
                border-bottom: 1rpx solid #eeeeee;
                line-height: 78rpx;
                text {
                    font-weight: 500;
                    font-size: 28rpx;
                    line-height: 28rpx;
                    color: #222222;
                }
            }
        }
    }
</style>