diff --git a/common/config.js b/common/config.js
index 5971a5c..46dd8f8 100644
--- a/common/config.js
+++ b/common/config.js
@@ -1,6 +1,6 @@
-// const ROOTPATH1 = "http://192.168.0.111:8891/sqx_fast";
-const ROOTPATH1 = "https://waimai.admin.service.cyjyyjy.com/sqx_fast";
+const ROOTPATH1 = "http://192.168.0.111:8891/sqx_fast";
+// const ROOTPATH1 = "https://fanqie.app.cyjyyjy.com/sqx_fast";
const ROOTPATH = "https://bwc.xianmxkj.com/sqx_fast";
module.exports = {
APIHOST: ROOTPATH,
diff --git a/components/mask/shopList.vue b/components/mask/shopList.vue
index 7ddc665..2ff91fc 100644
--- a/components/mask/shopList.vue
+++ b/components/mask/shopList.vue
@@ -19,8 +19,8 @@
-
-
+
+
@@ -103,10 +103,8 @@
}
}
.tag{
- width: 164rpx;
+ width: 200rpx;
height: 36rpx;
- text-align: center;
- line-height: 36rpx;
font-size: 20rpx;
background: #F8E3DF;
border: 2rpx solid #FF6A6A;
@@ -114,6 +112,7 @@
color: #FF4848;
display: flex;
align-items: center;
+ justify-content: center;
.jifen{
width: 22rpx;
height: 20rpx;
diff --git a/main.js b/main.js
index 5bbb2d4..6c37723 100644
--- a/main.js
+++ b/main.js
@@ -22,6 +22,9 @@ Vue.component('tui-no-data', tuinoData);
// import uView from 'uview-ui';
// Vue.use(uView)
+import {VueJsonp} from 'vue-jsonp'
+Vue.use(VueJsonp)
+
import 'js_sdk/ican-H5Api/ican-H5Api'
import share from './common/share.js'
diff --git a/manifest.json b/manifest.json
index 8f773de..3baaf96 100644
--- a/manifest.json
+++ b/manifest.json
@@ -167,7 +167,20 @@
"enable" : false
},
"h5" : {
- "title" : "省钱兄霸王餐",
- "domain" : "https://bwc.xianmxkj.com"
+ "title" : "番茄饭团用户端",
+ "domain" : "https://fanqie.h5.cyjyyjy.com",
+ "sdkConfigs" : {
+ "maps" : {
+ "qqmap" : {
+ "key" : "J5FBZ-XCUKI-UFEG2-5KOJJ-XD4L3-KNFNG"
+ }
+ }
+ },
+ "router" : {
+ "base" : "/waimai_h5/"
+ },
+ "devServer" : {
+ "https" : true
+ }
}
}
diff --git a/mixins/SendVerifyCode.js b/mixins/SendVerifyCode.js
new file mode 100644
index 0000000..d2133b0
--- /dev/null
+++ b/mixins/SendVerifyCode.js
@@ -0,0 +1,27 @@
+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);
+ }
+ }
+};
diff --git a/node_modules/vue-jsonp/LICENSE b/node_modules/vue-jsonp/LICENSE
new file mode 100644
index 0000000..9b2ef9e
--- /dev/null
+++ b/node_modules/vue-jsonp/LICENSE
@@ -0,0 +1,21 @@
+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.
diff --git a/node_modules/vue-jsonp/README.md b/node_modules/vue-jsonp/README.md
new file mode 100644
index 0000000..8aa1e99
--- /dev/null
+++ b/node_modules/vue-jsonp/README.md
@@ -0,0 +1,153 @@
+# 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`
+
+ - `jsonp: (url: string, param?: IJsonpParam, timeout?: number) => Promise`
+
+## 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('/my-awesome-url')
+assert(result === 'such a jsonp')
+```
+
+## License
+
+MIT
diff --git a/node_modules/vue-jsonp/dist/index.d.ts b/node_modules/vue-jsonp/dist/index.d.ts
new file mode 100644
index 0000000..ec621c7
--- /dev/null
+++ b/node_modules/vue-jsonp/dist/index.d.ts
@@ -0,0 +1,73 @@
+/**
+ * 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;
+/**
+ * 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(url: string, param?: IJsonpParam, timeout?: number): Promise;
+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;
+}
diff --git a/node_modules/vue-jsonp/dist/index.esm.js b/node_modules/vue-jsonp/dist/index.esm.js
new file mode 100644
index 0000000..893bec4
--- /dev/null
+++ b/node_modules/vue-jsonp/dist/index.esm.js
@@ -0,0 +1,8 @@
+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};
diff --git a/node_modules/vue-jsonp/dist/index.js b/node_modules/vue-jsonp/dist/index.js
new file mode 100644
index 0000000..c5e0aee
--- /dev/null
+++ b/node_modules/vue-jsonp/dist/index.js
@@ -0,0 +1,8 @@
+!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})}));
diff --git a/node_modules/vue-jsonp/dist/utils/index.d.ts b/node_modules/vue-jsonp/dist/utils/index.d.ts
new file mode 100644
index 0000000..6b2f521
--- /dev/null
+++ b/node_modules/vue-jsonp/dist/utils/index.d.ts
@@ -0,0 +1,20 @@
+/**
+ * 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 };
diff --git a/node_modules/vue-jsonp/package.json b/node_modules/vue-jsonp/package.json
new file mode 100644
index 0000000..1849cdc
--- /dev/null
+++ b/node_modules/vue-jsonp/package.json
@@ -0,0 +1,80 @@
+{
+ "_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:\\sqx-bawangcan用户端小程序\\sqx-bawangcan",
+ "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"
+}
diff --git a/package-lock.json b/package-lock.json
index 48e341a..81fdfb7 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,3 +1,11 @@
{
- "lockfileVersion": 1
+ "requires": true,
+ "lockfileVersion": 1,
+ "dependencies": {
+ "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="
+ }
+ }
}
diff --git a/pages.json b/pages.json
index de4a124..85a04b3 100644
--- a/pages.json
+++ b/pages.json
@@ -96,6 +96,19 @@
}
}
},
+ {
+ "path": "pages/task/tasklist",
+ "style": {
+ "navigationBarTextStyle": "black",
+ "navigationBarTitleText": "搜索",
+ "enablePullDownRefresh": false,
+ "app-plus": {
+ "bounce": "none",
+ "scrollIndicator": "none",
+ "titleNView": true
+ }
+ }
+ },
// my-my
{
@@ -441,5 +454,15 @@
},
"Window":{
"navigationStyle":"custom"
+ },
+ "condition" : { //模式配置,仅开发期间生效
+ "current": 0, //当前激活的模式(list 的索引项)
+ "list": [
+ {
+ "name": "", //模式名称
+ "path": "", //启动页面,必选
+ "query": "" //启动参数,在页面的onLoad函数里面得到
+ }
+ ]
}
}
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 47e5588..b9669e8 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -2,9 +2,7 @@
-
- {{cityname}}
-
+ {{city}}
@@ -25,53 +23,45 @@
-
-
- 美食小吃
-
-
-
- 甜点饮品
-
-
-
- 果蔬超市
-
-
-
- 夜宵烧烤
+
+
+ {{item.classifyName}}
-
+
-
+
-
+
-
+
- 综合
- 距离
- 佣金
-
- {{option == 0 ? '双平台' : option == 1 ? '美团' : '饿了么' }}
+ 综合
+ 距离
+ 佣金
+
+ {{option == 0 ? '双平台' : option == 2 ? '美团' : '饿了么' }}
双平台
- 美团
- 饿了么
+ 美团
+ 饿了么
@@ -99,26 +89,12 @@
data() {
return {
endNum: 0,
- shopname:'',
+ shopname: '',
keyword: '',
- value1: 1,
- value2: 2,
- cityname:'武汉',
listbanner: [],
- list: [
- {
- name: '综合'
- }, {
- name: '距离'
- }, {
- name: '佣金',
- },
- ],
- current: 0,
- value1: 0,
- shoplist:[],
+ shoplist: [],
localCampus: '未知',
- city: '',
+ city: '定位中..',
meituanList: {},
elemeList: {},
banners: [],
@@ -165,13 +141,13 @@
defaultIndex: [0, 0],
arr: [],
showModal: true,
-
+
activeTab: 0,
showOptions: 0,
option: 0,
showOption: false,
classify: ''
-
+
}
},
onLoad(e) {
@@ -179,14 +155,14 @@
if (e.userByinvitationId) {
this.$queue.setData('userByinvitationId', e.userByinvitationId);
}
-
+
// #ifdef MP-WEIXIN
if (e.scene) {
const scene = decodeURIComponent(e.scene);
this.$queue.setData('userByinvitationId', scene.split(',')[0]);
}
// #endif
-
+
// 实例化API核心类
qqmapsdk = new QQMapWX({
key: 'J5FBZ-XCUKI-UFEG2-5KOJJ-XD4L3-KNFNG'
@@ -195,40 +171,40 @@
this.getBannerList();
this.getnavlistClassify();
this.getClassify();
-
+
//美团饿了么优惠券开关
- // this.$Request.getT('/common/type/138').then(res => {
- // if (res.code == 0) {
- // if (res.data && res.data.value) {
- // this.mtelmCheck = res.data.value;
- // }
- // }
- // });
-
+ // this.$Request.getT('/common/type/138').then(res => {
+ // if (res.code == 0) {
+ // if (res.data && res.data.value) {
+ // this.mtelmCheck = res.data.value;
+ // }
+ // }
+ // });
+
this.$Request.getT('/banner/selectBannerList?classify=4&state=1').then(res => {
if (res.code === 0) {
// this.meituanList = res.data[0];
this.meituanList = res.data[0];
}
});
- // this.$Request.getT('/banner/selectBannerList?classify=4&state=2').then(res => {
- // if (res.code === 0) {
- // this.elemeList = res.data[0];
- // }
- // });
-
-
+ this.$Request.getT('/banner/selectBannerList?classify=4&state=2').then(res => {
+ if (res.code === 0) {
+ this.elemeList = res.data[0];
+ }
+ });
+
+
// 订单审核提醒 202
// 最新活动通知 204
// 点评提醒 205
// 活动反馈推送提醒 209
-
-
+
+
// 会员到期提醒 207
// 收益到账通知 208
// 积分变动提醒 206
// 提现审核提醒 203
-
+
// that.$Request.getT('/common/type/209').then(res => { //活动反馈推送提醒
// if (res.code == 0) {
// if (res.data && res.data.value) {
@@ -256,7 +232,7 @@
var city = this.$queue.getData('city');
var localCampus = this.$queue.getData('localCampus');
if (city && localCampus) {
- console.log(city)
+ // console.log(city)
this.latitude = this.$queue.getData('latitude');
this.longitude = this.$queue.getData('longitude');
this.city = city;
@@ -266,7 +242,7 @@
this.getHaoDianTuiJian1();
this.getHaoDianTuiJian();
}
-
+
let userId = this.$queue.getData('userId');
if (userId) {
//订阅
@@ -276,20 +252,25 @@
}
},
methods: {
- optionClick(idx){
+ optionClick(idx) {
this.option = idx;
- let d = {index1: 0, index: 4,idx: 3}
- if(idx == 0){
+ let d = {
+ index1: 0,
+ index: 4,
+ idx: 3
+ }
+ if (idx == 0) {
this.classify = ''
- } else if(idx == 1){
- this.classify = 1
- } else{
- this.classify = 2
+ } else {
+ this.classify = idx
}
-
- this.navClick({index1: 0, index: 4,idx: 3})
+ this.navClick({
+ index1: 0,
+ index: 4,
+ idx: 3
+ })
this.showOption = false;
-
+
},
change(index) {
this.current = index;
@@ -307,344 +288,58 @@
})
},
openMsg() {
- var that = this
- wx.getSetting({
- withSubscriptions: true, //是否获取用户订阅消息的订阅状态,默认false不返回
- success(ret) {
- // console.log(ret,'------------------')
- // console.log(Object.keys(ret.subscriptionsSetting.itemSettings).length)
- // if (JSON.stringify(ret.subscriptionsSetting.itemSettings).indexOf('accept')!=-1) {
- if (ret.subscriptionsSetting.itemSettings) {
- uni.setStorageSync('sendindexMsg', true)
- uni.openSetting({ // 打开设置页
- success(rea) {
- console.log(rea.authSetting)
- }
- });
- } else { // 用户没有点击“总是保持以上,不再询问”则每次都会调起订阅消息
- uni.setStorageSync('sendindexMsg', false)
- uni.showModal({
- title: '提示',
- content: '为了更好的体验,请绑定消息推送',
- confirmText: '确定',
- cancelText: '取消',
- success: function(res) {
- if (res.confirm) {
- uni.requestSubscribeMessage({
- tmplIds: that.arr,
- success(re) {
- // console.log(re,'**********')
- var datas = JSON.stringify(re);
- if (datas.indexOf("accept") != -1) {
- console.log(re)
- }
- },
- fail: (res) => {
- console.log(res)
- }
- })
- that.showModal = false
- } else if (res.cancel) {
- that.showModal = true
- }
- }
- })
- }
- }
- })
- },
-
- // 点击优惠券跳转小程序
- gochegnxu(classify) {
- let token = this.$queue.getData('token');
- let userId = this.$queue.getData('userId');
- if (token) {
- if (uni.getStorageSync('sendindexMsg')) {
- uni.requestSubscribeMessage({
- tmplIds: this.arr,
- success(re) {
- // console.log(re,'**********')
- var datas = JSON.stringify(re);
- if (datas.indexOf("accept") != -1) {
- console.log(re)
- }
- },
- fail: (res) => {
- console.log(res)
+ var that = this
+ wx.getSetting({
+ withSubscriptions: true, //是否获取用户订阅消息的订阅状态,默认false不返回
+ success(ret) {
+ // console.log(ret,'------------------')
+ // console.log(Object.keys(ret.subscriptionsSetting.itemSettings).length)
+ // if (JSON.stringify(ret.subscriptionsSetting.itemSettings).indexOf('accept')!=-1) {
+ if (ret.subscriptionsSetting.itemSettings) {
+ uni.setStorageSync('sendindexMsg', true)
+ uni.openSetting({ // 打开设置页
+ success(rea) {
+ console.log(rea.authSetting)
}
- })
- }
- if (classify == 1) { //美团
- // #ifdef MP-WEIXIN
- uni.navigateToMiniProgram({
- appId: 'wxde8ac0a21135c07d',
- path: this.meituanList.url,
- fail(res) {
- console.error(res)
- }
- })
- // #endif
- } else if (classify == 2) { //饿了么
- // #ifdef MP-WEIXIN
- uni.navigateToMiniProgram({
- appId: 'wxece3a9a4c82f58c9',
- path: this.elemeList.url,
- fail(res) {
- console.error(res)
- }
- })
- // #endif
- }
- } else {
- this.goLogin();
- }
- },
- tuijianClickItem(index) {
- let token = this.$queue.getData('token');
- let userId = this.$queue.getData('userId');
- if (token) {
- if (uni.getStorageSync('sendindexMsg')) {
- uni.requestSubscribeMessage({
- tmplIds: this.arr,
- success(re) {
- // console.log(re,'**********')
- var datas = JSON.stringify(re);
- if (datas.indexOf("accept") != -1) {
- console.log(re)
+ });
+ } else { // 用户没有点击“总是保持以上,不再询问”则每次都会调起订阅消息
+ uni.setStorageSync('sendindexMsg', false)
+ uni.showModal({
+ title: '提示',
+ content: '为了更好的体验,请绑定消息推送',
+ confirmText: '确定',
+ cancelText: '取消',
+ success: function(res) {
+ if (res.confirm) {
+ uni.requestSubscribeMessage({
+ tmplIds: that.arr,
+ success(re) {
+ // console.log(re,'**********')
+ var datas = JSON.stringify(re);
+ if (datas.indexOf("accept") != -1) {
+ console.log(re)
+ }
+ },
+ fail: (res) => {
+ console.log(res)
+ }
+ })
+ that.showModal = false
+ } else if (res.cancel) {
+ that.showModal = true
}
- },
- fail: (res) => {
- console.log(res)
}
})
}
- uni.navigateTo({
- url: '/pages/index/tuijianList'
- });
- } else {
- this.goLogin();
- }
- },
- ed(res) {
- console.log(res)
- },
- dateChange(d) {
- console.log(d)
- },
- getHaoDianTuiJian() {
- this.loadingType = 1;
- uni.showLoading({
- title: '加载中...',
- });
- let data = {
- page: 1,
- limit: 4,
- longitude: this.longitude,
- latitude: this.latitude,
- city: this.city,
- search: '',
- isGoods: '1'
- }
- this.$Request.getT('/wm/selectHomeGoodsList', data).then(res => {
- if (res.code === 0) {
- this.tuijianList = [];
-
- res.data.list.forEach(d => {
- d.distance = this.setMorKm(d.distance);
- this.tuijianList.push(d)
- });
- }
- uni.hideLoading();
- })
- },
- getHaoDianTuiJian1() {
- this.loadingType = 1;
- uni.showLoading({
- title: '加载中...',
- });
- let data = {
- page: this.page,
- limit: this.limit,
- longitude: this.longitude,
- latitude: this.latitude,
- city: this.city,
- search: '',
- sort: this.sortType,
- typeId: this.typeId,
- classify: this.classify
- }
- this.$Request.getT('/wm/selectHomeGoodsList', data).then(res => {
- if (res.code === 0) {
- if (this.page === 1) {
- this.goodsHomeList = [];
- }
-
- res.data.list.forEach(d => {
- d.distance = this.setMorKm(d.distance);
- this.goodsHomeList.push(d)
- });
- if (res.data.list.length === this.limit) {
- this.loadingType = 0;
- } else {
- this.loadingType = 3;
- }
- } else {
- this.loadingType = 2;
- }
- uni.hideLoading();
- })
- },
- setMorKm(m) {
- var n = ''
- if (m) {
- if (m >= 1000) {
- n = (m / 1000).toFixed(0) + 'km'
- } else {
- n = parseInt(m) + 'm'
- }
- } else {
- n = '0m'
}
- return n
- },
- getClassify() {
- this.$Request.getT('/helpClassify/selectClassifyList').then(res => {
- if (res.code === 0) {
- this.navlist = res.data;
- }
- });
- },
- getnavlistClassify() {
- this.$Request.getT('/banner/selectBannerList?state=-1&classify=2').then(res => {
- if (res.code === 0) {
- let dataList = [];
- let data = {
- text: '全部品类',
- value: 0
- }
- dataList.push(data);
-
- res.data.forEach(d => {
- let data = {
- text: '',
- value: ''
- }
- data.text = d.name;
- data.value = d.id;
- if (d.state == 1) {
- dataList.push(data);
- }
-
- });
- this.filterData.push(dataList);
- }
- });
- },
- initLocation(latitude, longitude) {
- var that = this;
- console.log('1234')
- qqmapsdk.reverseGeocoder({
- location: latitude + ',' + longitude || '',
- success: function(res) { //成功后的回调
- if (res.status == 0) {
- console.log(res)
- that.authorize = false;
- var res = res.result;
- that.latitude = latitude;
- that.longitude = longitude;
- that.$queue.setData('latitude', latitude)
- that.$queue.setData('longitude', longitude)
- let s = res.ad_info.city.substring(0, res.ad_info.city.length - 1);
- that.city = s;
- that.$queue.setData('city', that.city);
- that.localCampus = res.address_reference.landmark_l2.title;
- that.getHaoDianTuiJian1();
- that.getHaoDianTuiJian();
- }
- },
- fail: function(error) {
- console.error(error);
- },
- complete: function(res) {
- console.log(res);
- }
- })
- },
- startSetting() {
- let that = this;
- // #ifdef APP-PLUS
- permision.gotoAppSetting();
- // #endif
- // #ifdef MP-WEIXIN
- uni.openSetting({
- success(res3) {
- console.log(res3)
- if (res3.authSetting[
- 'scope.userLocation'
- ]) {
- uni.hideToast();
- that.initMyPosition();
- } else {
- that.authorizationLocation();
- }
- // 已授权-(获取位置信息)
- }
- });
- // #endif
- },
- initMyPosition() {
- let that = this;
- uni.getLocation({
- type: 'gcj02',
- altitude: true,
- success: res => {
- console.log(res,'aaaa')
- that.initLocation(res.latitude, res.longitude);
- }
- });
- },
- authorizationLocation: function() {
- let that = this;
- // #ifdef MP-WEIXIN
- uni.getSetting({
- success(res1) {
- if (!res1.authSetting['scope.userLocation']) {
- // 未授权
- uni.authorize({
- scope: 'scope.userLocation',
- success() { //1.1 允许授权
- that.initMyPosition();
- },
- fail() { //1.2 拒绝授权
- that.authorize = true; //用户是否拒绝了定位授权 true:用户拒绝 false:用户授权
- }
- })
- } else {
- // 已授权-(获取位置信息)
- that.initMyPosition();
- }
- }
- });
- // #endif
- // #ifdef H5
- that.initMyPosition();
- // #endif
- },
- getBannerList() {
- this.$Request.getT('/banner/selectBannerList?state=-1&classify=1').then(res => {
- if (res.code === 0) {
- this.banners = [];
- res.data.forEach(d => {
- if (d.state == 1) {
- this.banners.push(d);
- }
- });
- console.log(this.banners)
- }
- });
- },
- // 轮播图跳转小程序
- toGoodsInfo: function(url) {
+ })
+ },
+
+ // 点击优惠券跳转小程序
+ gochegnxu(classify) {
+ let token = this.$queue.getData('token');
+ let userId = this.$queue.getData('userId');
+ if (token) {
if (uni.getStorageSync('sendindexMsg')) {
uni.requestSubscribeMessage({
tmplIds: this.arr,
@@ -660,24 +355,35 @@
}
})
}
- let token = this.$queue.getData('token');
- let userId = this.$queue.getData('userId');
- if (url.indexOf('/pages/') !== -1) {
- uni.navigateTo({
- url
- });
- } else {
- //#ifndef H5
- uni.navigateTo({
- url: '/pages/public/webview?url=' + url
- });
- //#endif
- //#ifdef H5
- window.location.href = url;
- //#endif
+ if (classify == 1) { //美团
+ // #ifdef MP-WEIXIN
+ uni.navigateToMiniProgram({
+ appId: 'wxde8ac0a21135c07d',
+ path: this.meituanList.url,
+ fail(res) {
+ console.error(res)
+ }
+ })
+ // #endif
+ } else if (classify == 2) { //饿了么
+ // #ifdef MP-WEIXIN
+ uni.navigateToMiniProgram({
+ appId: 'wxece3a9a4c82f58c9',
+ path: this.elemeList.url,
+ fail(res) {
+ console.error(res)
+ }
+ })
+ // #endif
}
- },
- goSearch() {
+ } else {
+ this.goLogin();
+ }
+ },
+ tuijianClickItem(index) {
+ let token = this.$queue.getData('token');
+ let userId = this.$queue.getData('userId');
+ if (token) {
if (uni.getStorageSync('sendindexMsg')) {
uni.requestSubscribeMessage({
tmplIds: this.arr,
@@ -694,10 +400,384 @@
})
}
uni.navigateTo({
- url: '/pages/task/search'
+ url: '/pages/index/tuijianList'
});
- },
- goSelectCity() {
+ } else {
+ this.goLogin();
+ }
+ },
+ ed(res) {
+ console.log(res)
+ },
+ dateChange(d) {
+ console.log(d)
+ },
+ getHaoDianTuiJian() {
+ this.loadingType = 1;
+ uni.showLoading({
+ title: '加载中...',
+ });
+ let data = {
+ page: 1,
+ limit: 4,
+ longitude: this.longitude,
+ latitude: this.latitude,
+ city: this.city,
+ search: '',
+ isGoods: '1'
+ }
+ this.$Request.getT('/wm/selectHomeGoodsList', data).then(res => {
+ if (res.code === 0) {
+ this.tuijianList = [];
+
+ res.data.list.forEach(d => {
+ d.distance = this.setMorKm(d.distance);
+ this.tuijianList.push(d)
+ });
+ }
+ uni.hideLoading();
+ })
+ },
+ getHaoDianTuiJian1() {
+ this.loadingType = 1;
+ uni.showLoading({
+ title: '加载中...',
+ });
+ let data = {
+ page: this.page,
+ limit: this.limit,
+ longitude: this.longitude,
+ latitude: this.latitude,
+ city: this.city,
+ search: '',
+ sort: this.sortType,
+ typeId: this.typeId,
+ classify: this.classify
+ }
+ this.$Request.getT('/wm/selectHomeGoodsList', data).then(res => {
+ if (res.code === 0) {
+ if (this.page === 1) {
+ this.goodsHomeList = [];
+ }
+
+ res.data.list.forEach(d => {
+ d.distance = this.setMorKm(d.distance);
+ this.goodsHomeList.push(d)
+ });
+ if (res.data.list.length === this.limit) {
+ this.loadingType = 0;
+ } else {
+ this.loadingType = 3;
+ }
+ } else {
+ this.loadingType = 2;
+ }
+ uni.hideLoading();
+ })
+ },
+ setMorKm(m) {
+ var n = ''
+ if (m) {
+ if (m >= 1000) {
+ n = (m / 1000).toFixed(0) + 'km'
+ } else {
+ n = parseInt(m) + 'm'
+ }
+ } else {
+ n = '0m'
+ }
+ return n
+ },
+ getClassify() {
+ this.$Request.getT('/helpClassify/selectClassifyList').then(res => {
+ if (res.code === 0) {
+ this.navlist = res.data;
+ }
+ });
+ },
+ getnavlistClassify() {
+ this.$Request.getT('/banner/selectBannerList?state=-1&classify=2').then(res => {
+ if (res.code === 0) {
+ let dataList = [];
+ let data = {
+ text: '全部品类',
+ value: 0
+ }
+ dataList.push(data);
+
+ res.data.forEach(d => {
+ let data = {
+ text: '',
+ value: ''
+ }
+ data.text = d.name;
+ data.value = d.id;
+ if (d.state == 1) {
+ dataList.push(data);
+ }
+
+ });
+ this.filterData.push(dataList);
+ }
+ });
+ },
+ initLocation(latitude, longitude) {
+ var that = this;
+ qqmapsdk.reverseGeocoder({
+ location: latitude + ',' + longitude || '',
+ success: function(res) { //成功后的回调
+ if (res.status == 0) {
+ that.authorize = false;
+ var res = res.result;
+ that.latitude = latitude;
+ that.longitude = longitude;
+ that.$queue.setData('latitude', latitude)
+ that.$queue.setData('longitude', longitude)
+ let s = res.ad_info.city.substring(0, res.ad_info.city.length - 1);
+ that.city = s;
+ that.$queue.setData('city', that.city);
+ that.localCampus = res.address_reference.landmark_l2.title;
+ that.getHaoDianTuiJian1();
+ that.getHaoDianTuiJian();
+ }
+ },
+ fail: function(error) {
+ console.error(error);
+ },
+ complete: function(res) {
+ console.log(res,'location');
+ }
+ })
+ },
+ //h5获取地理位置
+ loAcquire(longitude,latitude){
+ let that = this;
+ uni.showLoading({
+ title: '加载中',
+ mask:true
+ });
+ let str = `output=jsonp&key=J5FBZ-XCUKI-UFEG2-5KOJJ-XD4L3-KNFNG&location=${latitude},${longitude}`
+ this.$jsonp('https://apis.map.qq.com/ws/geocoder/v1/?'+str,{}).then(res=>{
+ console.log(res);
+ uni.hideLoading();
+ if(res.status == 0){
+ that.authorize = false;
+ var res = res.result;
+ that.latitude = latitude;
+ that.longitude = longitude;
+ that.$queue.setData('latitude', latitude)
+ that.$queue.setData('longitude', longitude)
+ let s = res.ad_info.city.substring(0, res.ad_info.city.length - 1);
+ that.city = s;
+ that.$queue.setData('city', that.city);
+ that.localCampus = res.address_reference.landmark_l2.title;
+ that.getHaoDianTuiJian1();
+ that.getHaoDianTuiJian();
+ }
+ })
+ },
+ startSetting() {
+ let that = this;
+ // #ifdef APP-PLUS
+ permision.gotoAppSetting();
+ // #endif
+ // #ifdef MP-WEIXIN
+ uni.openSetting({
+ success(res3) {
+ console.log(res3)
+ if (res3.authSetting[
+ 'scope.userLocation'
+ ]) {
+ uni.hideToast();
+ that.initMyPosition();
+ } else {
+ that.authorizationLocation();
+ }
+ // 已授权-(获取位置信息)
+ }
+ });
+ // #endif
+ },
+ initMyPosition() {
+ let that = this;
+ console.log('getLocation')
+ uni.getLocation({
+ type: 'gcj02',
+ altitude: true,
+ success: res => {
+ console.log(res, 'aaaa')
+ // #ifdef H5
+ console.log('123243')
+ that.loAcquire(res.longitude,res.latitude)
+ // #endif
+ // #ifdef MP-WEIXIN
+ that.initLocation(res.latitude, res.longitude)
+ // #endif
+ },
+ fail: (res) => {
+ console.log(res)
+ },
+ complete: (res) => {
+ console.log(res)
+ }
+ });
+ },
+ authorizationLocation: function() {
+ let that = this;
+ // #ifdef MP-WEIXIN
+ uni.getSetting({
+ success(res1) {
+ if (!res1.authSetting['scope.userLocation']) {
+ // 未授权
+ uni.authorize({
+ scope: 'scope.userLocation',
+ success() { //1.1 允许授权
+ that.initMyPosition();
+ },
+ fail() { //1.2 拒绝授权
+ that.authorize = true; //用户是否拒绝了定位授权 true:用户拒绝 false:用户授权
+ }
+ })
+ } else {
+ // 已授权-(获取位置信息)
+ that.initMyPosition();
+ }
+ }
+ });
+ // #endif
+ // #ifdef H5
+ that.initMyPosition();
+ // #endif
+ },
+ getBannerList() {
+ this.$Request.getT('/banner/selectBannerList?state=-1&classify=1').then(res => {
+ if (res.code === 0) {
+ this.banners = [];
+ res.data.forEach(d => {
+ if (d.state == 1) {
+ this.banners.push(d);
+ }
+ });
+ console.log(this.banners)
+ }
+ });
+ },
+ // 轮播图跳转小程序
+ toGoodsInfo: function(url) {
+ if (uni.getStorageSync('sendindexMsg')) {
+ uni.requestSubscribeMessage({
+ tmplIds: this.arr,
+ success(re) {
+ // console.log(re,'**********')
+ var datas = JSON.stringify(re);
+ if (datas.indexOf("accept") != -1) {
+ console.log(re)
+ }
+ },
+ fail: (res) => {
+ console.log(res)
+ }
+ })
+ }
+ let token = this.$queue.getData('token');
+ let userId = this.$queue.getData('userId');
+ if (url.indexOf('/pages/') !== -1) {
+ uni.navigateTo({
+ url
+ });
+ } else {
+ //#ifndef H5
+ uni.navigateTo({
+ url: '/pages/public/webview?url=' + url + '&title=新手指南'
+ });
+ //#endif
+ //#ifdef H5
+ window.location.href = url;
+ //#endif
+ }
+ },
+ goSearch() {
+ if (uni.getStorageSync('sendindexMsg')) {
+ uni.requestSubscribeMessage({
+ tmplIds: this.arr,
+ success(re) {
+ // console.log(re,'**********')
+ var datas = JSON.stringify(re);
+ if (datas.indexOf("accept") != -1) {
+ console.log(re)
+ }
+ },
+ fail: (res) => {
+ console.log(res)
+ }
+ })
+ }
+ uni.navigateTo({
+ url: '/pages/task/search'
+ });
+ },
+ goSelectCity() {
+ if (uni.getStorageSync('sendindexMsg')) {
+ uni.requestSubscribeMessage({
+ tmplIds: this.arr,
+ success(re) {
+ // console.log(re,'**********')
+ var datas = JSON.stringify(re);
+ if (datas.indexOf("accept") != -1) {
+ console.log(re)
+ }
+ },
+ fail: (res) => {
+ console.log(res)
+ }
+ })
+ }
+ if (!this.authorize) {
+ uni.navigateTo({
+ url: '/pages/index/selectCampus?city=' + this.city
+ });
+ } else {
+ this.startSetting();
+ }
+ },
+ goLogin() {
+ this.$queue.setData('href', '/pages/index/index');
+ uni.navigateTo({
+ url: '/pages/public/login'
+ });
+ },
+ navClick: function(res) {
+ if (uni.getStorageSync('sendindexMsg')) {
+ uni.requestSubscribeMessage({
+ tmplIds: this.arr,
+ success(re) {
+ // console.log(re,'**********')
+ var datas = JSON.stringify(re);
+ if (datas.indexOf("accept") != -1) {
+ console.log(re)
+ }
+ },
+ fail: (res) => {
+ console.log(res)
+ }
+ })
+ }
+ // console.log('点击', res)
+ this.activeTab = res.idx
+ this.showOption = false;
+ this.page = 1;
+ if (res.index1 == 0) {
+ this.sortType = res.index ? res.index : 0;
+ this.getHaoDianTuiJian1();
+ } else if (res.index1 == 1) {
+ this.typeId = res.index ? res.index : 0;
+ this.getHaoDianTuiJian1();
+ }
+ },
+ clickItem: function(options) {
+ let token = this.$queue.getData('token');
+ let userId = this.$queue.getData('userId');
+ if (token) {
if (uni.getStorageSync('sendindexMsg')) {
uni.requestSubscribeMessage({
tmplIds: this.arr,
@@ -713,21 +793,18 @@
}
})
}
- if (!this.authorize) {
- uni.navigateTo({
- url: '/pages/index/selectCampus?city=' + this.city
- });
- } else {
- this.startSetting();
- }
- },
- goLogin() {
- this.$queue.setData('href', '/pages/index/index');
uni.navigateTo({
- url: '/pages/public/login'
- });
- },
- navClick: function(res) {
+ url: '/pages/index/tasksdetails?goodsId=' + options.item.goodsId + '&latitude=' + this
+ .latitude + '&longitude=' + this.longitude
+ })
+ } else {
+ this.goLogin();
+ }
+ },
+ toNavList: function(item) {
+ let token = this.$queue.getData('token');
+ let userId = this.$queue.getData('userId');
+ if (token) {
if (uni.getStorageSync('sendindexMsg')) {
uni.requestSubscribeMessage({
tmplIds: this.arr,
@@ -743,99 +820,42 @@
}
})
}
- console.log('点击', res)
- this.activeTab = res.idx
- this.page = 1;
- if (res.index1 == 0) {
- this.sortType = res.index ? res.index : 0;
- this.getHaoDianTuiJian1();
- } else if (res.index1 == 1) {
- this.typeId = res.index ? res.index : 0;
- this.getHaoDianTuiJian1();
- }
- },
- clickItem: function(options) {
- let token = this.$queue.getData('token');
- let userId = this.$queue.getData('userId');
- if (token) {
- if (uni.getStorageSync('sendindexMsg')) {
- uni.requestSubscribeMessage({
- tmplIds: this.arr,
- success(re) {
- // console.log(re,'**********')
- var datas = JSON.stringify(re);
- if (datas.indexOf("accept") != -1) {
- console.log(re)
- }
- },
- fail: (res) => {
- console.log(res)
- }
- })
- }
- uni.navigateTo({
- url: '/pages/index/tasksdetails?goodsId=' + options.item.goodsId + '&latitude=' + this
- .latitude + '&longitude=' + this.longitude
- })
- } else {
- this.goLogin();
- }
- },
- toNavList: function(item) {
- let token = this.$queue.getData('token');
- let userId = this.$queue.getData('userId');
- if (token) {
- if (uni.getStorageSync('sendindexMsg')) {
- uni.requestSubscribeMessage({
- tmplIds: this.arr,
- success(re) {
- // console.log(re,'**********')
- var datas = JSON.stringify(re);
- if (datas.indexOf("accept") != -1) {
- console.log(re)
- }
- },
- fail: (res) => {
- console.log(res)
- }
- })
- }
- uni.navigateTo({
- url: '/pages/task/tasklist?searchValue=&classifyId=' + item.id + '&name=' + item
- .classifyName
- });
- } else {
- this.goLogin();
- }
- },
- // 传进数组和指定个数,进行拆分
- chunk: function(array, size) {
- const length = array.length
- if (!length || !size || size < 1) {
- return []
- }
- let index = 0
- let resIndex = 0
- let result = new Array(Math.ceil(length / size))
- while (index < length) {
- result[resIndex++] = array.slice(index, (index += size))
- }
- return result
- },
- topScrollTap: function() {
- uni.pageScrollTo({
- scrollTop: 0,
- duration: 300
+ uni.navigateTo({
+ url: '/pages/task/tasklist?searchValue=&classifyId=' + item.id + '&name=' + item
+ .classifyName
});
+ } else {
+ this.goLogin();
}
},
- onPageScroll: function(e) {
- this.scrollTop = e.scrollTop > 200;
+ // 传进数组和指定个数,进行拆分
+ chunk: function(array, size) {
+ const length = array.length
+ if (!length || !size || size < 1) {
+ return []
+ }
+ let index = 0
+ let resIndex = 0
+ let result = new Array(Math.ceil(length / size))
+ while (index < length) {
+ result[resIndex++] = array.slice(index, (index += size))
+ }
+ return result
},
- onReachBottom: function() {
- this.page = this.page + 1;
- this.getHaoDianTuiJian1();
+ topScrollTap: function() {
+ uni.pageScrollTo({
+ scrollTop: 0,
+ duration: 300
+ });
}
+ },
+ onPageScroll: function(e) {
+ this.scrollTop = e.scrollTop > 200;
+ },
+ onReachBottom: function() {
+ this.page = this.page + 1;
+ this.getHaoDianTuiJian1();
+ }
}
// this.$Request.getT('/banner/selectBannerList?classify=4&state=2').then(res => {
@@ -851,6 +871,7 @@
// overflow: hidden;
background-color: #F6F6F6;
}
+
.home-bgi {
width: 100%;
height: 260rpx;
@@ -882,23 +903,24 @@
.banner {
padding: 0 32rpx;
}
+
.nav p {
- font-size: 14px;
- margin-top: 5px;
- font-family: PingFang SC;
+ font-size: 28rpx;
+ margin-top: 10rpx;
font-weight: 500;
}
.nav {
display: flex;
+ align-items: center;
padding: 0 32rpx;
}
.nav .citys {
- width:40px;
- font-size: 14px;
+ // width: 100rpx;
+ font-size: 28rpx;
font-weight: 500;
- font-family: PingFang SC;
+ margin-right: 10rpx;
}
.nav .search {
@@ -906,12 +928,12 @@
}
.imgs {
- width: 48px;
- height: 48px;
+ width: 96rpx;
+ height: 96rpx;
}
.list p {
- font-size: 12px;
+ font-size: 24rpx;
color: #2E2E2E;
}
@@ -921,44 +943,49 @@
// }
.listbox {
+ width: 100%;
+ padding: 0 24rpx;
display: flex;
- flex-wrap: nowrap;
- align-items: center;
- justify-content: space-around;
- flex-direction: row;
- margin-top: 18px;
+ flex-wrap: wrap;
+ margin-top: 16rpx;
}
.list {
- width: 48px;
- height: 71px;
+ width: 25%;
+ height: 142rpx;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+
+ image {
+ width: 96rpx;
+ height: 96rpx;
+ }
}
.bill {
display: flex;
justify-content: space-between;
- width: 93%;
- margin: 0 auto;
- margin-top: 15px;
+ width: 100%;
+ padding: 0 32rpx;
+ margin-top: 30rpx;
}
.bill image {
- width: 164px;
- height: 84px;
- float: left;
+ width: 328rpx;
+ height: 160rpx;
}
.nav2 {
display: flex;
- font-size: 12px;
+ font-size: 24rpx;
font-family: PingFang SC;
color: #C1C1C1;
width: 100%;
background-color: #FFFFFF;
}
-
-
.nav2 .tabs {
flex: 1;
}
@@ -966,46 +993,54 @@
.nav2 .dropdown {
width: 24%;
background-color: #FFFFFF;
- margin-right: 26px;
+ margin-right: 32rpx;
color: #C1C1C1;
}
- .select-tabs-box{
+
+ .select-tabs-box {
width: 100%;
background: #fff;
display: flex;
justify-content: space-between;
padding: 22rpx 72rpx 0;
- font-size: 24rpx;
+ font-size: 28rpx;
color: #C1C1C1;
- .tabs{
+
+ .tabs {
width: 100%;
display: flex;
justify-content: space-between;
- .tab-item{
- &.active{
+
+ .tab-item {
+ &.active {
border-bottom: 4rpx solid #FF4848;
padding-bottom: 10rpx;
color: #FF4848;
}
}
- .select-box{
- width: 74rpx;
+
+ .select-box {
+ // width: 74rpx;
text-align: center;
position: relative;
- .options{
+
+ .options {
width: 158rpx;
- padding: 30rpx 0 0;
+ padding: 15rpx 0;
position: absolute;
top: 47rpx;
left: -42rpx;
background: #fff;
z-index: 99;
- .o-item{
+
+ .o-item {
width: 100%;
text-align: center;
font-size: 24rpx;
color: #2E2E2E;
- margin-bottom: 30rpx;
+ margin-bottom: 15rpx;
+ height: 45rpx;
+ line-height: 45rpx;
}
}
}
@@ -1022,15 +1057,18 @@
border: 2rpx solid #9F9F9F;
border-right: none;
padding-left: 20rpx;
- image{
+
+ image {
width: 25rpx;
height: 25rpx;
margin-right: 8rpx;
}
- input{
- width:82%;
+
+ input {
+ width: 82%;
}
}
+
.search .button {
width: 84rpx;
height: 58rpx;
@@ -1048,39 +1086,37 @@
border-radius: 0 6px 6px 0;
position: relative;
}
-
- .logo image{
- width: 24px;
- height: 24px;
- left: 2px;
+
+ .logo image {
+ width: 48rpx;
+ height: 48rpx;
+ left: 4rpx;
position: absolute;
}
-
- .m{
+
+ .m {
background-color: #FED810;
}
-
- .e{
+
+ .e {
background-color: #349CFC;
}
-
- .logo .top{
- height: 50px;
+
+ .logo .top {
+ height: 100rpx;
background-color: #349CFC;
- border-radius: 0 6px 0 0;
+ border-radius: 0 12rpx 0 0;
position: relative;
}
-
- .logo .bottom{
- height: 50px;
+
+ .logo .bottom {
+ height: 100rpx;
background-color: #FED810;
- border-radius: 0 0 6px 0;
+ border-radius: 0 0 12rpx 0;
position: relative;
}
-
- .logo .bottom image{
- bottom:0px;
+
+ .logo .bottom image {
+ bottom: 0px;
}
-
-
diff --git a/pages/index/selectCampus.vue b/pages/index/selectCampus.vue
index f87c7bb..e2015a4 100644
--- a/pages/index/selectCampus.vue
+++ b/pages/index/selectCampus.vue
@@ -18,9 +18,9 @@
{{weizhi.names}}
{{weizhi.dizhi}}
-
+
重新定位
-
+
@@ -30,7 +30,9 @@
import ZhToPinYin from '@/js_sdk/tui-zh-pinyin/tui-zh-pinyin.js';
var QQMapWX = require('@/js_sdk/qqmap-wx-jssdk1.2/qqmap-wx-jssdk.js');
var qqmapsdk;
+ // #ifdef MP-WEIXIN
var citySelector = requirePlugin('citySelector');
+ // #endif
export default {
data() {
return {
@@ -44,7 +46,7 @@
names: "",
dizhi: ""
},
- city: '西安'
+ city: ''
}
},
onLoad: function(options) {
@@ -61,6 +63,7 @@
}
},
onShow() {
+ // #ifdef MP-WEIXIN
const item = citySelector.getCity();
if(item){
citySelector.clearCity();
@@ -69,7 +72,7 @@
this.$queue.setData('city', item.name);
this.$queue.setData('localCampus', item.name);
}
-
+ // #endif
var city = this.$queue.getData("city")
if (city != '') {
this.city = city
@@ -77,8 +80,8 @@
},
methods: {
gocity() {
- const key = 'J5FBZ-XCUKI-UFEG2-5KOJJ-XD4L3-KNFNG'; // 使用在腾讯位置服务申请的key
- const referer = '省钱兄霸王餐'; // 调用插件的app的名称
+ const key = 'YXDBZ-P5LWW-375RH-OCVNQ-B2HY7-U6FBG'; // 使用在腾讯位置服务申请的key
+ const referer = '番茄饭团霸王餐'; // 调用插件的app的名称
const hotCitys = ''; // 用户自定义的的热门城市
wx.navigateTo({
url: `plugin://citySelector/index?key=${key}&referer=${referer}&hotCitys=${hotCitys}`,
@@ -122,7 +125,11 @@
},
dingwei() {
const that = this;
+ const lat = this.$queue.getData('latitude');
+ const lon = this.$queue.getData('longitude');
uni.chooseLocation({
+ latitude: lat,
+ longitude: lon,
success: function(res) {
console.log(res)
console.log('位置名称:' + res.name);
@@ -130,7 +137,12 @@
console.log('纬度:' + res.latitude);
console.log('经度:' + res.longitude);
if (res.name && res.address) {
+ // #ifdef H5
+ that.loAcquire(res.longitude,res.latitude)
+ // #endif
+ // #ifdef MP-WEIXIN
that.initLocation(res.latitude, res.longitude);
+ // #endif
that.latitude = res.latitude;
that.longitude = res.longitude;
that.weizhi.names = res.name;
@@ -140,7 +152,24 @@
}
}
});
- }
+ },
+ loAcquire(longitude,latitude){
+ let that = this;
+ uni.showLoading({
+ title: '加载中',
+ mask:true
+ });
+ let str = `output=jsonp&key=J5FBZ-XCUKI-UFEG2-5KOJJ-XD4L3-KNFNG&location=${latitude},${longitude}`
+ this.$jsonp('https://apis.map.qq.com/ws/geocoder/v1/?'+str,{}).then(res=>{
+ uni.hideLoading();
+ if(res.status == 0){
+ console.log(res)
+ let s = res.result.ad_info.city.substring(0, res.result.ad_info.city.length - 1);
+ that.city = s;
+ console.log(that.city)
+ }
+ })
+ },
}
}
@@ -158,15 +187,13 @@
.search-bar {
display: flex;
align-items: center;
- position: relative;
padding: 27rpx 30rpx 35rpx;
background-color: #fff;
}
.search-bar-form {
- flex: 1;
- position: relative;
-
+ display: flex;
+ align-items: center;
}
.search-bar-box {
@@ -175,10 +202,14 @@
position: relative;
padding-left: 20rpx;
padding-right: 20rpx;
+ width: 538rpx;
height: 64rpx;
z-index: 1;
+ border-radius: 32rpx;
+ background: #f2f5f7;
+ margin-left: 20rpx;
}
-
+
.search-bar-input {
line-height: normal;
width: 100%;
@@ -323,23 +354,11 @@
color: #999;
}
- .navLeft {
- align-items: center;
- width: 20%;
- position: absolute;
- top: 20upx;
- text-align: center;
- }
.localName {
float: left;
}
- .search-bar-box {
- margin-left: 20%;
- border-radius: 32rpx;
- background: #f2f5f7;
- }
.bns {
position: fixed;
diff --git a/pages/index/tasksdetails.vue b/pages/index/tasksdetails.vue
index 4d19b80..0c62011 100644
--- a/pages/index/tasksdetails.vue
+++ b/pages/index/tasksdetails.vue
@@ -61,7 +61,7 @@
- 番茄会员满18元返18元
+ 番茄会员满{{info.memberPrice}}元返{{info.memberMoney}}元
开通会员
@@ -69,9 +69,9 @@
-
+
进入番茄饭团福利群
-
+
添加客服微信进入番茄饭团福利群
添加
@@ -90,7 +90,10 @@
立即抢单
-
+
+
复制店名
@@ -681,6 +684,14 @@
this.goLogin();
}
},
+ copyStoreName(){
+ uni.setClipboardData({
+ data: this.info.goodsTitle,
+ success: function () {
+ console.log('success');
+ }
+ });
+ },
}
}
diff --git a/pages/my/index.vue b/pages/my/index.vue
index 6d0f4e4..5b733b8 100644
--- a/pages/my/index.vue
+++ b/pages/my/index.vue
@@ -252,7 +252,11 @@
sumMoney: 0, //总收益
arr: [],
showModal: true,
- jifenJson: {}
+ jifenJson: {
+ totalMoney: 0,
+ convertibleMoney: 0,
+ exchangedMoney: 0,
+ }
}
},
@@ -778,7 +782,7 @@
display: flex;
align-items: center;
// height: 45upx;
- font-size: 20rpx;
+ font-size: 22rpx;
font-weight: 500;
color: #0C0C0C;
}
@@ -1047,8 +1051,8 @@
}
.tui-icon-box image {
- width: 48rpx;
- height: 48rpx;
+ width: 72rpx;
+ height: 72rpx;
}
.tui-order-list {
diff --git a/pages/my/myVIP.vue b/pages/my/myVIP.vue
index f6e0aaf..905f274 100644
--- a/pages/my/myVIP.vue
+++ b/pages/my/myVIP.vue
@@ -13,7 +13,7 @@
立即续费
-
+
Plus会员卡
@@ -28,15 +28,28 @@ color: #FFFFFF;">元
-
-
+
会员特权
-
-
-
+
+
+ 最高优惠
+ 可享受美食优惠 会员专属价格
+
+
+ 最高优惠
+ 可享受美食优惠 会员专属价格
+
+
+ 最高优惠
+ 可享受美食优惠 会员专属价格
+
+
+ 最高优惠
+ 可享受美食优惠 会员专属价格
+
@@ -119,6 +132,7 @@ color: #FFFFFF;">元
});
},
btns() {
+ var that = this;
let token = this.$queue.getData('token');
if (token) {
let userId = this.$queue.getData('userId');
@@ -144,7 +158,7 @@ color: #FFFFFF;">元
},
fail: function(err) {
uni.hideLoading();
- this.$queue.showToast('支付失败');
+ that.$queue.showToast('支付失败');
}
});
})
@@ -278,7 +292,8 @@ color: #FFFFFF;">元
}
.title-box{
width: 100%;
-
+ display: flex;
+ justify-content: center;
.title{
width: 262rpx;
height: 22rpx;
@@ -291,5 +306,34 @@ color: #FFFFFF;">元
font-size: 28rpx;
}
}
+ .special-box{
+ width: 100%;
+ display: flex;
+ flex-wrap: wrap;
+ justify-content: space-between;
+ padding: 80rpx;
+ .special-item{
+ width: 240rpx;
+ height: 240rpx;
+ border: 2rpx solid #E8CD9C;
+ border-radius: 50%;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ padding: 0 20rpx;
+ margin-bottom: 60rpx;
+ .t-word{
+ font-size: 28rpx;
+ color: #C7904E;
+ margin-bottom: 24rpx;
+ }
+ .desc{
+ color: #CCCCCC;
+ font-size: 24rpx;
+ text-align: center;
+ }
+ }
+ }
diff --git a/pages/order/index.vue b/pages/order/index.vue
index 0c61d4e..4432e2f 100644
--- a/pages/order/index.vue
+++ b/pages/order/index.vue
@@ -28,9 +28,9 @@
{{item.goodsTitle}}
-
- 会员满20返18
- 非会员满20返18
+
+
+ 返还{{item.memberMoney*100}}积分
@@ -441,6 +441,7 @@
padding: 16rpx;
display: flex;
justify-content: space-between;
+
// position: relative;
border-top: 2rpx solid #d9d9d9;
border-bottom: 2rpx solid #d9d9d9;
@@ -458,6 +459,24 @@
text-overflow:ellipsis;
white-space:nowrap;
}
+ .tag{
+ width: 200rpx;
+ height: 36rpx;
+ font-size: 20rpx;
+ background: #F8E3DF;
+ border: 2rpx solid #FF6A6A;
+ border-radius: 4rpx;
+ color: #FF4848;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ margin-top: 12rpx;
+ .jifen{
+ width: 22rpx;
+ height: 20rpx;
+ margin: 0 8rpx;
+ }
+ }
}
.info-right {
diff --git a/pages/public/login.vue b/pages/public/login.vue
index 37b1f26..332e394 100644
--- a/pages/public/login.vue
+++ b/pages/public/login.vue
@@ -5,13 +5,14 @@
- 番茄饭团
- 为了提供优质服务,需要您授权基本信息
-
+ 番茄饭团
+
+ 为了提供优质服务,需要您授权基本信息
《隐私政策》和
- 《用户服务协议》
+ 《用户服务协议》
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ text }}
+
+
+ 立即登录
+
+
+
+
+
\ No newline at end of file
+
diff --git a/pages/public/webview.vue b/pages/public/webview.vue
index f27becf..b7b9063 100644
--- a/pages/public/webview.vue
+++ b/pages/public/webview.vue
@@ -14,7 +14,7 @@
},
data() {
return {
- url: 'https://bwc.xianmxkj.com',
+ url: '',
webviewStyles: {
progress: {
color: '#FF3333'
@@ -23,6 +23,7 @@
};
},
onLoad(e) {
+ console.log(e)
if (e.title) {
uni.setNavigationBarTitle({
title: e.title
diff --git a/pages/task/search.vue b/pages/task/search.vue
index 5ca0397..f52bfa7 100644
--- a/pages/task/search.vue
+++ b/pages/task/search.vue
@@ -72,7 +72,6 @@
title: '搜索框输入为空'
});
} else {
-
let keywords = this.$queue.get(this.localKeyword);
if (JSON.stringify(keywords).indexOf(this.searchValue) === -1) {
this.$queue.insert({
@@ -86,6 +85,7 @@
let token = this.$queue.getData('token');
let userId = this.$queue.getData('userId');
+ console.log(token)
if (token) {
uni.navigateTo({
url: '/pages/task/tasklist?searchValue=' + this.searchValue +
diff --git a/pagesB/pages/member/chongzhi.vue b/pagesB/pages/member/chongzhi.vue
index aef8dc5..7802d73 100644
--- a/pagesB/pages/member/chongzhi.vue
+++ b/pagesB/pages/member/chongzhi.vue
@@ -42,10 +42,10 @@
支付宝
-
+
@@ -178,7 +178,7 @@
//订阅
if(this.showModal) {
- this.openMsg()
+ // this.openMsg()
}
}
},
@@ -190,7 +190,7 @@
withSubscriptions: true, //是否获取用户订阅消息的订阅状态,默认false不返回
success(ret) {
// console.log(ret,'------------------')
- console.log(Object.keys(ret.subscriptionsSetting.itemSettings).length)
+ // console.log(Object.keys(ret.subscriptionsSetting.itemSettings).length)
// if (JSON.stringify(ret.subscriptionsSetting.itemSettings).indexOf('accept')!=-1) {
if (ret.subscriptionsSetting.itemSettings) {
uni.setStorageSync('sendjifenMsg', true)
@@ -325,8 +325,9 @@
}
},
duihuanjilu() {
+ console.log('111')
uni.navigateTo({
- url: '/pages/member/jifen'
+ url: '/pagesB/pages/member/jifen'
});
},
goBack() {
@@ -348,12 +349,12 @@
// 绑定支付宝
bangding() {
uni.navigateTo({
- url: '/pages/member/zhifubao'
+ url: '/pagesB/pages/member/zhifubao'
});
},
goDetail() {
uni.navigateTo({
- url: '/pages/member/cashList'
+ url: '/pagesB/pages/member/cashList'
});
}
}
diff --git a/static/img/code-icon.png b/static/img/code-icon.png
new file mode 100644
index 0000000..70055ba
Binary files /dev/null and b/static/img/code-icon.png differ
diff --git a/static/img/home/guanggao.png b/static/img/home/guanggao.png
index 0c7b817..54d4bdf 100644
Binary files a/static/img/home/guanggao.png and b/static/img/home/guanggao.png differ
diff --git a/static/img/home/guanggao2.png b/static/img/home/guanggao2.png
index eefc2f8..42bddbe 100644
Binary files a/static/img/home/guanggao2.png and b/static/img/home/guanggao2.png differ
diff --git a/static/img/phone-icon.png b/static/img/phone-icon.png
new file mode 100644
index 0000000..3f4052b
Binary files /dev/null and b/static/img/phone-icon.png differ