新增获取权限说明

This commit is contained in:
weipengfei 2024-03-29 16:47:08 +08:00
parent d06a841a59
commit e3313c0db8
9 changed files with 2985 additions and 2562 deletions

View File

@ -7,12 +7,13 @@
<view class="txt">{{storeInfo.mer_name}}</view>
</view>
<view class="acea-row store-opeation">
<navigator v-if="hide_mer_status != 1 && storeInfo.mer_id" :url="'/pages/store/home/index?id='+storeInfo.mer_id" class="link" open-type="redirect">进店</navigator>
<navigator v-if="hide_mer_status != 1 && storeInfo.mer_id"
:url="'/pages/store/home/index?id='+storeInfo.mer_id" class="link" open-type="redirect">进店</navigator>
<text v-if="storeInfo.service_phone" class="iconfont icon-dadianhua01" @click="goCustomer"></text>
</view>
</view>
<scroll-view scroll-y="true" style="height: 100%;overflow: hidden;" :scroll-top="scrollTop" scroll-with-animation="true"
@scrolltoupper="bindScroll">
<scroll-view scroll-y="true" style="height: 100%;overflow: hidden;" :scroll-top="scrollTop"
scroll-with-animation="true" @scrolltoupper="bindScroll">
<div class="chat" ref="chat">
<Loading :loaded="status" :loading="loading"></Loading>
<view v-if="storeInfo" style="height: 100rpx;"></view>
@ -30,12 +31,14 @@
<div class="text">
<div class="acea-row">
<!--退款订单链接-->
<navigator v-if="item.msn_type === 6 && item.refundOrder && item.refundOrder.refund_order_id" open-type="navigate" :url="'/pages/order_details/index?order_id='+item.refundOrder.order_id">
<navigator v-if="item.msn_type === 6 && item.refundOrder && item.refundOrder.refund_order_id"
open-type="navigate" :url="'/pages/order_details/index?order_id='+item.refundOrder.order_id">
<div class="broadcast-details_num">
<span>退款单号{{ item.refundOrder.refund_order_sn }}</span>
</div>
<div class="conter acea-row row-middle">
<div class="broadcast-details_order noPad" v-for="(val, inx) in item.refundOrder.refundProduct" :key="item.service_log_id">
<div class="broadcast-details_order noPad" v-for="(val, inx) in item.refundOrder.refundProduct"
:key="item.service_log_id">
<div class="broadcast-details_box noPad" v-if="inx == 0">
<div class="broadcast_details_img">
<image :src="val.product.cart_info.product.image" />
@ -64,8 +67,11 @@
<button class="copy" @tap.stop="copyText(item.orderInfo.order_sn)">复制</button>
<!-- #endif -->
</div>
<navigator :url="'/pages/admin/orderDetail/index?id='+item.orderInfo.order_id+'&mer_id='+item.orderInfo.mer_id" open-type="open-type" class="conter acea-row row-middle">
<div class="broadcast-details_order noPad" v-for="(val, inx) in item.orderInfo.orderProduct" :key="val.id">
<navigator
:url="'/pages/admin/orderDetail/index?id='+item.orderInfo.order_id+'&mer_id='+item.orderInfo.mer_id"
open-type="open-type" class="conter acea-row row-middle">
<div class="broadcast-details_order noPad" v-for="(val, inx) in item.orderInfo.orderProduct"
:key="val.id">
<div class="broadcast-details_box noPad" v-if="inx == 0">
<div class="broadcast_details_img">
<image :src="val.cart_info.product.image" />
@ -86,7 +92,8 @@
<!--商品链接-->
<div class="conter acea-row row-middle" v-if="item.msn_type === 4 && item.product">
<div class=" noPad">
<navigator class="acea-row row-column-around noPad" v-if="item.product.product_id" :url="`/pages/goods_details/index?id=${item.product.product_id}`" open-type="navigate">
<navigator class="acea-row row-column-around noPad" v-if="item.product.product_id"
:url="`/pages/goods_details/index?id=${item.product.product_id}`" open-type="navigate">
<div class="broadcast_details_img_no">
<image :src="item.product.image" />
</div>
@ -100,9 +107,12 @@
</div>
</div>
<!--预售商品链接-->
<div class="conter acea-row row-middle" v-if="item.msn_type === 7 && item.presell && item.presell.product">
<div class="conter acea-row row-middle"
v-if="item.msn_type === 7 && item.presell && item.presell.product">
<div class=" noPad">
<navigator class="acea-row row-column-around noPad" v-if="item.presell.product_presell_id" :url="`/pages/activity/presell_details/index?id=${item.presell.product_presell_id}`" open-type="navigate">
<navigator class="acea-row row-column-around noPad" v-if="item.presell.product_presell_id"
:url="`/pages/activity/presell_details/index?id=${item.presell.product_presell_id}`"
open-type="navigate">
<div class="broadcast_details_img_no">
<image :src="item.presell.product.image" />
</div>
@ -116,9 +126,12 @@
</div>
</div>
<!--拼团商品链接-->
<div class="conter acea-row row-middle" v-if="item.msn_type === 8 && item.productGroup && item.productGroup.product">
<div class="conter acea-row row-middle"
v-if="item.msn_type === 8 && item.productGroup && item.productGroup.product">
<div class=" noPad">
<navigator class="acea-row row-column-around noPad" v-if="item.productGroup.product_group_id" :url="`/pages/activity/combination_details/index?id=${item.productGroup.product_group_id}`" open-type="navigate">
<navigator class="acea-row row-column-around noPad" v-if="item.productGroup.product_group_id"
:url="`/pages/activity/combination_details/index?id=${item.productGroup.product_group_id}`"
open-type="navigate">
<div class="broadcast_details_img_no">
<image :src="item.productGroup.product.image" />
</div>
@ -154,14 +167,16 @@
<div class="broadcast-details_num acea-row row-middle">
<text>订单号{{ item.refundOrder.refund_order_sn }}</text>
<!-- #ifdef H5 -->
<button class="copy copy-data" :data-clipboard-text="item.refundOrder.refund_order_sn">复制</button>
<button class="copy copy-data"
:data-clipboard-text="item.refundOrder.refund_order_sn">复制</button>
<!-- #endif -->
<!-- #ifndef H5 -->
<button class="copy" @tap.stop="copyText(item.refundOrder.refund_order_sn)">复制</button>
<!-- #endif -->
</div>
<div class="conter acea-row row-middle">
<div class="broadcast-details_order noPad" v-for="(val, inx) in item.refundOrder.refundProduct" :key="val.id">
<div class="broadcast-details_order noPad" v-for="(val, inx) in item.refundOrder.refundProduct"
:key="val.id">
<div class="broadcast-details_box noPad" v-if="inx == 0">
<div class="broadcast_details_img">
<image :src="val.product.cart_info.product.image" />
@ -190,8 +205,11 @@
<button class="copy" @tap.stop="copyText(item.orderInfo.order_sn)">复制</button>
<!-- #endif -->
</div>
<navigator :url="'/pages/admin/orderDetail/index?id='+item.orderInfo.order_id+'&mer_id='+item.orderInfo.mer_id" open-type="navigate" class="conter acea-row row-middle">
<div class="broadcast-details_order noPad" v-for="(val, inx) in item.orderInfo.orderProduct" :key="val.id">
<navigator
:url="'/pages/admin/orderDetail/index?id='+item.orderInfo.order_id+'&mer_id='+item.orderInfo.mer_id"
open-type="navigate" class="conter acea-row row-middle">
<div class="broadcast-details_order noPad" v-for="(val, inx) in item.orderInfo.orderProduct"
:key="val.id">
<div class="broadcast-details_box noPad" v-if="inx == 0">
<div class="broadcast_details_img">
<image :src="val.cart_info.product.image" />
@ -212,7 +230,8 @@
<!--商品链接-->
<div class="conter acea-row row-middle" v-if="item.msn_type === 4 && item.product">
<div class=" acea-row row-column-around noPad">
<navigator class="acea-row row-column-around noPad" v-if="item.product.product_id" :url="`/pages/goods_details/index?id=${item.product.product_id}`">
<navigator class="acea-row row-column-around noPad" v-if="item.product.product_id"
:url="`/pages/goods_details/index?id=${item.product.product_id}`">
<div class="broadcast_details_img_no">
<image :src="item.product.image" />
</div>
@ -226,9 +245,12 @@
</div>
</div>
<!--预售商品链接-->
<div class="conter acea-row row-middle" v-if="item.msn_type === 7 && item.presell && item.presell.product">
<div class="conter acea-row row-middle"
v-if="item.msn_type === 7 && item.presell && item.presell.product">
<div class=" acea-row row-column-around noPad">
<navigator class="acea-row row-column-around noPad" v-if="item.presell.product_presell_id" :url="`/pages/activity/presell_details/index?id=${item.presell.product_presell_id}`" open-type="navigate">
<navigator class="acea-row row-column-around noPad" v-if="item.presell.product_presell_id"
:url="`/pages/activity/presell_details/index?id=${item.presell.product_presell_id}`"
open-type="navigate">
<div class="broadcast_details_img_no">
<image :src="item.presell.product.image" />
</div>
@ -242,9 +264,12 @@
</div>
</div>
<!--拼团商品链接-->
<div class="conter acea-row row-middle" v-if="item.msn_type === 8 && item.productGroup && item.productGroup.product">
<div class="conter acea-row row-middle"
v-if="item.msn_type === 8 && item.productGroup && item.productGroup.product">
<div class=" acea-row row-column-around noPad">
<navigator class="acea-row row-column-around noPad" v-if="item.productGroup.product_group_id" :url="`/pages/activity/combination_details/index?id=${item.productGroup.product_group_id}`" open-type="navigate">
<navigator class="acea-row row-column-around noPad" v-if="item.productGroup.product_group_id"
:url="`/pages/activity/combination_details/index?id=${item.productGroup.product_group_id}`"
open-type="navigate">
<div class="broadcast_details_img_no">
<image :src="item.productGroup.product.image" />
</div>
@ -266,7 +291,8 @@
<div class="conter acea-row row-middle" v-if="item.msn_type === 1">
{{item.msn}}
</div>
<view class="recall" :class="'recall'+index+j" v-if="item.longpress && press && (item.msn_type === 1 || (new Date().getTime()/1000 - item.send_time) <= 120)">
<view class="recall" :class="'recall'+index+j"
v-if="item.longpress && press && (item.msn_type === 1 || (new Date().getTime()/1000 - item.send_time) <= 120)">
<view class="recall-item" v-if="item.msn_type === 1">
<!-- #ifdef H5 -->
<view class="copy copy-data" :data-clipboard-text="item.msn">
@ -281,7 +307,10 @@
</view>
<!-- #endif -->
</view>
<view v-if="(new Date().getTime()/1000 - item.send_time) <= 120" class="recall-item" @click.stop="reverstMsg(item)"><view class="iconfont icon-chehui"></view>撤回</view>
<view v-if="(new Date().getTime()/1000 - item.send_time) <= 120" class="recall-item"
@click.stop="reverstMsg(item)">
<view class="iconfont icon-chehui"></view>撤回
</view>
</view>
</div>
</div>
@ -306,7 +335,8 @@
<!-- <div class="name">{{ item.service.nickname }}</div> -->
<div class="acea-row">
<!--退款订单链接-->
<navigator v-if="item.msn_type === 6 && item.refundOrder.refund_order_id" open-type="navigate" :url="'/pages/order_details/index?order_id='+item.refundOrder.order_id">
<navigator v-if="item.msn_type === 6 && item.refundOrder.refund_order_id" open-type="navigate"
:url="'/pages/order_details/index?order_id='+item.refundOrder.order_id">
<div class="broadcast-details_num">
<text>退款单号{{ item.refundOrder.refund_order_sn }}</text>
</div>
@ -341,7 +371,8 @@
<button class="copy" @tap.stop="copyText(item.orderInfo.order_sn)">复制</button>
<!-- #endif -->
</div>
<navigator :url="'/pages/order_details/index?order_id='+item.orderInfo.order_id" open-type="navigate" class="conter acea-row row-middle">
<navigator :url="'/pages/order_details/index?order_id='+item.orderInfo.order_id"
open-type="navigate" class="conter acea-row row-middle">
<!-- :key="item.service_log_id" -->
<div class="broadcast-details_order noPad" v-for="(val, inx) in item.orderInfo.orderProduct">
<div class="broadcast-details_box noPad" v-if="inx == 0">
@ -364,7 +395,8 @@
<!--商品链接-->
<div class="conter acea-row row-middle" v-if="item.msn_type === 4 && item.product">
<div class=" noPad">
<navigator class="acea-row row-column-around noPad" v-if="item.product.product_id" :url="`/pages/goods_details/index?id=${item.product.product_id}`" open-type="navigate">
<navigator class="acea-row row-column-around noPad" v-if="item.product.product_id"
:url="`/pages/goods_details/index?id=${item.product.product_id}`" open-type="navigate">
<div class="broadcast_details_img_no">
<image :src="item.product.image" />
</div>
@ -378,9 +410,12 @@
</div>
</div>
<!--预售商品链接-->
<div class="conter acea-row row-middle" v-if="item.msn_type === 7 && item.presell && item.presell.product">
<div class="conter acea-row row-middle"
v-if="item.msn_type === 7 && item.presell && item.presell.product">
<div class=" noPad">
<navigator class="acea-row row-column-around noPad" v-if="item.presell.product_presell_id" :url="`/pages/activity/presell_details/index?id=${item.presell.product_presell_id}`" open-type="navigate">
<navigator class="acea-row row-column-around noPad" v-if="item.presell.product_presell_id"
:url="`/pages/activity/presell_details/index?id=${item.presell.product_presell_id}`"
open-type="navigate">
<div class="broadcast_details_img_no">
<image :src="item.presell.product.image" />
</div>
@ -394,9 +429,12 @@
</div>
</div>
<!--拼团商品链接-->
<div class="conter acea-row row-middle" v-if="item.msn_type === 8 && item.productGroup && item.productGroup.product">
<div class="conter acea-row row-middle"
v-if="item.msn_type === 8 && item.productGroup && item.productGroup.product">
<div class="noPad">
<navigator class="acea-row row-column-around noPad" v-if="item.productGroup.product_group_id" :url="`/pages/activity/combination_details/index?id=${item.productGroup.product_group_id}`" open-type="navigate">
<navigator class="acea-row row-column-around noPad" v-if="item.productGroup.product_group_id"
:url="`/pages/activity/combination_details/index?id=${item.productGroup.product_group_id}`"
open-type="navigate">
<div class="broadcast_details_img_no">
<image :src="item.productGroup.product.image" />
</div>
@ -428,7 +466,8 @@
<!-- <div class="name">{{ item.user.nickname }}</div> -->
<div class="acea-row" @longpress="longTime(items,index,item,j)">
<!--退款订单链接-->
<navigator v-if="item.msn_type === 6 && item.refundOrder.refund_order_id" open-type="navigate" :url="'/pages/order_details/index?order_id='+item.refundOrder.order_id">
<navigator v-if="item.msn_type === 6 && item.refundOrder.refund_order_id" open-type="navigate"
:url="'/pages/order_details/index?order_id='+item.refundOrder.order_id">
<div class="broadcast-details_num">
<text>退款单号{{ item.refundOrder.refund_order_sn }}</text>
</div>
@ -464,7 +503,8 @@
<button class="copy" @tap.stop="copyText(item.orderInfo.order_sn)">复制</button>
<!-- #endif -->
</div>
<navigator :url="'/pages/order_details/index?order_id='+item.orderInfo.order_id" open-type="navigate" class="conter acea-row row-middle">
<navigator :url="'/pages/order_details/index?order_id='+item.orderInfo.order_id"
open-type="navigate" class="conter acea-row row-middle">
<div class="broadcast-details_order noPad" v-for="(val, inx) in item.orderInfo.orderProduct">
<div class="broadcast-details_box noPad" v-if="inx == 0">
<div class="broadcast_details_img">
@ -486,7 +526,8 @@
<!--商品链接-->
<div class="conter acea-row row-middle" v-if="item.msn_type === 4 && item.product">
<div class="acea-row row-column-around noPad">
<navigator class="acea-row row-column-around noPad" v-if="item.product.product_id" :url="`/pages/goods_details/index?id=${item.product.product_id}`" open-type="navigate">
<navigator class="acea-row row-column-around noPad" v-if="item.product.product_id"
:url="`/pages/goods_details/index?id=${item.product.product_id}`" open-type="navigate">
<div class="broadcast_details_img_no">
<image :src="item.product.image" />
</div>
@ -500,9 +541,12 @@
</div>
</div>
<!--预售商品链接-->
<div class="conter acea-row row-middle" v-if="item.msn_type === 7 && item.presell && item.presell.product">
<div class="conter acea-row row-middle"
v-if="item.msn_type === 7 && item.presell && item.presell.product">
<div class="acea-row row-column-around noPad">
<navigator class="acea-row row-column-around noPad" v-if="item.presell.product_presell_id" :url="`/pages/activity/presell_details/index?id=${item.presell.product_presell_id}`" open-type="navigate">
<navigator class="acea-row row-column-around noPad" v-if="item.presell.product_presell_id"
:url="`/pages/activity/presell_details/index?id=${item.presell.product_presell_id}`"
open-type="navigate">
<div class="broadcast_details_img_no">
<image :src="item.presell.product.image" />
</div>
@ -516,9 +560,12 @@
</div>
</div>
<!--拼团商品链接-->
<div class="conter acea-row row-middle" v-if="item.msn_type === 8 && item.productGroup && item.productGroup.product">
<div class="conter acea-row row-middle"
v-if="item.msn_type === 8 && item.productGroup && item.productGroup.product">
<div class="acea-row row-column-around noPad">
<navigator class="acea-row row-column-around noPad" v-if="item.productGroup.product_group_id" :url="`/pages/activity/combination_details/index?id=${item.productGroup.product_group_id}`" open-type="navigate">
<navigator class="acea-row row-column-around noPad" v-if="item.productGroup.product_group_id"
:url="`/pages/activity/combination_details/index?id=${item.productGroup.product_group_id}`"
open-type="navigate">
<div class="broadcast_details_img_no">
<image :src="item.productGroup.product.image" />
</div>
@ -540,7 +587,8 @@
<div class="conter acea-row row-middle" v-if="item.msn_type === 1">
{{ item.msn }}
</div>
<view class="recall" :class="'recall'+index+j" v-if="item.longpress && press && (item.msn_type === 1 || (new Date().getTime()/1000 - item.send_time) <= 120)">
<view class="recall" :class="'recall'+index+j"
v-if="item.longpress && press && (item.msn_type === 1 || (new Date().getTime()/1000 - item.send_time) <= 120)">
<view class="recall-item" v-if="item.msn_type === 1">
<!-- #ifdef H5 -->
<view class="copy copy-data" :data-clipboard-text="item.msn">
@ -555,7 +603,10 @@
</view>
<!-- #endif -->
</view>
<view v-if="(new Date().getTime()/1000 - item.send_time) <= 120" class="recall-item" @click.stop="reverstMsg(item)"><view class="iconfont icon-chehui"></view>撤回</view>
<view v-if="(new Date().getTime()/1000 - item.send_time) <= 120" class="recall-item"
@click.stop="reverstMsg(item)">
<view class="iconfont icon-chehui"></view>撤回
</view>
</view>
</div>
</div>
@ -648,23 +699,24 @@
<div class="footer acea-row row-between row-bottom" ref="footer">
<text @click="uploadImg" class="iconfont icon-tupian2"></text>
<text @click="emoticon" class="iconfont icon-biaoqing2"></text>
<div class="voice acea-row row-center-wrapper" v-if="voice" @touchstart.prevent="start" @touchmove.prevent="move"
@touchend.prevent="end">
<div class="voice acea-row row-center-wrapper" v-if="voice" @touchstart.prevent="start"
@touchmove.prevent="move" @touchend.prevent="end">
{{ speak }}
</div>
<view class="input_count">
<input type="text" placeholder-class='placeholder' placeholder="输入内容" class="input" ref="input" v-show="!voice" @input="bindInput" @keyup="keyup"
@focus="focus" cursor-spacing="20" v-model="textCon">
<input type="text" placeholder-class='placeholder' placeholder="输入内容" class="input" ref="input"
v-show="!voice" @input="bindInput" @keyup="keyup" @focus="focus" cursor-spacing="20" v-model="textCon">
<div class="send iconfont icon-fasong" :style="'color:'+iconColor" @click="sendTest"></div>
</view>
</div>
</form>
<div class="banner slider-banner">
<swiper class="swiper-wrapper" :autoplay="autoplay" :circular="circular" :interval="interval" :duration="duration"
v-if="emojiGroup.length > 0">
<swiper class="swiper-wrapper" :autoplay="autoplay" :circular="circular" :interval="interval"
:duration="duration" v-if="emojiGroup.length > 0">
<block v-for="(emojiList, index) in emojiGroup" :key="index">
<swiper-item>
<i class="em" :class="emoji" :style="'background-image:url('+ httpUrl +')'" v-for="emoji in emojiList" :key="emoji" @click="addEmoji(emoji)"></i>
<i class="em" :class="emoji" :style="'background-image:url('+ httpUrl +')'" v-for="emoji in emojiList"
:key="emoji" @click="addEmoji(emoji)"></i>
</swiper-item>
</block>
</swiper>
@ -974,7 +1026,12 @@
});
},
//
goCustomer(){
async goCustomer() {
// #ifdef APP-PLUS
let result = await this.$store.dispatch("permission/requestPermissions",
'CALL_PHONE')
if (result !== 1) return;
// #endif
uni.makePhoneCall({
//
phoneNumber: this.storeInfo.service_phone,
@ -1389,13 +1446,16 @@
width: 100%;
height: 100%;
}
// @import url("@/plugin/emoji-awesome/css/google.min.css");
@import "@/plugin/emoji-awesome/css/tuoluojiang.css";
.noPad {
padding: 0 !important;
margin-bottom: 0 !important;
height: auto !important;
}
.broadcast-details_num {
width: 100%;
height: 72rpx;
@ -1408,13 +1468,16 @@
border-bottom: 1px solid #F5F5F5;
padding: 0 24rpx;
border-radius: 10rpx 10rpx 0 0;
.line1 {
max-width: 203rpx;
}
}
uni-swiper-item {
background: #fff;
}
.footer_count {
margin-top: 20rpx;
width: 710rpx;
@ -1423,10 +1486,13 @@
bottom: calc(120rpx+ constant(safe-area-inset-bottom)); /// IOS<11.2/
bottom: calc(120rpx + env(safe-area-inset-bottom)); /// IOS>11.2/
left: 20rpx;
.broadcast-details_box,.broadcast_box{
.broadcast-details_box,
.broadcast_box {
margin-bottom: 0;
position: relative;
}
.icon-guanbi {
font-size: 20rpx;
color: #C4C4C4;
@ -1435,15 +1501,18 @@
top: 20rpx;
}
}
.broadcast-details_order {
// padding: 15rpx;
}
.copy {
color: var(--view-theme);
margin-left: 24rpx;
font-size: 22rpx;
opacity: .5;
}
.broadcast-details_box {
padding: 20rpx;
display: flex;
@ -1473,10 +1542,13 @@
overflow: hidden;
position: relative;
}
.broadcast_details_img uni-image,.broadcast_details_img image{
.broadcast_details_img uni-image,
.broadcast_details_img image {
width: 160rpx;
height: 160rpx;
}
.broadcast_details_img_no {
width: 456rpx;
height: 456rpx;
@ -1484,13 +1556,17 @@
overflow: hidden;
margin-bottom: 10rpx;
}
.broadcast_details_picBox_no {
width: 100%;
}
.broadcast_details_img_no uni-image, .broadcast_details_img_no img{
.broadcast_details_img_no uni-image,
.broadcast_details_img_no img {
width: 100%;
height: 100%;
}
.broadcast_details_tit {
font-size: 30rpx;
color: #282828;
@ -1503,9 +1579,11 @@
-webkit-box-orient: vertical;
text-align: left !important;
}
.product_price {
margin-top: 66rpx;
}
.broadcast_details_tit_no {
font-size: 28rpx;
color: #333333;
@ -1514,22 +1592,26 @@
margin-top: 5rpx;
max-width: 420rpx;
}
.broadcast_details_picBox {
width: 75%;
margin-left: 24rpx;
}
.broadcast_details_pic {
margin-top: 15rpx;
font-size: 24rpx;
color: #999999;
text-align: left;
}
.broadcast_details_pic_num {
text-decoration: line-through;
font-size: 28rpx;
color: rgba(0, 0, 0, 0.5);
margin-left: 0.1rem;
}
.broadcast_details_btn {
width: 130rpx;
height: 50rpx;
@ -1542,25 +1624,31 @@
line-height: 50rpx;
margin-top: 16px;
float: right;
&.product_btn {
margin-top: 0;
float: none;
}
&.refund_btn {
width: 150rpx;
}
}
.p-color {
color: var(--view-priceColor);
}
.broadcast-details .chat {
padding: 1rpx 23rpx 0 23rpx;
margin-bottom: 3rpx;
}
.broadcast-details .chat .item {
margin-top: 37rpx;
}
.broadcast-details .create_time {
dislay: block;
width: 100%;
@ -1569,23 +1657,28 @@
font-size: 22rpx;
margin: 30rpx 0;
}
.broadcast-details .chat .item .pictrue {
width: 80rpx;
height: 80rpx;
margin-top: 10rpx;
}
.broadcast-details .chat .item .pictrue image {
width: 100%;
height: 100%;
border-radius: 50%;
}
.broadcast-details .chat .item .text {
margin-left: 20rpx;
}
.broadcast-details .chat .item .text.textR {
text-align: right;
margin: 0 20rpx 0 0;
position: relative;
.recall {
position: absolute;
width: 220rpx;
@ -1599,9 +1692,11 @@
align-items: center;
justify-content: center;
z-index: 200;
&.recall00 {
top: auto;
bottom: -130rpx;
&::after {
border-top-color: transparent;
border-bottom-color: rgba(0, 0, 0, .6);
@ -1609,6 +1704,7 @@
top: -26rpx;
}
}
&::after {
content: "";
display: block;
@ -1618,15 +1714,18 @@
bottom: -26rpx;
right: 30rpx;
}
.recall-item {
text-align: center;
margin: 0 30rpx;
font-size: 24rpx;
.copy-data {
color: #fff;
margin-left: 0;
opacity: 1;
}
.iconfont {
display: block;
font-size: 32rpx;
@ -1635,17 +1734,21 @@
}
}
}
.broadcast-details .chat .item .text .name {
font-size: 24rpx;
color: #999;
}
.broadcast-details .chat .item .text .name .return {
color: #509efb;
margin-left: 17rpx;
}
.broadcast-details .chat .item .text.textR .name .return {
margin: 0 0.17rem 0 0;
}
.broadcast-details .chat .item .text .conter {
background-color: #fff;
border-radius: 8rpx;
@ -1657,10 +1760,12 @@
margin-top: 2rpx;
word-break: break-all;
text-align: left;
.em {
margin: 0;
}
}
.recall-msg {
display: block;
width: 100%;
@ -1669,6 +1774,7 @@
font-size: 24rpx;
margin: 10rpx 0;
}
.broadcast-details .chat .item .text .spot {
width: 15rpx;
height: 15rpx;
@ -1676,6 +1782,7 @@
border-radius: 50%;
margin-left: 20rpx;
}
.broadcast-details .chat .item .text .conter:before {
position: absolute;
content: "";
@ -1687,26 +1794,31 @@
left: -14rpx;
top: 25rpx;
}
.broadcast-details .chat .item .text.textR .conter:before {
left: unset;
right: -14rpx;
transform: rotateY(180deg);
}
.broadcast-details .chat .item .text .conter img {
/* #ifdef H5 */
width: 100%;
/* #endif */
display: block;
}
.broadcast-details .chat .item .text .conter .signal {
width: 48rpx;
height: 48rpx;
}
.broadcast-details .chat .item .text .conter .signal.signalR {
transform: rotate(180deg);
-ms-transform: rotate(180deg);
-webkit-transform: rotate(180deg);
}
.broadcast-details .footerCon {
height: 100rpx;
width: 100%;
@ -1724,14 +1836,17 @@
margin-top: calc(0rpx+ constant(safe-area-inset-bottom)); /// IOS<11.2/
margin-top: calc(0rpx + env(safe-area-inset-bottom)); /// IOS>11.2/
}
.broadcast-details .footerCon.on {
position: relative;
top: -300rpx;
transform: translate3d(0, 0, 0) !important;
.banner {
margin-top: 0;
}
}
.broadcast-details .footerCon .banner .swiper-slide {
flex-wrap: wrap;
-webkit-flex-wrap: wrap;
@ -1739,6 +1854,7 @@
padding-bottom: 50rpx;
border-top: 1px solid #f5f5f5;
}
.broadcast-details .footerCon .banner .swiper-slide .emoji-outer,
.swiper-slide .em {
display: block;
@ -1746,12 +1862,15 @@
height: 50rpx;
margin: 40rpx 0 0 50rpx;
}
.broadcast-details .footerCon .banner .swiper-container-horizontal>.swiper-pagination-bullets {
bottom: 10rpx;
}
.broadcast-details .footerCon .slider-banner .swiper-pagination-bullet-active {
background-color: #999;
}
.broadcast-details .recording {
width: 300rpx;
height: 300rpx;
@ -1760,10 +1879,12 @@
left: 50%;
margin-left: -150rpx;
}
.broadcast-details .recording img {
width: 100%;
height: 100%;
}
.broadcast-details .footer {
// width: 100%;
background-color: #fff;
@ -1771,18 +1892,23 @@
align-items: center;
}
.footer_box {
margin-top: 260rpx;
}
.broadcast-details .footer image {
width: 61rpx;
height: 60rpx;
display: block;
}
.broadcast-details .footer .icon-biaoqing2,.broadcast-details .footer .icon-tupian2 {
.broadcast-details .footer .icon-biaoqing2,
.broadcast-details .footer .icon-tupian2 {
font-size: 60rpx;
display: block;
}
.broadcast-details .footer .voice {
width: 440rpx;
border-radius: 10rpx;
@ -1791,6 +1917,7 @@
height: 60rpx;
padding-left: 20rpx;
}
.broadcast-details .footer .input_count {
margin-left: 20rpx;
width: 544rpx;
@ -1801,10 +1928,12 @@
height: 76rpx;
position: relative;
}
.broadcast-details .footer .placeholder {
color: #999999;
font-size: 26rpx;
}
.broadcast-details .footer .input {
max-height: 150rpx;
overflow-y: auto;
@ -1813,6 +1942,7 @@
height: 76rpx;
font-size: 26rpx;
}
.broadcast-details .footer .send {
font-size: 48rpx;
color: #cccccc;
@ -1820,12 +1950,14 @@
right: 15rpx;
top: 15rpx;
}
.em {
display: inline-block;
width: 50rpx;
height: 50rpx;
margin: 40rpx 0 0 50rpx;
}
.emoji-outer {
position: absolute;
right: 70rpx;
@ -1834,11 +1966,13 @@
height: 50rpx;
margin: 40rpx 0 0 50rpx;
}
.broadcast-details {
display: flex;
flex-direction: column;
width: 100%;
overflow: hidden;
.hd-wrapper {
flex: 1;
display: flex;
@ -1850,6 +1984,7 @@
}
}
}
.store-wrapper {
display: flex;
align-items: center;
@ -1861,15 +1996,18 @@
top: 0;
left: 0;
z-index: 100;
image {
width: 60rpx;
height: 60rpx;
margin-right: 10rpx;
}
.left {
display: flex;
align-items: center;
}
.link {
width: 80rpx;
height: 40rpx;
@ -1880,8 +2018,10 @@
color: var(--view-theme);
text-align: center;
}
.store-opeation {
align-items: center;
.icon-dadianhua01 {
color: var(--view-theme);
margin-left: 28rpx;

View File

@ -357,7 +357,12 @@
}
})
},
scanQRcode() {
async scanQRcode() {
// #ifdef APP-PLUS
let result = await this.$store.dispatch("permission/requestPermissions",
'CAMERA')
if (result !== 1) return;
// #endif
uni.scanCode({
success: (res) => {
console.log(res);

View File

@ -10,8 +10,7 @@
<view class="town_name">{{street||'定位中' }}</view>
</view>
<view class="flex_a_c_j_sb">
<view style="margin-right: 30rpx;" @click="scanQRcode"
hover-class="none">
<view style="margin-right: 30rpx;" @click="scanQRcode" hover-class="none">
<view class="iconfont icon-saoma" style="color:#fff;font-size:40rpx;"> </view>
</view>
<navigator url="/pages/chat/customer_list/index?type=0" hover-class="none">
@ -27,8 +26,7 @@
<view class="swiper page_swiper" v-if="imgUrls.length">
<swiper :autoplay="true" :circular="circular" :interval="intervals" :duration="duration"
indicator-color="rgba(255,255,255,0.6)" indicator-active-color="#fff" :current="swiperCur"
style="height:330rpx;margin: 0 auto;width:710rpx;" @change="swiperChange"
:class="{ scalex:isScale }">
style="height:330rpx;margin: 0 auto;width:710rpx;" @change="swiperChange" :class="{ scalex:isScale }">
<block v-for="(item,index) in imgUrls" :key="index">
<swiper-item :class="{ active: index == swiperCur,scalex:isScale }">
<view @click="goDetail(item)" class='slide-navigator acea-row row-between-wrapper'>
@ -221,7 +219,12 @@
})
},
methods: {
scanQRcode() {
async scanQRcode() {
// #ifdef APP-PLUS
let result = await this.$store.dispatch("permission/requestPermissions",
'CAMERA')
if (result !== 1) return;
// #endif
uni.scanCode({
success: (res) => {
console.log(res);

View File

@ -31,9 +31,14 @@
let that = this;
uni.downloadFile({
url: imageUrl,
success(res) {
success: async (res)=> {
if (res.statusCode === 200) {
let tempFilePath = res.tempFilePath; //
// #ifdef APP-PLUS
let result = await this.$store.dispatch("permission/requestPermissions",
'WRITE_EXTERNAL_STORAGE')
if (result !== 1) return;
// #endif
uni.saveImageToPhotosAlbum({
filePath: tempFilePath,
success() {

View File

@ -97,8 +97,19 @@
}
},
onLoad(options) {
// #ifdef APP-PLUS
this.$store.dispatch("permission/requestPermissions",
'ACCESS_FINE_LOCATION').then(result => {
if (result == 1) {
this.getLoaction();
this.loadArea();
}
})
// #endif
// #ifndef APP-PLUS
this.getLoaction();
this.loadArea();
// #endif
},
onShow() {},
computed: {

View File

@ -1564,7 +1564,7 @@
title: '下单成功,请上传支付凭证!'
}, {
tab: 5,
url: "/pages/users/order_list/index"
url: "/pages/users/order_list/index?sale_type="+ this.sale_type
});
break;
// #ifdef H5

View File

@ -245,7 +245,15 @@
* 上传图片文件
*
*/
uploadpic: function() {
uploadpic: async function() {
// #ifdef APP-PLUS
let result = await this.$store.dispatch("permission/requestPermissions",
'CAMERA')
if (result !== 1) return;
result = await this.$store.dispatch("permission/requestPermissions",
'READ_EXTERNAL_STORAGE')
if (result !== 1) return;
// #endif
let that = this;
if (that.open_update_info == 0) {
return;

View File

@ -9,7 +9,9 @@
// +----------------------------------------------------------------------
import app from "./app";
import storage from "./storage.js";
import permission from "./permission.js";
export default {
app,
storage
storage,
permission
};

249
store/modules/permission.js Normal file
View File

@ -0,0 +1,249 @@
// 权限说明
const state = {
WRITE_EXTERNAL_STORAGE: false,
READ_EXTERNAL_STORAGE: false,
CAMERA: false,
CALL_PHONE: false,
ACCESS_FINE_LOCATION: false,
/* #ifdef APP-PLUS */
isIos: plus.os.name == "iOS",
/* #endif */
mapping: {
'WRITE_EXTERNAL_STORAGE': {
title: "存储空间/照片权限说明",
content: "便于您使用该功能上传您的照片/图片/视频及用于更换头像、发布评论/分享、下载、与客服沟通等场景中读取和写入相册和文件内容。",
methods: 'SET_WRITE_EXTERNAL_STORAGE'
},
'READ_EXTERNAL_STORAGE': {
title: "存储空间/照片权限说明",
content: "便于您使用该功能上传您的照片/图片/视频及用于更换头像、发布评论/分享、下载、与客服沟通等场景中读取和写入相册和文件内容。",
methods: 'SET_READ_EXTERNAL_STORAGE'
},
'CAMERA': {
title: "相机/存储空间/照片权限说明",
content: "便于您使用该功能上传您的照片/图片/视频及用于更换头像、发布评论/分享、下载、与客服沟通等场景中读取和写入相册和文件内容。",
methods: 'SET_CAMERA'
},
'CALL_PHONE': {
title: "拨打/管理电话权限说明",
content: "便于您使用该功能联系商家或者商家与您联系等场景",
methods: 'SET_CALL_PHONE'
},
'ACCESS_FINE_LOCATION': {
title: "获取位置权限说明",
content: "便于您使用该功能查看附近店铺/附近商品/店铺所在位置等场景",
methods: 'SET_ACCESS_FINE_LOCATION'
}
}
}
const mutations = {
SET_WRITE_EXTERNAL_STORAGE(state, val) {
state.WRITE_EXTERNAL_STORAGE = val
},
SET_CALL_PHONE(state, val) {
state.CALL_PHONE = val
},
SET_READ_EXTERNAL_STORAGE(state, val) {
state.READ_EXTERNAL_STORAGE = val
},
SET_CAMERA(state, val) {
state.CAMERA = val
},
SET_ACCESS_FINE_LOCATION(state, val) {
state.ACCESS_FINE_LOCATION = val
},
}
const actions = {
//权限获取
async requestPermissions({
state,
dispatch,
commit
}, permissionID) {
try {
if (!state[permissionID] && !state.isIos) {
var viewObj = await dispatch('nativeObjView', permissionID);
viewObj.show();
}
console.log('android.permission.' + permissionID, '当前手机权限');
return new Promise(async (resolve, reject) => {
//苹果不需要这个
if(state.isIos){
resolve(1);
return
}
// Android权限查询
function requestAndroidPermission(permissionID_) {
return new Promise((resolve, reject) => {
plus.android.requestPermissions(
[
permissionID_
], // 理论上支持多个权限同时查询,但实际上本函数封装只处理了一个权限的情况。有需要的可自行扩展封装
function (resultObj) {
var result = 0;
for (var i = 0; i < resultObj.granted.length; i++) {
var grantedPermission = resultObj.granted[i];
console.log('已获取的权限:' + grantedPermission);
result = 1
}
for (var i = 0; i < resultObj.deniedPresent
.length; i++) {
var deniedPresentPermission = resultObj
.deniedPresent[
i];
console.log('拒绝本次申请的权限:' + deniedPresentPermission);
result = 0
}
for (var i = 0; i < resultObj.deniedAlways
.length; i++) {
var deniedAlwaysPermission = resultObj.deniedAlways[
i];
console.log('永久拒绝申请的权限:' + deniedAlwaysPermission);
result = -1
}
resolve(result);
},
function (error) {
console.log('申请权限错误:' + error.code + " = " + error
.message);
resolve({
code: error.code,
message: error.message
});
}
);
});
}
const result = await requestAndroidPermission(
'android.permission.' + permissionID
);
if (result === 1) {
//'已获得授权'
commit(state.mapping[permissionID].methods, true)
} else if (result === 0) {
//'未获得授权'
commit(state.mapping[permissionID].methods, false)
} else {
commit(state.mapping[permissionID].methods, true)
uni.showModal({
title: '提示',
content: '操作权限已被拒绝,请手动前往设置',
confirmText: "立即设置",
success: (res) => {
if (res.confirm) {
dispatch('gotoAppPermissionSetting')
}
}
})
}
if (viewObj) viewObj.close()
resolve(result);
});
} catch (error) {
console.log(error);
reject(error);
}
},
//提示框
nativeObjView({
state
}, permissionID) {
const systemInfo = uni.getSystemInfoSync();
const statusBarHeight = systemInfo.statusBarHeight;
const navigationBarHeight = systemInfo.platform === 'android' ? 48 :
44; // Set the navigation bar height based on the platform
const totalHeight = statusBarHeight + navigationBarHeight;
let view = new plus.nativeObj.View('per-modal', {
top: '0px',
left: '0px',
width: '100%',
backgroundColor: '#444',
//opacity: .5;
})
view.drawRect({
color: '#fff',
radius: '5px'
}, {
top: totalHeight + 'px',
left: '5%',
width: '90%',
height: "100px",
})
view.drawText(state.mapping[permissionID].title, {
top: totalHeight + 5 + 'px',
left: "8%",
height: "30px"
}, {
align: "left",
color: "#000",
}, {
onClick: function (e) {
console.log(e);
}
})
view.drawText(state.mapping[permissionID].content, {
top: totalHeight + 35 + 'px',
height: "60px",
left: "8%",
width: "84%"
}, {
whiteSpace: 'normal',
size: "14px",
align: "left",
color: "#656563"
})
function show() {
view = plus.nativeObj.View.getViewById('per-modal');
view.show()
view = null//展示的时候也得清空,不然影响下次的关闭,不知道为啥
}
function close() {
view = plus.nativeObj.View.getViewById('per-modal');
view.close();
view = null
}
return {
show,
close
}
},
// 跳转到**应用**的权限页面
gotoAppPermissionSetting({
state
}) {
if (state.isIos) {
var UIApplication = plus.ios.import("UIApplication");
var application2 = UIApplication.sharedApplication();
var NSURL2 = plus.ios.import("NSURL");
// var setting2 = NSURL2.URLWithString("prefs:root=LOCATION_SERVICES");
var setting2 = NSURL2.URLWithString("app-settings:");
application2.openURL(setting2);
plus.ios.deleteObject(setting2);
plus.ios.deleteObject(NSURL2);
plus.ios.deleteObject(application2);
} else {
// console.log(plus.device.vendor);
var Intent = plus.android.importClass("android.content.Intent");
var Settings = plus.android.importClass("android.provider.Settings");
var Uri = plus.android.importClass("android.net.Uri");
var mainActivity = plus.android.runtimeMainActivity();
var intent = new Intent();
intent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
var uri = Uri.fromParts("package", mainActivity.getPackageName(), null);
intent.setData(uri);
mainActivity.startActivity(intent);
}
}
}
export default {
namespaced: true,
state,
mutations,
actions
};