[锶源昆仑-寺庙捐赠活动]

This commit is contained in:
2023-05-15 13:53:32 +08:00
parent 1b6eb2668c
commit c9b18c9074
284 changed files with 9505 additions and 3822 deletions

BIN
.DS_Store vendored Normal file

Binary file not shown.

2
.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
/unpackage
/node_modules

14
App.vue
View File

@@ -1,21 +1,25 @@
<script>
export default {
onLaunch: function() {
console.log('App Launch')
onLaunch(e) {
if(e.query.invite){
this.$store.commit('setParentId', e.query.invite)
}
},
onShow: function() {
console.log('App Show')
},
onHide: function() {
console.log('App Hide')
},
globalData: {
id: 1
}
}
</script>
<style>
.goPage {
position: fixed;
z-index: 100000;
}
/* 水平居中 */
.pack-center {
display: -webkit-box;

View File

@@ -9,7 +9,7 @@ import store from '@/store'
// 基础配置
const config = {
apiUrl : 'http://api.water.shangkelian.cn/api/', // 正式环境
apiUrl : 'http://api.temple.siyuankunlun.cn/api/', // 正式环境
timeout : 60000
}
@@ -145,7 +145,7 @@ const loginHint = () => {
success: res=> {
loginHintState = false
if (res.confirm) uni.reLaunch({
url: '/pages/index/index'
url: '/login/login'
})
}
})

View File

@@ -25,7 +25,17 @@ const getSms = (data) =>{
data: data
})
}
// 隐私+协议
const registeragree = (website) =>{
return request({
url: "cms/pages/" + website
})
}
export {
smsAuth,
getSms
getSms,
registeragree
}

View File

@@ -0,0 +1,25 @@
/**
* 手太欠
* 愿这世界都如故事里一样 美好而动人~
*/
import { request } from '../index'
const authFollow = (data) => {
return request({
url : 'user/auth/get_auth_url',
data: data
})
}
const wechatCode = (data) => {
return request({
url : 'user/auth/official_openid',
data: data
})
}
export {
authFollow,
wechatCode
}

View File

@@ -25,12 +25,17 @@ const goutAdd = (data) => {
}
// 查看病例
const goutSee = (data) => {
const goutSee = () => {
return request({
url: 'gout/result',
data:data
url: 'gout/result'
})
}
// const goutSee = (data) => {
// return request({
// url: 'gout/result',
// data:data
// })
// }
// 添加病例-图片
const goutCover = (case_id, data) => {
@@ -42,21 +47,14 @@ const goutCover = (case_id, data) => {
}
// 查看尿酸
const lastLog = type => {
const lastLog = () => {
return request({
url: 'gout/result/last_log',
data: {
type
}
url: 'gout/result/last_log'
})
}
// 添加尿酸值
// 添加报告
const AddlastLog = (user_case_id, data) => {
console.log(user_case_id)
console.log(data)
return request({
url: 'gout/result/' + user_case_id + '/logs',
method: 'POST',
@@ -119,6 +117,81 @@ const foodVote = (food_id, option_id) => {
})
}
// 时间轴
const timelSee = (data) => {
return request({
url: 'gout/result/timelines',
data: data
})
}
// 申请体验馆
const addRecord = (data) => {
return request({
url: 'gout/result/add_record',
method: 'POST',
data: data
})
}
// 确认开通身份
const identitySee = (identity_id) => {
return request({
url: 'user/identities/create/' + identity_id,
method: 'POST'
})
}
// 确认开通身份
const identityPay = (order_id, data) => {
return request({
url: 'user/identities/pay/' + order_id + '/wechat',
data: data
})
}
// 添加反馈
const addCase = (user_case_id,data) => {
return request({
url: 'gout/result/' + user_case_id + '/logs',
method: 'POST',
data: data
})
}
// 反馈列表
const surveys = (data) => {
return request({
url: 'gout/surveys',
data: data
})
}
// 反馈列表
const surveysForm = (data) => {
return request({
url: 'gout/surveys',
method: 'POST',
data: data
})
}
// 我的反馈前置
const feedback = (user_case_id) => {
return request({
url: 'gout/result/' + user_case_id + '/logs'
})
}
// 激活码支付
const codePay = (order_id,data) => {
return request({
url: 'user/identities/pay/' + order_id + '/invite',
method: 'POST',
data: data
})
}
export {
goutCreate,
goutAdd,
@@ -132,5 +205,14 @@ export {
allLogs,
foodList,
foodDet,
foodVote
foodVote,
timelSee,
addRecord,
identitySee,
identityPay,
addCase,
surveys,
surveysForm,
feedback,
codePay
}

View File

@@ -7,18 +7,50 @@
*/
import { request } from '../index'
// 首页
const index = () => {
// 捐赠-首页
const mallIndex = () => {
return request({
url: 'mall'
})
}
// 商品详情
const goods = (goods_id) => {
// 捐赠-查看
const donationSee = (data) =>{
return request({
url: 'mall/goods/' + goods_id
url: "mall/buy/goods",
data: data
})
}
// 捐赠-提交
const donationTake = (data) =>{
return request({
url: "mall/buy/goods",
method: 'POST',
data: data
})
}
// 捐赠-支付
const donationPay = (order_no, data) => {
return request({
url: 'mall/pay/' + order_no + '/wechat',
data: data
})
}
// 首页
const index = () => {
return request({
url: 'gout'
})
}
// 商品详情
const goods = (activity_id) => {
return request({
url: 'mall/activities/' + activity_id
})
}
@@ -65,13 +97,51 @@ const create = (data) => {
})
}
// 喝水打卡日历
const calendar = () => {
return request({
url: 'user/sign'
})
}
// 喝水打卡
const sign = () => {
return request({
url: 'user/sign',
method: 'POST'
})
}
// 喝水补卡
const replenish = (data) => {
return request({
url: 'user/sign/replenish',
method: 'POST',
data: data
})
}
// 打卡海报背景
const poster = () => {
return request({
url: 'user/sign/backgrounds'
})
}
export {
mallIndex,
donationSee,
donationTake,
donationPay,
index,
goods,
artiicle,
storeAudit,
storeDeliver,
Receive,
create
create,
calendar,
sign,
replenish,
poster
}

80
apis/interfaces/member.js Normal file
View File

@@ -0,0 +1,80 @@
/**
* Web唐明明
* 匆匆数载恍如梦,岁月迢迢华发增。
* 碌碌无为枉半生,一朝惊醒万事空。
* moduleName: 开通会员
*/
import { request } from '../index'
// 获取可开通身份内容
const openSee = () =>{
return request({
url: "user/identities/create/2"
})
}
// 开通会员身份
const openIndex = (identity_id, data) =>{
return request({
url: "user/identities/create/" + identity_id,
method: 'POST',
data: data
})
}
// 会员权益信息
const openInfo = (data) =>{
return request({
url: "user/identities",
data: data
})
}
// 会员权益信息
const identitySee = (identity) =>{
return request({
url: "user/identities/" + identity
})
}
// 开通合伙人
const memberOpen = (data) =>{
return request({
url: "user/identities/partner",
method: 'POST',
data: data
})
}
// 合伙人状态
const partnerSee = () =>{
return request({
url: "user/identities/partner/create"
})
}
// 开通前置
const identitiesee = (identity_id) =>{
return request({
url: "user/identities/create/" + identity_id
})
}
// 获取jssdk
const getJssdk = (data) => {
return request({
url: 'user/auth/get_jssdk',
data: data
})
}
export {
openSee,
openIndex,
openInfo,
identitySee,
memberOpen,
partnerSee,
identitiesee,
getJssdk
}

100
apis/interfaces/stock.js Normal file
View File

@@ -0,0 +1,100 @@
/**
* Web唐明明
* 匆匆数载恍如梦,岁月迢迢华发增。
* 碌碌无为枉半生,一朝惊醒万事空。
* moduleName: 库存
*/
import { request } from '../index'
// 提货前置
const pick = () =>{
return request({
url: "user/stock/pick"
})
}
// 提货列表-记录
const list = (data) =>{
return request({
url: "user/stock",
data: data
})
}
// 提货提交
const pickTake = (data) =>{
return request({
url: "user/stock/pick",
method: 'POST',
data: data
})
}
// 账变记录
const logs = (data) =>{
return request({
url: "user/stock/logs",
data: data
})
}
// 地址列表
const siteList = () =>{
return request({
url: "mall/addresses"
})
}
// 新增地址
const siteAdd = (data) =>{
return request({
url: "mall/addresses",
method: 'POST',
data: data
})
}
// 编辑地址
const siteEdit = (data) =>{
return request({
url: "mall/addresses/" + address,
method: 'PUT',
data: data
})
}
// 查看地址详情
const siteSee = (address) =>{
return request({
url: "mall/addresses/" + address
})
}
// 设置默认地址
const siteDef = () =>{
return request({
url: "mall/addresses/" + address + "/default",
method: 'POST'
})
}
// 删除地址
const siteDel = (address) =>{
return request({
url: "mall/addresses/" + address,
method: 'DELETE'
})
}
export {
pick,
list,
pickTake,
logs,
siteList,
siteAdd,
siteEdit,
siteSee,
siteDef,
siteDel
}

View File

@@ -11,7 +11,7 @@ import { request } from '../index'
// 用户信息
const userIndex = () => {
return request({
url: 'user/info'
url: 'user'
})
}
@@ -47,10 +47,19 @@ const goodsSign = (order_no) => {
}, true)
}
// 我的伙伴
const relations = () => {
// 取消订单
const goodsCancel = (order_no) => {
return request({
url: 'user/relations'
url: 'mall/orders/' + order_no + '/cancel',
method: 'PUT'
}, true)
}
// 我的伙伴
const relations = (data) => {
return request({
url: 'user/relations',
data: data
})
}
@@ -61,12 +70,232 @@ const invite = () => {
})
}
// 消息
const notice = () => {
return request({
url: 'notifications'
})
}
// 消息列表
const noticeList = (type) => {
return request({
url: 'notifications/' + type + '/list'
})
}
// 消息详情
const noticeShow = (notification_id) => {
return request({
url: 'notifications/' + notification_id
})
}
// 推荐用户排行榜
const rankUser = () => {
return request({
url: 'user/rank/totaluser'
})
}
// 喝水打卡排行榜
const rankWater = () => {
return request({
url: 'user/sign/ranks'
})
}
// 水滴账户
const score = (data) => {
return request({
url: 'user/account/score',
data: data
})
}
// 现金账户
const account = (data) => {
return request({
url: 'user/account/balance',
data: data
})
}
// 添加账户前置
const create = () => {
return request({
url: 'withdraws/accounts/create'
})
}
// 添加账户
const createAdd = (data) => {
return request({
url: 'withdraws/accounts',
method: 'POST',
data: data
})
}
// 提现前置
const createUser = () => {
return request({
url: 'withdraws/index/create'
})
}
// 我的账户
const createList = (data) => {
return request({
url: 'withdraws/accounts',
data: data
})
}
// 删除银行卡
const bankDel = (bank_account_id) => {
return request({
url: 'withdraws/accounts/' + bank_account_id,
method: 'DELETE'
})
}
// 账户编辑
const bankEdit = (bank_account_id) => {
return request({
url: 'withdraws/accounts/' + bank_account_id + '/edit',
})
}
// 账户编辑提交
const bankPut = (bank_account_id, data) => {
return request({
url: 'withdraws/accounts/' + bank_account_id,
method: 'PUT',
data: data
})
}
// 提现提交
const bankCash = (data) => {
return request({
url: 'withdraws/index',
method: 'POST',
data: data
})
}
// 我的提现记录
const bankList = (data) => {
return request({
url: 'withdraws/index',
data: data
})
}
// 我的抵值券
const coupon = (data) => {
return request({
url: 'coupons/user/coupons',
data: data
})
}
// 我的抵值券列表
const couponList = (coupon_id, data) => {
return request({
url: 'coupons/user/coupons/' + coupon_id + '/list',
data: data
})
}
// 激活码管理
const invites = (data) => {
return request({
url: 'user/invites',
data: data
})
}
// wxjsdk
const jsdkInfo = url => {
return request({
url: 'user/auth/official_share',
data: {
url
}
})
}
// 分享排行榜
const rankShare = () => {
return request({
url: 'user/rank/totaluser'
})
}
// 功德排行榜
const rankMerits = () => {
return request({
url: 'user/rank/merit'
})
}
// 查看数据
const censusData = () => {
return request({
url: 'data'
})
}
// 查看数据-订单列表
const dataOrder = (data) => {
return request({
url: 'data/orders',
data: data
})
}
// 查看数据-订单列表
const dataUser = (data) => {
return request({
url: 'data/users',
data: data
})
}
export {
userIndex,
setting,
orders,
goodsDet,
goodsSign,
goodsCancel,
relations,
invite
invite,
notice,
noticeList,
noticeShow,
rankUser,
rankWater,
score,
account,
create,
createAdd,
createUser,
createList,
bankDel,
bankEdit,
bankPut,
bankCash,
bankList,
coupon,
couponList,
invites,
jsdkInfo,
rankShare,
rankMerits,
censusData,
dataOrder,
dataUser
}

15
main.js
View File

@@ -3,10 +3,25 @@ import App from './App'
// #ifndef VUE3
import Vue from 'vue';
import { router, RouterMount } from './router';
// jsonp-地图
import { VueJsonp } from 'vue-jsonp'
// 导入组件库-海报
import VueCanvasPoster from 'vue-canvas-poster'
import store from './store';
import uView from "uview-ui";
Vue.use(uView);
Vue.use(router)
// 注册组件库-海报
Vue.use(VueCanvasPoster)
Vue.prototype.$wx = require('jweixin-module')
// jsonp-地图
Vue.use(VueJsonp)
Vue.config.productionTip = false
Vue.prototype.$store = store
App.mpType = 'app'

View File

@@ -50,7 +50,7 @@
"quickapp" : {},
/* */
"mp-weixin" : {
"appid" : "",
"appid" : "wx97cd08eca12a4d48",
"setting" : {
"urlCheck" : false
},
@@ -75,7 +75,20 @@
},
"title" : "“锶源昆仑”天然矿泉水",
"devServer" : {
"https" : true
"https" : false,
"disableHostCheck" : true
},
"sdkConfigs" : {
"maps" : {
"qqmap" : {
"key" : "MDGBZ-WDNC4-P6EUO-DOPPE-JAMMJ-ZNBA4"
}
}
},
"optimization" : {
"treeShaking" : {
"enable" : true
}
}
}
}

341
package-lock.json generated
View File

@@ -1,9 +1,313 @@
{
"name": "medical",
"version": "1.0.0",
"lockfileVersion": 1,
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "medical",
"version": "1.0.0",
"license": "ISC",
"dependencies": {
"jweixin-module": "^1.6.0",
"uni-read-pages": "^1.0.5",
"uni-simple-router": "^2.0.7",
"uview-ui": "^1.8.4",
"vue-canvas-poster": "^1.2.1",
"vuex": "^3.6.2",
"wxjssdk": "^1.0.1"
},
"devDependencies": {
"vue-jsonp": "^2.0.0"
}
},
"node_modules/@babel/parser": {
"version": "7.18.11",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.18.11.tgz",
"integrity": "sha512-9JKn5vN+hDt0Hdqn1PiJ2guflwP+B6Ga8qbDuoF0PzzVhrzsKIJo8yGqVk6CmMHiMei9w1C1Bp9IMJSIK+HPIQ==",
"bin": {
"parser": "bin/babel-parser.js"
},
"engines": {
"node": ">=6.0.0"
}
},
"node_modules/@vue/compiler-sfc": {
"version": "2.7.8",
"resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-2.7.8.tgz",
"integrity": "sha512-2DK4YWKfgLnW9VDR9gnju1gcYRk3flKj8UNsms7fsRmFcg35slVTZEkqwBtX+wJBXaamFfn6NxSsZh3h12Ix/Q==",
"dependencies": {
"@babel/parser": "^7.18.4",
"postcss": "^8.4.14",
"source-map": "^0.6.1"
}
},
"node_modules/core-js": {
"version": "2.6.12",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz",
"integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==",
"deprecated": "core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.",
"hasInstallScript": true
},
"node_modules/csstype": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.0.tgz",
"integrity": "sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA=="
},
"node_modules/encoding": {
"version": "0.1.13",
"resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz",
"integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==",
"dependencies": {
"iconv-lite": "^0.6.2"
}
},
"node_modules/iconv-lite": {
"version": "0.6.3",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
"integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",
"dependencies": {
"safer-buffer": ">= 2.1.2 < 3.0.0"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/is-stream": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz",
"integrity": "sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/jweixin-module": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/jweixin-module/-/jweixin-module-1.6.0.tgz",
"integrity": "sha512-dGk9cf+ipipHmtzYmKZs5B2toX+p4hLyllGLF6xuC8t+B05oYxd8fYoaRz0T30U2n3RUv8a4iwvjhA+OcYz52w=="
},
"node_modules/nanoid": {
"version": "3.3.4",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz",
"integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==",
"bin": {
"nanoid": "bin/nanoid.cjs"
},
"engines": {
"node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
}
},
"node_modules/node-fetch": {
"version": "1.7.3",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.3.tgz",
"integrity": "sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ==",
"dependencies": {
"encoding": "^0.1.11",
"is-stream": "^1.0.1"
}
},
"node_modules/picocolors": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz",
"integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ=="
},
"node_modules/postcss": {
"version": "8.4.16",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.16.tgz",
"integrity": "sha512-ipHE1XBvKzm5xI7hiHCZJCSugxvsdq2mPnsq5+UF+VHCjiBvtDrlxJfMBToWaP9D5XlgNmcFGqoHmUn0EYEaRQ==",
"funding": [
{
"type": "opencollective",
"url": "https://opencollective.com/postcss/"
},
{
"type": "tidelift",
"url": "https://tidelift.com/funding/github/npm/postcss"
}
],
"dependencies": {
"nanoid": "^3.3.4",
"picocolors": "^1.0.0",
"source-map-js": "^1.0.2"
},
"engines": {
"node": "^10 || ^12 || >=14"
}
},
"node_modules/safer-buffer": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
},
"node_modules/source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/source-map-js": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz",
"integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/uni-read-pages": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/uni-read-pages/-/uni-read-pages-1.0.5.tgz",
"integrity": "sha512-GkrrZ0LX0vn9R5k6RKEi0Ez3Q3e2vUpjXQ8Z6/K/d28KudI9ajqgt8WEjQFlG5EPm1K6uTArN8LlqmZTEixDUA==",
"hasInstallScript": true
},
"node_modules/uni-simple-router": {
"version": "2.0.7",
"resolved": "https://registry.npmjs.org/uni-simple-router/-/uni-simple-router-2.0.7.tgz",
"integrity": "sha512-8FKv5dw7Eoonm0gkO8udprrxzin0fNUI0+AvIphFkFRH5ZmP5ZWJ2pvnWzb2NiiqQSECTSU5VSB7HhvOSwD5eA=="
},
"node_modules/uview-ui": {
"version": "1.8.4",
"resolved": "https://registry.npmjs.org/uview-ui/-/uview-ui-1.8.4.tgz",
"integrity": "sha512-Zr+D5dFdNy6CdHQLBEXeGq/w0LkjxzBtsgaaDwLl0P58g67H7fBBDvy6AzWK/k0c7dwPYMBiK7I4Tr9p92+0DA=="
},
"node_modules/vue": {
"version": "2.7.8",
"resolved": "https://registry.npmjs.org/vue/-/vue-2.7.8.tgz",
"integrity": "sha512-ncwlZx5qOcn754bCu5/tS/IWPhXHopfit79cx+uIlLMyt3vCMGcXai5yCG5y+I6cDmEj4ukRYyZail9FTQh7lQ==",
"dependencies": {
"@vue/compiler-sfc": "2.7.8",
"csstype": "^3.1.0"
}
},
"node_modules/vue-canvas-poster": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/vue-canvas-poster/-/vue-canvas-poster-1.2.1.tgz",
"integrity": "sha512-YY5ygbeQSqhiJyj6QXYgSRZ6Ywhvi1gVsfcvBIoCx4Yq9E/gAV32uOhnZz45qsklP86uGc9ypKJAXiX6Dzrdxw==",
"dependencies": {
"core-js": "^2.6.5",
"vue": "^2.6.10"
}
},
"node_modules/vue-jsonp": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/vue-jsonp/-/vue-jsonp-2.0.0.tgz",
"integrity": "sha512-Mzd9GNeuKP5hHFDWZNMWOsCuMILSkA6jo2l4A02wheFz3qqBzH7aSEFTey1BRCZCLizlaf1EqJ5YUtF392KspA==",
"dev": true
},
"node_modules/vuex": {
"version": "3.6.2",
"resolved": "https://registry.npmjs.org/vuex/-/vuex-3.6.2.tgz",
"integrity": "sha512-ETW44IqCgBpVomy520DT5jf8n0zoCac+sxWnn+hMe/CzaSejb/eVw2YToiXYX+Ex/AuHHia28vWTq4goAexFbw==",
"peerDependencies": {
"vue": "^2.0.0"
}
},
"node_modules/wxjssdk": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/wxjssdk/-/wxjssdk-1.0.1.tgz",
"integrity": "sha512-tY69YisKIiG6jT0cnTIwTvK4I6ivF8iWXyq5tmgVULiyKPRAWRDEIwhWUdHi7NljN9PQeLOZudUaiIq4gGfefA==",
"dependencies": {
"node-fetch": "^1.6.3"
}
}
},
"dependencies": {
"@babel/parser": {
"version": "7.18.11",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.18.11.tgz",
"integrity": "sha512-9JKn5vN+hDt0Hdqn1PiJ2guflwP+B6Ga8qbDuoF0PzzVhrzsKIJo8yGqVk6CmMHiMei9w1C1Bp9IMJSIK+HPIQ=="
},
"@vue/compiler-sfc": {
"version": "2.7.8",
"resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-2.7.8.tgz",
"integrity": "sha512-2DK4YWKfgLnW9VDR9gnju1gcYRk3flKj8UNsms7fsRmFcg35slVTZEkqwBtX+wJBXaamFfn6NxSsZh3h12Ix/Q==",
"requires": {
"@babel/parser": "^7.18.4",
"postcss": "^8.4.14",
"source-map": "^0.6.1"
}
},
"core-js": {
"version": "2.6.12",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz",
"integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ=="
},
"csstype": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.0.tgz",
"integrity": "sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA=="
},
"encoding": {
"version": "0.1.13",
"resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz",
"integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==",
"requires": {
"iconv-lite": "^0.6.2"
}
},
"iconv-lite": {
"version": "0.6.3",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
"integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",
"requires": {
"safer-buffer": ">= 2.1.2 < 3.0.0"
}
},
"is-stream": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz",
"integrity": "sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ=="
},
"jweixin-module": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/jweixin-module/-/jweixin-module-1.6.0.tgz",
"integrity": "sha512-dGk9cf+ipipHmtzYmKZs5B2toX+p4hLyllGLF6xuC8t+B05oYxd8fYoaRz0T30U2n3RUv8a4iwvjhA+OcYz52w=="
},
"nanoid": {
"version": "3.3.4",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz",
"integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw=="
},
"node-fetch": {
"version": "1.7.3",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.3.tgz",
"integrity": "sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ==",
"requires": {
"encoding": "^0.1.11",
"is-stream": "^1.0.1"
}
},
"picocolors": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz",
"integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ=="
},
"postcss": {
"version": "8.4.16",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.16.tgz",
"integrity": "sha512-ipHE1XBvKzm5xI7hiHCZJCSugxvsdq2mPnsq5+UF+VHCjiBvtDrlxJfMBToWaP9D5XlgNmcFGqoHmUn0EYEaRQ==",
"requires": {
"nanoid": "^3.3.4",
"picocolors": "^1.0.0",
"source-map-js": "^1.0.2"
}
},
"safer-buffer": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
},
"source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="
},
"source-map-js": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz",
"integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw=="
},
"uni-read-pages": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/uni-read-pages/-/uni-read-pages-1.0.5.tgz",
@@ -19,10 +323,43 @@
"resolved": "https://registry.npmjs.org/uview-ui/-/uview-ui-1.8.4.tgz",
"integrity": "sha512-Zr+D5dFdNy6CdHQLBEXeGq/w0LkjxzBtsgaaDwLl0P58g67H7fBBDvy6AzWK/k0c7dwPYMBiK7I4Tr9p92+0DA=="
},
"vue": {
"version": "2.7.8",
"resolved": "https://registry.npmjs.org/vue/-/vue-2.7.8.tgz",
"integrity": "sha512-ncwlZx5qOcn754bCu5/tS/IWPhXHopfit79cx+uIlLMyt3vCMGcXai5yCG5y+I6cDmEj4ukRYyZail9FTQh7lQ==",
"requires": {
"@vue/compiler-sfc": "2.7.8",
"csstype": "^3.1.0"
}
},
"vue-canvas-poster": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/vue-canvas-poster/-/vue-canvas-poster-1.2.1.tgz",
"integrity": "sha512-YY5ygbeQSqhiJyj6QXYgSRZ6Ywhvi1gVsfcvBIoCx4Yq9E/gAV32uOhnZz45qsklP86uGc9ypKJAXiX6Dzrdxw==",
"requires": {
"core-js": "^2.6.5",
"vue": "^2.6.10"
}
},
"vue-jsonp": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/vue-jsonp/-/vue-jsonp-2.0.0.tgz",
"integrity": "sha512-Mzd9GNeuKP5hHFDWZNMWOsCuMILSkA6jo2l4A02wheFz3qqBzH7aSEFTey1BRCZCLizlaf1EqJ5YUtF392KspA==",
"dev": true
},
"vuex": {
"version": "3.6.2",
"resolved": "https://registry.npmjs.org/vuex/-/vuex-3.6.2.tgz",
"integrity": "sha512-ETW44IqCgBpVomy520DT5jf8n0zoCac+sxWnn+hMe/CzaSejb/eVw2YToiXYX+Ex/AuHHia28vWTq4goAexFbw=="
"integrity": "sha512-ETW44IqCgBpVomy520DT5jf8n0zoCac+sxWnn+hMe/CzaSejb/eVw2YToiXYX+Ex/AuHHia28vWTq4goAexFbw==",
"requires": {}
},
"wxjssdk": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/wxjssdk/-/wxjssdk-1.0.1.tgz",
"integrity": "sha512-tY69YisKIiG6jT0cnTIwTvK4I6ivF8iWXyq5tmgVULiyKPRAWRDEIwhWUdHi7NljN9PQeLOZudUaiIq4gGfefA==",
"requires": {
"node-fetch": "^1.6.3"
}
}
}
}

View File

@@ -4,15 +4,20 @@
"description": "",
"main": "main.js",
"dependencies": {
"jweixin-module": "^1.6.0",
"uni-read-pages": "^1.0.5",
"uni-simple-router": "^2.0.7",
"uview-ui": "^1.8.4",
"vuex": "^3.6.2"
"vue-canvas-poster": "^1.2.1",
"vuex": "^3.6.2",
"wxjssdk": "^1.0.1"
},
"devDependencies": {},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "唐明明",
"license": "ISC"
"license": "ISC",
"devDependencies": {
"vue-jsonp": "^2.0.0"
}
}

View File

@@ -1,24 +1,33 @@
{
"pages": [{
"path": "pages/index/index",
"aliasPath": "/",
"aliasPath": "/index/index",
"name": "Index",
"style":{
"navigationBarTitleText":"首页"
"navigationBarTitleText":"修缮寺庙 功德无量"
}
}, {
"path": "pages/index/details",
"aliasPath": "/index/details",
"name": "Indexdetails",
},{
"path": "pages/index/place",
"aliasPath": "/index/place",
"name": "indexPlace",
"auth": true,
"style":{
"navigationBarTitleText":"商品详情"
"navigationBarTitleText":"捐赠活动"
}
},{
"path": "pages/index/pay",
"aliasPath": "/index/pay",
"name": "indexPay",
"auth": true,
"style":{
"navigationBarTitleText":"支付"
}
}, {
"path": "pages/user/index",
"aliasPath": "/user",
"aliasPath": "/user/index",
"name": "User",
"style":{
"navigationBarTitleText":"我的"
"navigationBarTitleText":"锶人中心"
}
}, {
"path": "pages/user/code",
@@ -29,49 +38,39 @@
"navigationBarTitleText":"我的推广码"
}
}, {
"path": "pages/circle/index",
"aliasPath": "/circle",
"name": "Circle",
"path": "pages/user/census",
"aliasPath": "/user/census",
"name": "UserCensus",
"style":{
"navigationBarTitleText":"病友记"
"navigationBarTitleText":"统计数据"
}
}, {
"path": "pages/purine/index",
"aliasPath": "/purine/index",
"name": "purineIndex",
"path": "pages/user/censusOrder",
"aliasPath": "/user/censusOrder",
"name": "CensusOrder",
"style":{
"navigationBarTitleText":"健康饮食"
"navigationBarTitleText":""
}
}, {
"path": "pages/purine/details",
"aliasPath": "/purine/details",
"name": "purineDetails",
"path": "pages/user/censusUser",
"aliasPath": "/user/censusUser",
"name": "CensusUser",
"style":{
"navigationBarTitleText":"食品详情"
"navigationBarTitleText":"捐献人数"
}
}, {
"path": "pages/uricacid/index",
"aliasPath": "/uricacid/index",
"name": "uricacidIndex",
"auth": true,
"path": "pages/user/product",
"aliasPath": "/user/product",
"name": "UserProduct",
"style":{
"navigationBarTitleText":"记录"
"navigationBarTitleText":"关于产品"
}
}, {
"path": "pages/uricacid/list",
"aliasPath": "/uricacid/list",
"name": "uricacidList",
"auth": true,
"path": "pages/user/tips",
"aliasPath": "/user/tips",
"name": "UserTips",
"style":{
"navigationBarTitleText":"记录列表"
}
}, {
"path": "pages/attestation/index",
"aliasPath": "/attestation/index",
"name": "Attestation",
"auth": true,
"style":{
"navigationBarTitleText":"认证"
"navigationBarTitleText":"敬请期待"
}
}, {
"path": "pages/friend/index",
@@ -81,6 +80,59 @@
"style":{
"navigationBarTitleText":"邀请记录"
}
}, {
"path": "pages/bond/index",
"aliasPath": "/bond/index",
"name": "bondIndex",
"auth": true,
"style":{
"navigationBarTitleText":"支付成功"
}
}, {
"path": "pages/bond/tips",
"aliasPath": "/bond/tips",
"name": "bondTips",
"auth": true,
"style":{
"navigationBarTitleText":"支付成功"
}
},{
"path": "pages/member/index",
"aliasPath": "/member/index",
"name": "memberIndex",
"auth": true,
"style":{
"navigationBarTitleText":"开通会员"
}
},{
"path": "pages/member/rights",
"aliasPath": "/member/rights",
"name": "membeRights",
"style":{
"navigationBarTitleText":"会员权益"
}
},{
"path": "pages/member/look",
"aliasPath": "/member/look",
"name": "membeLook",
"style":{
"navigationBarTitleText":"会员权益"
}
},{
"path": "pages/member/open",
"aliasPath": "/member/open",
"name": "memberOpen",
"style":{
"navigationBarTitleText":"开通会员"
}
},{
"path": "pages/member/partner",
"aliasPath": "/member/partner",
"name": "memberPartner",
"auth": true,
"style":{
"navigationBarTitleText":"合伙人"
}
}, {
"path": "pages/order/index",
"aliasPath": "/order/index",
@@ -89,56 +141,100 @@
"style":{
"navigationBarTitleText":"我的订单"
}
}, {
"path": "pages/order/details",
"aliasPath": "/order/details",
"name": "OrderDetails",
},{
"path": "pages/wechat/index",
"aliasPath": "/wechat",
"name": "weChatIndex",
"style":{
"navigationBarTitleText":"微信授权"
}
},{
"path": "pages/webview/index",
"aliasPath": "/webview",
"name": "webviewIndex",
"auth": true,
"style":{
"navigationBarTitleText":"订单详情"
"navigationBarTitleText":"微信授权"
}
},{
"path": "pages/address/index",
"aliasPath": "/address/index",
"name": "addressIndex",
"style":{
"navigationBarTitleText":"地址管理"
}
},{
"path": "pages/address/add",
"aliasPath": "/address/add",
"name": "addressAdd",
"style":{
"navigationBarTitleText":"添加地址"
}
}, {
"path": "pages/receive/index",
"aliasPath": "/receive/index",
"name": "Receive",
"style":{
"navigationBarTitleText":"文章详情"
}
},{
"path": "pages/login/login",
"aliasPath": "/login",
"name": "Login"
},{
"path": "pages/userCase/userCase",
"aliasPath": "/userCase/userCase",
"name": "UserCase"
"aliasPath": "/login/login",
"name": "Login",
"style":{
"navigationBarTitleText":"锶源昆仑"
}
}, {
"path": "pages/login/agreement",
"aliasPath": "/login/agreement",
"name": "Agreement"
}, {
"path": "pages/merits/index",
"aliasPath": "/merits/index",
"name": "meritsIndex",
"style":{
"navigationBarTitleText":"功德榜"
}
}, {
"path": "pages/share/index",
"aliasPath": "/share/index",
"name": "shareIndex",
"style":{
"navigationBarTitleText":"分享榜"
}
}, {
"path": "pages/redPaper/index",
"aliasPath": "/redPaper/index",
"name": "redPaperIndex",
"style":{
"navigationBarTitleText":"红包"
}
}],
"globalStyle": {
"navigationBarTitleText": "痛风记录",
"backgroundColor": "#f3f4f6",
"navigationStyle": "custom"
},
"tabBar": {
"list": [{
"pagePath": "pages/index/index",
"iconPath": "static/tabBar/tabBar_icon_00.png",
"selectedIconPath": "static/tabBar/tabBar_show_00.png",
"text": "首页"
}, {
"pagePath": "pages/user/index",
"iconPath": "static/tabBar/tabBar_icon_02.png",
"selectedIconPath": "static/tabBar/tabBar_show_02.png",
"text": "我的"
}],
"borderStyle": "white",
"backgroundColor": "#FFFFFF",
"selectedColor": "#4490ff",
"color": "#9d9d9d",
"iconWidth": "26px",
"spacing": "0",
"height": "60px"
},
"easycom": {
"^u-(.*)": "uview-ui/components/u-$1/u-$1.vue"
},
"tabBar": {
"color": "#9b9f9f",
"selectedColor": "#000000",
"backgroundColor": "#FFFFFF",
"borderStyle": "#ddd",
"list": [{
"pagePath": "pages/index/index",
"text": "捐赠活动",
"iconPath": "static/tabBar/tabBar_icon_00.png",
"selectedIconPath": "static/tabBar/tabBar_show_00.png"
},{
"pagePath": "pages/merits/index",
"text": "功德榜",
"iconPath": "static/tabBar/tabBar_icon_01.png",
"selectedIconPath": "static/tabBar/tabBar_show_01.png"
},{
"pagePath": "pages/share/index",
"text": "分享榜",
"iconPath": "static/tabBar/tabBar_icon_02.png",
"selectedIconPath": "static/tabBar/tabBar_show_02.png"
}, {
"pagePath": "pages/user/index",
"text": "我的",
"iconPath": "static/tabBar/tabBar_icon_03.png",
"selectedIconPath": "static/tabBar/tabBar_show_03.png"
}]
}
}

BIN
pages/.DS_Store vendored Normal file

Binary file not shown.

309
pages/address/add.vue Normal file
View File

@@ -0,0 +1,309 @@
<template>
<view class="content">
<form @submit="siteform" class="site-form">
<view class="site-input">
<label>收货人</label>
<input placeholder="请输入收货人姓名" name="name" :value="site.name"></input>
</view>
<view class="site-input">
<label>手机号码</label>
<input placeholder="请输入手机号码" maxlength="11" name="mobile" type="number" :value="site.mobile"></input>
</view>
<view class="site-input">
<label>所在省份</label>
<picker @change="areasChange" :value="area.areaIndex" :range="area.areasArr" :range-key="'name'">
<view class="picker" v-if="area.areasArr[area.areaIndex]">
{{ area.areasArr[area.areaIndex].name }}
</view>
<image src="/static/icon/rightsArrow.png"></image>
</picker>
</view>
<view class="site-input">
<label>所在城市</label>
<picker @change="cityDrop" :value="city.cityIndex" :range="city.cityArr" :range-key="'name'" class="conneColor">
<view class="picker" v-if="city.cityArr[city.cityIndex]">
{{ city.cityArr[city.cityIndex].name }}
</view>
<image src="/static/icon/rightsArrow.png"></image>
</picker>
</view>
<view class="site-input">
<label>所在区域</label>
<picker @change="regiDrop" :value="regi.regiIndex" :range="regi.regiArr" :range-key="'name'" class="conneColor">
<view class="picker" v-if="regi.regiArr[regi.regiIndex]">
{{ regi.regiArr[regi.regiIndex].name }}
</view>
<image src="/static/icon/rightsArrow.png"></image>
</picker>
</view>
<view class="site-input">
<label>收货地址</label>
<input placeholder="请输入详细地址" name="address" :value="site.address"></input>
</view>
<view class="site-switch">
<text>设置默认地址</text>
<switch style='zoom:.6;' :checked="site.defaultVal" @change="addressDefault" color="#1d37e2"/>
</view>
<view class="site-btn">
<button form-type="submit" size="mini" :disabled="disabled">保存</button>
</view>
</form>
</view>
</template>
<script>
import { userIndex } from '@/apis/interfaces/user'
import { siteAdd, siteSee } from '@/apis/interfaces/stock'
import { create } from '@/apis/interfaces/mall'
export default {
data() {
return {
site: {
name : '', // 姓名
mobile : '', // 电话
address : '', // 地址
defaultVal: '', // 默认地址
},
// 省份选择
area: {
areasArr : [],
areaId : '',
areaIndex : 0,
},
// 市级选择
city: {
cityArr : [],
cityId : 0,
cityIndex : 0,
},
// 区域选择
regi: {
regiArr : [],
regiId : 0,
regiIndex : 0,
},
disabled : false
}
},
created() {
userIndex().then(res => {
this.site.name = res.nickname
this.site.mobile = res.username
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
},
onShow() {
if(this.$Route.query.experience) {
this.area.areaIndex = 18
}
// 获取省市区列表
this.createInfo();
//if(this.$Route.query.ediStatet == 'compile') {
// 获取地址详情
// this.createSee();
//}
},
methods: {
// 地址详情
// createSee() {
// siteSee(this.$Route.query.id).then(res => {
// this.site.name = res.name
// this.site.mobile = res.mobile
// this.site.address = res.address
// this.site.defaultVal = res.default
// }).catch(err => {
// uni.showToast({
// title: err.message,
// icon: "none"
// })
// })
// },
// 省市区列表
createInfo() {
create().then(res => {
let areas = res,
areaIndex = this.area.areaIndex
this.area.areaId = areas[areaIndex].id
this.area.areasArr= areas
this.citylist(areas[areaIndex].id)
}).catch(err => {
uni.showToast({
title: err.message,
icon: "none"
})
})
},
// 所在省份-下拉
areasChange(e) {
let area = this.area.areasArr,
index = e.detail.value,
atcode = area[index].id
if (index != this.area.areaIndex) {
this.area.areaIndex = index
this.area.areaId = atcode
// 获取市级列表
this.citylist(atcode)
}
},
// 市级列表
citylist(cityId) {
create({
parent_id: cityId
}).then(res=>{
let cityArr = res
// 从体验官入口进入 默认为深圳
if(this.$Route.query.experience) {
this.city.cityId = cityArr[2].id
this.city.cityIndex = 2
this.city.cityArr = cityArr
this.regilist(cityArr[2].id)
return
}
this.city.cityId = cityArr[0].id
this.city.cityIndex = 0
this.city.cityArr = cityArr
this.regilist(cityArr[0].id)
})
},
// 市级下拉筛选
cityDrop(e) {
let city = this.city.cityArr,
index = e.detail.value,
citycode = city[index].id
if (index != this.area.areaIndex) {
this.city.cityIndex = index
this.city.cityId = citycode
// 获取市级列表
this.regilist(citycode)
}
},
// 区列表
regilist(areaId) {
create({
parent_id: areaId
}).then(res=>{
this.regi.regiArr = res
this.regi.regiId = res[0].id
this.regi.regiIndex = 0
})
},
// 区下拉筛选
regiDrop(e) {
let newIndex = e.detail.value
this.regi.regiIndex = newIndex
this.regi.regiId = this.regi.regiArr[newIndex].id
},
// 设为默认地址
addressDefault(e) {
this.site.defaultVal = e.detail.value
},
// 提交表单
siteform(e) {
let value = e.detail.value
let data = {
name : value.name,
mobile : value.mobile,
address : value.address,
province_id : this.area.areaId,
city_id : this.city.cityId,
district_id : this.regi.regiId,
is_default : this.site.defaultVal
}
siteAdd(data).then(res => {
this.disabled = true
this.$Router.back()
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
}
}
}
</script>
<style lang="scss" scoped>
.site-form {
background: white;
display: block;
.site-input {
padding: 0 30rpx 0 200rpx;
position: relative;
line-height: 110rpx;
min-height: 110rpx;
border-bottom: 2rpx solid #f3f3f3;
&::before {
position: absolute;
bottom: 0;
left: 30rpx;
right: 0;
height: 1rpx;
content: "";
background: #e4e6f2;
}
&:last-child::before {
display: none;
}
label {
position: absolute;
left: 30rpx;
top: 0;
}
input {
height: 110rpx;
}
image {
width: 38rpx;
height: 38rpx;
position: absolute;
right: 20rpx;
top: calc(50% - 19rpx);
}
}
.site-btn {
padding: $padding - 10 $padding;
button[size="mini"] {
width: 100%;
background: #1d37e2;
height: 88rpx;
line-height: 88rpx;
font-size: $title-size-lg;
color: white;
padding: 0;
&[disabled] {
background: #7789ff !important;
color: #fff !important;
}
}
}
.site-switch {
font-size: $title-size;
margin: $margin;
display: flex;
line-height: 40rpx;
text {
flex: 1;
}
}
.site-switch-active {
color: #797979;
}
}
</style>

208
pages/address/index.vue Normal file
View File

@@ -0,0 +1,208 @@
<template>
<view class="content">
<view class="list" v-if="listArr.length > 0">
<view class="address" v-for="(item, index) in listArr" :key="index">
<view class="address-name"><view class="defaultEdit" v-if="item.default">默认</view><text>{{item.name}}</text>{{item.mobile}}</view>
<view class="address-info">
{{item.full_address}}
</view>
<view class="address-tool">
<view class="address-tool-btn" @click="addressRemove(item.address_id, index)"><image src="@/static/icons/address_01.png" mode="widthFix"></image>删除</view>
<!-- <view class="address-tool-btn" @click="$Router.push({name: 'addressAdd', params: { ediStatet: 'compile', id: item.address_id}})"><image src="@/static/icons/address_02.png" mode="widthFix"></image>编辑</view> -->
</view>
<view class="select" v-if="type == 'selectAddress'">
<view class="select-btn" @click="selectAddress(index)">
选择地址
</view>
</view>
</view>
</view>
<view class="edit-no" v-else>
<image src="@/static/imgs/site_no.png"></image>
<view>暂无地址</view>
</view>
<view class="footer">
<view class="btn" @click="$Router.push({name: 'addressAdd', params:{experience: Experience}})">添加地址</view>
</view>
</view>
</template>
<script>
import { siteList, siteDel } from '@/apis/interfaces/stock'
export default {
data() {
return {
Experience: '', //是否从体验官进入
listArr: [], //收货地址
type : ''
}
},
onShow() {
// 获取提货前置
this.listInfo();
this.type = this.$Route.query.type
this.Experience = this.$Route.query.experience
},
methods: {
// 提货前置
listInfo (){
siteList().then(res => {
this.listArr = res
}).catch(err => {
uni.showToast({
title: err.message,
icon: "none"
})
})
},
// 删除地址
addressRemove(newid, newindex){
let list = this.listArr
uni.showModal({
title : '提示',
content : '是否删除地址',
success : res=> {
if (res.confirm) {
uni.showLoading({
title: '删除中',
})
siteDel(newid).then(res=>{
this.listArr = list
uni.showToast({
title: res,
icon : "none"
})
list.splice(newindex, 1)
uni.hideLoading()
})
}
}
})
},
// 选择地址
selectAddress(e){
let atAdds = this.listArr[e]
let pages = getCurrentPages()
let nowPage = pages[ pages.length - 1] // 当前页页面实例
let prevPage= pages[ pages.length - 2 ] // 上一页页面实例
prevPage.$vm.address = atAdds // 修改上一页data里面的参数值为
uni.navigateBack({
delta: 1
})
}
}
}
</script>
<style lang="scss" scoped>
.content {
background-color: #f4f4f4;
min-height: 100vh;
}
.list {
border-bottom: 60px solid transparent;
padding: $padding;
box-sizing: border-box;
.address {
background-color: #FFFFFF;
margin-bottom: $margin;
padding: $padding;
box-sizing: border-box;
border-radius: $radius;
&:last-child {
margin-bottom: 0;
}
.address-name {
display: flex;
font-weight: 600;
text {
font-weight: normal;
font-size: $title-size + 2;
flex: 1;
display: block;
}
.defaultEdit {
font-size: $title-size-sm;
height: 36rpx;
line-height: 36rpx;
border: 2rpx solid #eb504c;
color: #eb504c;
padding: 0 10rpx;
margin-right: 20rpx;
margin-top: 4rpx;
border-radius: $radius-m;
}
}
.address-info {
margin: $margin - 10 0;
font-size: $title-size-lg;
color: $text-gray;
}
.address-tool {
border-top: 2rpx solid #f3f3f3;
padding-top: 20rpx;
font-size: $title-size-m;
text-align: right;
.address-tool-btn {
display: inline-block;
color: #666666;
margin-left: $margin * 2;
image {
width: 28rpx;
height: 28rpx;
vertical-align: -2rpx;
margin-right: 10rpx;
}
}
}
.select {
text-align: center;
border: 2rpx solid #e64248;
color: #e64248;
font-size: $title-size-m;
margin-top: $margin;
line-height: 72rpx;
font-weight: 600;
border-radius: $radius-m;
}
}
}
.footer {
width: 100%;
height: 60px;
background-color: #FFFFFF;
position: fixed;
left: 0;
bottom: 0;
z-index: 9;
padding: 8px;
box-sizing: border-box;
.btn {
line-height: 44px;
background-color: #1d37e2;
height: 100%;
text-align: center;
color: #FFFFFF;
border-radius: $radius-sm;
}
}
.edit-no {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-box-pack: center;
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
z-index: 1;
text-align: center;
color: $text-gray;
image {
width: 240rpx;
height: 240rpx;
}
}
</style>

View File

@@ -1,450 +0,0 @@
<template>
<view class="content">
<form class="issue-form" @submit="issueForm">
<view class="case">
<view class="issue-title">
用户档案
</view>
<view class="issue-block">
<view class="issue-inputs">
<label class="issue-input-label">真实姓名</label>
<input class="issue-inputs-input" maxlength="4" placeholder="输入真实姓名" name="name" :value="seeData.name" type="text" :disabled="editState"></input>
</view>
<view class="issue-inputs">
<label class="issue-input-label">手机号码</label>
<input class="issue-inputs-input" placeholder="输入手机号码" name="mobileNo" :value="seeData.username" type="tel":disabled="editState"></input>
</view>
<view class="issue-inputs">
<label class="issue-input-label">年龄</label>
<input class="issue-inputs-input" placeholder="输入年龄" name="age" :value="seeData.age" type="number":disabled="editState"></input>
</view>
<view class="issue-inputs">
<label class="issue-input-label">性别</label>
<block v-if="editState">
<view class="issue-inputs-input">
{{ seeData.sex == 'woman' ? '女' : '男' }}
</view>
</block>
<block v-else>
<picker @change="bindSexChange" :value="sexIndex" :range="sexArray" range-key="name" :disabled="editState">
<view class="uni-input">{{sexArray[sexIndex].name}}</view>
<image class="uni-input-img" src="/static/icons/userLogin_icon.png" mode=""></image>
</picker>
</block>
</view>
</view>
<block v-if="!editState">
<view class="issue-title">
健康档案
</view>
<view class="case-block">
<view class="case-inputs">
<label class="case-input-label">健康说明</label>
<textarea :value="seeData.remark" placeholder="请描述您当前的三高情况" name="remark" type="text" :disabled="editState" />
</view>
<view class="case-inputs">
<label class="case-input-label">
当前高血脂
<text>{{sexName == 'man' ? '男性' : '女性'}}高血脂正常指标 {{ hyperlipemiaMin }} ~ {{ hyperlipemiaMax }}</text>
</label>
<input class="case-inputs-input" placeholder="输入您当前高血脂值" @input="hyperlipemiaInput" :value="hyperlipemiaNumber" type="idcard" :disabled="editState"></input>
<text class="case-inputs-tips active" v-if="hyperlipemiaNumber > hyperlipemiaMax">偏高</text>
<text class="case-inputs-tips" v-if="hyperlipemiaNumber < hyperlipemiaMin && hyperlipemiaNumber != ''">偏低</text>
</view>
<view class="case-inputs">
<label class="case-input-label">
当前高血压
<text>{{sexName == 'man' ? '男性' : '女性'}}高血压正常指标 {{ hypertensionMin }} ~ {{ hypertensionMax }}</text>
</label>
<input class="case-inputs-input" placeholder="输入您当前高血压值" @input="hypertensionInput" :value="hypertensionNumber" type="idcard" :disabled="editState"></input>
<text class="case-inputs-tips active" v-if="hypertensionNumber > hypertensionMax">偏高</text>
<text class="case-inputs-tips" v-if="hypertensionNumber < hypertensionMin && hypertensionNumber != ''">偏低</text>
</view>
<view class="case-inputs">
<label class="case-input-label">
当前高血糖
<text>{{sexName == 'man' ? '男性' : '女性'}}高血糖正常指标 {{ hyperglycemiaMin }} ~ {{ hyperglycemiaMax }}</text>
</label>
<input class="case-inputs-input" placeholder="输入您当前高血糖值" @input="hyperglycemiaInput" :value="hyperglycemiaNumber" type="idcard" :disabled="editState"></input>
<text class="case-inputs-tips active" v-if="hyperglycemiaNumber > hyperglycemiaMax">偏高</text>
<text class="case-inputs-tips" v-if="hyperglycemiaNumber < hyperglycemiaMin && hyperglycemiaNumber != ''">偏低</text>
</view>
</view>
<view class="issue-block">
<label class="issueNew-title">上传诊断证明</label>
<!-- hyperlipemia;hypertension;hyperglycemia -->
<view class="flexrow">
<view class="issueNew-photo">
<view class="issueNew-content" v-if="editState">
<image class="issueNew-icon" @click="openImg(seeData.cover)" :src="seeData.cover" mode="aspectFill"></image>
</view>
<view class="issueNew-content" @click="updImg('hyperlipemia')" v-else>
<image class="issueNew-icon" :src="hyperlipemia.showpath || '/static/imgs/cover_img.png'" mode="aspectFill"></image>
<view class="issueNew-text">高血脂诊断证明</view>
</view>
</view>
<view class="issueNew-photo">
<view class="issueNew-content" v-if="editState">
<image class="issueNew-icon" @click="openImg(seeData.cover)" :src="seeData.cover" mode="aspectFill"></image>
</view>
<view class="issueNew-content" @click="updImg('hypertension')" v-else>
<image class="issueNew-icon" :src="hypertension.showpath || '/static/imgs/cover_img.png'" mode="aspectFill"></image>
<view class="issueNew-text">高血压诊断证明</view>
</view>
</view>
<view class="issueNew-photo">
<view class="issueNew-content" v-if="editState">
<image class="issueNew-icon" @click="openImg(seeData.cover)" :src="seeData.cover" mode="aspectFill"></image>
</view>
<view class="issueNew-content" @click="updImg('hyperglycemia')" v-else>
<image class="issueNew-icon" :src="hyperglycemia.showpath || '/static/imgs/cover_img.png'" mode="aspectFill"></image>
<view class="issueNew-text">高血糖诊断证明</view>
</view>
</view>
</view>
</view>
</block>
</view>
<view class="userdata-btn" v-if="!editState">
<button class="issue-btn" form-type="submit" :disabled="disabled">立即保存</button>
</view>
</form>
</view>
</template>
<script>
import { goutCreate, goutAdd, goutSee } from '@/apis/interfaces/gout'
import { uploads } from '@/apis/interfaces/uploading'
export default {
data() {
return {
disabled : false ,// 提交按钮状态
editState: false, //是否可以编辑表单
numberVal: '',
count : '',
hyperlipemiaMax : '',
hyperlipemiaMin : '',
hyperlipemiaNumber:'',
hypertensionMax : '',
hypertensionMin : '',
hypertensionNumber:'',
hyperglycemiaMax : '',
hyperglycemiaMin : '',
hyperglycemiaNumber:'',
seeData : {
name : '',
id_card : '',
username: '',
sex : '',
cover : '',
remark : '',
age : ''
}, //查看我的病例内容
sexIndex : 0,
sexName : 'man',
hyperlipemia : {
showpath: '',
path : ''
},
hypertension:{
showpath: '',
path : ''
},
hyperglycemia:{
showpath: '',
path : ''
},
sexArray : [{
val : 'man',
name : '男'
},{
val : 'woman',
name : '女'
}]
};
},
onShow() {
// 健康前置信息
goutCreate().then(res => {
this.count = res.count
this.hyperlipemiaMax = res.count.man.hyperlipidemia.max
this.hyperlipemiaMin = res.count.man.hyperlipidemia.min
this.hypertensionMax = res.count.man.hypertension.max
this.hypertensionMin = res.count.man.hypertension.min
this.hyperglycemiaMax = res.count.man.hyperglycemia.max
this.hyperglycemiaMin = res.count.man.hyperglycemia.min
this.seeData.username = res.user.username
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
if(this.$Route.query.hasCase === 'true') {
this.editState = true
// 获取查看病例
this.goutSeeInfo();
}
},
methods: {
// 查看病例
goutSeeInfo() {
goutSee().then(res => {
this.seeData.name = res.case.name
this.seeData.username = res.case.user.username
this.seeData.sex = res.case.sex
this.seeData.cover = res.case.cover
this.seeData.age = res.case.age
this.countNumber = parseInt(res.case.number)
this.seeData.remark = res.case.remark
this.sexName = res.case.sex
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
},
// 选择男女
bindSexChange(e) {
this.sexIndex = parseInt(e.detail.value)
this.sexName = this.sexArray[e.detail.value].val
if(this.sexArray[e.detail.value].val == 'woman') {
this.hyperlipemiaMax = this.count.woman.hyperlipidemia.max
this.hyperlipemiaMin = this.count.woman.hyperlipidemia.min
this.hypertensionMax = this.count.woman.hypertension.max
this.hypertensionMin = this.count.woman.hypertension.min
this.hyperglycemiaMax = this.count.woman.hyperglycemia.max
this.hyperglycemiaMin = this.count.woman.hyperglycemia.min
}else {
this.hyperlipemiaMax = this.count.man.hyperlipidemia.max
this.hyperlipemiaMin = this.count.man.hyperlipidemia.min
this.hypertensionMax = this.count.man.hypertension.max
this.hypertensionMin = this.count.man.hypertension.min
this.hyperglycemiaMax = this.count.man.hyperglycemia.max
this.hyperglycemiaMin = this.count.man.hyperglycemia.min
}
},
// 上传图片
updImg(type){
uni.chooseImage({
count : 1,
success : path => {
uploads([{
uri : path.tempFilePaths[0]
}]).then(res => {
this[type] = {
showpath: res.url[0],
path: res.path[0]
}
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
}
})
},
// 高血脂
hyperlipemiaInput(e) {
this.hyperlipemiaNumber = e.detail.value
},
// 高血压
hypertensionInput(e) {
this.hypertensionNumber = e.detail.value
},
// 高血糖
hyperglycemiaInput(e) {
this.hyperglycemiaNumber = e.detail.value
},
// 提交表单 hyperlipemia;hypertension;hyperglycemia
issueForm(e) {
let value = e.detail.value;
let data = {
name : value.name,
age : value.age,
mobileNo: value.mobileNo,
remark : value.remark,
sex : this.sexArray[this.sexIndex].val,
hyperlipidemia : this.hyperlipemiaNumber,
hypertension : this.hypertensionNumber,
hyperglycemia : this.hyperglycemiaNumber,
hyperlipidemia_cover : this.hyperlipemia.path,
hypertension_cover : this.hypertension.path,
hyperglycemia_cover : this.hyperglycemia.path,
}
goutAdd(data).then(res => {
this.disabled = true
uni.navigateBack({
})
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
},
// 查看图片
openImg(img) {
uni.previewImage({
current: img,
urls:[img]
})
}
}
}
</script>
<style lang="scss" scoped>
.content{
overflow: hidden;
background: #f3f4f6;
}
.case {
border-bottom: 160rpx solid transparent;
}
.issue-title {
padding: 30rpx;
font-weight: 600;
}
.issue-block {
background: white;
margin-bottom: 20rpx;
padding: 0 25rpx;
.issue-inputs {
position: relative;
height: 90rpx;
line-height: 90rpx;
padding-left: 170rpx;
.issue-input-label {
position: absolute;
left: 0;
top: 0;
width: 170rpx;
}
.issue-inputs-input {
line-height: 90rpx;
height: 90rpx;
width: 100%;
}
.uni-input-img {
width: 32rpx;
height: 32rpx;
position: absolute;
right: 0;
top: 30rpx;
}
}
}
.case-block {
.case-inputs {
margin-bottom: 30rpx;
background-color: #FFFFFF;
padding: 30rpx;
box-sizing: border-box;
position: relative;
.case-input-label {
margin-bottom: 30rpx;
display: block;
text {
color: #646464;
}
}
.case-inputs-input {
width: 70%;
}
.case-inputs-tips {
position: absolute;
right: 30rpx;
top: 100rpx;
color: green;
&.active {
color: red;
}
}
textarea {
width: 100%;
}
}
}
/* 上传图片样式 */
.issueNew-title {
line-height: 90rpx;
}
.issueNew-photo{
width: 100%;
padding-top: 50%;
background: white;
position: relative;
text-align: center;
color: #999;
font-size: 28rpx;
.issueNew-content{
position: absolute;
top: 0;
right: 15rpx;
left: 15rpx;
bottom: 10rpx;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-box-pack: center;
border:1rpx solid #f5f5f5;
border-radius: 6rpx;
.issueNew-icon{
width: 180rpx;
height: 180rpx;
margin-bottom: 15rpx;
}
}
}
/* 按钮 */
.userdata-btn {
width: 100%;
box-sizing: border-box;
padding: 30rpx;
position: fixed;
bottom: 0;
left: 0;
z-index: 99;
right: 0;
background: white;
.issue-btn {
background: #4490ff;
text-align: center;
color: white;
height: 90rpx;
line-height: 90rpx;
font-size: 34rpx;
font-weight: normal;
width: 100%;
margin: 0;
padding: 0;
border-radius: 10rpx;
&[disabled] {
background: #4490ff !important;
color: #fff !important;
}
}
}
.flexrow{
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
box-sizing: border-box;
}
</style>

342
pages/bond/index.vue Normal file
View File

@@ -0,0 +1,342 @@
<template>
<view class="content">
<image class="temporary" src="http://api.siyuankunlun.com/storage/materials/2022/09/21/bzj.jpg" mode="widthFix"></image>
<view class="member-btn">
<!-- <view class="btnGo" @click="payment">
保证金支付
</view> -->
<view class="btnGo" @click="payShow" :disabled="disabled">
保证金支付
</view>
</view>
<!-- 支付弹出 -->
<view class="payPop" v-if="payState"></view>
<view class="payCont" v-if="payState">
<view class="payCont-close">
<image src="@/static/icons/uricacidClose.png" mode="" @click="payState = false"></image>
</view>
<radio-group @change="payChange">
<label class="uni-list-cell uni-list-cell-pd payCont-radio" v-for="(item, index) in items" :key="item.value">
<view class="payCont-name"><image :src="item.cover" mode=""></image>{{item.name}}</view>
<view>
<radio :value="item.value" checked="current" color="#e8c198" :checked="index === current" />
</view>
</label>
</radio-group>
<view class="payCont-btn" @click="payment">
立即支付
</view>
</view>
<!-- 填写表单 -->
<view class="writePop" v-if="writeState"></view>
<view class="writeCont" v-if="writeState">
<form @submit="writePayment">
<view class="writeCont-close">
<image src="@/static/icons/uricacidClose.png" mode="" @click="writeState = false"></image>
</view>
<view class="writePop-input">
<input type="text" name="code" placeholder="请输入激活码" />
</view>
<button class="writeCont-btn" form-type="submit" :disabled="disabled">
立即兑换
</button>
</form>
</view>
</view>
</template>
<script>
const jweixin = require('jweixin-module');
import { partnerSee, getJssdk } from '@/apis/interfaces/member'
import { identitySee, identityPay, codePay } from '@/apis/interfaces/gout'
import { authFollow } from '@/apis/interfaces/authUrl'
export default {
data() {
return {
status : '',
orderId : '',
openids : '', // openid
items : [{
value : 'wechat',
name : '微信支付',
cover : '/static/icons/payIcon_00.png',
checked: 'true'
},
{
value : 'code',
name : '激活码支付',
cover : '/static/icons/payIcon_01.png'
}
],
current : 0,
payState : false, //支付选择弹出
writeState : false, //激活码弹出
disabled : false, //按钮状态
payType : 'wechat' //支付类型 wechat微信 code激活码
}
},
onLoad(options) {
this.openids = options.openid
},
onShow() {
partnerSee().then(res => {
this.status = res.status
}).catch(err => {
uni.showToast({
title: err.message,
icon: "none"
})
})
// 获取身份信息
this.identityInfo();
},
methods: {
// 身份信息
identityInfo() {
identitySee(this.$Route.query.identityid).then(res => {
this.orderId = res.order_id
if(res.openids.official) {
this.openids = res.openids.official
}
}).catch(err => {
uni.showToast({
title: err.message,
icon: "none"
})
})
},
// 选择支付
payChange(e) {
this.payType = e.detail.value
},
// 显示支付选择弹出
payShow() {
this.payState = !this.payState
},
// 微信支付
payment() {
// 隐藏支付选择弹出
this.payState = false
if(this.payType == 'code') {
// 弹出激活码填写表单
this.writeState = !this.writeState
return
}
// 微信支付
identityPay(this.orderId, {
openid: this.openids
}).then(res => {
let wxConfig = JSON.parse(res.wechat)
jweixin.config({
appId: wxConfig.appId,
debug: false,
jsApiList: ['chooseWXPay'],
signature: wxConfig.signature,
nonceStr: wxConfig.nonceStr,
timestamp: wxConfig.timestamp,
})
jweixin.ready(() => {
jweixin.chooseWXPay({
timestamp: wxConfig.timeStamp,
nonceStr: wxConfig.nonceStr,
package: wxConfig.package,
signType: wxConfig.signType,
paySign: wxConfig.paySign,
success: payRes => {
this.$Router.replace({ name: 'bondTips' });
},
fail: payfail => {
uni.showToast({
title: '取消支付',
icon: 'none'
})
}
});
});
}).catch(err => {
uni.showToast({
title: err.message,
icon: "none"
})
})
},
// 激活码支付
writePayment(e) {
let newCode = e.detail.value.code
codePay(this.orderId, {
code: newCode
}).then(res => {
this.disabled = true
// 返回上一页
uni.navigateBack();
}).catch(err => {
uni.showToast({
title: err.message,
icon: "none"
})
})
}
}
}
</script>
<style lang="scss" scoped>
.temporary {
width: 100%;
}
.member-btn {
position: fixed;
left: 0;
bottom: 0;
width: 100%;
padding: $padding;
box-sizing: border-box;
z-index: 9;
}
.btnGo {
padding: 0 $padding;
line-height: 90rpx;
font-size: $title-size + 4;
box-sizing: border-box;
background-image: linear-gradient(to right, #fce9cf, #dfac80);
box-shadow: 0 4rpx 4rpx 3rpx rgba(175,136,88,1);
border-radius: $radius-m * 5;
color: #633a25;
font-weight: 600;
text-align: center;
&.active {
background-image: linear-gradient(to right, #d4d4d4, #e0e0e0);
box-shadow: 0 2px 2px 1px #b7b7b7;
color: #656565
}
}
// 支付弹出
.payPop {
position: fixed;
width: 100%;
height: 100%;
left: 0;
top: 0;
background-color: rgba($color: #000000, $alpha: .4);
z-index: 999;
}
.payCont {
position: fixed;
width: 100%;
box-sizing: border-box;
bottom: 0;
left: 0;
background-color: #ffffff;
z-index: 1000;
border-radius: $radius * 3 $radius * 3 0 0;
padding: $padding $padding + 10;
.payCont-close {
text-align: right;
margin-bottom: 40rpx;
padding-right: 10rpx;
box-sizing: border-box;
image {
width: 40rpx;
height: 40rpx;
}
}
.payCont-radio {
display: flex;
line-height: 100rpx;
.payCont-name {
flex: 1;
font-weight: 600;
display: flex;
image {
width: 48rpx;
height: 48rpx;
margin-right: 20rpx;
margin-top: 26rpx;
}
}
radio {
transform:scale(.9);
}
}
.payCont-btn {
margin: 60rpx 0 20rpx;
width: 100%;
background-color: #e8c198;
line-height: 90rpx;
color: #442b11;
text-align: center;
border-radius: $radius-m;
}
}
// 填写激活码弹出
.writePop {
position: fixed;
width: 100%;
height: 100%;
left: 0;
top: 0;
background-color: rgba($color: #000000, $alpha: .4);
z-index: 999;
}
.writeCont {
position: fixed;
width: 100%;
box-sizing: border-box;
bottom: 0;
left: 0;
background-color: #ffffff;
z-index: 1000;
border-radius: $radius * 3 $radius * 3 0 0;
padding: $padding $padding + 10;
.writeCont-close {
text-align: right;
margin-bottom: 40rpx;
padding-right: 10rpx;
box-sizing: border-box;
image {
width: 40rpx;
height: 40rpx;
}
}
.writePop-input {
background-color: #f5f5f5;
height: 90rpx;
border-radius: $radius-m;
padding: 0 30rpx;
box-sizing: border-box;
input {
background-color: transparent;
border: none;
height: 100%;
line-height: 90rpx;
}
}
.writeCont-btn {
margin: 60rpx 0 20rpx;
width: 100%;
background-color: #e8c198 !important;
line-height: 90rpx;
color: #442b11 !important;
font-size: 32rpx;
text-align: center;
border-radius: $radius-m;
border: none;
box-shadow: none;
&::after {
display: none;
}
}
}
</style>

62
pages/bond/tips.vue Normal file
View File

@@ -0,0 +1,62 @@
<template>
<view class="content">
<view class="examine">
<image src="@/static/imgs/payImg.jpg" mode="widthFix"></image>
<view class="text">
<view class="title">支付成功</view>
</view>
<view class="return" @click="$router.back()">知道了</view>
</view>
</view>
</template>
<script>
import { } from '@/apis/interfaces/gout'
export default {
data() {
return {
}
},
onShow() {
},
methods: {
}
}
</script>
<style lang="scss" scoped>
.examine {
padding: $padding * 8 0 $padding;
box-sizing: border-box;
text-align: center;
image {
width: 45%;
margin: 0 auto $margin;
}
.text {
.title {
font-weight: 600;
font-size: $title-size + 10;
margin-bottom: $margin;
}
.time {
color: #999999;
line-height: 50rpx;
}
}
.return {
display: inline-block;
margin-top: 80rpx;
background-color: #1d37e2;
padding: 0 $padding * 6;
height: 90rpx;
line-height: 90rpx;
border-radius: $radius-m;
box-shadow: 0 3rpx 6rpx 4rpx rgba(6,34,214,.6);
color: #FFFFFF;
font-size: $title-size + 2;
}
}
</style>

View File

@@ -1,170 +0,0 @@
<template>
<view class="content">
<block v-if="logsArr.length > 0">
<view class="While circle" v-for="(item, index) in logsArr" :key="index">
<view class="circle-user">
<image class="circle-user-head" :src="item.case.user.avatar ? item.case.user.avatar : '/static/imgs/default_myHead.png'" mode="aspectFill"></image>
<view class="circle-user-name">
<block v-if="item.case">{{ item.case.user.nickname }}</block>
<view class="circle-user-quantity">尿酸值{{ item.quantity }}</view>
</view>
</view>
<view class="circle-content">
{{ item.remark }}
</view>
<image v-if="item.cover" class="circle-picture-img" @click="openImg(item.cover)" :src="item.cover" mode="widthFix"></image>
<view class="circle-see">
发布时间<text>{{ item.created_at }}</text>
</view>
</view>
<view class="pagesLoding" v-if="lodingStats">
<block v-if="page.has_more">
<image class="pagesLodingIcon" src="/static/icons/refresh_loding.gif" mode="widthFix"></image>加载中...
</block>
<block v-else>
没有更多了~
</block>
</view>
</block>
<view class="pack-center pages-hint" v-else>
<image src="/static/imgs/coupon_null.png"></image>
<view>暂无数据</view>
</view>
</view>
</template>
<script>
import {
allLogs
} from '@/apis/interfaces/gout'
export default {
data() {
return {
logsArr : [] ,// 病友记列表
page : {}, //分页信息
lodingStats : false //加载状态
};
},
onShow() {
// 获取首页数据
this.logsInfo();
},
methods: {
// 首页数据
logsInfo(page) {
allLogs({
page : page || ''
}).then(res => {
let listArr = this.logsArr,
newData = []
if(page == 1 || page == undefined) listArr = []
newData = listArr.concat(res.data)
this.logsArr = newData
this.page = res.page
this.lodingStats= false
uni.stopPullDownRefresh()
}).catch(err => {
uni.showToast({
title: err.message,
icon: "none"
})
})
},
// 查看图片
openImg(img) {
uni.previewImage({
current: img,
urls:[img]
})
},
// 页面相关事件处理函数--监听用户下拉动作
onPullDownRefresh() {
// 商品列表数据
this.logsInfo();
},
// 上拉加载
onReachBottom(){
this.lodingStats = true
let pageNumber = this.page.current
if(this.page.has_more){
pageNumber++
// 商品列表数据
this.logsInfo(pageNumber);
}
}
}
}
</script>
<style lang="scss">
.content{
overflow: hidden;
background: #f3f4f6;
padding: 20rpx;
box-sizing: border-box;
}
.While {
border-radius: 10rpx;
margin-bottom: 30rpx;
background-color: #FFFFFF;
padding:30rpx;
box-sizing: border-box;
box-shadow: 0 0 10rpx rgba($color: #000000, $alpha: .05);
}
.circle {
border-radius: 10rpx;
.circle-user {
position: relative;
.circle-user-head {
width: 60rpx;
height: 60rpx;
border-radius: 50%;
}
.circle-user-name {
line-height: 60rpx;
position: absolute;
left: 0;
top: 0;
width: 100%;
padding-left: 80rpx;
box-sizing: border-box;
font-size: 28rpx;
display: flex;
.circle-user-quantity {
background-color: #a7affd;
color: #FFFFFF;
font-size: 24rpx;
padding: 0 10rpx;
border-radius: 60rpx;
height: 40rpx;
line-height: 40rpx;
margin: 10rpx 20rpx;
}
}
}
.circle-content {
margin: 20rpx 0;
font-size: 26rpx;
line-height: 44rpx;
}
.circle-picture-img{
width: 60%;
border-radius: 6rpx;
}
.circle-see {
font-size: 26rpx;
color: #919191;
margin-top: 20rpx;
text {
padding-right: 40rpx;
}
}
}
</style>

View File

@@ -1,11 +1,37 @@
<template>
<view class="content">
<view class="all">
<image class="all-back" src="@/static/imgs/friend_back.png" mode="widthFix"></image>
<view class="all-text">
<text>我的推荐()</text>
<view class="number">{{count.all}}<text></text></view>
</view>
</view>
<view class="tab">
<!-- <view class="item" :class="{'active': larerType == 1}" @click="onTabs(1)"><image src="@/static/icons/friendIcon_00.png" mode="widthFix"></image>直接推荐</view> -->
<!-- <view class="item" :class="{'active': larerType == 2}" @click="onTabs(2)"><image src="@/static/icons/friendIcon_01.png" mode="widthFix"></image>间接推荐</view> -->
</view>
<block v-if="relationArr.length > 0">
<view class="While list" v-for="(item, index) in relationArr" :key="index">
<view class="list">
<view class="item" v-for="(item, index) in relationArr" :key="index">
<image class="list-cover" :src="item.avatar || '/static/imgs/default_myHead.png'" mode="aspectFill"></image>
<view class="list-text">
<view class="list-text-name nowrap">{{ item.nickname }}<view class="list-like-online">{{ item.username }}</view></view>
<view class="list-text-time nowrap">邀请时间{{ item.created_at }}</view>
<view class="list-nick nowrap">
<view class="name">{{ item.nickname }}</view>
<image class="user-sex" src="@/static/icons/userIcon_00.png" mode="widthFix"></image>
</view>
<view class="identity">
<image v-if="item.identity.order == '1'" class="user-identity" src="@/static/icons/member_01.png" mode="widthFix"></image>
<image v-else-if="item.identity.order == '2'" class="user-identity" src="@/static/icons/member_02.png" mode="widthFix"></image>
<image v-else-if="item.identity.order == '3'" class="user-identity" src="@/static/icons/member_03.png" mode="widthFix"></image>
<image v-else-if="item.identity.order == '4'" class="user-identity" src="@/static/icons/member_04.png" mode="widthFix"></image>
<image v-else-if="item.identity.order == '5'" class="user-identity" src="@/static/icons/member_05.png" mode="widthFix"></image>
<image v-else src="@/static/icons/member_06.png" class="user-identity" mode="widthFix"></image>
</view>
<view class="list-user" @click="telClick(item.username)">
<image src="@/static/icons/orderTel.png" mode="widthFix"></image>
</view>
</view>
</view>
</view>
</block>
@@ -21,6 +47,9 @@
export default {
data() {
return {
larerType : 1, //默认列表 1 直接 2 间接
count : '', //数量
identity : '', //身份
relationArr: [], //我的伙伴列表
};
},
@@ -31,14 +60,34 @@
methods: {
// 商品详情数据
relationsInfo() {
relations().then(res => {
relations({
larer: this.larerType
}).then(res => {
this.count = res.count
this.relationArr = res.users
// if(res.users != '')this.identity = res.users[0].identity
}).catch(err => {
uni.showToast({
title: err.message,
icon: "none"
})
})
},
// 状态筛选
onTabs(val){
if(this.larerType === val) return
this.larerType = val
// 获取商品详情数据
this.relationsInfo();
},
//拨打电话
telClick(e){
uni.makePhoneCall({
phoneNumber: e
});
}
}
}
@@ -50,53 +99,115 @@
background: #f3f4f6;
}
.While {
border-radius: 10rpx;
margin-bottom: 30rpx;
.all {
background-color: #FFFFFF;
padding:30rpx;
position: relative;
height: 220rpx;
.all-back {
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
}
.all-text {
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
padding: $padding;
box-sizing: border-box;
box-shadow: 0 0 10rpx rgba($color: #000000, $alpha: .05);
color: #FFFFFF;
font-size: $title-size + 2;
font-weight: 600;
.number {
font-size: $title-size + 30;
font-weight: 600;
margin-top: 10rpx;
text {
font-size: $title-size-sm;
}
}
}
}
.tab {
height: 60rpx;
line-height: 60rpx;
position: relative;
display: flex;
margin-top: -20rpx;
.item {
flex: 2;
text-align: center;
border-radius: $radius $radius 0 0;
font-weight: 600;
background-color: #1e50f1;
color: #b4c8ff;
&.active {
background-color: #FFFFFF;
color: #000000;
}
image {
width: 34rpx;
height: 34rpx;
vertical-align: -7rpx;
margin-right: 10rpx;
}
}
}
.list {
border-radius: 10rpx;
margin: 30rpx;
background-color: #FFFFFF;
padding: $padding;
box-sizing: border-box;
.item {
margin-bottom: $margin;
display: flex;
border-bottom: 2rpx solid #f3f3f3;
padding-bottom: $padding;
position: relative;
.list-cover {
width: 90rpx;
height: 90rpx;
width: 100rpx;
height: 100rpx;
border-radius: 50%;
}
.list-text{
position: absolute;
width: 100%;
padding: 30rpx 30rpx 0 150rpx;
box-sizing: border-box;
left: 0;
top: 0;
.list-text-name {
line-height: 40rpx;
.list-text {
width: calc(100% - 120rpx);
margin-left: 20rpx;
margin-top: 5rpx;
.list-nick {
display: flex;
font-size: 34rpx;
margin-bottom: 10rpx;
.list-like-online {
font-weight: normal;
font-size: 24rpx;
border: solid 2rpx #edb25f;
color: #edb25f;
border-radius: 4rpx;
display: inline-block;
height: 32rpx;
line-height: 32rpx;
padding: 0 10rpx;
margin: 4rpx 15rpx;
.name {
font-weight: 600;
}
.user-sex {
width: 40rpx;
margin-left: 10rpx;
}
}
.identity {
margin-top: 10rpx;
.user-identity {
width: 130rpx;
}
}
.list-user {
background-color: #f2f5fd;
width: 70rpx;
height: 70rpx;
border-radius: 50%;
text-align: center;
padding: 18rpx;
box-sizing: border-box;
position: absolute;
right: 0;
top: 20rpx;
image {
width: 100%;
}
}
.list-text-time{
font-size: 26rpx;
line-height: 38rpx;
color: #919191;
}
}
}

View File

@@ -3,15 +3,14 @@
<view class="exhibition">
<rich-text :nodes="detailsImg"></rich-text>
</view>
<view class="exhibition-receive">
<view class="exhibition-receive-btn exhibition-receive-btn-50" @click="popClick">
记录三高
</view>
<!-- $Router.push({name: 'UserCode'}) -->
<!-- <view class="exhibition-receive">
<view class="exhibition-receive-btn exhibition-receive-btn-50" @click="userCode">
活动分享
</view>
<view class="exhibition-receive-btn exhibition-receive-btn-50" @click="judge()">
{{nowText}}
</view>
</view> -->
<view class="popBack" v-if="popShow"></view>
<view class="popCont" v-if="popShow">
@@ -82,6 +81,8 @@
<script>
import { goods, Receive, create, index } from '@/apis/interfaces/mall'
import { authFollow } from '@/apis/interfaces/authUrl'
import { userIndex } from '@/apis/interfaces/user'
export default {
data() {
return {
@@ -110,17 +111,25 @@
regiArr : [],
regiId : 0,
regiIndex : 0,
}
},
nowStatus : '', //流程判断
nowText : '',
popStatus : false, //流程判断弹出层状态
userData : ''
};
},
onShow() {
// 获取商品详情数据
this.detailsInfo();
// 获取用户信息
// this.userInfo();
},
methods: {
// 商品详情数据
detailsInfo() {
goods(2).then(res => {
goods(1).then(res => {
this.detailsData = res
this.detailsImg = res.content.replace(/\<img/gi, '<img style="max-width:100%;height:auto;display:block;"')
this.canSample = res.canSample
@@ -132,6 +141,60 @@
})
},
// 用户信息
userInfo() {
userIndex().then(res => {
this.userData = res
this.nowStatus = res.nowStatus
if(res.nowStatus.value == 'isSubscribe') {
this.nowText = '关注公众号'
} else if(res.nowStatus.value == 'isCase') {
this.nowText = '创建档案'
}
else if(res.nowStatus.value == 'isVip') {
this.nowText = '开通季度会员'
}else {
this.nowText = '上传报告'
}
}).catch(err => {
uni.showToast({
title: err.message,
icon: "none"
})
})
},
// 流程判断
judge(name){
switch (this.nowStatus.value) {
// 关注公众号
case 'isSubscribe':
// 获取微信授权信息
authFollow({
url: '/wechat'
}).then(res => {
window.location.href = res
}).catch(err => {
uni.showToast({
title: err.message,
icon: "none"
})
})
break;
// 创建档案
case 'isCase':
this.$Router.push({name: 'Attestation'})
break;
case 'isVip':
this.$Router.push({name: 'memberIndex'})
break;
// 创建档案
default:
this.$Router.push({name: 'Attestation', params: { hasCase: this.userData.status.isCase }})
break;
}
},
// 去登陆
popLogin() {
this.$Router.push({ name: 'Login' });
@@ -310,7 +373,7 @@
}
.exhibition {
border-bottom: 120rpx solid transparent;
// border-bottom: 120rpx solid transparent;
.exhibition-img {
width: 100vw;
}
@@ -328,7 +391,7 @@
box-sizing: border-box;
z-index: 9;
.exhibition-receive-btn {
background-color: $mian-color;
background-color: #bf9960;
color: #FFFFFF;
height: 88rpx;
line-height: 88rpx;

208
pages/index/feeling.vue Normal file
View File

@@ -0,0 +1,208 @@
<template>
<view class="content">
<view class="lists" v-if="surveyArr.length > 0">
<view class="lists-item" v-for="(item, index) in surveyArr" :key="index">
<view class="lists-top" v-if="item.user">
<image class="lists-head" :src="item.user.avatar" mode="aspectFill"></image>
<view class="lists-cont">
<view class="lists-name">
{{item.user.nickname}}
</view>
<image v-if="item.user.identity.order == '1'" class="lists-identity" src="@/static/icons/member_01.png" mode="widthFix"></image>
<image v-else-if="item.user.identity.order == '2'" class="lists-identity" src="@/static/icons/member_02.png" mode="widthFix"></image>
<image v-else-if="item.user.identity.order == '3'" class="lists-identity" src="@/static/icons/member_03.png" mode="widthFix"></image>
<image v-else-if="item.user.identity.order == '4'" class="lists-identity" src="@/static/icons/member_04.png" mode="widthFix"></image>
<image v-else-if="item.user.identity.order == '5'" class="lists-identity" src="@/static/icons/member_05.png" mode="widthFix"></image>
<image v-else src="@/static/icons/member_06.png" class="lists-identity" mode="widthFix"></image>
</view>
</view>
<view class="lists-text">
<text>{{item.content}}</text>
</view>
<view class="lists-img" v-if="item.pictures.length > 0">
<block v-if="item.pictures.length >= 3">
<view class="lists-label lists-three" v-for="(items, index) in item.pictures" :key="index">
<image :src="items" mode="aspectFill" @click="openImg(item.pictures, index)"></image>
</view>
</block>
<block v-else-if="item.pictures.length == 1">
<view class="lists-label lists-one" v-for="(items, index) in item.pictures" :key="index">
<image :src="items" mode="aspectFill" @click="openImg(item.pictures, index)"></image>
</view>
</block>
<block v-else>
<view class="lists-label lists-two" v-for="(items, index) in item.pictures" :key="index">
<image :src="items" mode="aspectFill" @click="openImg(item.pictures, index)"></image>
</view>
</block>
</view>
</view>
</view>
<view class="pack-center pages-hint" v-else>
<image src="/static/imgs/coupon_null.png"></image>
<view>暂无数据</view>
</view>
<view class="write" @click="$Router.push({name: 'IndexWrite'})">
<image src="@/static/icons/white.png"></image>
</view>
</view>
</template>
<script>
import { surveys } from '@/apis/interfaces/gout'
export default {
data() {
return {
userData : '', //用户信息
surveyArr : [], //反馈列表
page : {}, //分页信息
lodingStats : false, //加载状态
}
},
onShow() {
// 获取反馈列表
this.surveysInfo();
},
methods: {
// 反馈列表
surveysInfo(page) {
surveys({
page : page || 1
}).then(res => {
let listArr = this.surveyArr,
newData = []
if(page == 1 || page == undefined) listArr = []
newData = listArr.concat(res.data)
this.surveyArr = newData
this.page = res.page
this.lodingStats = false
uni.stopPullDownRefresh()
}).catch(err => {
uni.showToast({
title: err.message,
icon: "none"
})
})
},
// 图片预览
openImg(pictures, index){
uni.previewImage({
current: index,
urls: pictures
});
},
// 页面相关事件处理函数--监听用户下拉动作
onPullDownRefresh() {
// 获取反馈列表
this.surveysInfo()
},
// 上拉加载
onReachBottom(){
this.lodingStats = true
let pageNumber = this.page.current
if(this.page.has_more){
pageNumber++
// 获取反馈列表
this.surveysInfo(pageNumber)
}
}
}
}
</script>
<style lang="scss" scoped>
.content{
overflow: hidden;
background-color: #f5f5f5;
}
/* 列表 */
.lists{
padding: $padding;
box-sizing: border-box;
.lists-item {
padding: $padding $padding $padding - 10;
box-sizing: border-box;
margin-bottom: $margin;
border-radius: $radius;
background-color: #ffffff;
box-shadow: 0 0 6rpx rgb(232, 232, 232);
.lists-top {
position: relative;
.lists-head {
width: 120rpx;
height: 120rpx;
border-radius: 50%;
}
.lists-cont {
position: absolute;
top: 0;
left: 0;
width: 100%;
box-sizing: border-box;
padding-left: 140rpx;
.lists-name {
font-weight: 600;
margin: 15rpx 0;
}
.lists-identity {
width: 130rpx;
}
}
}
.lists-text {
font-size: $title-size-m;
padding: $padding - 10 0 10rpx;
line-height: 42rpx;
color: #383838;
box-sizing: border-box;
}
.lists-img {
margin: 0 -10rpx;
.lists-label {
display: inline-block;
width: calc(100% - 20rpx);
margin: 10rpx;
padding-top: calc(100% - 20rpx);
position: relative;
border-radius: 4rpx;
overflow: hidden;
&.lists-two {
width: calc(50% - 20rpx);
padding-top: calc(50% - 20rpx);
}
&.lists-three {
width: calc(33.33% - 20rpx);
padding-top: calc(33.33% - 20rpx);
}
image {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
}
}
}
}
}
.write {
position: fixed;
right: $margin;
bottom: 100rpx;
z-index: 1000;
background-color: #ffffff;
width: 90rpx;
height: 90rpx;
border-radius: 50%;
box-shadow: 0 2rpx 10rpx rgba(98, 112, 255,.4);
padding: 20rpx;
box-sizing: border-box;
image {
width: 100%;
height: 100%;
}
}
</style>

View File

@@ -1,113 +1,99 @@
<template>
<view class="content">
<!-- 水宣传图 -->
<image class="banner" src="@/static/imgs/banner.png" mode="widthFix"></image>
<!-- 快捷入口 -->
<view class="tools">
<view class="tools-box tools-flex">
<view class="item item-sm" @click="$Router.push({name: 'purineIndex'})">
<view class="item-content">
<view class="title">健康饮食</view>
<view class="submit">食品知识小科普</view>
<image class="inedxImg" src="http://api.temple.siyuankunlun.cn/storage/materials/2023/01/10/indexTop.png" mode="widthFix"></image>
<view class="inedxCont">
<image class="inedxBack" src="/static/img/indexBack.png" mode="widthFix"></image>
<form @submit="siteform" class="inedxForm">
<view class="site-input">
<label>姓名<text>*</text></label>
<input placeholder="请输入" name="name" maxlength="4" :value="userData.nickname ? userData.nickname : ''"></input>
</view>
<image class="item-icon" src="@/static/icons/tool_icon_00.png" mode="widthFix"></image>
<view class="site-input">
<label>联系方式<text>*</text></label>
<input placeholder="请输入" class="site-disabled" :disabled="userData.username" name="tel" maxlength="11" type="number" :value="userData.username ? userData.username : ''"></input>
</view>
<view class="item item-sm" @click="$Router.push({name: 'Indexdetails'})">
<view class="item-content">
<view class="title">锶源昆仑</view>
<view class="submit">天然矿泉水</view>
<!-- 授权书 -->
<!-- <view class="agreement">
<checkbox-group @change="radioChange">
<checkbox style="transform: scale(.75)" color="#B79872" :checked="checked" size='6' class="radioGroup" />
</checkbox-group>
<view class="agreement-text">
下次自动填写阅读并同意<view class="agreement-color" @click="$Router.push({name: 'Agreement', params: {name : 'warrant'}})">授权书</view>
</view>
<image class="item-icon" src="@/static/icons/tool_icon_01.png" mode="widthFix"></image>
</view> -->
<view class="site-btn">
<button form-type="submit" size="mini" :disabled="disabled">
<image src="/static/img/indexBtn.png" mode="widthFix"></image>
</button>
<view class="site-tips">
剩余{{residue ? residue : '--'}}
</view>
</view>
<view class="tools-box">
<view class="item item-lg" @click="hasClick">
<view class="item-content">
<swiper
class="swiper-content"
easing-function="easeInOutCubic"
indicator-active-color="#4490ff"
indicator-color="rgba(68,144,255, .2)"
:indicator-dots="true"
:autoplay="true"
:vertical="true"
:circular="true"
>
<swiper-item>
<view class="swiper-item">
<view class="title">血糖</view>
<view class="submit">最近一次记录</view>
<view class="value">
<text>{{ caseData ? caseData.quantity : 0 }}</text>mmol/L
<view class="mapModular">
<view class="mapModular-img">
<map :latitude="latitude" :longitude="longitude" @click="clickMap" style="width: 100%; height: 270rpx;"></map>
</view>
<view class="time">{{ caseData ? caseData.created_at : '暂无记录时间' }}</view>
</view>
</swiper-item>
<swiper-item>
<view class="swiper-item">
<view class="title">血脂</view>
<view class="submit">最近一次记录</view>
<view class="value">
<text>{{ caseData ? caseData.quantity : 0 }}</text>mmol/L
</view>
<view class="time">{{ caseData ? caseData.created_at : '暂无记录时间' }}</view>
</view>
</swiper-item>
<swiper-item>
<view class="swiper-item">
<view class="title">血压</view>
<view class="submit">最近一次记录</view>
<view class="value">
<text>{{ caseData ? caseData.quantity : 0 }}</text> mmHg
</view>
<view class="time">{{ caseData ? caseData.created_at : '暂无记录时间' }}</view>
</view>
</swiper-item>
</swiper>
</view>
<!-- <image class="item-icon" src="@/static/icons/tool_icon_02.png" mode="widthFix"></image> -->
<view class="mapModular-name">
禅经寺地址{{city}}{{rough}}
</view>
</view>
</form>
</view>
<!-- 创建名片前提条件 -->
<view class="authBack" v-if="authState"></view>
<view class="authPop" v-if="authState">
<image @tap="authTap" class="authPop-cloes" src="/static/icons/uricacidClose.png"></image>
<image class="authPop-img" src="/static/imgs/authPop_img.png" mode="aspectFill"></image>
<view class="authPop-cont">
请先添加个人档案成功后可添加记录
</view>
<view class="authBtn" @tap="authUrl">去添加</view>
</view>
<image class="inedxImg-Down" src="http://api.temple.siyuankunlun.cn/storage/materials/2023/01/05/indexDown.png" mode="widthFix"></image>
</view>
</template>
<script>
import {
index
} from '@/apis/interfaces/mall'
import QQMapWX from '@/utils/qqmap-wx-jssdk.min.js'
import { mallIndex } from '@/apis/interfaces/mall'
export default {
data() {
return {
adverts : [], //轮播
goodsData : '', //商品
caseData : '', //今日尿酸量
authState : false,
hasCase : ''
latitude : '34.115519',
longitude: '108.958177',
rough : '',
city : '',
address : '',
disabled: false,
checked : false,
userData: '',
skuId : '',
residue : '',// 份数
qqMap: new QQMapWX({
key: 'MDGBZ-WDNC4-P6EUO-DOPPE-JAMMJ-ZNBA4',
vm: this
}),
}
},
onShow() {
// 获取首页数据
this.mallData();
// 获取商品详情数据
this.detailsInfo();
console.log(this.qqMap)
// 调用接口
this.qqMap.reverseGeocoder({
location: {
latitude: 34.115519,
longitude: 108.958177
},
success: locatRes => {
this.rough = locatRes.result.formatted_addresses.rough
this.city = locatRes.result.address_component.city
},
fail: res => {},
complete: res => {}
});
},
methods: {
// 首页数据
mallData() {
index().then(res => {
this.caseData = res.last_case_log
this.goodsData = res.goods
this.hasCase = res.hasCase
this.adverts = res.banners
// 商品详情数据
detailsInfo() {
mallIndex().then(res => {
this.userData = res.user
this.skuId = res.show_goods.skus[0].sku_id
this.residue = res.residue
}).catch(err => {
uni.showToast({
title: err.message,
@@ -116,237 +102,165 @@
})
},
// 是否认证
hasClick() {
if(this.$store.getters.getToken) {
if(!this.hasCase) {
this.authState = !this.authState
return
}
this.$Router.push({ name: 'uricacidIndex' });
return
}
this.$Router.push({ name: 'Login' });
// 勾选协议
radioChange() {
this.checked = !this.checked
},
// 去认证
authUrl() {
this.$Router.push({ name: 'Attestation', params: { editState: false } });
this.authState = !this.authState
// 跳转
siteform(e) {
let value = e.detail.value
if(this.$store.getters.getToken != '') {
if(value.name != '' && value.tel != '') {
this.$Router.push({
name: 'indexPlace',
params: {
name : value.name ,
skuId : this.skuId
},
// 关闭认证提示弹出层
authTap() {
this.authState = !this.authState
},
// 能量跳转
JumpUrl(open) {
let type = open.openType
switch (type) {
case 'switchTab':
this.$Router.pushTab({
name: open.path
})
break;
case 'web':
window.location.href = open.url
break;
case 'navigateTo':
this.$Router.push({path: open.path + '?' + open.params})
break;
}
else {
uni.showToast({
title: '请填写信息',
icon: "none"
})
}
return
}
// 立即登录
if(value.name != '' && value.tel != '') {
// 立即登录
this.$Router.push({
name: 'Login',
params: {
name : value.name,
tel : value.tel,
skuId : this.skuId,
},
})
} else {
uni.showToast({
title: '请填写信息',
icon: "none"
})
}
},
// 跳地图
clickMap(){
uni.openLocation({
longitude: Number(this.longitude),
latitude : Number(this.latitude),
name : this.city,
address : this.rough
})
},
}
}
</script>
<style lang="scss" scoped>
.content{
overflow: hidden;
min-height: calc(100vh - 60px);
background: #ecf4f6;
box-sizing: border-box;
}
.banner{
.inedxImg {
width: 100%;
}
// 快速入口
.tools{
display: flex;
padding: 0 $padding/2;
.tools-box{
padding: 0 $padding/2;
width: 50%;
box-sizing: border-box;
.item-lg{
height: 280rpx + $margin;
.item-icon{
position: absolute;
right: 0;
bottom: 0;
width: 128rpx;
}
}
}
.tools-flex{
.item-sm{
height: 140rpx;
&:last-child{
margin-top: $margin;
}
.item-icon{
position: absolute;
right: 0;
bottom: 0;
width: 100rpx;
}
}
}
.item{
display: block;
position: relative;
padding: 0 $padding;
background: white;
border-radius: $radius;
font-size: $title-size-m;
box-shadow: 0 0 5rpx 5rpx rgba($color: $border-color, $alpha: .5);
overflow: hidden;
.item-content{
padding: 30rpx 0;
.title{
font-weight: bold;
font-size: $title-size-lg;
color: $text-color;
line-height: 40rpx;
}
.submit{
line-height: 40rpx;
font-size: $title-size-sm;
color: $text-gray;
}
.value{
padding: 10rpx 0;
color: $text-gray;
line-height: 100rpx;
font-size: $title-size-sm;
& > text{
color: $text-color;
font-weight: bold;
font-size: $title-size + 26;
padding-right: 10rpx;
}
}
.time{
color: $text-gray;
font-size: $title-size-sm;
line-height: 40rpx;
}
}
.swiper-content{
height: calc(171px - 60rpx);
box-sizing: border-box;
z-index: 9;
}
.inedxImg-Down {
width: 100%;
display: block;
position: relative;
z-index: 9;
}
.inedxCont {
display: block;
position: relative;
z-index: 1;
top: -160rpx;
padding-top: 126%;
.inedxBack {
width: 100%;
top: 0;
}
// 精选推荐
.news-title{
padding: $padding;
.inedxBack,
.inedxForm {
width: 100%;
position: absolute;
left: 0;
}
.inedxForm {
top: 160rpx;
padding: 0 $padding * 2;
box-sizing: border-box;
}
.site-input {
padding: $padding 0;
box-sizing: border-box;
line-height: 80rpx;
border-bottom: 2rpx solid #6F6F6F;
label {
font-size: $title-size;
font-weight: bold;
color: $text-color;
}
.news-item{
margin: 0 $margin $margin;
background: white;
border-radius: $radius;
padding: $padding;
box-shadow: 0 0 5rpx 5rpx rgba($color: $border-color, $alpha: .5);
.item-title{
font-weight: bold;
font-size: $title-size + 2;
color: $text-color;
}
.item-cover{
width: 100%;
padding-top: 50%;
position: relative;
margin: ($margin - 10) 0;
& > image{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: $border-color-light;
color: #6f6f6f;
text {
font-weight: 600;
color: red;
}
}
.item-time{
display: flex;
justify-content: space-between;
font-size: $title-size-sm;
color: $text-gray;
}
}
/* 认证弹出 */
.authBack {
background: rgba(0, 0, 0, .35);
position: fixed;
width: 100%;
height: 100%;
left: 0;
top: 0;
z-index: 9;
}
.authPop {
background-color: #ffffff;
position: fixed;
left: 50%;
top: 50%;
width: 400rpx;
height: 500rpx;
margin-left: -200rpx;
margin-top: -250rpx;
z-index: 10;
border-radius: 10rpx;
text-align: center;
padding: 40rpx 0;
box-sizing: border-box;
}
.authPop-img {
width: 200rpx;
height: 200rpx;
}
.authPop-cont {
padding: 0 40rpx;
box-sizing: border-box;
font-size: 28rpx;
line-height: 44rpx;
.site-disabled {
color: #999;
margin-bottom: 40rpx;
}
}
.agreement{
margin: $margin + 10 0 $margin * 2;
display: flex;
line-height: 44rpx;
font-size: $title-size-sm - 2;
color: #ABABAB;
.agreement-text {
display: flex;
line-height: 52rpx;
.agreement-color {
color: #B79872;
}
}
}
.authBtn {
background: #6d79ec;
margin: 0 40rpx;
color: white;
font-size: 30rpx;
line-height: 74rpx;
border-radius: 6rpx;
width: calc(100% - 80rpx);
.site-btn {
display: inline-block;
text-align: center;
width: 100%;
margin-top: 70rpx;
button {
background: transparent;
border: none;
image {
width: 240rpx;
}
&::after {
display: none;
}
}
.site-tips {
color: red;
font-size: $title-size-m;
}
}
.authPop-cloes {
position: absolute;
top: 10rpx;
right: 10rpx;
z-index: 11;
width: 36rpx;
height: 36rpx;
.mapModular {
margin-top: 60rpx;
color: #6f6f6f;
font-size: 27rpx;
.mapModular-img {
height: 270rpx;
border: #ae8e69 2rpx solid;
background-color: #ffffff;
}
.mapModular-name {
padding: 20rpx 10rpx;
box-sizing: border-box;
}
}
}
</style>

190
pages/index/pay.vue Normal file
View File

@@ -0,0 +1,190 @@
<template>
<view class="content">
<view class="paymentTop">
<view class="paymentTop-name">
需支付金额
</view>
<view class="paymentTop-price">
<text></text>{{this.$Route.query.total}}
</view>
</view>
<view class="paymentList">
<view class="paymentList-label">
<view class="paymentList-left">
<image class="paymentList-icon" src="@/static/img/payWechat.png" mode="widthFix"></image>微信支付
</view>
<view class="paymentList-right">
<image class="paymentList-img" src="@/static/img/payCheck_active.png" mode="widthFix"></image>
</view>
</view>
</view>
<view class="paymentBtn">
<button type="default" :disabled="disabled" class="paymentBtn-go" @click="payGo">去支付</button>
</view>
</view>
</template>
<script>
const jweixin = require('jweixin-module');
import { donationPay } from '@/apis/interfaces/mall'
export default {
data() {
return {
total: '', //支付金额
disabled: false
}
},
onLoad() {
},
onShow() {
},
methods: {
payGo (){
// 微信支付
donationPay(this.$Route.query.orderNo, {
type : 'mp',
openid: this.$store.getters.getOpenId
}).then(res => {
let wxConfig = JSON.parse(res.wechat)
jweixin.config({
appId: wxConfig.appId,
debug: false,
jsApiList: ['chooseWXPay'],
signature: wxConfig.signature,
nonceStr: wxConfig.nonceStr,
timestamp: wxConfig.timestamp,
})
jweixin.ready(() => {
jweixin.chooseWXPay({
timestamp: wxConfig.timeStamp,
nonceStr: wxConfig.nonceStr,
package: wxConfig.package,
signType: wxConfig.signType,
paySign: wxConfig.paySign,
success: payRes => {
uni.showToast({
title: '支付成功',
icon: 'none'
})
this.disabled = true
setTimeout(()=>{
this.$Router.replace({ name: 'OrderIndex', params: { listType: 'paid' }});
},1000)
},
fail: payfail => {
uni.showToast({
title: '取消支付',
icon: 'none'
})
this.disabled = true
setTimeout(()=>{
this.$Router.replace({ name: 'OrderIndex', params: { listType: 'unpay' }});
},1000)
}
});
});
}).catch(err => {
uni.showToast({
title: err.message,
icon: "none"
})
})
}
}
}
</script>
<style lang="scss" scoped>
.content{
background: #f4f4f4;
height: 100vh;
overflow-y: scroll;
}
.paymentTop {
padding: $padding * 4 $padding $padding * 3;
box-sizing: border-box;
text-align: center;
color: #666666;
.paymentTop-name {
padding-left: $padding;
box-sizing: border-box;
}
.paymentTop-price {
color: $mian-color;
font-size: $title-size + 40;
font-weight: 600;
margin: $margin - 10 0;
text {
font-size: $title-size + 10;
}
}
}
.paymentList {
padding: 0 $padding;
box-sizing: border-box;
.paymentList-label {
background-color: #ffffff;
border-radius: $radius;
padding: $padding + 10 $padding;
box-sizing: border-box;
margin-bottom: $margin + 10;
display: flex;
.paymentList-left {
flex: 1;
display: flex;
line-height: 40rpx;
.paymentList-icon {
width: 40rpx;
height: 40rpx;
margin-right: $margin - 10;
}
}
.paymentList-right {
display: flex;
.paymentList-tips {
background-image: linear-gradient(to left, #FF4646, #FF7676);
height: 44rpx;
line-height: 44rpx;
font-size: $title-size-sm;
color: #ffffff;
opacity: .9;
border-radius: $radius * 2;
padding: 0 10rpx;
}
.paymentList-arrow {
width: 14rpx;
margin: 10rpx 0 0 20rpx;
}
.paymentList-img {
width: 32rpx;
height: 32rpx;
margin-top: 4rpx;
}
}
}
}
.paymentBtn {
position: fixed;
bottom: $margin * 2;
left: 0;
text-align: center;
padding: 0 $padding;
box-sizing: border-box;
width: 100%;
.paymentBtn-go {
background-color: $mian-color;
color: #ffffff;
border-radius: $radius-m;
line-height: 100rpx;
font-size: $title-size + 2;
&[disabled] {
background-color: #666666;
}
}
}
</style>

358
pages/index/place.vue Normal file
View File

@@ -0,0 +1,358 @@
<template>
<view class="content">
<form @submit="stockForm" class="take">
<view class="take">
<view class="take-label">
<view class="item">
<view class="name">
<image src="@/static/icons/takeIcon_10.png" mode="widthFix"></image>单价金额
</view>
<view class="number numberColor">
{{amount}}
</view>
</view>
<view class="item">
<view class="name">
<image src="@/static/icons/takeIcon_01.png" mode="widthFix"></image>捐赠份数
</view>
<view class="number">
<view class="btn" @click="goodsNumber('remove')">-</view>
<input @blur="goodsNumberInput" class="see" type="text" :value="num" />
<view class="btn" @click="goodsNumber('plus')">+</view>
</view>
</view>
<view class="item">
<view class="name">
<image src="@/static/icons/takeIcon_02.png" mode="widthFix"></image>我的祝福
</view>
<textarea class="remarks" name="remark" placeholder="请输入祝福语~" />
</view>
</view>
<view class="take-label">
<view class="item site" :class="{active : address == ''}">
<block v-if="address">
<view class="site-title">
{{address.name}}<text>{{address.mobile}}</text>
</view>
<view class="site-text">
{{address.full_address}}
</view>
<view class="site-change" @click="$Router.push({name: 'addressIndex', params: { type: 'selectAddress', experience: isExperience}})">
更改地址 <u-icon name="arrow-right" size="26" color="#e64248"></u-icon>
</view>
</block>
<view class="edit-no" v-else>
<image src="/static/imgs/site_no_add.png"></image>
<view class="site-change" @click="$Router.push({name: 'addressIndex', params: { type: 'selectAddress', experience: isExperience}})">
新增地址 <u-icon name="arrow-right" size="26" color="#e64248"></u-icon>
</view>
</view>
</view>
</view>
</view>
<view class="site-btn">
<button form-type="submit" :disabled="disabled">立即支付</button>
</view>
</form>
</view>
</template>
<script>
const jweixin = require('jweixin-module');
import { donationTake, donationSee } from '@/apis/interfaces/mall'
export default {
data() {
return {
num : 1, //数量默认1
address : '', //地址
stockData : '', //数据
isExperience : '', //身份
disabled : false,
amount : ''
}
},
onShow() {},
created() {
// 获取前置
this.pickInfo();
},
methods: {
// 提货前置
pickInfo (){
donationSee({
qty : this.num,
goods_sku_id: this.$Route.query.skuId
}).then(res => {
this.address = res.address
this.amount = res.amount
// this.isExperience = res.dientity.is_experience
}).catch(err => {
uni.showToast({
title: err.message,
icon: "none"
})
})
},
// 商品数量加减
goodsNumber(e){
let num = this.num
if (e == 'plus'){
num ++;
if(num > this.stockData.stock ){
wx.showToast({
title: '商品数量不能大于库存量',
icon: 'none'
});
num = this.stockData.stock
}
}else{
if (num > 1){
num --;
}else{
uni.showToast({
title : '商品数量不能小于1',
icon : 'none'
})
}
this.num = num
}
this.num = num
},
/**
* 输入商品数量
*/
goodsNumberInput(e) {
let goodsNum = e.detail.value;
if (goodsNum > 0) {
if(goodsNum > this.stockData.stock ){
uni.showToast({
title: '商品数量不能大于库存量',
icon: 'none'
});
this.num = this.stockData.stock
return
}
this.num = goodsNum
} else {
uni.showToast({
title: '商品数量不能小于1',
icon: 'none'
});
this.num = 1
}
},
// 申请提货
stockForm(e) {
let newQty = this.num
if(this.isExperience) {
newQty = this.stockData.stock
}
let data = {
remark : e.detail.value.remark,
qty : newQty,
address_id : this.address.address_id,
goods_sku_id: this.$Route.query.skuId,
name : this.$Route.query.name
}
donationTake(data).then(takeRes => {
this.disabled = true
// 跳到支付页面
this.$Router.replaceAll({name: 'indexPay', params: { orderNo: takeRes.order_no, total: takeRes.total }})
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
}
}
}
</script>
<style lang="scss" scoped>
.content {
background-color: #f4f4f4;
min-height: 100vh;
}
.take {
border-bottom: 180rpx solid transparent;
}
.take-label {
padding: $padding $padding 0;
box-sizing: border-box;
.item {
padding: $padding;
box-sizing: border-box;
background-color: #FFFFFF;
border-bottom: 2rpx solid #f3f3f3;
position: relative;
font-size: $title-size-lg;
.name {
display: flex;
flex: 1;
image {
width: 44rpx;
height: 44rpx;
margin-right: 15rpx;
}
}
.time {
color: #565656;
position: absolute;
right: $padding;
top: $padding;
}
.stock {
font-weight: 600;
text {
padding-left: 5rpx;
}
}
.number {
display: flex;
position: absolute;
right: $padding;
top: $padding;
&.numberColor {
color: #e64248;
font-weight: 600;
}
.btn {
width: 40rpx;
height: 40rpx;
line-height: 34rpx;
font-weight: 600;
border-radius: 50%;
color: #1d37e2;
border: #1d37e2 2rpx solid;
text-align: center;
}
.see {
width: 60rpx;
text-align: center;
padding: 0 $padding - 10;
line-height: 42rpx;
font-size: $title-size;
display: inline-block;
}
}
.remarks {
margin-top: $margin;
background-color: #f4f4f4;
font-size: $title-size-lg;
padding: 20rpx $padding;
box-sizing: border-box;
border-radius: $radius-sm;
color: $text-gray;
width: 100%;
}
}
.site {
padding: $padding;
position: relative;
// &::after {
// position: absolute;
// content: '';
// left: $padding + 10;
// top: $padding + 30;
// background-color: #FFFFFF;
// border: #e64248 solid 6rpx;
// width: 12rpx;
// height: 12rpx;
// border-radius: 50%;
// }
&.active::after {
display: none;
}
.site-title {
margin-bottom: 10rpx;
font-weight: 600;
font-size: $title-size;
text {
padding-left: 10rpx;
}
}
.site-text {
color: #565656;
}
.site-change {
border: 2rpx solid #e64248;
text-align: center;
line-height: 74rpx;
color: #e64248;
border-radius: $radius-m;
margin-top: $margin;
}
}
}
/* 按钮 */
.site-btn {
width: 100%;
box-sizing: border-box;
padding: 30rpx;
position: fixed;
bottom: 0;
left: 0;
z-index: 99;
right: 0;
background: white;
button {
background: #B79872;
text-align: center;
color: white;
height: 88rpx;
line-height: 88rpx;
font-size: $title-size;
font-weight: normal;
width: 100%;
margin: 0;
padding: 0;
border-radius: 10rpx;
&[disabled] {
background: #7789ff !important;
color: #fff !important;
}
}
}
.edit-no {
text-align: center;
color: $text-gray;
image {
width: 240rpx;
height: 240rpx;
}
}
// 温馨提示
.reminder {
background-color: #eef0ff;
color: #B79872;
padding: $padding;
box-sizing: border-box;
.reminder-tips {
font-weight: 600;
margin-bottom: 10rpx;
display: flex;
line-height: 34rpx;
image {
width: 34rpx;
height: 34rpx;
margin-right: 10rpx;
}
}
text {
font-size: $title-size-lg;
padding-left: 44rpx;
}
}
</style>

313
pages/index/write.vue Normal file
View File

@@ -0,0 +1,313 @@
<template>
<view class="content">
<form @submit="writeform" class="site-form">
<view class="issue-block">
<view class="issue-textarea">
<textarea placeholder="请输入您要发布的内容~" name="content"></textarea>
</view>
<view class="album-list">
<view class="album-list-li" v-for="(item, index) in albumArr" :key="index">
<image class="album-list-img" :src="item.showpath" mode="aspectFill" @click="openImg(index)"></image>
<view class="album-remove" @click="removeImg(index)">删除</view>
</view>
<view class="album-list-li">
<view class="album-list-li-add" @click="addAlbum()">
<image class="album-list-add-icon" src="@/static/icons/circle_add.png"></image>
<view>添加</view>
</view>
</view>
</view>
</view>
<view class="site-btn">
<button form-type="submit" size="mini" :disabled="disabled">立即发布</button>
</view>
</form>
<!-- 提示弹出框 start -->
<view class="publicBack" v-if="popStatus"></view>
<view class="publicPop" v-if="popStatus">
<view class="publicPop-cont">
<image class="publicPop-img" src="@/static/imgs/Water_drop.png" mode="widthFix"></image>
<view class="publicPop-text">
<view class="number">+{{score}}</view>
<text>水滴</text>
</view>
<image class="publicPop-left publicPop-right" src="@/static/imgs/Water_img.png" mode="widthFix"></image>
<view class="publicPop-tips">
<image src="@/static/imgs/Water_icon.png" mode="widthFix"></image>水滴已发放!
</view>
<image class="publicPop-left" src="@/static/imgs/Water_img.png" mode="widthFix"></image>
</view>
<image src="@/static/icons/waterPop_close.png" mode="widthFix" class="publicPop-close" @click="knowClick"></image>
</view>
</view>
</template>
<script>
import { surveysForm } from '@/apis/interfaces/gout'
import { uploads } from '@/apis/interfaces/uploading'
export default {
data() {
return {
score : '', //水滴值
albumArr : [], //图片
disabled : false, //按钮状态
popStatus: false, //获得水滴弹出层状态
}
},
methods:{
// 上传商品封面图片
addAlbum(key){
let count = 9 - this.albumArr.length
uni.chooseImage({
success : res => {
let path = res.tempFiles.map((val, index) => {
return {
name: 'uploads' + index,
uri : val.path
}
})
uploads(path).then(updRes => {
for(let i in updRes.path){
this.albumArr.push({
path : updRes.path[i],
showpath: updRes.url[i]
})
}
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
}
})
},
// 图片预览
openImg(index){
let paths = this.albumArr.map(val => {
return val.showpath
})
uni.previewImage({
urls : paths,
current : index,
indicator: 'number'
})
},
// 删除图片
removeImg(index){
this.albumArr.splice(index, 1)
},
// 发布反馈
writeform(e) {
let newPictures = this.albumArr.map(val => {
return val.path
})
if(this.albumArr.length <= 0) {
uni.showToast({
title: '缺少反馈图片',
icon : 'none'
})
return
}
let data = {
content : e.detail.value.content,
pictures : newPictures
}
surveysForm(data).then(res => {
this.disabled = true
if(res.score > 0) {
this.score = res
this.popStatus = true
return
}
this.$Router.replaceAll({ name: 'IndexFeeling'})
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
},
// 我知道了
knowClick() {
this.popStatus = false
this.$Router.replaceAll({ name: 'IndexFeeling'})
}
}
}
</script>
<style lang="scss" scoped>
.content{
height: 100vh;
overflow: hidden;
background-color: #f5f5f5;
padding: $padding;
box-sizing: border-box;
}
.issue-block {
background: white;
padding: $padding;
box-sizing: border-box;
border-radius: $radius-m;
}
.issue-textarea {
textarea {
width: 100%;
height: 200rpx;
}
}
.album-list{
display: flex;
flex-wrap:wrap;
.album-list-li {
margin-right: 10rpx;
position: relative;
width: calc(25% - 10rpx);
padding-top: calc(25% - 10rpx);
box-sizing: border-box;
.album-list-img,
.album-list-li-add{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: #f5f5f5;
border-radius: 6rpx;
}
.album-list-li-add {
text-align: center;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-box-pack: center;
color: #666;
font-size: 26rpx;
.album-list-add-icon{
width: 34rpx;
height: 34rpx;
}
}
.album-remove{
position: absolute;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, .5);
color: white;
font-size: 28rpx;
text-align: center;
line-height: 50rpx;
width: 100%;
z-index: 9;
}
&:last-child {
margin: 0;
}
}
}
.site-btn {
margin-top: 120rpx;
button[size="mini"] {
width: 100%;
background: #1d37e2;
height: 88rpx;
line-height: 88rpx;
font-size: $title-size-lg;
color: white;
padding: 0;
&[disabled] {
background: #7789ff !important;
color: #fff !important;
}
}
}
// 获得水滴弹出层提示
.publicBack {
position: fixed;
width: 100vw;
height: 100vh;
left: 0;
top: 0;
background-color: rgba(0,0,0,.5);
z-index: 99;
}
.publicPop {
left: 50%;
top: 50%;
width: 440rpx;
height: 300rpx;
margin-left: -220rpx;
margin-top: -200rpx;
position: fixed;
z-index: 100;
background-color: #ffffff;
border-radius: $radius;
text-align: center;
.publicPop-close {
position: absolute;
top: -20rpx;
right: -20rpx;
z-index: 102;
width: 54rpx;
height: 54rpx;
}
.publicPop-img {
width: 70%;
margin: -30rpx auto 0;
}
.publicPop-text {
padding-bottom: 20rpx;
box-sizing: border-box;
font-weight: 600;
color: #e56653;
padding-top: 40rpx;
.number {
font-size: $title-size + 40;
display: inline-block;
padding-right: 10rpx;
}
text {
font-size: $title-size + 4;
display: inline-block;
line-height: 86rpx;
vertical-align: bottom;
}
}
.publicPop-tips {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
background-color: #fdfae7;
color: #e6a950;
line-height: 80rpx;
font-weight: 600;
border-top: 2rpx solid #f6ede6;
border-radius: 0 0 $radius $radius;
image {
width: 54rpx;
height: 54rpx;
vertical-align: -14rpx;
}
}
.publicPop-left {
width: 90rpx;
position: absolute;
top: 46%;
right: 2rpx;
}
.publicPop-right {
transform:rotate(180deg);
left: 2rpx;
}
}
</style>

34
pages/login/agreement.vue Normal file
View File

@@ -0,0 +1,34 @@
<template>
<view class="agreement-content">
<view v-if="name == 'warrant'">授权书</view>
<view v-else v-html="content"></view>
</view>
</template>
<script>
import { registeragree } from '@/apis/interfaces/auth'
export default {
data() {
return {
content: '',
name : ''
};
},
onShow() {
this.name = this.$Route.query.name
if(this.$Route.query.name != 'warrant') {
registeragree(this.$Route.query.name).then(res=> {
this.content = res.content
})
}
}
}
</script>
<style lang="scss" scoped>
.agreement-content{
padding: $padding * 2;
font-size: $title-size;
}
</style>

View File

@@ -6,21 +6,31 @@
</view>
未注册的手机号码将自动注册
</view>
<!-- 姓名 -->
<view class="inputs">
<input type="text" v-model="name" placeholder="输入您的姓名" maxlength="4" />
</view>
<!-- 输入手机号相关 -->
<view class="inputs phone">
<label class="label">+86</label>
<input type="number" placeholder="输入您的手机号码" maxlength="11" v-model="phone" />
<input type="number" placeholder="输入您的手机号码" maxlength="11" v-model="tel" />
</view>
<view class="inputs sms">
<input type="number" placeholder="输入短信验证码" maxlength="4" v-model="code" />
<button class="sms-btn" type="default" size="mini" :disabled="phone == '' || getSms"
<button class="sms-btn" type="default" size="mini" :disabled="tel == '' || getSms"
@click="getPhoneCode">{{getSms ? '重新发送' + smsTime + 's': '发送验证码'}}</button>
</view>
<view class="inputs">
<input placeholder="邀请码 (选填)" maxlength="10" v-model="parentId" />
<button class="btn" type="default" :disabled="tel == '' || code == ''" @click="login">登录</button>
<!-- 用户登录注册协议 -->
<view class="agreement">
<checkbox-group @change="radioChange">
<checkbox color="#4490ff" :checked="checked" size='10' class="radioGroup" />
</checkbox-group>
<view class="agreement-text">
登录即表示同意用户<view @click="$Router.push({name: 'Agreement', params: {name : 'secret'}})">隐私协议</view><view @click="$Router.push({name: 'Agreement', params: {name : 'protocol'}})">服务协议</view>
</view>
<button class="btn" type="default" :disabled="phone == '' || code == ''" @click="login">登录</button>
<view class="beianNo">黑ICP备2021013714号-1</view>
</view>
<!-- <view class="beianNo">黑ICP备2021013714号-1</view> -->
</view>
</template>
@@ -32,30 +42,65 @@
export default {
data() {
return {
phone : "",
name : "",
code : "",
parentId: "",
tel : '', //获取手机号
channelId: '', //渠道码
newUser : '', //是否为新用户
smsTime : 60,
checked : false, //勾选协议
getSms : false
}
},
mounted(){
this.parentId = this.$Route.query.invite || ''
this.parentId = this.$store.getters.getParentId
this.channelId = this.$Route.query.channel || ''
this.name = this.$Route.query.name
this.tel = this.$Route.query.tel
},
methods: {
// 用户登录
login() {
smsAuth({
mobileNo : this.phone,
mobileNo : this.tel,
code : this.code,
invite : this.parentId
invite : this.parentId,
channel : this.channelId,
name : this.name
}).then(res => {
this.$store.commit('setIntive', res.invite)
if(this.checked) {
this.$store.commit('setToken', res.token_type + ' ' + res.access_token)
if(this.$Route.toName){
this.$Router.back()
}else{
this.$Router.replaceAll({name: 'Index'})
if(this.$Route.query.skuId){
this.$Router.replace({
name: 'indexPlace',
params: {
name : this.name,
skuId : this.$Route.query.skuId
},
})
return
}
this.$Router.back()
// if(this.$Route.toName){
// }else{
// // this.$Router.back()
// if(getApp().globalData.envType == 'indexPage') {
// this.$Router.replaceAll({name: 'Index'})
// } else if(getApp().globalData.envType == 'userPage') {
// this.$Router.replaceAll({name: 'Index'})
// } else {
// this.$Router.replaceAll({name: 'Index'})
// }
// }
} else {
uni.showToast({
title: '请勾选用户隐私和服务协议',
icon: "none"
})
}
}).catch(err => {
uni.showToast({
title: err.message,
@@ -67,8 +112,9 @@
getPhoneCode() {
let outTime
getSms({
mobileNo: this.phone
mobileNo: this.tel
}).then(res => {
this.newUser = res.new
uni.showToast({
title: res,
icon: "none"
@@ -88,6 +134,11 @@
icon: "none"
})
})
},
// 勾选协议
radioChange() {
this.checked = !this.checked
}
}
}
@@ -97,7 +148,7 @@
.content {
height: 100vh;
width: 100vw;
padding: $padding * 3;
padding: $padding * 3 $padding * 2;
box-sizing: border-box;
background: white;
@@ -206,11 +257,9 @@
line-height: 90rpx;
height: 90rpx;
font-weight: bold;
&::after {
border: none;
}
&[disabled] {
background: rgba($color: $mian-color, $alpha: .6);
}
@@ -220,6 +269,30 @@
color: $text-gray;
text-align: center;
padding-top: $padding*2;
position: fixed;
width: 100%;
left: 0;
bottom: 50rpx;
}
}
// 协议
.agreement {
font-size: $title-size-sm;
color: $text-gray;
margin-top: $margin - 10;
display: flex;
.radioGroup {
transform: scale(.6);
width: 55rpx;
text-align: left;
}
.agreement-text {
width: calc(100% - 55rpx);
line-height: 48rpx;
view {
color: #000;
display: inline-block;
}
}
}
</style>

202
pages/member/dredge.vue Normal file
View File

@@ -0,0 +1,202 @@
<template>
<view class="content">
<form @submit="issueForm" class="take">
<view class="take-label">
<view class="item">
<view class="name">
<image src="@/static/icons/takeIcon_04.png" mode="widthFix"></image>手机号码
</view>
<view class="time">{{username}}</view>
</view>
<view class="item">
<view class="name">
<image src="@/static/icons/takeIcon_05.png" mode="widthFix"></image>姓名
</view>
<input class="entry" maxlength="4" type="text" name="name" placeholder="请输入真实姓名" />
</view>
<view class="item">
<view class="name">
<image src="@/static/icons/takeIcon_06.png" mode="widthFix"></image>银行卡
</view>
<input class="entry" type="idcard" name="card_no" placeholder="请输入银行卡" />
</view>
<view class="item">
<view class="name">
<image src="@/static/icons/takeIcon_07.png" mode="widthFix"></image>打款凭证
</view>
<view class="issueNew" @click="openImg()">
<image class="issueNew-icon" :src="voucher.showpath || '/static/imgs/cover_img.png'" mode="aspectFill"></image>
<view class="issueNew-text">请上传打款凭证图</view>
</view>
</view>
</view>
<view class="userdata-btn">
<button class="issue-btn" form-type="submit" size="mini" :disabled="disabled">提交审核</button>
</view>
</form>
</view>
</template>
<script>
import { memberOpen } from '@/apis/interfaces/member'
import { userIndex } from '@/apis/interfaces/user'
import { uploads } from '@/apis/interfaces/uploading'
export default {
data() {
return {
username: '', //用户手机号
seeData : {
name : '',
card_no : ''
},
voucher :{ //打款凭证
showpath: '',
path : ''
},
disabled : false ,// 提交按钮状态
}
},
onShow() {
userIndex().then(res => {
this.username = res.username
}).catch(err => {
uni.showToast({
title: err.message,
icon: "none"
})
})
},
methods: {
// 上传图片
openImg(){
uni.chooseImage({
count : 1,
success : path => {
uploads([{
uri : path.tempFilePaths[0]
}]).then(res => {
this.voucher = {
showpath: res.url[0],
path: res.path[0]
}
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
}
})
},
// 提交表单
issueForm(e) {
let value = e.detail.value;
let data = {
name : value.name,
card_no : value.card_no,
cover : this.voucher.path
}
memberOpen(data).then(res => {
this.disabled = true
this.$Router.push({ name: 'User' });
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
}
}
}
</script>
<style lang="scss" scoped>
.content {
background-color: #f4f4f4;
}
.take-label {
padding: $padding $padding 0;
box-sizing: border-box;
border-bottom: 160rpx solid transparent;
.item {
padding: $padding - 10 $padding - 10 $padding;
box-sizing: border-box;
background-color: #FFFFFF;
border-bottom: 2rpx solid #f3f3f3;
position: relative;
font-size: $title-size-lg;
margin-bottom: $margin;
border-radius: $radius;
.name {
display: flex;
flex: 1;
image {
width: 44rpx;
height: 44rpx;
margin-right: 15rpx;
}
}
.time {
color: $text-gray;
position: absolute;
right: $padding;
top: $padding - 6;
}
.entry {
margin-top: $margin - 10;
background-color: #f4f4f4;
font-size: $title-size-lg;
padding: 0 $padding;
height: 84rpx;
line-height: 84rpx;
box-sizing: border-box;
border-radius: $radius-sm;
color: $text-gray;
width: 100%;
}
.issueNew {
text-align: center;
margin-top: 20rpx;
.issueNew-icon {
width: 200rpx;
height: 200rpx;
}
.issueNew-text {
font-size: $title-size-m;
color: $text-gray;
}
}
}
}
/* 按钮 */
.userdata-btn {
width: 100%;
box-sizing: border-box;
padding: 30rpx;
position: fixed;
bottom: 0;
left: 0;
z-index: 99;
right: 0;
background: white;
.issue-btn {
background: #1d37e2;
text-align: center;
color: white;
height: 90rpx;
line-height: 90rpx;
font-size: 34rpx;
font-weight: normal;
width: 100%;
margin: 0;
padding: 0;
border-radius: 10rpx;
&[disabled] {
background: #1d37e2 !important;
color: #fff !important;
}
}
}
</style>

242
pages/member/index.vue Normal file
View File

@@ -0,0 +1,242 @@
<template>
<view class="content">
<image class="member-back" v-if="tabType == 'month'" src="http://api.temple.siyuankunlun.cn/storage/materials/2023/01/04/monthMember_back.png" mode="aspectFill"></image>
<image class="member-back" v-else-if="tabType == 'season'" src="http://api.temple.siyuankunlun.cn/storage/materials/2023/01/04/member_back.png" mode="aspectFill"></image>
<image class="member-back" v-else src="http://api.temple.siyuankunlun.cn/storage/materials/2023/01/04/yearMember_back.png" mode="aspectFill"></image>
<view class="tab">
<view class="tab-item monthColor" :class="{active : tabType == 'month'}" @click="typeClick('month')">月卡会员</view>
<view class="tab-item seasonColor" :class="{active : tabType == 'season'}" @click="typeClick('season')">季卡会员</view>
<view class="tab-item yearColor" :class="{active : tabType == 'year'}" @click="typeClick('year')">年卡会员</view>
</view>
<view class="rights">
<view class="member-cont">
<block v-if="tabType == 'month'">
<image class="member-title" src="http://api.temple.siyuankunlun.cn/storage/materials/2023/01/04/monthMember_title.png" mode="widthFix"></image>
</block>
<block v-else-if="tabType == 'season'">
<image class="member-title" src="http://api.temple.siyuankunlun.cn/storage/materials/2023/01/04/quarterMember_title.png" mode="widthFix"></image>
<!-- <image v-if="couponPrice" class="member-error" src="http://api.siyuankunlun.com/storage/materials/2022/08/30/member_cost.png" mode="widthFix"></image> -->
</block>
<block v-else>
<image class="member-title" src="http://api.temple.siyuankunlun.cn/storage/materials/2023/01/04/yearMember_title.png" mode="widthFix"></image>
<!-- <image class="member-error" src="http://api.siyuankunlun.com/storage/materials/2022/08/30/yearMember_cost.png" mode="widthFix"></image> -->
</block>
</view>
<view class="member-btn">
<image class="member-btn-img" src="http://api.siyuankunlun.com/storage/materials/2022/08/30/member_Btn.png" mode="widthFix"></image>
<view class="member-btn-text" v-if="can.open" @click="$Router.push({name: 'memberOpen', params:{identity_id: newId}})">点击开通会员</view>
<block v-else>
<view class="member-btn-text" v-if="can.renew" @click="$Router.push({name: 'memberOpen', params:{identity_id: newId}})">
立即续费
</view>
<view class="member-btn-text active" v-else>
{{buttonText}}
</view>
</block>
<!-- <view class="member-btn-tips" v-if="tabType == 'season'">
<block v-if="couponPrice">
<image src="http://api.siyuankunlun.com/storage/materials/2022/08/30/member_choose.png" mode="aspectFill"></image>
您有一张抵值券可抵8640
</block>
</view>
<view class="member-btn-tips" v-else>
<image src="http://api.siyuankunlun.com/storage/materials/2022/08/30/member_choose.png" mode="aspectFill"></image>
开通年度会员享受5.25
</view> -->
</view>
</view>
</view>
</template>
<script>
import { identitySee } from '@/apis/interfaces/member'
import { userIndex } from '@/apis/interfaces/user'
export default {
data() {
return {
identities : '', //身份信息
userData : '', //用户信息
tabType : 'month', //会员标签
can : '', //操作按钮
buttonText : '', //按钮名字
notRules : '', //权益
couponPrice : '' ,//抵值券
newId : '' //会员id
}
},
onShow() {
// 获取用户信息
this.userInfo();
// 获取身份前置
this.identityInfo();
},
methods: {
// 用户信息
userInfo() {
userIndex().then(res => {
this.userData = res
}).catch(err => {
uni.showToast({
title: err.message,
icon: "none"
})
})
},
// 身份前置
identityInfo(){
// 3为季卡,4为年卡
let identityId = ''
if(this.tabType == 'month') {
identityId = 2
}else if(this.tabType == 'season') {
identityId = 3
} else {
identityId = 4
}
identitySee(identityId).then(res => {
this.identities = res
this.notRules = res.not_rules
this.can = res.can
this.buttonText = res.buttonText
this.newId = res.identity_id
}).catch(err => {
uni.showToast({
title: err.message,
icon: "none"
})
})
},
// 切换身份
typeClick(e) {
this.tabType = e
// 获取身份前置
this.identityInfo();
}
}
}
</script>
<style lang="scss" scoped>
.tab {
position: fixed;
left: 0;
top: 0;
z-index: 99;
width: 100%;
display: flex;
padding: 0 $padding;
box-sizing: border-box;
height: 90rpx;
font-weight: 600;
// .monthColor {
// background-color: #e27216;
// border-bottom: 2rpx solid #e27216;
// }
// .seasonColor {
// background-color: #a92021;
// border-bottom: 2rpx solid #bd3335;
// }
// .yearColor {
// background-color: #2b0a58;
// border-bottom: 2rpx solid #402663;
// }
.tab-item {
height: 90rpx;
flex: 2;
text-align: center;
line-height: 90rpx;
color: #efb480;
position: relative;
&::after {
position: absolute;
content: '';
left: calc(50% - 40rpx);
bottom: 0;
width: 80rpx;
height: 6rpx;
background-color: #efb480;
border-radius: $radius;
display: none;
}
&.active::after {
display: block;
}
}
}
.member-back {
position: fixed;
left: 0;
top: 0;
width: 100vw;
height: 100vh;
text-align: center;
}
.rights {
position: relative;
width: 100%;
}
.member-cont {
padding: 140rpx $padding $padding;
box-sizing: border-box;
text-align: center;
width: 100%;
position: absolute;
top: 0;
left: 0;
height: calc(70vh + 120rpx);
.member-title {
width: 100%;
margin: 0 auto;
}
.member-error {
width: 40%;
margin-top: -30rpx;
}
}
.member-btn {
position: absolute;
z-index: 1;
top: calc(30vh + 80rpx);;
left: 0;
width: 100%;
text-align: center;
.member-btn-img {
width: 100%;
}
.member-btn-text {
position: absolute;
width: 100%;
z-index: 200;
color: #fff;
bottom: 42rpx;
color: #a21a1e;
left: 0;
font-size: $title-size + 6;
&.active {
color: #000;
}
}
.member-btn-tips {
position: absolute;
text-align: center;
width: 100%;
z-index: 2;
color: #fff;
color: #f1c39a;
font-size: $title-size-sm;
bottom: -40rpx;
line-height: 34rpx;
image {
width: 30rpx;
height: 30rpx;
vertical-align: -4rpx;
display: inline-block;
margin-right: 10rpx;
}
}
}
</style>

300
pages/member/look.vue Normal file
View File

@@ -0,0 +1,300 @@
<template>
<view class="content">
<view class="tab">
<view class="tab-item active" v-if="orderId == 5">创始会员</view>
<view class="tab-item active" v-if="orderId == 6">合伙人</view>
</view>
<view class="rights">
<view class="card">
<image class="cardBack" :src="orderId == 5 ? 'http://api.siyuankunlun.com/storage/materials/2022/08/30/memberBack_3.png':'http://api.siyuankunlun.com/storage/materials/2022/08/30/memberBack_4.png'" mode="widthFix"></image>
<view class="cardText">
<view class="card-title">
<image src="@/static/icons/memberOpen_icon.png"></image>{{identities.name}}
</view>
<!-- <view class="tips">
{{rights.length}}大会员权益
</view> -->
<view class="price">
<view class="price-serial" v-if="identities.times">
{{identities.times.serial}}
</view>
<view class="price-left" v-if="identities.is_open">
<view class="price-top">
到期时间
</view>
<view class="price-times" v-if="identities.times">
{{identities.times.ended_at}}
</view>
</view>
</view>
</view>
</view>
<scroll-view scroll-x class="list" scroll-with-animation>
<view class="list-item" v-for="(item, index) in rules" :key="index">
<view class="list-img">
<image :src="item.cover" mode=""></image>
</view>
<view class="list-rights">
{{item.value}}
</view>
<view class="list-name">
{{item.text}}
</view>
<view class="list-tips active" v-if="orderId == 6">
现金
</view>
</view>
</scroll-view>
<view class="suggest">
<view class="suggest-cont">
<view class="suggest-title">
{{orderId == 5 ? '创始会员' : '合伙人'}}权益说明
</view>
<view class="suggest-item">
<view class="suggest-label" v-for="(item, index) in rights" :key="index">
<text>{{index + 1}}</text>
<view class="suggest-text">
{{item.remark}}
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import { identitySee } from '@/apis/interfaces/member'
export default {
data() {
return {
orderId: '', //身份id
rights : [], //权益
rules : [],
newId: '',
identities: '',
identityId: '',
can: ''
}
},
onShow() {
// 获取身份前置
this.identityInfo();
this.orderId = this.$Route.query.orderId
},
methods: {
// 身份前置
identityInfo(){
identitySee(this.$Route.query.orderId).then(res => {
this.identities = res
this.rules = res.rules
this.couponPrice = res.coupon_price
this.rights = res.rights
this.newId = res.identity_id
this.can = res.can
this.buttonText = res.buttonText
}).catch(err => {
uni.showToast({
title: err.message,
icon: "none"
})
})
}
}
}
</script>
<style lang="scss" scoped>
.content {
background-image: linear-gradient(to bottom, #383041, #1a1528);
min-height: 100vh;
}
.tab {
position: fixed;
width: 100%;
left: 0;
top: 0;
z-index: 100;
height: 100rpx;
line-height: 100rpx;
background-color: #383041;
display: flex;
.tab-item {
text-align: center;
flex: 2;
color: #c3c1c5;
font-size: $title-size + 2;
position: relative;
font-weight: 600;
&::after {
position: absolute;
content: '';
left: calc(50% - 40rpx);
bottom: 0;
background-color: transparent;
width: 80rpx;
height: 6rpx;
border-radius: 50rpx;
}
&.active {
color: #ffffff;
}
&.active::after {
background-color: #ffffff;
}
}
}
.rights {
position: absolute;
width: 100%;
top: 120rpx;
background-image: linear-gradient(to bottom, #383041, #1a1528);
.card {
position: relative;
height: 380rpx;
.cardBack {
position: absolute;
width: 100%;
left: 0;
top: 0;
}
.cardText {
position: absolute;
width: 100%;
left: 0;
top: 0;
z-index: 3;
padding: $padding + 20 $padding + 30;
box-sizing: border-box;
.card-title {
font-weight: 600;
font-size: $title-size + 12;
color: #4c2616;
display: flex;
image {
width: 46rpx;
height: 46rpx;
margin: 6rpx 10rpx 0 0;
}
}
.tips {
color: #653925;
margin: 10rpx 0 30rpx;
font-size: $title-size-lg;
}
.price {
font-size: $title-size-lg;
color: #653925;
display: flex;
margin-top: 140rpx;
.price-left {
text-align: right;
display: flex;
}
.price-serial {
font-weight: 600;
font-size: $title-size + 4;
flex: 1;
}
}
}
}
.list {
display: flex;
padding: $padding 20rpx;
box-sizing: border-box;
white-space: nowrap;
flex-direction: row;
align-items: center;
justify-content: space-around;
.list-item {
width: 25%;
display: inline-block;
position: relative;
text-align: center;
.list-tips {
position: absolute;
top: 0;
left: 60%;
font-size: $title-size-sm - 2;
background: #f1bd6e;
color: #681e0f;
border-radius: 30rpx;
padding: 0 10rpx;
line-height: 30rpx;
height: 30rpx;
&.active {
background: #f2c2a3;
}
}
.list-img {
width: 100rpx;
height: 100rpx;
margin: 0 auto;
background-color: rgba(255,255,255,.1);
border-radius: 50%;
padding: $padding - 10;
box-sizing: border-box;
image {
width: 100%;
height: 100%;
}
}
.list-rights {
color: #ffffff;
margin: 20rpx 0 10rpx;
font-size: $title-size-m;
}
.list-name {
color: #8d8a93;
font-size: $title-size-sm;
}
}
}
.suggest {
padding: 20rpx $padding + 10;
box-sizing: border-box;
.suggest-cont {
border: 2rpx solid #d2bfa9;
border-radius: $radius + 10;
padding: $padding $padding + 10;
box-sizing: border-box;
.suggest-title {
color: #e8bb9f;
font-size: $title-size + 4;
margin-bottom: 30rpx;
}
.suggest-item {
color: #b3a3a3;
font-size: $title-size-lg;
.suggest-label{
display: flex;
margin-bottom: 30rpx;
&:last-child {
margin-bottom: 0;
}
text {
width: 38rpx;
height: 38rpx;
border-radius: 50%;
border: 2rpx solid #b3a3a3;
text-align: center;
font-size: $title-size-sm;
display: inline-block;
margin-top: 5rpx;
}
.suggest-text {
width: calc(100% - 50rpx);
padding-left: 20rpx;
line-height: 40rpx;
box-sizing: border-box;
text-align: justify;
}
}
}
}
}
}
</style>

350
pages/member/open.vue Normal file
View File

@@ -0,0 +1,350 @@
<template>
<view class="content">
<form @submit="issueForm" class="take">
<view class="take-label">
<view class="item">
<view class="name">
<image src="@/static/icons/takeIcon_08.png" mode="widthFix"></image>收款银行
</view>
<view class="time">{{service.bank}}</view>
</view>
<view class="item">
<view class="name">
<image src="@/static/icons/takeIcon_09.png" mode="widthFix"></image>收款银行帐号
</view>
<view class="time">{{service.bank_no}}</view>
</view>
<!-- <view class="item">
<view class="name">
<image src="@/static/icons/takeIcon_04.png" mode="widthFix"></image>手机号码
</view>
<view class="time">{{username}}</view>
</view> -->
<view class="item">
<view class="name">
<image src="@/static/icons/takeIcon_10.png" mode="widthFix"></image>打款金额
</view>
<input class="entry" type="text" :value="price" name="price" placeholder="请输入打款金额" />
</view>
<view class="item">
<view class="name">
<image src="@/static/icons/takeIcon_05.png" mode="widthFix"></image>转款账户
</view>
<input class="entry" maxlength="4" type="text" name="name" placeholder="请输入转款人账户名" />
</view>
<!-- <view class="item">
<view class="name">
<image src="@/static/icons/takeIcon_06.png" mode="widthFix"></image>银行卡
</view>
<input class="entry" type="idcard" name="card_no" placeholder="请输入银行卡" />
</view> -->
<view class="item">
<view class="name">
<image src="@/static/icons/takeIcon_07.png" mode="widthFix"></image>打款凭证
</view>
<view class="issueNew" @click="openImg()">
<image class="issueNew-icon" :src="voucher.showpath || '/static/imgs/cover_img.png'" mode="aspectFill"></image>
<view class="issueNew-text">请上传转款电子回单</view>
</view>
</view>
</view>
<view class="userdata-btn">
<button class="issue-btn" form-type="submit" size="mini" :disabled="disabled">提交审核</button>
</view>
</form>
<!-- 提示 -->
<view class="tipsBack" v-if="examineShow"></view>
<view class="tipsCont" v-if="examineShow">
<view class="tipsWhite">
<image class="tipsCont-img" src="http://api.temple.siyuankunlun.cn/storage/materials/2023/01/04/11ed4204fbf696c067af79c8b12ad0ac.png" mode="widthFix"></image>
<view class="tipsWhite-top">
<view class="tipsWhite-name">
提交成功
</view>
<view class="tipsWhite-text">
已提交给后台审核, 请您耐心等待
</view>
</view>
<view class="tipsWhite-btn">
<view class="tipsWhite-btn-go" @click="judgeGeneral">
知道了
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import { openIndex, identitiesee } from '@/apis/interfaces/member'
import { userIndex } from '@/apis/interfaces/user'
import { uploads } from '@/apis/interfaces/uploading'
export default {
data() {
return {
service : '',
username: '', //用户手机号
price : '', //打款金额
seeData : {
name : '',
card_no : ''
},
voucher :{ //打款凭证
showpath: '',
path : ''
},
disabled : false , // 提交按钮状态
examineShow : false, // 提示弹出
}
},
onShow() {
userIndex().then(res => {
this.username = res.username
}).catch(err => {
uni.showToast({
title: err.message,
icon: "none"
})
})
identitiesee(this.$Route.query.identity_id).then(res => {
this.service = res.identity.service
this.price = res.identity.price
}).catch(err => {
uni.showToast({
title: err.message,
icon: "none"
})
})
},
methods: {
// 上传图片
openImg(){
uni.chooseImage({
count : 1,
success : path => {
uploads([{
uri : path.tempFilePaths[0]
}]).then(res => {
this.voucher = {
showpath: res.url[0],
path: res.path[0]
}
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
}
})
},
// 提交表单
issueForm(e) {
//card_no : value.card_no,
let value = e.detail.value;
let data = {
name : value.name,
price : value.price,
cover : this.voucher.path
}
openIndex(this.$Route.query.identity_id, data).then(res => {
this.disabled = true
this.examineShow = true
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
},
// 知道了
judgeGeneral() {
this.examineShow = false
this.$Router.push({ name: 'User' });
}
}
}
</script>
<style lang="scss" scoped>
.content {
background-color: #f4f4f4;
}
.take-label {
padding: $padding $padding 0;
box-sizing: border-box;
border-bottom: 160rpx solid transparent;
.item {
padding: $padding - 5 $padding - 10 $padding;
box-sizing: border-box;
background-color: #FFFFFF;
border-bottom: 2rpx solid #f3f3f3;
font-size: $title-size-lg;
margin-bottom: $margin;
border-radius: $radius;
.name {
width: 100%;
display: flex;
line-height: 44rpx;
margin-bottom: 20rpx;
image {
width: 44rpx;
height: 44rpx;
margin-right: 15rpx;
}
}
.time {
width: 100%;
color: $text-gray;
}
.entry {
width: 100%;
background-color: #f4f4f4;
font-size: $title-size-lg;
padding: 0 $padding;
height: 84rpx;
line-height: 84rpx;
box-sizing: border-box;
border-radius: $radius-sm;
color: $text-gray;
}
.issueNew {
text-align: center;
margin-top: 20rpx;
.issueNew-icon {
width: 200rpx;
height: 200rpx;
}
.issueNew-text {
font-size: $title-size-m;
color: $text-gray;
}
}
}
}
/* 按钮 */
.userdata-btn {
width: 100%;
box-sizing: border-box;
padding: 30rpx;
position: fixed;
bottom: 0;
left: 0;
z-index: 99;
right: 0;
background: white;
.issue-btn {
background: #1d37e2;
text-align: center;
color: white;
height: 90rpx;
line-height: 90rpx;
font-size: 34rpx;
font-weight: normal;
width: 100%;
margin: 0;
padding: 0;
border-radius: 10rpx;
&[disabled] {
background: #1d37e2 !important;
color: #fff !important;
}
}
}
// .site-btn {
// padding: $padding - 10 $padding;
// margin-top: $margin * 3;
// button[size="mini"] {
// width: 100%;
// background: #1d37e2;
// height: 88rpx;
// line-height: 88rpx;
// font-size: $title-size;
// color: white;
// padding: 0;
// &[disabled] {
// background: #a4affd !important;
// color: #fff !important;
// }
// }
// }
// 提交成功弹出
.tipsBack {
position: fixed;
width: 100vw;
height: 100vh;
left: 0;
top: 0;
z-index: 99;
background-color: rgba(0, 0, 0, .8);
}
.tipsCont {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-box-pack: center;
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
z-index: 100;
padding: 0 10%;
box-sizing: border-box;
}
.tipsWhite {
background-color: #ffffff;
border-radius: 20rpx;
overflow: hidden;
text-align: center;
padding: 30rpx;
box-sizing: border-box;
}
.tipsWhite-top {
box-sizing: border-box;
}
.tipsCont-img {
width: 50%;
margin: 20rpx auto 0;
}
.tipsWhite-name {
text-align: center;
color: #111111;
font-size: 40rpx;
font-weight: 600;
margin-bottom: 15rpx;
}
.tipsWhite-text {
font-size: 30rpx;
color: #666666;
line-height: 48rpx;
}
.tipsWhite-btn {
display: flex;
padding: $padding 10rpx;
box-sizing: border-box;
.tipsWhite-btn-go {
flex: 2;
color: #fff;
margin: 40rpx 15rpx 0;
height: 90rpx;
line-height: 90rpx;
text-align: center;
border: 2rpx solid #F6F6F6;
background-color: #2297ff;
border-radius: $radius-m;
}
}
</style>

74
pages/member/partner.vue Normal file
View File

@@ -0,0 +1,74 @@
<template>
<view class="content">
<image class="temporary" :src="activity.cover" mode="widthFix"></image>
<view class="member-btn">
<view class="btnGo" v-if="status.value" @click="$Router.push({name: 'dredgeOpen'})">
{{status.text}}
</view>
<view class="btnGo active" v-else>
{{status.text}}
</view>
</view>
</view>
</template>
<script>
import { partnerSee } from '@/apis/interfaces/member'
export default {
data() {
return {
activity: '',
status: ''
}
},
onShow() {
partnerSee().then(res => {
this.activity = res.activity
this.status = res.status
}).catch(err => {
uni.showToast({
title: err.message,
icon: "none"
})
})
},
methods: {
}
}
</script>
<style lang="scss" scoped>
.temporary {
position: fixed;
left: 0;
bottom: 0;
width: 100%;
height: 100vh;
}
.member-btn {
position: fixed;
left: 0;
bottom: 0;
width: 100%;
padding: $padding;
box-sizing: border-box;
z-index: 9;
}
.btnGo {
padding: 0 $padding;
line-height: 90rpx;
font-size: $title-size + 4;
box-sizing: border-box;
background-image: linear-gradient(to right, #fce9cf, #dfac80);
box-shadow: 0 4rpx 4rpx 3rpx rgba(175,136,88,1);
border-radius: $radius-m * 5;
color: #633a25;
font-weight: 600;
text-align: center;
&.active {
background-image: linear-gradient(to right, #d4d4d4, #e0e0e0);
box-shadow: 0 2px 2px 1px #b7b7b7;
color: #656565
}
}
</style>

416
pages/member/rights.vue Normal file
View File

@@ -0,0 +1,416 @@
<template>
<view class="content">
<view class="tab">
<view class="tab-item" :class="{active : tabType == 'season'}" @click="typeClick('season')">
季卡会员
</view>
<view class="tab-item" :class="{active : tabType == 'year'}" @click="typeClick('year')">
年卡会员
</view>
</view>
<view class="rights">
<view class="card">
<image class="cardBack" :src="tabType == 'season' ? '/static/imgs/memberBack_01.png':'/static/imgs/memberBack_02.png'" mode="widthFix"></image>
<view class="cardText">
<view class="card-title">
<image src="@/static/icons/memberOpen_icon.png"></image>{{identities.name}}
</view>
<!-- <view class="tips">
{{rights.length}}大会员权益赠送{{tabType == 'season' ? '5000' : '2000'}}水滴
</view> -->
<view class="price-left" v-if="identities.is_open">
<view class="price-serial">
{{identities.times.serial}}
</view>
<view class="price-time">
到期时间 {{identities.times.ended_at}}
</view>
</view>
<view class="price-left" v-else>
<view class="price-top">
开通{{tabType == 'season' ? '季卡' : '年卡'}}会员金额
</view>
<view class="price-number">
{{identities.price}}<image src="@/static/icons/memberOpen_img.png"></image>
</view>
</view>
<!-- <view class="price-right">
限购{{tabType == 'season'?'20000' : '10000'}}
</view> -->
</view>
</view>
<scroll-view scroll-x class="list" scroll-with-animation>
<view class="list-item" v-for="(item, index) in rules" :key="index">
<view class="list-img">
<image :src="item.cover" mode=""></image>
</view>
<view class="list-rights">
<text v-if="tabType == 'season'">{{item.name == 'recommend_coupon' ? '' : '+'}}</text>
<text v-else>{{item.name == 'open_nk' ? '' : '+'}}</text>
{{item.value}}
</view>
<view class="list-name">
{{item.text}}
</view>
<view class="list-tips" :class="{active : tabType == 'season'}" v-if="tabType == 'season'">
<text>{{item.name == 'recommend_coupon' ? '券' : '水滴'}}</text>
</view>
<view class="list-tips" :class="{active : tabType == 'season'}" v-else>
<text v-if="item.name == 'open_nk'"></text>
<text v-else-if="item.name == 'open_get_goods'"></text>
<text v-else>水滴</text>
</view>
</view>
</scroll-view>
<view class="suggest">
<view class="suggest-cont">
<view class="suggest-title">
{{tabType == 'season'?'季卡' : '年卡'}}权益说明
</view>
<view class="suggest-item">
<view class="suggest-label" v-for="(item, index) in rights" :key="index">
<text>{{index + 1}}</text>
<view class="suggest-text">
{{item.remark}}
</view>
</view>
</view>
</view>
</view>
</view>
<view class="emption">
<view class="emption-cont">
<view class="emption-price">
<view class="emption-top">{{identities.price}}</view>
<view class="emption-tips" v-if="couponPrice > 0">(抵值券{{couponPrice}})</view>
<view class="emption-tips" v-else>({{tabType == 'season'?'季卡会员' : '年卡会员'}})</view>
</view>
<view class="emption-btn" v-if="can.open" @click="$Router.push({name: 'memberOpen', params:{identity_id: newId}})">
立即开通
</view>
<block v-else>
<view class="emption-btn" v-if="can.renew" @click="$Router.push({name: 'memberOpen', params:{identity_id: newId}})">
立即续费
</view>
<view class="emption-btn active" v-else>
{{buttonText}}
</view>
</block>
</view>
</view>
</view>
</template>
<script>
import { identitySee } from '@/apis/interfaces/member'
export default {
data() {
return {
buttonText: '',
couponPrice: '', //抵值券
tabType: 'season', //会员标签
rights : [], //权益
rules : [],
newId: '',
identities: '',
identityId: '',
can: ''
}
},
onShow() {
// 获取身份前置
this.identityInfo();
},
methods: {
// 身份前置
identityInfo(){
// 3为季卡,4为年卡
let identityId = ''
if(this.tabType == 'season') {
identityId = 3
} else {
identityId = 4
}
identitySee(identityId).then(res => {
this.identities = res
this.rules = res.rules
this.couponPrice = res.coupon_price
this.rights = res.rights
this.newId = res.identity_id
this.can = res.can
this.buttonText = res.buttonText
}).catch(err => {
uni.showToast({
title: err.message,
icon: "none"
})
})
},
// 切换身份
typeClick(e) {
this.tabType = e
// 获取身份前置
this.identityInfo();
}
}
}
</script>
<style lang="scss" scoped>
.content {
background-image: linear-gradient(to bottom, #383041, #1a1528);
min-height: 100vh;
}
.tab {
position: fixed;
width: 100%;
left: 0;
top: 0;
z-index: 100;
height: 100rpx;
line-height: 100rpx;
background-color: #383041;
display: flex;
.tab-item {
text-align: center;
flex: 2;
color: #c3c1c5;
font-size: $title-size + 2;
position: relative;
font-weight: 600;
&::after {
position: absolute;
content: '';
left: calc(50% - 40rpx);
bottom: 0;
background-color: transparent;
width: 80rpx;
height: 6rpx;
border-radius: 50rpx;
}
&.active {
color: #ffffff;
}
&.active::after {
background-color: #ffffff;
}
}
}
.rights {
position: absolute;
width: 100%;
top: 120rpx;
background-image: linear-gradient(to bottom, #383041, #1a1528);
border-bottom: 160rpx solid transparent;
.card {
position: relative;
height: 380rpx;
.cardBack {
position: absolute;
width: 100%;
left: 0;
top: 0;
}
.cardText {
position: absolute;
width: 100%;
left: 0;
top: 0;
z-index: 3;
padding: $padding + 20 $padding + 30;
box-sizing: border-box;
.card-title {
font-weight: 600;
font-size: $title-size + 12;
color: #4c2616;
display: flex;
image {
width: 46rpx;
height: 46rpx;
margin: 6rpx 10rpx 0 0;
}
}
.tips {
color: #653925;
margin: 10rpx 0 30rpx;
font-size: $title-size-lg;
}
.price-left {
color: #653925;
display: flex;
margin-top: 140rpx;
.price-top {
flex: 1;
line-height: 64rpx;
}
.price-number {
font-weight: 600;
font-size: $title-size + 14;
display: flex;
image {
width: 32rpx;
height: 32rpx;
margin: 16rpx 0 0 10rpx;
}
}
.price-serial {
font-weight: 600;
font-size: $title-size + 4;
flex: 1;
line-height: 64rpx;
}
.price-time {
line-height: 60rpx;
font-size: $title-size-sm;
}
}
}
}
.list {
display: flex;
padding: $padding 20rpx;
box-sizing: border-box;
white-space: nowrap;
flex-direction: row;
align-items: center;
justify-content: space-around;
.list-item {
width: 25%;
display: inline-block;
position: relative;
text-align: center;
.list-tips {
position: absolute;
top: 0;
left: 60%;
font-size: $title-size-sm - 2;
background: #f1bd6e;
color: #681e0f;
border-radius: 30rpx;
padding: 0 10rpx;
line-height: 30rpx;
height: 30rpx;
&.active {
background: #f2c2a3;
}
}
.list-img {
width: 100rpx;
height: 100rpx;
margin: 0 auto;
background-color: rgba(255,255,255,.1);
border-radius: 50%;
padding: $padding - 10;
box-sizing: border-box;
image {
width: 100%;
height: 100%;
}
}
.list-rights {
color: #ffffff;
margin: 20rpx 0 10rpx;
}
.list-name {
color: #8d8a93;
font-size: $title-size-sm;
}
}
}
.suggest {
padding: 20rpx $padding + 10;
box-sizing: border-box;
.suggest-cont {
border: 2rpx solid #d2bfa9;
border-radius: $radius + 10;
padding: $padding $padding + 10;
box-sizing: border-box;
.suggest-title {
color: #e8bb9f;
font-size: $title-size + 4;
margin-bottom: 30rpx;
}
.suggest-item {
color: #b3a3a3;
font-size: $title-size-lg;
.suggest-label{
display: flex;
margin-bottom: 30rpx;
&:last-child {
margin-bottom: 0;
}
text {
width: 38rpx;
height: 38rpx;
border-radius: 50%;
border: 2rpx solid #b3a3a3;
text-align: center;
font-size: $title-size-sm;
display: inline-block;
margin-top: 5rpx;
}
.suggest-text {
width: calc(100% - 50rpx);
padding-left: 20rpx;
line-height: 40rpx;
box-sizing: border-box;
text-align: justify;
}
}
}
}
}
}
.emption {
position: fixed;
background-color: #251f31;
bottom: 0;
left: 0;
padding: $padding;
box-sizing: border-box;
width: 100%;
height: 160rpx;
z-index: 99;
.emption-cont {
border: 2rpx solid #e9c1a4;
border-radius: 50rpx;
line-height: 100rpx;
height: 100rpx;
color: #fbe8d2;
display: flex;
padding: 0 $padding - 15;
box-sizing: border-box;
.emption-price {
flex: 1;
display: flex;
.emption-top {
font-weight: 600;
font-size: $title-size + 10;
padding-right: 10rpx;
}
.emption-tips {
font-size: $title-size-m;
}
}
.emption-btn {
background-image: linear-gradient(to right, #f5c17d , #fbe9d6);
color: #681e0f;
height: 74rpx;
line-height: 74rpx;
padding: 0 30rpx;
border-radius: 50rpx;
font-weight: 600;
font-size: $title-size-lg;
margin-top: 13rpx;
&.active {
background-image: linear-gradient(to right, #bbbbbb, #9e9e9e);
color: #000;
}
}
}
}
</style>

158
pages/merits/index.vue Normal file
View File

@@ -0,0 +1,158 @@
<template>
<view class="content" :style="'background-image: url(' + require('@/static/img/merits_back.png') + ')'">
<view class="list">
<view class="list-user">
<view class="list-item">
<view class="number">
<text>排名</text>
</view>
<view class="user user-header">
<text>用户名称</text>
</view>
<view class="phone">
<text>联系方式</text>
</view>
</view>
<view class="list-item" v-for="(item, index) in rack" :key="index">
<view class="number">{{index + 1}}</view>
<view class="user nowrap">
<image class="user-avatar" :src="item.user.avatar || require('@/static/imgs/default_myHead.png')"></image>
{{item.user.nickname}}
</view>
<view class="phone">{{item.user.username}}</view>
</view>
</view>
<view class="list-value">
<view class="list-value-item nowrap">
<text>捐赠份数</text>
</view>
<view class="list-value-item nowrap" v-for="(item, index) in rack" :key="index">
{{item.total}}
</view>
</view>
</view>
</view>
</template>
<script>
import { rankMerits } from '@/apis/interfaces/user.js'
export default {
data() {
return {
rack: []
};
},
onShow() {
rankMerits().then(res => {
this.rack = res
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
},
methods: {
}
}
</script>
<style lang="scss">
.content{
padding: 10rpx 30rpx 0;
min-height: 90vh;
background-size: 100%;
background-repeat: no-repeat;
background-position: top center;
box-sizing: border-box;
.list{
position: relative;
margin-top: 85%;
background-color: white;
border-radius: 20rpx 20rpx 0 0;
box-shadow: 0 0 10rpx 10rpx rgba(0, 0, 0, .02);
padding: 30rpx;
.list-user{
padding-right: 200rpx;
.list-item{
color: #231815;
border-bottom: solid 1rpx #7b7b7b;
display: flex;
font-size: 28rpx;
padding: 20rpx 0;
align-items: center;
.number{
width: 80rpx;
text-align: center;
color: #231815;
font-weight: bold;
}
.user{
width: calc(100% - 250rpx);
height: 48rpx;
line-height: 48rpx;
padding-left: 58rpx;
position: relative;
box-sizing: border-box;
&.user-header{
padding: 0;
text-align: center;
}
.user-avatar{
width: 48rpx;
height: 48rpx;
border-radius: 50%;
position: absolute;
left: 0;
top: 0;
background-color: #ddd;
}
}
.phone{
width: 170rpx;
text-align: right;
padding-right: 10rpx;
box-sizing: border-box;
}
text{
font-weight: normal;
background: linear-gradient(to top, #aa8a66, #e5cca8, #ab8c68);
padding: 0 10rpx;
border-radius: 10rpx;
line-height: 50rpx;
display: inline-block;
}
}
}
.list-value{
position: absolute;
top: -20rpx;
bottom: 0;
right: 30rpx;
width: 180rpx;
background: linear-gradient(to left, #aa8a66, #e5cca8, #ab8c68 );
text-align: center;
padding-top: 50rpx;
border-radius: 20rpx 20rpx 0 0;
.list-value-item{
margin: 0 20rpx;
font-size: 30rpx;
padding: 20rpx 0;
line-height: 48rpx;
border-bottom: solid 1rpx white;
color: #1f130e;
text{
font-weight: normal;
background: linear-gradient(to top, #bfbfbf, #fefefe, #bfbfbf);
padding: 0 10rpx;
border-radius: 10rpx;
line-height: 48rpx;
display: inline-block;
font-size: 28rpx;
}
}
}
}
}
</style>

View File

@@ -25,19 +25,21 @@
<view class="While orderGoods">
<view class="orderGoods-wares" v-for="(item, index) in goodsData.items" :key="index">
<image class="orderGoods-img" :src="item.sku.cover" mode="aspectFill"></image>
<!-- <image class="orderGoods-img" :src="item.sku.cover" mode="aspectFill"></image> -->
<!-- 先默认固定图 -->
<image class="orderGoods-img" src="@/static/imgs/photo.png" mode="widthFix"></image>
<view class="orderGoods-cont">
<view class="nowrap orderGoods-name">{{ item.sku.goods_name }}</view>
<view class="orderGoods-price">
<text>{{ item.sku.price }}</text>
x{{ item.qty }}
<text>x{{ item.qty }}</text>
<!-- x{{ item.qty }} -->
</view>
</view>
</view>
<view class="orderGoods-brief">
<!-- <view class="orderGoods-brief">
<view>商品总价</view>
<text>{{ goodsData.amount }}</text>
</view>
</view> -->
</view>
<view class="While reserveCont">
@@ -54,25 +56,48 @@
<view class="reserve-name">交易状态</view>
<view class="reserve-text green">{{ goodsData.state }}</view>
</view>
<view class="reserve-label">
<!-- <view class="reserve-label">
<view class="reserve-name">实际金额</view>
<view class="reserve-text reserve-price">{{ goodsData.total }}.00</view>
</view> -->
</view>
<view class="While reserveCont" v-if="express.express_name">
<view class="reserveCont-title">物流信息</view>
<view class="reserve-label">
<view class="reserve-name">物流公司</view>
<view class="reserve-text">{{ express.express_name }}</view>
</view>
<view class="reserve-label">
<view class="reserve-name">收货姓名</view>
<view class="reserve-text green">{{ express.name }}</view>
</view>
<view class="reserve-label">
<view class="reserve-name">收货电话</view>
<view class="reserve-text green">{{ express.mobile }}</view>
</view>
<view class="reserve-label">
<view class="reserve-name">物流单号</view>
<view class="reserve-text">{{ express.express_no }}<view class="reserve-copy" @tap="copyUrl(express.express_noo)">复制</view></view>
</view>
</view>
</view>
<view class="order-data-footer">
<view class="order-btn" open-type="navigateBack" @click="$Router.push({name: 'OrderIndex', params: { listType: $Route.query.listType}})">返回订单</view>
<!-- @click="$Router.replaceAll({name: 'OrderIndex', params: { listType: $Route.query.listType}})" -->
<view class="order-btn" open-type="navigateBack" @click="$router.back()">返回订单</view>
<view class="order-btn" @click="signClick()" v-if="sign">签收订单</view>
</view>
</view>
</template>
<script>
import { goodsDet } from '@/apis/interfaces/user'
import { goodsDet, goodsSign } from '@/apis/interfaces/user'
import h5Copy from '@/js_sdk/junyi-h5-copy/junyi-h5-copy/junyi-h5-copy.js'
export default {
data() {
return {
goodsData: '', //详情
sign: '', //签收
express: '' //物流
}
},
onLoad() {
@@ -84,6 +109,8 @@
goodsInfo() {
goodsDet(this.$Route.query.orderNo).then(res => {
this.goodsData = res
this.sign = res.can.sign
this.express = res.express
}).catch(err => {
uni.showToast({
title: err.message,
@@ -105,8 +132,32 @@
icon:'none'
})
}
},
// 订单签收
signClick() {
uni.showModal({
title : '提示',
content : '是否签收',
success : res=> {
if (res.confirm) {
goodsSign(this.$Route.query.orderNo).then(res => {
uni.showToast({
title:'签收成功',
icon:'none'
})
this.$Router.back()
}).catch(err => {
uni.showToast({
title: err.message,
icon: "none"
})
})
}
}
})
},
}
}
</script>
@@ -136,8 +187,8 @@
// 订单
.orderData-cont-label {
padding: 40rpx 30rpx;
display: flex;
box-sizing: border-box;
position: relative;
border-bottom: #f2f2f2 2rpx solid;
.orderData-cont-img {
width: 48rpx;
@@ -145,11 +196,8 @@
vertical-align: middle;
}
.orderData-cont-text {
position: absolute;
left: 0;
top: 0;
width: 100%;
padding: 25rpx 30rpx 0 120rpx;
width: calc(100% - 68rpx);
margin-left: 20rpx;
box-sizing: border-box;
.orderData-cont-name {
margin-bottom: 10rpx;
@@ -168,7 +216,7 @@
margin-right: 20rpx;
}
view {
color: #edb25f;
color: #eb504c;
}
}
}
@@ -180,7 +228,6 @@
box-sizing: border-box;
.orderGoods-wares {
position: relative;
margin-bottom: 10rpx;
.orderGoods-img {
width: 100rpx;
height: 100rpx;
@@ -231,6 +278,7 @@
display: flex;
padding: 0 30rpx 30rpx;
box-sizing: border-box;
font-size: $title-size-m;
.reserve-name {
flex: 1;
width: 200rpx;
@@ -243,7 +291,18 @@
line-height: 50rpx;
&.reserve-price {
font-weight: 600;
color: #6d79ec;
color: #1d37e2;
}
.reserve-copy {
color: #6774ff;
border: #6774ff 2rpx solid;
display: inline-block;
height: 34rpx;
line-height: 34rpx;
font-size: $title-size-sm;
padding: 0 10rpx;
border-radius: 4rpx;
margin-left: 10rpx;
}
}
}

View File

@@ -2,6 +2,8 @@
<view class="content">
<view class="header">
<view class="tabs">
<view class="item" :class="{'show': listType == ''}" @click="onTabs('')">全部</view>
<view class="item" :class="{'show': listType == 'unpay'}" @click="onTabs('unpay')">待支付</view>
<view class="item" :class="{'show': listType == 'paid'}" @click="onTabs('paid')">待发货</view>
<view class="item" :class="{'show': listType == 'delivered'}" @click="onTabs('delivered')">已发货</view>
<view class="item" :class="{'show': listType == 'signed'}" @click="onTabs('signed')">已签收</view>
@@ -14,7 +16,9 @@
<view class="order-top-tips">{{ item.state }}</view>
</view>
<view class="order-name" v-for="(goodItem, index) in item.items" :key="index">
<image class="order-img" :src="goodItem.sku.cover" mode="aspectFill"></image>
<!-- <image class="order-img" :src="goodItem.sku.cover" mode="aspectFill"></image> -->
<!-- 先默认固定图 -->
<image class="order-img" src="@/static/imgs/photo.png" mode="widthFix"></image>
<view class="order-goods">
<view class="order-label">
<view class="nowrap order-label-name">
@@ -31,13 +35,23 @@
</view>
<view class="order-text">
<view class="order-time">下单时间{{ item.created_at }}</view>
<view class="order-price">合计金额<text class="red">{{ item.amount }}</text></view>
<!-- <view class="order-price">合计金额<text class="red">{{ item.amount }}</text></view> -->
</view>
<view class="order-btn">
<view class="order-btn-atn active" @click="orderSign(item.order_no)" v-if="item.can.sign == true">立即签收</view>
<view class="order-btn-atn" @click="$Router.push({name: 'OrderDetails', params: { orderNo: item.order_no, listType: listType}})">订单详情</view>
<!-- <view class="order-btn-atn" @click="$Router.push({name: 'OrderDetails', params: { orderNo: item.order_no, listType: listType}})">订单详情</view> -->
<view class="order-btn-atn" v-if="item.can.pay" @click="cancel(item.order_no)">取消支付</view>
<view class="order-btn-atn active" v-if="item.can.pay" @click="$Router.push({name: 'indexPay', params: { orderNo: item.order_no, total: item.total }})">去支付</view>
<view class="order-btn-atn active" v-if="item.can.sign" @click="signcel(item.order_no)">签收</view>
</view>
</view>
<view class="pagesLoding" v-if="lodingStats">
<block v-if="page.has_more">
<image class="pagesLodingIcon" src="/static/icons/refresh_loding.gif" mode="widthFix"></image>加载中...
</block>
<block v-else>
没有更多了~
</block>
</view>
</view>
<view class="pack-center pages-hint" v-else>
<image src="/static/imgs/coupon_null.png"></image>
@@ -47,12 +61,16 @@
</template>
<script>
import { orders, goodsSign } from '@/apis/interfaces/user'
const jweixin = require('jweixin-module');
import { donationPay } from '@/apis/interfaces/mall'
import { orders, goodsSign, goodsCancel } from '@/apis/interfaces/user'
export default {
data() {
return {
listType: 'paid',
orderArr: [], //订单列表
listType : '', //unpay待付款paid待发货delivered已发货signed已签收
orderArr : [], //订单列表
page : {}, //分页信息
lodingStats : false //加载状态
}
},
onLoad() {
@@ -63,11 +81,19 @@
},
methods: {
// 商品详情数据
ordersInfo() {
ordersInfo(page) {
orders({
state: this.listType
state: this.listType,
page : page || 1
}).then(res => {
this.orderArr = res.data
let listArr = this.orderArr,
newData = []
if(page == 1 || page == undefined) listArr = []
newData = listArr.concat(res.data)
this.orderArr = newData
this.page = res.page
this.lodingStats= false
uni.stopPullDownRefresh()
}).catch(err => {
uni.showToast({
title: err.message,
@@ -82,27 +108,121 @@
this.listType = val
// 商品详情数据
this.page = {};
this.ordersInfo();
},
// 立即签收
orderSign(orderNo) {
goodsSign(orderNo).then(res => {
uni.showToast({
title: '签收成功',
icon: "none"
// 支付
stockForm(order_no) {
// 微信支付
donationPay(order_no, {
type : 'mp',
openid: ''
}).then(res => {
let wxConfig = JSON.parse(res.wechat)
jweixin.config({
appId: wxConfig.appId,
debug: false,
jsApiList: ['chooseWXPay'],
signature: wxConfig.signature,
nonceStr: wxConfig.nonceStr,
timestamp: wxConfig.timestamp,
})
jweixin.ready(() => {
jweixin.chooseWXPay({
timestamp: wxConfig.timeStamp,
nonceStr: wxConfig.nonceStr,
package: wxConfig.package,
signType: wxConfig.signType,
paySign: wxConfig.paySign,
success: payRes => {
uni.showToast({
title: '支付成功',
icon: 'none'
})
this.disabled = true
setTimeout(()=>{
// 商品详情数据
this.ordersInfo();
},2000)
this.$Router.replace({ name: 'OrderIndex', params: { listType: 'paid' }});
},1000)
},
fail: payfail => {
uni.showToast({
title: '取消支付',
icon: 'none'
})
this.disabled = true
setTimeout(()=>{
this.$Router.replace({ name: 'OrderIndex', params: { listType: 'unpay' }});
},1000)
}
});
});
}).catch(err => {
uni.showToast({
title: err.message,
icon: "none"
})
})
},
// 取消订单
cancel(e) {
uni.showModal({
title: '订单提示',
content: '是否取消订单支付',
confirmColor: '#8b64fd',
showCancel:false,
success: res=> {
goodsCancel(e).then(CancelRes => {
// 获取订单列表
this.ordersInfo();
}).catch(err => {
uni.showToast({
title: err.message,
icon: "none"
})
})
}
})
},
// 签收订单
signcel(e) {
uni.showModal({
title: '订单提示',
content: '是否签收订单',
confirmColor: '#8b64fd',
showCancel:false,
success: res=> {
goodsSign(e).then(CancelRes => {
// 获取订单列表
this.ordersInfo();
}).catch(err => {
uni.showToast({
title: err.message,
icon: "none"
})
})
}
})
},
// 页面相关事件处理函数--监听用户下拉动作
onPullDownRefresh() {
// 获取账变记录
this.logsList();
},
// 上拉加载
onReachBottom(){
this.lodingStats = true
let pageNumber = this.page.current
if(this.page.has_more){
pageNumber++
// 获取账变记录
this.logsList(pageNumber);
}
}
}
}
@@ -144,7 +264,7 @@
}
.order-top-tips {
font-size: 26rpx;
color: #edb25f;
color: #eb504c;
}
}
@@ -205,7 +325,7 @@
.order-price {
text {
font-weight: 600;
color: #6d79ec;
color: #1d37e2;
}
}
}
@@ -226,7 +346,7 @@
margin-left: 15rpx;
font-size: 24rpx;
&.active {
color: #6d79ec;
color: #1d37e2;
border-color: #bfc5ff;
}
}
@@ -250,8 +370,8 @@
height: 60rpx;
line-height: 60rpx;
&.show{
color: #6d79ec;
border-bottom: solid 4rpx #6d79ec;
color: #1d37e2;
border-bottom: solid 4rpx #1d37e2;
}
}
}
@@ -270,8 +390,8 @@
margin-right: $margin/2;
color: $text-gray;
&.show{
background-color:#6d79ec;
color: #6d79ec;
background-color:#1d37e2;
color: #1d37e2;
}
}
}

View File

@@ -1,419 +0,0 @@
<template>
<view class="content">
<view class="While foods">
<image class="foods-img" :src="foodData.cover" mode="aspectFill"></image>
<view class="foods-cont">
<view class="foods-name">
{{ foodData.name }}
</view>
<view class="foods-text">
{{ foodData.explain }}
</view>
</view>
</view>
<view class="While levels">
<view class="levels-name">
嘌呤含量
</view>
<view class="levels-tips">
<view class="levels-number">
{{ foodData.number }}
</view>
<view class="levels-text">
<view class="levels-unit">毫克</view>
<view class="levels-usable">每100克可食部分</view>
</view>
</view>
<view class="line">
<view class="line-label" :class="{active : orderId == item.order}" v-for="(item, index) in count.options" :key="index">
{{ item.name }}
</view>
</view>
<view class="tips">
<block v-if="orderId == 1">( 该食物可放心食用 )</block>
<block v-else-if="orderId == 2">( 该食物可少量食用 )</block>
<block v-else>( 该食物谨慎食用 )</block>
</view>
</view>
<view class="While vote">
<view class="vote-title">
<text>一共有{{ count.vote_users }}位痛友参与投票</text>
每个人体质不同食物对身体的影响也会有差异
</view>
<view class="vote-number">
<view class="vote-label" v-for="(item, index) in count.options" :key="index">
<view class="vote-number-ticket">{{ item.count }}</view>
<view class="vote-number-name">
{{ item.name }}
</view>
</view>
</view>
<view class="vote-assess">
你吃了吗怎么样
</view>
<view class="vote-btn">
<view class="vote-btn-label" :class="{active : item.is_my_vote}" v-for="(item, index) in count.options" :key="index" @click="voteClick(item.id)">
<image v-if="item.order == 1" class="vote-label-icon" src="/static/icons/lookIcon_00.png" mode=""></image>
<image v-else-if="item.order == 2" class="vote-label-icon" src="/static/icons/lookIcon_01.png" mode=""></image>
<image v-else class="vote-label-icon" src="/static/icons/lookIcon_02.png" mode=""></image>
<view class="vote-label-name">
{{ item.name }}
</view>
</view>
</view>
</view>
<view class="While other">
<view class="other-title">
其他营养含量
</view>
<view class="other-list" v-if="foodData.pabulum">
<view class="other-label">
<view class="other-name">
脂肪
</view>
<view class="other-number">
{{ foodData.pabulum.fat ? foodData.pabulum.fat : 0 }}g
</view>
</view>
<view class="other-label">
<view class="other-name">
碳水
</view>
<view class="other-number">
{{ foodData.pabulum.carbohydrate ? foodData.pabulum.carbohydrate : 0 }}g
</view>
</view>
<view class="other-label">
<view class="other-name">
蛋白质
</view>
<view class="other-number">
{{ foodData.pabulum.protein ? foodData.pabulum.protein : 0 }}g
</view>
</view>
<view class="other-label">
<view class="other-name">
纤维素
</view>
<view class="other-number">
{{ foodData.pabulum.cellulose ? foodData.pabulum.cellulose : 0 }}g
</view>
</view>
<view class="other-label">
<view class="other-name">
热量
</view>
<view class="other-number">
{{ foodData.pabulum.calories ? foodData.pabulum.calories : 0 }}kcal
</view>
</view>
</view>
</view>
<view class="While other">
<view class="other-title">
食物评价
</view>
<view class="evaluate">
{{ foodData.description }}
</view>
</view>
<view class="While other">
<view class="other-title">
痛风患者怎么吃
</view>
<view class="evaluate">
{{ foodData.remark }}
</view>
</view>
</view>
</template>
<script>
import { foodDet, foodVote } from '@/apis/interfaces/gout'
export default {
data() {
return {
foodData: '', //食物数据
count : '',
orderId : '', //评价id
canVote : '', //是否投票
}
},
onShow() {
// 获取食物详情
this.foodInfo();
},
methods: {
// 食物详情
foodInfo() {
foodDet(this.$Route.query.id).then(res => {
this.foodData = res
this.count = res.count
this.orderId = res.count.grade
this.canVote = res.can.vote
}).catch(err => {
uni.showToast({
title: err.message,
icon: "none"
})
})
},
// 投票
voteClick(id) {
if(this.$store.getters.getToken) {
if(!this.canVote) {
uni.showToast({
title: '您已经投过票了',
icon: "none"
})
return
}
// 进行投票
foodVote(this.$Route.query.id, id).then(res => {
uni.showToast({
title: res,
icon: "none"
})
// 获取食物详情
this.foodInfo();
}).catch(err => {
uni.showToast({
title: err.message,
icon: "none"
})
})
return
}
this.$Router.push({ name: 'Login' });
}
}
}
</script>
<style lang="scss" scoped>
.content{
overflow: hidden;
background: #f3f4f6;
padding: 20rpx;
box-sizing: border-box;
}
.While {
border-radius: 10rpx;
margin-bottom: 30rpx;
background-color: #FFFFFF;
padding:30rpx;
box-sizing: border-box;
box-shadow: 0 0 10rpx rgba($color: #000000, $alpha: .05);
}
// 食物
.foods {
position: relative;
.foods-img {
width: 100rpx;
height: 100rpx;
border-radius: 10rpx;
}
.foods-cont {
position: absolute;
width: 100%;
top: 0;
left: 0;
padding: 30rpx 30rpx 30rpx 150rpx;
box-sizing: border-box;
.foods-name {
font-weight: 600;
margin-bottom: 20rpx;
}
.foods-text {
font-size: 26rpx;
color: #919191;
}
}
}
// 含量
.levels {
.levels-name {
font-size: 28rpx;
color: #919191;
text-align: center;
}
.levels-tips {
background: linear-gradient(to left, #6d79ec, #8591ff);
color: #FFFFFF;
padding: 20rpx 20rpx 20rpx 40rpx;
box-sizing: border-box;
border-radius: 10rpx;
margin: 30rpx 100rpx;
display: flex;
.levels-number {
font-size: 60rpx;
margin-right: 30rpx;
}
.levels-text {
font-size: 26rpx;
padding-top: 8rpx;
.levels-usable {
font-size: 24rpx;
opacity: .9;
}
}
}
.line {
display: flex;
padding: 0 30rpx;
box-sizing: border-box;
.line-label {
flex: 3;
margin: 0 5rpx;
text-align: center;
position: relative;
padding-bottom: 20rpx;
font-size: 24rpx;
color: #919191;
&::after,
&::before{
position: absolute;
content: '';
}
&::after {
left: 0;
bottom: 0;
border-radius: 10rpx;
width: 100%;
height: 6rpx;
}
&::before {
left: calc(50% - 8rpx);
bottom: -6rpx;
z-index: 9;
width: 8rpx;
height: 8rpx;
border-radius: 50%;
background: #fff9ee;
border-style: solid;
border-width: 6rpx;
display: none;
}
&.active::before {
display: block;
}
&:nth-child(1)::after {
background: #5dcd7b;
}
&:nth-child(2)::after {
background: #e9ce49;
}
&:nth-child(3)::after {
background: #f58054;
}
&:nth-child(1)::before {
border-color: #5dcd7b;
}
&:nth-child(2)::before {
border-color: #e9ce49;
}
&:nth-child(3)::before {
border-color: #f58054;
}
}
}
.tips {
text-align: center;
padding-top: 20rpx;
font-size: 26rpx;
color: #919191;
}
}
// 投票
.vote {
.vote-title {
font-size: 26rpx;
color: #919191;
text {
color: #000000;
display: block;
font-size: 32rpx;
margin-bottom: 10rpx;
}
}
.vote-number {
display: flex;
margin: 40rpx 0;
.vote-label {
flex: 3;
text-align: center;
.vote-number-ticket {
color: #6d79ec;
font-weight: 600;
}
.vote-number-name {
font-size: 28rpx;
margin-top: 10rpx;
}
}
}
.vote-assess {
margin-bottom: 30rpx;
font-weight: 600;
}
.vote-btn {
display: flex;
.vote-btn-label {
flex: 3;
margin: 0 10rpx;
background-color: #f3f4f6;
color: #262729;
border-radius: 30rpx;
height: 64rpx;
line-height: 64rpx;
font-size: 28rpx;
display: flex;
.vote-label-icon {
width: 40rpx;
height: 40rpx;
margin: 10rpx 15rpx 0 20rpx;
}
&.active {
background-color: #a2aaff;
color: #FFFFFF;
}
}
}
}
// 其他含量
.other {
.other-title {
margin-bottom: 30rpx;
font-weight: 600;
}
.other-list {
display: flex;
.other-label {
flex: 5;
text-align: center;
width: 20%;
font-size: 26rpx;
.other-number {
font-size: 24rpx;
color: #919191;
padding-top: 10rpx;
}
}
}
}
// 食物评价
.evaluate {
line-height: 42rpx;
color: #585858;
font-size: 26rpx;

View File

@@ -1,271 +0,0 @@
<template>
<view class="content">
<view class="equityTop">
<view class="equityTool">
<view class="search">
<image class="search-img" src="/static/icons/purineSearch.png" mode="aspectFill"></image>
<input class="search-input" type="text" placeholder="食物嘌呤查询" @input="searchSitle" />
</view>
</view>
<scroll-view scroll-x class="equityTab">
<view class="item-box" :class="{active : categoryId == item.category_id}" v-for="(item, index) in sortArr" :key="index" @click="sortClick(item.category_id)">
{{ item.title }}
</view>
</scroll-view>
</view>
<view class="contentList">
<view class="List" v-if="foodsArr.length > 0">
<view class="List-label" @click="$Router.push({name: 'purineDetails', params: { id: item.food_id }})" v-for="(item, index) in foodsArr" :key="index">
<image class="List-img" :src="item.cover" mode="aspectFill"></image>
<view class="List-cont">
<view class="List-top">
<view class="nowrap List-top-name">
{{ item.name }}
</view>
<view class="List-top-tips">
{{ item.count.votes }}人投票
</view>
</view>
<view class="List-text">
{{ item.explain }}
</view>
<view class="List-levels">
嘌呤{{ item.number }}mg/100g
</view>
</view>
</view>
<view class="pagesLoding" v-if="lodingStats">
<block v-if="page.has_more">
<image class="pagesLodingIcon" src="/static/icons/refresh_loding.gif" mode="widthFix"></image>加载中...
</block>
<block v-else>
没有更多了~
</block>
</view>
</view>
<view class="pack-center pages-hint" v-else>
<image src="/static/imgs/coupon_null.png"></image>
<view>暂无数据</view>
</view>
</view>
</view>
</template>
<script>
import { foodList } from '@/apis/interfaces/gout'
export default {
data() {
return {
foodsArr : [], //实物列表
sortArr : [], //分类
categoryId : '',
title : '',
page : {}, //分页信息
lodingStats : false //加载状态
}
},
onLoad() {
// 获取食物数据
this.lastInfo();
},
methods: {
// 食物数据
lastInfo(page) {
foodList({
title: this.title,
category_id: this.categoryId,
page : page || ''
}).then(res => {
let listArr = this.foodsArr,
newData = []
if(page == 1 || page == undefined) listArr = []
newData = listArr.concat(res.foods.data)
this.sortArr = res.categories
this.categoryId = res.category.category_id
this.foodsArr = newData
this.page = res.foods.page
this.lodingStats= false
uni.stopPullDownRefresh()
}).catch(err => {
uni.showToast({
title: err.message,
icon: "none"
})
})
},
// 选择分类
sortClick(id) {
this.categoryId = id
// 获取食物数据
this.lastInfo();
},
// 输入关键字
searchSitle(name) {
this.title = name.detail.value
// 获取食物数据
this.lastInfo();
},
// 页面相关事件处理函数--监听用户下拉动作
onPullDownRefresh() {
// 商品列表数据
this.lastInfo();
},
// 上拉加载
onReachBottom(){
this.lodingStats = true
let pageNumber = this.page.current
if(this.page.has_more){
pageNumber++
// 商品列表数据
this.lastInfo(pageNumber);
}
}
}
}
</script>
<style lang="scss" scoped>
.content{
overflow: hidden;
background: #f3f4f6;
}
.equityTop {
background-color: #FFFFFF;
height: 220rpx;
position: fixed;
width: 100%;
left: 0;
top: 0;
z-index: 99;
padding: 30rpx;
box-sizing: border-box;
.equityTool {
position: relative;
height: 68rpx;
line-height: 68rpx;
display: flex;
.search {
flex: 1;
display: flex;
border-radius:60rpx;
background-color: #f8f8f8;
margin-right: 40rpx;
padding: 0 20rpx;
box-sizing: border-box;
.search-input {
height: 100%;
width: 100%;
font-size: 28rpx;
}
.search-img {
width: 40rpx;
height: 40rpx;
margin: 16rpx 15rpx 0;
vertical-align: middle;
}
}
.moreBtn {
display: flex;
.moreBtn-img {
width: 54rpx;
height: 54rpx;
margin-top: 10rpx;
vertical-align: middle;
}
}
}
.equityTab {
white-space:nowrap;
margin-top: 20rpx;
.item-box{
display: inline-block;
height: 86rpx;
line-height: 86rpx;
margin-right: 40rpx;
font-size: 30rpx;
position: relative;
&::after {
position: absolute;
content: '';
left: calc(50% - 20rpx);
bottom: 0;
background-color: #FFFFFF;
width: 40rpx;
height: 8rpx;
border-radius: 60rpx;
}
&.active::after {
background-color: #6e79ec;
}
&.active {
color: #6e79ec;
}
&:last-child {
margin-right: 0;
}
}
}
}
.contentList {
margin-top: 220rpx;
padding: 30rpx;
width: 100%;
box-sizing: border-box;
.List {
background-color: #FFFFFF;
border-radius: 10rpx;
box-shadow: 0 0 10rpx rgba($color: #000000, $alpha: .05);
.List-label {
padding: 20rpx;
box-sizing: border-box;
position: relative;
.List-img {
width: 140rpx;
height: 140rpx;
border-radius: 10rpx;
}
.List-cont {
position: absolute;
width: 100%;
top: 0;
left: 0;
padding: 20rpx 20rpx 20rpx 180rpx;
box-sizing: border-box;
.List-top {
display: flex;
line-height: 40rpx;
.List-top-name {
flex: 1;
margin-right: 20rpx;
font-weight: 600;
}
.List-top-tips {
display: inline-block;
background-color: #f1f3ff;
color: #6d79ec;
font-size: 24rpx;
border-radius: 6rpx;
height: 40rpx;
padding: 0 10rpx;
}
}
.List-text {
font-size: 24rpx;
padding: 10rpx 0 20rpx;
color: #919191;
}
.List-levels {
font-size: 26rpx;
color: #54975e;
}
}
}
}
}
</style>

View File

@@ -1,88 +0,0 @@
<template>
<view class="content">
<view class="While title">
{{ detailsData.title }}
<view class="time">
<view class="time-number">{{ detailsData.created_at }}</view>
游览数{{ detailsData.clicks }}
</view>
</view>
<view class="While article">
<rich-text :nodes="contentData"></rich-text>
</view>
</view>
</template>
<script>
import {
artiicle
} from '@/apis/interfaces/mall'
export default {
data() {
return {
detailsData : '', //文章数据信息
contentData : '', //文章内容
};
},
onLoad() {
// 获取商品详情数据
this.detailsInfo();
},
methods: {
// 商品详情数据
detailsInfo() {
artiicle(this.$Route.query.id).then(res => {
this.detailsData = res
this.contentData = res.content.replace(/\<img/gi, '<img style="max-width:100%;height:auto;display:block;"')
}).catch(err => {
uni.showToast({
title: err.message,
icon: "none"
})
})
},
// 新增尿酸弹出
popClick() {
this.popShow = !this.popShow
}
}
}
</script>
<style lang="scss">
.content{
overflow: hidden;
background: #f3f4f6;
}
.While {
border-radius: 10rpx;
margin-bottom: 30rpx;
background-color: #FFFFFF;
padding:30rpx;
box-sizing: border-box;
box-shadow: 0 0 10rpx rgba($color: #000000, $alpha: .05);
}
.title {
font-weight: 600;
line-height: 52rpx;
font-size: 34rpx;
.time {
font-weight: normal;
font-size: 28rpx;
color: #919191;
margin-top: 10rpx;
display: flex;
.time-number {
flex: 1;
}
}
}
.article {
line-height: 52rpx;
font-size: 30rpx;
}
</style>

275
pages/redPaper/index.vue Normal file
View File

@@ -0,0 +1,275 @@
<template>
<view class="content">
<view v-if="packerState != 3" class="packer-box flex-column">
<view class="packer-bg anim-ease-in" :class="{ 'anim-fade-out': packerState == 2 }"></view>
<view class="packer-bottom-box anim-ease-in" :class="{ 'anim-out-bottom': packerState == 2 }">
<view class="arc-bottom-edge"></view>
<view class="packer-bottom-bg"></view>
</view>
<view class="packer-top-box anim-ease-in" :class="{ 'anim-out-top': packerState == 2 }">
<view class="flex-row sender-info">
<image class="sender-avatar"></image>
<view>{{'XXX'}}发出的红包</view>
</view>
<view class="packer-greeting double-text">{{'恭喜发财,大吉大利'}}</view>
<view class="arc-edge"></view>
<view v-if="packerState == 1" class="anim-rotate packer-btn-pos">
<view class="packer-btn" style="transform: translateZ(-4px);"></view>
<view class="packer-btn-middle" v-for="(item, index) in 7" :key="index"
:style="{transform: `translateZ(${index - 3}px)`}"></view>
<view class="packer-btn packer-btn-front"></view>
</view>
<view v-else class="packer-btn packer-btn-pos" @click="openPacker"></view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
packerState: 0
}
},
methods: {
openPacker() {
// 加载数据,触发硬币旋转动画
this.packerState = 1;
this.request(() => {
// 调用抢红包接口成功,触发开红包动画
this.packerState = 2;
// 开红包动画结束后,移除相关节点,否则会阻挡其它下层节点
setTimeout(() => {
this.packerState = 3;
}, 500);
})
},
request(success) {
setTimeout(() => {
success()
}, 3000);
}
}
}
</script>
<style lang="scss" scoped>
.flex-row {
display: flex;
flex-direction: row;
position: relative;
}
.flex-column {
display: flex;
flex-direction: column;
position: relative;
}
.packer-box {
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
z-index: 99;
color: rgb(235, 205, 153);
padding: 60rpx;
}
.packer-bg {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
background-color: #fff;
}
.packer-top-box {
width: 600rpx;
background-color: rgb(244, 94, 77);
text-align: center;
margin: auto;
transform: translateY(-160rpx);
border-top-left-radius: 30rpx;
border-top-right-radius: 30rpx;
position: relative;
}
.sender-info {
margin-top: 200rpx;
justify-content: center;
line-height: 60rpx;
font-size: 36rpx;
}
.sender-avatar {
width: 60rpx;
height: 60rpx;
border-radius: 10rpx;
background-color: #fff;
margin-right: 10rpx;
}
.packer-greeting {
font-size: 48rpx;
line-height: 60rpx;
height: 120rpx;
margin: 40rpx 30rpx 200rpx;
}
.arc-edge {
position: relative;
}
.arc-edge::after {
width: 100%;
height: 200rpx;
position: absolute;
left: 0;
top: -100rpx;
z-index: 9;
content: '';
border-radius: 50%;
background-color: rgb(244, 94, 77);
box-shadow: 0 6rpx 6rpx 0 rgba(0, 0, 0, 0.1);
}
.packer-bottom-box {
transform: translate(-50%, 0);
width: 600rpx;
height: 360rpx;
border-bottom-left-radius: 30rpx;
border-bottom-right-radius: 30rpx;
overflow: hidden;
position: absolute;
bottom: calc(50% - 440rpx);
left: 50%;
}
.anim-ease-in {
animation-duration: 0.5s;
animation-timing-function: ease-in;
animation-fill-mode: forwards;
}
.anim-out-top {
animation-name: slideOutTop;
}
.anim-out-bottom {
animation-name: slideOutBottom;
}
.anim-fade-out {
animation-name: fadeOut;
}
@keyframes fadeOut {
from {
opacity: 1;
}
to {
opacity: 0;
}
}
@keyframes slideOutTop {
from {
transform: translateY(-160rpx);
}
to {
transform: translateY(-200%);
}
}
@keyframes slideOutBottom {
from {
transform: translate(-50%, 0);
}
to {
transform: translate(-50%, 200%);
}
}
.arc-bottom-edge {
position: relative;
}
.arc-bottom-edge::after {
width: 120%;
height: 200rpx;
position: absolute;
left: -10%;
top: -100rpx;
z-index: 8;
content: '';
border-radius: 50%;
box-shadow: 0 60rpx 0 0 rgb(242, 85, 66);
}
.packer-bottom-bg {
background-color: rgb(242, 85, 66);
height: 280rpx;
margin-top: 100rpx;
}
.packer-btn {
border-radius: 50%;
width: 200rpx;
height: 200rpx;
line-height: 200rpx;
font-size: 80rpx;
text-align: center;
color: #333;
background-color: rgb(235, 205, 153);
box-shadow: 0 0 6rpx 0 rgba(0, 0, 0, 0.1);
}
.packer-btn-pos {
transform: translateX(-50%);
position: absolute;
left: 50%;
z-index: 10;
bottom: -200rpx;
}
.packer-btn-front {
position: absolute;
top: 0;
transform: translateZ(4px);
}
.packer-btn-middle {
position: absolute;
top: 0;
border-radius: 50%;
width: 200rpx;
height: 200rpx;
background-color: rgb(235, 180, 120);
}
.anim-rotate {
margin-left: -100rpx;
transform-style: preserve-3d;
animation: rotate 1s linear infinite;
}
@keyframes rotate {
0% {
transform: rotateY(0deg);
}
100% {
transform: rotateY(360deg);
}
}
</style>

158
pages/share/index.vue Normal file
View File

@@ -0,0 +1,158 @@
<template>
<view class="content" :style="'background-image: url(' + require('@/static/img/share_back.png') + ')'">
<view class="list">
<view class="list-user">
<view class="list-item">
<view class="number">
<text>排名</text>
</view>
<view class="user user-header">
<text>用户名称</text>
</view>
<view class="phone">
<text>联系方式</text>
</view>
</view>
<view class="list-item" v-for="(item, index) in rack" :key="index">
<view class="number">{{index + 1}}</view>
<view class="user nowrap">
<image class="user-avatar" :src="item.user.avatar || require('@/static/imgs/default_myHead.png')"></image>
{{item.user.nickname}}
</view>
<view class="phone">{{item.user.username}}</view>
</view>
</view>
<view class="list-value">
<view class="list-value-item nowrap">
<text>分享人数</text>
</view>
<view class="list-value-item nowrap" v-for="(item, index) in rack" :key="index">
{{item.total}}
</view>
</view>
</view>
</view>
</template>
<script>
import { rankShare } from '@/apis/interfaces/user.js'
export default {
data() {
return {
rack: []
};
},
onShow() {
rankShare().then(res => {
this.rack = res
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
},
methods: {
}
}
</script>
<style lang="scss">
.content{
padding: 10rpx 30rpx 0;
min-height: 90vh;
background-size: 100%;
background-repeat: no-repeat;
background-position: top center;
box-sizing: border-box;
.list{
position: relative;
margin-top: 85%;
background-color: white;
border-radius: 20rpx 20rpx 0 0;
box-shadow: 0 0 10rpx 10rpx rgba(0, 0, 0, .02);
padding: 30rpx;
.list-user{
padding-right: 200rpx;
.list-item{
color: #231815;
border-bottom: solid 1rpx #7b7b7b;
display: flex;
font-size: 28rpx;
padding: 20rpx 0;
align-items: center;
.number{
width: 80rpx;
text-align: center;
color: #231815;
font-weight: bold;
}
.user{
width: calc(100% - 250rpx);
height: 48rpx;
line-height: 48rpx;
padding-left: 58rpx;
position: relative;
box-sizing: border-box;
&.user-header{
padding: 0;
text-align: center;
}
.user-avatar{
width: 48rpx;
height: 48rpx;
border-radius: 50%;
position: absolute;
left: 0;
top: 0;
background-color: #ddd;
}
}
.phone{
width: 170rpx;
text-align: right;
padding-right: 10rpx;
box-sizing: border-box;
}
text{
font-weight: normal;
background: linear-gradient(to top, #6ca2bc, #f1fcfd, #6ca2bc);
padding: 0 10rpx;
border-radius: 10rpx;
line-height: 50rpx;
display: inline-block;
}
}
}
.list-value{
position: absolute;
top: -20rpx;
bottom: 0;
right: 30rpx;
width: 180rpx;
background: linear-gradient(to left, #6ca2bc, #f1fcfd, #6ca2bc );
text-align: center;
padding-top: 50rpx;
border-radius: 20rpx 20rpx 0 0;
.list-value-item{
margin: 0 20rpx;
font-size: 30rpx;
padding: 20rpx 0;
line-height: 48rpx;
border-bottom: solid 1rpx white;
color: #1f130e;
text{
font-weight: normal;
background: linear-gradient(to top, #bfbfbf, #fefefe, #bfbfbf);
padding: 0 10rpx;
border-radius: 10rpx;
line-height: 48rpx;
display: inline-block;
font-size: 28rpx;
}
}
}
}
}
</style>

View File

@@ -1,430 +0,0 @@
<template>
<view class="content">
<view class="tabs">
<view class="tabs-item" :class="tabType == 'hyperglycemia' ? 'active': ''" @click="onTab('hyperglycemia')">血糖记录</view>
<view class="tabs-item" :class="tabType == 'hyperlipidemia' ? 'active': ''" @click="onTab('hyperlipidemia')">血脂记录</view>
<view class="tabs-item" :class="tabType == 'hypertension' ? 'active': ''" @click="onTab('hypertension')">血压记录</view>
</view>
<view class="While">
<view class="top">
<view class="top-time">
{{ lastData.log ? lastData.log.created_at : '您还没有上传过血糖值' }}
</view>
<view v-if="lastData.log" class="top-record" @click="$Router.push({name: 'uricacidList', params: {id: lastData.caseId, type: tabType}})">
所有记录
</view>
</view>
<view class="uricacid">
<view class="uricacid-number">
<block v-if="lastData.log">
<text>{{ lastData.log.quantity }}</text> {{lastData.Newscope.scope.unit}}
</block>
<block v-else>
<text>暂无数据</text>
</block>
</view>
<view class="uricacid-tips">
<view v-if="tabType == 'hyperglycemia'">
<view>男性血糖指标 {{ lastData.Newscope.man }}</view>
<view>女性血糖指标 {{ lastData.Newscope.woman }}</view>
</view>
<view v-if="tabType == 'hyperlipidemia'">
<view>男性血脂指标 {{ lastData.Newscope.man }}</view>
<view>女性血脂指标 {{ lastData.Newscope.woman }}</view>
</view>
<view v-if="tabType == 'hypertension'">
<view>男性血压指标 {{ lastData.Newscope.man }}</view>
<view>女性血压指标 {{ lastData.Newscope.woman }}</view>
</view>
</view>
</view>
</view>
<view class="While analyse">
<view class="analyse-title">
<text v-if="tabType == 'hyperglycemia'">血糖趋势分析</text>
<text v-if="tabType == 'hyperlipidemia'">血脂趋势分析</text>
<text v-if="tabType == 'hypertension'">血压趋势分析</text>
</view>
<view class="analyse-text" v-if="lastData.log">
当前血糖值为{{ lastData.log.quantity }}umol,
<block v-if="lastData.Newscope.scope">
{{ lastData.log.quantity > lastData.Newscope.scope.max ? '高于' : '低于' }}{{ lastData.Newscope.scope.max }}umol
{{ lastData.log.quantity > lastData.Newscope.scope.max ? '您的尿酸水平偏高,根据治疗指南需要进行治疗干预。需要生活控制(多喝水,饮食控制、并发症危险因素的控制、碱化尿液),配合药物治疗。具体情况请遵循医嘱。' : '您的尿酸水平控制很棒,请继续保持' }}
</block>
</view>
<view class="analyse-text" v-else>
暂无分析数据
</view>
<view class="analyse-btn" @click="recordClick">
<text v-if="tabType == 'hyperglycemia'">记录血糖值</text>
<text v-if="tabType == 'hyperlipidemia'">记录血脂值</text>
<text v-if="tabType == 'hypertension'">记录血压值</text>
</view>
</view>
<!-- 记录尿酸值弹出 -->
<view class="recordBack" v-if="recordShow"></view>
<view class="recordCont" v-if="recordShow">
<form @submit="siteform">
<view class="recordCont-title">
<image @click="recordClick" class="recordCont-title-close" src="/static/icons/uricacidClose.png" mode="aspectFill"></image>
<view class="recordCont-title-text">
<text v-if="tabType == 'hyperglycemia'">记录血糖值</text>
<text v-if="tabType == 'hyperlipidemia'">记录血脂值</text>
<text v-if="tabType == 'hypertension'">记录血压值</text>
</view>
<view class="recordCont-title-btn">
<button form-type="submit">完成</button>
</view>
</view>
<view class="recordCont-form">
<view class="site-input">
<label>
<text v-if="tabType == 'hyperglycemia'">血糖值</text>
<text v-if="tabType == 'hyperlipidemia'">血脂值</text>
<text v-if="tabType == 'hypertension'">血压值</text>
</label>
<view class="recordCont-title-input">
<input placeholder="请输入" name="quantity" type="digit"></input>
<text v-if="tabType == 'hyperglycemia'">mmol/L</text>
<text v-if="tabType == 'hyperlipidemia'">mmol/L</text>
<text v-if="tabType == 'hypertension'">mmHg</text>
</view>
</view>
<view class="site-remarks">
<textarea name="remark" placeholder="请输入备注信息" maxlength="30" />
<text>最大限制30字</text>
</view>
<view class="site-data">
<label>记录日期</label>
<view class="site-data-text">
<picker mode="date" :value="date" @change="bindDateChange">
<view class="uni-input">{{date}}</view>
</picker>
</view>
</view>
<view class="site-photo">
<label>上传图片选填</label>
<view class="issueNew-photo">
<image @click="updImg()" class="issueNew-icon" :src="cover.showpath || '/static/imgs/cover_img.png'" mode="aspectFill"></image>
</view>
</view>
</view>
</form>
</view>
</view>
</template>
<script>
import { lastLog, AddlastLog } from '@/apis/interfaces/gout'
import { uploads } from '@/apis/interfaces/uploading'
export default {
data() {
return {
lastData : {
Newscope : '',
log : '',
caseId : ''
}, //尿酸数据
date : '请选择日期',
recordShow : false,
cover : {
showpath: '',
path : ''
},
tabType : 'hyperglycemia'
}
},
onShow() {
// 获取尿酸数据
this.lastInfo();
},
methods: {
// 切换数据
onTab(e){
this.tabType = e;
this.lastInfo()
},
// 尿酸数据
lastInfo() {
lastLog(this.tabType).then(res => {
this.lastData.Newscope = res.scope
this.lastData.log = res.log
this.lastData.caseId = res.case.gout_case_id
}).catch(err => {
uni.showToast({
title: err.message,
icon: "none"
})
})
},
// 选择日期
bindDateChange(e) {
this.date = e.target.value
},
// 新增尿酸弹出
recordClick() {
this.recordShow = !this.recordShow
},
// 上传图片
updImg(type){
uni.chooseImage({
count : 1,
success : path => {
uploads([{
uri : path.tempFilePaths[0]
}]).then(res => {
this.cover = {
showpath: res.url[0],
path: res.path[0]
}
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
}
})
},
// 提交表单
siteform(e) {
console.log(this.lastData)
AddlastLog(this.lastData.caseId, {
type : this.tabType,
quantity : e.detail.value.quantity,
remark : e.detail.value.remark,
checked_at : this.date,
cover : this.cover.path
}).then(res => {
this.recordShow = false
this.cover = ''
// 获取尿酸数据
this.lastInfo();
}).catch(err => {
uni.showToast({
title: err.message,
icon: "none"
})
})
}
}
}
</script>
<style lang="scss" scoped>
.content{
overflow: hidden;
background: #f3f4f6;
min-height: calc(100vh - 60px);
}
.tabs{
background-color: white;
border-radius: 0 0 10rpx 10rpx;
box-shadow: 0 0 10rpx rgba($color: #000000, $alpha: .05);
margin-bottom: 30rpx;
padding: 0 30rpx;
display: flex;
justify-content: space-around;
.tabs-item{
line-height: 100rpx;
color: #888;
&.active{
font-weight: bold;
color: $mian-color;
}
}
}
.While {
border-radius: 10rpx;
margin-bottom: 30rpx;
background-color: #FFFFFF;
padding:30rpx;
box-sizing: border-box;
box-shadow: 0 0 10rpx rgba($color: #000000, $alpha: .05);
}
.top {
margin-bottom: 30rpx;
display: flex;
font-size: 28rpx;
.top-time {
color: #919191;
flex: 1;
}
.top-record {
color: #54975e;
}
}
.uricacid {
padding: 40rpx 0 20rpx;
.uricacid-number {
text-align: center;
color: #919191;
text {
color: #000000;
font-size: 58rpx;
font-weight: 600;
padding-right: 10rpx;
}
}
.uricacid-tips {
margin-top: 30rpx;
font-size: 26rpx;
text-align: center;
text {
padding: 0 15rpx;
box-sizing: border-box;
}
}
}
.analyse {
.analyse-title {
font-weight: 600;
margin-bottom: 30rpx;
}
.analyse-text {
line-height: 42rpx;
color: #585858;
font-size: 26rpx;
}
.analyse-btn {
background-color: #4490ff;
color: #FFFFFF;
text-align: center;
border-radius: 80rpx;
line-height: 84rpx;
margin: 80rpx 0 20rpx;
}
}
// 弹出
.recordBack {
position: fixed;
width: 100%;
height: 100%;
background-color: rgba($color: #000000, $alpha: .4);
left: 0;
top: 0;
z-index: 99;
}
.recordCont {
position: fixed;
width: 100%;
left: 0;
bottom: 0;
background-color: #FFFFFF;
z-index: 100;
overflow-y: scroll;
height: 60vh;
border-radius: 30rpx 30rpx 0 0;
padding: 30rpx;
box-sizing: border-box;
.recordCont-title {
border-bottom: 2rpx solid #F2F2F2;
padding-bottom: 30rpx;
display: flex;
line-height: 54rpx;
position: relative;
.recordCont-title-close {
width: 40rpx;
height: 40rpx;
margin-top: 7rpx;
}
.recordCont-title-text {
width: 100%;
text-align: center;
}
.recordCont-title-btn button {
background-color: #4490ff;
width: 120rpx;
text-align: center;
color: #FFFFFF;
height: 54rpx;
line-height: 54rpx;
border-radius: 40rpx;
font-size: 28rpx;
position: absolute;
right: 0;
top: 0;
}
}
.recordCont-form {
margin-top: 30rpx;
.site-input {
margin-bottom: 30rpx;
label {
margin-bottom: 20rpx;
display: block;
font-weight: 600;
}
.recordCont-title-input {
display: flex;
input {
flex: 1;
font-size: 40rpx;
}
text {
color: #adadad;
}
}
}
.site-photo {
display: flex;
label {
flex: 1;
margin-top: 10rpx;
display: block;
font-weight: 600;
}
.issueNew-photo{
width: 120rpx;
height: 120rpx;
margin: 0 auto;
background: white;
position: relative;
text-align: center;
color: #999;
font-size: 28rpx;
.issueNew-icon{
width: 100%;
height: 100%;;
}
}
}
.site-remarks {
background-color: #F2F2F2;
border-radius: 10rpx;
padding: 20rpx;
box-sizing: border-box;
textarea {
width: 100%;
height: 80rpx;
}
text {
text-align: right;
display: block;
font-size: 26rpx;
color: #54975e;
}
}
.site-data {
margin: 40rpx 0;
display: flex;
label {
flex: 1;
font-weight: 600;
}
}
}
}
</style>

View File

@@ -1,382 +0,0 @@
<template>
<view class="content">
<view class="tabs">
<view class="tabs-item" :class="tabType == 'hyperglycemia' ? 'active': ''" @click="onTab('hyperglycemia')">血糖记录</view>
<view class="tabs-item" :class="tabType == 'hyperlipidemia' ? 'active': ''" @click="onTab('hyperlipidemia')">血脂记录</view>
<view class="tabs-item" :class="tabType == 'hypertension' ? 'active': ''" @click="onTab('hypertension')">血压记录</view>
</view>
<block v-if="LogArr.length > 0">
<view class="While list">
<view class="list-label" v-for="(item, index) in LogArr" :key="index" @click="showSee(item.gout_case_log_id)">
<view class="list-title">
<view class="list-regular">
<text>{{ item.quantity }}</text>{{item.type.unit}}
</view>
<view class="list-rise" :class="{active : item.diff.symbol == '+'}">
<text>{{ item.diff.symbol == '+' ? '上升' : '下降'}}</text> {{ item.diff.value }}
</view>
</view>
<view class="list-text">
{{ item.remark }}
</view>
<view class="list-text">
记录时间{{ item.created_at }}
</view>
</view>
<view class="pagesLoding" v-if="lodingStats">
<block v-if="page.has_more">
<image class="pagesLodingIcon" src="/static/icons/refresh_loding.gif" mode="widthFix"></image>加载中...
</block>
<block v-else>
没有更多了~
</block>
</view>
</view>
</block>
<view class="pack-center pages-hint" v-else>
<image src="/static/imgs/coupon_null.png"></image>
<view>暂无数据</view>
</view>
<!-- 记录尿酸值弹出 -->
<view class="recordBack" v-if="recordShow"></view>
<view class="recordCont" v-if="recordShow">
<view class="recordCont-title">
<image @click="recordClick" class="recordCont-title-close" src="/static/icons/uricacidClose.png" mode="aspectFill"></image>
<view class="recordCont-title-text">
{{LogInfo.type.text}}详情
</view>
<view class="recordCont-title-btn">
<view @click="delLogs">删除记录</view>
</view>
</view>
<view class="recordCont-form">
<view class="site-input">
<label>{{LogInfo.type.text}}</label>
<view class="recordCont-title-input">
{{ LogInfo.quantity }}<text>{{LogInfo.type.unit}}</text>
</view>
</view>
<view class="site-input">
<label>备注描述</label>
<view class="site-remarks">
{{ LogInfo.remark }}
</view>
</view>
<view class="site-data">
<label>{{LogInfo.type.text}}记录日期</label>
<view class="site-data-text">
{{ LogInfo.created_at }}
</view>
</view>
<view class="site-input" v-if="LogInfo.cover">
<label>图片信息</label>
<image class="issueNew-icon" @click="openImg(LogInfo.cover)" :src="LogInfo.cover" mode="aspectFill"></image>
</view>
</view>
</view>
</view>
</template>
<script>
import { ListLog, DetLog, DelLog } from '@/apis/interfaces/gout'
export default {
data() {
return {
LogArr : [], //记录列表
LogInfo : '', //记录详情
LogId : '', //记录id
recordShow : false,
page : {}, //分页信息
lodingStats : false ,//加载状态
tabType : 'hyperglycemia',
}
},
onLoad(e) {
// 获取尿酸记录列表
this.tabType = e.type
this.lastInfo();
},
methods: {
// 切换数据
onTab(e){
this.tabType = e;
this.page = {};
this.lastInfo()
},
// 尿酸数据
lastInfo(page) {
ListLog(this.$Route.query.id,{
page : page || 1,
type : this.tabType
}).then(res => {
let listArr = this.LogArr,
newData = []
if(page == 1 || page == undefined) listArr = []
newData = listArr.concat(res.data)
this.LogArr = newData
this.page = res.page
this.lodingStats= false
uni.stopPullDownRefresh()
}).catch(err => {
uni.showToast({
title: err.message,
icon: "none"
})
})
},
// 查看详情
showSee(val) {
// 获取详情
this.lastDet(val);
this.recordShow = true
},
// 尿酸列表-详情
lastDet(id) {
DetLog(id).then(res => {
this.LogInfo = res
this.LogId = id
}).catch(err => {
uni.showToast({
title: err.message,
icon: "none"
})
})
},
// 新增尿酸弹出
recordClick() {
this.recordShow = !this.recordShow
},
// 删除记录
delLogs() {
DelLog(this.LogId).then(res => {
// 获取尿酸记录列表
this.lastInfo();
this.recordShow = false
}).catch(err => {
uni.showToast({
title: err.message,
icon: "none"
})
})
},
// 查看图片
openImg(img) {
uni.previewImage({
current: img,
urls:[img]
})
},
// 页面相关事件处理函数--监听用户下拉动作
onPullDownRefresh() {
// 商品列表数据
this.lastInfo();
},
// 上拉加载
onReachBottom(){
this.lodingStats = true
let pageNumber = this.page.current
if(this.page.has_more){
pageNumber++
// 商品列表数据
this.lastInfo(pageNumber);
}
}
}
}
</script>
<style lang="scss" scoped>
.content{
overflow: hidden;
background: #f3f4f6;
min-height: 100vh;
}
.tabs{
background-color: white;
border-radius: 0 0 10rpx 10rpx;
box-shadow: 0 0 10rpx rgba($color: #000000, $alpha: .05);
margin-bottom: 30rpx;
padding: 0 30rpx;
display: flex;
justify-content: space-around;
.tabs-item{
line-height: 100rpx;
color: #888;
&.active{
font-weight: bold;
color: $mian-color;
}
}
}
.While {
border-radius: 10rpx;
margin-bottom: 30rpx;
background-color: #FFFFFF;
padding:30rpx;
box-sizing: border-box;
box-shadow: 0 0 10rpx rgba($color: #000000, $alpha: .05);
}
.list {
border-radius: 10rpx;
margin: 30rpx;
.list-label {
margin-bottom: 20rpx;
padding-bottom: 30rpx;
border-bottom: 2rpx solid #f4f4f4;
&:last-child {
padding-bottom: 0;
border: none;
}
.list-title {
display: flex;
font-size: 28rpx;
line-height: 54rpx;
.list-regular {
margin-right: 40rpx;
text {
color: #6d79ec;
font-weight: 600;
font-size: 44rpx;
padding-right: 10rpx;
}
}
.list-rise {
margin-right: 20rpx;
color: #919191;
text {
font-weight: 600;
color: #54975e;
padding-right: 10rpx;
}
&.active {
text {
color: red;
}
}
}
}
.list-text {
margin-top: 20rpx;
color: #919191;
font-size: 28rpx;
}
}
}
// 弹出
.recordBack {
position: fixed;
width: 100%;
height: 100%;
background-color: rgba($color: #000000, $alpha: .4);
left: 0;
top: 0;
z-index: 99;
}
.recordCont {
position: fixed;
width: 100%;
left: 0;
bottom: 0;
background-color: #FFFFFF;
z-index: 100;
overflow-y: scroll;
height: 70vh;
border-radius: 30rpx 30rpx 0 0;
padding: 30rpx;
box-sizing: border-box;
.recordCont-title {
border-bottom: 2rpx solid #F2F2F2;
padding-bottom: 30rpx;
display: flex;
line-height: 54rpx;
position: relative;
.recordCont-title-close {
width: 40rpx;
height: 40rpx;
margin-top: 7rpx;
}
.recordCont-title-text {
width: 100%;
text-align: center;
}
.recordCont-title-btn view {
background-color: red;
width: 150rpx;
text-align: center;
color: #FFFFFF;
height: 54rpx;
line-height: 54rpx;
border-radius: 40rpx;
font-size: 28rpx;
position: absolute;
right: 0;
top: 0;
}
}
.recordCont-form {
margin-top: 30rpx;
.site-input {
margin-bottom: 30rpx;
label {
margin-bottom: 20rpx;
display: block;
font-weight: 600;
}
.recordCont-title-input {
display: flex;
font-size: 40rpx;
font-weight: 600;
line-height: 60rpx;
text {
font-size: 32rpx;
font-weight: normal;
color: #adadad;
padding-left: 10rpx;
}
}
}
.site-remarks {
background-color: #F2F2F2;
border-radius: 10rpx;
padding: 20rpx;
box-sizing: border-box;
textarea {
width: 100%;
height: 80rpx;
}
text {
text-align: right;
display: block;
font-size: 26rpx;
color: #54975e;
}
}
.site-data {
margin: 40rpx 0;
display: flex;
label {
flex: 1;
font-weight: 600;
}
}
}
}
.issueNew-icon{
width: 200rpx;
height: 200rpx;
}
</style>

281
pages/user/census.vue Normal file
View File

@@ -0,0 +1,281 @@
<template>
<view class="content">
<view class="back">
<view class="back-title">
锶源昆仑统计数据
</view>
</view>
<view class="parade">
<view class="dataOne">
<view class="dataOne-item">
<view class="dataOne-number">
{{activities.all}}
</view>
<view class="dataOne-text">
发行总量
</view>
</view>
<view class="dataOne-item">
<view class="dataOne-number">
{{activities.donate}}
</view>
<view class="dataOne-text">
已捐数量
</view>
</view>
<view class="dataOne-item">
<view class="dataOne-number">
{{activities.residue}}
</view>
<view class="dataOne-text">
剩余数量
</view>
</view>
</view>
<!-- 订单数据 -->
<view class="dataOther">
<view class="dataOther-title">
订单数据
</view>
<view class="dataOther-list">
<view class="dataOther-item" @click="$router.push({name: 'CensusOrder', params: {state: 'all', newTitle: '总订单'}})">
<view class="dataOther-number">
{{orders.all}}
</view>
<view class="dataOther-text">
总订单数
</view>
<view class="dataOther-see">
查看
</view>
</view>
<view class="dataOther-item" @click="$router.push({name: 'CensusOrder', params: {state: ' PAID', newTitle: '待发货'}})">
<view class="dataOther-number">
{{orders.paid}}
</view>
<view class="dataOther-text">
待发货数
</view>
<view class="dataOther-see">
查看
</view>
</view>
<view class="dataOther-item" @click="$router.push({name: 'CensusOrder', params: {state: 'DELIVERED', newTitle: '已发货'}})">
<view class="dataOther-number">
{{orders.delivered}}
</view>
<view class="dataOther-text">
已发货
</view>
<view class="dataOther-see">
查看
</view>
</view>
<view class="dataOther-item" @click="$router.push({name: 'CensusOrder', params: {state: 'SIGNED', newTitle: '已签收'}})">
<view class="dataOther-number">
{{orders.signed}}
</view>
<view class="dataOther-text">
已签收
</view>
<view class="dataOther-see">
查看
</view>
</view>
<view class="dataOther-item" @click="$router.push({name: 'CensusUser'})">
<view class="dataOther-number">
{{orders.users}}
</view>
<view class="dataOther-text">
捐献人数
</view>
<view class="dataOther-see dataOther-red">
查看
</view>
</view>
<view class="dataOther-item">
<view class="dataOther-number">
{{orders.amount}}
</view>
<view class="dataOther-text">
收款总额
</view>
</view>
</view>
</view>
<!-- 会员数据 -->
<!-- <view class="dataOther">
<view class="dataOther-title">
会员数据
</view>
<view class="dataOther-list">
<view class="dataOther-item">
<view class="dataOther-number">
{{users.all}}
</view>
<view class="dataOther-text">
注册总量
</view>
</view>
<view class="dataOther-item">
<view class="dataOther-number">
{{users.yk}}
</view>
<view class="dataOther-text">
月卡数
</view>
</view>
<view class="dataOther-item">
<view class="dataOther-number">
{{users.jk}}
</view>
<view class="dataOther-text">
季卡数
</view>
</view>
<view class="dataOther-item">
<view class="dataOther-number">
{{users.nk}}
</view>
<view class="dataOther-text">
年卡数
</view>
</view>
</view>
</view> -->
</view>
</view>
</template>
<script>
import { censusData } from '@/apis/interfaces/user'
export default {
data() {
return {
activities: '',
orders : '',
users : ''
};
},
onShow() {
// 获取查看数据
this.censusInfo();
},
methods:{
// 查看数据
censusInfo() {
censusData().then(res => {
this.activities = res.activities
this.orders = res.orders
this.users = res.users
console.log(res)
}).catch(err => {
uni.showToast({
title: err.message,
icon: "none"
})
})
},
}
}
</script>
<style lang="scss" scoped>
.content {
overflow: hidden;
background-color: #f5f5f5;
height: 100vh;
overflow-y: scroll;
padding-bottom: 30rpx;
box-sizing: border-box;
}
.back {
background-image: linear-gradient(to right, #6884fc, #868afe);
text-align: center;
padding: 80rpx 0 140rpx;
.back-title {
color: #ffffff;
font-size: 34rpx;
}
}
.parade {
margin-top: -70rpx;
padding: 0 30rpx;
box-sizing: border-box;
.dataOne {
background-color: #ffffff;
padding: 40rpx 0;
box-sizing: border-box;
display: flex;
.dataOne-item {
flex: 3;
text-align: center;
.dataOne-number {
font-size: 40rpx;
font-weight: 600;
margin-top: 5rpx;
}
.dataOne-text {
font-size: 24rpx;
}
}
}
.dataOther {
background-color: #ffffff;
margin-top: 30rpx;
padding: 30rpx 30rpx 0;
.dataOther-title {
font-weight: 600;
margin-bottom: 20rpx;
}
.dataOther-list {
overflow: hidden;
padding: 20rpx 0;
margin: 0 -10rpx;
.dataOther-item {
background-color: #f4f7fd;
width: calc(33.33% - 20rpx);
margin: 0 10rpx 20rpx;
padding: 25rpx 0;
text-align: center;
border-radius: 8rpx;
float: left;
position: relative;
overflow: hidden;
.dataOther-see {
position: absolute;
right: 0;
top: 0;
background-color: #f0bb6e;
color: #ffffff;
font-size: 22rpx;
padding: 0 12rpx;
line-height: 34rpx;
border-radius: 0 0 0 10rpx;
&.dataOther-red {
background-color: #d86a6b;
}
}
.dataOther-text {
font-size: 24rpx;
color: #383c4b;
margin-top: 5rpx;
}
.dataOther-number {
color: #315cf4;
font-weight: 600;
font-size: 38rpx;
text {
font-size: 24rpx;
}
}
}
}
}
}
</style>

255
pages/user/censusOrder.vue Normal file
View File

@@ -0,0 +1,255 @@
<template>
<view class="content">
<view class="list" v-if="orderList.length > 0">
<view class="item" v-for="(item, index) in orderList" :key="index">
<view class="item-name">
{{item.order_no}}
</view>
<view class="grey">
<view class="label" v-if="item.state != null">
<view class="label-name">
订单状态
</view>
<view class="label-text label-color">
{{item.state}}
</view>
</view>
<view class="label" v-if="item.express.name != null">
<view class="label-name">
收件人
</view>
<view class="label-text">
{{item.express.name}}
</view>
</view>
<view class="label" v-if="item.express.mobile != null">
<view class="label-name">
手机号
</view>
<view class="label-text label-tel">
<view class="label-tel-number">{{item.express.mobile}}</view>
<view class="label-tel-dial" @click="clickCall(item.express.mobile)">拨打</view>
</view>
</view>
<view class="label" v-if="item.qty != null">
<view class="label-name">
捐献数量
</view>
<view class="label-text">
{{item.qty}}
</view>
</view>
<view class="label" v-if="item.total != null">
<view class="label-name">
捐献金额
</view>
<view class="label-text label-price">
<text></text>{{item.total}}
</view>
</view>
<view class="label" v-if="item.express.receive_at != null">
<view class="label-name">
签收时间
</view>
<view class="label-text">
{{item.express.receive_at}}
</view>
</view>
<view class="label" v-if="item.express.deliver_at != null">
<view class="label-name">
发货时间
</view>
<view class="label-text">
{{item.express.deliver_at}}
</view>
</view>
<view class="label" v-if="item.express.deliver_at != null">
<view class="label-name">
物流名称
</view>
<view class="label-text">
{{item.express.express_name}}
</view>
</view>
<view class="label" v-if="item.express.express_no != null">
<view class="label-name">
物流编号
</view>
<view class="label-text">
{{item.express.express_no}}
</view>
</view>
<view class="label" v-if="item.express.full_address != null">
<view class="label-name">
收货地址
</view>
<view class="label-text">
{{item.express.full_address}}
</view>
</view>
</view>
</view>
<view class="pagesLoding" v-if="lodingStats">
<block v-if="page.has_more">
<image class="pagesLodingIcon" src="/static/icons/refresh_loding.gif" mode="widthFix"></image>加载中...
</block>
<block v-else>
没有更多了~
</block>
</view>
</view>
<view class="pack-center pages-hint" v-else>
<image src="/static/imgs/coupon_null.png"></image>
<view>暂无数据</view>
</view>
</view>
</template>
<script>
import { dataOrder } from '@/apis/interfaces/user'
export default {
data() {
return {
orderList : [],
page : {}, //分页信息
lodingStats : false //加载状态
};
},
onShow() {
// 数据-订单列表
this.censusInfo();
uni.setNavigationBarTitle({
  title: this.$Route.query.newTitle
})
},
methods:{
// 查看数据-订单列表
censusInfo(page) {
dataOrder({
status: this.$Route.query.state,
page : page || 1
}).then(res => {
let listArr = this.orderList,
newData = []
if(page == 1 || page == undefined) listArr = []
newData = listArr.concat(res.data)
this.orderList = newData
this.page = res.page
this.lodingStats= false
uni.stopPullDownRefresh()
}).catch(err => {
uni.showToast({
title: err.message,
icon: "none"
})
})
},
// 拨打电话
clickCall (tel) {
uni.makePhoneCall({
phoneNumber: tel,//电话号码
success: res => {
console.log(res);
},
fail: err =>{
console.log(err);
}
})
},
// 页面相关事件处理函数--监听用户下拉动作
onPullDownRefresh() {
// 数据-订单列表
this.censusInfo();
},
// 上拉加载
onReachBottom(){
this.lodingStats = true
let pageNumber = this.page.current
if(this.page.has_more){
pageNumber++
// 数据-订单列表
this.censusInfo(pageNumber);
}
}
}
}
</script>
<style lang="scss" scoped>
.content {
overflow: hidden;
background-color: #f5f5f5;
height: 100vh;
overflow-y: scroll;
}
.pack-center {
z-index: 9;
}
.list {
padding: 30rpx;
box-sizing: border-box;
.item {
background-color: #ffffff;
margin-bottom: 30rpx;
border-radius: 10rpx;
padding: 30rpx;
box-sizing: border-box;
.item-name {
font-weight: 600;
margin-bottom: 30rpx;
}
.grey {
background-color: #fcfcfc;
border-radius: 10rpx;
padding: 30rpx;
box-sizing: border-box;
.label {
display: flex;
padding-bottom: 30rpx;
font-size: 28rpx;
line-height: 48rpx;
&:last-child {
padding-bottom: 0;
}
.label-name {
width: 170rpx;
color: #a9a9a9;
}
.label-text {
width: calc(100% - 170rpx);
text-align: justify;
&.label-color {
color: #6884fc;
}
&.label-price {
color: red;
font-weight: 600;
}
}
.label-tel {
display: flex;
.label-tel-number {
flex: 1;
}
.label-tel-dial {
background-color: #edf4ff;
color: #5370eb;
height: 44rpx;
line-height: 44rpx;
padding: 0 15rpx;
font-size: 26rpx;
border-radius: 4rpx;
}
}
}
}
}
}
</style>

214
pages/user/censusUser.vue Normal file
View File

@@ -0,0 +1,214 @@
<template>
<view class="content">
<view class="list" v-if="orderList.length > 0">
<view class="label" v-for="(item, index) in orderList" :key="index">
<view class="item">
<image class="item-head" :src="item.avatar ? item.avatar : '/static/imgs/default_myHead.png'" mode="aspectFill"></image>
<view class="item-cont">
<view class="item-left">
<view class="item-top">
{{item.nickname}}
</view>
<view class="item-identity">
{{item.username}}
</view>
</view>
<view class="item-right" @click="clickCall(item.username)">
联系
</view>
</view>
</view>
<view class="see">
<view class="see-item">
<view class="see-name">
捐献金额
</view>
<view class="see-text see-color">
<text></text>{{item.orders_sum_amount}}
</view>
</view>
<view class="see-item">
<view class="see-name">
捐献数量
</view>
<view class="see-text">
{{item.orders_count}}
</view>
</view>
</view>
</view>
<view class="pagesLoding" v-if="lodingStats">
<block v-if="page.has_more">
<image class="pagesLodingIcon" src="/static/icons/refresh_loding.gif" mode="widthFix"></image>加载中...
</block>
<block v-else>
没有更多了~
</block>
</view>
</view>
<view class="pack-center pages-hint" v-else>
<image src="/static/imgs/coupon_null.png"></image>
<view>暂无数据</view>
</view>
</view>
</template>
<script>
import { dataUser } from '@/apis/interfaces/user'
export default {
data() {
return {
orderList : [],
page : {}, //分页信息
lodingStats : false //加载状态
};
},
onShow() {
// 数据-订单列表
this.censusInfo();
},
methods:{
// 查看数据-订单列表
censusInfo(page) {
dataUser({
page : page || 1
}).then(res => {
console.log(res.data)
let listArr = this.orderList,
newData = []
if(page == 1 || page == undefined) listArr = []
newData = listArr.concat(res.data)
this.orderList = newData
this.page = res.page
this.lodingStats= false
uni.stopPullDownRefresh()
}).catch(err => {
uni.showToast({
title: err.message,
icon: "none"
})
})
},
// 拨打电话
clickCall (tel) {
uni.makePhoneCall({
phoneNumber: tel,//电话号码
success: res => {
console.log(res);
},
fail: err =>{
console.log(err);
}
})
},
// 页面相关事件处理函数--监听用户下拉动作
onPullDownRefresh() {
// 数据-订单列表
this.censusInfo();
},
// 上拉加载
onReachBottom(){
this.lodingStats = true
let pageNumber = this.page.current
if(this.page.has_more){
pageNumber++
// 数据-订单列表
this.censusInfo(pageNumber);
}
}
}
}
</script>
<style lang="scss" scoped>
.content {
overflow: hidden;
background-color: #f5f5f5;
height: 100vh;
overflow-y: scroll;
}
.list {
padding: 30rpx;
box-sizing: border-box;
.label {
background-color: #ffffff;
margin-bottom: 30rpx;
border-radius: 10rpx;
padding: $padding;
box-sizing: border-box;
}
.item {
position: relative;
.item-head {
width: 100rpx;
height: 100rpx;
border-radius: 50%;
}
.item-cont {
position: absolute;
left: 0;
top: 0;
padding-left: 130rpx;
box-sizing: border-box;
width: 100%;
display: flex;
.item-left {
flex: 1;
line-height: 54rpx;
.item-top {
font-weight: 600;
margin-right: $margin - 10;
}
.item-identity {
font-size: $title-size-m;
color: #8282a7;
}
}
.item-right {
display: inline-block;
font-size: $title-size-m;
background-color: #edf4ff;
color: #5370eb;
height: 54rpx;
line-height: 54rpx;
padding: 0 $padding + 10;
border-radius: $radius * 4;
margin-top: $margin - 5;
}
}
}
.see {
padding: 30rpx 0;
display: flex;
background-color: #f4f7fd;
border-radius: 10rpx;
margin-top: 30rpx;
.see-item {
flex: 2;
text-align: center;
.see-name {
font-size: 24rpx;
color: #383c4b;
margin-top: 5rpx;
}
.see-text {
font-size: 28rpx;
font-weight: 600;
margin-top: 10rpx;
text {
font-size: 22rpx;
}
&.see-color {
color: red;
}
}
}
}
}
</style>

View File

@@ -1,31 +1,83 @@
<template>
<view class="content">
<view class="While">
<view class="codeUser" v-if="inviteData.user_info">
<image class="codeUser-img" :src="inviteData.user_info.avatar || '/static/imgs/default_myHead.png'" mode="aspectFill"></image>
<view class="codeUser-name">{{ inviteData.user_info.nickname }}</view>
<view class="code">
<image class="codeBack" :src="posterImg" mode="widthFix"></image>
<view class="code-share" @click="shareClick">
<image src="/static/icons/down.png"></image>
<view class="code-share-name">保存图片</view>
</view>
<view class="codeImg">
<image class="codeUser-img" :src="inviteData.code" mode="aspectFill"></image>
<view class="codeUser-text">
扫描二维码,注册成功后,即可绑定关系
</view>
<!-- 打卡海报 -->
<view class="postertBack" v-if="isImgLay"></view>
<view class="postert" v-if="isImgLay">
<view class="poster-Cont">
<img class="poster-Cont-img" :src="posterImg">
</view>
<view class="sign-btn">
<view class="remove-btn">长按图片保存</view>
<view class="sign-img-block">
<button class="sign-img-btn" size="mini" @click="isImgLay = false">取消</button>
</view>
</view>
</view>
<view class="While down">
长按保存我的推广码
</view>
<!--何院士 海报canvas -->
<!-- <vue-canvas-poster :widthPixels="1000" :painting="academician" @success="saveSuccess" @fail="saveFail" v-if="identity == 3"></vue-canvas-poster> -->
<!-- 海报canvas -->
<canvas class="canvasImg" canvas-id="qrcodeCard"></canvas>
<vue-canvas-poster :widthPixels="1000" :painting="paintings" @success="saveSuccess" @fail="saveFail"></vue-canvas-poster>
</view>
</template>
<script>
import { invite } from '@/apis/interfaces/user'
import { VueCanvasPoster } from 'vue-canvas-poster'
export default {
components: {
VueCanvasPoster
},
data() {
return {
inviteData: ''
inviteData: '', //用户二维码
invitecode : '', //二维码
identity : 1,//1为普通2为上师版 3为何院士
isImgLay : false, //是否显示图片弹出层
paintings : {
width: "375px",
height: "800px",
borderRadius: "10px",
background: "#ffffff",
views: [
//海报背景
{
type: "image",
url: "",
css: {
top: "0",
left: "0",
width: "375px",
height: "800px",
mode: 'aspectFill'
},
},
//二维码
{
type: "image",
url: "",
css: {
top: "412px",
left: "39px",
width: "110px",
height: "110px",
mode: 'aspectFill'
},
}
],
},
posterImg: "", //生成的海报图片路径
};
},
onShow() {
@@ -36,7 +88,12 @@
// 推广码
inviteInfo() {
invite().then(res => {
this.identity = res.user_info.tag
this.inviteData = res
this.invitecode = res.code
this.paintings.views[0].url = "/static/img/shartBack.jpg"
this.paintings.views[1].url = res.code
}).catch(err => {
uni.showToast({
title: err.message,
@@ -53,143 +110,217 @@
})
},
// 绘图
dowCode(){
uni.showLoading({
title: '加载中',
})
// 下载海报
shareClick (){
this.paintings.views[0].url = "/static/img/shart.jpg"
this.paintings.views[1].url = this.invitecode
this.isImgLay = true
// 头像
let avatarImg = new Promise(success=>{
uni.getImageInfo({
src : this.inviteData.user_info.avatar,
success : res => {
success(res.path)
}
})
})
// if(this.identity == 1) {
// 下载素材
let codeImg = new Promise(success => {
uni.getImageInfo({
src : this.inviteData.code,
success : res => {
success(res.path)
}
})
})
// }else if(this.identity == 2) {
// this.paintings.views[0].url = "/static/imgs/code_01.png"
// }else {
// this.academician.views[0].url = "/static/imgs/code_02.png"
// this.academician.views[1].url = "/static/imgs/codeshart_back_02.png"
// this.academician.views[2].url = this.invitecode
// this.academician.views[3].url = "/static/imgs/codeShart_title1.png"
// }
Promise.all([avatarImg, codeImg]).then(res => {
// 绘制海报
const ctx = uni.createCanvasContext('qrcodeCard')
ctx.save()
// 绘制背景
ctx.drawImage('/static/imgs/codeBack.png', 0, 0, 375, 452)
// 绘制头像
ctx.drawImage(res[0], 155, 35, 70, 70)
// 绘制二维码
ctx.drawImage(res[1], 110, 200, 160, 160)
// 文字
ctx.setFontSize(16)
ctx.setFillStyle("#FFFFFF")
ctx.setTextAlign('center')
ctx.fillText(this.inviteData.user_info.nickname, 190, 135 , 270)
// 文字
ctx.setFontSize(15)
ctx.setFillStyle("#919191")
ctx.setTextAlign('center')
ctx.fillText("扫描二维码,注册成功后,即可绑定关系",190, 400)
ctx.save();
ctx.beginPath(); //开始绘制
ctx.arc(70 / 2 + 156, 70 / 2 + 250, 70 / 2, 0, Math.PI * 2, false);
ctx.clip();
// 保存图片
ctx.draw(true, () => {
uni.hideLoading()
uni.canvasToTempFilePath({
canvasId: 'qrcodeCard',
x: 0,
y: 0,
success: res => {
this.removeSaveImg()
}
})
})
}).catch(err=>{
uni.showToast({
title: '海报下载,请检查网络',
icon : 'none'
})
})
},
saveSuccess(src) {
this.posterImg = src;
},
saveFail(err) {},
}
}
</script>
<style lang="scss">
.content{
overflow: hidden;
background: #f3f4f6;
padding: 140rpx 80rpx;
.code {
width: 100vw;
height: 100vh;
background-color: #08182f;
.codeBack {
width: 100%;
display: block;
}
.code-share {
position: fixed;
z-index: 10;
left: 0;
bottom: 22%;
background: linear-gradient(to right, #aa957b, #ffeeda);
width: 50rpx;
text-align: center;
border-radius: 0 20rpx 20rpx 0;
padding: 20rpx 0;
}
}
/* 何院士样式 */
.newCode-cont {
width: 70%;
height: 200rpx;
position: absolute;
z-index: 9;
text-align: center;
left: 15%;
bottom: 19.5%;
background: linear-gradient(to top, #a09084, #a58367);
padding: 15rpx;
box-sizing: border-box;
border-radius: 30rpx;
}
.newCode-img {
height: 170rpx;
margin: 0 auto;
background: linear-gradient(to top, #e9d1bd, #c49b7a);
border: 4rpx solid #f3c49d;
border-radius: 30rpx;
display: flex;
padding: 10rpx 30rpx 10rpx 10rpx;
box-sizing: border-box;
}
.While {
border-radius: 10rpx;
margin-bottom: 30rpx;
background-color: #FFFFFF;
box-shadow: 0 0 10rpx rgba($color: #000000, $alpha: .05);
border-radius: 10rpx;
overflow: hidden;
.newCode-img-title {
width: calc(100% - 140rpx);
}
.codeUser {
background-color: #6e79ec;
color: #FFFFFF;
text-align: center;
padding: 50rpx 0;
.codeUser-img {
background-color: #FFFFFF;
.newCode-img-title image {
width: 80%;
margin-top: 15rpx;
}
.newCode-img-code {
width: 140rpx;
height: 140rpx;
border-radius: 50%;
}
.code-cont {
width: 100%;
position: relative;
z-index: 9;
text-align: center;
left: 15%;
width: 200rpx;
padding: 15rpx;
top: 50%;
background-color: #FFFFFF;
}
.code-img{
margin-bottom: 10rpx;
overflow: hidden;
// border-radius: 30rpx;
width: 200rpx;
height: 200rpx;
position: relative;
// border: 4rpx solid #be9768;
}
}
.codeImg {
padding: 60rpx 0;
text-align: center;
.codeUser-img {
width: 360rpx;
height: 360rpx;
}
.codeUser-text {
padding: 0 100rpx;
color: #919191;
line-height: 48rpx;
box-sizing: border-box;
}
}
.down {
line-height: 90rpx;
text-align: center;
color: #54975e;
}
/* canvas */
.canvasImg {
.code-img image {
position: absolute;
left: -1000%;
bottom: 0;
height: 452px;
width: 375px;
background: #fbf6f0;
left: 0;
top: 0;
width: 100%;
}
.code-code {
color: #275979;
font-size: $title-size-sm - 2;
border-top: 2rpx #275979 dotted;
padding-top: 10rpx;
font-weight: 600;
}
.code-text {
background: linear-gradient(to right, #aa957b, #ffeeda, #aa957b);
-webkit-background-clip: text;
color: transparent;
font-size: 26rpx;
}
.code-share image {
width: 30rpx;
height: 30rpx;
margin-bottom: 5rpx;
}
.code-share-name {
writing-mode:vertical-rl;
font-size: 28rpx;
padding-left: 4rpx;
color: #4d2a00;
}
.postertBack {
width: 100vw;
height: 100vh;
position: fixed;
background-color: rgba(0,0,0,.6);
left: 0;
top: 0;
z-index: 90;
}
.postert {
width: 100vw;
height: 100vh;
position: fixed;
left: 0;
top: 0;
z-index: 99;
.poster-Cont {
width: 80vw;
height: 80vh;
top: 3vh;
left: 10vw;
position: absolute;
background-color: #FFFFFF;
box-sizing: border-box;
border-radius: $radius-m;
.poster-Cont-img {
width: 100%;
height: 100%;
}
.poster-Cont-code {
position: absolute;
bottom: 250px;
left: 46px;
width: 140rpx;
height: 140rpx;
}
}
}
.sign-btn {
position: absolute;
top: 83vh;
width: 80%;
left: 10%;
z-index: 999;
.remove-btn {
width: 100%;
line-height: 90rpx;
background-color: #bf9960;
color: #FFFFFF;
border-radius: $radius-m;
margin-top: $margin - 10;
text-align: center;
font-size: $title-size + 2;
}
.sign-img-block {
display: flex;
margin: 20rpx -10rpx 0;
.sign-img-btn {
flex: 2;
line-height: 90rpx;
background-color: #ffeeda;
border-radius: $radius-m;
text-align: center;
font-size: $title-size;
margin: 0 10rpx;
}
}
}
</style>

File diff suppressed because it is too large Load Diff

14
pages/user/product.vue Normal file
View File

@@ -0,0 +1,14 @@
<template>
<view class="content">
<image class="product" src="http://api.siyuankunlun.com/storage/materials/2022/09/05/productimg.jpg" mode="widthFix"></image>
</view>
</template>
<script>
</script>
<style lang="scss" scoped>
.product {
width: 100%;
}
</style>

26
pages/user/tips.vue Normal file
View File

@@ -0,0 +1,26 @@
<template>
<view class="content">
<view class="pack-center pages-hint">
<image src="/static/img/Noevaluate.png"></image>
<view class="point-name">敬请期待</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {};
},
onShow() {},
methods: {
}
}
</script>
<style lang="scss">
.point-name {
font-size: $title-size + 4;
margin-top: $margin;
}
</style>

View File

@@ -1,625 +0,0 @@
<template>
<view class="content">
<view class="caseUser">
<view class="caseUser-left">
<view class="caseUser-left-number"> 建档人{{ caseInfo.name }} </view>
<view class="caseUser-left-tool">
<view class="caseUser-left-number"> 年龄{{ caseInfo.age }} </view>
<view class="caseUser-left-number"> 性别{{ caseInfo.sex == 'woman' ? '女' : '男' }} </view>
</view>
</view>
<view class="caseUser-img">
<image v-if="caseImg" @click="openImg(caseImg)" :src="caseImg" mode="aspectFill"></image>
<block v-else>
<image src="/static/imgs/caseTips.png" mode="aspectFill"></image>
<!-- <view @click="updImg" class="caseUser-tips">上传</view> -->
</block>
</view>
<view class="caseUser-label">
<view class="caseUser-label-see">
<view class="caseUser-label-name"> 测量类型 </view>
</view>
<view class="caseUser-label-see">
<view class="caseUser-label-name"> 初始值 </view>
</view>
<view class="caseUser-label-see">
<view class="caseUser-label-name"> 最高值 </view>
</view>
<view class="caseUser-label-see">
<view class="caseUser-label-name"> 最新值 </view>
</view>
</view>
<view class="base" v-if="countInfo">
<view class="baseitem">
<view class="title">
<image src="/static/imgs/zhi.png" mode="widthFix" style="width: 30rpx;" />
<text>高血脂</text>
</view>
<view class="title">{{countInfo.hyperlipidemia.first}}</view>
<view class="title">{{countInfo.hyperlipidemia.max}}</view>
<view class="title">{{countInfo.hyperlipidemia.last}}</view>
</view>
<view class="baseitem">
<view class="title">
<image src="/static/imgs/ya.png" mode="widthFix" style="width: 30rpx;" />
<text>高血压</text>
</view>
<view class="title">{{countInfo.hypertension.first}}</view>
<view class="title">{{countInfo.hypertension.max}}</view>
<view class="title">{{countInfo.hypertension.last}}</view>
</view>
<view class="baseitem">
<view class="title">
<image src="/static/imgs/tang.png" mode="widthFix" style="width: 30rpx;" />
<text>高血糖</text>
</view>
<view class="title">{{countInfo.hyperglycemia.first}}</view>
<view class="title">{{countInfo.hyperglycemia.max}}</view>
<view class="title">{{countInfo.hyperglycemia.last}}</view>
</view>
</view>
</view>
<view class="caseRemark">
<view class="caseRemark-title"> 健康说明 </view>
<view class="caseRemark-text">
{{ caseInfo.remark }}
</view>
</view>
<view class="caseTime" v-if="timeInfo.length > 0">
<view class="caseTime-label" v-for="(items, index) in timeInfo" :key="index">
<view class="caseTime-date">
{{ items.created_at }}
</view>
<view class="caseTime-cont" @click="showSee(items.item.gout_case_log_id)"
v-if="items.type == 'case_log'">
<view class="caseTime-cont-left" :class="{active : items.item.cover}">
<view class="caseTime-cont-name" v-if="items.item">
{{ items.item.type.text }}测量 - {{ items.item.quantity }}{{items.item.type.unit}}
</view>
<view class="nowrap-multi caseTime-cont-text">
{{ items.item.remark }}
</view>
</view>
<image class="caseTime-cont-img" :src="items.item.cover" mode="aspectFill"></image>
</view>
<!-- <view class="caseTime-cont"
@click="$Router.push({name: 'Indexdetails', params: {id: items.item.goods.goods_id}})" v-else>
<view class="caseTime-cont-left">
<view class="caseTime-cont-name">
{{ items.text }}
</view>
<view class="nowrap caseTime-cont-text">
商品 {{ items.item.goods.goods_name }}
</view>
<view class="caseTime-cont-text" style="margin: 0;">
状态 {{ items.item.state }}
</view>
</view>
<image class="caseTime-cont-img" :src="items.item.goods.cover" mode="aspectFill"></image>
</view> -->
</view>
</view>
<view class="no-list" v-else >
<u-empty mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png" text="暂无记录~"/>
</view>
<!-- 记录尿酸值弹出 -->
<view class="recordBack" v-if="recordShow"></view>
<view class="recordCont" v-if="recordShow">
<view class="recordCont-title" v-if="LogInfo.type">
<view class="recordCont-title-text">
{{LogInfo.type.text}}测量结果
</view>
<image @click="recordClick" class="recordCont-title-close" src="/static/icons/uricacidClose.png"
mode="aspectFill"></image>
</view>
<view class="recordCont-form">
<view class="site-input" v-if="LogInfo.type">
<label> 测量值</label> <view class="recordCont-title-input"> {{ LogInfo.quantity }} {{LogInfo.type.unit}} </view>
</view>
<view class="site-input">
<label>备注描述</label> <view class="site-remarks"> {{ LogInfo.remark }} </view>
</view>
<view class="site-data">
<label>记录日期</label> <view class="site-data-text"> {{ LogInfo.created_at }} </view>
</view>
<view class="site-input" v-if="LogInfo.cover">
<label>图片信息</label>
<image class="issueNew-icon" @click="openImg(LogInfo.cover)" :src="LogInfo.cover" mode="aspectFill" />
</view>
</view>
</view>
</view>
</template>
<script>
import {
goutSee,
goutCover,
DetLog
} from '@/apis/interfaces/gout'
import {
uploads
} from '@/apis/interfaces/uploading'
export default {
data() {
return {
caseImg: '',
caseInfo: '',
LogInfo: '', //记录详情
countInfo: '',
timeInfo: [],
page:1,
has_more:true,
recordShow: false,
};
},
onLoad() {
this.getlist()
},
onReachBottom() {
if(this.has_more){
this.page = this.page +1
this.getlist();
} else{
uni.showToast({
title:'没有更多~',
icon:'none',
mask:true,
duration:1000
})
}
},
methods: {
// 获取列表
getlist(){
goutSee({page:this.page,type:''}).then(res => {
if(this.page === 1){
this.caseInfo = res.case
this.countInfo = res.count
this.caseImg = res.case.cover
}
this.timeInfo = this.timeInfo.concat(res.timelines.data)
this.has_more = res.timelines.page.has_more
}).catch(err => {
uni.showToast({
title: err.message,
icon: 'none'
})
})
},
// 查看图片
openImg(img) {
uni.previewImage({
current: img,
urls: [img]
})
},
// 上传图片
updImg(type) {
uni.chooseImage({
count: 1,
success: path => {
uploads([{
uri: path.tempFilePaths[0]
}]).then(res => {
this.caseImg = res.url[0]
// 上传头像
this.settingInfo(res.path[0]);
}).catch(err => {
uni.showToast({
title: err.message,
icon: 'none'
})
})
}
})
},
// 上传图片-提交
settingInfo(value) {
goutCover(this.caseInfo.gout_case_id, {
cover: value
}).then(res => {
uni.showToast({
title: '上传成功',
icon: 'none'
})
}).catch(err => {
uni.showToast({
title: err.message,
icon: 'none'
})
})
},
// 查看详情
showSee(val) {
// 获取详情
this.lastDet(val);
this.recordShow = true
},
// 新增尿酸弹出
recordClick() {
this.recordShow = !this.recordShow
},
// 尿酸列表-详情
lastDet(id) {
DetLog(id).then(res => {
this.LogInfo = res
this.LogId = id
}).catch(err => {
uni.showToast({
title: err.message,
icon: "none"
})
})
},
}
}
</script>
<style lang="scss" scoped>
.content {
overflow: hidden;
background: linear-gradient(to bottom, rgba($color: $mian-color, $alpha: .2), white);
padding: 30rpx;
box-sizing: border-box;
}
.caseUser {
background-color: rgba($color: #4490ff, $alpha: 1);
color: #FFFFFF;
padding: 30rpx 0;
box-sizing: border-box;
position: relative;
// height: 310rpx;
border-radius: 10rpx 10rpx 0 0;
.caseUser-left {
height: 160rpx;
padding-left: 30rpx;
box-sizing: border-box;
.caseUser-left-tool {
display: flex;
margin-top: 30rpx;
.caseUser-left-number {
flex: 2;
font-weight: normal;
}
}
.caseUser-left-number {
line-height: 48rpx;
font-weight: 600;
}
}
.caseUser-img {
width: 120rpx;
height: 140rpx;
border-radius: 6rpx;
position: absolute;
background-color: #a8b0ff;
padding: 6rpx;
box-sizing: border-box;
right: 30rpx;
top: 25rpx;
image {
width: 100%;
height: 100%;
}
.caseUser-tips {
position: absolute;
top: 0;
left: 0;
color: #707070;
font-weight: 600;
font-size: 28rpx;
line-height: 140rpx;
text-align: center;
width: 100%;
}
}
.caseUser-label {
background-color: #3670ce;
color: #FFFFFF;
display: flex;
padding: 20rpx 0;
.caseUser-label-see {
flex: 3;
text-align: center;
.caseUser-label-name {
font-size: 26rpx;
margin-bottom: 10rpx;
}
.caseUser-label-number {
font-weight: 600;
}
}
}
}
.caseRemark {
background-color: #F8F8F8;
padding: 30rpx;
box-sizing: border-box;
.caseRemark-title {
font-weight: 600;
margin-bottom: 20rpx;
}
.caseRemark-text {
font-size: 28rpx;
color: #666;
line-height: 48rpx;
}
}
.caseTime {
background-color: #FFFFFF;
padding: 50rpx;
box-sizing: border-box;
position: relative;
&::after {
position: absolute;
content: '';
left: 50rpx;
top: 55rpx;
background-color: #ebebeb;
width: 2rpx;
height: 100%;
}
.caseTime-label {
position: relative;
padding-left: 50rpx;
&::after {
position: absolute;
content: '';
left: -13rpx;
z-index: 99;
top: 6rpx;
background-color: #ebebeb;
width: 26rpx;
height: 26rpx;
border-radius: 50%;
}
&:last-child::before {
position: absolute;
content: '';
left: -1rpx;
z-index: 99;
top: 6rpx;
background-color: #FFFFFF;
width: 2rpx;
height: 200%;
}
.caseTime-date {
font-size: 26rpx;
color: #666666;
font-weight: 600;
}
.caseTime-cont {
background-color: rgba($color: #2d5ba5, $alpha: 0.05);
margin: 20rpx 0 40rpx;
padding: 20rpx 30rpx;
border-radius: 10rpx;
box-sizing: border-box;
position: relative;
// height: 180rpx;
min-height: 120rpx;
.caseTime-cont-left {
width: 100%;
&.active {
width: calc(100% - 100rpx);
}
.caseTime-cont-name {
color: #3670ce;
font-size: 30rpx;
word-break: break-word;
}
.caseTime-cont-text {
font-size: 28rpx;
color: #666666;
margin-top: 20rpx;
}
.caseTime-cont-price {
color: red;
margin-top: 20rpx;
}
}
.caseTime-cont-img {
position: absolute;
right: 20rpx;
top: 20rpx;
width: 100rpx;
height: 100rpx;
border-radius: 6rpx;
}
}
}
}
// 弹出
.recordBack {
position: fixed;
width: 100%;
height: 100%;
background-color: rgba($color: #000000, $alpha: .4);
left: 0;
top: 0;
z-index: 99;
}
.recordCont {
position: fixed;
width: 100%;
left: 0;
bottom: 0;
background-color: #FFFFFF;
z-index: 100;
overflow-y: scroll;
height: 70vh;
border-radius: 30rpx 30rpx 0 0;
padding: 30rpx;
box-sizing: border-box;
.recordCont-title {
border-bottom: 2rpx solid #F2F2F2;
padding-bottom: 30rpx;
display: flex;
line-height: 54rpx;
position: relative;
.recordCont-title-close {
width: 40rpx;
height: 40rpx;
margin-top: 7rpx;
}
.recordCont-title-text {
width: 100%;
text-align: center;
}
.recordCont-title-btn view {
background-color: red;
width: 150rpx;
text-align: center;
color: #FFFFFF;
height: 54rpx;
line-height: 54rpx;
border-radius: 40rpx;
font-size: 28rpx;
position: absolute;
right: 0;
top: 0;
}
}
.recordCont-form {
margin-top: 30rpx;
.site-input {
margin-bottom: 30rpx;
label {
margin-bottom: 20rpx;
display: block;
font-weight: 600;
}
.recordCont-title-input {
display: flex;
font-size: 40rpx;
font-weight: 600;
line-height: 60rpx;
text {
font-size: 32rpx;
font-weight: normal;
color: #adadad;
padding-left: 10rpx;
}
}
}
.site-remarks {
background-color: #F2F2F2;
border-radius: 10rpx;
padding: 20rpx;
box-sizing: border-box;
textarea {
width: 100%;
height: 80rpx;
}
text {
text-align: right;
display: block;
font-size: 26rpx;
color: #54975e;
}
}
.site-data {
margin: 40rpx 0;
display: flex;
label {
flex: 1;
font-weight: 600;
}
}
}
}
.issueNew-icon {
width: 200rpx;
height: 200rpx;
}
.base {
width: 100%;
background-color: white;
color: #333;
font-size: 26rpx;
box-sizing: border-box;
padding-bottom: 20rpx;
.baseitem {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
box-sizing: border-box;
padding-top: 20rpx;
}
.title {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
box-sizing: border-box;
flex: 1;
image {
margin-right: 6rpx;
}
}
}
.no-list{
min-height: 50vh;
background-color: #F8F8F8;
padding-top: 100rpx;
}
</style>

33
pages/webview/index.vue Normal file
View File

@@ -0,0 +1,33 @@
<template>
<view>
<web-view :src="url"></web-view>
</view>
</template>
<script>
import { wechatCode } from '@/apis/interfaces/authUrl'
export default {
data() {
return {
url: '' // 外部链接地址
}
},
onLoad(options) {
// 获取微信code
wechatCode({
code: options.code
}).then(res => {
// , params: {openid: res.openid}
this.$Router.push({name: 'Index'})
}).catch(err => {
uni.showToast({
title: err.message,
icon: "none"
})
})
},
}
</script>
<style>
</style>

110
pages/wechat/index.vue Normal file
View File

@@ -0,0 +1,110 @@
<template>
<view class="content">
<!-- <image class="weChat" src="@/static/imgs/weChat_back.png"></image>
<view class="weChatCont">
<image class="weChat-title" src="@/static/imgs/weChat_title.png" mode="widthFix"></image>
<view class="weChat-text">
<view class="weChat-img">
<image src="@/static/imgs/weChat_code.png" mode="widthFix"></image>
</view>
<view class="weChat-name">
<image src="@/static/imgs/weChat_name.png" mode="widthFix"></image>
</view>
</view>
<view class="weChatBtn">
<view class="btn" @click="$Router.push({name: 'Index'})">锶享体验官</view>
<view class="btn" @click="$Router.push({name: 'User'})">锶人中心</view>
</view> -->
</view>
</view>
</template>
<script>
import { wechatCode } from '@/apis/interfaces/authUrl'
export default {
data() {
return {
}
},
onLoad(options) {
// 获取微信code
wechatCode({
code: options.code
}).then(res => {
this.$store.commit('setOpenId', res.openid)
this.$Router.push({
name: this.$Route.query.pageName
})
}).catch(err => {
uni.showToast({
title: err.message,
icon: "none"
})
})
},
onShow() {
},
methods: {}
}
</script>
<style lang="scss" scoped>
.weChat {
position: fixed;
width: 100vw;
height: 100vh;
left: 0;
top: 0;
}
.weChatCont {
position: absolute;
width: 100%;
z-index: 9;
left: 0;
top: 0;
padding: $padding * 2;
box-sizing: border-box;
text-align: center;
.weChat-title {
width: 80%;
margin: 0 auto;
}
.weChat-text {
width: 65%;
margin: 60rpx auto 0;
box-sizing: border-box;
.weChat-img {
background-color: #FFFFFF;
padding: $padding;
box-sizing: border-box;
margin-top: $margin;
image {
width: 100%;
}
}
.weChat-name {
padding: $padding $padding + 10;
box-sizing: border-box;
image {
width: 100%;
}
}
}
.weChatBtn {
color: #000000;
text-align: center;
margin-top: 50rpx;
.btn {
background-color: #FFFFFF;
display: inline-block;
width: 100%;
height: 80rpx;
line-height: 80rpx;
border-radius: $radius-m;
}
}
}
</style>

View File

@@ -8,6 +8,11 @@
import { RouterMount, createRouter } from 'uni-simple-router';
import store from '../store/index'
import { jsdkInfo } from '@/apis/interfaces/user.js'
import { authFollow } from '@/apis/interfaces/authUrl'
const wx = require('jweixin-module')
const router = createRouter({
h5: {
paramsToQuery: true
@@ -23,6 +28,22 @@ const router = createRouter({
// 全局路由前置守卫
router.beforeEach((to, from, next) => {
const token = store.getters.getToken || uni.getStorageSync('token')
const openId = store.getters.getOpenId || uni.getStorageSync('openId')
// 检查是否需要微信授权
// if(to.name != 'weChatIndex' && openId === ''){
// authFollow({
// url: '/wechat?pageName=' + to.name
// }).then(res => {
// window.location.href = res
// }).catch(err => {
// uni.showToast({
// title: err.message,
// icon: "none"
// })
// })
// return
// }
// 检查是否需要登录
if(to.auth && token === ''){
next({
@@ -35,6 +56,26 @@ router.beforeEach((to, from, next) => {
return
}
next();
// 微信鉴权
jsdkInfo(window.location.href).then(res => {
let wxConfig = JSON.parse(res)
wx.config({
debug: false,
appId: wxConfig.appId,
timestamp: wxConfig.timestamp,
nonceStr: wxConfig.nonceStr,
signature: wxConfig.signature,
jsApiList: ['updateAppMessageShareData']
})
wx.ready(() => {
wx.updateAppMessageShareData({
title: '助力修缮庙宇,分享功德无量',
desc: '和我一起为西安禅经寺修缮添砖加瓦',
link: 'http://web.temple.siyuankunlun.cn/' + '?invite=' + store.getters.getIntive,
imgUrl: 'http://web.temple.siyuankunlun.cn/photo.png'
})
})
})
})
// 全局路由后置守卫

BIN
static/.DS_Store vendored Normal file

Binary file not shown.

BIN
static/icons/.DS_Store vendored Normal file

Binary file not shown.

BIN
static/icons/address_01.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
static/icons/address_02.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
static/icons/ancrown.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

BIN
static/icons/bank_add.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
static/icons/bank_del.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
static/icons/bank_edit.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

BIN
static/icons/banks.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 354 B

BIN
static/icons/circle_add.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 449 B

BIN
static/icons/codeLong.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 428 B

BIN
static/icons/down.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

BIN
static/icons/enlarge.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 443 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 805 B

BIN
static/icons/green.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
static/icons/memberIcon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
static/icons/member_01.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

BIN
static/icons/member_02.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

BIN
static/icons/member_03.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

BIN
static/icons/member_04.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

BIN
static/icons/member_05.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

BIN
static/icons/member_06.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

BIN
static/icons/newIcon_00.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
static/icons/newIcon_01.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

BIN
static/icons/newIcon_02.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Some files were not shown because too many files have changed in this diff Show More