6.28-提交页面

lijinlong
李劲龙 3 months ago
parent 2bd0b8f26d
commit 4842173222

@ -1,152 +1,171 @@
<script>
import config from "./config";
import store from "@/store";
import { getToken, setToken, removeToken } from "@/utils/auth";
import { getSqByaccesstoken, getUserinfo } from "@/api/jn/login.js";
import permision from "@/utils/permission.js";
export default {
onLaunch: function () {
console.log("初始化进入");
this.initApp();
//#ifdef APP-PLUS
this.requestAndroidPermission("android.permission.ACCESS_FINE_LOCATION");
this.requestAndroidPermission("android.permission.CAMERA");
this.requestAndroidPermission("android.permission.READ_EXTERNAL_STORAGE");
this.requestAndroidPermission("android.permission.RECORD_AUDIO");
//#endif
removeToken();
},
onShow() {
console.log("onShow");
},
methods: {
//
initApp() {
//
this.initConfig();
//
// // #ifdef APP || H5
this.checkLogin();
// //#endif
},
initConfig() {
this.globalData.config = config;
},
checkLogin() {
// const launchOptions = uni.getLaunchOptionsSync();
// const { query } = launchOptions;
// console.log(query, "query");
// console.log(Object.keys(query).length,"query.lengh");
// console.log(getToken(), "getToken()");
// if (!getToken()) {
// if (Object.keys(query).length !== 0) {
// console.log("query");
// // let params = this.getRequestParams();
// // console.log(params,"params");
// // if (location.href.includes("code=")) {
// const code = query.code;
// const token = query.token;
// uni.setStorageSync("token", token);
// // console.log(code,"code");
// // console.log(token,"token");
// getSqByaccesstoken({
// code: code,
// })
// .then((res) => {
// // console.log("accessToken");
// uni.setStorageSync("accessToken", res.data.accessToken);
// return getUserinfo({
// accessToken: res.data.accessToken,
// });
// })
// .then((el) => {
// this.$tab.switchTab("/pages/index");
// uni.setStorageSync("userInfo", el.data);
// setToken(el.data.token);
// // location.reload();
// console.log("", el);
// });
// // }
// } else {
// // // #ifdef APP
// console.log("APP");
// // this.$tab.reLaunch("/pages/myLogin");
// uni.reLaunch({
// url: "/pages/myLogin",
// });
// // url
// // plus.runtime.openURL( "https://t-jn-development-manager.jsszkd.com/login?clientId=641775453324", this.openErr );
// // // #endif
// // // #ifdef H5
// // location.href = `https://t-jn-development-manager.jsszkd.com/login?clientId=641775453324`
// // // #endif
// console.log("Before navigateTo or reLaunch");
// // this.$tab.reLaunch("/pages/myLogin");
// // uni.navigateTo({
// // url:'https://t-jn-development-manager.jsszkd.com/login?clientId=641775453324'
// // })
// }
// } else {
// this.$tab.reLaunch("/pages/index");
// }
},
openErr(err) {
console.log(err, "报错信息");
},
//
getRequestParams() {
let url = location.href;
let requestParams = {};
if (url.indexOf("?") !== -1) {
let str = url.substr(url.indexOf("?") + 1); //?
// console.log(str, '?');
let strs = str.split("&"); //&
// console.log(strs, '&');
for (let i = 0; i < strs.length; i++) {
requestParams[strs[i].split("=")[0]] = decodeURI(
strs[i].split("=")[1]
);
// '=''='
}
}
// console.log(requestParams, '');
return requestParams;
},
async requestAndroidPermission(permisionID) {
var result = await permision.requestAndroidPermission(permisionID);
var strStatus;
if (result == 1) {
strStatus = "已获得授权";
} else if (result == 0) {
strStatus = "未获得授权";
uni.showModal({
content: "请在设置中打卡相机、麦克风、相册、定位权限",
showCancel: false,
});
console.warn("权限:" + permisionID + strStatus);
// App
this.gotoAppPermissionSetting();
} else {
strStatus = "被永久拒绝权限";
uni.showModal({
content: "请在设置中打卡相机、麦克风、相册、定位权限",
showCancel: false,
});
console.warn("权限:" + permisionID + strStatus);
// App
this.gotoAppPermissionSetting();
}
},
gotoAppPermissionSetting: function () {
permision.gotoAppPermissionSetting();
},
},
};
</script>
<style lang="scss">
/* 注意要写在第一行同时给style标签加入lang="scss"属性 */
@import "@/uni_modules/uview-ui/index.scss";
@import "@/static/scss/index.scss";
</style>
<script>
import config from "./config";
import store from "@/store";
import {
getToken,
setToken,
removeToken
} from "@/utils/auth";
import {
getSqByaccesstoken,
getUserinfo
} from "@/api/jn/login.js";
import permision from "@/utils/permission.js";
export default {
onLaunch: function() {
console.log("初始化进入");
this.initApp();
//#ifdef APP-PLUS
this.requestAndroidPermission("android.permission.ACCESS_FINE_LOCATION");
this.requestAndroidPermission("android.permission.CAMERA");
this.requestAndroidPermission("android.permission.READ_EXTERNAL_STORAGE");
this.requestAndroidPermission("android.permission.RECORD_AUDIO");
//#endif
removeToken();
},
onShow() {
console.log("onShow");
},
methods: {
//
initApp() {
//
this.initConfig();
//
// // #ifdef APP || H5
this.checkLogin();
// //#endif
},
initConfig() {
this.globalData.config = config;
},
checkLogin() {
// const launchOptions = uni.getLaunchOptionsSync();
// const { query } = launchOptions;
// console.log(query, "query");
// console.log(Object.keys(query).length,"query.lengh");
// console.log(getToken(), "getToken()");
// if (!getToken()) {
// if (Object.keys(query).length !== 0) {
// console.log("query");
// // let params = this.getRequestParams();
// // console.log(params,"params");
// // if (location.href.includes("code=")) {
// const code = query.code;
// const token = query.token;
// uni.setStorageSync("token", token);
// // console.log(code,"code");
// // console.log(token,"token");
// getSqByaccesstoken({
// code: code,
// })
// .then((res) => {
// // console.log("accessToken");
// uni.setStorageSync("accessToken", res.data.accessToken);
// return getUserinfo({
// accessToken: res.data.accessToken,
// });
// })
// .then((el) => {
// this.$tab.switchTab("/pages/index");
// uni.setStorageSync("userInfo", el.data);
// setToken(el.data.token);
// // location.reload();
// console.log("", el);
// });
// // }
// } else {
// // // #ifdef APP
// console.log("APP");
// // this.$tab.reLaunch("/pages/myLogin");
// uni.reLaunch({
// url: "/pages/myLogin",
// });
// // url
// // plus.runtime.openURL( "https://t-jn-development-manager.jsszkd.com/login?clientId=641775453324", this.openErr );
// // // #endif
// // // #ifdef H5
// // location.href = `https://t-jn-development-manager.jsszkd.com/login?clientId=641775453324`
// // // #endif
// console.log("Before navigateTo or reLaunch");
// // this.$tab.reLaunch("/pages/myLogin");
// // uni.navigateTo({
// // url:'https://t-jn-development-manager.jsszkd.com/login?clientId=641775453324'
// // })
// }
// } else {
// this.$tab.reLaunch("/pages/index");
// }
},
openErr(err) {
console.log(err, "报错信息");
},
//
getRequestParams() {
let url = location.href;
let requestParams = {};
if (url.indexOf("?") !== -1) {
let str = url.substr(url.indexOf("?") + 1); //?
// console.log(str, '?');
let strs = str.split("&"); //&
// console.log(strs, '&');
for (let i = 0; i < strs.length; i++) {
requestParams[strs[i].split("=")[0]] = decodeURI(
strs[i].split("=")[1]
);
// '=''='
}
}
// console.log(requestParams, '');
return requestParams;
},
async requestAndroidPermission(permisionID) {
var result = await permision.requestAndroidPermission(permisionID);
var strStatus;
if (result == 1) {
strStatus = "已获得授权";
} else if (result == 0) {
strStatus = "未获得授权";
uni.showModal({
content: "请在设置中打卡相机、麦克风、相册、定位权限",
showCancel: false,
});
console.warn("权限:" + permisionID + strStatus);
// App
this.gotoAppPermissionSetting();
} else {
strStatus = "被永久拒绝权限";
uni.showModal({
content: "请在设置中打卡相机、麦克风、相册、定位权限",
showCancel: false,
});
console.warn("权限:" + permisionID + strStatus);
// App
this.gotoAppPermissionSetting();
}
},
gotoAppPermissionSetting: function() {
permision.gotoAppPermissionSetting();
},
},
};
</script>
<style lang="scss">
/* 注意要写在第一行同时给style标签加入lang="scss"属性 */
@import "@/uni_modules/uview-ui/index.scss";
@import "@/static/scss/index.scss";
.mytext {
h4 {
strong {
display: block;
/* 将 <strong> 标签转换为块级元素 */
text-indent: 2em;
// text-align: center;
}
}
}
</style>

@ -2,7 +2,8 @@
module.exports = {
// baseUrl: "http://192.168.0.105:9037",
TEST_LOGIN:"https://t-jn-development-manager.jsszkd.com/login", // ?clientId=
baseUrl: "https://t-jn-bjh-admin-server.jsszkd.com",
// baseUrl: "https://t-jn-bjh-admin-server.jsszkd.com",
baseUrl: "https://bjh.jndz.cn/bjh-admin-server",
// 应用信息
appInfo: {

@ -12,9 +12,8 @@ Vue.use(uView)
// Vue.prototype.$video = Videojs
// import 'mui-player/dist/mui-player.min.css'
import fixedButtom from '@/components/fixedButtom/fixedButtom.vue'
Vue.component('fixedButtom', fixedButtom)
import fixedButtom from '@/components/fixedButtom/fixedButtom.vue'
Vue.component('fixedButtom', fixedButtom)
Vue.use(plugins)

@ -1,17 +1,16 @@
<template>
<view class="app-container">
<u-navbar leftText="返回" title="店铺活动管理" :autoBack="true" :placeholder="true">
<!-- <u-navbar leftText="返回" title="店铺活动管理" :autoBack="true" :placeholder="true">
<view slot="right">
<text class="nav-right"></text>
</view>
</u-navbar>
</u-navbar> -->
<view class="list-item">
<view class="list-item-title">{{levelList[0].activeName || ""}}</view>
<view>
<view class="Mytitle">
</view>
<view class="mytext">
{{levelList[0].activeRequest}}
<view class="mytext" v-html="levelList[0].activeRequest">
</view>
</view>
@ -35,6 +34,7 @@
sbLevelName: null,
pageNum: 1,
pageSize: 10,
activeState:"1"
},
};
},
@ -116,7 +116,7 @@
}
.mytext {
line-height: 45rpx;
line-height: 2;
}
.item-cell {

@ -1,15 +1,17 @@
<template>
<view class="app-container">
<u-navbar leftText="返回" title="店牌店招预审" :autoBack="true" :placeholder="true">
<!-- <u-navbar leftText="返回" title="店牌店招预审" :autoBack="true" :placeholder="true">
<view slot="right">
<text class="nav-right"></text>
</view>
</u-navbar>
</u-navbar> -->
<view class="list-item">
<view class="list-item-title">{{levelList[0].name || ""}}</view>
<view>
<view class="mytext">
{{levelList[0].msg || ""}}
<view class="mytext" v-html="levelList[0].msg">
<!-- {{levelList[0].msg || ""}} -->
</view>
<!-- <view class="Mytitle">
所需材料
@ -89,12 +91,12 @@
7.南京江宁经济技术开发区管理委员会宁经管委发[2005]284关于对开发区胜太路等主要街道商业经营门类进行规范管理的通知<br />
8.南京江宁经济技术开发区管理委员会宁经管委发[2008]283关于新增庄排路等街区实行商业经营门类规范管理的通知<br />
</view> -->
</view>
<view class="myimg">
<!-- <img src="../../static/images/banner/liucheng.png" alt="" /> -->
<img :src="baseUrl + levelList[0].img" alt="" />
</view>
</view>
</view>
</template>
@ -109,7 +111,7 @@
return {
//
form: {},
baseUrl:config.baseUrl,
baseUrl: config.baseUrl,
levelList: [{
name: "",
msg: "",
@ -118,7 +120,8 @@
//
queryParams: {
pageNum: 1,
pageSize: 10,
pageSize: 10,
status: "1"
},
};
},
@ -202,7 +205,7 @@
}
.mytext {
line-height: 45rpx;
line-height: 2;
}
.myimg {

@ -1,10 +1,10 @@
<template>
<view class="app-container">
<u-navbar leftText="返回" title="门前三包服务" :autoBack="true" :placeholder="true">
<!-- <u-navbar leftText="返回" title="门前三包服务" :autoBack="true" :placeholder="true">
<view slot="right">
<text class="nav-right"></text>
</view>
</u-navbar>
</u-navbar> -->
<view class="list-item">
<view class="list-item-box">
<view class="list-item-box-top">
@ -18,7 +18,8 @@
<view class="list-item-box-top">
三包等级:
</view>
<view class="list-item-box-bottom " :class="titleObj.sbLevel==3?'red':titleObj.sbLevel==4?'yellow':titleObj.sbLevel==5?'good':''">
<view class="list-item-box-bottom "
:class="titleObj.sbLevel==3?'red':titleObj.sbLevel==4?'yellow':titleObj.sbLevel==5?'good':''">
<!-- 3 4 5绿 -->
{{titleObj.sbLevel==3?'红牌':titleObj.sbLevel==4?'黄牌':titleObj.sbLevel==5?'绿牌':'暂无'}}
</view>
@ -31,10 +32,11 @@
<view class="Mytitle">
</view>
<view class="mytext">
{{levelList[0].rateRuleContent || ""}}
<view class="mytext" v-html="levelList[0].rateRuleContent">
</view>
<!-- <view class="mytext">
<u-parse :content="levelList[0].rateRuleContent" :tag-style="style"></u-parse>
</view> -->
</view>
@ -43,6 +45,7 @@
</template>
<script>
// import uParse from '@/components/u-parse/u-parse.vue'
import {
listraterule,
jnshop
@ -61,10 +64,14 @@
sbLevelName: null,
pageNum: 1,
pageSize: 10,
state: "1"
},
titleObj: {
sbLevel: "",
shopName: "",
},
titleObj:{
sbLevel:"",
shopName:""
style: {
p:'font-size:20rpx;!important'
}
};
},
@ -79,16 +86,16 @@
query
} = launchOptions;
console.log(query, "query");
console.log(Object.keys(query).length,"query.lengh");
if(Object.keys(query).length!=0){
console.log(Object.keys(query).length, "query.lengh");
if (Object.keys(query).length != 0) {
// 3 4 5绿 sbLevel shopName
jnshop(query.storeId).then((item)=>{
jnshop(query.storeId).then((item) => {
console.log(item);
if(item.code == 200 && item.data){
this.titleObj.sbLevel = item.data.sbLevel
if (item.code == 200 && item.data) {
this.titleObj.sbLevel = item.data.sbLevel
this.titleObj.shopName = item.data.shopName
}else{
} else {
}
})
}
@ -169,7 +176,13 @@
}
.mytext {
line-height: 45rpx;
// line-height: 45rpx;
margin-top: 38rpx;
display: grid;
grid-template-columns: 1fr;
grid-row-gap: 20rpx;
line-height: 2;
overflow: hidden;
}
.item-cell {
@ -226,11 +239,14 @@
.good {
color: green;
}
.red {
color: red;
}
.yellow{
.yellow {
color: yellowgreen;
}
}
</style>
Loading…
Cancel
Save