修改商品图片格式,以及供应界面

This commit is contained in:
jia 2023-09-04 11:58:13 +08:00
parent 62cf986c9c
commit c16be21609
15 changed files with 64 additions and 186 deletions

View File

@ -1,6 +1,6 @@
<template> <template>
<view class="gather"> <view class="gather">
<view @click="selectLocation"> <view @click="selectLocation" v-if="isFshow">
<view class="site-box flex_a_c_j_sb" :style="{'background-color':backColor}"> <view class="site-box flex_a_c_j_sb" :style="{'background-color':backColor}">
<view :class="['place_wrapper','flex_a_c',isFshow?'sitebox':'']"> <view :class="['place_wrapper','flex_a_c',isFshow?'sitebox':'']">
@ -180,7 +180,6 @@
this.$bus.$on('value-updated', (newValue) => { this.$bus.$on('value-updated', (newValue) => {
// //
this.street = newValue.split(',')[0] this.street = newValue.split(',')[0]
}); });
}, },
@ -358,7 +357,7 @@
let town = res.data.address_reference.town.title let town = res.data.address_reference.town.title
let street_id = res.data.address_reference.town.id let street_id = res.data.address_reference.town.id
this.street = res.data.address_component.street this.street = res.data.address_component.street
uni.$emit('add', town + ',' + street_id) uni.$emit('add', this.street + ',' + street_id)
}).catch(err => { }).catch(err => {
uni.showToast({ uni.showToast({

View File

@ -11,13 +11,13 @@
<view class="goods"> <view class="goods">
<block v-for="(item,index) in cateGoods" :key="index"> <block v-for="(item,index) in cateGoods" :key="index">
<view class="goods_item" @click="gogogo(item)"> <view class="goods_item" @click="gogogo(item)">
<image class="goods_img" :src="item.image[0]" mode="aspectFill"></image> <image class="goods_img" :src="item.image[0]" mode="aspectFit"></image>
<view class="botm"> <view class="botm">
<view class="title">{{item.title}}</view> <view class="title">{{item.title}}</view>
<view class="goods_info flex_a_c"> <view class="goods_info flex_a_c">
<view class="l_info flex_a_c"> <view class="l_info flex_a_c">
<image :src="(item.author && item.author.avatar) || '/static/images/f.png'" <image :src="(item.author && item.author.avatar) || '/static/images/f.png'"
mode="aspectFill" class="g_img"></image> mode="aspectFit" class="g_img"></image>
<view class="g_name">{{item.author && item.author.nickname}}</view> <view class="g_name">{{item.author && item.author.nickname}}</view>
</view> </view>
<view class="nice_box" @click.stop="giveStart(item)"> <view class="nice_box" @click.stop="giveStart(item)">

View File

@ -28,7 +28,7 @@
</view> </view>
<view class="advertItem02 advertItem05 acea-row" v-if="style==4"> <view class="advertItem02 advertItem05 acea-row" v-if="style==4">
<view class="item" v-for="(item,index) in picList" :key="index" @click="goDetail(item)"> <view class="item" v-for="(item,index) in picList" :key="index" @click="goDetail(item)">
<image :src="item.image" mode="aspectFill" :style="'height:'+ imageH +'rpx;'"></image> <image :src="item.image" mode="aspectFit" :style="'height:'+ imageH +'rpx;'"></image>
</view> </view>
</view> </view>
<view class="advertItem02 advertItem06 acea-row" v-if="style==5"> <view class="advertItem02 advertItem06 acea-row" v-if="style==5">

View File

@ -1,7 +1,7 @@
<template> <template>
<view class="Circle_friends"> <view class="Circle_friends">
<view class="circle_friends_wrapper"> <view class="circle_friends_wrapper">
<view> <view v-if="isFshow">
<view class="site-box flex_a_c_j_sb" :style="{'background-color':backColor}"> <view class="site-box flex_a_c_j_sb" :style="{'background-color':backColor}">
<view :class="['place_wrapper','flex_a_c',isFshow?'sitebox':'']" @click="selectLocation"> <view :class="['place_wrapper','flex_a_c',isFshow?'sitebox':'']" @click="selectLocation">
@ -19,7 +19,6 @@
</view> </view>
</view> --> </view> -->
</view> </view>
@ -258,7 +257,7 @@
onReachBottom() { onReachBottom() {
if (this.status == 'nomore') return; if (this.status == 'nomore') return;
this.status = 'loading'; this.status = 'loading';
this.where.limit = 2
this.where.page = ++this.where.page; this.where.page = ++this.where.page;
this.getGoods() this.getGoods()
}, },
@ -547,7 +546,6 @@
this.street = res.data.address_component.street this.street = res.data.address_component.street
// console.log(this.street)
uni.$emit('add',town+','+street_id) uni.$emit('add',town+','+street_id)
}).catch(err => { }).catch(err => {
uni.showToast({ uni.showToast({

View File

@ -11,7 +11,7 @@
<view class="store_site flex_a_c" v-if="store_item.street_name">{{ store_item.street_name }}</view> <view class="store_site flex_a_c" v-if="store_item.street_name">{{ store_item.street_name }}</view>
<view class="name">{{ store_item.mer_name }}</view> <view class="name">{{ store_item.mer_name }}</view>
</view> </view>
<image class="high_img" :src="youZhiImg" mode="aspectFill"></image> <image class="high_img" :src="youZhiImg" mode="aspectFit"></image>
</view> </view>
<view class="mct_msg_detail flex_a_c"> <view class="mct_msg_detail flex_a_c">
<view class="product_score">{{ store_item.product_score }}</view> <view class="product_score">{{ store_item.product_score }}</view>
@ -32,7 +32,7 @@
<scroll-view scroll-x="true" class="goods_info"> <scroll-view scroll-x="true" class="goods_info">
<view v-for="(itemn,indexn) in store_item.recommend" :key="indexn" class="goods_info_item" <view v-for="(itemn,indexn) in store_item.recommend" :key="indexn" class="goods_info_item"
@click.stop="navTogoodsDetail(itemn.product_id)"> @click.stop="navTogoodsDetail(itemn.product_id)">
<image class="goods_info_img" :src="itemn.image" mode="aspectFill"></image> <image class="goods_info_img" :src="itemn.image" mode="aspectFit"></image>
<view class="goods_info_name">{{itemn.store_name}}</view> <view class="goods_info_name">{{itemn.store_name}}</view>
<view class="goods_info_price">{{itemn.price}}</view> <view class="goods_info_price">{{itemn.price}}</view>
</view> </view>

View File

@ -11,7 +11,7 @@
</view> </view>
<block v-for="(item,i) in goodsList" :key="i"> <block v-for="(item,i) in goodsList" :key="i">
<view class="list_item flex_a_c"> <view class="list_item flex_a_c">
<image class="goods_img" :src="item.image" mode="aspectFill"></image> <image class="goods_img" :src="item.image" mode="aspectFit"></image>
<view class="r_box flex_a_c_j_sb"> <view class="r_box flex_a_c_j_sb">
<view class="message"> <view class="message">
<view class="goodstitle">{{item.store_name}}</view> <view class="goodstitle">{{item.store_name}}</view>

View File

@ -20,7 +20,7 @@
<block v-for="(item,index) in list" :key="index"> <block v-for="(item,index) in list" :key="index">
<view class="item_list flex"> <view class="item_list flex">
<view> <view>
<image class="goods_image" :src="item.image" mode="aspectFill"></image> <image class="goods_image" :src="item.image" mode="aspectFit"></image>
</view> </view>
<view class="left_goods_msg"> <view class="left_goods_msg">
<view class="name">{{ item.store_name }}</view> <view class="name">{{ item.store_name }}</view>

View File

@ -33,7 +33,7 @@
<view class="right_storee"> <view class="right_storee">
<scroll-view scroll-y="true" style="height: 100%; overflow: hidden;" scroll-with-animation='true' <scroll-view scroll-y="true" style="height: 100%; overflow: hidden;" scroll-with-animation='true'
@scrolltolower="scrolltolower" class="my-scroll-view"> @scrolltolower="scrolltolower" class="my-scroll-view">
<image class="banner" :src="src" mode="aspectFill"></image> <image class="banner" :src="src" mode="aspectFit"></image>
<view style="background-color: #fff;width: 100%;"> <view style="background-color: #fff;width: 100%;">
<view class="tabs_box flex_a_c_j_sb"> <view class="tabs_box flex_a_c_j_sb">
<view v-for="(item,index) in tabsList" :key="index" class="flex_a_c" :class="active==index?'active':''"> <view v-for="(item,index) in tabsList" :key="index" class="flex_a_c" :class="active==index?'active':''">

View File

@ -8,7 +8,7 @@
<view class="text flex_a_c"><i class="iconfont icon-xinghao"></i>上传店铺背景图</view> <view class="text flex_a_c"><i class="iconfont icon-xinghao"></i>上传店铺背景图</view>
<block v-if="images[0].img"> <block v-if="images[0].img">
<u--image :showLoading="true" :src="images[0].img" width="388px" height="210.53rpx" radius="4px" <u--image :showLoading="true" :src="images[0].img" width="388px" height="210.53rpx" radius="4px"
@click="delImg(0)" mode="aspectFill"></u--image> @click="delImg(0)" mode="aspectFit"></u--image>
</block> </block>
<view v-else class="upload" @click="seleckImage(0)"> <view v-else class="upload" @click="seleckImage(0)">
<view class="iconfont icon-tupian1"></view> <view class="iconfont icon-tupian1"></view>
@ -20,7 +20,7 @@
<view class="text flex_a_c"><i class="iconfont icon-xinghao"></i>上传店铺头像</view> <view class="text flex_a_c"><i class="iconfont icon-xinghao"></i>上传店铺头像</view>
<block v-if="images[1].img"> <block v-if="images[1].img">
<u--image :showLoading="true" :src="images[1].img" width="210.53rpx" height="210.53rpx" <u--image :showLoading="true" :src="images[1].img" width="210.53rpx" height="210.53rpx"
radius="4px" @click="delImg(1)" mode="aspectFill"></u--image> radius="4px" @click="delImg(1)" mode="aspectFit"></u--image>
</block> </block>
<view v-else class="avatar_img" @click="seleckImage(1)"> <view v-else class="avatar_img" @click="seleckImage(1)">
<view class="iconfont icon-tupian1"></view> <view class="iconfont icon-tupian1"></view>

View File

@ -177,7 +177,7 @@
<navigator v-if="userInfo.uid != item.author.uid" hover-class="none" <navigator v-if="userInfo.uid != item.author.uid" hover-class="none"
:url="'/pages/plantGrass/plant_user/index?id='+item.uid" class="pictrue"> :url="'/pages/plantGrass/plant_user/index?id='+item.uid" class="pictrue">
<image class="userAvatar" :src="item.author.avatar || '/static/images/f.png'" <image class="userAvatar" :src="item.author.avatar || '/static/images/f.png'"
mode="aspectFill"> mode="aspectFit">
</image> </image>
<view v-if="!item.is_fans || userInfo.uid == 0" class="guanzhu" <view v-if="!item.is_fans || userInfo.uid == 0" class="guanzhu"
@click.stop="followAuthor(item)"><text @click.stop="followAuthor(item)"><text
@ -248,7 +248,7 @@
<!-- 3.阿里云视频截帧地址https://help.aliyun.com/document_detail/64555.html --> <!-- 3.阿里云视频截帧地址https://help.aliyun.com/document_detail/64555.html -->
<image v-if="item.isShowimage == true" <image v-if="item.isShowimage == true"
:src="item.src+'?x-oss-process=video/snapshot,t_'+ currenttimes +'000,f_jpg'" :src="item.src+'?x-oss-process=video/snapshot,t_'+ currenttimes +'000,f_jpg'"
mode="aspectFill" mode="aspectFit"
:style="'width: 120upx; height: 160upx; border-radius: 10upx; position: absolute; bottom: '+ (ProgressBarBottom + 160) +'upx; left: '+ (currentPositions - 15) +'px;'"> :style="'width: 120upx; height: 160upx; border-radius: 10upx; position: absolute; bottom: '+ (ProgressBarBottom + 160) +'upx; left: '+ (currentPositions - 15) +'px;'">
</image> </image>
</view> </view>
@ -262,13 +262,13 @@
:style="'width: '+ windowWidth +'px; height: '+ boxStyle.height +'px;'"> :style="'width: '+ windowWidth +'px; height: '+ boxStyle.height +'px;'">
<cell class="goods_item" style="margin-bottom: 10px;" v-for="(item,index) in cateGoods" :key="item.uid" <cell class="goods_item" style="margin-bottom: 10px;" v-for="(item,index) in cateGoods" :key="item.uid"
@click="gogogo(item)"> @click="gogogo(item)">
<image class="goods_img" :src="item.image[0]" mode="aspectFill"></image> <image class="goods_img" :src="item.image[0]" mode="aspectFit"></image>
<view class="botm"> <view class="botm">
<text class="title">{{item.title}}</text> <text class="title">{{item.title}}</text>
<view class="goods_info"> <view class="goods_info">
<view class="l_info"> <view class="l_info">
<image :src="(item.author && item.author.avatar) || '/static/images/f.png'" <image :src="(item.author && item.author.avatar) || '/static/images/f.png'"
mode="aspectFill" class="g_img"></image> mode="aspectFit" class="g_img"></image>
<text class="g_name">{{item.author && item.author.nickname}}</text> <text class="g_name">{{item.author && item.author.nickname}}</text>
</view> </view>
<view class="nice_box flex_a_c" @click.stop="giveStart(item)"> <view class="nice_box flex_a_c" @click.stop="giveStart(item)">
@ -314,7 +314,7 @@
<mentioned ref="mentioned" @close="closePopup" :list="moreList" :uid="authorUid"></mentioned> <mentioned ref="mentioned" @close="closePopup" :list="moreList" :uid="authorUid"></mentioned>
</view> </view>
</uni-popup> </uni-popup>
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> <!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
<view class="fixed-head"> <view class="fixed-head">
<view class="sys-head" :style="{height:statusBarHeight}"></view> <view class="sys-head" :style="{height:statusBarHeight}"></view>
<view class="tool-bar" @click='goBack()'> <view class="tool-bar" @click='goBack()'>
@ -501,7 +501,7 @@
this.wHeight = uni.getSystemInfoSync().screenHeight; //获取屏幕高度 this.wHeight = uni.getSystemInfoSync().screenHeight; //获取屏幕高度
this.boxStyle.height = this.wHeight; //改变视频高度 this.boxStyle.height = this.wHeight; //改变视频高度
this.get() //这一步,加载视频数据 this.get() //这一步,加载视频数据
if (this.isLogin) this.getUserInfo() // if (this.isLogin) this.getUserInfo()
}, },
onReady() {}, onReady() {},
methods: { methods: {
@ -656,14 +656,14 @@
}); });
}, },
// // 授权回调 // // 授权回调
onLoadFun() { // onLoadFun() {
this.isShowAuth = false // this.isShowAuth = false
this.getUserInfo() // this.getUserInfo()
}, // },
// 授权关闭 // 授权关闭
authColse: function(e) { // authColse: function(e) {
this.isShowAuth = e // this.isShowAuth = e
}, // },
moreTap(item) { moreTap(item) {
item.isMore = !item.isMore; item.isMore = !item.isMore;
}, },

View File

@ -162,7 +162,7 @@
<navigator v-if="list.author && userInfo.uid != list.author.uid" hover-class="none" <navigator v-if="list.author && userInfo.uid != list.author.uid" hover-class="none"
:url="'/pages/plantGrass/plant_user/index?id='+list.uid" class="pictrue"> :url="'/pages/plantGrass/plant_user/index?id='+list.uid" class="pictrue">
<image class="userAvatar" <image class="userAvatar"
:src="list.author&&list.author.avatar || '/static/images/f.png'" mode="aspectFill"> :src="list.author&&list.author.avatar || '/static/images/f.png'" mode="aspectFit">
</image> </image>
<view v-if="!list.is_fans || !userInfo.uid" class="guanzhu" <view v-if="!list.is_fans || !userInfo.uid" class="guanzhu"
@click.stop="followAuthor(list)"><text @click.stop="followAuthor(list)"><text
@ -227,13 +227,13 @@
@scrolltolower="getGoods()"> @scrolltolower="getGoods()">
<block v-for="(item,index) in cateGoods" :key="index"> <block v-for="(item,index) in cateGoods" :key="index">
<view class="goods_item" @click="gogogo(item)"> <view class="goods_item" @click="gogogo(item)">
<image class="goods_img" :src="item.image[0]" mode="aspectFill"></image> <image class="goods_img" :src="item.image[0]" mode="aspectFit"></image>
<view class="botm"> <view class="botm">
<view class="title">{{item.title}}</view> <view class="title">{{item.title}}</view>
<view class="goods_info flex_a_c"> <view class="goods_info flex_a_c">
<view class="l_info flex_a_c"> <view class="l_info flex_a_c">
<image :src="(item.author && item.author.avatar) || '/static/images/f.png'" <image :src="(item.author && item.author.avatar) || '/static/images/f.png'"
mode="aspectFill" class="g_img"></image> mode="aspectFit" class="g_img"></image>
<view class="g_name">{{item.author && item.author.nickname}}</view> <view class="g_name">{{item.author && item.author.nickname}}</view>
</view> </view>
<view class="nice_box flex_a_c" @click.stop="giveStart(item)"> <view class="nice_box flex_a_c" @click.stop="giveStart(item)">

View File

@ -3,7 +3,7 @@
<view class="circle_friends_wrapper"> <view class="circle_friends_wrapper">
<view @click="selectLocation"> <view @click="selectLocation" v-if="isFshow">
<view class="site-box flex_a_c_j_sb" :style="{'background-color':backColor}"> <view class="site-box flex_a_c_j_sb" :style="{'background-color':backColor}">
<view :class="['place_wrapper','flex_a_c',isFshow?'sitebox':'']" > <view :class="['place_wrapper','flex_a_c',isFshow?'sitebox':'']" >
@ -33,10 +33,10 @@
<navigator hover-class="none" <navigator hover-class="none"
:url="`/pages/nongKe/supply_chain/supplier?type_id=10&street_id=${street_id}`"> :url="`/pages/nongKe/supply_chain/supplier?type_id=10&street_id=${street_id}`">
<view class="list-m"> <view class="list-m">
<image src="@/static/images/f6.png" mode="aspectFill"></image> <image src="@/static/images/f6.png" mode="aspectFit"></image>
<view class="list-title"> <view class="list-title">
<view class="list-titlea"> <view class="list-titlea">
<image src="@/static/images/p9.png" mode="aspectFill"></image> <image src="@/static/images/p9.png" mode="aspectFit"></image>
<view class="titlea-con"> <view class="titlea-con">
<view class="titlea">september</view> <view class="titlea">september</view>
<view class="titleb"> <view class="titleb">
@ -60,7 +60,7 @@
</view> </view>
<view class="title-infoimg"> <view class="title-infoimg">
<image src="@/static/images/pj.png" mode=""></image> <image src="@/static/images/pj.png" mode="aspectFit"></image>
</view> </view>
</view> </view>
</view> </view>
@ -69,10 +69,10 @@
</navigator> </navigator>
<view class="list-m" @click="go_shop"> <view class="list-m" @click="go_shop">
<image src="@/static/images/f1.png" mode=""></image> <image src="@/static/images/f1.png" mode="aspectFit"></image>
<view class="list-title"> <view class="list-title">
<view class="list-titlea"> <view class="list-titlea">
<image src="@/static/images/p8.png" mode="aspectFill"></image> <image src="@/static/images/p8.png" mode="aspectFit"></image>
</view> </view>
<view class="list-titleb"> <view class="list-titleb">
<view class="titlea"> <view class="titlea">
@ -88,7 +88,7 @@
点击查看 点击查看
</view> </view>
<view class="title-infoimg"> <view class="title-infoimg">
<image src="@/static/images/pj1.png" mode=""></image> <image src="@/static/images/pj1.png" mode="aspectFit"></image>
</view> </view>
</view> </view>
</view> </view>
@ -104,7 +104,7 @@
精选当地特色特产 精选当地特色特产
</view> </view>
</view> </view>
<image src="@/static/images/f5.png" mode=""></image> <image src="@/static/images/f5.png" mode="aspectFit"></image>
</view> </view>
<view class="list-con-right"> <view class="list-con-right">
<view class="con-right" style="margin-bottom: 20rpx;"> <view class="con-right" style="margin-bottom: 20rpx;">
@ -116,7 +116,7 @@
美食线上一条街 美食线上一条街
</view> </view>
</view> </view>
<image src="@/static/images/f7.png" mode=""></image> <image src="@/static/images/f7.png" mode="aspectFit"></image>
</view> </view>
<view class="con-right"> <view class="con-right">
<view class="list-con-title"> <view class="list-con-title">
@ -127,13 +127,13 @@
热门景区当地文化 热门景区当地文化
</view> </view>
</view> </view>
<image src="@/static/images/f2.png" mode=""></image> <image src="@/static/images/f2.png" mode="aspectFit"></image>
</view> </view>
</view> </view>
</view> </view>
<view class="list-bon"> <view class="list-bon">
<image src="@/static/images/f4.png" mode=""></image> <image src="@/static/images/f4.png" mode="aspectFit"></image>
</view> </view>
<view class="goodslist"> <view class="goodslist">
<WaterfallsFlow :wfList='cateGoods' /> <WaterfallsFlow :wfList='cateGoods' />
@ -176,8 +176,7 @@
import { import {
getIndexData, getIndexData,
getDiy, getDiy,
getArticleList,
getArticleCategoryLists
} from '@/api/api.js' } from '@/api/api.js'
import { import {
@ -252,16 +251,16 @@
onPullDownRefresh() { onPullDownRefresh() {
this.cateGoods = [] this.cateGoods = []
this.list() // this.list()
this.Area() this.Area()
uni.stopPullDownRefresh() uni.stopPullDownRefresh()
}, },
onLoad() { onLoad() {
this.getArticle()
this.Area() this.Area()
this.setPermissions()
// this.openTongZhi() // this.openTongZhi()
uni.$on('connectstatusChange', (connectstatus) => { uni.$on('connectstatusChange', (connectstatus) => {
@ -280,9 +279,9 @@
onReachBottom() { onReachBottom() {
if (this.status == 'nomore') return; if (this.status == 'nomore') return;
this.status = 'loading'; this.status = 'loading';
this.where.limit = 2 t
this.where.page = ++this.where.page; this.where.page = ++this.where.page;
this.list() // this.list()
}, },
mounted() { mounted() {
@ -291,15 +290,13 @@
window.addEventListener("scroll", this.scrolling); window.addEventListener("scroll", this.scrolling);
// #endif // #endif
//
this.$nextTick(()=>{
this.$bus.$on('value-updated', (newValue) => { this.$bus.$on('value-updated', (newValue) => {
// //
this.street = newValue.split(',')[0] this.street = newValue.split(',')[0]
this.town=newValue.split(',')[0] this.town=newValue.split(',')[0]
this.street_id=newValue.split(',')[1] this.street_id=newValue.split(',')[1]
}); });
})
if(this.street.length<=0){ if(this.street.length<=0){
@ -379,39 +376,6 @@
async getArticle() {
let list = []
const {
data
} = await getArticleCategoryLists()
data.map((item, index) => {
if (item.title !== '首页推荐') {
list.push(item)
} else {
getArticleList(item.article_category_id).then(res => {
this.recoList = res.data.list
})
}
})
this.tabsData1.list = list
this.getArticleList(list[0].article_category_id)
},
async getArticleList(id) {
let obj = {
is_home: 1
}
const {
data
} = await getArticleList(id)
this.articleList = data.list
},
article(item) {
uni.navigateTo({
url: '/pages/news_details/index?id=' + item.article_id
})
},
getCloudShopMerId(id) { getCloudShopMerId(id) {
get_cloud_shop(id).then(res => { get_cloud_shop(id).then(res => {
@ -538,7 +502,7 @@
this.town = res.data.address_reference.town.title this.town = res.data.address_reference.town.title
this.street_id = res.data.address_reference.town.id this.street_id = res.data.address_reference.town.id
this.street = res.data.address_component.street this.street = res.data.address_component.street
uni.$emit('add',this.town+','+this.street_id) uni.$emit('add',this.street+','+this.street_id)
// uni.setStorageSync('ADRESS_LOCATION', // uni.setStorageSync('ADRESS_LOCATION',
// this.town + ',' + this.street_id) // this.town + ',' + this.street_id)
// this.list() // this.list()
@ -560,91 +524,8 @@
}); });
}, },
/**
* 设置手机通知权限
*/
setPermissions() {
// #ifdef APP-PLUS
if (plus.os.name == 'Android') { // Android
var main = plus.android.runtimeMainActivity();
var pkName = main.getPackageName();
var uid = main.getApplicationInfo().plusGetAttribute("uid");
var NotificationManagerCompat = plus.android.importClass(
"android.support.v4.app.NotificationManagerCompat");
//android.support.v4androidx
if (NotificationManagerCompat == null) {
NotificationManagerCompat = plus.android.importClass(
"androidx.core.app.NotificationManagerCompat");
}
var areNotificationsEnabled = NotificationManagerCompat.from(main).areNotificationsEnabled();
//
if (!areNotificationsEnabled) {
uni.showModal({
title: '通知权限开启提醒',
content: '您还没有开启通知权限,无法接受到消息通知,请前往设置!',
showCancel: false,
confirmText: '去设置',
success: function(res) {
if (res.confirm) {
var Intent = plus.android.importClass('android.content.Intent');
var Build = plus.android.importClass("android.os.Build");
//android 8.0
if (Build.VERSION.SDK_INT >= 26) {
var intent = new Intent(
'android.settings.APP_NOTIFICATION_SETTINGS');
intent.putExtra('android.provider.extra.APP_PACKAGE', pkName);
} else if (Build.VERSION.SDK_INT >= 21) { //android 5.0-7.0
var intent = new Intent(
'android.settings.APP_NOTIFICATION_SETTINGS');
intent.putExtra("app_package", pkName);
intent.putExtra("app_uid", uid);
} else { //(<21)--
intent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
var uri = Uri.fromParts("package", mainActivity
.getPackageName(),
null);
intent.setData(uri);
}
//
main.startActivity(intent);
}
}
});
}
} else if (plus.os.name == 'iOS') { // ISO
var isOn = undefined;
var types = 0;
var app = plus.ios.invoke('UIApplication', 'sharedApplication');
var settings = plus.ios.invoke(app, 'currentUserNotificationSettings');
if (settings) {
types = settings.plusGetAttribute('types');
plus.ios.deleteObject(settings);
} else {
types = plus.ios.invoke(app, 'enabledRemoteNotificationTypes');
}
plus.ios.deleteObject(app);
isOn = (0 != types);
if (isOn == false) {
uni.showModal({
title: '通知权限开启提醒',
content: '您还没有开启通知权限,无法接受到消息通知,请前往设置!',
showCancel: false,
confirmText: '去设置',
success: function(res) {
if (res.confirm) {
var app = plus.ios.invoke('UIApplication', 'sharedApplication');
var setting = plus.ios.invoke('NSURL', 'URLWithString:',
'app-settings:');
plus.ios.invoke(app, 'openURL:', setting);
plus.ios.deleteObject(setting);
plus.ios.deleteObject(app);
}
}
});
}
}
// #endif
}
} }
} }
</script> </script>
@ -881,10 +762,10 @@
.list-title { .list-title {
display: flex; display: flex;
position: absolute; position: absolute;
top: 0; top: 20rpx;
.list-titlea { .list-titlea {
margin-top: 10rpx;
margin-left: 14rpx; margin-left: 14rpx;
width: 96rpx; width: 96rpx;
height: 117rpx; height: 117rpx;
@ -897,14 +778,14 @@
color: #F4F7FE; color: #F4F7FE;
.titlea { .titlea {
margin-top: 10rpx; margin-top: 12rpx;
margin-left: 8rpx; margin-left: 12rpx;
font-size: 12rpx; font-size: 16rpx;
font-family: PingFang SC-Semibold, PingFang SC; font-family: PingFang SC-Semibold, PingFang SC;
} }
.titleb { .titleb {
margin-top: 18rpx; margin-top: 6rpx;
font-size: 37rpx; font-size: 37rpx;
font-family: PingFang SC-Semibold, PingFang SC; font-family: PingFang SC-Semibold, PingFang SC;
font-weight: 600; font-weight: 600;
@ -933,7 +814,7 @@
} }
.titleb { .titleb {
margin-top: 5rpx;
font-size: 33rpx; font-size: 33rpx;
font-family: PingFang SC-Medium, PingFang SC; font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500; font-weight: 500;

View File

@ -56,7 +56,7 @@
</view> --> </view> -->
</view> </view>
<view class="totalfooter"> <view class="totalfooter">
<view class='bnt b-color' v-if="!item.orderProduct[indexs]" <view class='bnt b-color'
@click="importshop(item.order_id,item.orderProduct[indexs].product_id,item.orderProduct[indexs].product_sku)"> @click="importshop(item.order_id,item.orderProduct[indexs].product_id,item.orderProduct[indexs].product_sku)">
立即导入</view> 立即导入</view>
</view> </view>

View File

@ -8,7 +8,7 @@
<text class="iconfont icon-sousuo"></text> <text class="iconfont icon-sousuo"></text>
<input v-model="where.keyword" confirm-type="search" placeholder="请输入关键字" class="input" /> <input v-model="where.keyword" confirm-type="search" placeholder="请输入关键字" class="input" />
<view class="search_btn"> <view class="search_btn">
<image src="@/static/images/serchbtn.png" mode="aspectFill" @click="handleSearch"> <image src="@/static/images/serchbtn.png" mode="aspectFit" @click="handleSearch">
</image> </image>
</view> </view>

View File

@ -10,10 +10,10 @@
<view class='money'>{{userInfo.now_money || 0}}</view> <view class='money'>{{userInfo.now_money || 0}}</view>
</view> </view>
<!-- #ifdef APP-PLUS || H5 --> <!-- #ifdef APP-PLUS || H5 -->
<navigator v-if="recharge_switch == 1" url="/pages/users/user_payment/index" hover-class="none" class='recharge t-color'>充值</navigator> <navigator url="/pages/users/user_payment/index" hover-class="none" class='recharge t-color'>充值</navigator>
<!-- #endif --> <!-- #endif -->
<!-- #ifdef MP --> <!-- #ifdef MP -->
<view v-if="recharge_switch == 1" @click="openSubscribe('/pages/users/user_payment/index')" class='recharge t-color'>充值</view> <view @click="openSubscribe('/pages/users/user_payment/index')" class='recharge t-color'>充值</view>
<!-- #endif --> <!-- #endif -->
</view> </view>
<view class='cumulative acea-row row-top'> <view class='cumulative acea-row row-top'>
@ -52,7 +52,7 @@
</navigator> </navigator>
</view> </view>
</view> </view>
<recommend v-if="recommend_switch == 1" :hostProduct="hostProduct" :isLogin="isLogin"></recommend> <recommend :hostProduct="hostProduct" :isLogin="isLogin"></recommend>
</view> </view>
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
</view> </view>