Compare commits

..

No commits in common. 'juhuiH5' and 'master' have entirely different histories.

  1. 11
      App.vue
  2. 4
      common/config.js
  3. 139
      common/jweixin.js
  4. 2
      components/wm-poster/wm-posters.vue
  5. 5
      main.js
  6. 20
      manifest.json
  7. 27
      mixins/SendVerifyCode.js
  8. 30
      node_modules/jweixin-module/README.md
  9. 1
      node_modules/jweixin-module/lib/index.js
  10. 54
      node_modules/jweixin-module/package.json
  11. 21
      node_modules/vue-jsonp/LICENSE
  12. 153
      node_modules/vue-jsonp/README.md
  13. 73
      node_modules/vue-jsonp/dist/index.d.ts
  14. 8
      node_modules/vue-jsonp/dist/index.esm.js
  15. 8
      node_modules/vue-jsonp/dist/index.js
  16. 20
      node_modules/vue-jsonp/dist/utils/index.d.ts
  17. 80
      node_modules/vue-jsonp/package.json
  18. 15
      package-lock.json
  19. 5
      pages.json
  20. 85
      pages/index/index.vue
  21. 55
      pages/index/selectCampus.vue
  22. 5
      pages/index/taskDetail.vue
  23. 5
      pages/index/tuijianList.vue
  24. 5
      pages/my/channelshop.vue
  25. 17
      pages/my/index.vue
  26. 33
      pages/my/myVIP.vue
  27. 5
      pages/my/mychannel.vue
  28. 5
      pages/my/shareFriends.vue
  29. 5
      pages/my/teamList.vue
  30. 10
      pages/order/index.vue
  31. 251
      pages/public/login.vue
  32. 5
      pages/task/search.vue
  33. 5
      pages/task/tasklist.vue
  34. BIN
      static/img/code-icon.png
  35. BIN
      static/img/phone-icon.png
  36. 1
      wsl.txt

11
App.vue

@ -55,16 +55,7 @@
}); });
}, },
onShow: function(e) { onShow: function() {
console.log(e.query.code)
if(e && e.query.code){ //h5code
let code = e.query.code
this.$queue.setData('wxCode', code);
}
if(e && e.query.latng){ //h5
this.$queue.setData('latH', e.query.latng.split(',')[0]);
this.$queue.setData('lngH', e.query.latng.split(',')[1]);
}
}, },
onHide: function() {} onHide: function() {}
}; };

4
common/config.js

@ -1,6 +1,4 @@
// const ROOTPATH1 = "http://10.11.32.109:8891/sqx_fast"; const ROOTPATH1 = "https://bwc.xianmxkj.com/sqx_fast";
// const ROOTPATH1 = "http://10.11.32.107:8891/sqx_fast";
const ROOTPATH1 = "http://waimai.admin.service.yiqihuiju.com/sqx_fast";
const ROOTPATH = "https://bwc.xianmxkj.com/sqx_fast"; const ROOTPATH = "https://bwc.xianmxkj.com/sqx_fast";
module.exports = { module.exports = {
APIHOST: ROOTPATH, APIHOST: ROOTPATH,

139
common/jweixin.js

@ -1,139 +0,0 @@
var jweixin = require('jweixin-module')
const userId = uni.getStorageSync('userId');
console.log(userId,'userId')
import HttpRequest from '../common/httpRequest'
export default {
//判断是否在微信中
isWechat: function () {
var ua = window.navigator.userAgent.toLowerCase();
if (ua.match(/micromessenger/i) == 'micromessenger') {
// console.log(‘是微信客户端‘)
return true;
} else {
// console.log(‘不是微信客户端‘)
return false;
}
},
//初始化sdk配置
initJssdkShare: function (callback, url) {
HttpRequest.getT('/appLogin/jsapiInit',{url: url}).then((result)=>{
if(result.code == 0){
jweixin.config({
debug: false,
appId: result.appId,
timestamp: result.timestamp,
nonceStr: result.nonceStr,
signature: result.signature,
jsApiList: [
'chooseWXPay',
'checkJsApi',
'updateTimelineShareData',
'updateAppMessageShareData',
'getLocation'
]
});
if (callback) {
callback(result);
}
}
})
},
share: function (data, url) {
url = url ? url : window.location.href;
console.log("url:" + url)
if (!this.isWechat()) {
uni.showToast({
title: '不在微信客户端',
icon: 'none'
})
return;
}
//每次都需要重新初始化配置,才可以进行分享
this.initJssdkShare(function (signData) {
jweixin.ready(function () {
var shareData = {
title: data && data.title ? data.title : signData.site_name,
desc: data && data.desc ? data.desc : signData.site_description,
link: url,
imgUrl: data && data.img ? data.img : signData.site_logo,
success: function (res) {
// 分享后的一些操作,比如分享统计等等
},
cancel: function (res) {}
};
//分享给朋友接口
jweixin.updateAppMessageShareData(shareData);
//分享到朋友圈接口
// jweixin.updateTimelineShareData(shareData);
});
}, url)
},
wxChatWebPay: function (url) {
if (!this.isWechat()) {
uni.showToast({
title: '不在微信客户端',
icon: 'none'
})
return;
}
return new Promise((resolve,reject)=>{
//每次都需要重新初始化配置
this.initJssdkShare(function () {
jweixin.ready(function () {
HttpRequest.postT('/api/order/wxPayMember?userId=' + userId + '&type=3').then((orderInfo)=>{
jweixin.chooseWXPay({
nonceStr: orderInfo.noncestr,
timestamp: orderInfo.timestamp,
package: orderInfo.package,
signType: orderInfo.signType,
paySign: orderInfo.sign,
success: (res) => {
console.log('支付成功')
resolve(res)
},
fail: (res)=> {
reject(res)
console.log('支付失败')
},
cancel: (res)=> {
resolve(res)
console.log('取消支付')
}
})
})
});
},url)
})
},
wxGetLocation: function(url){
return new Promise((resolve,reject)=>{
if (!this.isWechat()) {
uni.showModal({
title: '提示!',
content: '请在微信客户端内打开',
showCancel: false
})
uni.hideLoading()
return
reject(res)
}
//每次都需要重新初始化配置
this.initJssdkShare(function () {
jweixin.ready(function () {
jweixin.getLocation({
type: 'wgs84',
success: function (res) {
console.log('jssdk获取的位置:',res.longitude,res.latitude)
resolve(res)
},
cancel: function (res) {
reject(res)
alert('您已禁止获取位置信息')
}
});
});
},url)
})
}
}

2
components/wm-poster/wm-posters.vue

@ -24,7 +24,7 @@
}, },
Title: { // Title: { //
Type: String, Type: String,
default: '惠聚' default: '省钱兄霸王餐'
}, },
TitleColor: { // TitleColor: { //
Type: String, Type: String,

5
main.js

@ -27,16 +27,11 @@ Vue.config.productionTip = false
Vue.prototype.$Request = HttpRequest; Vue.prototype.$Request = HttpRequest;
Vue.prototype.$queue = queue; Vue.prototype.$queue = queue;
Vue.prototype.$WechatUrl = 'http://waimai.admin.service.yiqihuiju.com';
Vue.prototype.$Sysconf = HttpRequest.config; Vue.prototype.$Sysconf = HttpRequest.config;
Vue.prototype.$SysCache = HttpCache; Vue.prototype.$SysCache = HttpCache;
Vue.mixin(share) Vue.mixin(share)
App.mpType = 'app'; App.mpType = 'app';
import {VueJsonp} from 'vue-jsonp'
Vue.use(VueJsonp)
const app = new Vue({ const app = new Vue({
...App ...App

20
manifest.json

@ -1,5 +1,5 @@
{ {
"name" : "惠聚", "name" : "省钱兄霸王餐",
"appid" : "__UNI__uni_sqx", "appid" : "__UNI__uni_sqx",
"description" : "", "description" : "",
"versionName" : "1.0.6", "versionName" : "1.0.6",
@ -165,21 +165,7 @@
"enable" : false "enable" : false
}, },
"h5" : { "h5" : {
"title" : "惠聚", "title" : "省钱兄霸王餐",
"domain" : "http://waimai.admin.service.yiqihuiju.com", "domain" : "https://bwc.xianmxkj.com"
"router" : {
"mode" : "history"
},
"devServer" : {
"https" : false,
"disableHostCheck" : true
},
"sdkConfigs" : {
"maps" : {
"qqmap" : {
"key" : "LH3BZ-NYN62-2SIUW-CGKY5-K5MXT-FWFOI"
}
}
}
} }
} }

27
mixins/SendVerifyCode.js

@ -1,27 +0,0 @@
export default {
data() {
return {
disabled: false,
text: "获取验证码"
};
},
methods: {
sendCode() {
if (this.disabled) return;
this.disabled = true;
let n = 60;
this.text = "剩余 " + n + "s";
const run = setInterval(() => {
n = n - 1;
if (n < 0) {
clearInterval(run);
}
this.text = "剩余 " + n + "s";
if (this.text < "剩余 " + 0 + "s") {
this.disabled = false;
this.text = "重新获取";
}
}, 1000);
}
}
};

30
node_modules/jweixin-module/README.md generated vendored

@ -1,30 +0,0 @@
# jweixin-module
微信JS-SDK
## 安装
### NPM
```shell
npm install jweixin-module --save
```
### UMD
```http
https://unpkg.com/jweixin-module/out/index.js
```
## 使用
```js
var jweixin = require('jweixin-module')
jweixin.ready(function(){
// TODO
});
```
## 完整API
>[微信JS-SDK说明文档](https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421141115)

1
node_modules/jweixin-module/lib/index.js generated vendored

File diff suppressed because one or more lines are too long

54
node_modules/jweixin-module/package.json generated vendored

@ -1,54 +0,0 @@
{
"_from": "jweixin-module",
"_id": "jweixin-module@1.6.0",
"_inBundle": false,
"_integrity": "sha1-Sn6mFAg+PJw/SeL9wruILPpY380=",
"_location": "/jweixin-module",
"_phantomChildren": {},
"_requested": {
"type": "tag",
"registry": true,
"raw": "jweixin-module",
"name": "jweixin-module",
"escapedName": "jweixin-module",
"rawSpec": "",
"saveSpec": null,
"fetchSpec": "latest"
},
"_requiredBy": [
"#USER",
"/"
],
"_resolved": "https://registry.nlark.com/jweixin-module/download/jweixin-module-1.6.0.tgz",
"_shasum": "4a7ea614083e3c9c3f49e2fdc2bb882cfa58dfcd",
"_spec": "jweixin-module",
"_where": "F:\\惠聚h5\\huiju-user",
"author": {
"name": "Shengqiang Guo"
},
"bugs": {
"url": "https://github.com/zhetengbiji/jweixin-module/issues"
},
"bundleDependencies": false,
"deprecated": false,
"description": "微信JS-SDK",
"devDependencies": {},
"homepage": "https://github.com/zhetengbiji/jweixin-module#readme",
"keywords": [
"wxjssdk",
"weixin",
"jweixin",
"wechat",
"jssdk",
"wx"
],
"license": "ISC",
"main": "lib/index.js",
"name": "jweixin-module",
"repository": {
"type": "git",
"url": "git+https://github.com/zhetengbiji/jweixin-module.git"
},
"scripts": {},
"version": "1.6.0"
}

21
node_modules/vue-jsonp/LICENSE generated vendored

@ -1,21 +0,0 @@
MIT License
Copyright (c) 2020 LancerComet
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

153
node_modules/vue-jsonp/README.md generated vendored

@ -1,153 +0,0 @@
# Vue-jsonp
[![VueJsonp](https://github.com/LancerComet/vue-jsonp/workflows/Test/badge.svg)](https://github.com/LancerComet/vue-jsonp/actions)
A tiny library for handling JSONP request.
## Quick Start
As Vue plugin:
```ts
import { VueJsonp } from 'vue-jsonp'
// Vue Plugin.
Vue.use(VueJsonp)
// Now you can use this.$jsonp in Vue components.
const vm = new Vue()
vm.$jsonp('/some-jsonp-url', {
myCustomUrlParam: 'veryNice'
})
```
Use function directly:
```ts
import { jsonp } from 'vue-jsonp'
jsonp('/some-jsonp-url', {
myCustomUrlParam: 'veryNice'
})
```
## Send data and set query & function name
### Send data
```ts
// The request url will be "/some-jsonp-url?name=LancerComet&age=100&callback=jsonp_{RANDOM_STR}".
jsonp('/some-jsonp-url', {
name: 'LancerComet',
age: 100
})
```
### Custom query & function name
The url uniform is `/url?{callbackQuery}={callbackName}&...`, the default is `/url?callback=jsonp_{RANDOM_STRING}&...`.
And you can change it like this:
```ts
// The request url will be "/some-jsonp-url?name=LancerComet&age=100&cb=jsonp_func".
jsonp('/some-jsonp-url', {
callbackQuery: 'cb',
callbackName: 'jsonp_func',
name: 'LancerComet',
age: 100
})
```
## Module exports
- `VueJsonp: PluginObject<never>`
- `jsonp<T>: (url: string, param?: IJsonpParam, timeout?: number) => Promise<T>`
## API
### IJsonpParam
IJsonpParam is the type of param for jsonp function.
```ts
/**
* JSONP parameter declaration.
*/
interface IJsonpParam {
/**
* Callback query name.
* This param is used to define the query name of the callback function.
*
* @example
* // The request url will be "/some-url?myCallback=jsonp_func&myCustomUrlParam=veryNice"
* jsonp('/some-url', {
* callbackQuery: 'myCallback',
* callbackName: 'jsonp_func',
* myCustomUrlParam: 'veryNice'
* })
*
* @default callback
*/
callbackQuery?: string
/**
* Callback function name.
* This param is used to define the jsonp function name.
*
* @example
* // The request url will be "/some-url?myCallback=jsonp_func&myCustomUrlParam=veryNice"
* jsonp('/some-url', {
* callbackQuery: 'myCallback',
* callbackName: 'jsonp_func',
* myCustomUrlParam: 'veryNice'
* })
*
* @default jsonp_ + randomStr()
*/
callbackName?: string
/**
* Custom data.
*/
[key: string]: any
}
```
## Example
```ts
import Vue from 'vue'
import { VueJsonp } from 'vue-jsonp'
Vue.use(VueJsonp)
const vm = new Vue()
const { code, data, message } = await vm.$jsonp<{
code: number,
message: string,
data: {
id: number,
nickname: string
}
}>('/my-awesome-url', {
name: 'MyName', age: 20
})
assert(code === 0)
assert(message === 'ok')
assert(data.id === 1)
assert(data.nickname === 'John Smith')
```
```ts
import { jsonp } from 'vue-jsonp'
const result = await jsonp<string>('/my-awesome-url')
assert(result === 'such a jsonp')
```
## License
MIT

73
node_modules/vue-jsonp/dist/index.d.ts generated vendored

@ -1,73 +0,0 @@
/**
* Vue Jsonp.
* # Carry Your World #
*
* @author: LancerComet
* @license: MIT
*/
import { PluginObject } from 'vue/types/plugin';
declare module 'vue/types/vue' {
interface Vue {
$jsonp: typeof jsonp;
}
}
/**
* Vue JSONP.
*/
declare const VueJsonp: PluginObject<never>;
/**
* JSONP function.
*
* @param { string } url Target URL address.
* @param { IJsonpParam } param Querying params object.
* @param { number } timeout Timeout setting (ms).
*
* @example
* jsonp('/url', {
* callbackQuery: ''
* callbackName: '',
* name: 'LancerComet',
* age: 26
* }, 1000)
*/
declare function jsonp<T = any>(url: string, param?: IJsonpParam, timeout?: number): Promise<T>;
export { VueJsonp, jsonp };
/**
* JSONP parameter declaration.
*/
interface IJsonpParam {
/**
* Callback query name.
* This param is used to define the query name of the callback function.
*
* @example
* // The request url will be "/some-url?myCallback=jsonp_func&myCustomUrlParam=veryNice"
* jsonp('/some-url', {
* callbackQuery: 'myCallback',
* callbackName: 'jsonp_func',
* myCustomUrlParam: 'veryNice'
* })
*
* @default callback
*/
callbackQuery?: string;
/**
* Callback function name.
* This param is used to define the jsonp function name.
*
* @example
* // The request url will be "/some-url?myCallback=jsonp_func&myCustomUrlParam=veryNice"
* jsonp('/some-url', {
* callbackQuery: 'myCallback',
* callbackName: 'jsonp_func',
* myCustomUrlParam: 'veryNice'
* })
*
* @default jsonp_ + randomStr()
*/
callbackName?: string;
/**
* Custom data.
*/
[key: string]: any;
}

8
node_modules/vue-jsonp/dist/index.esm.js generated vendored

@ -1,8 +0,0 @@
function e(t,n){t=t.replace(/=/g,"");var o=[];switch(n.constructor){case String:case Number:case Boolean:o.push(encodeURIComponent(t)+"="+encodeURIComponent(n));break;case Array:n.forEach((function(n){o=o.concat(e(t+"[]=",n))}));break;case Object:Object.keys(n).forEach((function(r){var a=n[r];o=o.concat(e(t+"["+r+"]",a))}))}return o}function t(e){var n=[];return e.forEach((function(e){"string"==typeof e?n.push(e):n=n.concat(t(e))})),n}
/**
* Vue Jsonp.
* # Carry Your World #
*
* @author: LancerComet
* @license: MIT
*/var n={install:function(e){e.prototype.$jsonp=o}};function o(n,o,r){if(void 0===o&&(o={}),"string"!=typeof n)throw new Error('[Vue-jsonp] Type of param "url" is not string.');if("object"!=typeof o||!o)throw new Error("[Vue-jsonp] Invalid params, should be an object.");return r="number"==typeof r?r:5e3,new Promise((function(a,c){var u="string"==typeof o.callbackQuery?o.callbackQuery:"callback",i="string"==typeof o.callbackName?o.callbackName:"jsonp_"+(Math.floor(1e5*Math.random())*Date.now()).toString(16);o[u]=i,delete o.callbackQuery,delete o.callbackName;var s=[];Object.keys(o).forEach((function(t){s=s.concat(e(t,o[t]))}));var l=t(s).join("&"),f=function(){p(),clearTimeout(m),c({status:400,statusText:"Bad Request"})},p=function(){b.removeEventListener("error",f)},d=function(){document.body.removeChild(b),delete window[i]},m=null;r>-1&&(m=setTimeout((function(){p(),d(),c({statusText:"Request Timeout",status:408})}),r)),window[i]=function(e){clearTimeout(m),p(),d(),a(e)};var b=document.createElement("script");b.addEventListener("error",f),b.src=n+(/\?/.test(n)?"&":"?")+l,document.body.appendChild(b)}))}export{n as VueJsonp,o as jsonp};

8
node_modules/vue-jsonp/dist/index.js generated vendored

@ -1,8 +0,0 @@
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).VueJsonp={})}(this,(function(e){"use strict";function t(e,o){e=e.replace(/=/g,"");var n=[];switch(o.constructor){case String:case Number:case Boolean:n.push(encodeURIComponent(e)+"="+encodeURIComponent(o));break;case Array:o.forEach((function(o){n=n.concat(t(e+"[]=",o))}));break;case Object:Object.keys(o).forEach((function(r){var c=o[r];n=n.concat(t(e+"["+r+"]",c))}))}return n}function o(e){var t=[];return e.forEach((function(e){"string"==typeof e?t.push(e):t=t.concat(o(e))})),t}
/**
* Vue Jsonp.
* # Carry Your World #
*
* @author: LancerComet
* @license: MIT
*/var n={install:function(e){e.prototype.$jsonp=r}};function r(e,n,r){if(void 0===n&&(n={}),"string"!=typeof e)throw new Error('[Vue-jsonp] Type of param "url" is not string.');if("object"!=typeof n||!n)throw new Error("[Vue-jsonp] Invalid params, should be an object.");return r="number"==typeof r?r:5e3,new Promise((function(c,a){var i="string"==typeof n.callbackQuery?n.callbackQuery:"callback",s="string"==typeof n.callbackName?n.callbackName:"jsonp_"+(Math.floor(1e5*Math.random())*Date.now()).toString(16);n[i]=s,delete n.callbackQuery,delete n.callbackName;var u=[];Object.keys(n).forEach((function(e){u=u.concat(t(e,n[e]))}));var f=o(u).join("&"),l=function(){p(),clearTimeout(b),a({status:400,statusText:"Bad Request"})},p=function(){m.removeEventListener("error",l)},d=function(){document.body.removeChild(m),delete window[s]},b=null;r>-1&&(b=setTimeout((function(){p(),d(),a({statusText:"Request Timeout",status:408})}),r)),window[s]=function(e){clearTimeout(b),p(),d(),c(e)};var m=document.createElement("script");m.addEventListener("error",l),m.src=e+(/\?/.test(e)?"&":"?")+f,document.body.appendChild(m)}))}e.VueJsonp=n,e.jsonp=r,Object.defineProperty(e,"__esModule",{value:!0})}));

20
node_modules/vue-jsonp/dist/utils/index.d.ts generated vendored

@ -1,20 +0,0 @@
/**
* Generate random string.
*
* @return { string }
*/
declare function randomStr(): string;
/**
* Format params into querying string.
*
* @return {string[]}
*/
declare function formatParams(queryKey: string, value: any): string[];
/**
* Flat querys.
*
* @param {string[] | (string[])[]} array
* @returns
*/
declare function flatten(array: string[] | (string[])[]): string[];
export { formatParams, flatten, randomStr };

80
node_modules/vue-jsonp/package.json generated vendored

@ -1,80 +0,0 @@
{
"_from": "vue-jsonp",
"_id": "vue-jsonp@2.0.0",
"_inBundle": false,
"_integrity": "sha1-O/rFa7cpQaJRHBHhoSO4dvA0J/c=",
"_location": "/vue-jsonp",
"_phantomChildren": {},
"_requested": {
"type": "tag",
"registry": true,
"raw": "vue-jsonp",
"name": "vue-jsonp",
"escapedName": "vue-jsonp",
"rawSpec": "",
"saveSpec": null,
"fetchSpec": "latest"
},
"_requiredBy": [
"#USER",
"/"
],
"_resolved": "https://registry.nlark.com/vue-jsonp/download/vue-jsonp-2.0.0.tgz",
"_shasum": "3bfac56bb72941a2511c11e1a123b876f03427f7",
"_spec": "vue-jsonp",
"_where": "F:\\惠聚h5\\huiju-user",
"author": {
"name": "LancerComet",
"email": "chw644@hotmail.com"
},
"bugs": {
"url": "https://github.com/LancerComet/vue-jsonp/issues"
},
"bundleDependencies": false,
"deprecated": false,
"description": "A tiny library for handling JSONP request.",
"devDependencies": {
"@types/expect-puppeteer": "^4.4.3",
"@types/jest": "^26.0.14",
"@types/jest-environment-puppeteer": "^4.4.0",
"@types/puppeteer": "^3.0.2",
"jest": "^26.4.2",
"jest-puppeteer": "^4.4.0",
"puppeteer": "^5.3.1",
"rollup": "^2.28.2",
"rollup-plugin-cleanup": "^3.2.1",
"rollup-plugin-delete": "^2.0.0",
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-typescript2": "^0.27.3",
"ts-jest": "^26.4.1",
"tslint": "^6.1.3",
"typescript": "^4.0.3",
"vue": "^2.6.12"
},
"files": [
"dist/",
"index.d.ts",
"README.md"
],
"homepage": "https://github.com/LancerComet/vue-jsonp#readme",
"keywords": [
"Vue",
"JSONP"
],
"license": "MIT",
"main": "./dist/index.js",
"module": "./dist/index.esm.js",
"name": "vue-jsonp",
"repository": {
"type": "git",
"url": "git+https://github.com/LancerComet/vue-jsonp.git"
},
"scripts": {
"build": "rollup -c",
"prepublish": "npm run test",
"pretest": "npm run build",
"preversion": "npm run test",
"test": "jest"
},
"version": "2.0.0"
}

15
package-lock.json generated

@ -1,16 +1,3 @@
{ {
"requires": true, "lockfileVersion": 1
"lockfileVersion": 1,
"dependencies": {
"jweixin-module": {
"version": "1.6.0",
"resolved": "https://registry.nlark.com/jweixin-module/download/jweixin-module-1.6.0.tgz",
"integrity": "sha1-Sn6mFAg+PJw/SeL9wruILPpY380="
},
"vue-jsonp": {
"version": "2.0.0",
"resolved": "https://registry.nlark.com/vue-jsonp/download/vue-jsonp-2.0.0.tgz",
"integrity": "sha1-O/rFa7cpQaJRHBHhoSO4dvA0J/c="
}
}
} }

5
pages.json

@ -424,11 +424,8 @@
} }
], ],
"globalStyle": { "globalStyle": {
// #ifdef H5
"navigationStyle": "custom",
// #endif
"navigationBarTextStyle": "black", "navigationBarTextStyle": "black",
"navigationBarTitleText": "惠聚", "navigationBarTitleText": "省钱兄霸王餐",
"navigationBarBackgroundColor": "#FFFFFF", "navigationBarBackgroundColor": "#FFFFFF",
"backgroundColor": "#FFFFFF" "backgroundColor": "#FFFFFF"
}, },

85
pages/index/index.vue

@ -72,7 +72,6 @@
<script> <script>
import RenDropdownFilter from '@/components/ren-dropdown-filter/ren-dropdown-filter.vue' import RenDropdownFilter from '@/components/ren-dropdown-filter/ren-dropdown-filter.vue'
import taskHomeList from "@/components/mask/task-home-list1.vue" import taskHomeList from "@/components/mask/task-home-list1.vue"
import jweixin from '@/common/jweixin.js'
var QQMapWX = require('@/js_sdk/qqmap-wx-jssdk1.2/qqmap-wx-jssdk.js'); var QQMapWX = require('@/js_sdk/qqmap-wx-jssdk1.2/qqmap-wx-jssdk.js');
var qqmapsdk; var qqmapsdk;
export default { export default {
@ -83,7 +82,7 @@
data() { data() {
return { return {
localCampus: '未知', localCampus: '未知',
city: '定位中..', city: '',
meituanList: {}, meituanList: {},
elemeList: {}, elemeList: {},
banners: [], banners: [],
@ -137,17 +136,19 @@
if (e.userByinvitationId) { if (e.userByinvitationId) {
this.$queue.setData('userByinvitationId', e.userByinvitationId); this.$queue.setData('userByinvitationId', e.userByinvitationId);
} }
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN
if (e.scene) { if (e.scene) {
const scene = decodeURIComponent(e.scene); const scene = decodeURIComponent(e.scene);
this.$queue.setData('userByinvitationId', scene.split(',')[0]); this.$queue.setData('userByinvitationId', scene.split(',')[0]);
} }
// #endif // #endif
// #ifdef MP-WEIXIN
// API // API
qqmapsdk = new QQMapWX({ qqmapsdk = new QQMapWX({
key: 'LH3BZ-NYN62-2SIUW-CGKY5-K5MXT-FWFOI' key: 'J5FBZ-XCUKI-UFEG2-5KOJJ-XD4L3-KNFNG'
}); });
// #ifdef MP-WEIXIN
that.authorizationLocation(); that.authorizationLocation();
// #endif // #endif
this.getBannerList(); this.getBannerList();
@ -212,7 +213,6 @@
let that = this; let that = this;
var city = this.$queue.getData('city'); var city = this.$queue.getData('city');
var localCampus = this.$queue.getData('localCampus'); var localCampus = this.$queue.getData('localCampus');
console.log(localCampus)
if (city && localCampus) { if (city && localCampus) {
console.log(city) console.log(city)
this.latitude = this.$queue.getData('latitude'); this.latitude = this.$queue.getData('latitude');
@ -223,17 +223,13 @@
this.page = 1; this.page = 1;
this.getHaoDianTuiJian1(); this.getHaoDianTuiJian1();
this.getHaoDianTuiJian(); this.getHaoDianTuiJian();
} else{
// #ifdef H5
that.initMyPosition();
// #endif
} }
let userId = this.$queue.getData('userId'); let userId = this.$queue.getData('userId');
if (userId) { if (userId) {
// //
if (!uni.getStorageSync('sendindexMsg')) { if (!uni.getStorageSync('sendindexMsg')) {
// this.openMsg() this.openMsg()
} }
} }
}, },
@ -476,23 +472,9 @@
var that = this; var that = this;
qqmapsdk.reverseGeocoder({ qqmapsdk.reverseGeocoder({
location: latitude + ',' + longitude || '', location: latitude + ',' + longitude || '',
output: 'jsonp',
success: function(res) { // success: function(res) { //
if (res.status == 0) { if (res.status == 0) {
console.log(res) console.log(res)
this.setLocation(latitude, longitude, res)
}
},
fail: function(error) {
console.error(error);
},
complete: function(res) {
console.log(res);
}
})
},
setLocation(latitude,longitude,res){
var that = this;
that.authorize = false; that.authorize = false;
var res = res.result; var res = res.result;
that.latitude = latitude; that.latitude = latitude;
@ -505,35 +487,13 @@
that.localCampus = res.address_reference.landmark_l2.title; that.localCampus = res.address_reference.landmark_l2.title;
that.getHaoDianTuiJian1(); that.getHaoDianTuiJian1();
that.getHaoDianTuiJian(); that.getHaoDianTuiJian();
},
//
wxGetLocation(){
var that = this;
var pageUrl = encodeURIComponent(window.location.href);
jweixin.wxGetLocation(pageUrl).then((result)=>{
let str = `output=jsonp&location=${result.latitude},${result.longitude}&key=LH3BZ-NYN62-2SIUW-CGKY5-K5MXT-FWFOI`
this.$jsonp('https://apis.map.qq.com/ws/geocoder/v1/?'+str).then(res=>{
uni.hideLoading();
if(res.status == 0){
console.log(res)
that.setLocation(result.latitude, result.longitude, res)
} }
})
})
}, },
//h5 fail: function(error) {
loAcquire(longitude,latitude){ console.error(error);
let that = this; },
uni.showLoading({ complete: function(res) {
title: '加载中', console.log(res);
mask:true
});
let str = `output=jsonp&key=J5FBZ-XCUKI-UFEG2-5KOJJ-XD4L3-KNFNG&location=${longitude},${latitude}`
this.$jsonp('https://apis.map.qq.com/ws/geocoder/v1/?'+str,{}).then(res=>{
uni.hideLoading();
console.log(res)
if(res.status == 0){
that.setLocation(latitude, longitude, res)
} }
}) })
}, },
@ -545,6 +505,7 @@
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN
uni.openSetting({ uni.openSetting({
success(res3) { success(res3) {
console.log(res3)
if (res3.authSetting[ if (res3.authSetting[
'scope.userLocation' 'scope.userLocation'
]) { ]) {
@ -560,28 +521,13 @@
}, },
initMyPosition() { initMyPosition() {
let that = this; let that = this;
if(jweixin.isWechat()){
that.wxGetLocation()
} else{
uni.getLocation({ uni.getLocation({
type: 'gcj02', type: 'gcj02',
altitude: true, altitude: true,
success: res => { success: res => {
// #ifdef MP-WEIXIN that.initLocation(res.latitude, res.longitude);
that.initLocation(res.latitude, res.longitude)
// #endif
// #ifdef H5
that.loAcquire(res.latitude, res.longitude)
// #endif
},
fail: (res) => {
console.log(res)
},
complete: (res) => {
console.log(res)
} }
}); });
}
}, },
authorizationLocation: function() { authorizationLocation: function() {
let that = this; let that = this;
@ -697,14 +643,9 @@
}, },
goLogin() { goLogin() {
this.$queue.setData('href', '/pages/index/index'); this.$queue.setData('href', '/pages/index/index');
//#ifndef H5
uni.navigateTo({ uni.navigateTo({
url: '/pages/public/login' url: '/pages/public/login'
}); });
//#endif
//#ifdef H5
window.location.href = this.$WechatUrl + '/sqx_fast/appLogin/wechatLogin';
//#endif
}, },
navClick: function(res) { navClick: function(res) {
if (uni.getStorageSync('sendindexMsg')) { if (uni.getStorageSync('sendindexMsg')) {

55
pages/index/selectCampus.vue

@ -28,12 +28,9 @@
<script> <script>
import ZhToPinYin from '@/js_sdk/tui-zh-pinyin/tui-zh-pinyin.js'; import ZhToPinYin from '@/js_sdk/tui-zh-pinyin/tui-zh-pinyin.js';
import jweixin from '@/common/jweixin.js'
var QQMapWX = require('@/js_sdk/qqmap-wx-jssdk1.2/qqmap-wx-jssdk.js'); var QQMapWX = require('@/js_sdk/qqmap-wx-jssdk1.2/qqmap-wx-jssdk.js');
var qqmapsdk; var qqmapsdk;
// #ifdef MP-WEIXIN
var citySelector = requirePlugin('citySelector'); var citySelector = requirePlugin('citySelector');
// #endif
export default { export default {
data() { data() {
return { return {
@ -47,16 +44,11 @@
names: "", names: "",
dizhi: "" dizhi: ""
}, },
city: '未知' city: '西安'
} }
}, },
onLoad: function(options) { onLoad: function(options) {
const that = this; const that = this;
var city = this.$queue.getData("city")
console.log(this.$queue.getData("city"))
if (city != '') {
this.city = city
}
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN
// API // API
qqmapsdk = new QQMapWX({ qqmapsdk = new QQMapWX({
@ -69,7 +61,6 @@
} }
}, },
onShow() { onShow() {
//#ifdef MP-WEIXIN
const item = citySelector.getCity(); const item = citySelector.getCity();
if(item){ if(item){
citySelector.clearCity(); citySelector.clearCity();
@ -78,30 +69,11 @@
this.$queue.setData('city', item.name); this.$queue.setData('city', item.name);
this.$queue.setData('localCampus', item.name); this.$queue.setData('localCampus', item.name);
} }
//#endif
//#ifdef H5
let lat = this.$queue.getData("latH")
let lng = this.$queue.getData("lngH")
console.log(lat,'latlatlatlat')
if(lat){
let str = `output=jsonp&location=${lat},${lng}&key=LH3BZ-NYN62-2SIUW-CGKY5-K5MXT-FWFOI`
this.$jsonp('https://apis.map.qq.com/ws/geocoder/v1/?'+str).then(res=>{
if(res.status == 0){
console.log(res,'resresresresres')
this.latitude = res.result.location.lat;
this.longitude = res.result.location.lng;
this.weizhi.names = res.result.formatted_addresses.recommend;
this.weizhi.dizhi = res.result.address
this.city = res.result.address_component.city
this.$queue.setData('latitude', this.latitude);
this.$queue.setData('longitude', this.longitude);
this.$queue.setData('city', res.result.address_component.city);
this.$queue.setData('localCampus', res.result.formatted_addresses.recommend);
}
})
}
//#endif
var city = this.$queue.getData("city")
if (city != '') {
this.city = city
}
}, },
methods: { methods: {
gocity() { gocity() {
@ -118,14 +90,11 @@
}, },
saveAddress() { saveAddress() {
console.log("this.city____:" + this.city) console.log("this.city____:" + this.city)
console.log("this.this.weizhi.names:" + this.weizhi.names)
this.$queue.setData('latitude', this.latitude); this.$queue.setData('latitude', this.latitude);
this.$queue.setData('longitude', this.longitude); this.$queue.setData('longitude', this.longitude);
this.$queue.setData('city', this.city); this.$queue.setData('city', this.city);
// this.$queue.setData('localCampus', this.weizhi.names); this.$queue.setData('localCampus', this.weizhi.names);
uni.switchTab({ uni.navigateBack();
url: '/pages/index/index'
})
}, },
initLocation(latitude, longitude) { initLocation(latitude, longitude) {
var that = this; var that = this;
@ -153,7 +122,6 @@
}, },
dingwei() { dingwei() {
const that = this; const that = this;
//#ifdef MP-WEIXIN
uni.chooseLocation({ uni.chooseLocation({
success: function(res) { success: function(res) {
console.log(res) console.log(res)
@ -162,7 +130,7 @@
console.log('纬度:' + res.latitude); console.log('纬度:' + res.latitude);
console.log('经度:' + res.longitude); console.log('经度:' + res.longitude);
if (res.name && res.address) { if (res.name && res.address) {
// that.initLocation(res.latitude, res.longitude); that.initLocation(res.latitude, res.longitude);
that.latitude = res.latitude; that.latitude = res.latitude;
that.longitude = res.longitude; that.longitude = res.longitude;
that.weizhi.names = res.name; that.weizhi.names = res.name;
@ -172,12 +140,6 @@
} }
} }
}); });
//#endif
//#ifdef H5
var pageUrl = window.location.href;
var url1 = `https://apis.map.qq.com/tools/locpicker?search=1&type=0&backurl=${pageUrl}&key=LH3BZ-NYN62-2SIUW-CGKY5-K5MXT-FWFOI&referer=myapp`
location.href= url1;
//#endif
} }
} }
} }
@ -362,7 +324,6 @@
} }
.navLeft { .navLeft {
display: flex;
align-items: center; align-items: center;
width: 20%; width: 20%;
position: absolute; position: absolute;

5
pages/index/taskDetail.vue

@ -741,14 +741,9 @@
}, },
goLogin() { goLogin() {
this.$queue.setData('href', '/pages/index/taskDetail?helpOrderId=' + this.helpOrderId); this.$queue.setData('href', '/pages/index/taskDetail?helpOrderId=' + this.helpOrderId);
//#ifndef H5
uni.navigateTo({ uni.navigateTo({
url: '/pages/public/login' url: '/pages/public/login'
}); });
//#endif
//#ifdef H5
window.location.href = 'http://waimai.admin.service.yiqihuiju.com/sqx_fast/appLogin/wechatLogin';
//#endif
}, },
} }
} }

5
pages/index/tuijianList.vue

@ -128,14 +128,9 @@
}) })
}, },
goLogin() { goLogin() {
//#ifndef H5
uni.navigateTo({ uni.navigateTo({
url: '/pages/public/login' url: '/pages/public/login'
}); });
//#endif
//#ifdef H5
window.location.href = 'http://waimai.admin.service.yiqihuiju.com/sqx_fast/appLogin/wechatLogin';
//#endif
}, },
goDetail(nav) { goDetail(nav) {
uni.navigateTo({ uni.navigateTo({

5
pages/my/channelshop.vue

@ -38,14 +38,9 @@
methods: { methods: {
goLogin() { goLogin() {
this.$queue.setData('href', '/pages/index/index'); this.$queue.setData('href', '/pages/index/index');
//#ifndef H5
uni.navigateTo({ uni.navigateTo({
url: '/pages/public/login' url: '/pages/public/login'
}); });
//#endif
//#ifdef H5
window.location.href = 'http://waimai.admin.service.yiqihuiju.com/sqx_fast/appLogin/wechatLogin';
//#endif
}, },
clickItem: function(options) { clickItem: function(options) {
let token = this.$queue.getData('token'); let token = this.$queue.getData('token');

17
pages/my/index.vue

@ -271,7 +271,7 @@
export default { export default {
data() { data() {
return { return {
avatar: "https://download.cyjyyjy.com/huijuLogo.png", avatar: "/static/img/logo.png",
member: 0, member: 0,
total: 0, total: 0,
SumMoney: 0, SumMoney: 0,
@ -329,6 +329,8 @@
let avatar = this.$queue.getData('avatar'); let avatar = this.$queue.getData('avatar');
if (avatar && avatar !== 'undefined') { if (avatar && avatar !== 'undefined') {
this.avatar = avatar; this.avatar = avatar;
} else {
this.avatar = '/static/img/logo.png';
} }
let nickName = this.$queue.getData('nickName'); let nickName = this.$queue.getData('nickName');
if (nickName && nickName !== 'undefined') { if (nickName && nickName !== 'undefined') {
@ -352,9 +354,7 @@
// //
if (this.showModal) { if (this.showModal) {
//#ifdef MP-WEIXIN
this.openMsg() this.openMsg()
//#endif
} }
} }
}, },
@ -659,14 +659,9 @@
}, },
goLogin() { goLogin() {
this.$queue.setData('href', '/pages/my/index'); this.$queue.setData('href', '/pages/my/index');
//#ifndef H5
uni.navigateTo({ uni.navigateTo({
url: '/pages/public/login' url: '/pages/public/login'
}); });
//#endif
//#ifdef H5
window.location.href = this.$WechatUrl + '/sqx_fast/appLogin/wechatLogin';
//#endif
}, },
//退 //退
loginOut() { loginOut() {
@ -708,15 +703,15 @@
.user-bj { .user-bj {
width: 100%; width: 100%;
// height: 370upx; height: 370upx;
z-index: 5; z-index: 5;
} }
.user-box { .user-box {
width: 100%; width: 100%;
// height: 250upx; height: 250upx;
z-index: 15; z-index: 15;
padding: 30upx 30upx 0; padding: 150upx 30upx 0;
display: flex; display: flex;
align-items: center; align-items: center;

33
pages/my/myVIP.vue

@ -97,7 +97,6 @@
</template> </template>
<script> <script>
import jweixin from '@/common/jweixin.js'
export default { export default {
data() { data() {
return { return {
@ -167,38 +166,18 @@
}); });
}, },
goLogin() { goLogin() {
//#ifndef H5
uni.navigateTo({ uni.navigateTo({
url: '/pages/public/login' url: '/pages/public/login'
}); });
//#endif
//#ifdef H5
window.location.href = 'http://waimai.admin.service.yiqihuiju.com/sqx_fast/appLogin/wechatLogin';
//#endif
}, },
btns() { btns() {
var that = this;
let token = this.$queue.getData('token'); let token = this.$queue.getData('token');
if (token) { if (token) {
let userId = this.$queue.getData('userId'); let userId = this.$queue.getData('userId');
uni.showLoading({ uni.showLoading({
title: '支付中' title: '支付中'
}); });
//#ifdef MP-WEIXIN this.$Request.postT('/api/order/wxPayMember?userId=' + userId).then(res => {
this.$Request.postT('/api/order/wxPayMember?userId=' + userId + '&type=3').then(res => {
this.wxPay(res)
uni.hideLoading();
})
//#endif
//#ifdef H5
this.h5Pay()
//#endif
} else {
uni.hideLoading();
this.goLogin();
}
},
wxPay(res){
uni.requestPayment({ uni.requestPayment({
provider: 'wxpay', provider: 'wxpay',
timeStamp: res.timestamp, timeStamp: res.timestamp,
@ -217,15 +196,13 @@
}, },
fail: function(err) { fail: function(err) {
uni.hideLoading(); uni.hideLoading();
that.$queue.showToast('支付失败'); this.$queue.showToast('支付失败');
} }
}); });
},
h5Pay(){
var pageUrl = encodeURIComponent(window.location.href);
jweixin.wxChatWebPay(pageUrl).then((result)=>{
uni.hideLoading();
}) })
} else {
this.goLogin();
}
}, },
} }
} }

5
pages/my/mychannel.vue

@ -42,14 +42,9 @@
} }
}, },
goLogin() { goLogin() {
//#ifndef H5
uni.navigateTo({ uni.navigateTo({
url: '/pages/public/login' url: '/pages/public/login'
}); });
//#endif
//#ifdef H5
window.location.href = 'http://waimai.admin.service.yiqihuiju.com/sqx_fast/appLogin/wechatLogin';
//#endif
} }
} }
} }

5
pages/my/shareFriends.vue

@ -173,14 +173,9 @@
this.modalName = 'Image'; this.modalName = 'Image';
}, },
goLogin() { goLogin() {
//#ifndef H5
uni.navigateTo({ uni.navigateTo({
url: '/pages/public/login' url: '/pages/public/login'
}); });
//#endif
//#ifdef H5
window.location.href = 'http://waimai.admin.service.yiqihuiju.com/sqx_fast/appLogin/wechatLogin';
//#endif
}, },
showModal() { showModal() {
let token = this.$queue.getData('token'); let token = this.$queue.getData('token');

5
pages/my/teamList.vue

@ -49,14 +49,9 @@
} }
}, },
goLogin() { goLogin() {
//#ifndef H5
uni.navigateTo({ uni.navigateTo({
url: '/pages/public/login' url: '/pages/public/login'
}); });
//#endif
//#ifdef H5
window.location.href = 'http://waimai.admin.service.yiqihuiju.com/sqx_fast/appLogin/wechatLogin';
//#endif
} }
} }
} }

10
pages/order/index.vue

@ -117,7 +117,7 @@
this.page = 1; this.page = 1;
this.getList(); this.getList();
} else { } else {
// this.goLogin(); this.goLogin();
} }
}, },
methods: { methods: {
@ -203,14 +203,9 @@
this.getList(); this.getList();
}, },
goLogin() { goLogin() {
//#ifndef H5
uni.navigateTo({ uni.navigateTo({
url: '/pages/public/login' url: '/pages/public/login'
}); });
//#endif
//#ifdef H5
window.location.href = 'http://waimai.admin.service.yiqihuiju.com/sqx_fast/appLogin/wechatLogin';
//#endif
}, },
goDetail(id) { goDetail(id) {
var latitude = this.$queue.getData('latitude') var latitude = this.$queue.getData('latitude')
@ -362,6 +357,7 @@
.main { .main {
padding: 106upx 20upx 0; padding: 106upx 20upx 0;
.card-box-order { .card-box-order {
.list-item { .list-item {
background: #FFFFFF; background: #FFFFFF;
@ -760,7 +756,7 @@
/* #endif */ /* #endif */
/* #ifdef H5 */ /* #ifdef H5 */
position: fixed; position: fixed;
top: 0px; top: 44px;
left: 0; left: 0;
z-index: 999; z-index: 999;
/* #endif */ /* #endif */

251
pages/public/login.vue

@ -5,14 +5,11 @@
<view class="mp_wxBox"> <view class="mp_wxBox">
<view> <view>
<view class="headers"> <view class="headers">
<image src="https://download.cyjyyjy.com/huijuLogo.png" style=" border-radius: 50%;"></image> <image src="../../static/img/logo.png" style="border-radius: 50%;"></image>
</view> </view>
<view class="content"> <view class="content">
<view style="font-size: 16px;font-family: PingFang SC;font-weight: 500;color: #000000;" <view>申请获取以下权限</view>
class="title">惠聚买单</view> <text style="margin-top: 20rpx;">获得你的公开信息(昵称头像地区等)</text>
<view
style="margin-top: 21rpx;font-size: 12px;font-family: PingFang SC;font-weight: 500;color: #000000;">
为了提供优质服务需要您授权基本信息</view>
</view> </view>
<button v-show="weixinPhone" style="background: #FD441D;background-color: #FD441D;color: #FFFFFF;" <button v-show="weixinPhone" style="background: #FD441D;background-color: #FD441D;color: #FFFFFF;"
class="bottom" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber"> class="bottom" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">
@ -22,62 +19,33 @@
open-type="getUserInfo" withCredentials="true" lang="zh_CN" @getuserinfo="wxGetUserInfo"> open-type="getUserInfo" withCredentials="true" lang="zh_CN" @getuserinfo="wxGetUserInfo">
立即登录 立即登录
</button> --> </button> -->
<button v-show="!weixinPhone" class='bottom1' bindtap="getUserProfile" @tap="wxGetUserInfo"> <button v-show="!weixinPhone" style="background: #FD441D;color: #FFFFFF;" class='bottom'
授权并查看 bindtap="getUserProfile" @tap="wxGetUserInfo">
</button> 授权登录
<button v-show="!weixinPhone" class='bottom2'>
暂不授权
</button> </button>
<!-- 底部信息 --> <!-- 底部信息 -->
<view class="footer"> <view class="footer">
<text @tap="isShowAgree" class="cuIcon" :class="showAgree?'cuIcon-radiobox':'cuIcon-round'">我已阅读并同意 <text @tap="isShowAgree" class="cuIcon" :class="showAgree?'cuIcon-radiobox':'cuIcon-round'">同意
</text> </text>
<!-- 协议地址 --> <!-- 协议地址 -->
<navigator url="/pages/member/mimi" open-type="navigate" style="color: #FF3232;">隐私政策</navigator> <navigator url="/pages/member/mimi" open-type="navigate">隐私政策</navigator>
<navigator url="/pages/member/xieyi" open-type="navigate" style="color: #FF3232;">用户服务协议 <navigator url="/pages/member/xieyi" open-type="navigate">用户服务协议</navigator>
</navigator>
</view>
</view>
</view>
<!-- #endif -->
<!-- #ifdef H5 -->
<view class="register">
<view class="headers">
<image src="https://download.cyjyyjy.com/huijuLogo.png"></image>
</view>
<view class="list">
<view class="item">
<image src="../../static/img/phone-icon.png"></image>
<input type="text" maxlength="11" placeholder="输入手机号码" v-model="mobilePhone" />
</view>
<view class="item">
<image src="../../static/img/code-icon.png" mode=""></image>
<input type="text" maxlength="6" placeholder="填写验证码" class="codeIput" v-model="code" />
<view class="code-btn" :disabled="disabled" :class="disabled === true ? 'on' : ''" @click="sendClick">{{ text }}</view>
</view>
</view>
<view class="logon" @click="toLogin">立即登录</view>
</view> </view>
<!-- 底部信息 -->
<view class="footer">
<text @tap="isShowAgree" class="cuIcon" :class="showAgree?'cuIcon-radiobox':'cuIcon-round'">我已阅读并同意
</text>
<!-- 协议地址 -->
<navigator url="/pages/member/mimi" open-type="navigate" style="color: #FF3232;">隐私政策</navigator>
<navigator url="/pages/member/xieyi" open-type="navigate" style="color: #FF3232;">用户服务协议</navigator>
</view> </view>
</view> </view>
<!-- #endif --> <!-- #endif -->
</view> </view>
</template> </template>
<script> <script>
import sendVerifyCode from "@/mixins/SendVerifyCode";
export default { export default {
mixins: [sendVerifyCode],
data() { data() {
return { return {
mobile: '', mobile: '',
code: '',
sessionkey: '', sessionkey: '',
flag: '1', flag: '1',
showAgree: false, // showAgree: false, //
@ -85,45 +53,11 @@
sending: false, sending: false,
sendDataList: {}, sendDataList: {},
phone: '', phone: '',
text: '获取验证码', sendTime: '获取验证码',
count: 60, count: 60
mobilePhone: '',
code: '',
disabled: false
}; };
}, },
methods: { methods: {
//h5
sendClick(){
if(this.mobilePhone == ''){
return uni.showToast({
title: '请输入手机号码',
icon: 'none'
})
} else{
this.sendCode()
this.$queue.showLoading('正在发送验证码...');
this.$Request.getT('/appLogin/sendMsg/' + this.mobilePhone + '/bind').then(res => {
if (res.code === 0) {
this.sending = true;
this.$queue.showToast('验证码发送成功请注意查收');
uni.hideLoading();
} else {
uni.hideLoading();
uni.showModal({
showCancel: false,
title: '短信发送失败',
content: res.msg,
});
}
});
}
},
//h5
loginMobile(){
},
// //
getPhoneNumber: function(e) { getPhoneNumber: function(e) {
console.log(e); console.log(e);
@ -137,6 +71,7 @@
// //
setPhoneByInsert(decryptData, iv) { setPhoneByInsert(decryptData, iv) {
this.$queue.showLoading('登录中...'); this.$queue.showLoading('登录中...');
let data = { let data = {
decryptData: decryptData, decryptData: decryptData,
key: this.sessionkey, key: this.sessionkey,
@ -153,8 +88,7 @@
} }
}); });
}, },
isShowAgree(e) { isShowAgree() {
console.log(e)
// //
this.showAgree = !this.showAgree; this.showAgree = !this.showAgree;
}, },
@ -199,13 +133,16 @@
invitationCode: sendData.invitation invitationCode: sendData.invitation
}; };
console.log(postData); console.log(postData);
that.$Request.postJson('/appLogin/insertWxUser', postData).then(res => { that.$Request.postJson('/appLogin/insertWxUser', postData).then(res => {
console.log(res); console.log(res);
if (res.code === 0) { if (res.code === 0) {
uni.hideLoading(); uni.hideLoading();
that.$queue.setData('token', res.token); that.$queue.setData('token', res.token);
that.$queue.setData('userId', res.user.userId); that.$queue.setData('userId', res.user.userId);
that.$queue.setData("avatar", res.user.imageUrl ? res.user.imageUrl : '/static/img/logo.png');
that.$queue.setData("avatar", res.user.imageUrl ? res.user.imageUrl :
'/static/img/logo.png');
that.$queue.setData("nickName", res.user.nickName ? res.user.nickName : res.user.phone); that.$queue.setData("nickName", res.user.nickName ? res.user.nickName : res.user.phone);
that.$queue.setData("mobile", res.user.phone); that.$queue.setData("mobile", res.user.phone);
that.$queue.setData("invitationCode", res.user.invitationCode); that.$queue.setData("invitationCode", res.user.invitationCode);
@ -217,6 +154,7 @@
that.$queue.setData("sex", res.user.sex); that.$queue.setData("sex", res.user.sex);
that.$queue.setData("campus", res.user.campus); that.$queue.setData("campus", res.user.campus);
that.$queue.setData("campusName", res.user.campusName); that.$queue.setData("campusName", res.user.campusName);
uni.navigateBack(); uni.navigateBack();
// that.initUserInfo(res.user.userId, res.token); // that.initUserInfo(res.user.userId, res.token);
} else { } else {
@ -229,6 +167,7 @@
} }
}); });
}, },
login(nickName, avatarUrl, sex) { login(nickName, avatarUrl, sex) {
let that = this; let that = this;
let url = '/wx/mp/login'; let url = '/wx/mp/login';
@ -253,10 +192,11 @@
uni.hideLoading(); uni.hideLoading();
// //
// //
var userByinvitationId = that.$queue.getData('userByinvitationId'); var userByinvitationId = that.$queue.getData('userByinvitationId');
if (userByinvitationId) { if(userByinvitationId){
that.userByinvitationId = userByinvitationId; that.userByinvitationId = userByinvitationId;
} else { }else{
that.userByinvitationId = that.$queue.getInvitation(); that.userByinvitationId = that.$queue.getInvitation();
} }
var sendData = { var sendData = {
@ -294,31 +234,23 @@
toLogin() { toLogin() {
this.$queue.loginClear(); this.$queue.loginClear();
let openid = this.$queue.getData('openid'); let openid = this.$queue.getData('openid');
const wxCode = this.$queue.getData('wxCode');
console.log(wxCode)
const { const {
mobilePhone, mobile,
code, code
showAgree
} = this; } = this;
if (!mobilePhone) { if (!mobile) {
this.$queue.showToast('请输入手机号'); this.$queue.showToast('请输入手机号');
}else if (!code) { } else if (mobile.length != 11) {
this.$queue.showToast('请输入手机号');
} else if (!code) {
this.$queue.showToast('请输入密码'); this.$queue.showToast('请输入密码');
} else if (showAgree == false) {
uni.showToast({
icon: 'none',
position: 'bottom',
title: '请先同意《协议》'
});
return false;
} else { } else {
this.$queue.showLoading('正在登录中...'); this.$queue.showLoading('正在登录中...');
this.$Request this.$Request
.postJson('/appLogin/loginByPhone', { .postJson('/appLogin/login', {
code: code, password: code,
wxCode: wxCode, mobile: mobile,
mobile: mobilePhone openid: openid
}) })
.then(res => { .then(res => {
if (res.code === 0) { if (res.code === 0) {
@ -390,72 +322,21 @@
} }
}; };
</script> </script>
<style lang="scss">
.register{
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
.list{
width: 560rpx;
.item{
padding: 18rpx 0;
display: flex;
border-bottom: 2rpx solid #DCDCDC;
image{
width: 40rpx;
height: 40rpx;
margin-right: 20rpx;
}
input{
width: 300rpx;
}
.code-btn{
min-width: 158rpx;
height: 48rpx;
border: 2rpx solid #FF2C2C;
border-radius: 32rpx;
text-align: center;
line-height: 48rpx;
color: #FF2A2A;
font-size: 24rpx;
&.on{
background: #F5F5F5;
color: #999;
border-color: #F5F5F5;
}
}
}
}
.logon{
width: 560rpx;
height: 80rpx;
background: linear-gradient(141deg, #FF4848 0%, #FF2929 100%);
border-radius: 40rpx;
color: #fff;
font-size: 30rpx;
text-align: center;
line-height: 80rpx;
margin-top: 120rpx;
}
}
<style lang="scss">
.headers { .headers {
margin-top: 60rpx; text-align: center;
} }
.headers image { .headers>image {
width: 208rpx; width: 400upx;
height: 208rpx; height: 400upx;
border-radius: 12rpx;
} }
.footer { .footer {
// padding-left: 140upx; // padding-left: 140upx;
width: 100%;
height: 20px;
justify-content: center; justify-content: center;
margin-top: 248rpx; margin-top: 32upx;
font-size: 24upx; font-size: 24upx;
color: #666666; color: #666666;
display: flex; display: flex;
@ -478,6 +359,7 @@
.container { .container {
top: 0; top: 0;
padding-top: 32upx;
position: relative; position: relative;
width: 100%; width: 100%;
height: 100%; height: 100%;
@ -486,20 +368,16 @@
.mp_wxBox { .mp_wxBox {
.headers { .headers {
margin: 0 auto; margin: 35% auto 50rpx;
text-align: center;
border-radius: 60rpx; border-radius: 60rpx;
width: 650rpx; width: 650rpx;
margin-top: 64rpx; height: 300rpx;
text-align: center; line-height: 450rpx;
image { image {
width: 64px; width: 300rpx;
height: 64px; height: 300rpx;
margin: 0 auto;
}
.title {
margin-top: 0px;
} }
} }
@ -513,31 +391,12 @@
// margin-top: 40rpx; // margin-top: 40rpx;
} }
.bottom1 { .bottom {
width: 256px; line-height: 80upx;
height: 38px; border-radius: 80upx;
background: linear-gradient(141deg, #FF4848 0%, #FF2929 100%); margin: 50rpx;
opacity: 1; height: 80upx;
border-radius: 19px; font-size: 35rpx;
font-size: 14px;
font-family: PingFang SC;
font-weight: 400;
color: #FFFFFF;
margin-top: 132rpx;
}
.bottom2 {
width: 256px;
height: 38px;
border: 2px solid #FF4848;
background: #FFFFFF;
opacity: 1;
border-radius: 19px;
font-size: 14px;
font-family: PingFang SC;
font-weight: 400;
color: #FF2F2F;
margin-top: 16rpx;
} }
} }
} }

5
pages/task/search.vue

@ -61,14 +61,9 @@
}); });
}, },
goLogin() { goLogin() {
//#ifndef H5
uni.navigateTo({ uni.navigateTo({
url: '/pages/public/login' url: '/pages/public/login'
}); });
//#endif
//#ifdef H5
window.location.href = 'http://waimai.admin.service.yiqihuiju.com/sqx_fast/appLogin/wechatLogin';
//#endif
}, },
rtBubble() { rtBubble() {
if (this.searchValue === '' || this.searchValue === ' ') { if (this.searchValue === '' || this.searchValue === ' ') {

5
pages/task/tasklist.vue

@ -116,14 +116,9 @@
return n return n
}, },
goLogin() { goLogin() {
//#ifndef H5
uni.navigateTo({ uni.navigateTo({
url: '/pages/public/login' url: '/pages/public/login'
}); });
//#endif
//#ifdef H5
window.location.href = 'http://waimai.admin.service.yiqihuiju.com/sqx_fast/appLogin/wechatLogin';
//#endif
}, },
// //
tabSelect: function(itemId, index) { tabSelect: function(itemId, index) {

BIN
static/img/code-icon.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 826 B

BIN
static/img/phone-icon.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 324 B

1
wsl.txt

@ -1 +0,0 @@
rsync -r ./ root@39.105.46.0:/root/html/huiju_h5
Loading…
Cancel
Save