Commit b654c989 authored by 乐宝呗666's avatar 乐宝呗666

init code

parents
Pipeline #275 failed with stages
node_modules
# cmbapp-consume
## Project setup
```
npm install
```
### Compiles and hot-reloads for development
```
npm run serve
```
### Compiles and minifies for production
```
npm run build
```
### Lints and fixes files
```
npm run lint
```
### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset'
]
}
This diff is collapsed.
{
"name": "cmbapp-consume",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"axios": "^0.19.2",
"core-js": "^3.6.5",
"less": "^3.11.3",
"less-loader": "^6.1.0",
"vant": "^2.8.5",
"vue": "^2.6.11",
"vue-router": "^3.3.2",
"vuex": "^3.5.1"
},
"devDependencies": {
"@vue/cli-plugin-babel": "~4.4.0",
"@vue/cli-plugin-eslint": "~4.4.0",
"@vue/cli-service": "~4.4.0",
"babel-eslint": "^10.1.0",
"eslint": "^6.7.2",
"eslint-plugin-vue": "^6.2.2",
"vue-clipboard2": "^0.3.1",
"vue-template-compiler": "^2.6.11"
},
"eslintConfig": {
"root": true,
"env": {
"node": true
},
"extends": [
"plugin:vue/essential",
"eslint:recommended"
],
"parserOptions": {
"parser": "babel-eslint"
},
"rules": {}
},
"browserslist": [
"> 1%",
"last 2 versions",
"not dead"
]
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title>
</head>
<body>
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>
<template>
<div id="app">
<router-view />
<!-- <van-tabbar v-model="activeTab" route>
<van-tabbar-item replace to="/member" >会员</van-tabbar-item>
<van-tabbar-item replace to="/tradearea">商圈</van-tabbar-item>
<van-tabbar-item replace to="/property">物业</van-tabbar-item>
<van-tabbar-item replace to="/goon">出行</van-tabbar-item>
<van-tabbar-item replace to="/mine">我的</van-tabbar-item>
</van-tabbar> -->
</div>
</template>
<script>
export default {
name: 'App',
data() {
return {
// activeTab: 0
}
},
}
</script>
<style>
#app {
font-family: Avenir, Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
font-size: 16px;
background-color: #fff;
}
</style>
import httpService from '../config/http.service.js'
const url_base = '/consume-admin' // 正式环境
// const url_base = '/consume' // 测试环境
class service {
// 企业列表
getEnterpriseList(data) {
return httpService.get(`${url_base}/cmbOneNet/getEnterpriseList`, data || {}, false)
}
// 获取用户信息
getUserInforMation(data) {
return httpService.post(`${url_base}/cmbOneNet/getUserInforMation`, data || {}, false)
}
// 申请加入会员
applyMember(data) {
return httpService.post(`${url_base}/cmbOneNet/applyMember`, data || {}, false)
}
// 领券列表
getCouponAppList(data) {
return httpService.get(`${url_base}/cmbOneNet/getCouponAppList`, data || {}, false)
}
// 申请发券
applyEnterprise(data) {
return httpService.post(`${url_base}/cmbOneNet/applyEnterprise`, data || {}, false)
}
// 申请访问令牌
applyInfo(data) {
return httpService.post(`${url_base}/cmbOneNet/applyInfo`, data || {}, false)
}
// 获取企业信息
getEnterprise(data) {
return httpService.get(`${url_base}/cmbOneNet/getEnterprise`, data || {}, false)
}
// 领取优惠券
receive(data) {
return httpService.get(`${url_base}/cmbOneNet/receive`, data || {}, false)
}
// 已领取优惠券列表
getReceivedList(data) {
return httpService.get(`${url_base}/cmbOneNet/getReceivedList`, data || {}, false)
}
// 查询企业用户信息
getEnterpriseUser(data) {
return httpService.get(`${url_base}/cmbOneNet/getEnterpriseUser`, data || {}, false)
}
// 我的卡券
getAllReceivedList(data) {
return httpService.get(`${url_base}/cmbOneNet/getAllReceivedList`, data || {}, false)
}
// 失效优惠券
getOverdueList(data) {
return httpService.get(`${url_base}/cmbOneNet/getOverdueListSE`, data || {}, false)
}
// 个人券夹
getAllReceivedListSE(data) {
return httpService.get(`${url_base}/cmbOneNet/getAllReceivedListSE`, data || {}, false)
}
// 查询申请发券企业信息
getIssEnterprise(data) {
return httpService.get(`${url_base}/cmbOneNet/getIssEnterprise`, data || {}, false)
}
}
export default service
<template>
<van-tabbar v-model="isActive" route @change="onChange">
<van-tabbar-item replace to="/member">
会员
<!-- <img v-if="index == 0" alt=""> -->
<!-- <img v-else src="../../assets/img/apply.png" alt=""> -->
</van-tabbar-item>
<van-tabbar-item replace>
商圈
<!-- <img v-if="index == 1" alt=""> -->
<!-- <img v-else src="../../assets/img/agree.png" alt=""> -->
</van-tabbar-item>
<!-- <van-tabbar-item replace to="/property"> -->
<van-tabbar-item replace>
物业
<!-- <img v-if="index == 2" alt=""> -->
<!-- <img v-else src="../../assets/img/excel.png" alt="">-->
</van-tabbar-item>
<!-- <van-tabbar-item replace to="/goon"> -->
<van-tabbar-item replace>
出行
<!-- <img v-if="index == 3" alt=""> -->
<!-- <img v-else src="../../assets/img/mine.png" alt=""> -->
</van-tabbar-item>
<van-tabbar-item replace to="/mine">
我的
<!-- <img v-if="index == 3" alt=""> -->
<!-- <img v-else src="../../assets/img/mine.png" alt=""> -->
</van-tabbar-item>
</van-tabbar>
</template>
<script>
export default {
props: {
index: {
type: Number,
default: 0
}
},
data() {
return {
isActive: this.index,
}
},
methods: {
// tabClick(e) {}
onChange(index) {
if (index == 1 || index == 2 || index == 3) {
this.$toast({
className: 'toast',
message: '建设中,敬请期待~'
})
}
}
}
}
</script>
<style>
.van-tabbar img {
width: 40px;
height: 40px;
}
</style>
<template>
<div class="statuscolor">
<img style="" src="../assets/home/logoTop.png"/>
</div>
</template>
<script>
</script>
<style scoped>
.statuscolor{
height: 6vh;
width: 100vw;
background: #988ECD !important;
position: fixed;
top: 0;
z-index: 3000;
}
img{
width: 30vw;height: 12vh;
position: relative;
top: -5vh;
left: -7vw;
}
</style>
import axios from 'axios'
// import { MessageBox } from 'element-ui'
// import router from '../router.js'
import {
jsonToParams
} from './network.config'
if (process.env.ENV === 'production') {
axios.defaults.baseURL = '' // 接口省去api
// axios.defaults.baseURL = 'https://oxo.chfatech.com/' // 接口省去api
}
if (process.env.NODE_ENV === 'development') {
axios.defaults.baseURL = '' // 接口省去api
// axios.defaults.baseURL = 'http://42.159.84.152/' // 接口省去api
}
// let flag = 0
// axios.defaults.baseURL = 'http://42.159.84.152/new' // 接口省去api
function downLoadPost(url, data, auth = true, options = {
'responseType': 'blob'
}) {
let config = {}
if (auth) {
config = Object.assign(options, {
headers: {
'Authorization': localStorage.getItem('token'),
'platform': 'app'
},
})
}
return axios.post(url, data, config)
.then((res) => responseHandler2(res, options.loading))
.catch((err) => responseError(err, options.loading))
}
function upLoadPost(url, data, auth = true, options = {
'Content-Type': 'multipart/form-data'
}) {
let config = {}
if (auth) {
config = Object.assign(options, {
headers: {
'Authorization': localStorage.getItem('token'),
'platform': 'app'
}
})
}
return axios.post(url, data, config)
.then((res) => responseHandler2(res, options.loading))
.catch((err) => responseError(err, options.loading))
}
function downLoadGet(url, auth = true, options = {
'responseType': 'blob'
}) {
let config = {}
if (auth) {
config = Object.assign(options, {
headers: {
'Authorization': localStorage.getItem('token'),
'platform': 'app'
}
})
}
return axios.get(url, config, {
'responseType': 'blob'
})
.then((res) => responseHandler2(res, options.loading))
.catch((err) => responseError(err, options.loading))
}
function get(url, data, auth = true, options = {}) {
let config = {}
url = url + jsonToParams(data)
if (auth) {
config = Object.assign({}, options)
config.headers = (config.headers) ? config.headers : {}
config.headers['Authorization'] = localStorage.getItem('token')
config.headers['platform'] = 'app'
}
return axios.get(url, config)
.then((res) => responseHandler(res, options.loading))
.catch((err) => responseError(err, options.loading))
}
function post(url, data, auth = true, options = {}) {
let config = {}
// token = localStorage.getItem('token')
if (auth) {
config = Object.assign(options, {
headers: {
'Authorization': localStorage.getItem('token'),
'platform': 'app'
}
})
}
return axios.post(url, data, config)
.then((res) => responseHandler(res, options.loading))
.catch((err) => responseError(err, options.loading))
}
function deleteOut(url, data, auth = true, options = {}) {
url = url + jsonToParams(data)
// token = localStorage.getItem('token')
let config = {}
if (auth) {
config = Object.assign(options, {
headers: {
'Authorization': localStorage.getItem('token'),
'platform': 'app'
}
})
}
return axios.delete(url, config)
.then((res) => responseHandler(res))
.catch((err) => responseError(err))
}
function put(url, data, auth = true, options = {}) {
// token = localStorage.getItem('token');
let config = {}
if (auth) {
config = Object.assign(options, {
headers: {
'Authorization': localStorage.getItem('token'),
'platform': 'app'
}
})
}
return axios.put(url, data, config)
.then((res) => responseHandler(res))
.catch((err) => responseError(err))
}
function responseHandler2(res) {
return Promise.resolve(res.data)
}
function responseHandler(res) {
if (typeof(res.data) === 'string') {
if (res.data != '') {
res.data = JSON.parse(res.data)
}
}
return Promise.resolve(res)
}
function responseError(err) {
return Promise.reject(err)
}
export default {
upLoadPost,
downLoadGet,
downLoadPost,
get,
post,
deleteOut,
put
}
let NETWORK_STATUS = {
STATUS_OK: 200,
DATA_OK: 0,
LOGIN_ERROR: 100014,
NO_ACCESS: 100003,
WRONG_PHONE_CODE: 200006,
TOKEN_INVALID: 401,
};
function jsonToParams(obj) {
if(Object.prototype.toString.call(obj) === '[object Object]'){
if(JSON.stringify(obj)=="{}"){
return ""
}else {
let result=[];
for(let key in obj){
result.push(key+"="+obj[key])
}
return '?'+result.join('&')
}
}
}
// function pacFormData(json) {
// let oFormData = new FormData();
// for(let key in json){
// oFormData.append(key, value);
// }
// return oFormData;
// }
export {
NETWORK_STATUS,
jsonToParams,
// pacFormData
};
import Vue from 'vue'
import App from './App.vue'
import Vant from 'vant';
import router from './router'
import store from './store'
import 'vant/lib/index.css';
import '@/static/style.less'
import axios from 'axios'
import VueClipboard from 'vue-clipboard2'
Vue.prototype.$axios = axios.defaults.baseURL = '' // 接口省去api
Vue.config.productionTip = false
VueClipboard.config.autoSetContainer = true
Vue.use(VueClipboard)
Vue.use(Vant);
new Vue({
store,
router,
render: h => h(App),
}).$mount('#app')
import Vue from 'vue'
import Router from 'vue-router'
import Index from './views/index.vue'
// 会员系统
import Trade from './views/trade/index.vue'
// 我的页面
import Mine from './views/mine/mine.vue'
import company from './views/mine/company.vue'
import coupon from './views/mine/coupon.vue'
import allCoupon from './views/mine/allCoupon.vue'
import Goon from './views/goon/goon.vue'
// 票券
import member from './views/member/tradearea.vue'
import applyMember from './views/member/applyMember.vue'
import applyJoin from './views/member/applyJoin.vue'
import useConpou from './views/member/useConpou.vue'
import jump from './views/member/jump.vue'
import Property from './views/property/property.vue'
Vue.use(Router)
export default new Router({
routes: [{
path: '/',
name: '首页',
component: Index
},
{
path: '/member',
name: '会员',
component: member
},
{
path: '/jump',
name: '官网',
component: jump
},
{
path: '/mine',
name: '我的',
component: Mine
},
{
path: '/goon',
name: '出行',
component: Goon
},
{
path: '/tradearea',
name: '商圈',
component: Trade
},
{
path: '/property',
name: '物业',
component: Property
},
{
path: '/company',
name: '企业自荐',
component: company
},
{
path: '/coupon',
name: '我的券夹',
component: coupon
},
{
path: '/allCoupon',
name: '我的券夹',
component: allCoupon
},
{
path: '/applymember',
name: '申请提供会员',
component: applyMember
},
{
path: '/applyjoin',
name: '申请加入会员',
component: applyJoin
},
{
path: '/useconpou',
name: '领取票券',
component: useConpou
},
]
})
.van-nav-bar .van-icon{
color:white !important;
}
.van-nav-bar__title{
color: white;
}
\ No newline at end of file
import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex);
export default new Vuex.Store({
//所有的数据都放在state中
state:{
enterpriseName:{},
inforMation:{},
token:''
},
//操作数据,唯一的通道是mutations
mutations:{
inforMation(state,INFOBJ) {
state.inforMation = INFOBJ.data
},
inforEnterprise(state,obj) {
state.enterpriseName = obj.data
},
setToken(state,tokenInfo) {
state.token = tokenInfo.token
}
},
//actions,可以来做异步操作,然后提交给mutations,而后再对state(数据)进行操作
actions:{}
})
\ No newline at end of file
<template>
<div class="goon">
<uni-top-status></uni-top-status>
<van-nav-bar title="出行" class="header" left-arrow :border="false" @click-left="onClickLeft" />
<div style="margin: 14vh 0;">
待二期开发
</div>
<vant-footer :index="3"></vant-footer>
</div>
</template>
<script>
import uniTopStatus from '@/components/topStatus.vue'
import vantFooter from '@/components/layout/vanFooter.vue'
export default {
name: 'goon',
components: {
uniTopStatus,vantFooter
},
data() {
return {
// key: value
}
},
methods:{
onClickLeft(){
window.location.href = 'http://fbclient/tool'
}
}
}
</script>
<style lang="less" scoped>
.header {
height: 45px;
width: 100vw;
line-height: 45px;
text-align: center;
background-color: #988ECD;
color: white;
position: fixed;
top: 6vh;
z-index: 3000;
}
</style>
<template>
<div class="home">
<!-- <div>data数据:{{obj.data}}</div>
<div>signature数据:{{obj.signature}}</div> -->
</div>
</template>
<script>
import COUPON from '@/api/coupon.js'
let COUPON_API = new COUPON()
export default {
data() {
return {
objMation: {},
register: '',
tenant: '',
obj: {
// signature:'omryqP7Y7knduarIYgaokJGNVz7-KYL2q36rso0nnV_c16MvKm_R_wZqhJrzrEGHXzPmUYLOngb_V4pTPDBnoafOgBbUGcg833R_XyNjw0XzYLtFK7KggB6ng4dqt0HW7JMewWH-SBLeU9XvmQC-MQRAQECvFLg6WznMiWbVzGFahyMMus2xG96MxduzLQt9coWeeopF511DKiM9cie4S2v_3E_SqbVNi-7Xi9jXIxgwnKc8BQUirMJUES-HIWixQ7dNPHU0s2EYYxmH7mP_gSMspVWeCNTySu-drZFNBgG7jtsQApCxlc702OchZS8nxL1Dkmo0VTDwm6d1d_Oj_w',
// data:'p_xdXSErCipXfsNYoxCkfgCOZ6JnVAfO0Ri8SO4HvZYzKfV_odVu75EKkeYZ98QtqtpOGbR9b-csamYGGFXbUgNGm5qA_WqpSL9G6YfgoGkWqxa-T5Bjlv7w3E54AUZI62b0CJiDAQk4vWMxYzMBBeX6D24kLTDbmjDxy-75Lr2Q_aB-BR-4NW8GB1AC-jfZqc0AFdZxqV1VLTK0fctj1kXGTSHwre0nFGG1u2_jXVbGWJV4X-6MGDEdEPRA0yQujvnU41_h3GN-bK9aeGBrXj3xx8NrYRrIbLfbtm7OC2mH2BYhOcREbZG9ICPtobKRLl0oulPJ6cSSPQruw9LsKSG092ffyfUrqii-a2kaQI6TLbihYu6DcCrIgFb--_CmZn-QFYdcxrNAtsq_CzNcMqh8CDC7V0TUNuNYPZ47cw3ayz5jlcqagXtRROY5LN5i2a9tyyPYJIH_xVWn_EvoRNgv8Sz70rh5y3IBUoIAe_i9KRuftbq7knLC4EkJGOMH7dObh8ZHXKitdDnlg4OgsPl03gDB87H65fwu3zA7p3_Z-cKTkBkskdQdDC-EQdSdvIJOFUbOpRcbeZ2V-NzkJraR02bEHE4DYjo7cLbupO5jk6CPXTGdKBvG7YLv5XzBRpDTnRod7fzp1J7n8gDSMSN4PsLpvJbhBDCCW71dY44',
// 测试环境下使用
// data:'HJiUtcvjh2eYoT0DqrZquSRXJiqWP2P7I5Hs60VRlVPnde0w6IH5pRAqQbAsM4nUChUh2M4z23fk-WSLlzNFcFq2_oZs4Bvz9Ol8FA_P05SaaQM_CxONJcCSIi3Txn1aD5ZiqwF5BZqdDSlColGzTJH0RVX1F035f099c19P3cd5qHwXEH3aE2gXud7bvVu2Xe7nxuTb58RWU2csMfyuJOjXHeXAfOi9jeQYfJA33k0VmO6uloxkcROpeZv2TsNUCQ-kGuQTgVXOgoEp84Cq7XA-D1S8NmEtDGGYYwsge_qk0EWdpyYYM1xrYgYL4YWtmsfkTYjWAmVFpD93L2ZRNKMLuxdUiAISPsau6qoNsczueNgx1Hq2G2b4PlRfi-zk5g16bI7kTZD9z7Wu2R1hVnV8WNH1QIJGSNT4cvNcqZmHlk7FfHe8fgSbzDHPV6uNfK3TCgZU934bl7oaO1YTZCnAXyKPgXikAzCN9p6MZQfXBeuCS4AKNwiyP-Wsyuch6pmVkA-pTOxlEwmSXz-xcS49r52zGc0ZZXs2xv_n5yUcEPPHePVhCrWyPJHXg0F4QNXRN8hdoc7HCN0iOWbbFe8wE1xJwDYRUug98sAkLLZ7Gqa22H8wPFLfFbE85UfgcP0JffdkIFvqgscqyFFdpyFamkk6nSa9zrrsUBIJzys',
// signature:'h-PJlff0lZ15oWlG_GiQ5rWeww5hb-deeUYSFkrFO-CHGH-3jWKYGZETI_5r3aMWCc4_9j_hmsOXnkXQq2StoXvUgus0YUoDgZ_BhW9Nwuall6OEO6ZETL9tZDzfCGV4B3BLV3p1iG87SfEeKe0a0a64r4zGe9isRbETYvlHEEwJ_gj33fU-CFrEPfT2sI3DyvPrfztpMNsgPfp1tBwjZc8I7QnWBugh9NIYiLSePK6xZWrwXbKkMRTYpFSDfTvw3KrCzzP1WscOJBwhvVX7At1NY-6QPaFB4JkF5-YRHTWPDa3tr_JigBL1aw8h5ubkjSWsAfRnkvFMxwI8-87pRw'
}
}
},
created() {
this.obj = this.GetRequest(window.location.href) //正式环境下使用
setTimeout(() => {
COUPON_API.getUserInforMation({
data: this.obj.data,
signature: this.obj.signature
})
.then(response => {
if (response.data.code == 200) {
console.log(response)
this.$store.commit('inforMation',{data:response.data.data})
this.$router.push({
path:'/member'
})
} else {
this.$toast.fail({
className: 'toast',
message: response.data.msg,
});
}
})
}, 1000)
},
methods: {
GetRequest: function(urlStr) {
var url = "?" + urlStr.split("?")[1];
var theRequest = new Object();
if (url.indexOf("?") != -1) {
var str = url.substr(1);
str = str.split("&");
for (var i = 0; i < str.length; i++) {
theRequest[str[i].split("=")[0]] = unescape(str[i].split("=")[1]);
}
}
return theRequest;
},
}
}
</script>
<style scoped>
</style>
<template>
<div class="trade_area">
<uni-top-status></uni-top-status>
<van-nav-bar title="申请加入会员" class="header" left-arrow :border="false" @click-left="onClickLeft" />
<div style="margin: 14vh 0;">
<van-cell-group>
<van-field v-model="form.usridc" disabled label="客户号" input-align="right" placeholder="请输入客户号" />
<van-field v-model="companyName" disabled label="客户名称" input-align="right" placeholder="请输入客户名称" />
<van-field v-model="form.name" required label="申请人" input-align="right" placeholder="请输入申请人" />
<van-field v-model="form.phone" required label="联系电话" input-align="right" placeholder="请输入联系人电话" />
<!-- <van-field v-model="form.birthday" label="出生年月日" input-align="right" placeholder="请输入出生年月日(YYYY-MM-DD)" /> -->
</van-cell-group>
<div class="tips">
<van-radio-group v-model="radio" direction="horizontal">
<van-radio name="1"></van-radio>
<span class="tips_left">我已阅读并同意<span class="tips_message">《会员服务申明》</span></span>
</van-radio-group>
</div>
<div class="v_button">
<van-button round color="linear-gradient(to right,#5B29D6,#0B25DF)" @click="submitApply">提交</van-button>
<van-button round plain color="#0B25DF" @click="cancel">取消</van-button>
</div>
</div>
</div>
</template>
<script>
import uniTopStatus from '@/components/topStatus.vue'
import COUPON from '@/api/coupon.js'
let COUPON_API = new COUPON()
export default {
name: 'trade_area',
components: {
uniTopStatus
},
data() {
return {
radio: '',
form: {
usridc: this.$store.state.inforMation.usridc,
name: '',
enterpriseId: this.$route.query.items.id,
phone: '',
birthday: ''
},
companyName: this.$route.query.name
}
},
methods: {
onClickLeft() {
this.$router.push({
path: '/member'
})
},
submitApply() {
if (this.radio == '') {
this.$toast.fail({
className: 'toast',
message: '请勾选申明',
});
} else {
COUPON_API.applyMember(this.form).then(res => {
if (res.data.code == 200) {
this.$toast.success({
className: 'toast',
message: '申请成功',
});
setTimeout(() => {
this.$router.push({
path: '/member'
})
}, 2000)
} else {
this.$toast.fail({
className: 'toast',
message: res.data.msg,
});
}
})
}
},
cancel() {
this.$router.push({
path: '/member'
})
}
}
}
</script>
<style lang="less" scoped>
.header {
height: 45px;
width: 100vw;
line-height: 45px;
text-align: center;
background-color: #988ECD;
color: white;
position: fixed;
top: 6vh;
z-index: 3000;
}
.tips {
margin: 20px 0;
display: flex;
flex-direction: row;
justify-content: center;
.tips_message {
color: #0B25DF;
}
.tips_left {
color: #c0c0c0;
}
}
.v_button {
display: flex;
flex-direction: row;
justify-content: space-around;
.van-button {
width: 35vw;
margin: 10px 0;
border-radius: 40px;
height: 30px;
font-size: 15px;
}
}
</style>
<template>
<div class="trade_area">
<uni-top-status></uni-top-status>
<van-nav-bar title="申请提供会员" class="header" left-arrow :border="false" @click-left="onClickLeft" />
<div style="margin: 12vh 0;">
<van-cell-group>
<van-field v-model="form.coridc" disabled label="客户号" input-align="right" placeholder="请输入客户号" />
<van-field v-model="form.enterpriseName" disabled label="企业名称" input-align="right" placeholder="请输入客户名称" />
<van-field v-model="form.product" :disabled="disabled" required label="主营产品" label-width="100px" type="textarea" row="2" placeholder="请输入经营范围,多个请用空格或者逗号隔开" />
<van-field name="couponType" label="发券类型" required input-align="right">
<template #input>
<van-radio-group v-model="form.couponType" :disabled="disabled" direction="horizontal">
<van-radio name="抵用">抵用</van-radio>
<van-radio name="权益">权益</van-radio>
<van-radio name="折扣">折扣</van-radio>
</van-radio-group>
</template>
</van-field>
<van-field v-model="form.contacts" :disabled="disabled" required label="公司联系人" input-align="right" placeholder="请输入公司联系人" />
<van-field v-model="form.phone" :disabled="disabled" required label="联系人电话" input-align="right" placeholder="请输入联系人电话" />
<van-field v-model="form.email" :disabled="disabled" required label="联系人邮箱" input-align="right" placeholder="请输入联系人邮箱" />
<van-field v-model="form.recommendReason" :disabled="disabled" required label="公司简介" label-width="100px" type="textarea" row="2" placeholder="请输入推荐理由" />
<van-field name="shoppingSelf" label="自建商城" required input-align="right">
<template #input>
<van-radio-group v-model="form.shoppingSelf" :disabled="disabled" direction="horizontal">
<van-radio :name="1"></van-radio>
<van-radio :name="2"></van-radio>
</van-radio-group>
</template>
</van-field>
<van-field v-model="form.shoppingAddress" :disabled="disabled" label="商城地址" input-align="right" placeholder="请输入商城地址" />
<van-field v-model="form.couponLink" :disabled="disabled" label="券使用链接" input-align="right" placeholder="请添加券使用链接" />
<van-field v-model="form.brand" :disabled="disabled" label="公司品牌" input-align="right" placeholder="请输入公司品牌" />
<van-field v-model="form.vipStatement" :disabled="disabled" label="会员服务申明" label-width="120px" type="textarea" row="2" placeholder="请输入会员服务申明" />
</van-cell-group>
<div class="v_button" v-if="!disabled">
<van-button round color="linear-gradient(to right,#5B29D6,#0B25DF)" @click="submitApply">提交</van-button>
<van-button round plain color="#0B25DF" @click="cancel">取消</van-button>
</div>
</div>
</div>
</template>
<script>
import uniTopStatus from '@/components/topStatus.vue'
import COUPON from '@/api/coupon.js'
let COUPON_API = new COUPON()
export default {
name: 'trade_area',
components: {
uniTopStatus
},
data() {
return {
form: {
brand: '', //公司品牌
contacts: '',
phone: '',
email: '',
coridc: this.$store.state.inforMation.coridc,
couponLink: '',
couponType: '',
enterpriseName: this.$store.state.enterpriseName.cornam,
product: '',
recommendReason: '',
shoppingAddress: '',
shoppingSelf: 1,
vipStatement: ''
},
disabled: true
}
},
mounted() {
this.getIssEnterprise()
},
methods: {
onClickLeft() {
this.$router.push({
path: '/member'
})
},
getIssEnterprise() {
COUPON_API.getIssEnterprise({ coridc: this.$store.state.inforMation.coridc }).then(res => {
if (res.data.code == 200) {
if (res.data.data == null) {
this.disabled = false
return
} else {
this.disabled = true
this.form = res.data.data
}
}
})
},
submitApply() {
COUPON_API.applyEnterprise(this.form).then(res => {
if(res.data.code == 200){
this.$toast.success({
className: 'toast',
message: '提交成功',
});
setTimeout(() => {
this.$router.back(-1)
}, 2000)
}else{
this.$toast.fail({
className: 'toast',
message: res.data.msg,
});
}
})
},
cancel(){
this.$router.back(-1)
}
}
}
</script>
<style lang="less" scoped>
.header {
height: 45px;
width: 100vw;
line-height: 45px;
text-align: center;
background-color: #988ECD;
color: white;
position: fixed;
top: 6vh;
z-index: 3000;
}
.v_button {
display: flex;
flex-direction: row;
justify-content: space-around;
.van-button {
width: 35vw;
margin: 10px 0;
border-radius: 40px;
height: 30px;
font-size: 15px;
}
}
</style>
<template>
<div id="jump">
<uni-top-status />
<van-nav-bar :title="title" class="header" left-arrow :border="false" @click-left="onClickLeft" />
<div style="height: 100%; margin-top: calc(6vh + 45px);">
<iframe name="my-iframe" id="my-iframe" :src="url" frameborder="0" width="100%" height="100%" scrolling="no" />
</div>
</div>
</template>
<script>
import uniTopStatus from '@/components/topStatus.vue'
export default {
components: {
uniTopStatus
},
data() {
return {
url: this.$route.query.couponLink,
title: this.$route.query.enterpriseName
}
},
methods: {
onClickLeft() {
this.$router.back(-1)
}
}
}
</script>
<style lang="less" scoped>
.header {
height: 45px;
width: 100vw;
line-height: 45px;
text-align: center;
background-color: #988ECD;
color: white;
position: fixed;
top: 6vh;
z-index: 3000;
}
#jump {
height: 100vh;
}
</style>
<template>
<div class="trade_area">
<uni-top-status></uni-top-status>
<van-nav-bar title="会员" class="header" right-text="申请发券" left-arrow :border="false" @click-left="onClickLeft"
@click-right="onClickRight" />
<div style="margin: 12.5vh 0;">
<div class="mine_info">
<img src="../../static/image/info.png" alt="">
</div>
<div class="cell_info">
<template v-for="(items,index) in storeObj">
<div :key="index">
<div class="store_pic">
<img :src="'https://shapp.mbcloud.com/' + items.logo" alt="">
</div>
<div class="store_btn">
<van-button v-if="!items.isBinding" type="default" @click="applyUser(items,items.enterpriseName)">会员申请</van-button>
<van-button v-else type="default" @click="useConpou(items,items.enterpriseName)">去领券</van-button>
<van-button type="default" @click="handleClick(items)">票券使用</van-button>
</div>
</div>
</template>
</div>
<div class="store_btn btn">
<van-button round color="linear-gradient(to right,#5B29D6,#0B25DF)" @click="onClickRight">企业自荐</van-button>
<van-button round color="linear-gradient(to right,#5B29D6,#0B25DF)" @click="handleCoupon">我的券夹</van-button>
</div>
</div>
<vant-footer :index="0"></vant-footer>
</div>
</template>
<script>
import uniTopStatus from '@/components/topStatus.vue'
import vantFooter from '@/components/layout/vanFooter.vue'
import COUPON from '@/api/coupon.js'
let COUPON_API = new COUPON()
export default {
name: 'trade_area',
components: {
uniTopStatus,
vantFooter
},
data() {
return {
storeObj: []
}
},
created() {
console.log(this.$route, '$route')
const usridc = this.$store.state.inforMation.usridc
const coridc = this.$store.state.inforMation.coridc
const authCode = this.$store.state.inforMation.autcod
COUPON_API.getEnterpriseList({
usridc: usridc
}).then(resList => {
this.storeObj = resList.data.data
})
COUPON_API.applyInfo({
authCode: authCode
}).then(res => {
if (res.data.code == 200) {
// 根据访问令牌、企业id获取企业信息
let obj = {
coridc: coridc,
token: encodeURIComponent(res.data.data.accesstoken.acctkn)
}
localStorage.setItem('token',res.data.data.accesstoken.acctkn)
this.$store.commit('setToken',{token:res.data.data.accesstoken.acctkn})
COUPON_API.getEnterprise(obj).then(getRes => {
if (getRes.data.code == 200) {
this.$store.commit('inforEnterprise', {
data: getRes.data.data.corinfo
})
} else {
this.$toast.fail({
className: 'toast',
message: getRes.data.msg,
});
}
})
} else {
this.$toast.fail({
className: 'toast',
message: res.data.msg,
});
}
})
},
methods: {
onClickLeft() {
window.location.href = 'http://fbclient/tool'
},
onClickRight() {
this.$router.push({
path: '/applymember'
})
},
applyUser(companyId, enterpriseName) {
this.$router.push({
path: '/applyjoin',
query: {
items:companyId,
name: enterpriseName
}
})
},
useConpou(companyId, enterpriseName) {
console.log(companyId, enterpriseName)
this.$router.push({
path: '/useconpou',
query: {
items:companyId,
name: enterpriseName
}
})
},
handleClick(item) {
const { couponLink, enterpriseName } = item
console.log(item, 'link')
if (couponLink.startsWith('https') || couponLink.startsWith('http')) {
this.$router.push({ path: '/jump', query: { couponLink, enterpriseName }})
} else {
this.$toast({
className: 'toast',
message: '暂无兑换链接,请前往官网兑换'
})
}
},
handleCoupon() {
this.$router.push({
path: '/coupon'
})
}
}
}
</script>
<style lang="less">
.van-nav-bar__right {
.van-nav-bar__text {
color: white !important;
}
}
</style>
<style lang="less" scoped>
.store_btn {
display: flex;
justify-content: center;
.van-button {
width: 50vw;
height: 40px;
}
}
.btn {
margin-top: 10px;
.van-button {
width: 30vw;
height: 30px;
margin: 10px;
}
}
.header {
height: 45px;
width: 100vw;
line-height: 45px;
text-align: center;
background-color: #988ECD;
color: white;
position: fixed;
top: 6vh;
z-index: 3000;
}
.store_pic {
height: 120px;
text-align: center;
line-height: 120px;
font-size: 20px;
background-color: aliceblue;
// position: relative;
img {
width: 100%;
height: 100%;
}
// span {
// position: absolute;
// top: 0px;
// left: 50%;
// transform: translate(-50%, 0);
// font-size: 14px;
// color: #fff;
// }
}
.cell_info {
width: 96vw;
min-height: 50vh;
margin: 0 auto;
box-shadow: 0px 0px 3px #c0c0c0;
}
.mine_info {
width: 96vw;
height: 20vh;
margin: 0 auto 10px auto;
// box-shadow: 0px 0px 3px #c0c0c0;
img {
width: 100%;
height: 100%;
}
}
</style>
<template>
<div class="trade_area">
<uni-top-status></uni-top-status>
<van-nav-bar title="领取票券" class="header" left-arrow :border="false" @click-left="onClickLeft" />
<div style="margin: 12vh 0;">
<van-tabs type="card" sticky @click="activeTab">
<van-tab title="领券">
<div style="padding-top: 7vh;">
<div class="store_pic">
<van-skeleton :row="1" row-width="100vw" :loading="loading" />
<img v-if=" this.$route.query.items.logo" :src="'https://shapp.mbcloud.com/' + this.$route.query.items.logo" alt="">
</div>
<div class="coupon_content">
<div>公司简介:</div>
<div style="color: #a0a0a0;">{{this.$route.query.items.recommendReason != null ? this.$route.query.items.recommendReason : '暂无简介'}}</div>
</div>
<template v-for="(items,index) in couponList">
<van-skeleton :key="index" :row="1" row-width="100vw" :loading="loading1" />
<div :key="index" class="coupon_box">
<div class="pic">
<img :src=" 'https://shapp.mbcloud.com/' + items.couponLogo" alt="">
</div>
<div class="coupon_tips">
<div style="font-size: 20px;">{{items.couponName}}</div>
<div style="color: #a0a0a0;font-size: 15px;">有效期至</div>
<div style="color: #a0a0a0;font-size: 15px;height: 40px;overflow:scroll">{{items.remark}}</div>
</div>
<div class="btn">
<van-button @click="reveiveCop(items.isReceive,items.id)" round :color="items.isReceive == 0 ? color : colored">{{items.isReceive == 1 ? '已领取' : items.isReceive==2 ? '已过期' :'领取'}}</van-button>
</div>
</div>
</template>
</div>
</van-tab>
<van-tab title="用券">
<div style="padding-top: 7vh;">
<div class="store_pic">
<van-skeleton :row="1" row-width="100vw" :loading="loading" />
<img v-if=" this.$route.query.items.logo" :src="'https://shapp.mbcloud.com/' + this.$route.query.items.logo" alt="">
</div>
<div class="coupon_content">
<div>券使用地址:</div>
<div style="color: #a0a0a0;">{{this.$route.query.items.couponLink != null ? this.$route.query.items.couponLink : '暂无使用地址'}}</div>
</div>
<template v-for="(items,index) in couponCope">
<van-skeleton :key="index" :row="1" row-width="100vw" :loading="loading1" />
<div :key="index" class="coupon_box">
<div class="pic">
<img :src=" 'https://shapp.mbcloud.com/' + items.couponLogo" alt="">
</div>
<div class="coupon_tips">
<div>{{items.couponCode}}</div>
</div>
<div class="btn">
<van-button v-clipboard:copy="items.couponCode" v-clipboard:success="onCopy" v-clipboard:error="onError" round
:color="color">复制</van-button>
</div>
</div>
</template>
</div>
</van-tab>
</van-tabs>
</div>
</div>
</template>
<script>
import uniTopStatus from '@/components/topStatus.vue'
import COUPON from '@/api/coupon.js'
let COUPON_API = new COUPON()
export default {
name: 'trade_area',
components: {
uniTopStatus
},
data() {
return {
color: 'linear-gradient(to right,#5B29D6,#0B25DF)',
colored: 'linear-gradient(to right,#c0c0c0,#c0c0c0)',
loading: true,
loading1: true,
storeObj: {},
couponList: [],
couponCope: []
}
},
created() {
this.loading = false
let obj = {
coridc: this.$route.query.items.coridc,
usridc: this.$store.state.inforMation.usridc
}
this.init(obj)
},
methods: {
// 复制券码
onCopy() {
this.$toast.success({
className: 'toast',
message:'复制成功',
});
},
onError() {
this.$toast.fail({
className: 'toast',
message: '复制失败',
});
},
// tab栏切换
activeTab(name) {
if (name == 1) {
COUPON_API.getReceivedList({
coridc: this.$route.query.items.coridc,
usridc: this.$store.state.inforMation.usridc
})
.then(res => {
if (res.data.code == 200) {
this.couponCope = res.data.data
} else {
this.$toast.fail({
className: 'toast',
message: res.data.msg,
});
}
})
} else {
let obj = {
coridc: this.$route.query.items.coridc,
usridc: this.$store.state.inforMation.usridc
}
this.init(obj)
}
},
// 领取优惠券
reveiveCop(recive, conpouId) {
COUPON_API.receive({
couponId: conpouId,
usridc: this.$store.state.inforMation.usridc
}).then(res => {
if (res.data.code == 200) {
this.$toast.success({
className: 'toast',
message: '领取成功'
});
let obj = {
coridc: this.$route.query.items.coridc,
usridc: this.$store.state.inforMation.usridc
}
this.init(obj)
} else {
this.$toast.fail({
className: 'toast',
message: res.data.msg,
});
}
})
},
init(params) {
COUPON_API.getCouponAppList(params).then(res => {
if (res.data.code == 200) {
this.couponList = res.data.data
this.loading1 = false
} else {
this.$toast.fail({
className: 'toast',
message: res.data.msg,
});
}
})
},
onClickLeft() {
this.$router.push({
path: '/member'
})
}
}
}
</script>
<style>
.van-tabs__wrap {
width: 100vw;
position: fixed;
padding-top: 2vh;
background: white;
}
.van-skeleton {
height: 120px;
padding: 0px !important;
}
.van-skeleton__row {
height: 120px !important;
}
.van-tabs__nav--card {
border: 1px solid #988ECD !important;
}
.van-tabs__nav--card .van-tab.van-tab--active {
background-color: #988ECD !important;
}
.van-tabs__nav--card .van-tab {
border-right: 1px solid #988ECD !important;
color: #988ECD !important;
}
.van-tabs__nav--card .van-tab.van-tab--active {
color: white !important;
}
</style>
<style lang="less" scoped>
.coupon_box {
display: flex;
flex-direction: row;
width: 94vw;
height: 100px;
margin: 10px auto;
// background-color: #f8f8f8;
border: 1px solid #988ECD;
.pic {
width: 30%;
height: 100px;
img {
margin-top: 5px;
margin-left: 5%;
height: 90px;
width: 90%;
}
}
.coupon_tips {
display: flex;
flex-direction: column;
justify-content: space-around;
width: 40%;
margin-left: 10px;
}
.btn {
width: 30%;
line-height: 100px;
.van-button {
width: 80%;
margin: 10px 0 10px 10px;
border-radius: 40px;
height: 30px;
letter-spacing: 2px;
font-size: 14px;
}
}
}
.coupon_content {
width: 94vw;
margin: 10px auto;
}
.header {
height: 45px;
width: 100vw;
line-height: 45px;
text-align: center;
background-color: #988ECD;
color: white;
position: fixed;
top: 6vh;
z-index: 3000;
}
.store_pic {
height: 120px;
text-align: center;
line-height: 120px;
font-size: 20px;
// background-color: aliceblue;
img {
width: 100%;
height: 100%;
}
}
</style>
<template>
<div class="trade_area">
<uni-top-status></uni-top-status>
<van-nav-bar title="我的券夹" class="header" left-arrow :border="false" @click-left="onClickLeft" />
<div style="margin: 13vh 10px;">
<div :key="index" v-for="(items,index) in couponCope" style="margin: 10px auto;">
<div class="coupon_box">
<div class="pic">
<img :src=" 'https://shapp.mbcloud.com/' + items.couponLogo" alt="">
</div>
<div class="coupon_tips">
<span>{{items.couponName}}</span>
<span style="color: #a0a0a0;font-size: 14px;">{{items.couponCode}}</span>
<span style="color: #a0a0a0;font-size: 14px;">有效期至{{items.endDate}}</span>
</div>
<div class="btn">
<van-button round :color="color" @click="handleClick(items)" :disabled="items.text == '已失效'">去使用</van-button>
<van-button v-clipboard:copy="items.couponCode" v-clipboard:success="onCopy" v-clipboard:error="onError" round
:color="color" :disabled="items.text == '已失效'">复制券码</van-button>
</div>
</div>
<div class="tip">{{ items.remark == null ? '暂无备注' : items.remark }}</div>
</div>
<div class="handleMore" @click="handleMore">查看更多已失效优惠券</div>
</div>
</div>
</template>
<script>
import uniTopStatus from '@/components/topStatus.vue'
import COUPON from '@/api/coupon.js'
let COUPON_API = new COUPON()
export default {
name: 'trade_area',
components: {
uniTopStatus
},
data() {
return {
color: 'linear-gradient(to right,#5B29D6,#0B25DF)',
couponCope: [
{
couponLogo: '',
couponCode: '12366'
}
],
flag: false,
coridc: ''
}
},
created() {
this.coridc = localStorage.getItem('coridc')
this.init()
},
methods: {
// 复制券码
onCopy() {
this.$toast.success({
className: 'toast',
message:'复制成功',
});
},
onError() {
this.$toast.fail({
className: 'toast',
message: '复制失败',
});
},
init() {
COUPON_API.getAllReceivedListSE({
coridc: this.coridc,
usridc: this.$store.state.inforMation.usridc
})
.then(res => {
if (res.data.code == 200) {
this.couponCope = res.data.data
} else {
this.$toast.fail({
className: 'toast',
message: res.data.msg,
});
}
})
},
onClickLeft() {
this.$router.back(-1)
},
handleMore() {
if (this.flag) {
this.$toast.fail({
className: 'toast',
message: '没有更多失效优惠券',
});
} else {
COUPON_API.getOverdueList({
coridc: this.coridc,
usridc: this.$store.state.inforMation.usridc
})
.then(res => {
if (res.data.code == 200) {
this.flag = true
const { data } = res.data
const arr = []
data.map(item => {
item.text = '已失效'
arr.push(item)
})
this.couponCope.push(...arr)
console.log(this.couponCope, 'this.couponCope')
} else {
this.$toast.fail({
className: 'toast',
message: res.data.msg,
});
}
})
}
},
handleClick(item) {
const { couponLink, enterpriseName } = item
console.log(item, 'link')
if (couponLink.startsWith('https') || couponLink.startsWith('http')) {
this.$router.push({ path: '/jump', query: { couponLink, enterpriseName }})
} else {
this.$toast({
className: 'toast',
message: '暂无兑换链接,请前往官网兑换'
})
}
},
}
}
</script>
<style lang="less" scoped>
.coupon_box {
display: flex;
flex-direction: row;
width: 94vw;
height: 100px;
// background-color: #f8f8f8;
border: 1px solid #988ECD;
.pic {
width: 30%;
height: 100px;
img {
margin-top: 5px;
margin-left: 5%;
height: 90px;
width: 90%;
}
}
.coupon_tips {
display: flex;
flex-direction: column;
justify-content: space-around;
width: 40%;
margin-left: 10px;
padding: 10px 0;
font-size: 18px;
}
.btn {
width: 30%;
.van-button {
width: 80%;
margin: 10px 0 10px 10px;
border-radius: 40px;
height: 30px;
letter-spacing: 2px;
font-size: 12px;
}
.van-button--normal {
padding: 0;
}
}
}
.title {
height: 20px;
line-height: 20px;
display: flex;
justify-content: space-between;
align-items: center;
font-size: 1px;
span:first-child {
font-weight: 700;
font-size: 16px;
}
}
.tip {
width: 94vw;
height: 30px;
border: 1px solid #988ECD;
line-height: 30px;
font-size: 12px;
}
.header {
height: 45px;
width: 100vw;
line-height: 45px;
text-align: center;
background-color: #988ECD;
color: white;
position: fixed;
top: 6vh;
z-index: 3000;
}
.handleMore {
text-align: center;
font-size: 12px;
}
</style>
<template>
<div class="company">
<uni-top-status></uni-top-status>
<van-nav-bar title="企业自荐" class="header" left-arrow :border="false" @click-left="onClickLeft" />
<div style="margin: 14vh 0;">
<van-cell-group>
<van-field v-model="form.one" required label="企业名称" input-align="right" placeholder="请输入企业名称" />
<van-field v-model="form.two" required label="企业成立年限" input-align="right" placeholder="请输入企业成立年限" />
<van-field v-model="form.three" required label="注册资金" input-align="right" placeholder="请输入注册资金" />
<van-field v-model="form.fore" required label="经营范围" type="textarea" row="2" placeholder="请输入经营范围,多个请用空格或者逗号隔开" />
<van-field v-model="form.five" required label="经营产品和服务" label-width="120px" type="textarea" row="2" placeholder="请输入经营产品和服务" />
<van-field name="checkboxGroup" label="入驻模块" required>
<template #input>
<van-checkbox-group v-model="form.checkboxGroup" direction="horizontal">
<van-checkbox name="1" shape="square">会员</van-checkbox>
<van-checkbox name="2" shape="square">商圈</van-checkbox>
<van-checkbox name="3" shape="square">物业</van-checkbox>
<van-checkbox name="4" shape="square">出行</van-checkbox>
</van-checkbox-group>
</template>
</van-field>
</van-cell-group>
<van-field v-model="form.six" required label="联系人姓名" input-align="right" placeholder="请输入联系人姓名" />
<van-field v-model="form.seven" required label="联系人电话" input-align="right" placeholder="请输入联系人电话" />
<van-field v-model="form.eight" required label="联系人邮箱" input-align="right" placeholder="请输入联系人邮箱" />
<van-field v-model="form.nine" required label="推荐理由" type="textarea" row="5" placeholder="请输入推荐理由" maxlength="200"
show-word-limit />
<div class="v_button">
<van-button round color="linear-gradient(to right,#5B29D6,#0B25DF)" @click="submitApply">提交</van-button>
<van-button round plain color="#0B25DF">取消</van-button>
</div>
</div>
</div>
</template>
<script>
import uniTopStatus from '@/components/topStatus.vue'
export default {
name: 'mine',
components: {
uniTopStatus
},
data() {
return {
form: {
checkboxGroup: []
}
}
},
methods: {
onClickLeft() {
this.$router.push({
path: '/mine'
})
}
}
}
</script>
<style lang="less">
.company {
.van-checkbox__icon--checked .van-icon {
background-color: #0B25DF !important;
border-color: #0B25DF !important;
}
.van-checkbox__icon .van-icon{
border: 1px solid #0B25DF;
}
}
</style>
<style lang="less" scoped>
.company {
.header {
height: 45px;
width: 100vw;
line-height: 45px;
text-align: center;
background-color: #988ECD;
color: white;
position: fixed;
top: 6vh;
z-index: 3000;
}
.van-checkbox--horizontal {
margin-right: 5px;
}
.v_button {
display: flex;
flex-direction: row;
justify-content: space-around;
.van-button {
width: 35vw;
margin: 10px 0;
border-radius: 40px;
height: 30px;
font-size: 15px;
}
}
}
</style>
<template>
<div class="trade_area">
<uni-top-status></uni-top-status>
<van-nav-bar title="我的券夹" class="header" left-arrow :border="false" @click-left="onClickLeft" />
<div style="margin: 13vh 10px;">
<div :key="index" v-for="(items,index) in couponCope" style="margin: 10px auto 20px;">
<div :key="index2" v-for="(items2,index2) in couponCope[index]" style="margin: 0px auto 10px;">
<div class="title" v-if="index2 === 0">
<span>{{ items2.coridcName }}</span>
<span @click="handleAllCoupon(items2)">查看全部>></span>
</div>
<div class="coupon_box" v-if="index2 < 3">
<div class="pic">
<img :src=" 'https://shapp.mbcloud.com/' + items2.couponLogo" alt="">
</div>
<div class="coupon_tips">
<span>{{items2.couponName}}</span>
<span style="color: #a0a0a0;font-size: 14px;">{{items2.couponCode}}</span>
<span style="color: #a0a0a0;font-size: 14px;">有效期至{{items2.endDate}}</span>
</div>
<div class="btn">
<van-button round :color="color" @click="handleClick(items2)">去使用</van-button>
<van-button v-clipboard:copy="items2.couponCode" v-clipboard:success="onCopy" v-clipboard:error="onError" round
:color="color">复制券码</van-button>
</div>
</div>
<div class="tip" v-if="index2 < 3">{{ items2.remark == null ? '暂无备注' : items2.remark}}</div>
</div>
</div>
</div>
</div>
</template>
<script>
import uniTopStatus from '@/components/topStatus.vue'
import COUPON from '@/api/coupon.js'
let COUPON_API = new COUPON()
export default {
name: 'trade_area',
components: {
uniTopStatus
},
data() {
return {
color: 'linear-gradient(to right,#5B29D6,#0B25DF)',
couponCope: []
}
},
created() {
this.init()
},
methods: {
// 复制券码
onCopy() {
this.$toast.success({
className: 'toast',
message:'复制成功',
});
},
onError() {
this.$toast.fail({
className: 'toast',
message: '复制失败',
});
},
init() {
COUPON_API.getAllReceivedList({
usridc: this.$store.state.inforMation.usridc
})
.then(res => {
if (res.data.code == 200) {
const data = res.data.data
// for (const key of data) {
// this.couponCope.push(data[key])
// }
for (const key in data) {
const element = data[key]
this.couponCope.push(element)
}
console.log(this.couponCope, 'this.couponCope')
// this.couponCope = res.data.data
} else {
this.$toast.fail({
className: 'toast',
message: res.data.msg,
});
}
})
},
onClickLeft() {
this.$router.back(-1)
},
handleAllCoupon(items) {
localStorage.setItem('coridc', items.coridc)
this.$router.push('/allCoupon')
},
handleClick(item) {
console.log(item, item)
const { couponLink, coridcName } = item
console.log(item, 'link')
if (couponLink.startsWith('https') || couponLink.startsWith('http')) {
this.$router.push({ path: '/jump', query: { couponLink, enterpriseName: coridcName }})
} else {
this.$toast({
className: 'toast',
message: '暂无兑换链接,请前往官网兑换'
})
}
},
}
}
</script>
<style lang="less" scoped>
.coupon_box {
display: flex;
flex-direction: row;
width: 94vw;
height: 100px;
// background-color: #f8f8f8;
border: 1px solid #988ECD;
.pic {
width: 30%;
height: 100px;
img {
margin-top: 5px;
margin-left: 5%;
height: 90px;
width: 90%;
}
}
.coupon_tips {
display: flex;
flex-direction: column;
justify-content: space-around;
width: 40%;
margin-left: 10px;
padding: 10px 0;
font-size: 18px;
}
.btn {
width: 30%;
.van-button {
width: 80%;
margin: 10px 0 10px 10px;
border-radius: 40px;
height: 30px;
letter-spacing: 2px;
font-size: 12px;
}
.van-button--normal {
padding: 0;
}
}
}
.title {
height: 20px;
line-height: 20px;
display: flex;
justify-content: space-between;
align-items: center;
font-size: 1px;
margin-bottom: 10px;
font-size: 12px;
span:first-child {
font-weight: 700;
font-size: 16px;
}
}
.tip {
width: 94vw;
height: 30px;
border: 1px solid #988ECD;
line-height: 30px;
font-size: 12px;
}
.header {
height: 45px;
width: 100vw;
line-height: 45px;
text-align: center;
background-color: #988ECD;
color: white;
position: fixed;
top: 6vh;
z-index: 3000;
}
</style>
<template>
<div class="mine">
<uni-top-status></uni-top-status>
<van-nav-bar title="我的" class="header" left-arrow :border="false" @click-left="onClickLeft" />
<!-- <div class="header">我的</div> -->
<div style="margin: 14vh 0;">
<div class="mine_info">
我的基本信息
</div>
<div class="cell_info">
<van-cell title="企业自荐" icon="location-o" is-link to='/applymember'>
<template #icon>
<img src="../../assets/logo.png" alt="" style="width: 20px;height: 20px;">
</template>
</van-cell>
<van-cell title="我的券夹" icon="location-o" is-link to='/coupon'>
<template #icon>
<img src="../../assets/logo.png" alt="" style="width: 20px;height: 20px;">
</template>
</van-cell>
</div>
</div>
<vant-footer :index="3"></vant-footer>
</div>
</template>
<script>
import uniTopStatus from '@/components/topStatus.vue'
import vantFooter from '@/components/layout/vanFooter.vue'
export default {
name: 'mine',
components: {
uniTopStatus,vantFooter
},
data() {
return {
// key: value
}
},
methods: {
onClickLeft() {
window.location.href = 'http://fbclient/tool'
}
}
}
</script>
<style lang="less" scoped>
.mine {
.header {
height: 45px;
width: 100vw;
line-height: 45px;
text-align: center;
background-color: #988ECD;
color: white;
position: fixed;
top: 6vh;
z-index: 3000;
}
.mine_info {
width: 96vw;
height: 20vh;
margin: 0 auto 10px auto;
box-shadow: 0px 0px 3px #c0c0c0;
}
.cell_info {
width: 96vw;
min-height: 50vh;
margin: 0 auto;
box-shadow: 0px 0px 3px #c0c0c0;
}
}
</style>
<template>
<div class="property">
<uni-top-status></uni-top-status>
<van-nav-bar title="物业" class="header" left-arrow :border="false" @click-left="onClickLeft" />
<div style="margin: 14vh 0;">
待二期开发
</div>
<vant-footer :index="2"></vant-footer>
</div>
</template>
<script>
import uniTopStatus from '@/components/topStatus.vue'
import vantFooter from '@/components/layout/vanFooter.vue'
export default {
name: 'property',
components: {
uniTopStatus,vantFooter
},
data() {
return {
// key: value
}
},
methods:{
onClickLeft(){
window.location.href = 'http://fbclient/tool'
}
}
}
</script>
<style lang="less" scoped>
.header {
height: 45px;
width: 100vw;
line-height: 45px;
text-align: center;
background-color: #988ECD;
color: white;
position: fixed;
top: 6vh;
z-index: 3000;
}
</style>
<template>
<div class="property">
<uni-top-status></uni-top-status>
<van-nav-bar title="商圈" class="header" left-arrow :border="false" @click-left="onClickLeft" />
<div style="margin: 14vh 0;">
待二期开发
</div>
<vant-footer :index="1"></vant-footer>
</div>
</template>
<script>
import uniTopStatus from '@/components/topStatus.vue'
import vantFooter from '@/components/layout/vanFooter.vue'
export default {
name: 'property',
components: {
uniTopStatus,vantFooter
},
data() {
return {
// key: value
}
},
methods:{
onClickLeft(){
window.location.href = 'http://fbclient/tool'
}
}
}
</script>
<style lang="less" scoped>
.header {
height: 45px;
width: 100vw;
line-height: 45px;
text-align: center;
background-color: #988ECD;
color: white;
position: fixed;
top: 6vh;
z-index: 3000;
}
</style>
/**
* @Description:配置打包的路劲,与代理服务
* @author:jzjun
*/
module.exports = {
publicPath: '/cmbapp-consume/', //根路径,根据不同的项目打包,用于后台配置
devServer: {
open: true,
overlay: {
warnings: false,
errors: true
},
proxy: {
'': {
target: 'https://shapp.mbcloud.com/', // 要访问的接口域名
// target: 'http://192.168.110.85:8085/', // 要访问的接口域名
ws: true, // 是否启用websockets
changeOrigin: true, // 开启代理:在本地会创建一个虚拟服务端,然后发送请求的数据,并同时接收请求的数据,这样服务端和服务端进行数据的交互就不会有跨域问题
pathRewrite: {
'': '' // 开发环境使用
}
}
},
before: app => {}
},
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment