├── README.md ├── push.bat ├── static ├── img │ ├── hd.png │ ├── hd1.png │ ├── hh2.png │ ├── rz.png │ ├── vip.png │ ├── nopic.png │ ├── used.png │ ├── add-fimg.png │ ├── add-img.png │ ├── address.png │ ├── coupon.png │ ├── head.bg.png │ ├── incoming.png │ ├── mealIcon.png │ ├── promote.png │ ├── vip-card.png │ ├── wallet.jpg │ ├── yslogo.png │ ├── Preference.png │ ├── coupon.red.png │ ├── generalize.png │ ├── logo_bind.jpg │ ├── carefreeWang_1.png │ ├── carefreeWang_2.png │ └── carefreeWang_3.png └── fonts │ ├── vant-icon-db1de1.ttf │ ├── vant-icon-db1de1.woff │ └── vant-icon-db1de1.woff2 ├── utils ├── apis.js ├── wechat │ └── index.js └── request │ └── index.js ├── config ├── constData.config.js └── index.config.js ├── .gitignore ├── pages ├── index │ └── index.vue ├── login │ ├── css │ │ └── main.css │ └── forget.vue ├── user │ ├── partner │ │ ├── withdrawal_record.vue │ │ ├── balance.vue │ │ ├── partner_accounts.vue │ │ └── partner_customers.vue │ ├── shop_admin │ │ ├── shop_activitys.vue │ │ ├── shop_accounts.vue │ │ ├── shop_customers.vue │ │ ├── shop_show_partners.vue │ │ ├── shop_set_partner.vue │ │ ├── shop_setting.vue │ │ ├── un_send_coupons.vue │ │ ├── coupons.vue │ │ └── shop_coupons.vue │ ├── customers.vue │ ├── my_activitys.vue │ └── coupon_detail.vue ├── public │ ├── activity_detail.vue │ ├── bind_fans.vue │ ├── activity_list.vue │ ├── join.vue │ └── coupon_detail.vue └── setting │ ├── update_password.vue │ └── update_info.vue ├── uni.scss ├── components ├── toggle-user-home.vue ├── watch-login │ ├── watch-button.vue │ └── watch-input.vue ├── qrcodeshow.vue └── footnav.vue ├── manifest.json └── main.js /README.md: -------------------------------------------------------------------------------- 1 | # h5_partent 2 | 3 | * 共享合伙人 4 | 5 | -------------------------------------------------------------------------------- /push.bat: -------------------------------------------------------------------------------- 1 | git pull 2 | git add . 3 | git commit -m "auto push" 4 | git push 5 | @pause -------------------------------------------------------------------------------- /static/img/hd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Semporia/h5_partent/master/static/img/hd.png -------------------------------------------------------------------------------- /static/img/hd1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Semporia/h5_partent/master/static/img/hd1.png -------------------------------------------------------------------------------- /static/img/hh2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Semporia/h5_partent/master/static/img/hh2.png -------------------------------------------------------------------------------- /static/img/rz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Semporia/h5_partent/master/static/img/rz.png -------------------------------------------------------------------------------- /static/img/vip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Semporia/h5_partent/master/static/img/vip.png -------------------------------------------------------------------------------- /static/img/nopic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Semporia/h5_partent/master/static/img/nopic.png -------------------------------------------------------------------------------- /static/img/used.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Semporia/h5_partent/master/static/img/used.png -------------------------------------------------------------------------------- /static/img/add-fimg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Semporia/h5_partent/master/static/img/add-fimg.png -------------------------------------------------------------------------------- /static/img/add-img.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Semporia/h5_partent/master/static/img/add-img.png -------------------------------------------------------------------------------- /static/img/address.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Semporia/h5_partent/master/static/img/address.png -------------------------------------------------------------------------------- /static/img/coupon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Semporia/h5_partent/master/static/img/coupon.png -------------------------------------------------------------------------------- /static/img/head.bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Semporia/h5_partent/master/static/img/head.bg.png -------------------------------------------------------------------------------- /static/img/incoming.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Semporia/h5_partent/master/static/img/incoming.png -------------------------------------------------------------------------------- /static/img/mealIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Semporia/h5_partent/master/static/img/mealIcon.png -------------------------------------------------------------------------------- /static/img/promote.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Semporia/h5_partent/master/static/img/promote.png -------------------------------------------------------------------------------- /static/img/vip-card.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Semporia/h5_partent/master/static/img/vip-card.png -------------------------------------------------------------------------------- /static/img/wallet.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Semporia/h5_partent/master/static/img/wallet.jpg -------------------------------------------------------------------------------- /static/img/yslogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Semporia/h5_partent/master/static/img/yslogo.png -------------------------------------------------------------------------------- /static/img/Preference.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Semporia/h5_partent/master/static/img/Preference.png -------------------------------------------------------------------------------- /static/img/coupon.red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Semporia/h5_partent/master/static/img/coupon.red.png -------------------------------------------------------------------------------- /static/img/generalize.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Semporia/h5_partent/master/static/img/generalize.png -------------------------------------------------------------------------------- /static/img/logo_bind.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Semporia/h5_partent/master/static/img/logo_bind.jpg -------------------------------------------------------------------------------- /static/img/carefreeWang_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Semporia/h5_partent/master/static/img/carefreeWang_1.png -------------------------------------------------------------------------------- /static/img/carefreeWang_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Semporia/h5_partent/master/static/img/carefreeWang_2.png -------------------------------------------------------------------------------- /static/img/carefreeWang_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Semporia/h5_partent/master/static/img/carefreeWang_3.png -------------------------------------------------------------------------------- /static/fonts/vant-icon-db1de1.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Semporia/h5_partent/master/static/fonts/vant-icon-db1de1.ttf -------------------------------------------------------------------------------- /static/fonts/vant-icon-db1de1.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Semporia/h5_partent/master/static/fonts/vant-icon-db1de1.woff -------------------------------------------------------------------------------- /static/fonts/vant-icon-db1de1.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Semporia/h5_partent/master/static/fonts/vant-icon-db1de1.woff2 -------------------------------------------------------------------------------- /utils/apis.js: -------------------------------------------------------------------------------- 1 | import { http } from '@/utils/request'; 2 | 3 | export default { 4 | async info(success,failure){ 5 | http.post("/user/info"); 6 | }, 7 | } 8 | -------------------------------------------------------------------------------- /config/constData.config.js: -------------------------------------------------------------------------------- 1 | import indexConfig from './index.config.js'; 2 | const PATH = indexConfig.assetsPath; 3 | export default { 4 | images:{ 5 | vip : PATH +'/img/vip.png', 6 | } 7 | }; 8 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | 3 | # Xcode 4 | .DS_Store 5 | */build/* 6 | *.pbxuser 7 | !default.pbxuser 8 | *.mode1v3 9 | !default.mode1v3 10 | *.mode2v3 11 | !default.mode2v3 12 | *.perspectivev3 13 | !default.perspectivev3 14 | xcuserdata 15 | profile 16 | *.moved-aside 17 | DerivedData 18 | .idea/ 19 | *.hmap 20 | *.xccheckout 21 | *.xcworkspace 22 | !default.xcworkspace 23 | 24 | #CocoaPods 25 | Pods 26 | !Podfile 27 | !Podfile.lock 28 | 29 | # HBuilderX 30 | .hbuilderx 31 | unpackage -------------------------------------------------------------------------------- /config/index.config.js: -------------------------------------------------------------------------------- 1 | const CONFIG = { 2 | // 开发环境配置 3 | development: { 4 | assetsPath: '/static', // 静态资源路径 5 | baseUrl: 'https://h5.zhusutao.com/v2', // 后台接口请求地址 6 | hostUrl: 'https://h5.zhusutao.com/', // H5地址(前端运行地址) 7 | websocketUrl: '', // websocket服务端地址 8 | weixinAppId: 'wx6962b52069f38239' // 微信公众号appid 9 | }, 10 | // 生产环境配置 11 | production: { 12 | assetsPath: '/static', // 静态资源路径 13 | baseUrl: 'https://h5.zhusutao.com/v2', // 后台接口请求地址 14 | hostUrl: 'https://h5.zhusutao.com/', // H5地址(前端运行地址) 15 | websocketUrl: '', // websocket服务端地址 16 | weixinAppId: 'wx6962b52069f38239' // 微信公众号appid 17 | } 18 | 19 | }; 20 | export default CONFIG[process.env.NODE_ENV]; 21 | -------------------------------------------------------------------------------- /utils/wechat/index.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | 3 | import jweixin from '@/utils/wechat/jweixin.js'; 4 | 5 | export default { 6 | // 判断是否公众号(微信H5) 7 | isWechat() { 8 | // #ifdef H5 9 | const ua = window.navigator.userAgent.toLowerCase(); 10 | if (ua.match(/micromessenger/i) == 'micromessenger') { 11 | return true; 12 | } else { 13 | return false; 14 | } 15 | // #endif 16 | }, 17 | 18 | // wxjssdk 19 | async wxConfigH5(url) { 20 | if (this.isWechat()) { 21 | var jsApiList = [ 22 | 'chooseWXPay', 23 | 'scanQRCode', 24 | 'updateAppMessageShareData', 25 | 'updateTimelineShareData' 26 | ]; 27 | await http.post('/Wechat/config', { 28 | wechat_id:2, 29 | js_api_params: jsApiList.join(','), 30 | url:url, 31 | debug: false 32 | }) 33 | .then(r => { 34 | jweixin.config({ 35 | ...r.data 36 | }); 37 | }); 38 | } 39 | }, 40 | 41 | }; 42 | -------------------------------------------------------------------------------- /pages/index/index.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 25 | 26 | 53 | -------------------------------------------------------------------------------- /pages/login/css/main.css: -------------------------------------------------------------------------------- 1 | .content { 2 | display: flex; 3 | flex-direction: column; 4 | justify-content:center; 5 | /* margin-top: 128rpx; */ 6 | } 7 | 8 | /* 头部 logo */ 9 | .header { 10 | width:161rpx; 11 | height:161rpx; 12 | box-shadow:0rpx 0rpx 60rpx 0rpx rgba(0,0,0,0.1); 13 | border-radius:50%; 14 | /* background-color: #000000; */ 15 | margin-top: 128rpx; 16 | margin-bottom: 72rpx; 17 | margin-left: auto; 18 | margin-right: auto; 19 | } 20 | .header image{ 21 | width:161rpx; 22 | height:161rpx; 23 | border-radius:50%; 24 | } 25 | 26 | /* 主体 */ 27 | .main { 28 | display: flex; 29 | flex-direction: column; 30 | padding-left: 70rpx; 31 | padding-right: 70rpx; 32 | } 33 | .tips { 34 | color: var(--text-color); 35 | font-size: 28rpx; 36 | margin-top: 64rpx; 37 | margin-left: 48rpx; 38 | } 39 | 40 | /* 登录按钮 */ 41 | .wbutton{ 42 | margin-top: 96rpx; 43 | } 44 | 45 | /* 其他登录方式 */ 46 | .other_login{ 47 | display: flex; 48 | flex-direction: row; 49 | justify-content: center; 50 | align-items: center; 51 | margin-top: 256rpx; 52 | text-align: center; 53 | } 54 | .login_icon{ 55 | border: none; 56 | font-size: 64rpx; 57 | margin: 0 64rpx 0 64rpx; 58 | color: var(--text-color) 59 | } 60 | .wechat_color{ 61 | color: #83DC42; 62 | } 63 | .weibo_color{ 64 | color: #F9221D; 65 | } 66 | .github_color{ 67 | color: #24292E; 68 | } 69 | 70 | /* 底部 */ 71 | .footer{ 72 | display: flex; 73 | flex-direction: row; 74 | justify-content: center; 75 | align-items: center; 76 | font-size: 28rpx; 77 | margin: 64rpx 0rpx; 78 | color: var(--text-color); 79 | text-align: center; 80 | height: 40rpx; 81 | line-height: 40rpx; 82 | } 83 | .footer text{ 84 | font-size: 24rpx; 85 | margin-left: 15rpx; 86 | margin-right: 15rpx; 87 | } -------------------------------------------------------------------------------- /uni.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * 这里是uni-app内置的常用样式变量 3 | * 4 | * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 5 | * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App 6 | * 7 | */ 8 | 9 | /** 10 | * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 11 | * 12 | * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 13 | */ 14 | 15 | /* 颜色变量 */ 16 | 17 | /* 行为相关颜色 */ 18 | $uni-color-primary: #007aff; 19 | $uni-color-success: #4cd964; 20 | $uni-color-warning: #f0ad4e; 21 | $uni-color-error: #dd524d; 22 | 23 | /* 文字基本颜色 */ 24 | $uni-text-color:#333;//基本色 25 | $uni-text-color-inverse:#fff;//反色 26 | $uni-text-color-grey:#999;//辅助灰色,如加载更多的提示信息 27 | $uni-text-color-placeholder: #808080; 28 | $uni-text-color-disable:#c0c0c0; 29 | 30 | /* 背景颜色 */ 31 | $uni-bg-color:#ffffff; 32 | $uni-bg-color-grey:#f8f8f8; 33 | $uni-bg-color-hover:#f1f1f1;//点击状态颜色 34 | $uni-bg-color-mask:rgba(0, 0, 0, 0.4);//遮罩颜色 35 | 36 | /* 边框颜色 */ 37 | $uni-border-color:#c8c7cc; 38 | 39 | /* 尺寸变量 */ 40 | 41 | /* 文字尺寸 */ 42 | $uni-font-size-sm:24rpx; 43 | $uni-font-size-base:28rpx; 44 | $uni-font-size-lg:32rpx; 45 | 46 | /* 图片尺寸 */ 47 | $uni-img-size-sm:40rpx; 48 | $uni-img-size-base:52rpx; 49 | $uni-img-size-lg:80rpx; 50 | 51 | /* Border Radius */ 52 | $uni-border-radius-sm: 4rpx; 53 | $uni-border-radius-base: 6rpx; 54 | $uni-border-radius-lg: 12rpx; 55 | $uni-border-radius-circle: 50%; 56 | 57 | /* 水平间距 */ 58 | $uni-spacing-row-sm: 10px; 59 | $uni-spacing-row-base: 20rpx; 60 | $uni-spacing-row-lg: 30rpx; 61 | 62 | /* 垂直间距 */ 63 | $uni-spacing-col-sm: 8rpx; 64 | $uni-spacing-col-base: 16rpx; 65 | $uni-spacing-col-lg: 24rpx; 66 | 67 | /* 透明度 */ 68 | $uni-opacity-disabled: 0.3; // 组件禁用态的透明度 69 | 70 | /* 文章场景相关 */ 71 | $uni-color-title: #2C405A; // 文章标题颜色 72 | $uni-font-size-title:40rpx; 73 | $uni-color-subtitle: #555555; // 二级标题颜色 74 | $uni-font-size-subtitle:36rpx; 75 | $uni-color-paragraph: #3F536E; // 文章段落颜色 76 | $uni-font-size-paragraph:30rpx; 77 | 78 | 79 | -------------------------------------------------------------------------------- /utils/request/index.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | import Request from './request'; 3 | import indexConfig from '@/config/index.config'; 4 | const http = new Request(); 5 | 6 | // request全局参数设置 7 | http.setConfig(config => { 8 | /* 设置全局配置 */ 9 | config.baseUrl = indexConfig.baseUrl; /* 根域名不同 */ 10 | const systemInfo = uni.getSystemInfoSync(); 11 | const systemInfoHeaders = { 12 | 'device-name': systemInfo.brand, // 设备名称 13 | width: systemInfo.screenWidth, // 屏幕宽度 14 | height: systemInfo.screenHeight, // 屏幕高度 15 | os: systemInfo.platform, // 客户端平台 16 | 'os-version': systemInfo.system // 操作系统版本 17 | }; 18 | config.header = { 19 | ...config.header, 20 | ...systemInfoHeaders 21 | }; 22 | return config; 23 | }); 24 | 25 | let isRefreshing = false; 26 | let requests = []; 27 | 28 | http.interceptor.request( 29 | config => { 30 | /* 请求之前拦截器 */ 31 | config.header['x-api-key'] = uni.getStorageSync('token'); 32 | // 单商户 33 | // config.header['merchant-id'] = uni.getStorageSync('merchantId') || 1; 34 | return config; 35 | }, 36 | error => { 37 | return Promise.reject(error); 38 | } 39 | ); 40 | 41 | 42 | 43 | http.interceptor.response( 44 | async response => { 45 | /* 请求之后拦截器 */ 46 | switch (response.data.err) { 47 | case 0: 48 | return response.data.data; 49 | uni.showToast({ 50 | title: response.data.msg, 51 | duration: 200 52 | }); 53 | case 1: 54 | uni.showToast({ 55 | title: response.data.msg, 56 | duration: 200 57 | }); 58 | case 402: 59 | uni.showToast({ 60 | title: response.data.msg, 61 | duration: 200 62 | }); 63 | case 400: 64 | uni.showToast({ 65 | title: response.data.msg, 66 | duration: 2000 67 | }); 68 | return Promise.reject(response.data.message); 69 | break; 70 | } 71 | // return response.data; 72 | console.log(response.data); 73 | 74 | }, 75 | error => { 76 | return Promise.reject(error); 77 | } 78 | ); 79 | 80 | export { http }; 81 | -------------------------------------------------------------------------------- /pages/user/partner/withdrawal_record.vue: -------------------------------------------------------------------------------- 1 | 22 | 23 | 46 | 47 | 64 | -------------------------------------------------------------------------------- /components/toggle-user-home.vue: -------------------------------------------------------------------------------- 1 | 15 | 16 | 74 | 75 | 78 | -------------------------------------------------------------------------------- /pages/user/shop_admin/shop_activitys.vue: -------------------------------------------------------------------------------- 1 | 30 | 31 | 46 | 47 | 65 | -------------------------------------------------------------------------------- /manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name" : "cheguanjia", 3 | "appid" : "__UNI__E37D6BB", 4 | "description" : "", 5 | "versionName" : "1.0.0", 6 | "versionCode" : "100", 7 | "transformPx" : false, 8 | /* 5+App特有相关 */ 9 | "app-plus" : { 10 | "usingComponents" : true, 11 | "nvueCompiler" : "uni-app", 12 | "compilerVersion" : 3, 13 | "splashscreen" : { 14 | "alwaysShowBeforeRender" : true, 15 | "waiting" : true, 16 | "autoclose" : true, 17 | "delay" : 0 18 | }, 19 | /* 模块配置 */ 20 | "modules" : {}, 21 | /* 应用发布信息 */ 22 | "distribute" : { 23 | /* android打包配置 */ 24 | "android" : { 25 | "permissions" : [ 26 | "", 27 | "", 28 | "", 29 | "", 30 | "", 31 | "", 32 | "", 33 | "", 34 | "", 35 | "", 36 | "", 37 | "", 38 | "", 39 | "", 40 | "", 41 | "", 42 | "", 43 | "", 44 | "", 45 | "", 46 | "", 47 | "" 48 | ] 49 | }, 50 | /* ios打包配置 */ 51 | "ios" : {}, 52 | /* SDK配置 */ 53 | "sdkConfigs" : {} 54 | } 55 | }, 56 | /* 快应用特有相关 */ 57 | "quickapp" : {}, 58 | /* 小程序特有相关 */ 59 | "mp-weixin" : { 60 | "appid" : "", 61 | "setting" : { 62 | "urlCheck" : false 63 | }, 64 | "usingComponents" : true 65 | }, 66 | "mp-alipay" : { 67 | "usingComponents" : true 68 | }, 69 | "mp-baidu" : { 70 | "usingComponents" : true 71 | }, 72 | "mp-toutiao" : { 73 | "usingComponents" : true 74 | }, 75 | "uniStatistics" : { 76 | "enable" : false 77 | }, 78 | "h5" : { 79 | "router" : { 80 | "base" : "/h5/newhome/" 81 | }, 82 | "domain" : "", 83 | "title" : "城市合伙人" 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /pages/login/forget.vue: -------------------------------------------------------------------------------- 1 | 46 | 47 | 151 | 152 | 156 | 157 | -------------------------------------------------------------------------------- /components/watch-login/watch-button.vue: -------------------------------------------------------------------------------- 1 | 28 | 29 | 57 | 58 | 135 | -------------------------------------------------------------------------------- /pages/user/partner/balance.vue: -------------------------------------------------------------------------------- 1 | 41 | 42 | 77 | 78 | 110 | -------------------------------------------------------------------------------- /pages/user/partner/partner_accounts.vue: -------------------------------------------------------------------------------- 1 | 2 | 34 | 35 | 64 | 65 | 208 | -------------------------------------------------------------------------------- /pages/user/shop_admin/shop_accounts.vue: -------------------------------------------------------------------------------- 1 | 30 | 71 | 72 | 214 | -------------------------------------------------------------------------------- /components/watch-login/watch-input.vue: -------------------------------------------------------------------------------- 1 | 41 | 42 | 177 | 178 | 219 | -------------------------------------------------------------------------------- /main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import App from './App' 3 | 4 | import footnav from "@/components/footnav" 5 | import indexConfig from "config/index.config.js" 6 | import constData from './config/constData.config.js' 7 | import { http } from '@/utils/request'; 8 | Vue.prototype.http = http; 9 | 10 | Vue.prototype.isWechat = function() { 11 | // #ifdef H5 12 | const ua = window.navigator.userAgent.toLowerCase(); 13 | if (ua.match(/micromessenger/i) == 'micromessenger') { 14 | return true; 15 | } else { 16 | return false; 17 | } 18 | // #endif 19 | } 20 | 21 | Vue.prototype.WechatLogiin = function(backurl){ 22 | var url = encodeURIComponent(backurl); 23 | var to_login = "/index/Wechat/getUserinfo?wechat_id=2&redirect_uri="+url; 24 | console.log(to_login); 25 | window.location.href = to_login; 26 | } 27 | 28 | Vue.prototype.constData = constData; 29 | // import 'lib-flexible' 30 | Vue.config.productionTip = false 31 | Vue.component('footnav', footnav); 32 | App.mpType = 'app' 33 | 34 | 35 | 36 | 37 | Vue.prototype.reLoadSize = function() { 38 | var html = document.getElementsByTagName("html")[0]; 39 | var body = document.getElementsByTagName("body")[0]; 40 | var width = document.body.offsetWidth; // 获取当前页面的宽度 41 | console.log(width); 42 | var nowFont = width / 375 * 37.5; // 通过标签名称来获取元素 43 | html.style.fontSize = nowFont + "px"; 44 | // console.log(html); 45 | body.style = "font-size: 12px; overflow: auto;"; 46 | console.log("已设置"); 47 | } 48 | 49 | Vue.prototype.getLocalUser = function() { 50 | var user = {}; 51 | try { 52 | const value = uni.getStorageSync('user'); 53 | if (value) { 54 | user = value; 55 | } 56 | } catch (e) { 57 | 58 | } 59 | return user; 60 | } 61 | 62 | // 通用网络上传 63 | Vue.prototype.upload = function(opt) { 64 | uni.showLoading({ 65 | title: ' 上传中,请稍后...' 66 | }); 67 | opt = opt || {}; 68 | opt.url = opt.url || ''; 69 | opt.name = opt.name || 'file'; 70 | opt.data = opt.data || {}; 71 | opt.success = opt.success || function() {}; 72 | opt.complete = opt.complete || function() {}; 73 | opt.fail = opt.fail || function() {}; 74 | try { 75 | opt.data['from_user_id'] = uni.getStorageSync('from_user_id'); 76 | } catch (e) { 77 | opt.data['from_user_id'] = 0; 78 | } 79 | 80 | try { 81 | opt.data['token'] = uni.getStorageSync('token'); 82 | } catch (e) { 83 | opt.data['token'] = ""; 84 | } 85 | uni.uploadFile({ 86 | url: indexConfig.baseUrl + opt.url, 87 | filePath: opt.filePath, 88 | name: opt.name, 89 | formData: opt.data, 90 | dataType: 'json', 91 | success: (uploadFileRes) => { 92 | opt.success(JSON.parse(uploadFileRes.data)); 93 | }, 94 | complete: () => { 95 | opt.complete(); 96 | uni.hideLoading(); 97 | }, 98 | fail: () => { 99 | opt.fail(); 100 | } 101 | }); 102 | 103 | } 104 | 105 | 106 | Vue.prototype.syncUser = function() { 107 | var _this = this; 108 | _this.post({ 109 | url: '/user/home', 110 | data: {}, 111 | success: function(res) { 112 | _this.shop = res.data.data.shop; 113 | _this.partner_rule = res.data.data.partner_rule; 114 | if (res.data.err == 0) { 115 | _this.user = res.data.data.user; 116 | _this.extInfo = res.data.data.extInfo; 117 | _this.footPrintList = res.data.data.foot_print; 118 | _this.shop_customer = res.data.data.shop_customer; 119 | _this.coupons_num = res.data.data.coupons_num; 120 | uni.setStorageSync('common', res.data.data); 121 | uni.setStorageSync('user', res.data.data.user); 122 | _this.hasLogin = true; 123 | } else { 124 | uni.setStorageSync('user', {}); 125 | uni.setStorageSync('common', {}); 126 | } 127 | 128 | } 129 | }); 130 | } 131 | 132 | // 通用网络提交 133 | Vue.prototype.post = function(opt) { 134 | // uni.showLoading({ 135 | // title: '加载中,请稍后...' 136 | // }); 137 | opt = opt || {}; 138 | opt.url = opt.url || ''; 139 | opt.data = opt.data || {}; 140 | opt.method = opt.method || 'POST'; 141 | // 'Access-Control-Request-Headers':'Presetproperties' 142 | // opt.header = opt.header || {"Content-Type": "application/json"}; 143 | opt.success = opt.success || function() {}; 144 | opt.complete = opt.complete || function() {}; 145 | opt.fail = opt.fail || function() {}; 146 | 147 | try { 148 | opt.data['from_user_id'] = uni.getStorageSync('from_user_id'); 149 | } catch (e) { 150 | opt.data['from_user_id'] = 0; 151 | } 152 | opt.data['shop_id'] = 1; 153 | try { 154 | opt.data['token'] = uni.getStorageSync('token'); 155 | } catch (e) { 156 | // opt.data['token'] = "ejOqPNAkwocHRJpp4hHwhRI12jagzRHIPk7D8ezrXxz5tMAxM2Iacll45LiVLuXZ"; 157 | } 158 | // opt.data['token'] = "ejOqPNAkwocHRJpp4hHwhRI12jagzRHIPk7D8ezrXxz5tMAxM2Iacll45LiVLuXZ"; 159 | // opt.data.remove('sign'); 160 | uni.request({ 161 | url: indexConfig.baseUrl + opt.url, 162 | data: opt.data, 163 | method: opt.method, 164 | header: opt.header, 165 | dataType: 'json', 166 | success: function(res) { 167 | opt.success(res); 168 | }, 169 | fail: function() { 170 | uni.showToast({ 171 | icon: 'loading', 172 | title: '网络故障,请稍后重试。' 173 | }); 174 | opt.fail(); 175 | }, 176 | complete: function() { 177 | console.log('complete'); 178 | // uni.hideLoading(); 179 | opt.complete(); 180 | } 181 | }) 182 | 183 | } 184 | 185 | Vue.prototype.NavTo = function(path) { 186 | uni.navigateTo({ 187 | url: path 188 | }) 189 | } 190 | const app = new Vue({ 191 | ...App 192 | }) 193 | app.$mount() 194 | -------------------------------------------------------------------------------- /pages/public/activity_detail.vue: -------------------------------------------------------------------------------- 1 | 90 | 91 | 168 | -------------------------------------------------------------------------------- /pages/user/partner/partner_customers.vue: -------------------------------------------------------------------------------- 1 | 30 | 31 | 55 | 56 | 229 | -------------------------------------------------------------------------------- /pages/public/bind_fans.vue: -------------------------------------------------------------------------------- 1 | 30 | 31 | 46 | 47 | 290 | -------------------------------------------------------------------------------- /components/qrcodeshow.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 38 | 39 | 69 | -------------------------------------------------------------------------------- /pages/user/shop_admin/shop_customers.vue: -------------------------------------------------------------------------------- 1 | 26 | 27 | 28 | 72 | 73 | 255 | -------------------------------------------------------------------------------- /pages/user/customers.vue: -------------------------------------------------------------------------------- 1 | 29 | 30 | 74 | 75 | 248 | -------------------------------------------------------------------------------- /pages/user/shop_admin/shop_show_partners.vue: -------------------------------------------------------------------------------- 1 | 28 | 29 | 72 | 73 | 255 | -------------------------------------------------------------------------------- /components/footnav.vue: -------------------------------------------------------------------------------- 1 | 35 | 36 | -------------------------------------------------------------------------------- /pages/setting/update_password.vue: -------------------------------------------------------------------------------- 1 | 39 | 40 | 55 | 56 | 288 | -------------------------------------------------------------------------------- /pages/user/my_activitys.vue: -------------------------------------------------------------------------------- 1 | 115 | 116 | 159 | 160 | -------------------------------------------------------------------------------- /pages/public/activity_list.vue: -------------------------------------------------------------------------------- 1 | 117 | 118 | 166 | 167 | -------------------------------------------------------------------------------- /pages/user/shop_admin/shop_set_partner.vue: -------------------------------------------------------------------------------- 1 | 85 | 86 | 128 | 129 | 171 | -------------------------------------------------------------------------------- /pages/public/join.vue: -------------------------------------------------------------------------------- 1 | 26 | 27 | 42 | 43 | 172 | -------------------------------------------------------------------------------- /pages/user/shop_admin/shop_setting.vue: -------------------------------------------------------------------------------- 1 | 73 | 74 | 106 | 107 | 344 | -------------------------------------------------------------------------------- /pages/setting/update_info.vue: -------------------------------------------------------------------------------- 1 | 59 | 60 | 133 | 134 | 361 | -------------------------------------------------------------------------------- /pages/user/coupon_detail.vue: -------------------------------------------------------------------------------- 1 | 50 | 191 | 357 | -------------------------------------------------------------------------------- /pages/user/shop_admin/un_send_coupons.vue: -------------------------------------------------------------------------------- 1 | 63 | 64 | 109 | 110 | 368 | -------------------------------------------------------------------------------- /pages/user/shop_admin/coupons.vue: -------------------------------------------------------------------------------- 1 | 63 | 64 | 109 | 110 | 368 | -------------------------------------------------------------------------------- /pages/user/shop_admin/shop_coupons.vue: -------------------------------------------------------------------------------- 1 | 63 | 64 | 109 | 110 | 368 | -------------------------------------------------------------------------------- /pages/public/coupon_detail.vue: -------------------------------------------------------------------------------- 1 | 54 | 55 | 108 | 109 | 443 | --------------------------------------------------------------------------------