# Conflicts:
#	gasStation-uni/store/modules/user.js
This commit is contained in:
wangh 2023-11-30 11:08:38 +08:00
commit 6229da52c9
5 changed files with 223 additions and 86 deletions

View File

@ -709,6 +709,7 @@ export default {
this.pddhidlist.push(row.id)
console.log(row)
let data ={
giftUserType:0,//
activeGift: 2, // 01 2. 3 4.
goodsIds: "", //id
goodsName:"" , //
@ -908,6 +909,7 @@ export default {
console.log(this.ruleForm.activeRecommendChildList)
console.log(this.ruleForm)
this.ruleForm.id = 1
this.$refs["ruleForm"].validate(valid => {
if (valid) {
if (this.ruleForm.id != null) {

View File

@ -34,6 +34,13 @@
"navigationStyle": "custom"
}
},
{
"path": "activeIn/index",
"style": {
"navigationBarTitleText": "你建的",
"navigationStyle": "custom"
}
},
{
"path": "Address/Address",
"style": {

View File

@ -7,7 +7,8 @@
<view class="my-icons"></view>
</view>
<view class="mub">
<view class="mub-box" v-for="(item,index) in activityList" :key="index" @click="getactvity(item.path)">
<!-- <view class="mub-box" v-for="(item,index) in activityList" :key="index" @click="getactvity(item.path)"> -->
<view class="mub-box" v-for="(item,index) in activityList" :key="index" @click="intoOtherPage()">
<view class="box-img">
<image src="../../static/imgs/xp.jpg" mode=""></image>
</view>
@ -29,6 +30,7 @@
</template>
<script>
import request from '../../utils/request'
export default {
data() {
return {
@ -58,11 +60,38 @@
}
},
datas() {
return {
datas: [{
"activeDescribe": ""
}]
}
},
components: {
},
methods: {
intoOtherPage() {
uni.navigateTo({
url: '/pagesHome/activeIn/index'
})
},
getData() {
// request({
// url: '/business/marketingActivity/activeConsumption/AppletList',
// method: 'get',
// success: function(res) {
// this.datas = res.data
// }
// })
request({
url: '/business/marketingActivity/activeConsumption/AppletList',
method: 'get',
}).then(res => {
console.log(res);
this.datas = res.data
})
},
getactvity(url) {
if (url) {
console.log('跳转中');

View File

@ -0,0 +1,82 @@
<template>
<view class="content">
<view class="container">
<view class="my-header">
<view class="my-icons" @click="goback"> <uni-icons type="left" size="16"></uni-icons> </view>
<view class="my-text">样版页</view>
<view class="my-icons"></view>
</view>
<!-- 顶部区域 -->
<view class="" v-for="(item,index) in datas" :key="index">
<text>{{item.activeDescribe || ""}}</text>
</view>
</view>
</view>
</template>
<script>
import request from '../../utils/request'
export default {
data() {
return {
title: '',
datas: [],
}
},
components: {
},
onLoad() {
this.getData();
},
methods: {
getData() {
request({
url: '/business/marketingActivity/activeConsumption/appletList',
method: 'get',
}).then(res => {
this.datas = res.data
})
},
goback() {
uni.navigateBack()
}
}
}
</script>
<style scoped lang="scss">
.content {
background: #f4f5f6;
}
.container {
width: 100%;
height: 100vh;
box-sizing: border-box;
padding-top: 88px;
}
.my-header {
width: 100%;
height: 88px;
background: #ffffff;
display: flex;
align-items: center;
justify-content: space-between;
color: #000;
box-sizing: border-box;
padding: 0px 15px;
padding-top: 40px;
.my-icons {
width: 20px;
}
position: fixed;
top: 0px;
}
</style>

View File

@ -1,8 +1,16 @@
import config from '@/config'
import storage from '@/utils/storage'
import constant from '@/utils/constant'
import { login, logout, getInfo } from '@/api/login'
import { getToken, setToken, removeToken } from '@/utils/auth'
import {
login,
logout,
getInfo
} from '@/api/login'
import {
getToken,
setToken,
removeToken
} from '@/utils/auth'
const baseUrl = config.baseUrl
@ -39,7 +47,9 @@ const user = {
actions: {
// 登录
Login({ commit }, userInfo) {
Login({
commit
}, userInfo) {
const username = userInfo.username.trim()
const password = userInfo.password
const code = userInfo.code
@ -56,12 +66,16 @@ const user = {
},
// 获取用户信息
GetInfo({ commit, state }) {
GetInfo({
commit,
state
}) {
return new Promise((resolve, reject) => {
getInfo().then(res => {
const user = res.user
const avatar = baseUrl + user.avatar
const username = (user == null || user.userName == "" || user.userName == null) ? "" : user.userName
const username = (user == null || user.userName == "" || user.userName ==
null) ? "" : user.userName
if (res.roles && res.roles.length > 0) {
commit('SET_ROLES', res.roles)
commit('SET_PERMISSIONS', res.permissions)
@ -78,7 +92,10 @@ const user = {
},
// 退出系统
LogOut({ commit, state }) {
LogOut({
commit,
state
}) {
return new Promise((resolve, reject) => {
logout(state.token).then(() => {
commit('SET_TOKEN', '')